html_url
stringlengths 48
51
| title
stringlengths 5
268
| comment
stringlengths 70
51.8k
| body
stringlengths 0
29.8k
| comment_length
int64 16
1.52k
| text
stringlengths 164
54.1k
| embeddings
listlengths 768
768
|
|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/2046
|
add_faisis_index gets very slow when doing it interatively
|
Ok, I will report the details too soon. I am the first one on the list and currently add_index being computed for the 3rd time in the loop. Actually seems like the time is taken to complete each interaction is the same, but around 1 hour more compared to running it without the training loop. A the moment this takes 5hrs and 30 mins. If there is any way to faster the process, an end-to-end rag will be perfect. So I will also try out with different thread numbers too.

|
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
| 91
|
add_faisis_index gets very slow when doing it interatively
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
Ok, I will report the details too soon. I am the first one on the list and currently add_index being computed for the 3rd time in the loop. Actually seems like the time is taken to complete each interaction is the same, but around 1 hour more compared to running it without the training loop. A the moment this takes 5hrs and 30 mins. If there is any way to faster the process, an end-to-end rag will be perfect. So I will also try out with different thread numbers too.

|
[
-0.49882516264915466,
-0.26827844977378845,
-0.024500647559762,
0.1282288283109665,
0.05943915247917175,
0.20778384804725647,
0.12146306037902832,
0.42412909865379333,
0.291742742061615,
0.2924974858760834,
-0.11882596462965012,
0.188315287232399,
0.13721296191215515,
0.08582107722759247,
-0.13625605404376984,
0.17504271864891052,
0.23703299462795258,
0.08533414453268051,
0.2607974112033844,
-0.13441404700279236,
-0.32748016715049744,
-0.30906423926353455,
-0.15891285240650177,
-0.2578621208667755,
-0.40069231390953064,
-0.0958191454410553,
-0.24362172186374664,
-0.08205042779445648,
0.19824793934822083,
-0.47291648387908936,
-0.13753199577331543,
0.1398429572582245,
0.34025880694389343,
0.25829288363456726,
-0.00012204969971207902,
0.05567667633295059,
0.22800785303115845,
0.06546277552843094,
-0.22299717366695404,
0.6411961913108826,
0.3400721848011017,
-0.06948856264352798,
-0.1751103401184082,
-0.3107718527317047,
-0.14555537700653076,
-0.11104141920804977,
0.08107940107584,
-0.04693025350570679,
-0.1663648784160614,
0.19430120289325714,
0.026624172925949097,
-0.05828629806637764,
0.05225489288568497,
-0.015400421805679798,
0.40251225233078003,
-0.0755910724401474,
-0.06917734444141388,
0.3174716532230377,
0.16351284086704254,
-0.07223645597696304,
0.09974305331707001,
0.44810786843299866,
0.120641328394413,
-0.22677703201770782,
0.10890348255634308,
0.20516164600849152,
0.7838155627250671,
0.022439492866396904,
0.06526804715394974,
0.15266908705234528,
0.0153404101729393,
-0.09055348485708237,
-0.4430079758167267,
-0.10290209203958511,
0.42571401596069336,
-0.618060290813446,
-0.06740108132362366,
-0.08374133706092834,
-0.1014745682477951,
0.053860053420066833,
0.1745847463607788,
-0.03023025207221508,
0.03631783649325371,
0.04745028540492058,
0.17490026354789734,
0.1653580665588379,
0.3874707520008087,
-0.05990183725953102,
0.5584331750869751,
0.04244775325059891,
-0.11685464531183243,
0.04488201439380646,
-0.09207794815301895,
0.012196076102554798,
-0.6050311923027039,
0.08808470517396927,
-0.03091667965054512,
-0.09933095425367355,
-0.09268633276224136,
0.017801547423005104,
-0.369486540555954,
0.006166044622659683,
0.2365611046552658,
0.0033363329712301493,
-0.18306593596935272,
-0.09025747328996658,
-0.5061047077178955,
0.05588063597679138,
0.0839017927646637,
0.10628657042980194,
-0.3780882656574249,
0.0992341935634613,
-0.0033384810667485,
-0.004310553427785635,
-0.3259795606136322,
-0.29813456535339355,
-0.2288902997970581,
0.2228073924779892,
-0.1811421811580658,
0.07718756049871445,
-0.40396761894226074,
-0.25227686762809753,
0.20507250726222992,
0.41622263193130493,
-0.1177443340420723,
-0.07613808661699295,
0.010839538648724556,
-0.0346161313354969,
-0.23442824184894562,
0.17616769671440125,
-0.22201746702194214,
0.23066066205501556,
-0.03196385130286217,
0.5045983195304871,
-0.029106812551617622,
-0.22139428555965424,
-0.08906889706850052,
-0.021730387583374977,
0.08396376669406891,
-0.007842501625418663,
-0.044163525104522705,
-0.2998936176300049,
0.24666738510131836,
0.07492349296808243,
-0.2632139325141907,
-0.06768488138914108,
-0.09395243972539902,
0.12111043930053711,
-0.22782295942306519,
0.22150807082653046,
-0.21739515662193298,
-0.36510276794433594,
0.02715766429901123,
0.019331108778715134,
0.3086777627468109,
-0.06309196352958679,
0.4208211898803711,
0.11439678817987442,
0.17301812767982483,
0.16133496165275574,
0.15917611122131348,
-0.13144302368164062,
-0.2680220901966095,
0.08318619430065155,
0.22678479552268982,
0.36273834109306335,
0.09372176975011826,
0.03477165475487709,
0.29801318049430847,
0.39013007283210754,
0.2124062031507492,
0.39999398589134216,
-0.11594938486814499,
0.6762606501579285,
-0.3200046122074127,
0.0842917189002037,
0.24512167274951935,
-0.25537896156311035,
-0.2924267649650574,
0.18690502643585205,
-0.16636398434638977,
-0.07732699066400528,
0.3296641707420349,
0.5182709693908691,
0.3120293617248535,
0.0870155468583107,
0.34109240770339966,
0.306255578994751,
0.009027169086039066,
-0.031247030943632126,
-0.4050689935684204,
-0.05827190726995468,
0.2639197111129761,
0.3804077208042145,
-0.3354529142379761,
0.10174088925123215,
-0.040180955082178116,
-0.32988083362579346,
0.6009742617607117,
-0.47610604763031006,
-0.12176156044006348,
0.06805816292762756,
0.3615746796131134,
0.33938536047935486,
0.23287023603916168,
0.2761097848415375,
0.14954109489917755,
0.16262610256671906,
0.09601332247257233,
0.09878852963447571,
0.17015457153320312,
-0.4183504581451416,
0.21562930941581726,
-0.025750624015927315,
-0.21819405257701874,
0.10788168013095856,
-0.060978226363658905,
0.15002486109733582,
-0.0456758476793766,
-0.19987328350543976,
-0.15688666701316833,
0.5427843928337097,
-0.6157973408699036,
0.02794579230248928,
-0.24889647960662842,
-0.15608301758766174,
0.007014264818280935,
-0.21342624723911285,
-0.034243520349264145,
0.14295808970928192,
0.05249642953276634,
-0.3868671655654907,
-0.05383381247520447,
0.1028614491224289,
0.12662534415721893,
-0.18767660856246948,
0.5111070871353149,
-0.11369690299034119,
-0.03703640028834343,
0.2962217926979065,
0.044953539967536926,
-0.15126429498195648,
0.10901732742786407,
-0.19376131892204285,
-0.001878442708402872,
0.4852038323879242,
0.3487831652164459,
0.24583370983600616,
-0.021493786945939064,
-0.23320868611335754,
0.047029927372932434,
-0.040650516748428345,
-0.0793866366147995,
0.2275259643793106,
0.0799434557557106,
0.13025416433811188,
0.4091724455356598,
-0.03333542123436928,
-0.333244651556015,
0.23246285319328308,
0.18577763438224792,
-0.20312979817390442,
-0.43140751123428345,
0.2710413634777069,
0.3516988754272461,
-0.03689730539917946,
-0.3497079610824585,
-0.5220080614089966,
0.2360263615846634,
0.31859853863716125,
0.18839207291603088,
-0.07165347784757614,
-0.02765061892569065,
-0.24728116393089294,
0.1691095381975174,
0.056553300470113754,
-0.04837125912308693,
0.10004880279302597,
0.1766422837972641,
-0.21454474329948425,
-0.20678958296775818,
-0.25529661774635315,
-0.13639618456363678,
0.4286453127861023,
-0.044338617473840714,
0.3094404935836792,
0.1777622401714325,
0.27718648314476013,
-0.12472555786371231,
-0.12497524172067642,
0.28875258564949036,
0.008841033093631268,
0.04161049425601959,
-0.10893584042787552,
-0.03623782843351364,
0.19311049580574036,
-0.046948667615652084,
0.36491823196411133,
0.19579406082630157,
-0.32509127259254456,
0.01984449289739132,
-0.09847081452608109,
-0.12149550020694733,
-0.0789787694811821,
0.12100574374198914,
-0.15054965019226074,
0.11740070581436157,
0.04394659399986267,
-0.052580177783966064,
-0.18513722717761993,
-0.08627106249332428,
-0.1575879454612732,
-0.0794762670993805,
-0.29745039343833923,
-0.166235089302063,
-0.24606873095035553,
-0.1250382661819458,
-0.11964553594589233,
0.004331060219556093,
0.0005506000597961247,
-0.010688086971640587,
-0.04048744589090347,
-0.2826750874519348,
-0.1588369756937027,
0.06079479679465294,
-0.2936345934867859,
-0.21670210361480713,
-0.17391933500766754,
0.22814054787158966,
-0.0244003813713789,
0.09305927157402039,
-0.11566969007253647,
0.06675161421298981,
0.12224036455154419,
-0.09570088982582092,
-0.15432998538017273,
-0.05346102640032768,
-0.23314324021339417,
0.2917102873325348,
0.14917171001434326,
0.046830914914608,
-0.07943687587976456,
-0.41229644417762756,
-0.014396199956536293,
0.49690350890159607,
-0.5218707323074341,
-0.04079889878630638,
-0.3583913743495941,
0.2859601080417633,
-0.3150937557220459,
0.4582992196083069,
0.05670711398124695,
-0.24624811112880707,
-0.13801313936710358,
0.3644829988479614,
0.1745101511478424,
0.3875305652618408,
-0.061713509261608124,
0.0549771673977375,
-0.0879170224070549,
0.2675457298755646,
-0.11497589945793152,
0.5162416696548462,
0.32723188400268555,
-0.2136986255645752,
-0.04781858250498772,
-0.2623961865901947,
0.11595138162374496,
0.05277024209499359,
-0.13988201320171356,
0.29652485251426697,
0.08347855508327484,
-0.3149944543838501,
0.1665271818637848,
-0.2887454032897949,
-0.4117940366268158,
0.03204282000660896,
-0.05276046693325043,
0.19824540615081787,
-0.24431051313877106,
0.3169921636581421,
0.0489506833255291,
0.49109935760498047,
-0.17805087566375732,
0.2910947799682617,
-0.2383597493171692,
-0.1767042875289917,
0.19751496613025665,
0.2727537453174591,
0.2449004352092743,
-0.16755744814872742,
0.02649623341858387,
-0.5409102439880371,
-0.4216776490211487,
0.2834407389163971,
0.1674797385931015,
0.23528403043746948,
0.2791200578212738,
-0.10083381086587906,
0.5258057713508606,
-0.15621161460876465,
0.7999860644340515,
0.020683541893959045,
-0.3363373279571533,
0.3844906985759735,
-0.1618194878101349,
0.05287637189030647,
-0.21779318153858185,
-0.1827090084552765,
-0.0659896582365036,
0.23377461731433868,
0.4407466650009155,
-0.09317793697118759,
-0.24796512722969055,
0.6446048021316528,
0.06708817183971405,
-0.14724896848201752,
-0.3441525995731354,
-0.1861822009086609,
-0.35430601239204407,
-0.04121949523687363,
0.7678549289703369,
-0.12169075012207031,
0.15569071471691132,
0.1822197437286377,
-0.051234640181064606,
-0.38188865780830383,
0.15986618399620056,
0.23867441713809967,
-0.005120040848851204,
0.050583358854055405,
0.455783873796463,
0.4348106384277344,
0.07141595333814621,
0.0007325740880332887,
0.11927373707294464,
-0.03691220283508301,
-0.30439624190330505,
0.07315177470445633,
-0.18884620070457458,
-0.25568538904190063,
0.37994295358657837,
0.7006723880767822,
0.18687665462493896,
0.24840828776359558,
-0.21023093163967133,
0.3775888681411743,
-0.19144584238529205,
0.024531345814466476,
0.43831244111061096,
-0.0020621030125766993,
-0.17877259850502014,
-0.5383256673812866,
0.31127867102622986,
0.2034226506948471,
0.07330293953418732,
0.06086021289229393,
-0.07573039829730988,
-0.01638045720756054,
0.3021714985370636,
0.1250007152557373,
0.9838237762451172,
-0.02691991813480854,
0.1929827183485031,
0.50630784034729,
0.004840462934225798,
-0.24390368163585663,
-0.6487336754798889,
0.3692772090435028,
-0.33292150497436523,
-0.22415265440940857,
0.19311641156673431,
-0.10114186257123947,
-0.08476849645376205,
0.073533795773983,
-0.03934306278824806,
0.09914674609899521,
-0.04727573320269585,
-0.08625645935535431,
-0.2586022615432739,
0.38955432176589966,
0.31519457697868347,
-0.42784005403518677,
0.024883409962058067,
0.001350741251371801,
0.271456241607666,
-0.09871555119752884,
0.12781597673892975,
-0.16340002417564392,
-0.1108853816986084,
0.018441425636410713,
0.12517376244068146,
-0.07911400496959686,
-0.12837839126586914,
0.01305884774774313,
-0.048773329704999924,
-0.08731187880039215,
-0.23292511701583862,
-0.32441654801368713,
0.46041998267173767,
-0.029945844784379005,
0.09953469038009644,
0.081583671271801,
-0.09911026805639267,
0.07216382026672363,
-0.08676977455615997,
-0.49708321690559387,
0.22654052078723907,
0.08081196248531342,
-0.17367833852767944,
0.14937090873718262,
0.07872676849365234,
-0.3227708339691162,
-0.14609792828559875,
0.17442995309829712,
0.020576778799295425,
0.0075490353628993034,
-0.03673763945698738,
0.3179985284805298,
-0.26263749599456787,
-0.2335655391216278,
0.020059769973158836,
0.09207716584205627,
-0.4317528009414673,
0.5605180263519287,
-0.3023817241191864,
-0.3800688683986664,
-0.05465592443943024,
0.016695475205779076,
0.3058086335659027,
0.056038208305835724,
0.2623710334300995,
-0.0891200453042984,
-0.30488115549087524,
-0.1546768993139267,
-0.30242931842803955,
0.06128295511007309,
0.03862416744232178,
0.09388736635446548,
0.30242154002189636,
-0.006130733527243137,
0.025399265810847282,
-0.23266436159610748,
-0.3227173089981079,
-0.14176863431930542,
-0.3823906481266022,
0.11460041254758835,
-0.3576410114765167,
-0.18506810069084167,
0.2572275698184967,
0.38368457555770874,
0.036018408834934235,
0.23422428965568542,
-0.4448956251144409,
0.2590486705303192,
-0.21766982972621918,
-0.06533944606781006,
-0.031240707263350487,
0.2600192129611969,
-0.03270907327532768,
-0.25742706656455994,
0.17543961107730865,
0.21627074480056763,
0.11998891830444336,
0.14120365679264069,
0.03736565262079239,
-0.11179859936237335,
0.10294927656650543,
0.1834249496459961,
-0.11074750125408173,
0.16845054924488068,
0.08115518093109131,
-0.1483062207698822,
-0.3009878098964691,
-0.2652977406978607,
0.13436627388000488,
-0.11070363968610764,
-0.025854967534542084,
-0.13035929203033447,
-0.12170838564634323,
-0.11248856782913208,
0.3323756754398346,
0.27382513880729675,
0.20400471985340118,
0.28330788016319275,
-0.0734994113445282,
0.07670175284147263,
-0.24283291399478912,
-0.26539337635040283,
-0.05103801190853119,
0.19032369554042816,
0.061644669622182846,
0.08636713773012161,
-0.09186553955078125,
-0.17318761348724365,
-0.37994787096977234,
-0.038117554038763046,
0.03176838532090187,
0.44989216327667236,
0.04249455779790878,
-0.2883666753768921,
0.18529678881168365,
0.03793703019618988,
-0.27972111105918884,
-0.19527681171894073,
0.3624269962310791,
-0.4507017433643341,
0.20022889971733093,
0.40171751379966736,
0.26457515358924866,
0.16572430729866028,
-0.48327431082725525,
0.09376382827758789,
-0.23451673984527588,
0.09630513191223145,
-0.4337080121040344,
-0.0904514268040657,
0.3514752984046936,
-0.19489936530590057,
0.20412589609622955,
0.3052140772342682,
0.23111960291862488,
0.6089180111885071,
0.03142336755990982,
0.2752900719642639,
0.18787720799446106,
0.21332722902297974,
-0.32170307636260986,
-0.17983660101890564,
0.2906690835952759,
0.23226889967918396,
-0.03177434206008911,
-0.20784573256969452,
0.00909457542002201,
0.23473390936851501,
0.24403607845306396,
-0.516964316368103,
-0.2611277401447296,
0.16302168369293213,
-0.12202011793851852,
-0.12818151712417603,
0.41174861788749695,
0.056770890951156616,
-0.2780810296535492,
0.2270267903804779,
0.07766445726156235,
0.19237421452999115,
-0.12724758684635162,
0.20087450742721558,
0.2934531569480896,
0.22120140492916107,
-0.023113934323191643,
0.0910249873995781,
0.4337705373764038,
-0.33673936128616333,
-0.20791392028331757,
-0.011149626225233078,
-0.0027164847124367952,
0.023589259013533592,
-0.15122254192829132,
0.2809453010559082,
0.24482552707195282,
-0.05550317466259003,
0.2687216103076935,
-0.050441090017557144,
-0.008870884776115417,
0.04380457103252411,
-0.034400876611471176,
-0.10841280966997147,
-0.10039331018924713,
0.10061687231063843,
-0.0908767506480217,
-0.12853354215621948,
-0.12072346359491348,
-0.2426328808069229,
0.20261327922344208,
-0.18042470514774323,
0.0230691060423851,
0.3459421992301941,
-0.09754059463739395,
-0.3948054313659668,
0.09524179250001907,
-0.28330305218696594,
0.06918125599622726,
0.10627059638500214,
-0.3566013276576996,
-0.08913571387529373,
0.2603062689304352,
-0.001633998821489513,
-0.4257487952709198,
0.5468892455101013,
0.1724044531583786,
0.1286822259426117,
-0.3299420177936554,
-0.0014343556249514222,
-0.32078811526298523,
-0.03450939431786537,
-0.5890913009643555,
0.11263563483953476,
0.11768347769975662,
0.4403546452522278,
0.07392508536577225,
-0.0703551396727562,
0.40310826897621155,
-0.40797093510627747,
0.09924033284187317,
0.3735489249229431,
-0.1734420359134674,
-0.030622417107224464,
-0.4397854804992676,
-0.07384704053401947,
0.042283251881599426,
-0.3743230998516083,
0.28479641675949097,
-0.12820668518543243,
-0.014769596047699451,
0.19237110018730164,
-0.020268801599740982,
0.12265168130397797,
0.06268194317817688,
0.5298777222633362,
-0.09794456511735916,
0.000055181335483212024,
-0.09645427763462067,
0.008635740727186203,
-0.23218899965286255,
0.12195920199155807,
-0.20707820355892181,
0.008574522100389004,
-0.02188759483397007,
0.1733759194612503,
-0.2073739618062973,
-0.3919595181941986,
-0.18153439462184906,
0.4176577925682068,
0.31262972950935364,
-0.41869619488716125,
0.19802796840667725,
0.152659073472023,
-0.155827596783638,
0.47959375381469727,
0.15036313235759735,
0.22828395664691925,
0.14673328399658203,
-0.034050654619932175,
-0.3561272919178009,
-0.10542063415050507,
0.6236687898635864,
-0.18829402327537537,
-0.029361551627516747,
-0.34943896532058716,
0.254902184009552,
0.4437912702560425,
0.5510439872741699,
-0.26457640528678894,
0.08623872697353363,
0.12194323539733887,
0.053574010729789734,
-0.2103939801454544,
0.5777605772018433,
0.18686193227767944,
0.014771755784749985,
-0.07378310710191727,
-0.26480746269226074,
-0.06308902055025101,
-0.0029667862690985203,
-0.3532107174396515,
-0.28143104910850525
] |
https://github.com/huggingface/datasets/issues/2046
|
add_faisis_index gets very slow when doing it interatively
|
@lhoestq on a different note, I read about using Faiss-GPU, but the documentation says we should use it when the dataset has the ability to fit into the GPU memory. Although this might work, in the long-term this is not that practical for me.
https://github.com/matsui528/faiss_tips
|
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
| 45
|
add_faisis_index gets very slow when doing it interatively
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
@lhoestq on a different note, I read about using Faiss-GPU, but the documentation says we should use it when the dataset has the ability to fit into the GPU memory. Although this might work, in the long-term this is not that practical for me.
https://github.com/matsui528/faiss_tips
|
[
-0.49882516264915466,
-0.26827844977378845,
-0.024500647559762,
0.1282288283109665,
0.05943915247917175,
0.20778384804725647,
0.12146306037902832,
0.42412909865379333,
0.291742742061615,
0.2924974858760834,
-0.11882596462965012,
0.188315287232399,
0.13721296191215515,
0.08582107722759247,
-0.13625605404376984,
0.17504271864891052,
0.23703299462795258,
0.08533414453268051,
0.2607974112033844,
-0.13441404700279236,
-0.32748016715049744,
-0.30906423926353455,
-0.15891285240650177,
-0.2578621208667755,
-0.40069231390953064,
-0.0958191454410553,
-0.24362172186374664,
-0.08205042779445648,
0.19824793934822083,
-0.47291648387908936,
-0.13753199577331543,
0.1398429572582245,
0.34025880694389343,
0.25829288363456726,
-0.00012204969971207902,
0.05567667633295059,
0.22800785303115845,
0.06546277552843094,
-0.22299717366695404,
0.6411961913108826,
0.3400721848011017,
-0.06948856264352798,
-0.1751103401184082,
-0.3107718527317047,
-0.14555537700653076,
-0.11104141920804977,
0.08107940107584,
-0.04693025350570679,
-0.1663648784160614,
0.19430120289325714,
0.026624172925949097,
-0.05828629806637764,
0.05225489288568497,
-0.015400421805679798,
0.40251225233078003,
-0.0755910724401474,
-0.06917734444141388,
0.3174716532230377,
0.16351284086704254,
-0.07223645597696304,
0.09974305331707001,
0.44810786843299866,
0.120641328394413,
-0.22677703201770782,
0.10890348255634308,
0.20516164600849152,
0.7838155627250671,
0.022439492866396904,
0.06526804715394974,
0.15266908705234528,
0.0153404101729393,
-0.09055348485708237,
-0.4430079758167267,
-0.10290209203958511,
0.42571401596069336,
-0.618060290813446,
-0.06740108132362366,
-0.08374133706092834,
-0.1014745682477951,
0.053860053420066833,
0.1745847463607788,
-0.03023025207221508,
0.03631783649325371,
0.04745028540492058,
0.17490026354789734,
0.1653580665588379,
0.3874707520008087,
-0.05990183725953102,
0.5584331750869751,
0.04244775325059891,
-0.11685464531183243,
0.04488201439380646,
-0.09207794815301895,
0.012196076102554798,
-0.6050311923027039,
0.08808470517396927,
-0.03091667965054512,
-0.09933095425367355,
-0.09268633276224136,
0.017801547423005104,
-0.369486540555954,
0.006166044622659683,
0.2365611046552658,
0.0033363329712301493,
-0.18306593596935272,
-0.09025747328996658,
-0.5061047077178955,
0.05588063597679138,
0.0839017927646637,
0.10628657042980194,
-0.3780882656574249,
0.0992341935634613,
-0.0033384810667485,
-0.004310553427785635,
-0.3259795606136322,
-0.29813456535339355,
-0.2288902997970581,
0.2228073924779892,
-0.1811421811580658,
0.07718756049871445,
-0.40396761894226074,
-0.25227686762809753,
0.20507250726222992,
0.41622263193130493,
-0.1177443340420723,
-0.07613808661699295,
0.010839538648724556,
-0.0346161313354969,
-0.23442824184894562,
0.17616769671440125,
-0.22201746702194214,
0.23066066205501556,
-0.03196385130286217,
0.5045983195304871,
-0.029106812551617622,
-0.22139428555965424,
-0.08906889706850052,
-0.021730387583374977,
0.08396376669406891,
-0.007842501625418663,
-0.044163525104522705,
-0.2998936176300049,
0.24666738510131836,
0.07492349296808243,
-0.2632139325141907,
-0.06768488138914108,
-0.09395243972539902,
0.12111043930053711,
-0.22782295942306519,
0.22150807082653046,
-0.21739515662193298,
-0.36510276794433594,
0.02715766429901123,
0.019331108778715134,
0.3086777627468109,
-0.06309196352958679,
0.4208211898803711,
0.11439678817987442,
0.17301812767982483,
0.16133496165275574,
0.15917611122131348,
-0.13144302368164062,
-0.2680220901966095,
0.08318619430065155,
0.22678479552268982,
0.36273834109306335,
0.09372176975011826,
0.03477165475487709,
0.29801318049430847,
0.39013007283210754,
0.2124062031507492,
0.39999398589134216,
-0.11594938486814499,
0.6762606501579285,
-0.3200046122074127,
0.0842917189002037,
0.24512167274951935,
-0.25537896156311035,
-0.2924267649650574,
0.18690502643585205,
-0.16636398434638977,
-0.07732699066400528,
0.3296641707420349,
0.5182709693908691,
0.3120293617248535,
0.0870155468583107,
0.34109240770339966,
0.306255578994751,
0.009027169086039066,
-0.031247030943632126,
-0.4050689935684204,
-0.05827190726995468,
0.2639197111129761,
0.3804077208042145,
-0.3354529142379761,
0.10174088925123215,
-0.040180955082178116,
-0.32988083362579346,
0.6009742617607117,
-0.47610604763031006,
-0.12176156044006348,
0.06805816292762756,
0.3615746796131134,
0.33938536047935486,
0.23287023603916168,
0.2761097848415375,
0.14954109489917755,
0.16262610256671906,
0.09601332247257233,
0.09878852963447571,
0.17015457153320312,
-0.4183504581451416,
0.21562930941581726,
-0.025750624015927315,
-0.21819405257701874,
0.10788168013095856,
-0.060978226363658905,
0.15002486109733582,
-0.0456758476793766,
-0.19987328350543976,
-0.15688666701316833,
0.5427843928337097,
-0.6157973408699036,
0.02794579230248928,
-0.24889647960662842,
-0.15608301758766174,
0.007014264818280935,
-0.21342624723911285,
-0.034243520349264145,
0.14295808970928192,
0.05249642953276634,
-0.3868671655654907,
-0.05383381247520447,
0.1028614491224289,
0.12662534415721893,
-0.18767660856246948,
0.5111070871353149,
-0.11369690299034119,
-0.03703640028834343,
0.2962217926979065,
0.044953539967536926,
-0.15126429498195648,
0.10901732742786407,
-0.19376131892204285,
-0.001878442708402872,
0.4852038323879242,
0.3487831652164459,
0.24583370983600616,
-0.021493786945939064,
-0.23320868611335754,
0.047029927372932434,
-0.040650516748428345,
-0.0793866366147995,
0.2275259643793106,
0.0799434557557106,
0.13025416433811188,
0.4091724455356598,
-0.03333542123436928,
-0.333244651556015,
0.23246285319328308,
0.18577763438224792,
-0.20312979817390442,
-0.43140751123428345,
0.2710413634777069,
0.3516988754272461,
-0.03689730539917946,
-0.3497079610824585,
-0.5220080614089966,
0.2360263615846634,
0.31859853863716125,
0.18839207291603088,
-0.07165347784757614,
-0.02765061892569065,
-0.24728116393089294,
0.1691095381975174,
0.056553300470113754,
-0.04837125912308693,
0.10004880279302597,
0.1766422837972641,
-0.21454474329948425,
-0.20678958296775818,
-0.25529661774635315,
-0.13639618456363678,
0.4286453127861023,
-0.044338617473840714,
0.3094404935836792,
0.1777622401714325,
0.27718648314476013,
-0.12472555786371231,
-0.12497524172067642,
0.28875258564949036,
0.008841033093631268,
0.04161049425601959,
-0.10893584042787552,
-0.03623782843351364,
0.19311049580574036,
-0.046948667615652084,
0.36491823196411133,
0.19579406082630157,
-0.32509127259254456,
0.01984449289739132,
-0.09847081452608109,
-0.12149550020694733,
-0.0789787694811821,
0.12100574374198914,
-0.15054965019226074,
0.11740070581436157,
0.04394659399986267,
-0.052580177783966064,
-0.18513722717761993,
-0.08627106249332428,
-0.1575879454612732,
-0.0794762670993805,
-0.29745039343833923,
-0.166235089302063,
-0.24606873095035553,
-0.1250382661819458,
-0.11964553594589233,
0.004331060219556093,
0.0005506000597961247,
-0.010688086971640587,
-0.04048744589090347,
-0.2826750874519348,
-0.1588369756937027,
0.06079479679465294,
-0.2936345934867859,
-0.21670210361480713,
-0.17391933500766754,
0.22814054787158966,
-0.0244003813713789,
0.09305927157402039,
-0.11566969007253647,
0.06675161421298981,
0.12224036455154419,
-0.09570088982582092,
-0.15432998538017273,
-0.05346102640032768,
-0.23314324021339417,
0.2917102873325348,
0.14917171001434326,
0.046830914914608,
-0.07943687587976456,
-0.41229644417762756,
-0.014396199956536293,
0.49690350890159607,
-0.5218707323074341,
-0.04079889878630638,
-0.3583913743495941,
0.2859601080417633,
-0.3150937557220459,
0.4582992196083069,
0.05670711398124695,
-0.24624811112880707,
-0.13801313936710358,
0.3644829988479614,
0.1745101511478424,
0.3875305652618408,
-0.061713509261608124,
0.0549771673977375,
-0.0879170224070549,
0.2675457298755646,
-0.11497589945793152,
0.5162416696548462,
0.32723188400268555,
-0.2136986255645752,
-0.04781858250498772,
-0.2623961865901947,
0.11595138162374496,
0.05277024209499359,
-0.13988201320171356,
0.29652485251426697,
0.08347855508327484,
-0.3149944543838501,
0.1665271818637848,
-0.2887454032897949,
-0.4117940366268158,
0.03204282000660896,
-0.05276046693325043,
0.19824540615081787,
-0.24431051313877106,
0.3169921636581421,
0.0489506833255291,
0.49109935760498047,
-0.17805087566375732,
0.2910947799682617,
-0.2383597493171692,
-0.1767042875289917,
0.19751496613025665,
0.2727537453174591,
0.2449004352092743,
-0.16755744814872742,
0.02649623341858387,
-0.5409102439880371,
-0.4216776490211487,
0.2834407389163971,
0.1674797385931015,
0.23528403043746948,
0.2791200578212738,
-0.10083381086587906,
0.5258057713508606,
-0.15621161460876465,
0.7999860644340515,
0.020683541893959045,
-0.3363373279571533,
0.3844906985759735,
-0.1618194878101349,
0.05287637189030647,
-0.21779318153858185,
-0.1827090084552765,
-0.0659896582365036,
0.23377461731433868,
0.4407466650009155,
-0.09317793697118759,
-0.24796512722969055,
0.6446048021316528,
0.06708817183971405,
-0.14724896848201752,
-0.3441525995731354,
-0.1861822009086609,
-0.35430601239204407,
-0.04121949523687363,
0.7678549289703369,
-0.12169075012207031,
0.15569071471691132,
0.1822197437286377,
-0.051234640181064606,
-0.38188865780830383,
0.15986618399620056,
0.23867441713809967,
-0.005120040848851204,
0.050583358854055405,
0.455783873796463,
0.4348106384277344,
0.07141595333814621,
0.0007325740880332887,
0.11927373707294464,
-0.03691220283508301,
-0.30439624190330505,
0.07315177470445633,
-0.18884620070457458,
-0.25568538904190063,
0.37994295358657837,
0.7006723880767822,
0.18687665462493896,
0.24840828776359558,
-0.21023093163967133,
0.3775888681411743,
-0.19144584238529205,
0.024531345814466476,
0.43831244111061096,
-0.0020621030125766993,
-0.17877259850502014,
-0.5383256673812866,
0.31127867102622986,
0.2034226506948471,
0.07330293953418732,
0.06086021289229393,
-0.07573039829730988,
-0.01638045720756054,
0.3021714985370636,
0.1250007152557373,
0.9838237762451172,
-0.02691991813480854,
0.1929827183485031,
0.50630784034729,
0.004840462934225798,
-0.24390368163585663,
-0.6487336754798889,
0.3692772090435028,
-0.33292150497436523,
-0.22415265440940857,
0.19311641156673431,
-0.10114186257123947,
-0.08476849645376205,
0.073533795773983,
-0.03934306278824806,
0.09914674609899521,
-0.04727573320269585,
-0.08625645935535431,
-0.2586022615432739,
0.38955432176589966,
0.31519457697868347,
-0.42784005403518677,
0.024883409962058067,
0.001350741251371801,
0.271456241607666,
-0.09871555119752884,
0.12781597673892975,
-0.16340002417564392,
-0.1108853816986084,
0.018441425636410713,
0.12517376244068146,
-0.07911400496959686,
-0.12837839126586914,
0.01305884774774313,
-0.048773329704999924,
-0.08731187880039215,
-0.23292511701583862,
-0.32441654801368713,
0.46041998267173767,
-0.029945844784379005,
0.09953469038009644,
0.081583671271801,
-0.09911026805639267,
0.07216382026672363,
-0.08676977455615997,
-0.49708321690559387,
0.22654052078723907,
0.08081196248531342,
-0.17367833852767944,
0.14937090873718262,
0.07872676849365234,
-0.3227708339691162,
-0.14609792828559875,
0.17442995309829712,
0.020576778799295425,
0.0075490353628993034,
-0.03673763945698738,
0.3179985284805298,
-0.26263749599456787,
-0.2335655391216278,
0.020059769973158836,
0.09207716584205627,
-0.4317528009414673,
0.5605180263519287,
-0.3023817241191864,
-0.3800688683986664,
-0.05465592443943024,
0.016695475205779076,
0.3058086335659027,
0.056038208305835724,
0.2623710334300995,
-0.0891200453042984,
-0.30488115549087524,
-0.1546768993139267,
-0.30242931842803955,
0.06128295511007309,
0.03862416744232178,
0.09388736635446548,
0.30242154002189636,
-0.006130733527243137,
0.025399265810847282,
-0.23266436159610748,
-0.3227173089981079,
-0.14176863431930542,
-0.3823906481266022,
0.11460041254758835,
-0.3576410114765167,
-0.18506810069084167,
0.2572275698184967,
0.38368457555770874,
0.036018408834934235,
0.23422428965568542,
-0.4448956251144409,
0.2590486705303192,
-0.21766982972621918,
-0.06533944606781006,
-0.031240707263350487,
0.2600192129611969,
-0.03270907327532768,
-0.25742706656455994,
0.17543961107730865,
0.21627074480056763,
0.11998891830444336,
0.14120365679264069,
0.03736565262079239,
-0.11179859936237335,
0.10294927656650543,
0.1834249496459961,
-0.11074750125408173,
0.16845054924488068,
0.08115518093109131,
-0.1483062207698822,
-0.3009878098964691,
-0.2652977406978607,
0.13436627388000488,
-0.11070363968610764,
-0.025854967534542084,
-0.13035929203033447,
-0.12170838564634323,
-0.11248856782913208,
0.3323756754398346,
0.27382513880729675,
0.20400471985340118,
0.28330788016319275,
-0.0734994113445282,
0.07670175284147263,
-0.24283291399478912,
-0.26539337635040283,
-0.05103801190853119,
0.19032369554042816,
0.061644669622182846,
0.08636713773012161,
-0.09186553955078125,
-0.17318761348724365,
-0.37994787096977234,
-0.038117554038763046,
0.03176838532090187,
0.44989216327667236,
0.04249455779790878,
-0.2883666753768921,
0.18529678881168365,
0.03793703019618988,
-0.27972111105918884,
-0.19527681171894073,
0.3624269962310791,
-0.4507017433643341,
0.20022889971733093,
0.40171751379966736,
0.26457515358924866,
0.16572430729866028,
-0.48327431082725525,
0.09376382827758789,
-0.23451673984527588,
0.09630513191223145,
-0.4337080121040344,
-0.0904514268040657,
0.3514752984046936,
-0.19489936530590057,
0.20412589609622955,
0.3052140772342682,
0.23111960291862488,
0.6089180111885071,
0.03142336755990982,
0.2752900719642639,
0.18787720799446106,
0.21332722902297974,
-0.32170307636260986,
-0.17983660101890564,
0.2906690835952759,
0.23226889967918396,
-0.03177434206008911,
-0.20784573256969452,
0.00909457542002201,
0.23473390936851501,
0.24403607845306396,
-0.516964316368103,
-0.2611277401447296,
0.16302168369293213,
-0.12202011793851852,
-0.12818151712417603,
0.41174861788749695,
0.056770890951156616,
-0.2780810296535492,
0.2270267903804779,
0.07766445726156235,
0.19237421452999115,
-0.12724758684635162,
0.20087450742721558,
0.2934531569480896,
0.22120140492916107,
-0.023113934323191643,
0.0910249873995781,
0.4337705373764038,
-0.33673936128616333,
-0.20791392028331757,
-0.011149626225233078,
-0.0027164847124367952,
0.023589259013533592,
-0.15122254192829132,
0.2809453010559082,
0.24482552707195282,
-0.05550317466259003,
0.2687216103076935,
-0.050441090017557144,
-0.008870884776115417,
0.04380457103252411,
-0.034400876611471176,
-0.10841280966997147,
-0.10039331018924713,
0.10061687231063843,
-0.0908767506480217,
-0.12853354215621948,
-0.12072346359491348,
-0.2426328808069229,
0.20261327922344208,
-0.18042470514774323,
0.0230691060423851,
0.3459421992301941,
-0.09754059463739395,
-0.3948054313659668,
0.09524179250001907,
-0.28330305218696594,
0.06918125599622726,
0.10627059638500214,
-0.3566013276576996,
-0.08913571387529373,
0.2603062689304352,
-0.001633998821489513,
-0.4257487952709198,
0.5468892455101013,
0.1724044531583786,
0.1286822259426117,
-0.3299420177936554,
-0.0014343556249514222,
-0.32078811526298523,
-0.03450939431786537,
-0.5890913009643555,
0.11263563483953476,
0.11768347769975662,
0.4403546452522278,
0.07392508536577225,
-0.0703551396727562,
0.40310826897621155,
-0.40797093510627747,
0.09924033284187317,
0.3735489249229431,
-0.1734420359134674,
-0.030622417107224464,
-0.4397854804992676,
-0.07384704053401947,
0.042283251881599426,
-0.3743230998516083,
0.28479641675949097,
-0.12820668518543243,
-0.014769596047699451,
0.19237110018730164,
-0.020268801599740982,
0.12265168130397797,
0.06268194317817688,
0.5298777222633362,
-0.09794456511735916,
0.000055181335483212024,
-0.09645427763462067,
0.008635740727186203,
-0.23218899965286255,
0.12195920199155807,
-0.20707820355892181,
0.008574522100389004,
-0.02188759483397007,
0.1733759194612503,
-0.2073739618062973,
-0.3919595181941986,
-0.18153439462184906,
0.4176577925682068,
0.31262972950935364,
-0.41869619488716125,
0.19802796840667725,
0.152659073472023,
-0.155827596783638,
0.47959375381469727,
0.15036313235759735,
0.22828395664691925,
0.14673328399658203,
-0.034050654619932175,
-0.3561272919178009,
-0.10542063415050507,
0.6236687898635864,
-0.18829402327537537,
-0.029361551627516747,
-0.34943896532058716,
0.254902184009552,
0.4437912702560425,
0.5510439872741699,
-0.26457640528678894,
0.08623872697353363,
0.12194323539733887,
0.053574010729789734,
-0.2103939801454544,
0.5777605772018433,
0.18686193227767944,
0.014771755784749985,
-0.07378310710191727,
-0.26480746269226074,
-0.06308902055025101,
-0.0029667862690985203,
-0.3532107174396515,
-0.28143104910850525
] |
https://github.com/huggingface/datasets/issues/2046
|
add_faisis_index gets very slow when doing it interatively
|
@lhoestq
Hi, I executed the **use_own_dataset.py** script independently and ask a few of my friends to run their programs in the HPC machine at the same time.
Once there are so many other processes are running the add_index function gets slows down naturally. So basically the speed of the add_index depends entirely on the number of CPU processes. Then I set the number of threads as you have mentioned and got actually the same time for RAG training and independat running. So you are correct! :)
Then I added this [issue in Faiss repostiary](https://github.com/facebookresearch/faiss/issues/1767). I got an answer saying our current **IndexHNSWFlat** can get slow for 30 million vectors and it would be better to use alternatives. What do you think?
|
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
| 121
|
add_faisis_index gets very slow when doing it interatively
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
@lhoestq
Hi, I executed the **use_own_dataset.py** script independently and ask a few of my friends to run their programs in the HPC machine at the same time.
Once there are so many other processes are running the add_index function gets slows down naturally. So basically the speed of the add_index depends entirely on the number of CPU processes. Then I set the number of threads as you have mentioned and got actually the same time for RAG training and independat running. So you are correct! :)
Then I added this [issue in Faiss repostiary](https://github.com/facebookresearch/faiss/issues/1767). I got an answer saying our current **IndexHNSWFlat** can get slow for 30 million vectors and it would be better to use alternatives. What do you think?
|
[
-0.49882516264915466,
-0.26827844977378845,
-0.024500647559762,
0.1282288283109665,
0.05943915247917175,
0.20778384804725647,
0.12146306037902832,
0.42412909865379333,
0.291742742061615,
0.2924974858760834,
-0.11882596462965012,
0.188315287232399,
0.13721296191215515,
0.08582107722759247,
-0.13625605404376984,
0.17504271864891052,
0.23703299462795258,
0.08533414453268051,
0.2607974112033844,
-0.13441404700279236,
-0.32748016715049744,
-0.30906423926353455,
-0.15891285240650177,
-0.2578621208667755,
-0.40069231390953064,
-0.0958191454410553,
-0.24362172186374664,
-0.08205042779445648,
0.19824793934822083,
-0.47291648387908936,
-0.13753199577331543,
0.1398429572582245,
0.34025880694389343,
0.25829288363456726,
-0.00012204969971207902,
0.05567667633295059,
0.22800785303115845,
0.06546277552843094,
-0.22299717366695404,
0.6411961913108826,
0.3400721848011017,
-0.06948856264352798,
-0.1751103401184082,
-0.3107718527317047,
-0.14555537700653076,
-0.11104141920804977,
0.08107940107584,
-0.04693025350570679,
-0.1663648784160614,
0.19430120289325714,
0.026624172925949097,
-0.05828629806637764,
0.05225489288568497,
-0.015400421805679798,
0.40251225233078003,
-0.0755910724401474,
-0.06917734444141388,
0.3174716532230377,
0.16351284086704254,
-0.07223645597696304,
0.09974305331707001,
0.44810786843299866,
0.120641328394413,
-0.22677703201770782,
0.10890348255634308,
0.20516164600849152,
0.7838155627250671,
0.022439492866396904,
0.06526804715394974,
0.15266908705234528,
0.0153404101729393,
-0.09055348485708237,
-0.4430079758167267,
-0.10290209203958511,
0.42571401596069336,
-0.618060290813446,
-0.06740108132362366,
-0.08374133706092834,
-0.1014745682477951,
0.053860053420066833,
0.1745847463607788,
-0.03023025207221508,
0.03631783649325371,
0.04745028540492058,
0.17490026354789734,
0.1653580665588379,
0.3874707520008087,
-0.05990183725953102,
0.5584331750869751,
0.04244775325059891,
-0.11685464531183243,
0.04488201439380646,
-0.09207794815301895,
0.012196076102554798,
-0.6050311923027039,
0.08808470517396927,
-0.03091667965054512,
-0.09933095425367355,
-0.09268633276224136,
0.017801547423005104,
-0.369486540555954,
0.006166044622659683,
0.2365611046552658,
0.0033363329712301493,
-0.18306593596935272,
-0.09025747328996658,
-0.5061047077178955,
0.05588063597679138,
0.0839017927646637,
0.10628657042980194,
-0.3780882656574249,
0.0992341935634613,
-0.0033384810667485,
-0.004310553427785635,
-0.3259795606136322,
-0.29813456535339355,
-0.2288902997970581,
0.2228073924779892,
-0.1811421811580658,
0.07718756049871445,
-0.40396761894226074,
-0.25227686762809753,
0.20507250726222992,
0.41622263193130493,
-0.1177443340420723,
-0.07613808661699295,
0.010839538648724556,
-0.0346161313354969,
-0.23442824184894562,
0.17616769671440125,
-0.22201746702194214,
0.23066066205501556,
-0.03196385130286217,
0.5045983195304871,
-0.029106812551617622,
-0.22139428555965424,
-0.08906889706850052,
-0.021730387583374977,
0.08396376669406891,
-0.007842501625418663,
-0.044163525104522705,
-0.2998936176300049,
0.24666738510131836,
0.07492349296808243,
-0.2632139325141907,
-0.06768488138914108,
-0.09395243972539902,
0.12111043930053711,
-0.22782295942306519,
0.22150807082653046,
-0.21739515662193298,
-0.36510276794433594,
0.02715766429901123,
0.019331108778715134,
0.3086777627468109,
-0.06309196352958679,
0.4208211898803711,
0.11439678817987442,
0.17301812767982483,
0.16133496165275574,
0.15917611122131348,
-0.13144302368164062,
-0.2680220901966095,
0.08318619430065155,
0.22678479552268982,
0.36273834109306335,
0.09372176975011826,
0.03477165475487709,
0.29801318049430847,
0.39013007283210754,
0.2124062031507492,
0.39999398589134216,
-0.11594938486814499,
0.6762606501579285,
-0.3200046122074127,
0.0842917189002037,
0.24512167274951935,
-0.25537896156311035,
-0.2924267649650574,
0.18690502643585205,
-0.16636398434638977,
-0.07732699066400528,
0.3296641707420349,
0.5182709693908691,
0.3120293617248535,
0.0870155468583107,
0.34109240770339966,
0.306255578994751,
0.009027169086039066,
-0.031247030943632126,
-0.4050689935684204,
-0.05827190726995468,
0.2639197111129761,
0.3804077208042145,
-0.3354529142379761,
0.10174088925123215,
-0.040180955082178116,
-0.32988083362579346,
0.6009742617607117,
-0.47610604763031006,
-0.12176156044006348,
0.06805816292762756,
0.3615746796131134,
0.33938536047935486,
0.23287023603916168,
0.2761097848415375,
0.14954109489917755,
0.16262610256671906,
0.09601332247257233,
0.09878852963447571,
0.17015457153320312,
-0.4183504581451416,
0.21562930941581726,
-0.025750624015927315,
-0.21819405257701874,
0.10788168013095856,
-0.060978226363658905,
0.15002486109733582,
-0.0456758476793766,
-0.19987328350543976,
-0.15688666701316833,
0.5427843928337097,
-0.6157973408699036,
0.02794579230248928,
-0.24889647960662842,
-0.15608301758766174,
0.007014264818280935,
-0.21342624723911285,
-0.034243520349264145,
0.14295808970928192,
0.05249642953276634,
-0.3868671655654907,
-0.05383381247520447,
0.1028614491224289,
0.12662534415721893,
-0.18767660856246948,
0.5111070871353149,
-0.11369690299034119,
-0.03703640028834343,
0.2962217926979065,
0.044953539967536926,
-0.15126429498195648,
0.10901732742786407,
-0.19376131892204285,
-0.001878442708402872,
0.4852038323879242,
0.3487831652164459,
0.24583370983600616,
-0.021493786945939064,
-0.23320868611335754,
0.047029927372932434,
-0.040650516748428345,
-0.0793866366147995,
0.2275259643793106,
0.0799434557557106,
0.13025416433811188,
0.4091724455356598,
-0.03333542123436928,
-0.333244651556015,
0.23246285319328308,
0.18577763438224792,
-0.20312979817390442,
-0.43140751123428345,
0.2710413634777069,
0.3516988754272461,
-0.03689730539917946,
-0.3497079610824585,
-0.5220080614089966,
0.2360263615846634,
0.31859853863716125,
0.18839207291603088,
-0.07165347784757614,
-0.02765061892569065,
-0.24728116393089294,
0.1691095381975174,
0.056553300470113754,
-0.04837125912308693,
0.10004880279302597,
0.1766422837972641,
-0.21454474329948425,
-0.20678958296775818,
-0.25529661774635315,
-0.13639618456363678,
0.4286453127861023,
-0.044338617473840714,
0.3094404935836792,
0.1777622401714325,
0.27718648314476013,
-0.12472555786371231,
-0.12497524172067642,
0.28875258564949036,
0.008841033093631268,
0.04161049425601959,
-0.10893584042787552,
-0.03623782843351364,
0.19311049580574036,
-0.046948667615652084,
0.36491823196411133,
0.19579406082630157,
-0.32509127259254456,
0.01984449289739132,
-0.09847081452608109,
-0.12149550020694733,
-0.0789787694811821,
0.12100574374198914,
-0.15054965019226074,
0.11740070581436157,
0.04394659399986267,
-0.052580177783966064,
-0.18513722717761993,
-0.08627106249332428,
-0.1575879454612732,
-0.0794762670993805,
-0.29745039343833923,
-0.166235089302063,
-0.24606873095035553,
-0.1250382661819458,
-0.11964553594589233,
0.004331060219556093,
0.0005506000597961247,
-0.010688086971640587,
-0.04048744589090347,
-0.2826750874519348,
-0.1588369756937027,
0.06079479679465294,
-0.2936345934867859,
-0.21670210361480713,
-0.17391933500766754,
0.22814054787158966,
-0.0244003813713789,
0.09305927157402039,
-0.11566969007253647,
0.06675161421298981,
0.12224036455154419,
-0.09570088982582092,
-0.15432998538017273,
-0.05346102640032768,
-0.23314324021339417,
0.2917102873325348,
0.14917171001434326,
0.046830914914608,
-0.07943687587976456,
-0.41229644417762756,
-0.014396199956536293,
0.49690350890159607,
-0.5218707323074341,
-0.04079889878630638,
-0.3583913743495941,
0.2859601080417633,
-0.3150937557220459,
0.4582992196083069,
0.05670711398124695,
-0.24624811112880707,
-0.13801313936710358,
0.3644829988479614,
0.1745101511478424,
0.3875305652618408,
-0.061713509261608124,
0.0549771673977375,
-0.0879170224070549,
0.2675457298755646,
-0.11497589945793152,
0.5162416696548462,
0.32723188400268555,
-0.2136986255645752,
-0.04781858250498772,
-0.2623961865901947,
0.11595138162374496,
0.05277024209499359,
-0.13988201320171356,
0.29652485251426697,
0.08347855508327484,
-0.3149944543838501,
0.1665271818637848,
-0.2887454032897949,
-0.4117940366268158,
0.03204282000660896,
-0.05276046693325043,
0.19824540615081787,
-0.24431051313877106,
0.3169921636581421,
0.0489506833255291,
0.49109935760498047,
-0.17805087566375732,
0.2910947799682617,
-0.2383597493171692,
-0.1767042875289917,
0.19751496613025665,
0.2727537453174591,
0.2449004352092743,
-0.16755744814872742,
0.02649623341858387,
-0.5409102439880371,
-0.4216776490211487,
0.2834407389163971,
0.1674797385931015,
0.23528403043746948,
0.2791200578212738,
-0.10083381086587906,
0.5258057713508606,
-0.15621161460876465,
0.7999860644340515,
0.020683541893959045,
-0.3363373279571533,
0.3844906985759735,
-0.1618194878101349,
0.05287637189030647,
-0.21779318153858185,
-0.1827090084552765,
-0.0659896582365036,
0.23377461731433868,
0.4407466650009155,
-0.09317793697118759,
-0.24796512722969055,
0.6446048021316528,
0.06708817183971405,
-0.14724896848201752,
-0.3441525995731354,
-0.1861822009086609,
-0.35430601239204407,
-0.04121949523687363,
0.7678549289703369,
-0.12169075012207031,
0.15569071471691132,
0.1822197437286377,
-0.051234640181064606,
-0.38188865780830383,
0.15986618399620056,
0.23867441713809967,
-0.005120040848851204,
0.050583358854055405,
0.455783873796463,
0.4348106384277344,
0.07141595333814621,
0.0007325740880332887,
0.11927373707294464,
-0.03691220283508301,
-0.30439624190330505,
0.07315177470445633,
-0.18884620070457458,
-0.25568538904190063,
0.37994295358657837,
0.7006723880767822,
0.18687665462493896,
0.24840828776359558,
-0.21023093163967133,
0.3775888681411743,
-0.19144584238529205,
0.024531345814466476,
0.43831244111061096,
-0.0020621030125766993,
-0.17877259850502014,
-0.5383256673812866,
0.31127867102622986,
0.2034226506948471,
0.07330293953418732,
0.06086021289229393,
-0.07573039829730988,
-0.01638045720756054,
0.3021714985370636,
0.1250007152557373,
0.9838237762451172,
-0.02691991813480854,
0.1929827183485031,
0.50630784034729,
0.004840462934225798,
-0.24390368163585663,
-0.6487336754798889,
0.3692772090435028,
-0.33292150497436523,
-0.22415265440940857,
0.19311641156673431,
-0.10114186257123947,
-0.08476849645376205,
0.073533795773983,
-0.03934306278824806,
0.09914674609899521,
-0.04727573320269585,
-0.08625645935535431,
-0.2586022615432739,
0.38955432176589966,
0.31519457697868347,
-0.42784005403518677,
0.024883409962058067,
0.001350741251371801,
0.271456241607666,
-0.09871555119752884,
0.12781597673892975,
-0.16340002417564392,
-0.1108853816986084,
0.018441425636410713,
0.12517376244068146,
-0.07911400496959686,
-0.12837839126586914,
0.01305884774774313,
-0.048773329704999924,
-0.08731187880039215,
-0.23292511701583862,
-0.32441654801368713,
0.46041998267173767,
-0.029945844784379005,
0.09953469038009644,
0.081583671271801,
-0.09911026805639267,
0.07216382026672363,
-0.08676977455615997,
-0.49708321690559387,
0.22654052078723907,
0.08081196248531342,
-0.17367833852767944,
0.14937090873718262,
0.07872676849365234,
-0.3227708339691162,
-0.14609792828559875,
0.17442995309829712,
0.020576778799295425,
0.0075490353628993034,
-0.03673763945698738,
0.3179985284805298,
-0.26263749599456787,
-0.2335655391216278,
0.020059769973158836,
0.09207716584205627,
-0.4317528009414673,
0.5605180263519287,
-0.3023817241191864,
-0.3800688683986664,
-0.05465592443943024,
0.016695475205779076,
0.3058086335659027,
0.056038208305835724,
0.2623710334300995,
-0.0891200453042984,
-0.30488115549087524,
-0.1546768993139267,
-0.30242931842803955,
0.06128295511007309,
0.03862416744232178,
0.09388736635446548,
0.30242154002189636,
-0.006130733527243137,
0.025399265810847282,
-0.23266436159610748,
-0.3227173089981079,
-0.14176863431930542,
-0.3823906481266022,
0.11460041254758835,
-0.3576410114765167,
-0.18506810069084167,
0.2572275698184967,
0.38368457555770874,
0.036018408834934235,
0.23422428965568542,
-0.4448956251144409,
0.2590486705303192,
-0.21766982972621918,
-0.06533944606781006,
-0.031240707263350487,
0.2600192129611969,
-0.03270907327532768,
-0.25742706656455994,
0.17543961107730865,
0.21627074480056763,
0.11998891830444336,
0.14120365679264069,
0.03736565262079239,
-0.11179859936237335,
0.10294927656650543,
0.1834249496459961,
-0.11074750125408173,
0.16845054924488068,
0.08115518093109131,
-0.1483062207698822,
-0.3009878098964691,
-0.2652977406978607,
0.13436627388000488,
-0.11070363968610764,
-0.025854967534542084,
-0.13035929203033447,
-0.12170838564634323,
-0.11248856782913208,
0.3323756754398346,
0.27382513880729675,
0.20400471985340118,
0.28330788016319275,
-0.0734994113445282,
0.07670175284147263,
-0.24283291399478912,
-0.26539337635040283,
-0.05103801190853119,
0.19032369554042816,
0.061644669622182846,
0.08636713773012161,
-0.09186553955078125,
-0.17318761348724365,
-0.37994787096977234,
-0.038117554038763046,
0.03176838532090187,
0.44989216327667236,
0.04249455779790878,
-0.2883666753768921,
0.18529678881168365,
0.03793703019618988,
-0.27972111105918884,
-0.19527681171894073,
0.3624269962310791,
-0.4507017433643341,
0.20022889971733093,
0.40171751379966736,
0.26457515358924866,
0.16572430729866028,
-0.48327431082725525,
0.09376382827758789,
-0.23451673984527588,
0.09630513191223145,
-0.4337080121040344,
-0.0904514268040657,
0.3514752984046936,
-0.19489936530590057,
0.20412589609622955,
0.3052140772342682,
0.23111960291862488,
0.6089180111885071,
0.03142336755990982,
0.2752900719642639,
0.18787720799446106,
0.21332722902297974,
-0.32170307636260986,
-0.17983660101890564,
0.2906690835952759,
0.23226889967918396,
-0.03177434206008911,
-0.20784573256969452,
0.00909457542002201,
0.23473390936851501,
0.24403607845306396,
-0.516964316368103,
-0.2611277401447296,
0.16302168369293213,
-0.12202011793851852,
-0.12818151712417603,
0.41174861788749695,
0.056770890951156616,
-0.2780810296535492,
0.2270267903804779,
0.07766445726156235,
0.19237421452999115,
-0.12724758684635162,
0.20087450742721558,
0.2934531569480896,
0.22120140492916107,
-0.023113934323191643,
0.0910249873995781,
0.4337705373764038,
-0.33673936128616333,
-0.20791392028331757,
-0.011149626225233078,
-0.0027164847124367952,
0.023589259013533592,
-0.15122254192829132,
0.2809453010559082,
0.24482552707195282,
-0.05550317466259003,
0.2687216103076935,
-0.050441090017557144,
-0.008870884776115417,
0.04380457103252411,
-0.034400876611471176,
-0.10841280966997147,
-0.10039331018924713,
0.10061687231063843,
-0.0908767506480217,
-0.12853354215621948,
-0.12072346359491348,
-0.2426328808069229,
0.20261327922344208,
-0.18042470514774323,
0.0230691060423851,
0.3459421992301941,
-0.09754059463739395,
-0.3948054313659668,
0.09524179250001907,
-0.28330305218696594,
0.06918125599622726,
0.10627059638500214,
-0.3566013276576996,
-0.08913571387529373,
0.2603062689304352,
-0.001633998821489513,
-0.4257487952709198,
0.5468892455101013,
0.1724044531583786,
0.1286822259426117,
-0.3299420177936554,
-0.0014343556249514222,
-0.32078811526298523,
-0.03450939431786537,
-0.5890913009643555,
0.11263563483953476,
0.11768347769975662,
0.4403546452522278,
0.07392508536577225,
-0.0703551396727562,
0.40310826897621155,
-0.40797093510627747,
0.09924033284187317,
0.3735489249229431,
-0.1734420359134674,
-0.030622417107224464,
-0.4397854804992676,
-0.07384704053401947,
0.042283251881599426,
-0.3743230998516083,
0.28479641675949097,
-0.12820668518543243,
-0.014769596047699451,
0.19237110018730164,
-0.020268801599740982,
0.12265168130397797,
0.06268194317817688,
0.5298777222633362,
-0.09794456511735916,
0.000055181335483212024,
-0.09645427763462067,
0.008635740727186203,
-0.23218899965286255,
0.12195920199155807,
-0.20707820355892181,
0.008574522100389004,
-0.02188759483397007,
0.1733759194612503,
-0.2073739618062973,
-0.3919595181941986,
-0.18153439462184906,
0.4176577925682068,
0.31262972950935364,
-0.41869619488716125,
0.19802796840667725,
0.152659073472023,
-0.155827596783638,
0.47959375381469727,
0.15036313235759735,
0.22828395664691925,
0.14673328399658203,
-0.034050654619932175,
-0.3561272919178009,
-0.10542063415050507,
0.6236687898635864,
-0.18829402327537537,
-0.029361551627516747,
-0.34943896532058716,
0.254902184009552,
0.4437912702560425,
0.5510439872741699,
-0.26457640528678894,
0.08623872697353363,
0.12194323539733887,
0.053574010729789734,
-0.2103939801454544,
0.5777605772018433,
0.18686193227767944,
0.014771755784749985,
-0.07378310710191727,
-0.26480746269226074,
-0.06308902055025101,
-0.0029667862690985203,
-0.3532107174396515,
-0.28143104910850525
] |
https://github.com/huggingface/datasets/issues/2046
|
add_faisis_index gets very slow when doing it interatively
|
It's a matter of tradeoffs.
HSNW is fast at query time but takes some time to build.
A flat index is flat to build but is "slow" at query time.
An IVF index is probably a good choice for you: fast building and fast queries (but still slower queries than HSNW).
Note that for an IVF index you would need to have an `nprobe` parameter (number of cells to visit for one query, there are `nlist` in total) that is not too small in order to have good retrieval accuracy, but not too big otherwise the queries will take too much time. From the faiss documentation:
> The nprobe parameter is always a way of adjusting the tradeoff between speed and accuracy of the result. Setting nprobe = nlist gives the same result as the brute-force search (but slower).
From my experience with indexes on DPR embeddings, setting nprobe around 1/4 of nlist gives really good retrieval accuracy and there's no need to have a value higher than that (or you would need to brute-force in order to see a difference).
|
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
| 181
|
add_faisis_index gets very slow when doing it interatively
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
It's a matter of tradeoffs.
HSNW is fast at query time but takes some time to build.
A flat index is flat to build but is "slow" at query time.
An IVF index is probably a good choice for you: fast building and fast queries (but still slower queries than HSNW).
Note that for an IVF index you would need to have an `nprobe` parameter (number of cells to visit for one query, there are `nlist` in total) that is not too small in order to have good retrieval accuracy, but not too big otherwise the queries will take too much time. From the faiss documentation:
> The nprobe parameter is always a way of adjusting the tradeoff between speed and accuracy of the result. Setting nprobe = nlist gives the same result as the brute-force search (but slower).
From my experience with indexes on DPR embeddings, setting nprobe around 1/4 of nlist gives really good retrieval accuracy and there's no need to have a value higher than that (or you would need to brute-force in order to see a difference).
|
[
-0.49882516264915466,
-0.26827844977378845,
-0.024500647559762,
0.1282288283109665,
0.05943915247917175,
0.20778384804725647,
0.12146306037902832,
0.42412909865379333,
0.291742742061615,
0.2924974858760834,
-0.11882596462965012,
0.188315287232399,
0.13721296191215515,
0.08582107722759247,
-0.13625605404376984,
0.17504271864891052,
0.23703299462795258,
0.08533414453268051,
0.2607974112033844,
-0.13441404700279236,
-0.32748016715049744,
-0.30906423926353455,
-0.15891285240650177,
-0.2578621208667755,
-0.40069231390953064,
-0.0958191454410553,
-0.24362172186374664,
-0.08205042779445648,
0.19824793934822083,
-0.47291648387908936,
-0.13753199577331543,
0.1398429572582245,
0.34025880694389343,
0.25829288363456726,
-0.00012204969971207902,
0.05567667633295059,
0.22800785303115845,
0.06546277552843094,
-0.22299717366695404,
0.6411961913108826,
0.3400721848011017,
-0.06948856264352798,
-0.1751103401184082,
-0.3107718527317047,
-0.14555537700653076,
-0.11104141920804977,
0.08107940107584,
-0.04693025350570679,
-0.1663648784160614,
0.19430120289325714,
0.026624172925949097,
-0.05828629806637764,
0.05225489288568497,
-0.015400421805679798,
0.40251225233078003,
-0.0755910724401474,
-0.06917734444141388,
0.3174716532230377,
0.16351284086704254,
-0.07223645597696304,
0.09974305331707001,
0.44810786843299866,
0.120641328394413,
-0.22677703201770782,
0.10890348255634308,
0.20516164600849152,
0.7838155627250671,
0.022439492866396904,
0.06526804715394974,
0.15266908705234528,
0.0153404101729393,
-0.09055348485708237,
-0.4430079758167267,
-0.10290209203958511,
0.42571401596069336,
-0.618060290813446,
-0.06740108132362366,
-0.08374133706092834,
-0.1014745682477951,
0.053860053420066833,
0.1745847463607788,
-0.03023025207221508,
0.03631783649325371,
0.04745028540492058,
0.17490026354789734,
0.1653580665588379,
0.3874707520008087,
-0.05990183725953102,
0.5584331750869751,
0.04244775325059891,
-0.11685464531183243,
0.04488201439380646,
-0.09207794815301895,
0.012196076102554798,
-0.6050311923027039,
0.08808470517396927,
-0.03091667965054512,
-0.09933095425367355,
-0.09268633276224136,
0.017801547423005104,
-0.369486540555954,
0.006166044622659683,
0.2365611046552658,
0.0033363329712301493,
-0.18306593596935272,
-0.09025747328996658,
-0.5061047077178955,
0.05588063597679138,
0.0839017927646637,
0.10628657042980194,
-0.3780882656574249,
0.0992341935634613,
-0.0033384810667485,
-0.004310553427785635,
-0.3259795606136322,
-0.29813456535339355,
-0.2288902997970581,
0.2228073924779892,
-0.1811421811580658,
0.07718756049871445,
-0.40396761894226074,
-0.25227686762809753,
0.20507250726222992,
0.41622263193130493,
-0.1177443340420723,
-0.07613808661699295,
0.010839538648724556,
-0.0346161313354969,
-0.23442824184894562,
0.17616769671440125,
-0.22201746702194214,
0.23066066205501556,
-0.03196385130286217,
0.5045983195304871,
-0.029106812551617622,
-0.22139428555965424,
-0.08906889706850052,
-0.021730387583374977,
0.08396376669406891,
-0.007842501625418663,
-0.044163525104522705,
-0.2998936176300049,
0.24666738510131836,
0.07492349296808243,
-0.2632139325141907,
-0.06768488138914108,
-0.09395243972539902,
0.12111043930053711,
-0.22782295942306519,
0.22150807082653046,
-0.21739515662193298,
-0.36510276794433594,
0.02715766429901123,
0.019331108778715134,
0.3086777627468109,
-0.06309196352958679,
0.4208211898803711,
0.11439678817987442,
0.17301812767982483,
0.16133496165275574,
0.15917611122131348,
-0.13144302368164062,
-0.2680220901966095,
0.08318619430065155,
0.22678479552268982,
0.36273834109306335,
0.09372176975011826,
0.03477165475487709,
0.29801318049430847,
0.39013007283210754,
0.2124062031507492,
0.39999398589134216,
-0.11594938486814499,
0.6762606501579285,
-0.3200046122074127,
0.0842917189002037,
0.24512167274951935,
-0.25537896156311035,
-0.2924267649650574,
0.18690502643585205,
-0.16636398434638977,
-0.07732699066400528,
0.3296641707420349,
0.5182709693908691,
0.3120293617248535,
0.0870155468583107,
0.34109240770339966,
0.306255578994751,
0.009027169086039066,
-0.031247030943632126,
-0.4050689935684204,
-0.05827190726995468,
0.2639197111129761,
0.3804077208042145,
-0.3354529142379761,
0.10174088925123215,
-0.040180955082178116,
-0.32988083362579346,
0.6009742617607117,
-0.47610604763031006,
-0.12176156044006348,
0.06805816292762756,
0.3615746796131134,
0.33938536047935486,
0.23287023603916168,
0.2761097848415375,
0.14954109489917755,
0.16262610256671906,
0.09601332247257233,
0.09878852963447571,
0.17015457153320312,
-0.4183504581451416,
0.21562930941581726,
-0.025750624015927315,
-0.21819405257701874,
0.10788168013095856,
-0.060978226363658905,
0.15002486109733582,
-0.0456758476793766,
-0.19987328350543976,
-0.15688666701316833,
0.5427843928337097,
-0.6157973408699036,
0.02794579230248928,
-0.24889647960662842,
-0.15608301758766174,
0.007014264818280935,
-0.21342624723911285,
-0.034243520349264145,
0.14295808970928192,
0.05249642953276634,
-0.3868671655654907,
-0.05383381247520447,
0.1028614491224289,
0.12662534415721893,
-0.18767660856246948,
0.5111070871353149,
-0.11369690299034119,
-0.03703640028834343,
0.2962217926979065,
0.044953539967536926,
-0.15126429498195648,
0.10901732742786407,
-0.19376131892204285,
-0.001878442708402872,
0.4852038323879242,
0.3487831652164459,
0.24583370983600616,
-0.021493786945939064,
-0.23320868611335754,
0.047029927372932434,
-0.040650516748428345,
-0.0793866366147995,
0.2275259643793106,
0.0799434557557106,
0.13025416433811188,
0.4091724455356598,
-0.03333542123436928,
-0.333244651556015,
0.23246285319328308,
0.18577763438224792,
-0.20312979817390442,
-0.43140751123428345,
0.2710413634777069,
0.3516988754272461,
-0.03689730539917946,
-0.3497079610824585,
-0.5220080614089966,
0.2360263615846634,
0.31859853863716125,
0.18839207291603088,
-0.07165347784757614,
-0.02765061892569065,
-0.24728116393089294,
0.1691095381975174,
0.056553300470113754,
-0.04837125912308693,
0.10004880279302597,
0.1766422837972641,
-0.21454474329948425,
-0.20678958296775818,
-0.25529661774635315,
-0.13639618456363678,
0.4286453127861023,
-0.044338617473840714,
0.3094404935836792,
0.1777622401714325,
0.27718648314476013,
-0.12472555786371231,
-0.12497524172067642,
0.28875258564949036,
0.008841033093631268,
0.04161049425601959,
-0.10893584042787552,
-0.03623782843351364,
0.19311049580574036,
-0.046948667615652084,
0.36491823196411133,
0.19579406082630157,
-0.32509127259254456,
0.01984449289739132,
-0.09847081452608109,
-0.12149550020694733,
-0.0789787694811821,
0.12100574374198914,
-0.15054965019226074,
0.11740070581436157,
0.04394659399986267,
-0.052580177783966064,
-0.18513722717761993,
-0.08627106249332428,
-0.1575879454612732,
-0.0794762670993805,
-0.29745039343833923,
-0.166235089302063,
-0.24606873095035553,
-0.1250382661819458,
-0.11964553594589233,
0.004331060219556093,
0.0005506000597961247,
-0.010688086971640587,
-0.04048744589090347,
-0.2826750874519348,
-0.1588369756937027,
0.06079479679465294,
-0.2936345934867859,
-0.21670210361480713,
-0.17391933500766754,
0.22814054787158966,
-0.0244003813713789,
0.09305927157402039,
-0.11566969007253647,
0.06675161421298981,
0.12224036455154419,
-0.09570088982582092,
-0.15432998538017273,
-0.05346102640032768,
-0.23314324021339417,
0.2917102873325348,
0.14917171001434326,
0.046830914914608,
-0.07943687587976456,
-0.41229644417762756,
-0.014396199956536293,
0.49690350890159607,
-0.5218707323074341,
-0.04079889878630638,
-0.3583913743495941,
0.2859601080417633,
-0.3150937557220459,
0.4582992196083069,
0.05670711398124695,
-0.24624811112880707,
-0.13801313936710358,
0.3644829988479614,
0.1745101511478424,
0.3875305652618408,
-0.061713509261608124,
0.0549771673977375,
-0.0879170224070549,
0.2675457298755646,
-0.11497589945793152,
0.5162416696548462,
0.32723188400268555,
-0.2136986255645752,
-0.04781858250498772,
-0.2623961865901947,
0.11595138162374496,
0.05277024209499359,
-0.13988201320171356,
0.29652485251426697,
0.08347855508327484,
-0.3149944543838501,
0.1665271818637848,
-0.2887454032897949,
-0.4117940366268158,
0.03204282000660896,
-0.05276046693325043,
0.19824540615081787,
-0.24431051313877106,
0.3169921636581421,
0.0489506833255291,
0.49109935760498047,
-0.17805087566375732,
0.2910947799682617,
-0.2383597493171692,
-0.1767042875289917,
0.19751496613025665,
0.2727537453174591,
0.2449004352092743,
-0.16755744814872742,
0.02649623341858387,
-0.5409102439880371,
-0.4216776490211487,
0.2834407389163971,
0.1674797385931015,
0.23528403043746948,
0.2791200578212738,
-0.10083381086587906,
0.5258057713508606,
-0.15621161460876465,
0.7999860644340515,
0.020683541893959045,
-0.3363373279571533,
0.3844906985759735,
-0.1618194878101349,
0.05287637189030647,
-0.21779318153858185,
-0.1827090084552765,
-0.0659896582365036,
0.23377461731433868,
0.4407466650009155,
-0.09317793697118759,
-0.24796512722969055,
0.6446048021316528,
0.06708817183971405,
-0.14724896848201752,
-0.3441525995731354,
-0.1861822009086609,
-0.35430601239204407,
-0.04121949523687363,
0.7678549289703369,
-0.12169075012207031,
0.15569071471691132,
0.1822197437286377,
-0.051234640181064606,
-0.38188865780830383,
0.15986618399620056,
0.23867441713809967,
-0.005120040848851204,
0.050583358854055405,
0.455783873796463,
0.4348106384277344,
0.07141595333814621,
0.0007325740880332887,
0.11927373707294464,
-0.03691220283508301,
-0.30439624190330505,
0.07315177470445633,
-0.18884620070457458,
-0.25568538904190063,
0.37994295358657837,
0.7006723880767822,
0.18687665462493896,
0.24840828776359558,
-0.21023093163967133,
0.3775888681411743,
-0.19144584238529205,
0.024531345814466476,
0.43831244111061096,
-0.0020621030125766993,
-0.17877259850502014,
-0.5383256673812866,
0.31127867102622986,
0.2034226506948471,
0.07330293953418732,
0.06086021289229393,
-0.07573039829730988,
-0.01638045720756054,
0.3021714985370636,
0.1250007152557373,
0.9838237762451172,
-0.02691991813480854,
0.1929827183485031,
0.50630784034729,
0.004840462934225798,
-0.24390368163585663,
-0.6487336754798889,
0.3692772090435028,
-0.33292150497436523,
-0.22415265440940857,
0.19311641156673431,
-0.10114186257123947,
-0.08476849645376205,
0.073533795773983,
-0.03934306278824806,
0.09914674609899521,
-0.04727573320269585,
-0.08625645935535431,
-0.2586022615432739,
0.38955432176589966,
0.31519457697868347,
-0.42784005403518677,
0.024883409962058067,
0.001350741251371801,
0.271456241607666,
-0.09871555119752884,
0.12781597673892975,
-0.16340002417564392,
-0.1108853816986084,
0.018441425636410713,
0.12517376244068146,
-0.07911400496959686,
-0.12837839126586914,
0.01305884774774313,
-0.048773329704999924,
-0.08731187880039215,
-0.23292511701583862,
-0.32441654801368713,
0.46041998267173767,
-0.029945844784379005,
0.09953469038009644,
0.081583671271801,
-0.09911026805639267,
0.07216382026672363,
-0.08676977455615997,
-0.49708321690559387,
0.22654052078723907,
0.08081196248531342,
-0.17367833852767944,
0.14937090873718262,
0.07872676849365234,
-0.3227708339691162,
-0.14609792828559875,
0.17442995309829712,
0.020576778799295425,
0.0075490353628993034,
-0.03673763945698738,
0.3179985284805298,
-0.26263749599456787,
-0.2335655391216278,
0.020059769973158836,
0.09207716584205627,
-0.4317528009414673,
0.5605180263519287,
-0.3023817241191864,
-0.3800688683986664,
-0.05465592443943024,
0.016695475205779076,
0.3058086335659027,
0.056038208305835724,
0.2623710334300995,
-0.0891200453042984,
-0.30488115549087524,
-0.1546768993139267,
-0.30242931842803955,
0.06128295511007309,
0.03862416744232178,
0.09388736635446548,
0.30242154002189636,
-0.006130733527243137,
0.025399265810847282,
-0.23266436159610748,
-0.3227173089981079,
-0.14176863431930542,
-0.3823906481266022,
0.11460041254758835,
-0.3576410114765167,
-0.18506810069084167,
0.2572275698184967,
0.38368457555770874,
0.036018408834934235,
0.23422428965568542,
-0.4448956251144409,
0.2590486705303192,
-0.21766982972621918,
-0.06533944606781006,
-0.031240707263350487,
0.2600192129611969,
-0.03270907327532768,
-0.25742706656455994,
0.17543961107730865,
0.21627074480056763,
0.11998891830444336,
0.14120365679264069,
0.03736565262079239,
-0.11179859936237335,
0.10294927656650543,
0.1834249496459961,
-0.11074750125408173,
0.16845054924488068,
0.08115518093109131,
-0.1483062207698822,
-0.3009878098964691,
-0.2652977406978607,
0.13436627388000488,
-0.11070363968610764,
-0.025854967534542084,
-0.13035929203033447,
-0.12170838564634323,
-0.11248856782913208,
0.3323756754398346,
0.27382513880729675,
0.20400471985340118,
0.28330788016319275,
-0.0734994113445282,
0.07670175284147263,
-0.24283291399478912,
-0.26539337635040283,
-0.05103801190853119,
0.19032369554042816,
0.061644669622182846,
0.08636713773012161,
-0.09186553955078125,
-0.17318761348724365,
-0.37994787096977234,
-0.038117554038763046,
0.03176838532090187,
0.44989216327667236,
0.04249455779790878,
-0.2883666753768921,
0.18529678881168365,
0.03793703019618988,
-0.27972111105918884,
-0.19527681171894073,
0.3624269962310791,
-0.4507017433643341,
0.20022889971733093,
0.40171751379966736,
0.26457515358924866,
0.16572430729866028,
-0.48327431082725525,
0.09376382827758789,
-0.23451673984527588,
0.09630513191223145,
-0.4337080121040344,
-0.0904514268040657,
0.3514752984046936,
-0.19489936530590057,
0.20412589609622955,
0.3052140772342682,
0.23111960291862488,
0.6089180111885071,
0.03142336755990982,
0.2752900719642639,
0.18787720799446106,
0.21332722902297974,
-0.32170307636260986,
-0.17983660101890564,
0.2906690835952759,
0.23226889967918396,
-0.03177434206008911,
-0.20784573256969452,
0.00909457542002201,
0.23473390936851501,
0.24403607845306396,
-0.516964316368103,
-0.2611277401447296,
0.16302168369293213,
-0.12202011793851852,
-0.12818151712417603,
0.41174861788749695,
0.056770890951156616,
-0.2780810296535492,
0.2270267903804779,
0.07766445726156235,
0.19237421452999115,
-0.12724758684635162,
0.20087450742721558,
0.2934531569480896,
0.22120140492916107,
-0.023113934323191643,
0.0910249873995781,
0.4337705373764038,
-0.33673936128616333,
-0.20791392028331757,
-0.011149626225233078,
-0.0027164847124367952,
0.023589259013533592,
-0.15122254192829132,
0.2809453010559082,
0.24482552707195282,
-0.05550317466259003,
0.2687216103076935,
-0.050441090017557144,
-0.008870884776115417,
0.04380457103252411,
-0.034400876611471176,
-0.10841280966997147,
-0.10039331018924713,
0.10061687231063843,
-0.0908767506480217,
-0.12853354215621948,
-0.12072346359491348,
-0.2426328808069229,
0.20261327922344208,
-0.18042470514774323,
0.0230691060423851,
0.3459421992301941,
-0.09754059463739395,
-0.3948054313659668,
0.09524179250001907,
-0.28330305218696594,
0.06918125599622726,
0.10627059638500214,
-0.3566013276576996,
-0.08913571387529373,
0.2603062689304352,
-0.001633998821489513,
-0.4257487952709198,
0.5468892455101013,
0.1724044531583786,
0.1286822259426117,
-0.3299420177936554,
-0.0014343556249514222,
-0.32078811526298523,
-0.03450939431786537,
-0.5890913009643555,
0.11263563483953476,
0.11768347769975662,
0.4403546452522278,
0.07392508536577225,
-0.0703551396727562,
0.40310826897621155,
-0.40797093510627747,
0.09924033284187317,
0.3735489249229431,
-0.1734420359134674,
-0.030622417107224464,
-0.4397854804992676,
-0.07384704053401947,
0.042283251881599426,
-0.3743230998516083,
0.28479641675949097,
-0.12820668518543243,
-0.014769596047699451,
0.19237110018730164,
-0.020268801599740982,
0.12265168130397797,
0.06268194317817688,
0.5298777222633362,
-0.09794456511735916,
0.000055181335483212024,
-0.09645427763462067,
0.008635740727186203,
-0.23218899965286255,
0.12195920199155807,
-0.20707820355892181,
0.008574522100389004,
-0.02188759483397007,
0.1733759194612503,
-0.2073739618062973,
-0.3919595181941986,
-0.18153439462184906,
0.4176577925682068,
0.31262972950935364,
-0.41869619488716125,
0.19802796840667725,
0.152659073472023,
-0.155827596783638,
0.47959375381469727,
0.15036313235759735,
0.22828395664691925,
0.14673328399658203,
-0.034050654619932175,
-0.3561272919178009,
-0.10542063415050507,
0.6236687898635864,
-0.18829402327537537,
-0.029361551627516747,
-0.34943896532058716,
0.254902184009552,
0.4437912702560425,
0.5510439872741699,
-0.26457640528678894,
0.08623872697353363,
0.12194323539733887,
0.053574010729789734,
-0.2103939801454544,
0.5777605772018433,
0.18686193227767944,
0.014771755784749985,
-0.07378310710191727,
-0.26480746269226074,
-0.06308902055025101,
-0.0029667862690985203,
-0.3532107174396515,
-0.28143104910850525
] |
https://github.com/huggingface/datasets/issues/2046
|
add_faisis_index gets very slow when doing it interatively
|
@lhoestq
Thanks a lot for sharing all this prior knowledge.
Just asking what would be a good nlist of parameters for 30 million embeddings?
|
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
| 24
|
add_faisis_index gets very slow when doing it interatively
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
@lhoestq
Thanks a lot for sharing all this prior knowledge.
Just asking what would be a good nlist of parameters for 30 million embeddings?
|
[
-0.49882516264915466,
-0.26827844977378845,
-0.024500647559762,
0.1282288283109665,
0.05943915247917175,
0.20778384804725647,
0.12146306037902832,
0.42412909865379333,
0.291742742061615,
0.2924974858760834,
-0.11882596462965012,
0.188315287232399,
0.13721296191215515,
0.08582107722759247,
-0.13625605404376984,
0.17504271864891052,
0.23703299462795258,
0.08533414453268051,
0.2607974112033844,
-0.13441404700279236,
-0.32748016715049744,
-0.30906423926353455,
-0.15891285240650177,
-0.2578621208667755,
-0.40069231390953064,
-0.0958191454410553,
-0.24362172186374664,
-0.08205042779445648,
0.19824793934822083,
-0.47291648387908936,
-0.13753199577331543,
0.1398429572582245,
0.34025880694389343,
0.25829288363456726,
-0.00012204969971207902,
0.05567667633295059,
0.22800785303115845,
0.06546277552843094,
-0.22299717366695404,
0.6411961913108826,
0.3400721848011017,
-0.06948856264352798,
-0.1751103401184082,
-0.3107718527317047,
-0.14555537700653076,
-0.11104141920804977,
0.08107940107584,
-0.04693025350570679,
-0.1663648784160614,
0.19430120289325714,
0.026624172925949097,
-0.05828629806637764,
0.05225489288568497,
-0.015400421805679798,
0.40251225233078003,
-0.0755910724401474,
-0.06917734444141388,
0.3174716532230377,
0.16351284086704254,
-0.07223645597696304,
0.09974305331707001,
0.44810786843299866,
0.120641328394413,
-0.22677703201770782,
0.10890348255634308,
0.20516164600849152,
0.7838155627250671,
0.022439492866396904,
0.06526804715394974,
0.15266908705234528,
0.0153404101729393,
-0.09055348485708237,
-0.4430079758167267,
-0.10290209203958511,
0.42571401596069336,
-0.618060290813446,
-0.06740108132362366,
-0.08374133706092834,
-0.1014745682477951,
0.053860053420066833,
0.1745847463607788,
-0.03023025207221508,
0.03631783649325371,
0.04745028540492058,
0.17490026354789734,
0.1653580665588379,
0.3874707520008087,
-0.05990183725953102,
0.5584331750869751,
0.04244775325059891,
-0.11685464531183243,
0.04488201439380646,
-0.09207794815301895,
0.012196076102554798,
-0.6050311923027039,
0.08808470517396927,
-0.03091667965054512,
-0.09933095425367355,
-0.09268633276224136,
0.017801547423005104,
-0.369486540555954,
0.006166044622659683,
0.2365611046552658,
0.0033363329712301493,
-0.18306593596935272,
-0.09025747328996658,
-0.5061047077178955,
0.05588063597679138,
0.0839017927646637,
0.10628657042980194,
-0.3780882656574249,
0.0992341935634613,
-0.0033384810667485,
-0.004310553427785635,
-0.3259795606136322,
-0.29813456535339355,
-0.2288902997970581,
0.2228073924779892,
-0.1811421811580658,
0.07718756049871445,
-0.40396761894226074,
-0.25227686762809753,
0.20507250726222992,
0.41622263193130493,
-0.1177443340420723,
-0.07613808661699295,
0.010839538648724556,
-0.0346161313354969,
-0.23442824184894562,
0.17616769671440125,
-0.22201746702194214,
0.23066066205501556,
-0.03196385130286217,
0.5045983195304871,
-0.029106812551617622,
-0.22139428555965424,
-0.08906889706850052,
-0.021730387583374977,
0.08396376669406891,
-0.007842501625418663,
-0.044163525104522705,
-0.2998936176300049,
0.24666738510131836,
0.07492349296808243,
-0.2632139325141907,
-0.06768488138914108,
-0.09395243972539902,
0.12111043930053711,
-0.22782295942306519,
0.22150807082653046,
-0.21739515662193298,
-0.36510276794433594,
0.02715766429901123,
0.019331108778715134,
0.3086777627468109,
-0.06309196352958679,
0.4208211898803711,
0.11439678817987442,
0.17301812767982483,
0.16133496165275574,
0.15917611122131348,
-0.13144302368164062,
-0.2680220901966095,
0.08318619430065155,
0.22678479552268982,
0.36273834109306335,
0.09372176975011826,
0.03477165475487709,
0.29801318049430847,
0.39013007283210754,
0.2124062031507492,
0.39999398589134216,
-0.11594938486814499,
0.6762606501579285,
-0.3200046122074127,
0.0842917189002037,
0.24512167274951935,
-0.25537896156311035,
-0.2924267649650574,
0.18690502643585205,
-0.16636398434638977,
-0.07732699066400528,
0.3296641707420349,
0.5182709693908691,
0.3120293617248535,
0.0870155468583107,
0.34109240770339966,
0.306255578994751,
0.009027169086039066,
-0.031247030943632126,
-0.4050689935684204,
-0.05827190726995468,
0.2639197111129761,
0.3804077208042145,
-0.3354529142379761,
0.10174088925123215,
-0.040180955082178116,
-0.32988083362579346,
0.6009742617607117,
-0.47610604763031006,
-0.12176156044006348,
0.06805816292762756,
0.3615746796131134,
0.33938536047935486,
0.23287023603916168,
0.2761097848415375,
0.14954109489917755,
0.16262610256671906,
0.09601332247257233,
0.09878852963447571,
0.17015457153320312,
-0.4183504581451416,
0.21562930941581726,
-0.025750624015927315,
-0.21819405257701874,
0.10788168013095856,
-0.060978226363658905,
0.15002486109733582,
-0.0456758476793766,
-0.19987328350543976,
-0.15688666701316833,
0.5427843928337097,
-0.6157973408699036,
0.02794579230248928,
-0.24889647960662842,
-0.15608301758766174,
0.007014264818280935,
-0.21342624723911285,
-0.034243520349264145,
0.14295808970928192,
0.05249642953276634,
-0.3868671655654907,
-0.05383381247520447,
0.1028614491224289,
0.12662534415721893,
-0.18767660856246948,
0.5111070871353149,
-0.11369690299034119,
-0.03703640028834343,
0.2962217926979065,
0.044953539967536926,
-0.15126429498195648,
0.10901732742786407,
-0.19376131892204285,
-0.001878442708402872,
0.4852038323879242,
0.3487831652164459,
0.24583370983600616,
-0.021493786945939064,
-0.23320868611335754,
0.047029927372932434,
-0.040650516748428345,
-0.0793866366147995,
0.2275259643793106,
0.0799434557557106,
0.13025416433811188,
0.4091724455356598,
-0.03333542123436928,
-0.333244651556015,
0.23246285319328308,
0.18577763438224792,
-0.20312979817390442,
-0.43140751123428345,
0.2710413634777069,
0.3516988754272461,
-0.03689730539917946,
-0.3497079610824585,
-0.5220080614089966,
0.2360263615846634,
0.31859853863716125,
0.18839207291603088,
-0.07165347784757614,
-0.02765061892569065,
-0.24728116393089294,
0.1691095381975174,
0.056553300470113754,
-0.04837125912308693,
0.10004880279302597,
0.1766422837972641,
-0.21454474329948425,
-0.20678958296775818,
-0.25529661774635315,
-0.13639618456363678,
0.4286453127861023,
-0.044338617473840714,
0.3094404935836792,
0.1777622401714325,
0.27718648314476013,
-0.12472555786371231,
-0.12497524172067642,
0.28875258564949036,
0.008841033093631268,
0.04161049425601959,
-0.10893584042787552,
-0.03623782843351364,
0.19311049580574036,
-0.046948667615652084,
0.36491823196411133,
0.19579406082630157,
-0.32509127259254456,
0.01984449289739132,
-0.09847081452608109,
-0.12149550020694733,
-0.0789787694811821,
0.12100574374198914,
-0.15054965019226074,
0.11740070581436157,
0.04394659399986267,
-0.052580177783966064,
-0.18513722717761993,
-0.08627106249332428,
-0.1575879454612732,
-0.0794762670993805,
-0.29745039343833923,
-0.166235089302063,
-0.24606873095035553,
-0.1250382661819458,
-0.11964553594589233,
0.004331060219556093,
0.0005506000597961247,
-0.010688086971640587,
-0.04048744589090347,
-0.2826750874519348,
-0.1588369756937027,
0.06079479679465294,
-0.2936345934867859,
-0.21670210361480713,
-0.17391933500766754,
0.22814054787158966,
-0.0244003813713789,
0.09305927157402039,
-0.11566969007253647,
0.06675161421298981,
0.12224036455154419,
-0.09570088982582092,
-0.15432998538017273,
-0.05346102640032768,
-0.23314324021339417,
0.2917102873325348,
0.14917171001434326,
0.046830914914608,
-0.07943687587976456,
-0.41229644417762756,
-0.014396199956536293,
0.49690350890159607,
-0.5218707323074341,
-0.04079889878630638,
-0.3583913743495941,
0.2859601080417633,
-0.3150937557220459,
0.4582992196083069,
0.05670711398124695,
-0.24624811112880707,
-0.13801313936710358,
0.3644829988479614,
0.1745101511478424,
0.3875305652618408,
-0.061713509261608124,
0.0549771673977375,
-0.0879170224070549,
0.2675457298755646,
-0.11497589945793152,
0.5162416696548462,
0.32723188400268555,
-0.2136986255645752,
-0.04781858250498772,
-0.2623961865901947,
0.11595138162374496,
0.05277024209499359,
-0.13988201320171356,
0.29652485251426697,
0.08347855508327484,
-0.3149944543838501,
0.1665271818637848,
-0.2887454032897949,
-0.4117940366268158,
0.03204282000660896,
-0.05276046693325043,
0.19824540615081787,
-0.24431051313877106,
0.3169921636581421,
0.0489506833255291,
0.49109935760498047,
-0.17805087566375732,
0.2910947799682617,
-0.2383597493171692,
-0.1767042875289917,
0.19751496613025665,
0.2727537453174591,
0.2449004352092743,
-0.16755744814872742,
0.02649623341858387,
-0.5409102439880371,
-0.4216776490211487,
0.2834407389163971,
0.1674797385931015,
0.23528403043746948,
0.2791200578212738,
-0.10083381086587906,
0.5258057713508606,
-0.15621161460876465,
0.7999860644340515,
0.020683541893959045,
-0.3363373279571533,
0.3844906985759735,
-0.1618194878101349,
0.05287637189030647,
-0.21779318153858185,
-0.1827090084552765,
-0.0659896582365036,
0.23377461731433868,
0.4407466650009155,
-0.09317793697118759,
-0.24796512722969055,
0.6446048021316528,
0.06708817183971405,
-0.14724896848201752,
-0.3441525995731354,
-0.1861822009086609,
-0.35430601239204407,
-0.04121949523687363,
0.7678549289703369,
-0.12169075012207031,
0.15569071471691132,
0.1822197437286377,
-0.051234640181064606,
-0.38188865780830383,
0.15986618399620056,
0.23867441713809967,
-0.005120040848851204,
0.050583358854055405,
0.455783873796463,
0.4348106384277344,
0.07141595333814621,
0.0007325740880332887,
0.11927373707294464,
-0.03691220283508301,
-0.30439624190330505,
0.07315177470445633,
-0.18884620070457458,
-0.25568538904190063,
0.37994295358657837,
0.7006723880767822,
0.18687665462493896,
0.24840828776359558,
-0.21023093163967133,
0.3775888681411743,
-0.19144584238529205,
0.024531345814466476,
0.43831244111061096,
-0.0020621030125766993,
-0.17877259850502014,
-0.5383256673812866,
0.31127867102622986,
0.2034226506948471,
0.07330293953418732,
0.06086021289229393,
-0.07573039829730988,
-0.01638045720756054,
0.3021714985370636,
0.1250007152557373,
0.9838237762451172,
-0.02691991813480854,
0.1929827183485031,
0.50630784034729,
0.004840462934225798,
-0.24390368163585663,
-0.6487336754798889,
0.3692772090435028,
-0.33292150497436523,
-0.22415265440940857,
0.19311641156673431,
-0.10114186257123947,
-0.08476849645376205,
0.073533795773983,
-0.03934306278824806,
0.09914674609899521,
-0.04727573320269585,
-0.08625645935535431,
-0.2586022615432739,
0.38955432176589966,
0.31519457697868347,
-0.42784005403518677,
0.024883409962058067,
0.001350741251371801,
0.271456241607666,
-0.09871555119752884,
0.12781597673892975,
-0.16340002417564392,
-0.1108853816986084,
0.018441425636410713,
0.12517376244068146,
-0.07911400496959686,
-0.12837839126586914,
0.01305884774774313,
-0.048773329704999924,
-0.08731187880039215,
-0.23292511701583862,
-0.32441654801368713,
0.46041998267173767,
-0.029945844784379005,
0.09953469038009644,
0.081583671271801,
-0.09911026805639267,
0.07216382026672363,
-0.08676977455615997,
-0.49708321690559387,
0.22654052078723907,
0.08081196248531342,
-0.17367833852767944,
0.14937090873718262,
0.07872676849365234,
-0.3227708339691162,
-0.14609792828559875,
0.17442995309829712,
0.020576778799295425,
0.0075490353628993034,
-0.03673763945698738,
0.3179985284805298,
-0.26263749599456787,
-0.2335655391216278,
0.020059769973158836,
0.09207716584205627,
-0.4317528009414673,
0.5605180263519287,
-0.3023817241191864,
-0.3800688683986664,
-0.05465592443943024,
0.016695475205779076,
0.3058086335659027,
0.056038208305835724,
0.2623710334300995,
-0.0891200453042984,
-0.30488115549087524,
-0.1546768993139267,
-0.30242931842803955,
0.06128295511007309,
0.03862416744232178,
0.09388736635446548,
0.30242154002189636,
-0.006130733527243137,
0.025399265810847282,
-0.23266436159610748,
-0.3227173089981079,
-0.14176863431930542,
-0.3823906481266022,
0.11460041254758835,
-0.3576410114765167,
-0.18506810069084167,
0.2572275698184967,
0.38368457555770874,
0.036018408834934235,
0.23422428965568542,
-0.4448956251144409,
0.2590486705303192,
-0.21766982972621918,
-0.06533944606781006,
-0.031240707263350487,
0.2600192129611969,
-0.03270907327532768,
-0.25742706656455994,
0.17543961107730865,
0.21627074480056763,
0.11998891830444336,
0.14120365679264069,
0.03736565262079239,
-0.11179859936237335,
0.10294927656650543,
0.1834249496459961,
-0.11074750125408173,
0.16845054924488068,
0.08115518093109131,
-0.1483062207698822,
-0.3009878098964691,
-0.2652977406978607,
0.13436627388000488,
-0.11070363968610764,
-0.025854967534542084,
-0.13035929203033447,
-0.12170838564634323,
-0.11248856782913208,
0.3323756754398346,
0.27382513880729675,
0.20400471985340118,
0.28330788016319275,
-0.0734994113445282,
0.07670175284147263,
-0.24283291399478912,
-0.26539337635040283,
-0.05103801190853119,
0.19032369554042816,
0.061644669622182846,
0.08636713773012161,
-0.09186553955078125,
-0.17318761348724365,
-0.37994787096977234,
-0.038117554038763046,
0.03176838532090187,
0.44989216327667236,
0.04249455779790878,
-0.2883666753768921,
0.18529678881168365,
0.03793703019618988,
-0.27972111105918884,
-0.19527681171894073,
0.3624269962310791,
-0.4507017433643341,
0.20022889971733093,
0.40171751379966736,
0.26457515358924866,
0.16572430729866028,
-0.48327431082725525,
0.09376382827758789,
-0.23451673984527588,
0.09630513191223145,
-0.4337080121040344,
-0.0904514268040657,
0.3514752984046936,
-0.19489936530590057,
0.20412589609622955,
0.3052140772342682,
0.23111960291862488,
0.6089180111885071,
0.03142336755990982,
0.2752900719642639,
0.18787720799446106,
0.21332722902297974,
-0.32170307636260986,
-0.17983660101890564,
0.2906690835952759,
0.23226889967918396,
-0.03177434206008911,
-0.20784573256969452,
0.00909457542002201,
0.23473390936851501,
0.24403607845306396,
-0.516964316368103,
-0.2611277401447296,
0.16302168369293213,
-0.12202011793851852,
-0.12818151712417603,
0.41174861788749695,
0.056770890951156616,
-0.2780810296535492,
0.2270267903804779,
0.07766445726156235,
0.19237421452999115,
-0.12724758684635162,
0.20087450742721558,
0.2934531569480896,
0.22120140492916107,
-0.023113934323191643,
0.0910249873995781,
0.4337705373764038,
-0.33673936128616333,
-0.20791392028331757,
-0.011149626225233078,
-0.0027164847124367952,
0.023589259013533592,
-0.15122254192829132,
0.2809453010559082,
0.24482552707195282,
-0.05550317466259003,
0.2687216103076935,
-0.050441090017557144,
-0.008870884776115417,
0.04380457103252411,
-0.034400876611471176,
-0.10841280966997147,
-0.10039331018924713,
0.10061687231063843,
-0.0908767506480217,
-0.12853354215621948,
-0.12072346359491348,
-0.2426328808069229,
0.20261327922344208,
-0.18042470514774323,
0.0230691060423851,
0.3459421992301941,
-0.09754059463739395,
-0.3948054313659668,
0.09524179250001907,
-0.28330305218696594,
0.06918125599622726,
0.10627059638500214,
-0.3566013276576996,
-0.08913571387529373,
0.2603062689304352,
-0.001633998821489513,
-0.4257487952709198,
0.5468892455101013,
0.1724044531583786,
0.1286822259426117,
-0.3299420177936554,
-0.0014343556249514222,
-0.32078811526298523,
-0.03450939431786537,
-0.5890913009643555,
0.11263563483953476,
0.11768347769975662,
0.4403546452522278,
0.07392508536577225,
-0.0703551396727562,
0.40310826897621155,
-0.40797093510627747,
0.09924033284187317,
0.3735489249229431,
-0.1734420359134674,
-0.030622417107224464,
-0.4397854804992676,
-0.07384704053401947,
0.042283251881599426,
-0.3743230998516083,
0.28479641675949097,
-0.12820668518543243,
-0.014769596047699451,
0.19237110018730164,
-0.020268801599740982,
0.12265168130397797,
0.06268194317817688,
0.5298777222633362,
-0.09794456511735916,
0.000055181335483212024,
-0.09645427763462067,
0.008635740727186203,
-0.23218899965286255,
0.12195920199155807,
-0.20707820355892181,
0.008574522100389004,
-0.02188759483397007,
0.1733759194612503,
-0.2073739618062973,
-0.3919595181941986,
-0.18153439462184906,
0.4176577925682068,
0.31262972950935364,
-0.41869619488716125,
0.19802796840667725,
0.152659073472023,
-0.155827596783638,
0.47959375381469727,
0.15036313235759735,
0.22828395664691925,
0.14673328399658203,
-0.034050654619932175,
-0.3561272919178009,
-0.10542063415050507,
0.6236687898635864,
-0.18829402327537537,
-0.029361551627516747,
-0.34943896532058716,
0.254902184009552,
0.4437912702560425,
0.5510439872741699,
-0.26457640528678894,
0.08623872697353363,
0.12194323539733887,
0.053574010729789734,
-0.2103939801454544,
0.5777605772018433,
0.18686193227767944,
0.014771755784749985,
-0.07378310710191727,
-0.26480746269226074,
-0.06308902055025101,
-0.0029667862690985203,
-0.3532107174396515,
-0.28143104910850525
] |
https://github.com/huggingface/datasets/issues/2046
|
add_faisis_index gets very slow when doing it interatively
|
When IVF is used alone, nlist should be between `4*sqrt(n)` and `16*sqrt(n)`.
For more details take a look at [this section of the Faiss wiki](https://github.com/facebookresearch/faiss/wiki/Guidelines-to-choose-an-index#how-big-is-the-dataset)
|
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
| 25
|
add_faisis_index gets very slow when doing it interatively
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
When IVF is used alone, nlist should be between `4*sqrt(n)` and `16*sqrt(n)`.
For more details take a look at [this section of the Faiss wiki](https://github.com/facebookresearch/faiss/wiki/Guidelines-to-choose-an-index#how-big-is-the-dataset)
|
[
-0.49882516264915466,
-0.26827844977378845,
-0.024500647559762,
0.1282288283109665,
0.05943915247917175,
0.20778384804725647,
0.12146306037902832,
0.42412909865379333,
0.291742742061615,
0.2924974858760834,
-0.11882596462965012,
0.188315287232399,
0.13721296191215515,
0.08582107722759247,
-0.13625605404376984,
0.17504271864891052,
0.23703299462795258,
0.08533414453268051,
0.2607974112033844,
-0.13441404700279236,
-0.32748016715049744,
-0.30906423926353455,
-0.15891285240650177,
-0.2578621208667755,
-0.40069231390953064,
-0.0958191454410553,
-0.24362172186374664,
-0.08205042779445648,
0.19824793934822083,
-0.47291648387908936,
-0.13753199577331543,
0.1398429572582245,
0.34025880694389343,
0.25829288363456726,
-0.00012204969971207902,
0.05567667633295059,
0.22800785303115845,
0.06546277552843094,
-0.22299717366695404,
0.6411961913108826,
0.3400721848011017,
-0.06948856264352798,
-0.1751103401184082,
-0.3107718527317047,
-0.14555537700653076,
-0.11104141920804977,
0.08107940107584,
-0.04693025350570679,
-0.1663648784160614,
0.19430120289325714,
0.026624172925949097,
-0.05828629806637764,
0.05225489288568497,
-0.015400421805679798,
0.40251225233078003,
-0.0755910724401474,
-0.06917734444141388,
0.3174716532230377,
0.16351284086704254,
-0.07223645597696304,
0.09974305331707001,
0.44810786843299866,
0.120641328394413,
-0.22677703201770782,
0.10890348255634308,
0.20516164600849152,
0.7838155627250671,
0.022439492866396904,
0.06526804715394974,
0.15266908705234528,
0.0153404101729393,
-0.09055348485708237,
-0.4430079758167267,
-0.10290209203958511,
0.42571401596069336,
-0.618060290813446,
-0.06740108132362366,
-0.08374133706092834,
-0.1014745682477951,
0.053860053420066833,
0.1745847463607788,
-0.03023025207221508,
0.03631783649325371,
0.04745028540492058,
0.17490026354789734,
0.1653580665588379,
0.3874707520008087,
-0.05990183725953102,
0.5584331750869751,
0.04244775325059891,
-0.11685464531183243,
0.04488201439380646,
-0.09207794815301895,
0.012196076102554798,
-0.6050311923027039,
0.08808470517396927,
-0.03091667965054512,
-0.09933095425367355,
-0.09268633276224136,
0.017801547423005104,
-0.369486540555954,
0.006166044622659683,
0.2365611046552658,
0.0033363329712301493,
-0.18306593596935272,
-0.09025747328996658,
-0.5061047077178955,
0.05588063597679138,
0.0839017927646637,
0.10628657042980194,
-0.3780882656574249,
0.0992341935634613,
-0.0033384810667485,
-0.004310553427785635,
-0.3259795606136322,
-0.29813456535339355,
-0.2288902997970581,
0.2228073924779892,
-0.1811421811580658,
0.07718756049871445,
-0.40396761894226074,
-0.25227686762809753,
0.20507250726222992,
0.41622263193130493,
-0.1177443340420723,
-0.07613808661699295,
0.010839538648724556,
-0.0346161313354969,
-0.23442824184894562,
0.17616769671440125,
-0.22201746702194214,
0.23066066205501556,
-0.03196385130286217,
0.5045983195304871,
-0.029106812551617622,
-0.22139428555965424,
-0.08906889706850052,
-0.021730387583374977,
0.08396376669406891,
-0.007842501625418663,
-0.044163525104522705,
-0.2998936176300049,
0.24666738510131836,
0.07492349296808243,
-0.2632139325141907,
-0.06768488138914108,
-0.09395243972539902,
0.12111043930053711,
-0.22782295942306519,
0.22150807082653046,
-0.21739515662193298,
-0.36510276794433594,
0.02715766429901123,
0.019331108778715134,
0.3086777627468109,
-0.06309196352958679,
0.4208211898803711,
0.11439678817987442,
0.17301812767982483,
0.16133496165275574,
0.15917611122131348,
-0.13144302368164062,
-0.2680220901966095,
0.08318619430065155,
0.22678479552268982,
0.36273834109306335,
0.09372176975011826,
0.03477165475487709,
0.29801318049430847,
0.39013007283210754,
0.2124062031507492,
0.39999398589134216,
-0.11594938486814499,
0.6762606501579285,
-0.3200046122074127,
0.0842917189002037,
0.24512167274951935,
-0.25537896156311035,
-0.2924267649650574,
0.18690502643585205,
-0.16636398434638977,
-0.07732699066400528,
0.3296641707420349,
0.5182709693908691,
0.3120293617248535,
0.0870155468583107,
0.34109240770339966,
0.306255578994751,
0.009027169086039066,
-0.031247030943632126,
-0.4050689935684204,
-0.05827190726995468,
0.2639197111129761,
0.3804077208042145,
-0.3354529142379761,
0.10174088925123215,
-0.040180955082178116,
-0.32988083362579346,
0.6009742617607117,
-0.47610604763031006,
-0.12176156044006348,
0.06805816292762756,
0.3615746796131134,
0.33938536047935486,
0.23287023603916168,
0.2761097848415375,
0.14954109489917755,
0.16262610256671906,
0.09601332247257233,
0.09878852963447571,
0.17015457153320312,
-0.4183504581451416,
0.21562930941581726,
-0.025750624015927315,
-0.21819405257701874,
0.10788168013095856,
-0.060978226363658905,
0.15002486109733582,
-0.0456758476793766,
-0.19987328350543976,
-0.15688666701316833,
0.5427843928337097,
-0.6157973408699036,
0.02794579230248928,
-0.24889647960662842,
-0.15608301758766174,
0.007014264818280935,
-0.21342624723911285,
-0.034243520349264145,
0.14295808970928192,
0.05249642953276634,
-0.3868671655654907,
-0.05383381247520447,
0.1028614491224289,
0.12662534415721893,
-0.18767660856246948,
0.5111070871353149,
-0.11369690299034119,
-0.03703640028834343,
0.2962217926979065,
0.044953539967536926,
-0.15126429498195648,
0.10901732742786407,
-0.19376131892204285,
-0.001878442708402872,
0.4852038323879242,
0.3487831652164459,
0.24583370983600616,
-0.021493786945939064,
-0.23320868611335754,
0.047029927372932434,
-0.040650516748428345,
-0.0793866366147995,
0.2275259643793106,
0.0799434557557106,
0.13025416433811188,
0.4091724455356598,
-0.03333542123436928,
-0.333244651556015,
0.23246285319328308,
0.18577763438224792,
-0.20312979817390442,
-0.43140751123428345,
0.2710413634777069,
0.3516988754272461,
-0.03689730539917946,
-0.3497079610824585,
-0.5220080614089966,
0.2360263615846634,
0.31859853863716125,
0.18839207291603088,
-0.07165347784757614,
-0.02765061892569065,
-0.24728116393089294,
0.1691095381975174,
0.056553300470113754,
-0.04837125912308693,
0.10004880279302597,
0.1766422837972641,
-0.21454474329948425,
-0.20678958296775818,
-0.25529661774635315,
-0.13639618456363678,
0.4286453127861023,
-0.044338617473840714,
0.3094404935836792,
0.1777622401714325,
0.27718648314476013,
-0.12472555786371231,
-0.12497524172067642,
0.28875258564949036,
0.008841033093631268,
0.04161049425601959,
-0.10893584042787552,
-0.03623782843351364,
0.19311049580574036,
-0.046948667615652084,
0.36491823196411133,
0.19579406082630157,
-0.32509127259254456,
0.01984449289739132,
-0.09847081452608109,
-0.12149550020694733,
-0.0789787694811821,
0.12100574374198914,
-0.15054965019226074,
0.11740070581436157,
0.04394659399986267,
-0.052580177783966064,
-0.18513722717761993,
-0.08627106249332428,
-0.1575879454612732,
-0.0794762670993805,
-0.29745039343833923,
-0.166235089302063,
-0.24606873095035553,
-0.1250382661819458,
-0.11964553594589233,
0.004331060219556093,
0.0005506000597961247,
-0.010688086971640587,
-0.04048744589090347,
-0.2826750874519348,
-0.1588369756937027,
0.06079479679465294,
-0.2936345934867859,
-0.21670210361480713,
-0.17391933500766754,
0.22814054787158966,
-0.0244003813713789,
0.09305927157402039,
-0.11566969007253647,
0.06675161421298981,
0.12224036455154419,
-0.09570088982582092,
-0.15432998538017273,
-0.05346102640032768,
-0.23314324021339417,
0.2917102873325348,
0.14917171001434326,
0.046830914914608,
-0.07943687587976456,
-0.41229644417762756,
-0.014396199956536293,
0.49690350890159607,
-0.5218707323074341,
-0.04079889878630638,
-0.3583913743495941,
0.2859601080417633,
-0.3150937557220459,
0.4582992196083069,
0.05670711398124695,
-0.24624811112880707,
-0.13801313936710358,
0.3644829988479614,
0.1745101511478424,
0.3875305652618408,
-0.061713509261608124,
0.0549771673977375,
-0.0879170224070549,
0.2675457298755646,
-0.11497589945793152,
0.5162416696548462,
0.32723188400268555,
-0.2136986255645752,
-0.04781858250498772,
-0.2623961865901947,
0.11595138162374496,
0.05277024209499359,
-0.13988201320171356,
0.29652485251426697,
0.08347855508327484,
-0.3149944543838501,
0.1665271818637848,
-0.2887454032897949,
-0.4117940366268158,
0.03204282000660896,
-0.05276046693325043,
0.19824540615081787,
-0.24431051313877106,
0.3169921636581421,
0.0489506833255291,
0.49109935760498047,
-0.17805087566375732,
0.2910947799682617,
-0.2383597493171692,
-0.1767042875289917,
0.19751496613025665,
0.2727537453174591,
0.2449004352092743,
-0.16755744814872742,
0.02649623341858387,
-0.5409102439880371,
-0.4216776490211487,
0.2834407389163971,
0.1674797385931015,
0.23528403043746948,
0.2791200578212738,
-0.10083381086587906,
0.5258057713508606,
-0.15621161460876465,
0.7999860644340515,
0.020683541893959045,
-0.3363373279571533,
0.3844906985759735,
-0.1618194878101349,
0.05287637189030647,
-0.21779318153858185,
-0.1827090084552765,
-0.0659896582365036,
0.23377461731433868,
0.4407466650009155,
-0.09317793697118759,
-0.24796512722969055,
0.6446048021316528,
0.06708817183971405,
-0.14724896848201752,
-0.3441525995731354,
-0.1861822009086609,
-0.35430601239204407,
-0.04121949523687363,
0.7678549289703369,
-0.12169075012207031,
0.15569071471691132,
0.1822197437286377,
-0.051234640181064606,
-0.38188865780830383,
0.15986618399620056,
0.23867441713809967,
-0.005120040848851204,
0.050583358854055405,
0.455783873796463,
0.4348106384277344,
0.07141595333814621,
0.0007325740880332887,
0.11927373707294464,
-0.03691220283508301,
-0.30439624190330505,
0.07315177470445633,
-0.18884620070457458,
-0.25568538904190063,
0.37994295358657837,
0.7006723880767822,
0.18687665462493896,
0.24840828776359558,
-0.21023093163967133,
0.3775888681411743,
-0.19144584238529205,
0.024531345814466476,
0.43831244111061096,
-0.0020621030125766993,
-0.17877259850502014,
-0.5383256673812866,
0.31127867102622986,
0.2034226506948471,
0.07330293953418732,
0.06086021289229393,
-0.07573039829730988,
-0.01638045720756054,
0.3021714985370636,
0.1250007152557373,
0.9838237762451172,
-0.02691991813480854,
0.1929827183485031,
0.50630784034729,
0.004840462934225798,
-0.24390368163585663,
-0.6487336754798889,
0.3692772090435028,
-0.33292150497436523,
-0.22415265440940857,
0.19311641156673431,
-0.10114186257123947,
-0.08476849645376205,
0.073533795773983,
-0.03934306278824806,
0.09914674609899521,
-0.04727573320269585,
-0.08625645935535431,
-0.2586022615432739,
0.38955432176589966,
0.31519457697868347,
-0.42784005403518677,
0.024883409962058067,
0.001350741251371801,
0.271456241607666,
-0.09871555119752884,
0.12781597673892975,
-0.16340002417564392,
-0.1108853816986084,
0.018441425636410713,
0.12517376244068146,
-0.07911400496959686,
-0.12837839126586914,
0.01305884774774313,
-0.048773329704999924,
-0.08731187880039215,
-0.23292511701583862,
-0.32441654801368713,
0.46041998267173767,
-0.029945844784379005,
0.09953469038009644,
0.081583671271801,
-0.09911026805639267,
0.07216382026672363,
-0.08676977455615997,
-0.49708321690559387,
0.22654052078723907,
0.08081196248531342,
-0.17367833852767944,
0.14937090873718262,
0.07872676849365234,
-0.3227708339691162,
-0.14609792828559875,
0.17442995309829712,
0.020576778799295425,
0.0075490353628993034,
-0.03673763945698738,
0.3179985284805298,
-0.26263749599456787,
-0.2335655391216278,
0.020059769973158836,
0.09207716584205627,
-0.4317528009414673,
0.5605180263519287,
-0.3023817241191864,
-0.3800688683986664,
-0.05465592443943024,
0.016695475205779076,
0.3058086335659027,
0.056038208305835724,
0.2623710334300995,
-0.0891200453042984,
-0.30488115549087524,
-0.1546768993139267,
-0.30242931842803955,
0.06128295511007309,
0.03862416744232178,
0.09388736635446548,
0.30242154002189636,
-0.006130733527243137,
0.025399265810847282,
-0.23266436159610748,
-0.3227173089981079,
-0.14176863431930542,
-0.3823906481266022,
0.11460041254758835,
-0.3576410114765167,
-0.18506810069084167,
0.2572275698184967,
0.38368457555770874,
0.036018408834934235,
0.23422428965568542,
-0.4448956251144409,
0.2590486705303192,
-0.21766982972621918,
-0.06533944606781006,
-0.031240707263350487,
0.2600192129611969,
-0.03270907327532768,
-0.25742706656455994,
0.17543961107730865,
0.21627074480056763,
0.11998891830444336,
0.14120365679264069,
0.03736565262079239,
-0.11179859936237335,
0.10294927656650543,
0.1834249496459961,
-0.11074750125408173,
0.16845054924488068,
0.08115518093109131,
-0.1483062207698822,
-0.3009878098964691,
-0.2652977406978607,
0.13436627388000488,
-0.11070363968610764,
-0.025854967534542084,
-0.13035929203033447,
-0.12170838564634323,
-0.11248856782913208,
0.3323756754398346,
0.27382513880729675,
0.20400471985340118,
0.28330788016319275,
-0.0734994113445282,
0.07670175284147263,
-0.24283291399478912,
-0.26539337635040283,
-0.05103801190853119,
0.19032369554042816,
0.061644669622182846,
0.08636713773012161,
-0.09186553955078125,
-0.17318761348724365,
-0.37994787096977234,
-0.038117554038763046,
0.03176838532090187,
0.44989216327667236,
0.04249455779790878,
-0.2883666753768921,
0.18529678881168365,
0.03793703019618988,
-0.27972111105918884,
-0.19527681171894073,
0.3624269962310791,
-0.4507017433643341,
0.20022889971733093,
0.40171751379966736,
0.26457515358924866,
0.16572430729866028,
-0.48327431082725525,
0.09376382827758789,
-0.23451673984527588,
0.09630513191223145,
-0.4337080121040344,
-0.0904514268040657,
0.3514752984046936,
-0.19489936530590057,
0.20412589609622955,
0.3052140772342682,
0.23111960291862488,
0.6089180111885071,
0.03142336755990982,
0.2752900719642639,
0.18787720799446106,
0.21332722902297974,
-0.32170307636260986,
-0.17983660101890564,
0.2906690835952759,
0.23226889967918396,
-0.03177434206008911,
-0.20784573256969452,
0.00909457542002201,
0.23473390936851501,
0.24403607845306396,
-0.516964316368103,
-0.2611277401447296,
0.16302168369293213,
-0.12202011793851852,
-0.12818151712417603,
0.41174861788749695,
0.056770890951156616,
-0.2780810296535492,
0.2270267903804779,
0.07766445726156235,
0.19237421452999115,
-0.12724758684635162,
0.20087450742721558,
0.2934531569480896,
0.22120140492916107,
-0.023113934323191643,
0.0910249873995781,
0.4337705373764038,
-0.33673936128616333,
-0.20791392028331757,
-0.011149626225233078,
-0.0027164847124367952,
0.023589259013533592,
-0.15122254192829132,
0.2809453010559082,
0.24482552707195282,
-0.05550317466259003,
0.2687216103076935,
-0.050441090017557144,
-0.008870884776115417,
0.04380457103252411,
-0.034400876611471176,
-0.10841280966997147,
-0.10039331018924713,
0.10061687231063843,
-0.0908767506480217,
-0.12853354215621948,
-0.12072346359491348,
-0.2426328808069229,
0.20261327922344208,
-0.18042470514774323,
0.0230691060423851,
0.3459421992301941,
-0.09754059463739395,
-0.3948054313659668,
0.09524179250001907,
-0.28330305218696594,
0.06918125599622726,
0.10627059638500214,
-0.3566013276576996,
-0.08913571387529373,
0.2603062689304352,
-0.001633998821489513,
-0.4257487952709198,
0.5468892455101013,
0.1724044531583786,
0.1286822259426117,
-0.3299420177936554,
-0.0014343556249514222,
-0.32078811526298523,
-0.03450939431786537,
-0.5890913009643555,
0.11263563483953476,
0.11768347769975662,
0.4403546452522278,
0.07392508536577225,
-0.0703551396727562,
0.40310826897621155,
-0.40797093510627747,
0.09924033284187317,
0.3735489249229431,
-0.1734420359134674,
-0.030622417107224464,
-0.4397854804992676,
-0.07384704053401947,
0.042283251881599426,
-0.3743230998516083,
0.28479641675949097,
-0.12820668518543243,
-0.014769596047699451,
0.19237110018730164,
-0.020268801599740982,
0.12265168130397797,
0.06268194317817688,
0.5298777222633362,
-0.09794456511735916,
0.000055181335483212024,
-0.09645427763462067,
0.008635740727186203,
-0.23218899965286255,
0.12195920199155807,
-0.20707820355892181,
0.008574522100389004,
-0.02188759483397007,
0.1733759194612503,
-0.2073739618062973,
-0.3919595181941986,
-0.18153439462184906,
0.4176577925682068,
0.31262972950935364,
-0.41869619488716125,
0.19802796840667725,
0.152659073472023,
-0.155827596783638,
0.47959375381469727,
0.15036313235759735,
0.22828395664691925,
0.14673328399658203,
-0.034050654619932175,
-0.3561272919178009,
-0.10542063415050507,
0.6236687898635864,
-0.18829402327537537,
-0.029361551627516747,
-0.34943896532058716,
0.254902184009552,
0.4437912702560425,
0.5510439872741699,
-0.26457640528678894,
0.08623872697353363,
0.12194323539733887,
0.053574010729789734,
-0.2103939801454544,
0.5777605772018433,
0.18686193227767944,
0.014771755784749985,
-0.07378310710191727,
-0.26480746269226074,
-0.06308902055025101,
-0.0029667862690985203,
-0.3532107174396515,
-0.28143104910850525
] |
https://github.com/huggingface/datasets/issues/2046
|
add_faisis_index gets very slow when doing it interatively
|
@lhoestq Thanks a lot for the help you have given to solve this issue. As per my experiments, IVF index suits well for my case and it is a lot faster. The use of this can make the entire RAG end-to-end trainable lot faster. So I will close this issue. Will do the final PR soon.
|
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
| 56
|
add_faisis_index gets very slow when doing it interatively
As the below code suggests, I want to run add_faisis_index in every nth interaction from the training loop. I have 7.2 million documents. Usually, it takes 2.5 hours (if I run an as a separate process similar to the script given in rag/use_own_knowleldge_dataset.py). Now, this takes usually 5hrs. Is this normal? Any way to make this process faster?
@lhoestq
```
def training_step(self, batch, batch_idx) -> Dict:
if (not batch_idx==0) and (batch_idx%5==0):
print("******************************************************")
ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance #this will be load in the CPU
model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff
list_of_gpus = ['cuda:2','cuda:3']
c_dir='/custom/cache/dir'
kb_dataset = load_dataset("csv", data_files=[self.custom_config.csv_path], split="train", delimiter="\t", column_names=["title", "text"],cache_dir=c_dir)
print(kb_dataset)
n=len(list_of_gpus) #nunber of dedicated GPUs
kb_list=[kb_dataset.shard(n, i, contiguous=True) for i in range(n)]
#kb_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/haha-dir')
print(self.trainer.global_rank)
dataset_shards = self.re_encode_kb(model_copy.to(device=list_of_gpus[self.trainer.global_rank]),kb_list[self.trainer.global_rank])
output = [None for _ in list_of_gpus]
#self.trainer.accelerator_connector.accelerator.barrier("embedding_process")
dist.all_gather_object(output, dataset_shards)
#This creation and re-initlaization of the new index
if (self.trainer.global_rank==0): #saving will be done in the main process
combined_dataset = concatenate_datasets(output)
passages_path =self.config.passages_path
logger.info("saving the dataset with ")
#combined_dataset.save_to_disk('/hpc/gsir059/MY-Test/RAY/transformers/examples/research_projects/rag/MY-Passage')
combined_dataset.save_to_disk(passages_path)
logger.info("Add faiss index to the dataset that consist of embeddings")
embedding_dataset=combined_dataset
index = faiss.IndexHNSWFlat(768, 128, faiss.METRIC_INNER_PRODUCT)
embedding_dataset.add_faiss_index("embeddings", custom_index=index)
embedding_dataset.get_index("embeddings").save(self.config.index_path)
@lhoestq Thanks a lot for the help you have given to solve this issue. As per my experiments, IVF index suits well for my case and it is a lot faster. The use of this can make the entire RAG end-to-end trainable lot faster. So I will close this issue. Will do the final PR soon.
|
[
-0.49882516264915466,
-0.26827844977378845,
-0.024500647559762,
0.1282288283109665,
0.05943915247917175,
0.20778384804725647,
0.12146306037902832,
0.42412909865379333,
0.291742742061615,
0.2924974858760834,
-0.11882596462965012,
0.188315287232399,
0.13721296191215515,
0.08582107722759247,
-0.13625605404376984,
0.17504271864891052,
0.23703299462795258,
0.08533414453268051,
0.2607974112033844,
-0.13441404700279236,
-0.32748016715049744,
-0.30906423926353455,
-0.15891285240650177,
-0.2578621208667755,
-0.40069231390953064,
-0.0958191454410553,
-0.24362172186374664,
-0.08205042779445648,
0.19824793934822083,
-0.47291648387908936,
-0.13753199577331543,
0.1398429572582245,
0.34025880694389343,
0.25829288363456726,
-0.00012204969971207902,
0.05567667633295059,
0.22800785303115845,
0.06546277552843094,
-0.22299717366695404,
0.6411961913108826,
0.3400721848011017,
-0.06948856264352798,
-0.1751103401184082,
-0.3107718527317047,
-0.14555537700653076,
-0.11104141920804977,
0.08107940107584,
-0.04693025350570679,
-0.1663648784160614,
0.19430120289325714,
0.026624172925949097,
-0.05828629806637764,
0.05225489288568497,
-0.015400421805679798,
0.40251225233078003,
-0.0755910724401474,
-0.06917734444141388,
0.3174716532230377,
0.16351284086704254,
-0.07223645597696304,
0.09974305331707001,
0.44810786843299866,
0.120641328394413,
-0.22677703201770782,
0.10890348255634308,
0.20516164600849152,
0.7838155627250671,
0.022439492866396904,
0.06526804715394974,
0.15266908705234528,
0.0153404101729393,
-0.09055348485708237,
-0.4430079758167267,
-0.10290209203958511,
0.42571401596069336,
-0.618060290813446,
-0.06740108132362366,
-0.08374133706092834,
-0.1014745682477951,
0.053860053420066833,
0.1745847463607788,
-0.03023025207221508,
0.03631783649325371,
0.04745028540492058,
0.17490026354789734,
0.1653580665588379,
0.3874707520008087,
-0.05990183725953102,
0.5584331750869751,
0.04244775325059891,
-0.11685464531183243,
0.04488201439380646,
-0.09207794815301895,
0.012196076102554798,
-0.6050311923027039,
0.08808470517396927,
-0.03091667965054512,
-0.09933095425367355,
-0.09268633276224136,
0.017801547423005104,
-0.369486540555954,
0.006166044622659683,
0.2365611046552658,
0.0033363329712301493,
-0.18306593596935272,
-0.09025747328996658,
-0.5061047077178955,
0.05588063597679138,
0.0839017927646637,
0.10628657042980194,
-0.3780882656574249,
0.0992341935634613,
-0.0033384810667485,
-0.004310553427785635,
-0.3259795606136322,
-0.29813456535339355,
-0.2288902997970581,
0.2228073924779892,
-0.1811421811580658,
0.07718756049871445,
-0.40396761894226074,
-0.25227686762809753,
0.20507250726222992,
0.41622263193130493,
-0.1177443340420723,
-0.07613808661699295,
0.010839538648724556,
-0.0346161313354969,
-0.23442824184894562,
0.17616769671440125,
-0.22201746702194214,
0.23066066205501556,
-0.03196385130286217,
0.5045983195304871,
-0.029106812551617622,
-0.22139428555965424,
-0.08906889706850052,
-0.021730387583374977,
0.08396376669406891,
-0.007842501625418663,
-0.044163525104522705,
-0.2998936176300049,
0.24666738510131836,
0.07492349296808243,
-0.2632139325141907,
-0.06768488138914108,
-0.09395243972539902,
0.12111043930053711,
-0.22782295942306519,
0.22150807082653046,
-0.21739515662193298,
-0.36510276794433594,
0.02715766429901123,
0.019331108778715134,
0.3086777627468109,
-0.06309196352958679,
0.4208211898803711,
0.11439678817987442,
0.17301812767982483,
0.16133496165275574,
0.15917611122131348,
-0.13144302368164062,
-0.2680220901966095,
0.08318619430065155,
0.22678479552268982,
0.36273834109306335,
0.09372176975011826,
0.03477165475487709,
0.29801318049430847,
0.39013007283210754,
0.2124062031507492,
0.39999398589134216,
-0.11594938486814499,
0.6762606501579285,
-0.3200046122074127,
0.0842917189002037,
0.24512167274951935,
-0.25537896156311035,
-0.2924267649650574,
0.18690502643585205,
-0.16636398434638977,
-0.07732699066400528,
0.3296641707420349,
0.5182709693908691,
0.3120293617248535,
0.0870155468583107,
0.34109240770339966,
0.306255578994751,
0.009027169086039066,
-0.031247030943632126,
-0.4050689935684204,
-0.05827190726995468,
0.2639197111129761,
0.3804077208042145,
-0.3354529142379761,
0.10174088925123215,
-0.040180955082178116,
-0.32988083362579346,
0.6009742617607117,
-0.47610604763031006,
-0.12176156044006348,
0.06805816292762756,
0.3615746796131134,
0.33938536047935486,
0.23287023603916168,
0.2761097848415375,
0.14954109489917755,
0.16262610256671906,
0.09601332247257233,
0.09878852963447571,
0.17015457153320312,
-0.4183504581451416,
0.21562930941581726,
-0.025750624015927315,
-0.21819405257701874,
0.10788168013095856,
-0.060978226363658905,
0.15002486109733582,
-0.0456758476793766,
-0.19987328350543976,
-0.15688666701316833,
0.5427843928337097,
-0.6157973408699036,
0.02794579230248928,
-0.24889647960662842,
-0.15608301758766174,
0.007014264818280935,
-0.21342624723911285,
-0.034243520349264145,
0.14295808970928192,
0.05249642953276634,
-0.3868671655654907,
-0.05383381247520447,
0.1028614491224289,
0.12662534415721893,
-0.18767660856246948,
0.5111070871353149,
-0.11369690299034119,
-0.03703640028834343,
0.2962217926979065,
0.044953539967536926,
-0.15126429498195648,
0.10901732742786407,
-0.19376131892204285,
-0.001878442708402872,
0.4852038323879242,
0.3487831652164459,
0.24583370983600616,
-0.021493786945939064,
-0.23320868611335754,
0.047029927372932434,
-0.040650516748428345,
-0.0793866366147995,
0.2275259643793106,
0.0799434557557106,
0.13025416433811188,
0.4091724455356598,
-0.03333542123436928,
-0.333244651556015,
0.23246285319328308,
0.18577763438224792,
-0.20312979817390442,
-0.43140751123428345,
0.2710413634777069,
0.3516988754272461,
-0.03689730539917946,
-0.3497079610824585,
-0.5220080614089966,
0.2360263615846634,
0.31859853863716125,
0.18839207291603088,
-0.07165347784757614,
-0.02765061892569065,
-0.24728116393089294,
0.1691095381975174,
0.056553300470113754,
-0.04837125912308693,
0.10004880279302597,
0.1766422837972641,
-0.21454474329948425,
-0.20678958296775818,
-0.25529661774635315,
-0.13639618456363678,
0.4286453127861023,
-0.044338617473840714,
0.3094404935836792,
0.1777622401714325,
0.27718648314476013,
-0.12472555786371231,
-0.12497524172067642,
0.28875258564949036,
0.008841033093631268,
0.04161049425601959,
-0.10893584042787552,
-0.03623782843351364,
0.19311049580574036,
-0.046948667615652084,
0.36491823196411133,
0.19579406082630157,
-0.32509127259254456,
0.01984449289739132,
-0.09847081452608109,
-0.12149550020694733,
-0.0789787694811821,
0.12100574374198914,
-0.15054965019226074,
0.11740070581436157,
0.04394659399986267,
-0.052580177783966064,
-0.18513722717761993,
-0.08627106249332428,
-0.1575879454612732,
-0.0794762670993805,
-0.29745039343833923,
-0.166235089302063,
-0.24606873095035553,
-0.1250382661819458,
-0.11964553594589233,
0.004331060219556093,
0.0005506000597961247,
-0.010688086971640587,
-0.04048744589090347,
-0.2826750874519348,
-0.1588369756937027,
0.06079479679465294,
-0.2936345934867859,
-0.21670210361480713,
-0.17391933500766754,
0.22814054787158966,
-0.0244003813713789,
0.09305927157402039,
-0.11566969007253647,
0.06675161421298981,
0.12224036455154419,
-0.09570088982582092,
-0.15432998538017273,
-0.05346102640032768,
-0.23314324021339417,
0.2917102873325348,
0.14917171001434326,
0.046830914914608,
-0.07943687587976456,
-0.41229644417762756,
-0.014396199956536293,
0.49690350890159607,
-0.5218707323074341,
-0.04079889878630638,
-0.3583913743495941,
0.2859601080417633,
-0.3150937557220459,
0.4582992196083069,
0.05670711398124695,
-0.24624811112880707,
-0.13801313936710358,
0.3644829988479614,
0.1745101511478424,
0.3875305652618408,
-0.061713509261608124,
0.0549771673977375,
-0.0879170224070549,
0.2675457298755646,
-0.11497589945793152,
0.5162416696548462,
0.32723188400268555,
-0.2136986255645752,
-0.04781858250498772,
-0.2623961865901947,
0.11595138162374496,
0.05277024209499359,
-0.13988201320171356,
0.29652485251426697,
0.08347855508327484,
-0.3149944543838501,
0.1665271818637848,
-0.2887454032897949,
-0.4117940366268158,
0.03204282000660896,
-0.05276046693325043,
0.19824540615081787,
-0.24431051313877106,
0.3169921636581421,
0.0489506833255291,
0.49109935760498047,
-0.17805087566375732,
0.2910947799682617,
-0.2383597493171692,
-0.1767042875289917,
0.19751496613025665,
0.2727537453174591,
0.2449004352092743,
-0.16755744814872742,
0.02649623341858387,
-0.5409102439880371,
-0.4216776490211487,
0.2834407389163971,
0.1674797385931015,
0.23528403043746948,
0.2791200578212738,
-0.10083381086587906,
0.5258057713508606,
-0.15621161460876465,
0.7999860644340515,
0.020683541893959045,
-0.3363373279571533,
0.3844906985759735,
-0.1618194878101349,
0.05287637189030647,
-0.21779318153858185,
-0.1827090084552765,
-0.0659896582365036,
0.23377461731433868,
0.4407466650009155,
-0.09317793697118759,
-0.24796512722969055,
0.6446048021316528,
0.06708817183971405,
-0.14724896848201752,
-0.3441525995731354,
-0.1861822009086609,
-0.35430601239204407,
-0.04121949523687363,
0.7678549289703369,
-0.12169075012207031,
0.15569071471691132,
0.1822197437286377,
-0.051234640181064606,
-0.38188865780830383,
0.15986618399620056,
0.23867441713809967,
-0.005120040848851204,
0.050583358854055405,
0.455783873796463,
0.4348106384277344,
0.07141595333814621,
0.0007325740880332887,
0.11927373707294464,
-0.03691220283508301,
-0.30439624190330505,
0.07315177470445633,
-0.18884620070457458,
-0.25568538904190063,
0.37994295358657837,
0.7006723880767822,
0.18687665462493896,
0.24840828776359558,
-0.21023093163967133,
0.3775888681411743,
-0.19144584238529205,
0.024531345814466476,
0.43831244111061096,
-0.0020621030125766993,
-0.17877259850502014,
-0.5383256673812866,
0.31127867102622986,
0.2034226506948471,
0.07330293953418732,
0.06086021289229393,
-0.07573039829730988,
-0.01638045720756054,
0.3021714985370636,
0.1250007152557373,
0.9838237762451172,
-0.02691991813480854,
0.1929827183485031,
0.50630784034729,
0.004840462934225798,
-0.24390368163585663,
-0.6487336754798889,
0.3692772090435028,
-0.33292150497436523,
-0.22415265440940857,
0.19311641156673431,
-0.10114186257123947,
-0.08476849645376205,
0.073533795773983,
-0.03934306278824806,
0.09914674609899521,
-0.04727573320269585,
-0.08625645935535431,
-0.2586022615432739,
0.38955432176589966,
0.31519457697868347,
-0.42784005403518677,
0.024883409962058067,
0.001350741251371801,
0.271456241607666,
-0.09871555119752884,
0.12781597673892975,
-0.16340002417564392,
-0.1108853816986084,
0.018441425636410713,
0.12517376244068146,
-0.07911400496959686,
-0.12837839126586914,
0.01305884774774313,
-0.048773329704999924,
-0.08731187880039215,
-0.23292511701583862,
-0.32441654801368713,
0.46041998267173767,
-0.029945844784379005,
0.09953469038009644,
0.081583671271801,
-0.09911026805639267,
0.07216382026672363,
-0.08676977455615997,
-0.49708321690559387,
0.22654052078723907,
0.08081196248531342,
-0.17367833852767944,
0.14937090873718262,
0.07872676849365234,
-0.3227708339691162,
-0.14609792828559875,
0.17442995309829712,
0.020576778799295425,
0.0075490353628993034,
-0.03673763945698738,
0.3179985284805298,
-0.26263749599456787,
-0.2335655391216278,
0.020059769973158836,
0.09207716584205627,
-0.4317528009414673,
0.5605180263519287,
-0.3023817241191864,
-0.3800688683986664,
-0.05465592443943024,
0.016695475205779076,
0.3058086335659027,
0.056038208305835724,
0.2623710334300995,
-0.0891200453042984,
-0.30488115549087524,
-0.1546768993139267,
-0.30242931842803955,
0.06128295511007309,
0.03862416744232178,
0.09388736635446548,
0.30242154002189636,
-0.006130733527243137,
0.025399265810847282,
-0.23266436159610748,
-0.3227173089981079,
-0.14176863431930542,
-0.3823906481266022,
0.11460041254758835,
-0.3576410114765167,
-0.18506810069084167,
0.2572275698184967,
0.38368457555770874,
0.036018408834934235,
0.23422428965568542,
-0.4448956251144409,
0.2590486705303192,
-0.21766982972621918,
-0.06533944606781006,
-0.031240707263350487,
0.2600192129611969,
-0.03270907327532768,
-0.25742706656455994,
0.17543961107730865,
0.21627074480056763,
0.11998891830444336,
0.14120365679264069,
0.03736565262079239,
-0.11179859936237335,
0.10294927656650543,
0.1834249496459961,
-0.11074750125408173,
0.16845054924488068,
0.08115518093109131,
-0.1483062207698822,
-0.3009878098964691,
-0.2652977406978607,
0.13436627388000488,
-0.11070363968610764,
-0.025854967534542084,
-0.13035929203033447,
-0.12170838564634323,
-0.11248856782913208,
0.3323756754398346,
0.27382513880729675,
0.20400471985340118,
0.28330788016319275,
-0.0734994113445282,
0.07670175284147263,
-0.24283291399478912,
-0.26539337635040283,
-0.05103801190853119,
0.19032369554042816,
0.061644669622182846,
0.08636713773012161,
-0.09186553955078125,
-0.17318761348724365,
-0.37994787096977234,
-0.038117554038763046,
0.03176838532090187,
0.44989216327667236,
0.04249455779790878,
-0.2883666753768921,
0.18529678881168365,
0.03793703019618988,
-0.27972111105918884,
-0.19527681171894073,
0.3624269962310791,
-0.4507017433643341,
0.20022889971733093,
0.40171751379966736,
0.26457515358924866,
0.16572430729866028,
-0.48327431082725525,
0.09376382827758789,
-0.23451673984527588,
0.09630513191223145,
-0.4337080121040344,
-0.0904514268040657,
0.3514752984046936,
-0.19489936530590057,
0.20412589609622955,
0.3052140772342682,
0.23111960291862488,
0.6089180111885071,
0.03142336755990982,
0.2752900719642639,
0.18787720799446106,
0.21332722902297974,
-0.32170307636260986,
-0.17983660101890564,
0.2906690835952759,
0.23226889967918396,
-0.03177434206008911,
-0.20784573256969452,
0.00909457542002201,
0.23473390936851501,
0.24403607845306396,
-0.516964316368103,
-0.2611277401447296,
0.16302168369293213,
-0.12202011793851852,
-0.12818151712417603,
0.41174861788749695,
0.056770890951156616,
-0.2780810296535492,
0.2270267903804779,
0.07766445726156235,
0.19237421452999115,
-0.12724758684635162,
0.20087450742721558,
0.2934531569480896,
0.22120140492916107,
-0.023113934323191643,
0.0910249873995781,
0.4337705373764038,
-0.33673936128616333,
-0.20791392028331757,
-0.011149626225233078,
-0.0027164847124367952,
0.023589259013533592,
-0.15122254192829132,
0.2809453010559082,
0.24482552707195282,
-0.05550317466259003,
0.2687216103076935,
-0.050441090017557144,
-0.008870884776115417,
0.04380457103252411,
-0.034400876611471176,
-0.10841280966997147,
-0.10039331018924713,
0.10061687231063843,
-0.0908767506480217,
-0.12853354215621948,
-0.12072346359491348,
-0.2426328808069229,
0.20261327922344208,
-0.18042470514774323,
0.0230691060423851,
0.3459421992301941,
-0.09754059463739395,
-0.3948054313659668,
0.09524179250001907,
-0.28330305218696594,
0.06918125599622726,
0.10627059638500214,
-0.3566013276576996,
-0.08913571387529373,
0.2603062689304352,
-0.001633998821489513,
-0.4257487952709198,
0.5468892455101013,
0.1724044531583786,
0.1286822259426117,
-0.3299420177936554,
-0.0014343556249514222,
-0.32078811526298523,
-0.03450939431786537,
-0.5890913009643555,
0.11263563483953476,
0.11768347769975662,
0.4403546452522278,
0.07392508536577225,
-0.0703551396727562,
0.40310826897621155,
-0.40797093510627747,
0.09924033284187317,
0.3735489249229431,
-0.1734420359134674,
-0.030622417107224464,
-0.4397854804992676,
-0.07384704053401947,
0.042283251881599426,
-0.3743230998516083,
0.28479641675949097,
-0.12820668518543243,
-0.014769596047699451,
0.19237110018730164,
-0.020268801599740982,
0.12265168130397797,
0.06268194317817688,
0.5298777222633362,
-0.09794456511735916,
0.000055181335483212024,
-0.09645427763462067,
0.008635740727186203,
-0.23218899965286255,
0.12195920199155807,
-0.20707820355892181,
0.008574522100389004,
-0.02188759483397007,
0.1733759194612503,
-0.2073739618062973,
-0.3919595181941986,
-0.18153439462184906,
0.4176577925682068,
0.31262972950935364,
-0.41869619488716125,
0.19802796840667725,
0.152659073472023,
-0.155827596783638,
0.47959375381469727,
0.15036313235759735,
0.22828395664691925,
0.14673328399658203,
-0.034050654619932175,
-0.3561272919178009,
-0.10542063415050507,
0.6236687898635864,
-0.18829402327537537,
-0.029361551627516747,
-0.34943896532058716,
0.254902184009552,
0.4437912702560425,
0.5510439872741699,
-0.26457640528678894,
0.08623872697353363,
0.12194323539733887,
0.053574010729789734,
-0.2103939801454544,
0.5777605772018433,
0.18686193227767944,
0.014771755784749985,
-0.07378310710191727,
-0.26480746269226074,
-0.06308902055025101,
-0.0029667862690985203,
-0.3532107174396515,
-0.28143104910850525
] |
https://github.com/huggingface/datasets/issues/2040
|
ValueError: datasets' indices [1] come from memory and datasets' indices [0] come from disk
|
Hi ! To help me understand the situation, can you print the values of `load_from_disk(PATH_DATA_CLS_A)['train']._indices_data_files` and `load_from_disk(PATH_DATA_CLS_B)['train']._indices_data_files` ?
They should both have a path to an arrow file
Also note that from #2025 concatenating datasets will no longer have such restrictions.
|
Hi there,
I am trying to concat two datasets that I've previously saved to disk via `save_to_disk()` like so (note that both are saved as `DataDict`, `PATH_DATA_CLS_*` are `Path`-objects):
```python
concatenate_datasets([load_from_disk(PATH_DATA_CLS_A)['train'], load_from_disk(PATH_DATA_CLS_B)['train']])
```
Yielding the following error:
```python
ValueError: Datasets' indices should ALL come from memory, or should ALL come from disk.
However datasets' indices [1] come from memory and datasets' indices [0] come from disk.
```
Been trying to solve this for quite some time now. Both `DataDict` have been created by reading in a `csv` via `load_dataset` and subsequently processed using the various `datasets` methods (i.e. filter, map, remove col, rename col). Can't figure out tho...
`load_from_disk(PATH_DATA_CLS_A)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 785
})
```
`load_from_disk(PATH_DATA_CLS_B)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 3341
})
```
| 41
|
ValueError: datasets' indices [1] come from memory and datasets' indices [0] come from disk
Hi there,
I am trying to concat two datasets that I've previously saved to disk via `save_to_disk()` like so (note that both are saved as `DataDict`, `PATH_DATA_CLS_*` are `Path`-objects):
```python
concatenate_datasets([load_from_disk(PATH_DATA_CLS_A)['train'], load_from_disk(PATH_DATA_CLS_B)['train']])
```
Yielding the following error:
```python
ValueError: Datasets' indices should ALL come from memory, or should ALL come from disk.
However datasets' indices [1] come from memory and datasets' indices [0] come from disk.
```
Been trying to solve this for quite some time now. Both `DataDict` have been created by reading in a `csv` via `load_dataset` and subsequently processed using the various `datasets` methods (i.e. filter, map, remove col, rename col). Can't figure out tho...
`load_from_disk(PATH_DATA_CLS_A)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 785
})
```
`load_from_disk(PATH_DATA_CLS_B)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 3341
})
```
Hi ! To help me understand the situation, can you print the values of `load_from_disk(PATH_DATA_CLS_A)['train']._indices_data_files` and `load_from_disk(PATH_DATA_CLS_B)['train']._indices_data_files` ?
They should both have a path to an arrow file
Also note that from #2025 concatenating datasets will no longer have such restrictions.
|
[
-0.011298185214400291,
-0.025898389518260956,
-0.04495958238840103,
0.5074434876441956,
0.17150245606899261,
0.18271653354167938,
0.05795517936348915,
0.12864747643470764,
-0.0628901794552803,
0.13362260162830353,
0.07037238776683807,
0.2955015003681183,
-0.08438028395175934,
-0.10250075161457062,
-0.32575705647468567,
-0.12389977276325226,
0.21246854960918427,
-0.04178490489721298,
-0.187417134642601,
-0.11637775599956512,
-0.4338988661766052,
0.3035927712917328,
-0.09412926435470581,
0.04413244128227234,
-0.37885013222694397,
-0.12164836376905441,
-0.3139137923717499,
0.3639656901359558,
-0.13143794238567352,
-0.14006397128105164,
0.38407593965530396,
-0.04349362850189209,
0.14314338564872742,
0.4993310570716858,
-0.0001239130215253681,
-0.051849085837602615,
-0.025516163557767868,
-0.12648966908454895,
-0.3373894989490509,
-0.37951043248176575,
-0.295440137386322,
-0.24935373663902283,
0.11748279631137848,
-0.3515416979789734,
0.37740662693977356,
-0.19620193541049957,
-0.10297530144453049,
-0.7265006899833679,
0.28095677495002747,
0.22954970598220825,
0.076197549700737,
0.1972944438457489,
0.1317077875137329,
-0.047893721610307693,
0.03191148117184639,
0.07358190417289734,
0.15371699631214142,
0.20296111702919006,
-0.055039308965206146,
0.023871643468737602,
0.19427014887332916,
-0.0005491418996825814,
-0.23284876346588135,
-0.11859450489282608,
0.13626234233379364,
0.4979307949542999,
0.055419422686100006,
-0.5291487574577332,
-0.06905731558799744,
0.08632079511880875,
0.4802343547344208,
-0.37638524174690247,
-0.3781004846096039,
-0.1759442389011383,
0.007004421204328537,
-0.32687145471572876,
0.10103002935647964,
0.35458487272262573,
0.00019479823822621256,
0.11180834472179413,
-0.06174974888563156,
-0.03423846513032913,
-0.29419010877609253,
0.0725950226187706,
-0.08510074764490128,
0.03586147353053093,
-0.08588497340679169,
0.17814113199710846,
0.44935327768325806,
0.04795133322477341,
0.32163962721824646,
-0.48691681027412415,
0.06369584798812866,
0.19227154552936554,
-0.10969579964876175,
0.14521828293800354,
-0.16400286555290222,
-0.5908127427101135,
0.0066751278936862946,
-0.01094976719468832,
0.1836385577917099,
-0.13482685387134552,
-0.1758415699005127,
0.3022012412548065,
0.25346899032592773,
0.3053898811340332,
-0.014132021926343441,
0.4288298487663269,
-0.010318362154066563,
-0.13304565846920013,
0.050137389451265335,
-0.025855230167508125,
-0.029356174170970917,
-0.4226582646369934,
0.07969038188457489,
-0.07181396335363388,
0.10622729361057281,
0.012951410375535488,
-0.3877179026603699,
0.18035584688186646,
-0.284007728099823,
-0.15731193125247955,
0.09716267138719559,
-0.017804767936468124,
0.07770619541406631,
0.3530086874961853,
0.38763418793678284,
0.3053703010082245,
0.08206703513860703,
0.29787757992744446,
-0.14463578164577484,
0.196732297539711,
0.07490722835063934,
0.08389774709939957,
0.1068451926112175,
0.001640327856875956,
0.011991241946816444,
0.10677319765090942,
0.07972873002290726,
-0.12207011878490448,
0.027196167036890984,
-0.34169328212738037,
0.2821953296661377,
0.15663717687129974,
0.09816352277994156,
0.3480808734893799,
0.2592438757419586,
-0.2748635411262512,
-0.18705587089061737,
0.3995109498500824,
-0.3576487898826599,
-0.18696920573711395,
-0.13763268291950226,
0.04947352036833763,
-0.10457122325897217,
0.1410064846277237,
-0.4229944348335266,
-0.005997790955007076,
0.30188924074172974,
0.30519622564315796,
-0.12901659309864044,
-0.05683048442006111,
-0.12961430847644806,
-0.4591293931007385,
0.34122756123542786,
0.0073846206068992615,
-0.458101749420166,
0.009723343886435032,
0.2903796136379242,
0.10488928854465485,
0.19656221568584442,
0.43085038661956787,
-0.14415860176086426,
0.36368316411972046,
-0.30450451374053955,
0.010236160829663277,
0.40045616030693054,
-0.4094220995903015,
-0.1038563996553421,
0.17169742286205292,
-0.17961205542087555,
-0.041092488914728165,
0.36450913548469543,
0.027035053819417953,
0.006306178867816925,
0.20940567553043365,
0.722061276435852,
0.24255938827991486,
0.07466603070497513,
-0.16574111580848694,
-0.09523821622133255,
-0.23260289430618286,
0.3555588126182556,
-0.20869404077529907,
-0.1339792162179947,
-0.02594766952097416,
-0.2588164508342743,
-0.5167704820632935,
0.4240078628063202,
-0.20520666241645813,
0.06406586617231369,
0.43642112612724304,
0.35688140988349915,
-0.12336675077676773,
-0.10384911298751831,
0.15376845002174377,
-0.19341741502285004,
0.16865921020507812,
-0.01483210176229477,
-0.2227095514535904,
-0.26475822925567627,
-0.02204885147511959,
-0.21069444715976715,
0.1269540637731552,
-0.07098086923360825,
0.08144472539424896,
-0.015374377369880676,
0.0325092114508152,
0.005666385870426893,
-0.1054479107260704,
-0.34818515181541443,
0.5563707947731018,
-0.16314569115638733,
0.021901726722717285,
-0.25417613983154297,
0.45693954825401306,
-0.15780574083328247,
-0.026390694081783295,
-0.04537157341837883,
0.03693285211920738,
0.2729869484901428,
0.1677788943052292,
0.022781262174248695,
0.471735417842865,
-0.04300643876194954,
0.09504587203264236,
0.08933920413255692,
0.08084455877542496,
0.1716281622648239,
0.005740229040384293,
0.16276152431964874,
-0.05793623626232147,
0.15583465993404388,
-0.172803595662117,
-0.09091826528310776,
0.48709240555763245,
-0.33448922634124756,
0.4485843777656555,
0.11464983969926834,
0.05127488076686859,
0.10623900592327118,
0.04397100955247879,
-0.07847476005554199,
-0.23693117499351501,
0.01692192815244198,
0.08496588468551636,
0.21922391653060913,
0.21704266965389252,
-0.3525524437427521,
0.07008197903633118,
0.18291273713111877,
0.0754997581243515,
-0.05896764621138573,
-0.010833715088665485,
-0.1080612763762474,
-0.01599758118391037,
-0.10950180143117905,
0.39029940962791443,
0.5840014815330505,
0.17195428907871246,
0.16498933732509613,
-0.1167299896478653,
-0.1371307224035263,
-0.17060486972332,
0.34178414940834045,
0.13983666896820068,
0.23641464114189148,
0.1728820502758026,
-0.08572586625814438,
-0.07561994343996048,
-0.07172995805740356,
-0.01753169298171997,
-0.1918955296278,
0.03288501873612404,
-0.5536919832229614,
-0.045889899134635925,
-0.2176482379436493,
-0.10989867895841599,
-0.4481920599937439,
-0.34603825211524963,
-0.097492516040802,
-0.5419754385948181,
-0.2592175006866455,
0.4547419548034668,
-0.11694511771202087,
-0.052783120423555374,
-0.2844991981983185,
0.14566171169281006,
0.005228814203292131,
0.06786228716373444,
0.12347450107336044,
0.010436899028718472,
-0.07831669598817825,
-0.03185243532061577,
-0.1368810534477234,
0.018003365024924278,
-0.013650457374751568,
-0.07263300567865372,
0.25631338357925415,
-0.25956106185913086,
0.06696441024541855,
-0.14675840735435486,
-0.1533607840538025,
0.08496042340993881,
0.032246511429548264,
0.31590673327445984,
-0.22814302146434784,
-0.6266655325889587,
0.05803680419921875,
0.5674744248390198,
-0.13896076381206512,
0.09005465358495712,
0.2620207965373993,
-0.18418610095977783,
0.0017385908868163824,
-0.2506849765777588,
-0.4523788392543793,
-0.25021126866340637,
0.02986290119588375,
-0.17470435798168182,
0.2491331696510315,
0.17127524316310883,
0.269670695066452,
0.1090816855430603,
0.35773637890815735,
0.19410113990306854,
-0.11353795230388641,
-0.25573116540908813,
0.44227275252342224,
-0.05362965911626816,
-0.16427744925022125,
0.0017763139912858605,
0.00887693464756012,
0.07541092485189438,
0.15045887231826782,
-0.3661915957927704,
0.01802557148039341,
-0.2361498922109604,
0.13633687794208527,
-0.11474905163049698,
0.3011991083621979,
0.13400161266326904,
0.45958438515663147,
-0.046278178691864014,
-0.2586541175842285,
-0.27372172474861145,
0.2683786451816559,
0.15892761945724487,
0.3044029772281647,
-0.012300741858780384,
0.20902304351329803,
0.0731702595949173,
0.3439157009124756,
0.364087849855423,
0.12173817306756973,
0.254983514547348,
0.1836441606283188,
0.5346705913543701,
0.014441220089793205,
-0.4406898617744446,
-0.4077027440071106,
-0.001152348006144166,
-0.20658676326274872,
-0.13948841392993927,
0.04839286580681801,
0.08723898977041245,
-0.09358714520931244,
0.21181122958660126,
-0.2357509583234787,
-0.3036767840385437,
0.09380210191011429,
-0.32118573784828186,
0.12500058114528656,
-0.21632638573646545,
-0.06795132160186768,
-0.2828485071659088,
0.31942301988601685,
-0.12861201167106628,
0.06002439931035042,
0.2188929170370102,
-0.13556748628616333,
-0.35723328590393066,
-0.3390062153339386,
-0.3777071237564087,
0.3049435317516327,
0.05438878387212753,
0.38311293721199036,
0.053990788757801056,
-0.2907813489437103,
-0.20166832208633423,
0.04494873806834221,
0.7679039239883423,
0.2945120334625244,
-0.3783249258995056,
0.4131019413471222,
0.06765423715114594,
-0.5299778580665588,
-0.038081519305706024,
0.08377497643232346,
0.24248214066028595,
-0.2675095498561859,
0.40230026841163635,
-0.24028800427913666,
-0.1255393922328949,
-0.11067929118871689,
0.44394606351852417,
-0.1429796814918518,
0.08497604727745056,
-0.031320612877607346,
-0.13031163811683655,
-0.15268561244010925,
-0.3208150565624237,
0.05422100052237511,
0.3823361396789551,
-0.369883269071579,
-0.0626261830329895,
-0.0008341622306033969,
-0.2915796637535095,
0.3242529630661011,
-0.35422244668006897,
0.6015852689743042,
-0.07030422240495682,
0.10906548798084259,
0.21684497594833374,
0.1730601191520691,
0.4914814233779907,
0.46707653999328613,
-0.24435147643089294,
-0.1175277903676033,
0.012657211162149906,
0.09110885113477707,
0.5109783411026001,
0.3323237895965576,
-0.22256046533584595,
-0.030194289982318878,
0.019420485943555832,
-0.09913145750761032,
-0.27408814430236816,
-0.11630464345216751,
0.29551199078559875,
-0.010528870858252048,
-0.42405372858047485,
-0.39912155270576477,
0.29000985622406006,
0.35836657881736755,
-0.1670624315738678,
0.44181907176971436,
0.008377369493246078,
-0.47298407554626465,
0.347017377614975,
-0.12129881978034973,
1.0756545066833496,
0.04043501615524292,
0.2828824520111084,
0.16257083415985107,
-0.29429441690444946,
0.09040173888206482,
0.29244962334632874,
-0.0318746492266655,
-0.198810413479805,
-0.1252887099981308,
-0.12034004181623459,
-0.34403738379478455,
0.0014607454650104046,
0.23216281831264496,
-0.3387202322483063,
0.17956185340881348,
-0.521016001701355,
-0.11619153618812561,
-0.2029716670513153,
0.047336120158433914,
-0.12718144059181213,
-0.2273615449666977,
-0.35341599583625793,
-0.02098642662167549,
0.21435105800628662,
-0.1160493940114975,
-0.01841728761792183,
-0.17292621731758118,
-0.5257234573364258,
-0.19647078216075897,
-0.12852638959884644,
0.040109019726514816,
-0.31982412934303284,
0.6732966303825378,
-0.2941887676715851,
-0.4334101378917694,
-0.4329431354999542,
0.3981282711029053,
0.40856248140335083,
-0.03190723434090614,
0.026282871142029762,
-0.12878833711147308,
0.047581300139427185,
0.008444433100521564,
-0.07515683025121689,
-0.2583675980567932,
0.1939772665500641,
0.14767417311668396,
-0.07459241151809692,
0.11354947835206985,
-0.08174102753400803,
-0.3694072663784027,
-0.08467909693717957,
0.10089945793151855,
0.033949192613363266,
-0.26735633611679077,
-0.3413459062576294,
0.17357689142227173,
-0.06460714340209961,
-0.06452669203281403,
0.02392655424773693,
0.36777248978614807,
-0.0626559630036354,
0.2074296921491623,
-0.2126588523387909,
-0.3376844525337219,
-0.056069616228342056,
0.4843718409538269,
0.31312668323516846,
-0.017800455912947655,
0.5047692060470581,
-0.03613313287496567,
-0.10059401392936707,
-0.02980305440723896,
0.36863812804222107,
0.24183018505573273,
0.10308800637722015,
0.34313252568244934,
0.08011888712644577,
0.0010809107916429639,
-0.18081015348434448,
0.3765241205692291,
0.39690887928009033,
0.23149505257606506,
-0.09989776462316513,
-0.2665150463581085,
-0.5434701442718506,
0.40343672037124634,
0.03675512596964836,
0.40782126784324646,
-0.028472522273659706,
-0.4364432990550995,
-0.09233981370925903,
-0.09556254744529724,
-0.19851373136043549,
0.0572785884141922,
-0.10688845813274384,
0.02028489299118519,
0.20471400022506714,
0.019871165975928307,
0.17789871990680695,
-0.013562463223934174,
0.05801117420196533,
-0.19841952621936798,
-0.06346264481544495,
-0.07825136929750443,
0.04765172302722931,
0.18544965982437134,
0.11219948530197144,
-0.07733242213726044,
-0.11239534616470337,
-0.4440910220146179,
0.0286650899797678,
-0.20247043669223785,
-0.17070794105529785,
0.5613832473754883,
0.06193811818957329,
0.11616793274879456,
0.000050532573368400335,
0.2100522518157959,
0.016175953671336174,
0.12694218754768372,
0.08198071271181107,
0.22381769120693207,
0.045878104865550995,
0.24382224678993225,
-0.3202710449695587,
-0.2187681794166565,
-0.31726881861686707,
0.05083521455526352,
-0.138719379901886,
-0.03353962302207947,
0.1269548386335373,
-0.14742088317871094,
-0.22267255187034607,
0.034095648676157,
0.39463841915130615,
0.4278351366519928,
-0.11750669777393341,
0.15835796296596527,
-0.028310490772128105,
0.08342529833316803,
0.12162771821022034,
-0.21428750455379486,
-0.13800965249538422,
-0.1968066394329071,
-0.20940275490283966,
0.14979733526706696,
0.06268186122179031,
-0.08211702853441238,
-0.3396141827106476,
0.02567158453166485,
0.5485678911209106,
-0.16061586141586304,
0.4001901149749756,
0.09322954714298248,
0.15086330473423004,
0.007785477675497532,
-0.008948166854679585,
0.24211548268795013,
0.42474764585494995,
-0.05856522545218468,
-0.21446505188941956,
0.09036586433649063,
0.48160913586616516,
-0.16097043454647064,
0.21622799336910248,
-0.23085567355155945,
-0.05462122708559036,
0.14992012083530426,
-0.1688855141401291,
-0.011008416302502155,
0.06248033046722412,
0.3620598614215851,
-0.3919821083545685,
-0.2237461656332016,
0.0981595367193222,
0.34357279539108276,
-0.12425727397203445,
-0.17062152922153473,
0.008810671046376228,
-0.2805437445640564,
0.036251507699489594,
-0.18015708029270172,
0.1347280740737915,
-0.35979166626930237,
0.19517773389816284,
-0.02740860916674137,
0.02882089838385582,
-0.11451707780361176,
0.3473951816558838,
0.4074496030807495,
0.10724388808012009,
-0.2372739613056183,
-0.010777201503515244,
0.1962233930826187,
-0.04700661450624466,
0.1492595672607422,
0.1895020455121994,
0.5935685038566589,
0.5518578886985779,
-0.03853512555360794,
0.12282852083444595,
0.08626460283994675,
-0.264749139547348,
0.0007327473722398281,
-0.026917049661278725,
-0.20133699476718903,
-0.3894885182380676,
0.4084107577800751,
0.1807917356491089,
0.009347163140773773,
0.06485667824745178,
0.2460973560810089,
0.5886142253875732,
-0.12202198058366776,
0.10538163781166077,
-0.16130603849887848,
-0.2382548451423645,
0.1525789499282837,
-0.08516212552785873,
-0.39698395133018494,
-0.2639613449573517,
0.441046804189682,
-0.07169952988624573,
0.1276208460330963,
0.2629283368587494,
0.038197144865989685,
0.04620642587542534,
0.2446826696395874,
0.29886701703071594,
0.12900161743164062,
-0.4679645895957947,
-0.01098667737096548,
-0.3217752277851105,
-0.2128877341747284,
0.3092114329338074,
0.17481817305088043,
-0.19013072550296783,
0.3667967617511749,
0.16394515335559845,
-0.01582353003323078,
0.24887964129447937,
0.08145201206207275,
-0.16058851778507233,
0.1002143919467926,
-0.4152262806892395,
-0.13939449191093445,
0.3665900230407715,
0.03964411839842796,
-0.05832965299487114,
-0.20681071281433105,
0.19096815586090088,
0.12402279675006866,
0.012798374518752098,
0.02918577939271927,
0.08276092261075974,
0.1202380433678627,
0.43338412046432495,
0.28985121846199036,
0.17493902146816254,
0.26081040501594543,
-0.12206411361694336,
0.022822687402367592,
0.018228812143206596,
-0.3067569136619568,
-0.04461589828133583,
0.18264994025230408,
-0.08782871812582016,
0.46091994643211365,
-0.5516219139099121,
0.04279125854372978,
-0.11697215586900711,
0.0292605459690094,
-0.002603034023195505,
-0.46894264221191406,
-0.06160181760787964,
0.066488116979599,
-0.007572703994810581,
-0.025279894471168518,
0.14318086206912994,
0.22226367890834808,
0.01591600850224495,
0.5831582546234131,
0.07047287374734879,
-0.44613829255104065,
0.40710562467575073,
0.020862657576799393,
-0.11254589259624481,
0.18593111634254456,
-0.008548125624656677,
0.3054593801498413,
0.4251759648323059,
-0.6048344969749451,
-0.1813078075647354,
0.42825642228126526,
-0.24838858842849731,
-0.26721182465553284,
0.009246950969099998,
-0.07833485305309296,
-0.029940711334347725,
0.015382754616439342,
0.4939103126525879,
-0.10249415040016174,
-0.35443809628486633,
-0.030217265710234642,
-0.2761019170284271
] |
https://github.com/huggingface/datasets/issues/2040
|
ValueError: datasets' indices [1] come from memory and datasets' indices [0] come from disk
|
Sure, thanks for the fast reply!
For dataset A: `[{'filename': 'drive/MyDrive/data_target_task/dataset_a/train/cache-4797266bf4db1eb7.arrow'}]`
For dataset B: `[]`
No clue why for B it returns nothing. `PATH_DATA_CLS_B` is exactly the same in `save_to_disk` and `load_from_disk`... Also I can verify that the folder physically exists under 'drive/MyDrive/data_target_task/dataset_b/'
|
Hi there,
I am trying to concat two datasets that I've previously saved to disk via `save_to_disk()` like so (note that both are saved as `DataDict`, `PATH_DATA_CLS_*` are `Path`-objects):
```python
concatenate_datasets([load_from_disk(PATH_DATA_CLS_A)['train'], load_from_disk(PATH_DATA_CLS_B)['train']])
```
Yielding the following error:
```python
ValueError: Datasets' indices should ALL come from memory, or should ALL come from disk.
However datasets' indices [1] come from memory and datasets' indices [0] come from disk.
```
Been trying to solve this for quite some time now. Both `DataDict` have been created by reading in a `csv` via `load_dataset` and subsequently processed using the various `datasets` methods (i.e. filter, map, remove col, rename col). Can't figure out tho...
`load_from_disk(PATH_DATA_CLS_A)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 785
})
```
`load_from_disk(PATH_DATA_CLS_B)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 3341
})
```
| 43
|
ValueError: datasets' indices [1] come from memory and datasets' indices [0] come from disk
Hi there,
I am trying to concat two datasets that I've previously saved to disk via `save_to_disk()` like so (note that both are saved as `DataDict`, `PATH_DATA_CLS_*` are `Path`-objects):
```python
concatenate_datasets([load_from_disk(PATH_DATA_CLS_A)['train'], load_from_disk(PATH_DATA_CLS_B)['train']])
```
Yielding the following error:
```python
ValueError: Datasets' indices should ALL come from memory, or should ALL come from disk.
However datasets' indices [1] come from memory and datasets' indices [0] come from disk.
```
Been trying to solve this for quite some time now. Both `DataDict` have been created by reading in a `csv` via `load_dataset` and subsequently processed using the various `datasets` methods (i.e. filter, map, remove col, rename col). Can't figure out tho...
`load_from_disk(PATH_DATA_CLS_A)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 785
})
```
`load_from_disk(PATH_DATA_CLS_B)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 3341
})
```
Sure, thanks for the fast reply!
For dataset A: `[{'filename': 'drive/MyDrive/data_target_task/dataset_a/train/cache-4797266bf4db1eb7.arrow'}]`
For dataset B: `[]`
No clue why for B it returns nothing. `PATH_DATA_CLS_B` is exactly the same in `save_to_disk` and `load_from_disk`... Also I can verify that the folder physically exists under 'drive/MyDrive/data_target_task/dataset_b/'
|
[
-0.007757899351418018,
-0.007316111121326685,
-0.018826734274625778,
0.5390494465827942,
0.22807486355304718,
0.18429188430309296,
0.05310777574777603,
0.13096602261066437,
-0.056439872831106186,
0.14849838614463806,
0.06288538873195648,
0.23425611853599548,
-0.03250493109226227,
-0.16660544276237488,
-0.32681235671043396,
-0.059766918420791626,
0.23270942270755768,
0.007199244573712349,
-0.07890740782022476,
-0.11945871263742447,
-0.42204180359840393,
0.2971968650817871,
-0.13872919976711273,
-0.05857858061790466,
-0.39545005559921265,
-0.06675492227077484,
-0.41160595417022705,
0.43868288397789,
-0.1577678620815277,
-0.10152718424797058,
0.5081794261932373,
-0.08628465235233307,
0.12243734300136566,
0.6370721459388733,
-0.00012261152733117342,
-0.03082004189491272,
-0.032480333000421524,
-0.2020161896944046,
-0.2702157497406006,
-0.45320016145706177,
-0.21123294532299042,
-0.23567475378513336,
-0.044794920831918716,
-0.3365788757801056,
0.26406580209732056,
-0.0735311508178711,
-0.11247438192367554,
-0.7267841696739197,
0.14958390593528748,
0.26157715916633606,
0.07585413753986359,
0.20239444077014923,
0.04125553369522095,
-0.011545790359377861,
-0.003459912957623601,
0.14291752874851227,
0.14699816703796387,
0.16674311459064484,
-0.09447656571865082,
-0.060664571821689606,
0.20734666287899017,
-0.07519938796758652,
-0.304254412651062,
0.013135689310729504,
0.11429545283317566,
0.47937247157096863,
-0.05994108319282532,
-0.43401914834976196,
-0.07816042006015778,
-0.022861404344439507,
0.46043288707733154,
-0.36957213282585144,
-0.37135323882102966,
-0.10616195201873779,
0.048390813171863556,
-0.28981611132621765,
0.13515228033065796,
0.38069257140159607,
-0.02663719840347767,
0.10822265595197678,
-0.21355843544006348,
0.009028465487062931,
-0.25283387303352356,
-0.043974146246910095,
-0.13084308803081512,
-0.051732439547777176,
-0.06891069561243057,
0.15275262296199799,
0.4263555705547333,
0.12468326091766357,
0.3369891345500946,
-0.5939996242523193,
0.024772459641098976,
0.21366705000400543,
-0.20358002185821533,
0.07589516043663025,
-0.023193616420030594,
-0.4214422106742859,
0.017854345962405205,
-0.0495421439409256,
0.21948282420635223,
-0.12944625318050385,
-0.15920883417129517,
0.26479312777519226,
0.1793375462293625,
0.4705994427204132,
-0.030680233612656593,
0.48141711950302124,
0.05611661076545715,
-0.12487120926380157,
-0.016485407948493958,
0.022042499855160713,
-0.010734318755567074,
-0.2809275686740875,
0.1725073605775833,
-0.03763463720679283,
0.05129377916455269,
0.01724596507847309,
-0.49026188254356384,
0.1722746342420578,
-0.26277902722358704,
-0.15794987976551056,
0.13755296170711517,
-0.03582184389233589,
0.024750929325819016,
0.3958354592323303,
0.3578869700431824,
0.3385946750640869,
0.07730739563703537,
0.3362589478492737,
-0.17574697732925415,
0.23792105913162231,
0.061455003917217255,
0.11290071159601212,
0.20487602055072784,
-0.026817990466952324,
-0.03242868557572365,
0.06690847873687744,
0.019686218351125717,
-0.06309400498867035,
0.007190023548901081,
-0.40556755661964417,
0.21164320409297943,
0.14684085547924042,
0.16558697819709778,
0.3385898172855377,
0.3134978413581848,
-0.34763196110725403,
-0.1363859325647354,
0.3720194697380066,
-0.39016973972320557,
-0.16249822080135345,
-0.06086660549044609,
0.06833628565073013,
-0.19907957315444946,
0.0822422057390213,
-0.46691015362739563,
0.005925833713263273,
0.28047314286231995,
0.3146549463272095,
-0.21051397919654846,
-0.03114979900419712,
-0.2271660417318344,
-0.44722306728363037,
0.3581005036830902,
0.041095174849033356,
-0.43936687707901,
0.03180966526269913,
0.2659567594528198,
0.11682657152414322,
0.21341927349567413,
0.46578508615493774,
-0.018320931121706963,
0.4720550775527954,
-0.33763593435287476,
-0.012589894235134125,
0.34188032150268555,
-0.4551290273666382,
-0.17263637483119965,
0.20685237646102905,
-0.17117580771446228,
-0.010899416171014309,
0.31009528040885925,
0.045018523931503296,
-0.012449085712432861,
0.23870190978050232,
0.7105059027671814,
0.3106862008571625,
-0.03680961951613426,
-0.05912020802497864,
-0.1282614916563034,
-0.17916738986968994,
0.3601858615875244,
-0.13051345944404602,
-0.07173917442560196,
0.12584659457206726,
-0.2418699711561203,
-0.43169766664505005,
0.35879918932914734,
-0.2525394558906555,
0.056376196444034576,
0.46342816948890686,
0.3992081880569458,
-0.15215203166007996,
-0.10933622717857361,
0.07024668902158737,
-0.17555977404117584,
0.24096624553203583,
0.03808009997010231,
-0.14114487171173096,
-0.28924328088760376,
0.04923665523529053,
-0.1995353102684021,
0.0720837190747261,
-0.10834242403507233,
0.030918791890144348,
0.01105468813329935,
0.19005025923252106,
0.020237499848008156,
-0.12869404256343842,
-0.24561358988285065,
0.6411560773849487,
-0.08214407414197922,
-0.012617221102118492,
-0.1710728406906128,
0.5629550814628601,
-0.22423319518566132,
-0.09496758878231049,
-0.07745282351970673,
-0.004757649265229702,
0.25222769379615784,
0.11733629554510117,
0.019237695261836052,
0.45813050866127014,
-0.02935146354138851,
0.06521061062812805,
0.16460108757019043,
-0.0015381410485133529,
0.15870332717895508,
0.09264000505208969,
0.16910743713378906,
-0.03223690763115883,
0.25783342123031616,
-0.23279258608818054,
-0.11629223078489304,
0.37022849917411804,
-0.3233281672000885,
0.40825167298316956,
0.12171976268291473,
-0.05177276208996773,
0.13635219633579254,
0.05886237695813179,
0.0029767530504614115,
-0.152910977602005,
0.09956149011850357,
0.1531846672296524,
0.2225981205701828,
0.21187326312065125,
-0.3046707510948181,
-0.012800310738384724,
0.2571278512477875,
0.0371885672211647,
0.005321257747709751,
0.015152102336287498,
-0.0527295246720314,
-0.13842512667179108,
-0.20079562067985535,
0.35415884852409363,
0.7381995320320129,
0.11672023683786392,
0.18367239832878113,
-0.061590056866407394,
-0.1565944105386734,
-0.1144135445356369,
0.29586997628211975,
0.13836617767810822,
0.1884911060333252,
0.2836693227291107,
0.005192570388317108,
-0.02685469016432762,
-0.13139067590236664,
0.005278825294226408,
-0.1450084149837494,
0.05497891083359718,
-0.5187075138092041,
-0.03542182967066765,
-0.19692222774028778,
-0.06886429339647293,
-0.3841027021408081,
-0.3000256419181824,
-0.09576498717069626,
-0.515573263168335,
-0.2982628643512726,
0.4832048714160919,
0.034070540219545364,
-0.1017179787158966,
-0.21684062480926514,
0.1896793693304062,
0.04251287132501602,
-0.06580273807048798,
0.0900253877043724,
-0.002025091554969549,
-0.11744609475135803,
-0.019323524087667465,
-0.18491216003894806,
-0.06447891145944595,
0.027213407680392265,
-0.17597945034503937,
0.2759290933609009,
-0.324674516916275,
0.07261520624160767,
-0.1426633894443512,
-0.2029571831226349,
0.17345531284809113,
0.07797779887914658,
0.28038668632507324,
-0.20353274047374725,
-0.5924386382102966,
0.14572370052337646,
0.5013505220413208,
-0.18691881000995636,
0.1658063381910324,
0.2946096658706665,
-0.2110975831747055,
-0.07000245898962021,
-0.21698901057243347,
-0.38744452595710754,
-0.26157674193382263,
-0.078375905752182,
-0.19658048450946808,
0.175165593624115,
0.09260713309049606,
0.1931915581226349,
0.1270972341299057,
0.36306172609329224,
0.16439658403396606,
-0.153737410902977,
-0.3676391839981079,
0.44455528259277344,
0.005461390130221844,
-0.18836906552314758,
-0.029849372804164886,
0.007580324541777372,
0.11898128688335419,
0.17033672332763672,
-0.37106719613075256,
-0.020950185135006905,
-0.2660010755062103,
0.1324577033519745,
-0.09867550432682037,
0.3205014169216156,
0.14834089577198029,
0.37022462487220764,
-0.027900468558073044,
-0.27776241302490234,
-0.3389342427253723,
0.18721126019954681,
0.24472960829734802,
0.3925763666629791,
-0.08071093261241913,
0.274260938167572,
0.1444835662841797,
0.32118597626686096,
0.318656325340271,
0.07069820910692215,
0.36181965470314026,
0.2049417346715927,
0.5604650378227234,
-0.04103364422917366,
-0.5407705307006836,
-0.302129864692688,
-0.05445021018385887,
-0.27458566427230835,
-0.04566313698887825,
0.03951635584235191,
0.025485806167125702,
-0.17167779803276062,
0.13947853446006775,
-0.20764724910259247,
-0.21673105657100677,
0.04676109924912453,
-0.265744686126709,
0.1350407749414444,
-0.16394111514091492,
-0.040994636714458466,
-0.2967512607574463,
0.2964038848876953,
-0.16156451404094696,
0.1278747171163559,
0.21454952657222748,
-0.07782697677612305,
-0.3957502245903015,
-0.344740629196167,
-0.41164126992225647,
0.3273955285549164,
0.11218084394931793,
0.3608626127243042,
0.05352703109383583,
-0.24763965606689453,
-0.2672664225101471,
0.00018966090283356607,
0.8296083211898804,
0.2859654724597931,
-0.350490540266037,
0.4240778386592865,
-0.005201022606343031,
-0.48690980672836304,
-0.0699320062994957,
0.06518923491239548,
0.19532738626003265,
-0.3118854761123657,
0.43599945306777954,
-0.22135457396507263,
-0.02148304134607315,
-0.1237545758485794,
0.5002303123474121,
-0.13253244757652283,
0.029592232778668404,
-0.15339407324790955,
-0.21133330464363098,
-0.10274254530668259,
-0.2540699541568756,
-0.013713671825826168,
0.4512712359428406,
-0.32782989740371704,
-0.014841362833976746,
0.014013731852173805,
-0.2825429439544678,
0.35526713728904724,
-0.37860190868377686,
0.5898550152778625,
-0.08378372341394424,
0.14618529379367828,
0.08388987928628922,
0.1358465850353241,
0.3902837932109833,
0.4980367422103882,
-0.2678964138031006,
-0.08986290544271469,
0.05806705355644226,
0.04524369165301323,
0.46926969289779663,
0.23178313672542572,
-0.20595580339431763,
-0.13645794987678528,
-0.09805309772491455,
-0.08072929084300995,
-0.34476301074028015,
-0.04826893284916878,
0.3455125093460083,
0.046646419912576675,
-0.3898499310016632,
-0.3483807444572449,
0.2334391474723816,
0.31307846307754517,
-0.10071997344493866,
0.33568015694618225,
0.006423665210604668,
-0.4863876700401306,
0.3060380816459656,
-0.16928160190582275,
0.9695219993591309,
0.06907094269990921,
0.2858230173587799,
0.20723070204257965,
-0.21423184871673584,
0.061459191143512726,
0.2536989152431488,
0.08112706989049911,
-0.1540396511554718,
-0.2758871018886566,
-0.1287536919116974,
-0.3111581802368164,
0.03978801146149635,
0.2840384840965271,
-0.36297765374183655,
0.3248750567436218,
-0.4089418649673462,
-0.12133578956127167,
-0.11997950822114944,
0.056753966957330704,
-0.11757183074951172,
-0.16752387583255768,
-0.35345369577407837,
0.0193216260522604,
0.17323638498783112,
0.01138880755752325,
-0.009167805314064026,
-0.041998688131570816,
-0.49830684065818787,
-0.21196427941322327,
-0.12966270744800568,
0.12950469553470612,
-0.27221858501434326,
0.6612737774848938,
-0.36077186465263367,
-0.40872126817703247,
-0.4596439599990845,
0.35345458984375,
0.4468974173069,
-0.04067690297961235,
0.020379874855279922,
-0.09411829710006714,
-0.004009798169136047,
0.1347249299287796,
0.014860458672046661,
-0.29535117745399475,
0.19343824684619904,
0.16358566284179688,
-0.05870548263192177,
-0.06354159116744995,
-0.07265709340572357,
-0.34421223402023315,
-0.09352635592222214,
0.059161920100450516,
-0.0022290300112217665,
-0.207368403673172,
-0.36238259077072144,
0.17808419466018677,
0.029074301943182945,
-0.06666144728660583,
0.02570210210978985,
0.339350163936615,
-0.05074566975235939,
0.3158528506755829,
-0.3541823625564575,
-0.3773808777332306,
-0.07397104054689407,
0.531265139579773,
0.22425876557826996,
-0.05627361685037613,
0.41269490122795105,
-0.07747489213943481,
-0.12033351510763168,
-0.0022459907922893763,
0.3146802484989166,
0.15221555531024933,
0.2107282131910324,
0.38436490297317505,
-0.018637094646692276,
-0.0036369813606142998,
-0.096906378865242,
0.3600206971168518,
0.354828417301178,
0.18591734766960144,
-0.08421366661787033,
-0.2710147202014923,
-0.49225369095802307,
0.36821791529655457,
0.10366138070821762,
0.33790287375450134,
0.043843965977430344,
-0.3522382378578186,
0.050822097808122635,
-0.1391105353832245,
-0.19266751408576965,
0.012873954139649868,
-0.2097504734992981,
0.04218105971813202,
0.2238103747367859,
-0.01657564379274845,
0.18556874990463257,
0.044821612536907196,
0.07286575436592102,
-0.18601937592029572,
-0.005238734185695648,
-0.08832792192697525,
0.09312556684017181,
0.18739274144172668,
0.1110861599445343,
0.011903892271220684,
-0.005746795330196619,
-0.46616941690444946,
0.02589219994843006,
-0.24653111398220062,
-0.09445338696241379,
0.5793566107749939,
0.017572486773133278,
0.1690882444381714,
-0.01962711475789547,
0.21369563043117523,
0.06169810891151428,
0.0763888731598854,
-0.0025382523890584707,
0.12159091979265213,
0.003670457983389497,
0.23053929209709167,
-0.23932184278964996,
-0.15879273414611816,
-0.3834444582462311,
-0.02336823008954525,
-0.11168177425861359,
0.009815670549869537,
0.2292734533548355,
-0.15041381120681763,
-0.14842499792575836,
-0.0124739995226264,
0.372840940952301,
0.3538382947444916,
-0.15880532562732697,
0.13642413914203644,
-0.07169177383184433,
0.08650864660739899,
0.04926011711359024,
-0.29046058654785156,
-0.19477994740009308,
-0.2292594611644745,
-0.2107815444469452,
0.13813889026641846,
-0.008869437500834465,
-0.014930964447557926,
-0.401789128780365,
-0.010098855942487717,
0.7563075423240662,
-0.14199374616146088,
0.279563307762146,
0.04618116840720177,
0.09027837961912155,
0.05057011917233467,
0.032694607973098755,
0.14083614945411682,
0.3030175566673279,
0.06406263262033463,
-0.1083734929561615,
0.16765500605106354,
0.3823309540748596,
-0.12802951037883759,
0.26090580224990845,
-0.17992627620697021,
-0.008866644464433193,
0.11204962432384491,
-0.1318468302488327,
-0.02754167839884758,
0.05118938907980919,
0.1771026998758316,
-0.5174014568328857,
-0.14643439650535583,
0.00799571629613638,
0.30081406235694885,
-0.1359507292509079,
-0.1351805031299591,
0.07498566061258316,
-0.27329641580581665,
0.04895629361271858,
-0.14381787180900574,
0.11961977183818817,
-0.29698875546455383,
0.15138700604438782,
-0.054495178163051605,
-0.04239221662282944,
-0.04714815691113472,
0.26941120624542236,
0.3872379958629608,
0.059957362711429596,
-0.2542601525783539,
0.009973914362490177,
0.21140848100185394,
-0.054467808455228806,
0.13912370800971985,
0.27135196328163147,
0.5723224878311157,
0.5754200220108032,
0.022432683035731316,
0.08439693599939346,
0.04272235557436943,
-0.28399643301963806,
-0.04375741630792618,
0.0650862604379654,
-0.33341261744499207,
-0.37430742383003235,
0.33299845457077026,
0.19228865206241608,
0.014277012087404728,
0.06683559715747833,
0.216083362698555,
0.5071809887886047,
-0.2229146957397461,
0.23553617298603058,
-0.1977868229150772,
-0.2077820599079132,
0.1037060096859932,
0.013859853148460388,
-0.382393479347229,
-0.2068965584039688,
0.343218058347702,
-0.010047608986496925,
0.1653653383255005,
0.19606927037239075,
0.045161016285419464,
0.061803434044122696,
0.19468936324119568,
0.2713277041912079,
0.008570867590606213,
-0.4885704517364502,
-0.014843001961708069,
-0.4134444296360016,
-0.17253172397613525,
0.37903207540512085,
0.19482119381427765,
-0.2688855528831482,
0.4094078242778778,
0.13882136344909668,
-0.06945820152759552,
0.16298723220825195,
0.16212035715579987,
-0.16252264380455017,
0.05186615511775017,
-0.43638163805007935,
-0.19063493609428406,
0.20932550728321075,
-0.033197127282619476,
-0.06536256521940231,
-0.3189268112182617,
0.1869724541902542,
0.16553647816181183,
0.040678128600120544,
-0.008567040786147118,
0.08489884436130524,
0.17786478996276855,
0.4394778609275818,
0.22910071909427643,
0.19874908030033112,
0.33515119552612305,
-0.12798045575618744,
-0.007992972619831562,
-0.018060505390167236,
-0.2785056531429291,
-0.09732334315776825,
0.09447666257619858,
-0.12414777278900146,
0.4446907341480255,
-0.5122813582420349,
0.09189002215862274,
-0.15928171575069427,
0.015488304197788239,
0.07139767706394196,
-0.3703906834125519,
-0.14539951086044312,
0.039693962782621384,
-0.03676872327923775,
0.012751751579344273,
0.15862539410591125,
0.22623321413993835,
0.04521770030260086,
0.5562222003936768,
0.017278805375099182,
-0.44418537616729736,
0.36792659759521484,
0.11316193640232086,
-0.16324183344841003,
0.09266559779644012,
-0.05418328568339348,
0.17214837670326233,
0.3824463486671448,
-0.5713042616844177,
-0.18409794569015503,
0.4492429196834564,
-0.21794283390045166,
-0.32804086804389954,
0.07558534294366837,
-0.10196290165185928,
0.046200502663850784,
-0.007967810146510601,
0.35824358463287354,
-0.13225057721138,
-0.3258386254310608,
0.055365730077028275,
-0.18720698356628418
] |
https://github.com/huggingface/datasets/issues/2040
|
ValueError: datasets' indices [1] come from memory and datasets' indices [0] come from disk
|
In the next release you'll be able to concatenate any kinds of dataset (either from memory or from disk).
For now I'd suggest you to flatten the indices of the A and B datasets. This will remove the indices mapping and you will be able to concatenate them. You can flatten the indices with
```python
dataset = dataset.flatten_indices()
```
|
Hi there,
I am trying to concat two datasets that I've previously saved to disk via `save_to_disk()` like so (note that both are saved as `DataDict`, `PATH_DATA_CLS_*` are `Path`-objects):
```python
concatenate_datasets([load_from_disk(PATH_DATA_CLS_A)['train'], load_from_disk(PATH_DATA_CLS_B)['train']])
```
Yielding the following error:
```python
ValueError: Datasets' indices should ALL come from memory, or should ALL come from disk.
However datasets' indices [1] come from memory and datasets' indices [0] come from disk.
```
Been trying to solve this for quite some time now. Both `DataDict` have been created by reading in a `csv` via `load_dataset` and subsequently processed using the various `datasets` methods (i.e. filter, map, remove col, rename col). Can't figure out tho...
`load_from_disk(PATH_DATA_CLS_A)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 785
})
```
`load_from_disk(PATH_DATA_CLS_B)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 3341
})
```
| 59
|
ValueError: datasets' indices [1] come from memory and datasets' indices [0] come from disk
Hi there,
I am trying to concat two datasets that I've previously saved to disk via `save_to_disk()` like so (note that both are saved as `DataDict`, `PATH_DATA_CLS_*` are `Path`-objects):
```python
concatenate_datasets([load_from_disk(PATH_DATA_CLS_A)['train'], load_from_disk(PATH_DATA_CLS_B)['train']])
```
Yielding the following error:
```python
ValueError: Datasets' indices should ALL come from memory, or should ALL come from disk.
However datasets' indices [1] come from memory and datasets' indices [0] come from disk.
```
Been trying to solve this for quite some time now. Both `DataDict` have been created by reading in a `csv` via `load_dataset` and subsequently processed using the various `datasets` methods (i.e. filter, map, remove col, rename col). Can't figure out tho...
`load_from_disk(PATH_DATA_CLS_A)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 785
})
```
`load_from_disk(PATH_DATA_CLS_B)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 3341
})
```
In the next release you'll be able to concatenate any kinds of dataset (either from memory or from disk).
For now I'd suggest you to flatten the indices of the A and B datasets. This will remove the indices mapping and you will be able to concatenate them. You can flatten the indices with
```python
dataset = dataset.flatten_indices()
```
|
[
-0.09038569033145905,
-0.08030948787927628,
-0.021714918315410614,
0.42966169118881226,
0.21228963136672974,
0.2667311728000641,
0.040716156363487244,
0.17951589822769165,
-0.07189257442951202,
0.17469537258148193,
-0.000992564600892365,
0.199558824300766,
-0.08817717432975769,
-0.03269233554601669,
-0.34390535950660706,
-0.055838681757450104,
0.1930520236492157,
0.018710315227508545,
-0.10415835678577423,
0.009861641563475132,
-0.44423508644104004,
0.24365177750587463,
-0.15522095561027527,
-0.03592897579073906,
-0.31147295236587524,
-0.06474181264638901,
-0.3580111265182495,
0.34184253215789795,
-0.11531132459640503,
-0.12061247229576111,
0.5508391261100769,
-0.04775400459766388,
0.08698639273643494,
0.5565169453620911,
-0.00011674216511892155,
-0.005871041212230921,
-0.039812225848436356,
-0.15968386828899384,
-0.24129758775234222,
-0.4698684513568878,
-0.2993321418762207,
-0.24015654623508453,
-0.02135574072599411,
-0.296869158744812,
0.20866210758686066,
-0.1860082596540451,
-0.10971908271312714,
-0.7185211181640625,
0.23581495881080627,
0.21942386031150818,
0.1316162645816803,
0.16060610115528107,
0.15903334319591522,
-0.05372249335050583,
0.006095328833907843,
0.06041402742266655,
0.17726095020771027,
0.17952096462249756,
-0.12992748618125916,
-0.03586224094033241,
0.26427629590034485,
-0.006864891387522221,
-0.38686293363571167,
-0.05422024801373482,
0.133734792470932,
0.4457712471485138,
0.09421086311340332,
-0.4561157822608948,
-0.14772586524486542,
0.07523047924041748,
0.4200160801410675,
-0.32629600167274475,
-0.32722219824790955,
-0.09136532247066498,
0.0971420556306839,
-0.38585689663887024,
0.11834488809108734,
0.36938104033470154,
0.06398223340511322,
0.1274227499961853,
-0.21282975375652313,
-0.08891429007053375,
-0.18957877159118652,
0.006588537245988846,
-0.11501043289899826,
0.021890928968787193,
-0.02109508588910103,
0.16465745866298676,
0.5099676251411438,
-0.03251253440976143,
0.41557061672210693,
-0.5363284349441528,
0.047603100538253784,
0.18976743519306183,
-0.1991218626499176,
0.03599018231034279,
-0.08571245521306992,
-0.5460637807846069,
0.07068650424480438,
-0.1810741424560547,
0.11627420783042908,
-0.11603833734989166,
-0.1602853387594223,
0.3259340226650238,
0.1867983639240265,
0.4233541488647461,
0.045959070324897766,
0.5026441812515259,
0.034294452518224716,
-0.08021748811006546,
0.06442856788635254,
0.052405811846256256,
0.07192734628915787,
-0.36686238646507263,
0.09573595970869064,
0.015341885387897491,
0.11431583762168884,
0.000816309591755271,
-0.42452168464660645,
0.1277351677417755,
-0.28553247451782227,
-0.08480819314718246,
0.05695987492799759,
-0.07957456260919571,
0.04663611575961113,
0.3995065987110138,
0.3896423578262329,
0.31326770782470703,
0.07838325947523117,
0.250409334897995,
-0.17763866484165192,
0.176718071103096,
0.14200033247470856,
0.12403184920549393,
0.15263383090496063,
-0.06398841738700867,
-0.08171673119068146,
0.1919679045677185,
-0.0037852590903639793,
0.014206704683601856,
0.02268579974770546,
-0.3594818413257599,
0.19063259661197662,
0.16511298716068268,
0.10700398683547974,
0.26703760027885437,
0.3068106472492218,
-0.35123664140701294,
-0.18481601774692535,
0.39935678243637085,
-0.40193653106689453,
-0.16006813943386078,
-0.14834271371364594,
0.11776876449584961,
-0.11065284162759781,
0.09295257925987244,
-0.43059372901916504,
0.10366418957710266,
0.2892504930496216,
0.22144128382205963,
-0.2550337612628937,
-0.10515618324279785,
-0.2563728392124176,
-0.38794586062431335,
0.30739539861679077,
-0.05010928213596344,
-0.4317595660686493,
-0.008514230139553547,
0.26731598377227783,
0.10990412533283234,
0.2351318597793579,
0.46620234847068787,
-0.07820975035429001,
0.3340342938899994,
-0.2627853751182556,
-0.09793032705783844,
0.1698983907699585,
-0.33203125,
-0.19882148504257202,
0.1342199742794037,
-0.15351365506649017,
0.03503170236945152,
0.19879387319087982,
0.04357650876045227,
0.028519833460450172,
0.24981579184532166,
0.7739884853363037,
0.31666097044944763,
-0.0380965955555439,
-0.1191873550415039,
-0.15316146612167358,
-0.2666219472885132,
0.46612662076950073,
-0.13150089979171753,
-0.14166410267353058,
0.09884942322969437,
-0.37251582741737366,
-0.397575318813324,
0.34727534651756287,
-0.28328239917755127,
0.0636296421289444,
0.42132899165153503,
0.3263693153858185,
-0.18171632289886475,
-0.1018901988863945,
0.024623071774840355,
-0.20542873442173004,
0.18950383365154266,
-0.033567558974027634,
-0.10182084143161774,
-0.22666244208812714,
-0.05870022997260094,
-0.16730192303657532,
0.0187403354793787,
-0.05389803647994995,
0.14129839837551117,
0.03920303285121918,
0.01416856236755848,
-0.07188281416893005,
-0.10226117074489594,
-0.2673945128917694,
0.5654738545417786,
-0.09033314138650894,
0.03830251842737198,
-0.25484710931777954,
0.4797326624393463,
-0.16872447729110718,
-0.042346060276031494,
-0.02578958496451378,
-0.007186277769505978,
0.24996645748615265,
0.09860996901988983,
-0.006041235290467739,
0.4919348955154419,
-0.09367290884256363,
0.011919597163796425,
0.07791706174612045,
0.01591930165886879,
0.22719334065914154,
0.017849821597337723,
0.07698461413383484,
0.00562201626598835,
0.12916572391986847,
-0.18703381717205048,
-0.07958012819290161,
0.4245120882987976,
-0.36679789423942566,
0.3369196057319641,
0.031463731080293655,
0.08698903024196625,
0.21492190659046173,
-0.02004413865506649,
-0.03275192156434059,
-0.2353002429008484,
0.018013030290603638,
0.007793659809976816,
0.05984703078866005,
0.1597391664981842,
-0.32710543274879456,
-0.05025682970881462,
0.137006938457489,
0.04359240084886551,
-0.008159556426107883,
0.04763520509004593,
-0.07929927855730057,
-0.0775589868426323,
-0.1422456055879593,
0.2626613676548004,
0.5957345962524414,
0.20514076948165894,
0.09334062039852142,
0.030132591724395752,
-0.15620435774326324,
-0.046284474432468414,
0.31240686774253845,
0.12121699005365372,
0.19402767717838287,
0.2194419801235199,
-0.013892161659896374,
-0.02266431599855423,
-0.07246413081884384,
0.0575232207775116,
-0.11339602619409561,
0.11805280297994614,
-0.5014935731887817,
-0.09627198427915573,
-0.3015746474266052,
-0.10217288136482239,
-0.3828297555446625,
-0.30046823620796204,
-0.19739636778831482,
-0.4838753342628479,
-0.2615424394607544,
0.45866721868515015,
-0.05902332812547684,
0.03820715472102165,
-0.12701734900474548,
0.16831272840499878,
0.07200554758310318,
0.026538878679275513,
0.15589044988155365,
-0.021673012524843216,
-0.05831918120384216,
0.04449952021241188,
-0.07785742729902267,
-0.062245626002550125,
0.05911126360297203,
-0.12175055593252182,
0.2177443504333496,
-0.24102017283439636,
0.03858625888824463,
-0.15009552240371704,
-0.18275701999664307,
0.09934313595294952,
0.09694728255271912,
0.29070165753364563,
-0.26632559299468994,
-0.5855753421783447,
0.12328506261110306,
0.5215250849723816,
-0.12665800750255585,
0.17300494015216827,
0.26260238885879517,
-0.1829807311296463,
-0.07983183115720749,
-0.22379541397094727,
-0.36807745695114136,
-0.23714347183704376,
-0.0798085555434227,
-0.25926288962364197,
0.24727313220500946,
0.09903115779161453,
0.26494988799095154,
0.08202368021011353,
0.3654107451438904,
0.10077393054962158,
-0.14460457861423492,
-0.28783655166625977,
0.3886060416698456,
-0.00844128243625164,
-0.1790604591369629,
0.006531348451972008,
-0.00500477384775877,
0.08627477288246155,
0.1664549559354782,
-0.3701836168766022,
-0.009543018415570259,
-0.18042798340320587,
0.09635385870933533,
-0.13262292742729187,
0.28781938552856445,
0.11168000847101212,
0.4846869111061096,
-0.0532258003950119,
-0.13801385462284088,
-0.31442123651504517,
0.15589627623558044,
0.19220541417598724,
0.38164836168289185,
-0.04301348328590393,
0.2722986936569214,
0.06883176416158676,
0.25135448575019836,
0.34749096632003784,
0.1060318574309349,
0.22027060389518738,
0.2680479884147644,
0.46714383363723755,
-0.06796782463788986,
-0.5600996017456055,
-0.39604905247688293,
-0.020785799250006676,
-0.20792628824710846,
-0.09207964688539505,
-0.03029942326247692,
0.004605697467923164,
-0.14374743402004242,
0.15224914252758026,
-0.10510403662919998,
-0.23451237380504608,
0.08896033465862274,
-0.2979525029659271,
0.1742403358221054,
-0.14621196687221527,
-0.11231420189142227,
-0.31724852323532104,
0.23380345106124878,
-0.16210772097110748,
0.007230347488075495,
0.18262602388858795,
-0.14775340259075165,
-0.3948552906513214,
-0.3019557595252991,
-0.4231872260570526,
0.42840689420700073,
0.09401144832372665,
0.36003756523132324,
0.10299114137887955,
-0.2116023153066635,
-0.3140140473842621,
0.06446242332458496,
0.7793224453926086,
0.24288487434387207,
-0.4793567657470703,
0.47621119022369385,
0.048661455512046814,
-0.5282106995582581,
-0.08921071141958237,
0.07767367362976074,
0.1703043282032013,
-0.27096161246299744,
0.5176337361335754,
-0.2395983338356018,
0.007817205041646957,
-0.05451362952589989,
0.5147517919540405,
-0.1700834184885025,
0.0628870278596878,
-0.08556070178747177,
-0.2372390776872635,
-0.1355622410774231,
-0.24215614795684814,
-0.007107055280357599,
0.523964524269104,
-0.29325559735298157,
-0.007220164872705936,
-0.040599845349788666,
-0.270094633102417,
0.400733083486557,
-0.38503003120422363,
0.5835529565811157,
-0.007173876743763685,
0.15688621997833252,
0.1716202050447464,
0.15051697194576263,
0.34743353724479675,
0.4852834641933441,
-0.23800542950630188,
-0.13810619711875916,
-0.018534431234002113,
0.12233801186084747,
0.4762547016143799,
0.2324654757976532,
-0.1201757863163948,
-0.004801609553396702,
-0.03424649313092232,
0.017818748950958252,
-0.3697007894515991,
-0.06575921922922134,
0.25075429677963257,
0.028016826137900352,
-0.4654090702533722,
-0.43135765194892883,
0.2042631059885025,
0.31027042865753174,
-0.12458249181509018,
0.35935530066490173,
-0.03234284371137619,
-0.4702598750591278,
0.3982977271080017,
-0.116271011531353,
0.9791223406791687,
-0.06791599839925766,
0.1978088617324829,
0.12638190388679504,
-0.18898536264896393,
0.16857817769050598,
0.2858896553516388,
0.11369441449642181,
-0.20190805196762085,
-0.2907354235649109,
-0.12553581595420837,
-0.26937249302864075,
0.049176622182130814,
0.23886561393737793,
-0.4425671696662903,
0.26696109771728516,
-0.4332692325115204,
-0.09902739524841309,
-0.17758725583553314,
0.0657883957028389,
-0.034166473895311356,
-0.21733377873897552,
-0.37525510787963867,
0.06146440654993057,
0.08798962831497192,
-0.11095843464136124,
0.008018257096409798,
-0.06335362792015076,
-0.38580700755119324,
-0.1335161328315735,
-0.11016882956027985,
0.09765844792127609,
-0.19913069903850555,
0.7657151818275452,
-0.38438209891319275,
-0.3101256787776947,
-0.39079317450523376,
0.25890085101127625,
0.4397601783275604,
0.002420565113425255,
0.05088615044951439,
-0.13276083767414093,
0.016540927812457085,
0.04228398576378822,
-0.012544936500489712,
-0.24536357820034027,
0.1864328235387802,
0.1857312023639679,
-0.12046585977077484,
0.07219483703374863,
0.024609211832284927,
-0.34901776909828186,
-0.11420399695634842,
0.0029147127643227577,
-0.009467889554798603,
-0.29979902505874634,
-0.36405038833618164,
0.17906850576400757,
0.14275038242340088,
-0.06081955134868622,
0.06683472543954849,
0.3294077515602112,
-0.053892817348241806,
0.27579107880592346,
-0.3172312080860138,
-0.34271296858787537,
-0.09654919058084488,
0.564689576625824,
0.3627423942089081,
-0.023670554161071777,
0.41359424591064453,
-0.039532776921987534,
-0.07016757130622864,
-0.016143150627613068,
0.34999847412109375,
0.15116485953330994,
0.2037108838558197,
0.4430510699748993,
0.010173025541007519,
-0.01091088354587555,
-0.1815686821937561,
0.36286479234695435,
0.37142840027809143,
0.22770442068576813,
-0.04208890721201897,
-0.16466425359249115,
-0.5605292320251465,
0.36722293496131897,
0.15998609364032745,
0.365121990442276,
0.08181914687156677,
-0.31257668137550354,
-0.10212474316358566,
-0.08958498388528824,
-0.2543857991695404,
0.028869640082120895,
-0.17905156314373016,
0.03819257766008377,
0.19825662672519684,
-0.040776755660772324,
0.13134661316871643,
-0.05272694677114487,
0.13777588307857513,
-0.21347172558307648,
0.012442924082279205,
-0.15494301915168762,
0.06207715719938278,
0.1388072371482849,
0.08655242621898651,
-0.12007903307676315,
-0.021039288491010666,
-0.4546814262866974,
-0.023989396169781685,
-0.2092127948999405,
-0.09408481419086456,
0.6052908301353455,
0.036199092864990234,
0.1405515819787979,
-0.06117750704288483,
0.13955841958522797,
0.08123208582401276,
0.05955014005303383,
0.05765700340270996,
0.056579817086458206,
-0.06296631693840027,
0.22054417431354523,
-0.283511221408844,
-0.18962785601615906,
-0.3457261919975281,
0.010537738911807537,
-0.17994655668735504,
-0.05842350795865059,
0.23938286304473877,
-0.13866405189037323,
-0.20370608568191528,
0.16895273327827454,
0.38118666410446167,
0.3318364918231964,
-0.19809825718402863,
0.1788567453622818,
-0.007973313331604004,
0.1412324458360672,
-0.0037087397649884224,
-0.2662278115749359,
-0.0902470126748085,
-0.12989754974842072,
-0.22663484513759613,
0.06935274600982666,
-0.023085039108991623,
0.02414427325129509,
-0.39696142077445984,
0.04251857101917267,
0.6044131517410278,
-0.17291876673698425,
0.37874269485473633,
0.09490751475095749,
0.10643139481544495,
-0.056393951177597046,
0.033081937581300735,
0.11875617504119873,
0.44639384746551514,
-0.04736188054084778,
-0.11964952200651169,
0.098850779235363,
0.3390357494354248,
-0.11449413001537323,
0.2200871855020523,
-0.2309979647397995,
0.021580340340733528,
0.20778578519821167,
-0.1855541616678238,
0.014039481990039349,
0.14075471460819244,
0.23516537249088287,
-0.521560549736023,
-0.2858966290950775,
0.05069894716143608,
0.4173057973384857,
-0.17601312696933746,
-0.1280171275138855,
0.12239822000265121,
-0.17785149812698364,
0.04803561419248581,
-0.14718370139598846,
0.12405848503112793,
-0.32196933031082153,
0.19120541214942932,
-0.08579692244529724,
-0.028238728642463684,
-0.03446061164140701,
0.24461129307746887,
0.4152521789073944,
0.10872382670640945,
-0.21960662305355072,
-0.11939122527837753,
0.2977908253669739,
-0.0735245794057846,
0.1069004163146019,
0.3158177137374878,
0.554058313369751,
0.5522786974906921,
-0.031205547973513603,
0.13086648285388947,
0.06895764172077179,
-0.2048628032207489,
0.042976900935173035,
0.013464619405567646,
-0.2174224704504013,
-0.27985087037086487,
0.4076698124408722,
0.19716325402259827,
-0.030816039070487022,
0.053091131150722504,
0.17693373560905457,
0.5629750490188599,
-0.17615331709384918,
0.14202173054218292,
-0.09437286853790283,
-0.18395328521728516,
0.11420704424381256,
0.03495039790868759,
-0.3102143108844757,
-0.2542945146560669,
0.3667086660861969,
-0.011049799621105194,
0.1435459405183792,
0.24487359821796417,
0.08542317897081375,
0.06317830830812454,
0.19992567598819733,
0.3337060809135437,
-0.04188227653503418,
-0.5096418261528015,
-0.005425232462584972,
-0.42456310987472534,
-0.18141600489616394,
0.28510645031929016,
0.24032410979270935,
-0.14370021224021912,
0.3626500368118286,
0.16792608797550201,
-0.037157636135816574,
0.06596273183822632,
0.04729282483458519,
-0.19093751907348633,
-0.05249911546707153,
-0.3705117404460907,
-0.14873006939888,
0.21063339710235596,
-0.06044631823897362,
-0.05874525383114815,
-0.2856878638267517,
0.27194640040397644,
0.15230613946914673,
0.05359229817986488,
0.009165802039206028,
0.16405294835567474,
0.14707958698272705,
0.3854421079158783,
0.19481965899467468,
0.20950107276439667,
0.3070434033870697,
-0.11525068432092667,
0.031646281480789185,
0.019572973251342773,
-0.330435186624527,
-0.1423637866973877,
0.13321377336978912,
-0.08601462841033936,
0.5072715282440186,
-0.5292460918426514,
0.03531071916222572,
-0.1213727667927742,
0.11962474882602692,
0.015919813886284828,
-0.4145388603210449,
-0.22922007739543915,
0.10314556211233139,
-0.011364756152033806,
-0.049156997352838516,
0.07738755643367767,
0.29989686608314514,
0.015460231341421604,
0.5862022042274475,
0.09814584255218506,
-0.4228115379810333,
0.40486326813697815,
0.11326538771390915,
-0.14947906136512756,
0.08225356042385101,
-0.08725187182426453,
0.20431867241859436,
0.3383576273918152,
-0.5801483392715454,
-0.21217359602451324,
0.4233351945877075,
-0.2602578103542328,
-0.31117457151412964,
0.10982444882392883,
-0.1028582751750946,
0.0029302332550287247,
0.01213189959526062,
0.40395939350128174,
-0.06418527662754059,
-0.4016011357307434,
0.023752132430672646,
-0.22129136323928833
] |
https://github.com/huggingface/datasets/issues/2040
|
ValueError: datasets' indices [1] come from memory and datasets' indices [0] come from disk
|
Indeed this works. Not the most elegant solution, but it does the trick. Thanks a lot!
|
Hi there,
I am trying to concat two datasets that I've previously saved to disk via `save_to_disk()` like so (note that both are saved as `DataDict`, `PATH_DATA_CLS_*` are `Path`-objects):
```python
concatenate_datasets([load_from_disk(PATH_DATA_CLS_A)['train'], load_from_disk(PATH_DATA_CLS_B)['train']])
```
Yielding the following error:
```python
ValueError: Datasets' indices should ALL come from memory, or should ALL come from disk.
However datasets' indices [1] come from memory and datasets' indices [0] come from disk.
```
Been trying to solve this for quite some time now. Both `DataDict` have been created by reading in a `csv` via `load_dataset` and subsequently processed using the various `datasets` methods (i.e. filter, map, remove col, rename col). Can't figure out tho...
`load_from_disk(PATH_DATA_CLS_A)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 785
})
```
`load_from_disk(PATH_DATA_CLS_B)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 3341
})
```
| 16
|
ValueError: datasets' indices [1] come from memory and datasets' indices [0] come from disk
Hi there,
I am trying to concat two datasets that I've previously saved to disk via `save_to_disk()` like so (note that both are saved as `DataDict`, `PATH_DATA_CLS_*` are `Path`-objects):
```python
concatenate_datasets([load_from_disk(PATH_DATA_CLS_A)['train'], load_from_disk(PATH_DATA_CLS_B)['train']])
```
Yielding the following error:
```python
ValueError: Datasets' indices should ALL come from memory, or should ALL come from disk.
However datasets' indices [1] come from memory and datasets' indices [0] come from disk.
```
Been trying to solve this for quite some time now. Both `DataDict` have been created by reading in a `csv` via `load_dataset` and subsequently processed using the various `datasets` methods (i.e. filter, map, remove col, rename col). Can't figure out tho...
`load_from_disk(PATH_DATA_CLS_A)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 785
})
```
`load_from_disk(PATH_DATA_CLS_B)['train']` yields:
```python
Dataset({
features: ['labels', 'text'],
num_rows: 3341
})
```
Indeed this works. Not the most elegant solution, but it does the trick. Thanks a lot!
|
[
-0.048382487148046494,
-0.07965625822544098,
-0.02161737158894539,
0.4603266417980194,
0.18724042177200317,
0.26541730761528015,
0.04070841893553734,
0.11934347450733185,
-0.04796750843524933,
0.14856712520122528,
0.05258643254637718,
0.17896099388599396,
-0.06306637078523636,
-0.07126650214195251,
-0.29877161979675293,
-0.06330100446939468,
0.2559680938720703,
-0.014330807141959667,
-0.12438832968473434,
-0.03350283205509186,
-0.4365565776824951,
0.25305742025375366,
-0.12421218305826187,
-0.04466449096798897,
-0.30367785692214966,
-0.06688396632671356,
-0.40699052810668945,
0.3554328680038452,
-0.07525397837162018,
-0.12310120463371277,
0.518929123878479,
-0.020126372575759888,
0.09416316449642181,
0.5816606879234314,
-0.00012137417797930539,
-0.004353842698037624,
-0.10395073145627975,
-0.17597809433937073,
-0.24222174286842346,
-0.4407137334346771,
-0.23660552501678467,
-0.25088241696357727,
-0.03644654527306557,
-0.29318535327911377,
0.2539064288139343,
-0.1341376155614853,
-0.117596834897995,
-0.7231460213661194,
0.24578756093978882,
0.1986134797334671,
0.0922245979309082,
0.19442011415958405,
0.06564980745315552,
-0.040940482169389725,
-0.040928784757852554,
0.1304789036512375,
0.19957947731018066,
0.1953572779893875,
-0.1021021157503128,
-0.027737170457839966,
0.2431667149066925,
-0.019255107268691063,
-0.3580237627029419,
-0.04786447063088417,
0.14823119342327118,
0.4531691372394562,
-0.005328827537596226,
-0.43638676404953003,
-0.13607528805732727,
0.007988128811120987,
0.4547099471092224,
-0.39509567618370056,
-0.3489305078983307,
-0.11716744303703308,
0.08377517014741898,
-0.36391910910606384,
0.11459636688232422,
0.3478949964046478,
0.007879296317696571,
0.1255420744419098,
-0.23527644574642181,
-0.10323116183280945,
-0.21609079837799072,
-0.033609241247177124,
-0.13038045167922974,
-0.02333260513842106,
-0.010051404125988483,
0.19401969015598297,
0.4782026708126068,
0.031036192551255226,
0.3325328230857849,
-0.5216786861419678,
0.056499846279621124,
0.2090533971786499,
-0.1852722316980362,
0.039292216300964355,
-0.0924745723605156,
-0.5081059336662292,
0.0348227433860302,
-0.1193101704120636,
0.12423250079154968,
-0.14693062007427216,
-0.16552366316318512,
0.335641473531723,
0.24342453479766846,
0.3892991840839386,
0.010718775913119316,
0.46725964546203613,
0.05210234224796295,
-0.16906782984733582,
0.019589699804782867,
0.02883310802280903,
0.049337953329086304,
-0.318564772605896,
0.1396738737821579,
-0.06427136808633804,
0.03947838395833969,
0.001953481463715434,
-0.4597352147102356,
0.23381030559539795,
-0.27469462156295776,
-0.12614865601062775,
0.11219421029090881,
-0.02762696146965027,
0.05811598524451256,
0.3988303244113922,
0.4030524790287018,
0.3217601180076599,
0.06582057476043701,
0.20856094360351562,
-0.16501063108444214,
0.24758464097976685,
0.12560240924358368,
0.14027979969978333,
0.15362101793289185,
-0.028881486505270004,
-0.06356723606586456,
0.12186305224895477,
0.0053785559721291065,
-0.07643578946590424,
-0.009221982210874557,
-0.363072007894516,
0.13620328903198242,
0.14139872789382935,
0.16191203892230988,
0.32769477367401123,
0.2981005907058716,
-0.3494318127632141,
-0.17385606467723846,
0.4263887405395508,
-0.35271143913269043,
-0.1570557802915573,
-0.1083391085267067,
0.07666145265102386,
-0.16360442340373993,
0.08016332983970642,
-0.42626556754112244,
0.09444177150726318,
0.3520643413066864,
0.25120809674263,
-0.25726795196533203,
-0.05486632138490677,
-0.27763527631759644,
-0.41513893008232117,
0.3119911551475525,
0.0014732856070622802,
-0.4745103716850281,
-0.032124053686857224,
0.2938994765281677,
0.0989328920841217,
0.17299668490886688,
0.45790091156959534,
-0.0473460890352726,
0.4347844123840332,
-0.27841272950172424,
-0.07601678371429443,
0.26482197642326355,
-0.38923099637031555,
-0.1594606339931488,
0.14998039603233337,
-0.16600748896598816,
0.008145802654325962,
0.25452473759651184,
0.06669651716947556,
-0.0031890440732240677,
0.22726376354694366,
0.7549226880073547,
0.350375235080719,
-0.046582285314798355,
-0.08909792453050613,
-0.10839831829071045,
-0.20297853648662567,
0.43511277437210083,
-0.11516746133565903,
-0.074092335999012,
0.0758218839764595,
-0.30715814232826233,
-0.4076966941356659,
0.35971567034721375,
-0.2330855280160904,
0.0511179082095623,
0.45099514722824097,
0.33429548144340515,
-0.14031754434108734,
-0.12227470427751541,
0.0558316633105278,
-0.16549429297447205,
0.17520877718925476,
0.042505182325839996,
-0.16813482344150543,
-0.21358740329742432,
-0.02317427657544613,
-0.23402242362499237,
0.09141415357589722,
-0.04040343314409256,
0.12610074877738953,
-0.0060417833738029,
0.09844117611646652,
-0.06758128106594086,
-0.09242033958435059,
-0.24835100769996643,
0.6367931365966797,
-0.11561376601457596,
0.05061829090118408,
-0.24801340699195862,
0.5165690779685974,
-0.18676237761974335,
-0.0749848484992981,
-0.07163093239068985,
-0.0034897623118013144,
0.26986590027809143,
0.14319223165512085,
0.023276211693882942,
0.5011243224143982,
-0.08642502874135971,
0.04653869941830635,
0.10625896602869034,
-0.028330305591225624,
0.2086675763130188,
0.06415162980556488,
0.10966798663139343,
-0.04499923065304756,
0.18428918719291687,
-0.22204937040805817,
-0.12960463762283325,
0.4378695785999298,
-0.3333466649055481,
0.3640972375869751,
0.07910709083080292,
0.057542040944099426,
0.16317294538021088,
0.04471326246857643,
0.0018773764604702592,
-0.2020852267742157,
0.07373093068599701,
0.10140271484851837,
0.15974481403827667,
0.19031447172164917,
-0.3452685475349426,
-0.040563587099313736,
0.12536324560642242,
0.05273514986038208,
0.01365214865654707,
0.014211796224117279,
-0.06739737093448639,
-0.08986245095729828,
-0.13063861429691315,
0.3200003504753113,
0.637133002281189,
0.13296538591384888,
0.09114862233400345,
-0.035395313054323196,
-0.20032697916030884,
-0.05300946906208992,
0.285724401473999,
0.11538740247488022,
0.16989077627658844,
0.18357492983341217,
-0.0004649448674172163,
-0.05531211197376251,
-0.0652935579419136,
0.02930425852537155,
-0.12158503383398056,
0.08842655271291733,
-0.5587561726570129,
-0.04088371619582176,
-0.25920161604881287,
-0.08919500559568405,
-0.4326562285423279,
-0.3007502555847168,
-0.17858168482780457,
-0.5216214060783386,
-0.2752334475517273,
0.528212308883667,
-0.04446377605199814,
-0.03420006483793259,
-0.1716001033782959,
0.19942912459373474,
0.016033325344324112,
0.015833409503102303,
0.22337505221366882,
-0.016453655436635017,
-0.06836095452308655,
-0.0021436025854200125,
-0.13743138313293457,
-0.07098843902349472,
0.08676841109991074,
-0.14769761264324188,
0.21063771843910217,
-0.23775261640548706,
0.06442078202962875,
-0.151304230093956,
-0.1804693341255188,
0.12542881071567535,
0.06077425181865692,
0.281502366065979,
-0.2824751138687134,
-0.6274946331977844,
0.12696616351604462,
0.5603992342948914,
-0.12143496423959732,
0.1552201360464096,
0.2652795910835266,
-0.2035028338432312,
-0.039757248014211655,
-0.18040698766708374,
-0.38379785418510437,
-0.21792197227478027,
-0.057930659502744675,
-0.2351757436990738,
0.22476652264595032,
0.11027123034000397,
0.22973544895648956,
0.07258474826812744,
0.3910371661186218,
0.1411740630865097,
-0.15055632591247559,
-0.3173220753669739,
0.40283098816871643,
-0.010666105896234512,
-0.13934718072414398,
0.011573735624551773,
0.02489405870437622,
0.07917023450136185,
0.16794484853744507,
-0.3714911937713623,
-0.0036192063707858324,
-0.1924351155757904,
0.12601983547210693,
-0.12661390006542206,
0.29279816150665283,
0.07609178870916367,
0.42904040217399597,
-0.0072631146758794785,
-0.21534140408039093,
-0.3689437210559845,
0.19654741883277893,
0.18686090409755707,
0.3983035087585449,
-0.07782743871212006,
0.29564157128334045,
0.11763720214366913,
0.2697821855545044,
0.3012256920337677,
0.09387471526861191,
0.2848665416240692,
0.2522513270378113,
0.5076839923858643,
-0.003135161241516471,
-0.5560580492019653,
-0.3561551868915558,
-0.045550886541604996,
-0.2627847194671631,
-0.10991419851779938,
-0.0035721557214856148,
0.02824006974697113,
-0.16965553164482117,
0.15731482207775116,
-0.15750044584274292,
-0.21933406591415405,
0.012327455915510654,
-0.23994800448417664,
0.14582319557666779,
-0.14265628159046173,
-0.06760099530220032,
-0.32645997405052185,
0.2706415355205536,
-0.17859214544296265,
0.044535163789987564,
0.2091865837574005,
-0.11651161313056946,
-0.4453097879886627,
-0.3459743559360504,
-0.4078499972820282,
0.3821873962879181,
0.08032186329364777,
0.37291043996810913,
0.07602829486131668,
-0.219779834151268,
-0.27447766065597534,
0.03573743253946304,
0.8388227224349976,
0.29138657450675964,
-0.4263603389263153,
0.3884170949459076,
0.02639305219054222,
-0.5281161069869995,
-0.08506156504154205,
0.11995649337768555,
0.19184091687202454,
-0.26075688004493713,
0.39662235975265503,
-0.23300114274024963,
0.02171831764280796,
-0.04914615675806999,
0.5023078322410583,
-0.19876952469348907,
0.010221825912594795,
-0.08150442689657211,
-0.21238330006599426,
-0.132672518491745,
-0.21986420452594757,
0.0007030769484117627,
0.4571668803691864,
-0.3032936155796051,
0.03136979788541794,
0.02645718678832054,
-0.25838199257850647,
0.40943005681037903,
-0.3536214530467987,
0.6024325489997864,
-0.03851481154561043,
0.18866857886314392,
0.12868620455265045,
0.1300337016582489,
0.3836229741573334,
0.5007204413414001,
-0.23031513392925262,
-0.1833067238330841,
0.00782577320933342,
0.10632172971963882,
0.4872785210609436,
0.2422603815793991,
-0.15224337577819824,
-0.03831297159194946,
-0.052032388746738434,
-0.06738048046827316,
-0.34850165247917175,
-0.06870526820421219,
0.276589572429657,
0.011287976987659931,
-0.45710960030555725,
-0.41279274225234985,
0.22284230589866638,
0.32407787442207336,
-0.11805409938097,
0.3458711802959442,
-0.039055343717336655,
-0.47468188405036926,
0.3770347833633423,
-0.14907346665859222,
1.0115312337875366,
-0.030279284343123436,
0.22358837723731995,
0.13922540843486786,
-0.2224709689617157,
0.1609480381011963,
0.28183630108833313,
0.05865692347288132,
-0.18981072306632996,
-0.2558058202266693,
-0.1155659630894661,
-0.2795867621898651,
0.04436367750167847,
0.2588212490081787,
-0.39289653301239014,
0.30990996956825256,
-0.4455196261405945,
-0.10182805359363556,
-0.16417443752288818,
0.04846227169036865,
-0.046407271176576614,
-0.22206811606884003,
-0.3521369993686676,
0.01854613795876503,
0.10502790659666061,
-0.060944847762584686,
-0.0374622717499733,
-0.02095775678753853,
-0.43718644976615906,
-0.15831820666790009,
-0.17351850867271423,
0.09850014746189117,
-0.1609058678150177,
0.7278366088867188,
-0.34503093361854553,
-0.36616480350494385,
-0.4455925226211548,
0.3316725194454193,
0.48197153210639954,
0.02724488265812397,
0.039824530482292175,
-0.10743986815214157,
-0.00600477633997798,
0.0863998606801033,
-0.02812267281115055,
-0.23768815398216248,
0.19291841983795166,
0.17848940193653107,
-0.09193935990333557,
0.01548723690211773,
0.006706760264933109,
-0.33192598819732666,
-0.13303571939468384,
0.04517005383968353,
0.000030025244996068068,
-0.2735176682472229,
-0.35780930519104004,
0.1885160207748413,
0.10143186151981354,
-0.11840453743934631,
0.02652827836573124,
0.3572256863117218,
-0.06514886021614075,
0.2823162376880646,
-0.3681318461894989,
-0.32455646991729736,
-0.09244315326213837,
0.5428102016448975,
0.3373912274837494,
-0.0709230974316597,
0.3994654715061188,
-0.006943853572010994,
-0.11548902839422226,
0.011119600385427475,
0.33320486545562744,
0.1729915291070938,
0.1851276010274887,
0.42676809430122375,
0.006930331699550152,
-0.0070104594342410564,
-0.19567392766475677,
0.35402119159698486,
0.3503938615322113,
0.19562087953090668,
0.031379833817481995,
-0.21862606704235077,
-0.5530784130096436,
0.33969417214393616,
0.17062883079051971,
0.3276749551296234,
0.10496542602777481,
-0.3088960349559784,
-0.0684690773487091,
-0.02345978654921055,
-0.20582488179206848,
0.000022112750230007805,
-0.18705904483795166,
0.043452367186546326,
0.2184446007013321,
0.028777142986655235,
0.08326330035924911,
-0.010145029053092003,
0.09877458959817886,
-0.16898898780345917,
0.023358022794127464,
-0.09752032160758972,
0.06285424530506134,
0.1782512366771698,
0.07380099594593048,
-0.09040704369544983,
0.005142775364220142,
-0.4593452513217926,
0.014007329940795898,
-0.2294308841228485,
-0.12174380570650101,
0.6715186834335327,
0.05107001215219498,
0.12149625271558762,
0.015886083245277405,
0.22858154773712158,
0.0680382251739502,
0.08780068904161453,
0.04847507178783417,
0.0963502898812294,
0.010016675107181072,
0.22225229442119598,
-0.2736034393310547,
-0.17645415663719177,
-0.3879486918449402,
-0.00897067878395319,
-0.12004278600215912,
-0.047100730240345,
0.20318114757537842,
-0.16018646955490112,
-0.20051920413970947,
0.11080377548933029,
0.41104209423065186,
0.3873532712459564,
-0.1979256570339203,
0.19008339941501617,
-0.03045792505145073,
0.08743421733379364,
0.016890522092580795,
-0.28272366523742676,
-0.09831997007131577,
-0.18492521345615387,
-0.27577832341194153,
0.12547746300697327,
0.0075812567956745625,
0.03577674180269241,
-0.39073020219802856,
0.012761258520185947,
0.6847838163375854,
-0.13351735472679138,
0.3405166566371918,
0.06077471747994423,
0.11563785374164581,
-0.010597044602036476,
-0.025070732459425926,
0.16195133328437805,
0.4223306477069855,
-0.009183716028928757,
-0.14207281172275543,
0.09739300608634949,
0.3798944056034088,
-0.13793650269508362,
0.2299739569425583,
-0.24048615992069244,
0.04088164493441582,
0.18853983283042908,
-0.1650819480419159,
-0.024194255471229553,
0.07714632153511047,
0.18395990133285522,
-0.5160549283027649,
-0.24803058803081512,
0.002099650679156184,
0.4248039722442627,
-0.13857805728912354,
-0.1343557983636856,
0.09076323360204697,
-0.22465385496616364,
0.002784252632409334,
-0.1104545071721077,
0.12897683680057526,
-0.39965298771858215,
0.172110915184021,
-0.08197230100631714,
-0.00960178580135107,
-0.08845756947994232,
0.2355579137802124,
0.38152649998664856,
0.07217399030923843,
-0.26529714465141296,
-0.05073822662234306,
0.2551623582839966,
-0.06945264339447021,
0.19162771105766296,
0.2259947657585144,
0.5554203987121582,
0.5561279058456421,
0.025550490245223045,
0.1406385600566864,
0.0032017657067626715,
-0.21222682297229767,
-0.005351761355996132,
-0.002525809919461608,
-0.2935771346092224,
-0.3012862801551819,
0.4094852805137634,
0.1750781238079071,
0.0024358031805604696,
0.06747658550739288,
0.2661314904689789,
0.5477375388145447,
-0.22978729009628296,
0.1564592570066452,
-0.15962499380111694,
-0.20058265328407288,
0.09172521531581879,
0.002466128906235099,
-0.3389185965061188,
-0.253699392080307,
0.3616602122783661,
-0.018701758235692978,
0.13981744647026062,
0.2566124200820923,
0.052887458354234695,
0.054733723402023315,
0.18915216624736786,
0.28712397813796997,
-0.013073225505650043,
-0.5009990334510803,
-0.035670582205057144,
-0.4185153543949127,
-0.14725109934806824,
0.31429731845855713,
0.19106405973434448,
-0.18958672881126404,
0.3773265480995178,
0.14168411493301392,
-0.041086163371801376,
0.11771738529205322,
0.12736040353775024,
-0.17534580826759338,
0.02344711311161518,
-0.3930688798427582,
-0.18639180064201355,
0.21769438683986664,
-0.0762474313378334,
-0.060864001512527466,
-0.23663468658924103,
0.22871772944927216,
0.1713465452194214,
0.01965651474893093,
0.011934026144444942,
0.08364450931549072,
0.1588285267353058,
0.4142061769962311,
0.25725123286247253,
0.16910134255886078,
0.36385419964790344,
-0.10031700134277344,
0.0047961072996258736,
0.043885715305805206,
-0.35052284598350525,
-0.15830452740192413,
0.13003064692020416,
-0.12683603167533875,
0.5008478760719299,
-0.544779360294342,
0.08132746815681458,
-0.12667571008205414,
0.08496986329555511,
0.034407518804073334,
-0.40375128388404846,
-0.17586500942707062,
0.05506575480103493,
-0.013366029597818851,
0.01831556297838688,
0.13821345567703247,
0.23367950320243835,
0.025698350742459297,
0.6657630801200867,
0.06085437908768654,
-0.4091666340827942,
0.40099918842315674,
0.1377362459897995,
-0.15149936079978943,
0.049245238304138184,
-0.07796633243560791,
0.1826993077993393,
0.3516896069049835,
-0.6099097728729248,
-0.21573297679424286,
0.4358259439468384,
-0.21886491775512695,
-0.2990231513977051,
0.09337368607521057,
-0.09478156268596649,
-0.010686317458748817,
0.005379984620958567,
0.41361352801322937,
-0.12912492454051971,
-0.3908875286579132,
0.0667111873626709,
-0.20827847719192505
] |
https://github.com/huggingface/datasets/issues/2038
|
outdated dataset_infos.json might fail verifications
|
Hi ! Thanks for reporting.
To update the dataset_infos.json you can run:
```
datasets-cli test ./datasets/doc2dial --all_configs --save_infos --ignore_verifications
```
|
The [doc2dial/dataset_infos.json](https://github.com/huggingface/datasets/blob/master/datasets/doc2dial/dataset_infos.json) is outdated. It would fail data_loader when verifying download checksum etc..
Could you please update this file or point me how to update this file?
Thank you.
| 20
|
outdated dataset_infos.json might fail verifications
The [doc2dial/dataset_infos.json](https://github.com/huggingface/datasets/blob/master/datasets/doc2dial/dataset_infos.json) is outdated. It would fail data_loader when verifying download checksum etc..
Could you please update this file or point me how to update this file?
Thank you.
Hi ! Thanks for reporting.
To update the dataset_infos.json you can run:
```
datasets-cli test ./datasets/doc2dial --all_configs --save_infos --ignore_verifications
```
|
[
-0.12009231746196747,
0.1984141618013382,
-0.11187480390071869,
0.1850016862154007,
0.11309649050235748,
0.21630382537841797,
0.10356354713439941,
0.4946841597557068,
0.20697207748889923,
-0.07031934708356857,
0.0729321837425232,
0.04722012206912041,
0.19815482199192047,
0.2417437881231308,
-0.06892582774162292,
-0.09112381190061569,
-0.026771055534482002,
0.2664070427417755,
0.06811590492725372,
0.08858592808246613,
-0.02662292867898941,
0.1407283991575241,
-0.19235727190971375,
-0.1282280683517456,
-0.21906046569347382,
-0.040657881647348404,
0.038716040551662445,
0.1655929982662201,
-0.5414209365844727,
-0.499253511428833,
0.43046268820762634,
0.4793897569179535,
0.08197163790464401,
0.38556140661239624,
-0.00010813283734023571,
-0.0376768633723259,
0.5466261506080627,
-0.02905852720141411,
-0.4618392288684845,
-0.051954690366983414,
-0.3342081904411316,
-0.18551400303840637,
-0.14114753901958466,
-0.08354464173316956,
-0.01525856927037239,
-0.32550758123397827,
-0.12399988621473312,
0.07895863056182861,
0.21358036994934082,
0.17263062298297882,
0.24692124128341675,
0.421130895614624,
0.5330954790115356,
-0.18487128615379333,
0.10944437235593796,
-0.0424618162214756,
0.18554289638996124,
0.44351819157600403,
0.325207382440567,
0.03166364133358002,
0.2927807569503784,
0.3482065796852112,
-0.06688175350427628,
-0.10156361758708954,
0.19297410547733307,
-0.16652972996234894,
0.13151200115680695,
-0.10643637180328369,
0.16574613749980927,
0.17772212624549866,
0.6516275405883789,
-0.34335145354270935,
-0.3737463653087616,
-0.08352984488010406,
-0.15507078170776367,
-0.19945628941059113,
0.39186471700668335,
-0.28938379883766174,
0.2753104865550995,
0.2195625603199005,
-0.19723547995090485,
-0.35016700625419617,
-0.016772011294960976,
0.055279966443777084,
-0.08430176973342896,
-0.10059806704521179,
-0.1842757910490036,
-0.14552399516105652,
0.14574986696243286,
-0.1432102918624878,
-0.13179104030132294,
-0.004624109249562025,
-0.32077622413635254,
0.05975189059972763,
-0.07721429318189621,
-0.2997918426990509,
-0.20403465628623962,
0.10481742769479752,
0.3750506341457367,
0.21490803360939026,
0.09419211745262146,
0.049751076847314835,
-0.3412801921367645,
0.17152352631092072,
0.14951400458812714,
0.11823864281177521,
0.4304284453392029,
-0.020812293514609337,
0.3718365728855133,
0.6826691031455994,
0.11445895582437515,
-0.047987133264541626,
-0.004207725170999765,
-0.24814893305301666,
0.024340685456991196,
0.023826129734516144,
0.3393543064594269,
-0.4905768632888794,
-0.0651526004076004,
0.1865622103214264,
-0.015994146466255188,
-0.055738240480422974,
0.23562853038311005,
0.3187636733055115,
-0.36129334568977356,
0.1625719517469406,
0.1662803441286087,
-0.02965684048831463,
0.04461193084716797,
-0.31227585673332214,
-0.07639200985431671,
0.026126448065042496,
-0.02840513549745083,
0.21530835330486298,
0.37517523765563965,
-0.37579166889190674,
0.47393134236335754,
0.03533678874373436,
-0.16021983325481415,
0.043941300362348557,
-0.07445083558559418,
-0.12079782783985138,
-0.2017628252506256,
0.23919476568698883,
-0.025451261550188065,
0.050477173179388046,
-0.09739361703395844,
-0.01277447771281004,
0.027316028252243996,
-0.18168610334396362,
-0.30455636978149414,
-0.3762100636959076,
-0.24055065214633942,
0.20195215940475464,
-0.02346320077776909,
-0.11182018369436264,
-0.2365121841430664,
-0.10285593569278717,
0.1793442666530609,
-0.49978920817375183,
-0.04555010423064232,
-0.07300914824008942,
-0.1554109901189804,
-0.02203868143260479,
0.1926504373550415,
0.3321070075035095,
-0.07092053443193436,
0.09006836265325546,
0.06673526763916016,
-0.3115299344062805,
-0.22411958873271942,
0.20146410167217255,
-0.08829837292432785,
0.19404800236225128,
-0.20103013515472412,
0.06037360429763794,
-0.040451787412166595,
-0.6165742874145508,
-0.3859301805496216,
0.10603702813386917,
0.22307179868221283,
-0.09324374794960022,
-0.13470347225666046,
-0.23676469922065735,
0.23664039373397827,
-0.2952267825603485,
-0.10736218094825745,
0.04900018498301506,
0.10508893430233002,
-0.02395731396973133,
-0.32672441005706787,
-0.22936776280403137,
-0.03331183269619942,
0.10303670167922974,
-0.04299211502075195,
0.019501397386193275,
0.03444259986281395,
0.4565267264842987,
0.14231356978416443,
-0.040945347398519516,
0.04695935919880867,
0.28129056096076965,
0.41664648056030273,
0.03359499201178551,
-0.044767167419195175,
-0.04089990630745888,
-0.5700748562812805,
0.20993542671203613,
0.14074313640594482,
-0.12542247772216797,
-0.12508153915405273,
-0.1638532429933548,
-0.2609325647354126,
-0.059787847101688385,
-0.06570439040660858,
-0.017874913290143013,
0.1555883288383484,
0.1592796891927719,
0.3321816623210907,
0.10943739861249924,
-0.11914374679327011,
0.21301142871379852,
-0.5373793840408325,
0.1782788187265396,
-0.26224812865257263,
0.17793379724025726,
-0.030458815395832062,
0.12531983852386475,
0.3239287734031677,
-0.09931094199419022,
0.08796627819538116,
-0.12908896803855896,
-0.08314431458711624,
0.5027291178703308,
0.009387110359966755,
0.13579513132572174,
0.24719788134098053,
0.3728526830673218,
0.05439724028110504,
-0.08521765470504761,
0.080835722386837,
-0.16526712477207184,
-0.04196593537926674,
0.03430855646729469,
-0.2673313319683075,
0.03268155828118324,
-0.08498768508434296,
-0.06738501042127609,
0.2248893827199936,
-0.0741194561123848,
0.31408223509788513,
-0.02976847067475319,
-0.03888345882296562,
-0.2751830518245697,
-0.17771199345588684,
-0.07517340034246445,
0.3607100546360016,
-0.14301355183124542,
-0.06265789270401001,
0.15597963333129883,
0.4095155596733093,
-0.020629025995731354,
-0.09067483246326447,
0.19840532541275024,
0.08152595907449722,
-0.22911237180233002,
-0.08166037499904633,
0.2641117572784424,
0.23457440733909607,
0.22767920792102814,
-0.014012949541211128,
0.18948602676391602,
0.07117640972137451,
-0.056191861629486084,
0.16738629341125488,
-0.1691853404045105,
-0.00976001750677824,
0.4036226272583008,
0.12568339705467224,
0.010898822918534279,
-0.2650371789932251,
0.04543411359190941,
0.20301175117492676,
0.5164212584495544,
-0.30693960189819336,
-0.0780186802148819,
-0.20331336557865143,
-0.022364657372236252,
-0.002780352020636201,
-0.34371909499168396,
-0.3578513264656067,
-0.13497483730316162,
0.06799906492233276,
0.47268909215927124,
0.11569267511367798,
0.1248636394739151,
-0.05385710671544075,
0.22245264053344727,
0.09254010021686554,
-0.1651449054479599,
-0.18713998794555664,
0.06587518006563187,
-0.09791140258312225,
0.05567723512649536,
0.3926020562648773,
-0.06356678158044815,
0.3531544804573059,
-0.524426281452179,
-0.17449988424777985,
-0.5462667346000671,
-0.4836142957210541,
0.21966387331485748,
-0.20578083395957947,
0.25776153802871704,
0.27610209584236145,
0.3172799348831177,
0.1261557787656784,
-0.00008237870497396216,
0.15535923838615417,
-0.27605852484703064,
-0.35460352897644043,
-0.2557944059371948,
-0.019166871905326843,
-0.10921654850244522,
-0.13519205152988434,
-0.3698326051235199,
0.10125366598367691,
-0.21008634567260742,
0.10207058489322662,
0.0008240447496064007,
0.02672463469207287,
0.2857052981853485,
0.08145184069871902,
0.1861855685710907,
-0.17058277130126953,
0.2064657360315323,
-0.29835617542266846,
-0.7436748147010803,
0.09506968408823013,
-0.19936202466487885,
-0.2288202941417694,
0.011196749284863472,
0.25187233090400696,
0.29662516713142395,
-0.06406500935554504,
-0.4512530267238617,
-0.3920634984970093,
-0.09038779884576797,
0.15937238931655884,
0.016509391367435455,
-0.15543381869792938,
0.3954569101333618,
-0.0997762382030487,
-0.12252672761678696,
-0.1927507221698761,
-0.3537529408931732,
0.11857546865940094,
-0.07440787553787231,
0.3598253130912781,
-0.03532857075333595,
0.2783934473991394,
-0.006932608317583799,
0.552737295627594,
0.06371620297431946,
-0.3731846511363983,
0.2554659843444824,
0.03617208078503609,
0.5047950744628906,
-0.12037807703018188,
-0.18761493265628815,
-0.08813376724720001,
-0.001853619352914393,
0.1378800868988037,
0.16375283896923065,
0.08055248111486435,
0.1937587708234787,
-0.20146578550338745,
-0.36414939165115356,
-0.46167394518852234,
-0.18763911724090576,
-0.17250178754329681,
0.22244048118591309,
0.306427001953125,
-0.036734070628881454,
0.038222793489694595,
-0.10443027317523956,
-0.0385640524327755,
0.23887020349502563,
0.6212218999862671,
0.05791005864739418,
0.11479838192462921,
-0.28763332962989807,
0.20323966443538666,
-0.11228816211223602,
0.4098140001296997,
-0.0514041967689991,
0.28838402032852173,
-0.058874595910310745,
0.08354438096284866,
-0.08757635205984116,
-0.2908475995063782,
0.3274443447589874,
-0.18362082540988922,
0.3218437433242798,
0.04583274945616722,
-0.10384362190961838,
0.023512007668614388,
-0.14977587759494781,
-0.129583477973938,
0.19560351967811584,
0.26563453674316406,
0.4955191910266876,
-0.44320112466812134,
-0.3598159849643707,
0.3211880624294281,
0.06737487018108368,
-0.055984023958444595,
-0.10246232151985168,
-0.15674333274364471,
-0.19226016104221344,
-0.2763620615005493,
-0.023015394806861877,
-0.22170335054397583,
0.03768729418516159,
-0.15698835253715515,
0.042796265333890915,
0.13483507931232452,
-0.01684866100549698,
0.0792316198348999,
0.2699020802974701,
0.20044291019439697,
0.15926475822925568,
0.26874983310699463,
0.21280308067798615,
0.27165985107421875,
0.6806362867355347,
0.3026637136936188,
-0.09935418516397476,
-0.12452683597803116,
-0.2011512815952301,
-0.08466295897960663,
0.0673399344086647,
0.1649756282567978,
-0.04754897952079773,
0.15966148674488068,
0.3370106518268585,
-0.1489342451095581,
-0.0169888436794281,
0.08541975915431976,
0.48402881622314453,
0.021071333438158035,
-0.2948288917541504,
-0.2754918932914734,
0.243490532040596,
0.1808886080980301,
-0.06367267668247223,
0.12746933102607727,
0.10301371663808823,
-0.12758399546146393,
-0.23486439883708954,
0.15910878777503967,
0.7583655714988708,
0.08679711818695068,
-0.32152608036994934,
0.16781629621982574,
-0.2078518122434616,
0.33446985483169556,
-0.3076876401901245,
-0.09561624377965927,
-0.36123424768447876,
-0.06292445212602615,
0.018216190859675407,
0.051824890077114105,
0.20388482511043549,
-0.27137312293052673,
-0.4220636487007141,
0.2160603106021881,
-0.29132673144340515,
0.04904261231422424,
-0.1281304508447647,
0.4355078637599945,
-0.1518869698047638,
-0.0533975325524807,
-0.4187328815460205,
0.22623994946479797,
0.03778549283742905,
0.11341112107038498,
-0.26148664951324463,
-0.15081800520420074,
0.08850430697202682,
-0.4387354850769043,
-0.2300230860710144,
-0.008429992944002151,
0.0856359601020813,
-0.07680106163024902,
0.1855611354112625,
0.268386572599411,
0.1197180524468422,
0.03166940063238144,
0.40120989084243774,
0.2393576055765152,
-0.3454663157463074,
0.08142387121915817,
-0.31299784779548645,
-0.17959173023700714,
-0.008828937076032162,
-0.0792565867304802,
0.35970616340637207,
-0.26417192816734314,
-0.3239224851131439,
-0.01886252500116825,
-0.09213950484991074,
-0.32789522409439087,
-0.018003076314926147,
-0.24675709009170532,
-0.2671569287776947,
-0.2533729374408722,
-0.04362679272890091,
0.06423460692167282,
-0.167537122964859,
-0.2751357853412628,
0.21324041485786438,
-0.025732405483722687,
-0.008236006833612919,
0.010276221670210361,
0.2115836888551712,
-0.18408203125,
-0.06409835070371628,
0.5821515321731567,
-0.2382148653268814,
0.0018271274166181684,
0.4449842572212219,
0.045429810881614685,
-0.08735828846693039,
-0.3670881688594818,
-0.2623545527458191,
-0.02044493332505226,
-0.22357206046581268,
0.07129134982824326,
0.1381038874387741,
0.22343604266643524,
0.013209817931056023,
0.28159764409065247,
0.23633840680122375,
-0.08033312857151031,
0.20983284711837769,
-0.5782486796379089,
-0.3554055690765381,
0.24155020713806152,
-0.2080073058605194,
0.13504955172538757,
-0.14097625017166138,
0.14012128114700317,
-0.03753495588898659,
-0.02322155237197876,
-0.38877636194229126,
0.2520701289176941,
-0.1794518530368805,
0.1692466288805008,
0.3353225290775299,
0.058329880237579346,
0.2780815362930298,
-0.17337709665298462,
0.09139078110456467,
-0.10163341462612152,
-0.36892804503440857,
-0.19693000614643097,
-0.1718817800283432,
0.1263723522424698,
0.03598781302571297,
0.06179162114858627,
0.13934823870658875,
-0.04022299125790596,
-0.284400075674057,
0.04750928282737732,
-0.04738413915038109,
-0.046326395124197006,
0.1311321258544922,
0.17526638507843018,
0.019459504634141922,
0.2657255232334137,
0.052494533360004425,
-0.003204014617949724,
0.19485285878181458,
0.12502358853816986,
-0.07693593949079514,
0.14018554985523224,
-0.29705876111984253,
-0.13727112114429474,
0.1731647253036499,
0.20293885469436646,
0.17746368050575256,
-0.1687951236963272,
0.19193130731582642,
-0.21132627129554749,
0.11384785920381546,
0.2148856818675995,
0.360818475484848,
0.5215629935264587,
-0.17094740271568298,
0.02896822988986969,
0.13246405124664307,
0.2687727212905884,
-0.16445620357990265,
0.03665074333548546,
0.25811365246772766,
-0.05374138429760933,
-0.15294410288333893,
0.0027482667937874794,
0.34825778007507324,
-0.21349768340587616,
0.20030291378498077,
0.2779769003391266,
0.32676151394844055,
-0.18415486812591553,
0.053250961005687714,
0.22372739017009735,
-0.27426066994667053,
-0.0029419793281704187,
0.24843864142894745,
0.019426753744482994,
0.08840801566839218,
0.21865402162075043,
-0.15884137153625488,
0.08721327036619186,
-0.11641143262386322,
0.3795849680900574,
-0.05888453871011734,
-0.2583572268486023,
0.2092462033033371,
0.48760807514190674,
0.26358839869499207,
-0.07305316627025604,
0.07533611357212067,
0.47487813234329224,
0.08221559971570969,
-0.0485137403011322,
-0.5303447246551514,
0.15423542261123657,
-0.11897219717502594,
-0.13072267174720764,
-0.2884337902069092,
-0.3437516391277313,
0.012443561106920242,
0.009209588170051575,
-0.04305906966328621,
0.02564428746700287,
0.06882236152887344,
-0.004308711737394333,
-0.3971521556377411,
-0.5800517797470093,
-0.17415080964565277,
0.25510284304618835,
0.10905981808900833,
-0.17220161855220795,
0.27958542108535767,
0.257046103477478,
-0.15205463767051697,
0.30708831548690796,
0.7304962277412415,
0.42031776905059814,
0.2456790655851364,
0.2398926168680191,
-0.10113038122653961,
-0.34050998091697693,
0.004924064502120018,
0.058803655207157135,
0.41223278641700745,
0.023098355159163475,
-0.3534141182899475,
0.2803240120410919,
0.18930594623088837,
-0.17523597180843353,
0.07892590761184692,
-0.21209540963172913,
0.05332157015800476,
-0.11633199453353882,
-0.04876333102583885,
0.1541915088891983,
0.14082251489162445,
-0.30301833152770996,
0.16642890870571136,
-0.3497416377067566,
-0.05815307796001434,
0.21891680359840393,
0.23018740117549896,
0.18889500200748444,
0.040314432233572006,
0.1150403693318367,
-0.03522169217467308,
0.5214561223983765,
0.3677417039871216,
-0.14610570669174194,
0.0032994041685014963,
-0.2817927300930023,
-0.607765793800354,
-0.012870309874415398,
0.030386123806238174,
0.11562838405370712,
-0.07653109729290009,
-0.0257931649684906,
0.10600276291370392,
0.15668372809886932,
0.31022313237190247,
-0.22418922185897827,
-0.1152937188744545,
-0.31922805309295654,
-0.3017613887786865,
0.23089288175106049,
-0.1066337376832962,
-0.06299931555986404,
0.12454048544168472,
-0.17166973650455475,
0.09544046968221664,
-0.039896655827760696,
0.024701867252588272,
-0.07323860377073288,
0.327650785446167,
-0.2639654874801636,
0.0717812180519104,
0.5029470324516296,
0.261327862739563,
0.47528010606765747,
-0.22933363914489746,
-0.21742428839206696,
-0.41616174578666687,
-0.06646360456943512,
-0.2767212986946106,
0.43281301856040955,
0.13065072894096375,
0.12947645783424377,
-0.027789851650595665,
-0.10767301172018051,
-0.24237680435180664,
0.5078528523445129,
0.032611336559057236,
-0.22686848044395447,
-0.4183286726474762,
-0.05547120049595833,
0.0693705677986145,
-0.06511416286230087,
-0.06515511870384216,
0.028129132464528084,
0.0025855335406959057,
0.061347197741270065,
-0.5129877328872681,
-0.08759243786334991,
0.5630137920379639,
-0.058156728744506836,
0.01082107424736023,
-0.07101857662200928,
0.2790161371231079,
0.17255808413028717,
-0.3536722660064697,
-0.6980352401733398,
0.2993617355823517,
0.27107223868370056,
0.016405588015913963,
-0.2873927354812622,
0.33452746272087097,
-0.0833229050040245,
0.28246763348579407,
-0.09709229320287704,
0.21477018296718597,
0.03052716702222824,
-0.2756701707839966,
-0.10908922553062439,
0.02991531416773796
] |
https://github.com/huggingface/datasets/issues/2035
|
wiki40b/wikipedia for almost all languages cannot be downloaded
|
Dear @lhoestq for wikipedia dataset I also get the same error, I greatly appreciate if you could have a look into this dataset as well. Below please find the command to reproduce the error:
```
dataset = load_dataset("wikipedia", "20200501.bg")
print(dataset)
```
Your library is my only chance to be able training the models at scale and I am grateful for your help.
|
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
| 62
|
wiki40b/wikipedia for almost all languages cannot be downloaded
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
Dear @lhoestq for wikipedia dataset I also get the same error, I greatly appreciate if you could have a look into this dataset as well. Below please find the command to reproduce the error:
```
dataset = load_dataset("wikipedia", "20200501.bg")
print(dataset)
```
Your library is my only chance to be able training the models at scale and I am grateful for your help.
|
[
-0.25449883937835693,
-0.07791971415281296,
-0.1537584364414215,
0.43086686730384827,
0.39970263838768005,
0.3504616618156433,
0.1368502825498581,
0.5331583619117737,
0.1893267184495926,
0.023584548383951187,
-0.17730441689491272,
-0.09421756118535995,
0.0944039598107338,
0.011184575967490673,
-0.0297053474932909,
-0.4591730237007141,
-0.0672900378704071,
0.02953762747347355,
-0.13527131080627441,
-0.11689324676990509,
-0.2519628405570984,
0.12561438977718353,
-0.07917481660842896,
-0.04902834817767143,
-0.038746144622564316,
-0.18283997476100922,
-0.09583571553230286,
-0.20730605721473694,
-0.3507463335990906,
-0.24086488783359528,
0.35457831621170044,
0.019257647916674614,
0.31011223793029785,
0.15299740433692932,
-0.00011143678420921788,
-0.0509641170501709,
0.3131164610385895,
-0.2357948273420334,
-0.29361221194267273,
-0.2888581156730652,
-0.07208938151597977,
-0.3261854648590088,
-0.09043888747692108,
-0.42003169655799866,
0.12744581699371338,
0.04668239504098892,
0.0806712880730629,
-0.13180148601531982,
0.07575755566358566,
0.2992260754108429,
0.2468714565038681,
-0.14260362088680267,
0.3134343922138214,
-0.1457379013299942,
0.3651953637599945,
-0.3777082562446594,
-0.028033530339598656,
0.3395863175392151,
0.218720480799675,
0.07134398818016052,
0.21547909080982208,
0.22204311192035675,
-0.23414066433906555,
0.01349933072924614,
0.04822405055165291,
-0.29122394323349,
0.22220534086227417,
-0.629701554775238,
0.520641565322876,
0.5344274044036865,
0.8290324211120605,
-0.12835131585597992,
-0.08746717870235443,
0.072393499314785,
-0.026059571653604507,
-0.03137509524822235,
-0.05574026703834534,
0.4819800853729248,
-0.18932609260082245,
0.09759890288114548,
0.12616471946239471,
-0.12543044984340668,
-0.15671950578689575,
0.4228460192680359,
-0.1241353303194046,
0.4435884952545166,
-0.05272023379802704,
0.2112599015235901,
-0.0216665156185627,
-0.10270167887210846,
-0.26364099979400635,
-0.06965858489274979,
-0.09616053104400635,
0.2933219373226166,
-0.2793998122215271,
0.019636234268546104,
-0.16150297224521637,
0.05564657226204872,
0.3511344790458679,
-0.15038257837295532,
-0.23462128639221191,
-0.04507802054286003,
0.09601198881864548,
0.15757520496845245,
0.18014878034591675,
0.16378413140773773,
0.0620487779378891,
-0.2000061571598053,
0.2782810628414154,
0.3079039752483368,
-0.08421274274587631,
-0.0761713758111,
-0.2100439965724945,
-0.22305718064308167,
-0.2947562336921692,
0.0944298505783081,
0.08752915263175964,
-0.20317110419273376,
-0.17794694006443024,
0.007112853229045868,
-0.1443609744310379,
-0.01943882554769516,
-0.20239461958408356,
0.36282142996788025,
-0.15014299750328064,
0.43123751878738403,
0.17790168523788452,
0.328822523355484,
-0.10357245802879333,
-0.26130956411361694,
-0.01735268346965313,
0.30654871463775635,
-0.1393190324306488,
-0.1036604642868042,
0.21878241002559662,
-0.10991638898849487,
0.2648518681526184,
-0.08937306702136993,
-0.10313830524682999,
-0.1764124035835266,
-0.1536906510591507,
-0.3695681393146515,
-0.17910411953926086,
0.23040896654129028,
0.1619766354560852,
0.28392747044563293,
0.1476142555475235,
-0.24474751949310303,
-0.23058052361011505,
0.12074483931064606,
-0.3596149981021881,
-0.16815562546253204,
-0.20515534281730652,
0.19446861743927002,
0.06109855696558952,
-0.0546499527990818,
-0.31600698828697205,
0.2876638174057007,
0.3030637502670288,
-0.1423981487751007,
0.1180722787976265,
-0.007545265834778547,
-0.023254673928022385,
-0.22518932819366455,
0.17901143431663513,
0.49079981446266174,
-0.39995941519737244,
0.09189733117818832,
-0.02385012060403824,
-0.03371269255876541,
0.18978251516819,
0.18429774045944214,
-0.17795206606388092,
0.25654172897338867,
-0.09788442403078079,
0.038160406053066254,
0.21013252437114716,
-0.32144269347190857,
-0.5776352882385254,
0.18605440855026245,
0.11341046541929245,
-0.16700491309165955,
0.09948059916496277,
0.016000358387827873,
0.27503105998039246,
-0.04938732087612152,
0.05245454981923103,
0.39567452669143677,
0.13683775067329407,
-0.10564517974853516,
-0.32745084166526794,
-0.5078237056732178,
0.32648128271102905,
0.1633184254169464,
0.45471417903900146,
-0.1322697550058365,
0.27598556876182556,
0.2917204797267914,
0.3191738724708557,
-0.19154725968837738,
0.12467864900827408,
0.23336075246334076,
-0.00894821248948574,
-0.04457567259669304,
-0.0025626758579164743,
-0.33102720975875854,
-0.30975762009620667,
0.14775988459587097,
0.10291292518377304,
0.16546472907066345,
-0.160955548286438,
0.029683437198400497,
-0.31619006395339966,
-0.08880765736103058,
-0.1953120082616806,
0.10326860100030899,
0.1995640993118286,
-0.1052766740322113,
0.11959367990493774,
0.4854587912559509,
0.1265171468257904,
-0.09945830702781677,
-0.4156898558139801,
-0.09485310316085815,
-0.17893461883068085,
0.09233265370130539,
-0.21742913126945496,
0.2044917792081833,
0.03368116915225983,
0.025808528065681458,
0.17968463897705078,
0.0730523020029068,
-0.16072432696819305,
-0.01106140948832035,
-0.0784519836306572,
-0.10354474931955338,
0.1354629248380661,
0.11696359515190125,
0.1331278383731842,
-0.4173748791217804,
0.19202920794487,
0.10847945511341095,
0.32974663376808167,
-0.13577213883399963,
0.11781715601682663,
0.1222362071275711,
0.03997274115681648,
0.3655340373516083,
0.12343069911003113,
0.14983128011226654,
0.45560044050216675,
0.03052617236971855,
0.12635424733161926,
-0.004974493756890297,
0.32711920142173767,
0.15566036105155945,
0.012749645859003067,
-0.13295888900756836,
-0.029277656227350235,
-0.11351632326841354,
0.3166729509830475,
-0.08453336358070374,
0.2671486735343933,
0.2927597761154175,
-0.07651875913143158,
-0.004859514534473419,
-0.09782737493515015,
0.15339845418930054,
0.05220832675695419,
0.069904625415802,
0.10658863931894302,
-0.09984414279460907,
0.3596494197845459,
-0.12939275801181793,
0.264309823513031,
0.17554178833961487,
0.18633411824703217,
0.2091355174779892,
0.13508090376853943,
-0.01117603201419115,
-0.18828310072422028,
-0.1296800971031189,
0.06999470293521881,
0.3717179298400879,
0.06918404996395111,
0.16594617068767548,
-0.04843468591570854,
-0.1418597549200058,
0.0841902494430542,
-0.05239185318350792,
-0.2509417235851288,
-0.2163161039352417,
-0.12563854455947876,
-0.0857282429933548,
0.09158365428447723,
-0.00010400720202596858,
-0.3266661763191223,
-0.07210301607847214,
0.06216660141944885,
-0.3203507661819458,
-0.16056855022907257,
-0.2981228232383728,
-0.36844947934150696,
0.07678727805614471,
0.38712987303733826,
0.11129036545753479,
0.295210063457489,
-0.33262917399406433,
-0.19187872111797333,
-0.0899449810385704,
-0.2681106626987457,
-0.014314225874841213,
-0.15696944296360016,
0.2413957118988037,
-0.024117276072502136,
0.7152191400527954,
-0.17999613285064697,
-0.25142186880111694,
0.1846493035554886,
-0.00701964320614934,
0.06587415933609009,
0.2497716248035431,
-0.1534789502620697,
-0.042924001812934875,
0.08453565835952759,
-0.4856535494327545,
-0.5155774354934692,
-0.2696571946144104,
0.012519567273557186,
0.04851744323968887,
0.08780695497989655,
0.16864076256752014,
0.1924835741519928,
0.06802622973918915,
0.12118712812662125,
0.18090730905532837,
-0.19004331529140472,
-0.1518692821264267,
0.4496891498565674,
-0.02741323597729206,
-0.4299623370170593,
0.18818649649620056,
0.010994188487529755,
0.31493332982063293,
0.007926318794488907,
-0.6572356820106506,
0.14411252737045288,
-0.276358962059021,
0.24994182586669922,
-0.021993543952703476,
0.1834762841463089,
0.11434464901685715,
-0.21369695663452148,
0.04797257483005524,
0.04499596357345581,
0.10590972006320953,
-0.04062100499868393,
-0.2095249891281128,
0.25562170147895813,
0.02994537353515625,
0.2961861491203308,
0.16442067921161652,
0.688840389251709,
0.05485635623335838,
0.16584032773971558,
0.4367818832397461,
0.2385822832584381,
0.23103071749210358,
-0.23142893612384796,
-0.36457201838493347,
0.0605749674141407,
-0.2394915372133255,
-0.031003324314951897,
0.26701223850250244,
-0.16232074797153473,
-0.46741729974746704,
-0.34771326184272766,
-0.2426856905221939,
-0.36746734380722046,
-0.21077078580856323,
0.15399761497974396,
-0.05018191039562225,
0.08294060826301575,
0.0575956255197525,
0.12039817124605179,
0.021574079990386963,
-0.28234976530075073,
0.21378852427005768,
0.5317094922065735,
-0.2486019730567932,
0.16858986020088196,
-0.2782670557498932,
-0.34212255477905273,
-0.4126342236995697,
0.25245562195777893,
0.07770632207393646,
0.41476181149482727,
-0.09380224347114563,
0.34991952776908875,
0.20117996633052826,
-0.0892682746052742,
0.2906241714954376,
-0.17024348676204681,
0.12304995208978653,
0.19724728167057037,
0.10499279201030731,
-0.215217724442482,
-0.062440209090709686,
-0.29433268308639526,
-0.016687719151377678,
0.3054172396659851,
-0.04445454478263855,
-0.6709661483764648,
0.08432866632938385,
-0.042586762458086014,
0.5003295540809631,
-0.05717724561691284,
-0.01735015958547592,
-0.1618575006723404,
-0.5653650760650635,
-0.48540446162223816,
-0.02768666297197342,
0.18957556784152985,
0.4046100080013275,
-0.1972091645002365,
0.26289883255958557,
-0.10207898169755936,
0.2205621600151062,
0.021316133439540863,
0.007735301740467548,
0.21325728297233582,
0.23278552293777466,
0.09743330627679825,
-0.1967879980802536,
-0.13784664869308472,
0.15032637119293213,
0.3620433211326599,
-0.06353205442428589,
-0.23431222140789032,
-0.12124703079462051,
-0.04300352931022644,
0.04348337650299072,
0.1415460705757141,
-0.10129061341285706,
0.04770750552415848,
0.14866259694099426,
-0.1379348486661911,
0.16582104563713074,
-0.01284150592982769,
0.2519466280937195,
-0.10633731633424759,
-0.49623504281044006,
-0.5676649808883667,
0.6620463132858276,
0.02338246814906597,
0.07014172524213791,
0.2541702091693878,
0.175403892993927,
-0.1958615630865097,
0.37537336349487305,
0.1058034598827362,
1.1372191905975342,
-0.22813422977924347,
0.11042021960020065,
-0.1039847731590271,
0.10946564376354218,
0.3614175617694855,
-0.3578394949436188,
0.2084072083234787,
-0.3226420283317566,
-0.1089080199599266,
-0.01951933279633522,
0.07367415726184845,
-0.04613826051354408,
0.09989331662654877,
-0.30722832679748535,
0.2564426064491272,
-0.3662327826023102,
-0.08695473521947861,
0.10564911365509033,
0.23298609256744385,
-0.4058893620967865,
-0.06803661584854126,
-0.32137972116470337,
0.11962873488664627,
-0.21466071903705597,
0.25469282269477844,
-0.21100129187107086,
-0.12547826766967773,
-0.06142396852374077,
-0.2672703266143799,
-0.5050501823425293,
0.07064317911863327,
-0.2883508801460266,
0.32986950874328613,
-0.4893506169319153,
-0.18977464735507965,
0.338620662689209,
0.44487112760543823,
0.041480373591184616,
0.4031551480293274,
-0.2879830598831177,
0.1116526648402214,
-0.2638600170612335,
-0.42361924052238464,
0.09449119120836258,
0.011207900010049343,
0.08713383227586746,
-0.18162909150123596,
-0.3709903955459595,
0.16697277128696442,
-0.057572249323129654,
0.05284922197461128,
-0.09598775207996368,
0.10437755286693573,
0.20165425539016724,
-0.045897744596004486,
-0.3565557301044464,
-0.02228337898850441,
-0.09438604861497879,
-0.08943308889865875,
0.12416666746139526,
0.08219719678163528,
-0.1119045615196228,
0.14091400802135468,
0.1852954924106598,
-0.3349809944629669,
0.02179165743291378,
0.34910571575164795,
0.1834498643875122,
0.02395452931523323,
0.6245270371437073,
0.31554484367370605,
-0.39654046297073364,
-0.18981511890888214,
0.0439140684902668,
-0.2713777422904968,
-0.458574503660202,
-0.08960459381341934,
-0.04218949377536774,
0.33834314346313477,
-0.4149280786514282,
0.35025349259376526,
0.17490629851818085,
-0.23483094573020935,
0.20646440982818604,
-0.7065882682800293,
-0.12402196228504181,
0.21609379351139069,
-0.07890939712524414,
0.006574923172593117,
0.08407143503427505,
-0.30959925055503845,
0.12182705104351044,
0.2352641075849533,
-0.2610889971256256,
0.2092306762933731,
-0.32334259152412415,
0.10076376795768738,
0.09949345886707306,
0.06333241611719131,
0.02230171114206314,
0.1991029679775238,
0.06504811346530914,
0.06916210800409317,
-0.049663886427879333,
-0.25991007685661316,
-0.07022765278816223,
0.1948125660419464,
0.20511353015899658,
-0.05790058150887489,
0.22787503898143768,
-0.5071967840194702,
-0.16867011785507202,
0.08223902434110641,
-0.05847622826695442,
0.11558449268341064,
0.003860039869323373,
0.18110066652297974,
0.20132511854171753,
0.28857046365737915,
-0.35007989406585693,
0.24587731063365936,
-0.08690531551837921,
0.26149821281433105,
0.14082810282707214,
0.07593598961830139,
0.45799243450164795,
0.021300949156284332,
-0.3352101743221283,
-0.033541854470968246,
-0.030077140778303146,
0.08663526177406311,
0.25588056445121765,
-0.23335884511470795,
0.3003470003604889,
0.19892019033432007,
-0.11749520152807236,
0.5623857378959656,
-0.14960479736328125,
0.20659619569778442,
0.41308388113975525,
0.18722347915172577,
-0.3698638081550598,
0.0016460552578791976,
0.2932005524635315,
-0.09663773328065872,
-0.0709826871752739,
0.07596095651388168,
0.2589091956615448,
-0.32232800126075745,
0.11372118443250656,
-0.06573889404535294,
0.1647823601961136,
-0.05655081197619438,
0.19225868582725525,
0.6700755953788757,
0.22707323729991913,
0.04992584139108658,
-0.0694633275270462,
0.16999280452728271,
0.09539502114057541,
0.36280637979507446,
-0.22345663607120514,
0.19276422262191772,
-0.05200457200407982,
0.02463534101843834,
-0.1621609926223755,
-0.3400551676750183,
0.29861074686050415,
0.1632014513015747,
-0.02477487362921238,
0.09867575764656067,
-0.17225874960422516,
0.2616479992866516,
0.15435945987701416,
0.03022289089858532,
-0.26115575432777405,
0.1914433091878891,
-0.12247779965400696,
-0.012982994318008423,
-0.0442100390791893,
-0.2680068016052246,
0.0015667247353121638,
0.15562571585178375,
-0.004661692772060633,
-0.3565726578235626,
0.2555730938911438,
0.3037436306476593,
-0.244086354970932,
-0.4411390423774719,
0.1348092257976532,
0.21249373257160187,
0.03117004781961441,
-0.3002215027809143,
0.15776211023330688,
0.41378042101860046,
0.07809178531169891,
-0.12705528736114502,
0.2019166350364685,
0.4433468282222748,
0.4205474555492401,
-0.3373265266418457,
0.04244174063205719,
0.07533987611532211,
-0.06568092107772827,
-0.023378299549221992,
0.2276100218296051,
0.46722543239593506,
0.2502676248550415,
0.3970099687576294,
0.1184258908033371,
-0.1415998488664627,
-0.03197430446743965,
0.23604975640773773,
-0.06391855329275131,
-0.05667095258831978,
-0.045184873044490814,
-0.0590362623333931,
0.14072102308273315,
-0.4205537736415863,
-0.013584437780082226,
-0.5078697800636292,
0.34002241492271423,
0.16105566918849945,
0.0025867712683975697,
0.17752934992313385,
-0.09258142858743668,
0.0479857474565506,
-0.15697626769542694,
0.39629343152046204,
0.3195849657058716,
0.199141263961792,
-0.3908330202102661,
-0.00899566151201725,
-0.464518666267395,
-0.018635312095284462,
-0.2982341945171356,
0.11210162192583084,
-0.08143274486064911,
0.12865565717220306,
0.07550838589668274,
0.2132711261510849,
0.036631617695093155,
0.04509863629937172,
0.0668022632598877,
0.49491584300994873,
-0.23153194785118103,
-0.24470354616641998,
-0.19481728971004486,
0.21916253864765167,
-0.15832364559173584,
-0.39093199372291565,
0.05759391561150551,
-0.13856172561645508,
0.03407328575849533,
-0.32001999020576477,
-0.06650064140558243,
0.09557345509529114,
0.0059599494561553,
0.33242881298065186,
0.1523781716823578,
0.5925301313400269,
-0.15409474074840546,
-0.20217524468898773,
-0.2086707204580307,
-0.011070453561842442,
-0.159934863448143,
0.3116772770881653,
0.1967301219701767,
0.09890691936016083,
-0.16079406440258026,
-0.11197122931480408,
-0.029564393684267998,
0.2984878122806549,
-0.044816866517066956,
0.19492152333259583,
-0.36696019768714905,
-0.38635677099227905,
0.05791785567998886,
0.11385567486286163,
0.11902748048305511,
0.04692574217915535,
-0.13085585832595825,
-0.0533188059926033,
-0.342149943113327,
-0.3086865544319153,
0.3866538405418396,
-0.3773029148578644,
-0.5697821974754333,
-0.09215575456619263,
0.007928472012281418,
0.04705652594566345,
0.1902984380722046,
-0.3660876452922821,
0.2775554358959198,
0.3897731900215149,
0.051333703100681305,
-0.15096808969974518,
0.16642248630523682,
0.0286492221057415,
-0.01621520146727562,
-0.09404339641332626,
0.11607001721858978,
-0.008283792994916439,
-0.35631418228149414,
-0.22058486938476562,
-0.3912579417228699
] |
https://github.com/huggingface/datasets/issues/2035
|
wiki40b/wikipedia for almost all languages cannot be downloaded
|
Hi @dorost1234,
Try installing this library first, `pip install 'apache-beam[gcp]' --use-feature=2020-resolver` followed by loading dataset like this using beam runner.
`dataset = load_dataset("wiki40b", "cs", beam_runner='DirectRunner')`
I also read in error stack trace that:
> Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc.
Worked perfectly fine after this (Ignore these warnings)

|
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
| 83
|
wiki40b/wikipedia for almost all languages cannot be downloaded
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
Hi @dorost1234,
Try installing this library first, `pip install 'apache-beam[gcp]' --use-feature=2020-resolver` followed by loading dataset like this using beam runner.
`dataset = load_dataset("wiki40b", "cs", beam_runner='DirectRunner')`
I also read in error stack trace that:
> Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc.
Worked perfectly fine after this (Ignore these warnings)

|
[
-0.25449883937835693,
-0.07791971415281296,
-0.1537584364414215,
0.43086686730384827,
0.39970263838768005,
0.3504616618156433,
0.1368502825498581,
0.5331583619117737,
0.1893267184495926,
0.023584548383951187,
-0.17730441689491272,
-0.09421756118535995,
0.0944039598107338,
0.011184575967490673,
-0.0297053474932909,
-0.4591730237007141,
-0.0672900378704071,
0.02953762747347355,
-0.13527131080627441,
-0.11689324676990509,
-0.2519628405570984,
0.12561438977718353,
-0.07917481660842896,
-0.04902834817767143,
-0.038746144622564316,
-0.18283997476100922,
-0.09583571553230286,
-0.20730605721473694,
-0.3507463335990906,
-0.24086488783359528,
0.35457831621170044,
0.019257647916674614,
0.31011223793029785,
0.15299740433692932,
-0.00011143678420921788,
-0.0509641170501709,
0.3131164610385895,
-0.2357948273420334,
-0.29361221194267273,
-0.2888581156730652,
-0.07208938151597977,
-0.3261854648590088,
-0.09043888747692108,
-0.42003169655799866,
0.12744581699371338,
0.04668239504098892,
0.0806712880730629,
-0.13180148601531982,
0.07575755566358566,
0.2992260754108429,
0.2468714565038681,
-0.14260362088680267,
0.3134343922138214,
-0.1457379013299942,
0.3651953637599945,
-0.3777082562446594,
-0.028033530339598656,
0.3395863175392151,
0.218720480799675,
0.07134398818016052,
0.21547909080982208,
0.22204311192035675,
-0.23414066433906555,
0.01349933072924614,
0.04822405055165291,
-0.29122394323349,
0.22220534086227417,
-0.629701554775238,
0.520641565322876,
0.5344274044036865,
0.8290324211120605,
-0.12835131585597992,
-0.08746717870235443,
0.072393499314785,
-0.026059571653604507,
-0.03137509524822235,
-0.05574026703834534,
0.4819800853729248,
-0.18932609260082245,
0.09759890288114548,
0.12616471946239471,
-0.12543044984340668,
-0.15671950578689575,
0.4228460192680359,
-0.1241353303194046,
0.4435884952545166,
-0.05272023379802704,
0.2112599015235901,
-0.0216665156185627,
-0.10270167887210846,
-0.26364099979400635,
-0.06965858489274979,
-0.09616053104400635,
0.2933219373226166,
-0.2793998122215271,
0.019636234268546104,
-0.16150297224521637,
0.05564657226204872,
0.3511344790458679,
-0.15038257837295532,
-0.23462128639221191,
-0.04507802054286003,
0.09601198881864548,
0.15757520496845245,
0.18014878034591675,
0.16378413140773773,
0.0620487779378891,
-0.2000061571598053,
0.2782810628414154,
0.3079039752483368,
-0.08421274274587631,
-0.0761713758111,
-0.2100439965724945,
-0.22305718064308167,
-0.2947562336921692,
0.0944298505783081,
0.08752915263175964,
-0.20317110419273376,
-0.17794694006443024,
0.007112853229045868,
-0.1443609744310379,
-0.01943882554769516,
-0.20239461958408356,
0.36282142996788025,
-0.15014299750328064,
0.43123751878738403,
0.17790168523788452,
0.328822523355484,
-0.10357245802879333,
-0.26130956411361694,
-0.01735268346965313,
0.30654871463775635,
-0.1393190324306488,
-0.1036604642868042,
0.21878241002559662,
-0.10991638898849487,
0.2648518681526184,
-0.08937306702136993,
-0.10313830524682999,
-0.1764124035835266,
-0.1536906510591507,
-0.3695681393146515,
-0.17910411953926086,
0.23040896654129028,
0.1619766354560852,
0.28392747044563293,
0.1476142555475235,
-0.24474751949310303,
-0.23058052361011505,
0.12074483931064606,
-0.3596149981021881,
-0.16815562546253204,
-0.20515534281730652,
0.19446861743927002,
0.06109855696558952,
-0.0546499527990818,
-0.31600698828697205,
0.2876638174057007,
0.3030637502670288,
-0.1423981487751007,
0.1180722787976265,
-0.007545265834778547,
-0.023254673928022385,
-0.22518932819366455,
0.17901143431663513,
0.49079981446266174,
-0.39995941519737244,
0.09189733117818832,
-0.02385012060403824,
-0.03371269255876541,
0.18978251516819,
0.18429774045944214,
-0.17795206606388092,
0.25654172897338867,
-0.09788442403078079,
0.038160406053066254,
0.21013252437114716,
-0.32144269347190857,
-0.5776352882385254,
0.18605440855026245,
0.11341046541929245,
-0.16700491309165955,
0.09948059916496277,
0.016000358387827873,
0.27503105998039246,
-0.04938732087612152,
0.05245454981923103,
0.39567452669143677,
0.13683775067329407,
-0.10564517974853516,
-0.32745084166526794,
-0.5078237056732178,
0.32648128271102905,
0.1633184254169464,
0.45471417903900146,
-0.1322697550058365,
0.27598556876182556,
0.2917204797267914,
0.3191738724708557,
-0.19154725968837738,
0.12467864900827408,
0.23336075246334076,
-0.00894821248948574,
-0.04457567259669304,
-0.0025626758579164743,
-0.33102720975875854,
-0.30975762009620667,
0.14775988459587097,
0.10291292518377304,
0.16546472907066345,
-0.160955548286438,
0.029683437198400497,
-0.31619006395339966,
-0.08880765736103058,
-0.1953120082616806,
0.10326860100030899,
0.1995640993118286,
-0.1052766740322113,
0.11959367990493774,
0.4854587912559509,
0.1265171468257904,
-0.09945830702781677,
-0.4156898558139801,
-0.09485310316085815,
-0.17893461883068085,
0.09233265370130539,
-0.21742913126945496,
0.2044917792081833,
0.03368116915225983,
0.025808528065681458,
0.17968463897705078,
0.0730523020029068,
-0.16072432696819305,
-0.01106140948832035,
-0.0784519836306572,
-0.10354474931955338,
0.1354629248380661,
0.11696359515190125,
0.1331278383731842,
-0.4173748791217804,
0.19202920794487,
0.10847945511341095,
0.32974663376808167,
-0.13577213883399963,
0.11781715601682663,
0.1222362071275711,
0.03997274115681648,
0.3655340373516083,
0.12343069911003113,
0.14983128011226654,
0.45560044050216675,
0.03052617236971855,
0.12635424733161926,
-0.004974493756890297,
0.32711920142173767,
0.15566036105155945,
0.012749645859003067,
-0.13295888900756836,
-0.029277656227350235,
-0.11351632326841354,
0.3166729509830475,
-0.08453336358070374,
0.2671486735343933,
0.2927597761154175,
-0.07651875913143158,
-0.004859514534473419,
-0.09782737493515015,
0.15339845418930054,
0.05220832675695419,
0.069904625415802,
0.10658863931894302,
-0.09984414279460907,
0.3596494197845459,
-0.12939275801181793,
0.264309823513031,
0.17554178833961487,
0.18633411824703217,
0.2091355174779892,
0.13508090376853943,
-0.01117603201419115,
-0.18828310072422028,
-0.1296800971031189,
0.06999470293521881,
0.3717179298400879,
0.06918404996395111,
0.16594617068767548,
-0.04843468591570854,
-0.1418597549200058,
0.0841902494430542,
-0.05239185318350792,
-0.2509417235851288,
-0.2163161039352417,
-0.12563854455947876,
-0.0857282429933548,
0.09158365428447723,
-0.00010400720202596858,
-0.3266661763191223,
-0.07210301607847214,
0.06216660141944885,
-0.3203507661819458,
-0.16056855022907257,
-0.2981228232383728,
-0.36844947934150696,
0.07678727805614471,
0.38712987303733826,
0.11129036545753479,
0.295210063457489,
-0.33262917399406433,
-0.19187872111797333,
-0.0899449810385704,
-0.2681106626987457,
-0.014314225874841213,
-0.15696944296360016,
0.2413957118988037,
-0.024117276072502136,
0.7152191400527954,
-0.17999613285064697,
-0.25142186880111694,
0.1846493035554886,
-0.00701964320614934,
0.06587415933609009,
0.2497716248035431,
-0.1534789502620697,
-0.042924001812934875,
0.08453565835952759,
-0.4856535494327545,
-0.5155774354934692,
-0.2696571946144104,
0.012519567273557186,
0.04851744323968887,
0.08780695497989655,
0.16864076256752014,
0.1924835741519928,
0.06802622973918915,
0.12118712812662125,
0.18090730905532837,
-0.19004331529140472,
-0.1518692821264267,
0.4496891498565674,
-0.02741323597729206,
-0.4299623370170593,
0.18818649649620056,
0.010994188487529755,
0.31493332982063293,
0.007926318794488907,
-0.6572356820106506,
0.14411252737045288,
-0.276358962059021,
0.24994182586669922,
-0.021993543952703476,
0.1834762841463089,
0.11434464901685715,
-0.21369695663452148,
0.04797257483005524,
0.04499596357345581,
0.10590972006320953,
-0.04062100499868393,
-0.2095249891281128,
0.25562170147895813,
0.02994537353515625,
0.2961861491203308,
0.16442067921161652,
0.688840389251709,
0.05485635623335838,
0.16584032773971558,
0.4367818832397461,
0.2385822832584381,
0.23103071749210358,
-0.23142893612384796,
-0.36457201838493347,
0.0605749674141407,
-0.2394915372133255,
-0.031003324314951897,
0.26701223850250244,
-0.16232074797153473,
-0.46741729974746704,
-0.34771326184272766,
-0.2426856905221939,
-0.36746734380722046,
-0.21077078580856323,
0.15399761497974396,
-0.05018191039562225,
0.08294060826301575,
0.0575956255197525,
0.12039817124605179,
0.021574079990386963,
-0.28234976530075073,
0.21378852427005768,
0.5317094922065735,
-0.2486019730567932,
0.16858986020088196,
-0.2782670557498932,
-0.34212255477905273,
-0.4126342236995697,
0.25245562195777893,
0.07770632207393646,
0.41476181149482727,
-0.09380224347114563,
0.34991952776908875,
0.20117996633052826,
-0.0892682746052742,
0.2906241714954376,
-0.17024348676204681,
0.12304995208978653,
0.19724728167057037,
0.10499279201030731,
-0.215217724442482,
-0.062440209090709686,
-0.29433268308639526,
-0.016687719151377678,
0.3054172396659851,
-0.04445454478263855,
-0.6709661483764648,
0.08432866632938385,
-0.042586762458086014,
0.5003295540809631,
-0.05717724561691284,
-0.01735015958547592,
-0.1618575006723404,
-0.5653650760650635,
-0.48540446162223816,
-0.02768666297197342,
0.18957556784152985,
0.4046100080013275,
-0.1972091645002365,
0.26289883255958557,
-0.10207898169755936,
0.2205621600151062,
0.021316133439540863,
0.007735301740467548,
0.21325728297233582,
0.23278552293777466,
0.09743330627679825,
-0.1967879980802536,
-0.13784664869308472,
0.15032637119293213,
0.3620433211326599,
-0.06353205442428589,
-0.23431222140789032,
-0.12124703079462051,
-0.04300352931022644,
0.04348337650299072,
0.1415460705757141,
-0.10129061341285706,
0.04770750552415848,
0.14866259694099426,
-0.1379348486661911,
0.16582104563713074,
-0.01284150592982769,
0.2519466280937195,
-0.10633731633424759,
-0.49623504281044006,
-0.5676649808883667,
0.6620463132858276,
0.02338246814906597,
0.07014172524213791,
0.2541702091693878,
0.175403892993927,
-0.1958615630865097,
0.37537336349487305,
0.1058034598827362,
1.1372191905975342,
-0.22813422977924347,
0.11042021960020065,
-0.1039847731590271,
0.10946564376354218,
0.3614175617694855,
-0.3578394949436188,
0.2084072083234787,
-0.3226420283317566,
-0.1089080199599266,
-0.01951933279633522,
0.07367415726184845,
-0.04613826051354408,
0.09989331662654877,
-0.30722832679748535,
0.2564426064491272,
-0.3662327826023102,
-0.08695473521947861,
0.10564911365509033,
0.23298609256744385,
-0.4058893620967865,
-0.06803661584854126,
-0.32137972116470337,
0.11962873488664627,
-0.21466071903705597,
0.25469282269477844,
-0.21100129187107086,
-0.12547826766967773,
-0.06142396852374077,
-0.2672703266143799,
-0.5050501823425293,
0.07064317911863327,
-0.2883508801460266,
0.32986950874328613,
-0.4893506169319153,
-0.18977464735507965,
0.338620662689209,
0.44487112760543823,
0.041480373591184616,
0.4031551480293274,
-0.2879830598831177,
0.1116526648402214,
-0.2638600170612335,
-0.42361924052238464,
0.09449119120836258,
0.011207900010049343,
0.08713383227586746,
-0.18162909150123596,
-0.3709903955459595,
0.16697277128696442,
-0.057572249323129654,
0.05284922197461128,
-0.09598775207996368,
0.10437755286693573,
0.20165425539016724,
-0.045897744596004486,
-0.3565557301044464,
-0.02228337898850441,
-0.09438604861497879,
-0.08943308889865875,
0.12416666746139526,
0.08219719678163528,
-0.1119045615196228,
0.14091400802135468,
0.1852954924106598,
-0.3349809944629669,
0.02179165743291378,
0.34910571575164795,
0.1834498643875122,
0.02395452931523323,
0.6245270371437073,
0.31554484367370605,
-0.39654046297073364,
-0.18981511890888214,
0.0439140684902668,
-0.2713777422904968,
-0.458574503660202,
-0.08960459381341934,
-0.04218949377536774,
0.33834314346313477,
-0.4149280786514282,
0.35025349259376526,
0.17490629851818085,
-0.23483094573020935,
0.20646440982818604,
-0.7065882682800293,
-0.12402196228504181,
0.21609379351139069,
-0.07890939712524414,
0.006574923172593117,
0.08407143503427505,
-0.30959925055503845,
0.12182705104351044,
0.2352641075849533,
-0.2610889971256256,
0.2092306762933731,
-0.32334259152412415,
0.10076376795768738,
0.09949345886707306,
0.06333241611719131,
0.02230171114206314,
0.1991029679775238,
0.06504811346530914,
0.06916210800409317,
-0.049663886427879333,
-0.25991007685661316,
-0.07022765278816223,
0.1948125660419464,
0.20511353015899658,
-0.05790058150887489,
0.22787503898143768,
-0.5071967840194702,
-0.16867011785507202,
0.08223902434110641,
-0.05847622826695442,
0.11558449268341064,
0.003860039869323373,
0.18110066652297974,
0.20132511854171753,
0.28857046365737915,
-0.35007989406585693,
0.24587731063365936,
-0.08690531551837921,
0.26149821281433105,
0.14082810282707214,
0.07593598961830139,
0.45799243450164795,
0.021300949156284332,
-0.3352101743221283,
-0.033541854470968246,
-0.030077140778303146,
0.08663526177406311,
0.25588056445121765,
-0.23335884511470795,
0.3003470003604889,
0.19892019033432007,
-0.11749520152807236,
0.5623857378959656,
-0.14960479736328125,
0.20659619569778442,
0.41308388113975525,
0.18722347915172577,
-0.3698638081550598,
0.0016460552578791976,
0.2932005524635315,
-0.09663773328065872,
-0.0709826871752739,
0.07596095651388168,
0.2589091956615448,
-0.32232800126075745,
0.11372118443250656,
-0.06573889404535294,
0.1647823601961136,
-0.05655081197619438,
0.19225868582725525,
0.6700755953788757,
0.22707323729991913,
0.04992584139108658,
-0.0694633275270462,
0.16999280452728271,
0.09539502114057541,
0.36280637979507446,
-0.22345663607120514,
0.19276422262191772,
-0.05200457200407982,
0.02463534101843834,
-0.1621609926223755,
-0.3400551676750183,
0.29861074686050415,
0.1632014513015747,
-0.02477487362921238,
0.09867575764656067,
-0.17225874960422516,
0.2616479992866516,
0.15435945987701416,
0.03022289089858532,
-0.26115575432777405,
0.1914433091878891,
-0.12247779965400696,
-0.012982994318008423,
-0.0442100390791893,
-0.2680068016052246,
0.0015667247353121638,
0.15562571585178375,
-0.004661692772060633,
-0.3565726578235626,
0.2555730938911438,
0.3037436306476593,
-0.244086354970932,
-0.4411390423774719,
0.1348092257976532,
0.21249373257160187,
0.03117004781961441,
-0.3002215027809143,
0.15776211023330688,
0.41378042101860046,
0.07809178531169891,
-0.12705528736114502,
0.2019166350364685,
0.4433468282222748,
0.4205474555492401,
-0.3373265266418457,
0.04244174063205719,
0.07533987611532211,
-0.06568092107772827,
-0.023378299549221992,
0.2276100218296051,
0.46722543239593506,
0.2502676248550415,
0.3970099687576294,
0.1184258908033371,
-0.1415998488664627,
-0.03197430446743965,
0.23604975640773773,
-0.06391855329275131,
-0.05667095258831978,
-0.045184873044490814,
-0.0590362623333931,
0.14072102308273315,
-0.4205537736415863,
-0.013584437780082226,
-0.5078697800636292,
0.34002241492271423,
0.16105566918849945,
0.0025867712683975697,
0.17752934992313385,
-0.09258142858743668,
0.0479857474565506,
-0.15697626769542694,
0.39629343152046204,
0.3195849657058716,
0.199141263961792,
-0.3908330202102661,
-0.00899566151201725,
-0.464518666267395,
-0.018635312095284462,
-0.2982341945171356,
0.11210162192583084,
-0.08143274486064911,
0.12865565717220306,
0.07550838589668274,
0.2132711261510849,
0.036631617695093155,
0.04509863629937172,
0.0668022632598877,
0.49491584300994873,
-0.23153194785118103,
-0.24470354616641998,
-0.19481728971004486,
0.21916253864765167,
-0.15832364559173584,
-0.39093199372291565,
0.05759391561150551,
-0.13856172561645508,
0.03407328575849533,
-0.32001999020576477,
-0.06650064140558243,
0.09557345509529114,
0.0059599494561553,
0.33242881298065186,
0.1523781716823578,
0.5925301313400269,
-0.15409474074840546,
-0.20217524468898773,
-0.2086707204580307,
-0.011070453561842442,
-0.159934863448143,
0.3116772770881653,
0.1967301219701767,
0.09890691936016083,
-0.16079406440258026,
-0.11197122931480408,
-0.029564393684267998,
0.2984878122806549,
-0.044816866517066956,
0.19492152333259583,
-0.36696019768714905,
-0.38635677099227905,
0.05791785567998886,
0.11385567486286163,
0.11902748048305511,
0.04692574217915535,
-0.13085585832595825,
-0.0533188059926033,
-0.342149943113327,
-0.3086865544319153,
0.3866538405418396,
-0.3773029148578644,
-0.5697821974754333,
-0.09215575456619263,
0.007928472012281418,
0.04705652594566345,
0.1902984380722046,
-0.3660876452922821,
0.2775554358959198,
0.3897731900215149,
0.051333703100681305,
-0.15096808969974518,
0.16642248630523682,
0.0286492221057415,
-0.01621520146727562,
-0.09404339641332626,
0.11607001721858978,
-0.008283792994916439,
-0.35631418228149414,
-0.22058486938476562,
-0.3912579417228699
] |
https://github.com/huggingface/datasets/issues/2035
|
wiki40b/wikipedia for almost all languages cannot be downloaded
|
For wikipedia dataset, looks like the files it's looking for are no longer available. For `bg`, I checked [here](https://dumps.wikimedia.org/bgwiki/). For this I think `dataset_infos.json` for this dataset has to made again? You'll have to load this dataset also using beam runner.
|
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
| 41
|
wiki40b/wikipedia for almost all languages cannot be downloaded
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
For wikipedia dataset, looks like the files it's looking for are no longer available. For `bg`, I checked [here](https://dumps.wikimedia.org/bgwiki/). For this I think `dataset_infos.json` for this dataset has to made again? You'll have to load this dataset also using beam runner.
|
[
-0.25449883937835693,
-0.07791971415281296,
-0.1537584364414215,
0.43086686730384827,
0.39970263838768005,
0.3504616618156433,
0.1368502825498581,
0.5331583619117737,
0.1893267184495926,
0.023584548383951187,
-0.17730441689491272,
-0.09421756118535995,
0.0944039598107338,
0.011184575967490673,
-0.0297053474932909,
-0.4591730237007141,
-0.0672900378704071,
0.02953762747347355,
-0.13527131080627441,
-0.11689324676990509,
-0.2519628405570984,
0.12561438977718353,
-0.07917481660842896,
-0.04902834817767143,
-0.038746144622564316,
-0.18283997476100922,
-0.09583571553230286,
-0.20730605721473694,
-0.3507463335990906,
-0.24086488783359528,
0.35457831621170044,
0.019257647916674614,
0.31011223793029785,
0.15299740433692932,
-0.00011143678420921788,
-0.0509641170501709,
0.3131164610385895,
-0.2357948273420334,
-0.29361221194267273,
-0.2888581156730652,
-0.07208938151597977,
-0.3261854648590088,
-0.09043888747692108,
-0.42003169655799866,
0.12744581699371338,
0.04668239504098892,
0.0806712880730629,
-0.13180148601531982,
0.07575755566358566,
0.2992260754108429,
0.2468714565038681,
-0.14260362088680267,
0.3134343922138214,
-0.1457379013299942,
0.3651953637599945,
-0.3777082562446594,
-0.028033530339598656,
0.3395863175392151,
0.218720480799675,
0.07134398818016052,
0.21547909080982208,
0.22204311192035675,
-0.23414066433906555,
0.01349933072924614,
0.04822405055165291,
-0.29122394323349,
0.22220534086227417,
-0.629701554775238,
0.520641565322876,
0.5344274044036865,
0.8290324211120605,
-0.12835131585597992,
-0.08746717870235443,
0.072393499314785,
-0.026059571653604507,
-0.03137509524822235,
-0.05574026703834534,
0.4819800853729248,
-0.18932609260082245,
0.09759890288114548,
0.12616471946239471,
-0.12543044984340668,
-0.15671950578689575,
0.4228460192680359,
-0.1241353303194046,
0.4435884952545166,
-0.05272023379802704,
0.2112599015235901,
-0.0216665156185627,
-0.10270167887210846,
-0.26364099979400635,
-0.06965858489274979,
-0.09616053104400635,
0.2933219373226166,
-0.2793998122215271,
0.019636234268546104,
-0.16150297224521637,
0.05564657226204872,
0.3511344790458679,
-0.15038257837295532,
-0.23462128639221191,
-0.04507802054286003,
0.09601198881864548,
0.15757520496845245,
0.18014878034591675,
0.16378413140773773,
0.0620487779378891,
-0.2000061571598053,
0.2782810628414154,
0.3079039752483368,
-0.08421274274587631,
-0.0761713758111,
-0.2100439965724945,
-0.22305718064308167,
-0.2947562336921692,
0.0944298505783081,
0.08752915263175964,
-0.20317110419273376,
-0.17794694006443024,
0.007112853229045868,
-0.1443609744310379,
-0.01943882554769516,
-0.20239461958408356,
0.36282142996788025,
-0.15014299750328064,
0.43123751878738403,
0.17790168523788452,
0.328822523355484,
-0.10357245802879333,
-0.26130956411361694,
-0.01735268346965313,
0.30654871463775635,
-0.1393190324306488,
-0.1036604642868042,
0.21878241002559662,
-0.10991638898849487,
0.2648518681526184,
-0.08937306702136993,
-0.10313830524682999,
-0.1764124035835266,
-0.1536906510591507,
-0.3695681393146515,
-0.17910411953926086,
0.23040896654129028,
0.1619766354560852,
0.28392747044563293,
0.1476142555475235,
-0.24474751949310303,
-0.23058052361011505,
0.12074483931064606,
-0.3596149981021881,
-0.16815562546253204,
-0.20515534281730652,
0.19446861743927002,
0.06109855696558952,
-0.0546499527990818,
-0.31600698828697205,
0.2876638174057007,
0.3030637502670288,
-0.1423981487751007,
0.1180722787976265,
-0.007545265834778547,
-0.023254673928022385,
-0.22518932819366455,
0.17901143431663513,
0.49079981446266174,
-0.39995941519737244,
0.09189733117818832,
-0.02385012060403824,
-0.03371269255876541,
0.18978251516819,
0.18429774045944214,
-0.17795206606388092,
0.25654172897338867,
-0.09788442403078079,
0.038160406053066254,
0.21013252437114716,
-0.32144269347190857,
-0.5776352882385254,
0.18605440855026245,
0.11341046541929245,
-0.16700491309165955,
0.09948059916496277,
0.016000358387827873,
0.27503105998039246,
-0.04938732087612152,
0.05245454981923103,
0.39567452669143677,
0.13683775067329407,
-0.10564517974853516,
-0.32745084166526794,
-0.5078237056732178,
0.32648128271102905,
0.1633184254169464,
0.45471417903900146,
-0.1322697550058365,
0.27598556876182556,
0.2917204797267914,
0.3191738724708557,
-0.19154725968837738,
0.12467864900827408,
0.23336075246334076,
-0.00894821248948574,
-0.04457567259669304,
-0.0025626758579164743,
-0.33102720975875854,
-0.30975762009620667,
0.14775988459587097,
0.10291292518377304,
0.16546472907066345,
-0.160955548286438,
0.029683437198400497,
-0.31619006395339966,
-0.08880765736103058,
-0.1953120082616806,
0.10326860100030899,
0.1995640993118286,
-0.1052766740322113,
0.11959367990493774,
0.4854587912559509,
0.1265171468257904,
-0.09945830702781677,
-0.4156898558139801,
-0.09485310316085815,
-0.17893461883068085,
0.09233265370130539,
-0.21742913126945496,
0.2044917792081833,
0.03368116915225983,
0.025808528065681458,
0.17968463897705078,
0.0730523020029068,
-0.16072432696819305,
-0.01106140948832035,
-0.0784519836306572,
-0.10354474931955338,
0.1354629248380661,
0.11696359515190125,
0.1331278383731842,
-0.4173748791217804,
0.19202920794487,
0.10847945511341095,
0.32974663376808167,
-0.13577213883399963,
0.11781715601682663,
0.1222362071275711,
0.03997274115681648,
0.3655340373516083,
0.12343069911003113,
0.14983128011226654,
0.45560044050216675,
0.03052617236971855,
0.12635424733161926,
-0.004974493756890297,
0.32711920142173767,
0.15566036105155945,
0.012749645859003067,
-0.13295888900756836,
-0.029277656227350235,
-0.11351632326841354,
0.3166729509830475,
-0.08453336358070374,
0.2671486735343933,
0.2927597761154175,
-0.07651875913143158,
-0.004859514534473419,
-0.09782737493515015,
0.15339845418930054,
0.05220832675695419,
0.069904625415802,
0.10658863931894302,
-0.09984414279460907,
0.3596494197845459,
-0.12939275801181793,
0.264309823513031,
0.17554178833961487,
0.18633411824703217,
0.2091355174779892,
0.13508090376853943,
-0.01117603201419115,
-0.18828310072422028,
-0.1296800971031189,
0.06999470293521881,
0.3717179298400879,
0.06918404996395111,
0.16594617068767548,
-0.04843468591570854,
-0.1418597549200058,
0.0841902494430542,
-0.05239185318350792,
-0.2509417235851288,
-0.2163161039352417,
-0.12563854455947876,
-0.0857282429933548,
0.09158365428447723,
-0.00010400720202596858,
-0.3266661763191223,
-0.07210301607847214,
0.06216660141944885,
-0.3203507661819458,
-0.16056855022907257,
-0.2981228232383728,
-0.36844947934150696,
0.07678727805614471,
0.38712987303733826,
0.11129036545753479,
0.295210063457489,
-0.33262917399406433,
-0.19187872111797333,
-0.0899449810385704,
-0.2681106626987457,
-0.014314225874841213,
-0.15696944296360016,
0.2413957118988037,
-0.024117276072502136,
0.7152191400527954,
-0.17999613285064697,
-0.25142186880111694,
0.1846493035554886,
-0.00701964320614934,
0.06587415933609009,
0.2497716248035431,
-0.1534789502620697,
-0.042924001812934875,
0.08453565835952759,
-0.4856535494327545,
-0.5155774354934692,
-0.2696571946144104,
0.012519567273557186,
0.04851744323968887,
0.08780695497989655,
0.16864076256752014,
0.1924835741519928,
0.06802622973918915,
0.12118712812662125,
0.18090730905532837,
-0.19004331529140472,
-0.1518692821264267,
0.4496891498565674,
-0.02741323597729206,
-0.4299623370170593,
0.18818649649620056,
0.010994188487529755,
0.31493332982063293,
0.007926318794488907,
-0.6572356820106506,
0.14411252737045288,
-0.276358962059021,
0.24994182586669922,
-0.021993543952703476,
0.1834762841463089,
0.11434464901685715,
-0.21369695663452148,
0.04797257483005524,
0.04499596357345581,
0.10590972006320953,
-0.04062100499868393,
-0.2095249891281128,
0.25562170147895813,
0.02994537353515625,
0.2961861491203308,
0.16442067921161652,
0.688840389251709,
0.05485635623335838,
0.16584032773971558,
0.4367818832397461,
0.2385822832584381,
0.23103071749210358,
-0.23142893612384796,
-0.36457201838493347,
0.0605749674141407,
-0.2394915372133255,
-0.031003324314951897,
0.26701223850250244,
-0.16232074797153473,
-0.46741729974746704,
-0.34771326184272766,
-0.2426856905221939,
-0.36746734380722046,
-0.21077078580856323,
0.15399761497974396,
-0.05018191039562225,
0.08294060826301575,
0.0575956255197525,
0.12039817124605179,
0.021574079990386963,
-0.28234976530075073,
0.21378852427005768,
0.5317094922065735,
-0.2486019730567932,
0.16858986020088196,
-0.2782670557498932,
-0.34212255477905273,
-0.4126342236995697,
0.25245562195777893,
0.07770632207393646,
0.41476181149482727,
-0.09380224347114563,
0.34991952776908875,
0.20117996633052826,
-0.0892682746052742,
0.2906241714954376,
-0.17024348676204681,
0.12304995208978653,
0.19724728167057037,
0.10499279201030731,
-0.215217724442482,
-0.062440209090709686,
-0.29433268308639526,
-0.016687719151377678,
0.3054172396659851,
-0.04445454478263855,
-0.6709661483764648,
0.08432866632938385,
-0.042586762458086014,
0.5003295540809631,
-0.05717724561691284,
-0.01735015958547592,
-0.1618575006723404,
-0.5653650760650635,
-0.48540446162223816,
-0.02768666297197342,
0.18957556784152985,
0.4046100080013275,
-0.1972091645002365,
0.26289883255958557,
-0.10207898169755936,
0.2205621600151062,
0.021316133439540863,
0.007735301740467548,
0.21325728297233582,
0.23278552293777466,
0.09743330627679825,
-0.1967879980802536,
-0.13784664869308472,
0.15032637119293213,
0.3620433211326599,
-0.06353205442428589,
-0.23431222140789032,
-0.12124703079462051,
-0.04300352931022644,
0.04348337650299072,
0.1415460705757141,
-0.10129061341285706,
0.04770750552415848,
0.14866259694099426,
-0.1379348486661911,
0.16582104563713074,
-0.01284150592982769,
0.2519466280937195,
-0.10633731633424759,
-0.49623504281044006,
-0.5676649808883667,
0.6620463132858276,
0.02338246814906597,
0.07014172524213791,
0.2541702091693878,
0.175403892993927,
-0.1958615630865097,
0.37537336349487305,
0.1058034598827362,
1.1372191905975342,
-0.22813422977924347,
0.11042021960020065,
-0.1039847731590271,
0.10946564376354218,
0.3614175617694855,
-0.3578394949436188,
0.2084072083234787,
-0.3226420283317566,
-0.1089080199599266,
-0.01951933279633522,
0.07367415726184845,
-0.04613826051354408,
0.09989331662654877,
-0.30722832679748535,
0.2564426064491272,
-0.3662327826023102,
-0.08695473521947861,
0.10564911365509033,
0.23298609256744385,
-0.4058893620967865,
-0.06803661584854126,
-0.32137972116470337,
0.11962873488664627,
-0.21466071903705597,
0.25469282269477844,
-0.21100129187107086,
-0.12547826766967773,
-0.06142396852374077,
-0.2672703266143799,
-0.5050501823425293,
0.07064317911863327,
-0.2883508801460266,
0.32986950874328613,
-0.4893506169319153,
-0.18977464735507965,
0.338620662689209,
0.44487112760543823,
0.041480373591184616,
0.4031551480293274,
-0.2879830598831177,
0.1116526648402214,
-0.2638600170612335,
-0.42361924052238464,
0.09449119120836258,
0.011207900010049343,
0.08713383227586746,
-0.18162909150123596,
-0.3709903955459595,
0.16697277128696442,
-0.057572249323129654,
0.05284922197461128,
-0.09598775207996368,
0.10437755286693573,
0.20165425539016724,
-0.045897744596004486,
-0.3565557301044464,
-0.02228337898850441,
-0.09438604861497879,
-0.08943308889865875,
0.12416666746139526,
0.08219719678163528,
-0.1119045615196228,
0.14091400802135468,
0.1852954924106598,
-0.3349809944629669,
0.02179165743291378,
0.34910571575164795,
0.1834498643875122,
0.02395452931523323,
0.6245270371437073,
0.31554484367370605,
-0.39654046297073364,
-0.18981511890888214,
0.0439140684902668,
-0.2713777422904968,
-0.458574503660202,
-0.08960459381341934,
-0.04218949377536774,
0.33834314346313477,
-0.4149280786514282,
0.35025349259376526,
0.17490629851818085,
-0.23483094573020935,
0.20646440982818604,
-0.7065882682800293,
-0.12402196228504181,
0.21609379351139069,
-0.07890939712524414,
0.006574923172593117,
0.08407143503427505,
-0.30959925055503845,
0.12182705104351044,
0.2352641075849533,
-0.2610889971256256,
0.2092306762933731,
-0.32334259152412415,
0.10076376795768738,
0.09949345886707306,
0.06333241611719131,
0.02230171114206314,
0.1991029679775238,
0.06504811346530914,
0.06916210800409317,
-0.049663886427879333,
-0.25991007685661316,
-0.07022765278816223,
0.1948125660419464,
0.20511353015899658,
-0.05790058150887489,
0.22787503898143768,
-0.5071967840194702,
-0.16867011785507202,
0.08223902434110641,
-0.05847622826695442,
0.11558449268341064,
0.003860039869323373,
0.18110066652297974,
0.20132511854171753,
0.28857046365737915,
-0.35007989406585693,
0.24587731063365936,
-0.08690531551837921,
0.26149821281433105,
0.14082810282707214,
0.07593598961830139,
0.45799243450164795,
0.021300949156284332,
-0.3352101743221283,
-0.033541854470968246,
-0.030077140778303146,
0.08663526177406311,
0.25588056445121765,
-0.23335884511470795,
0.3003470003604889,
0.19892019033432007,
-0.11749520152807236,
0.5623857378959656,
-0.14960479736328125,
0.20659619569778442,
0.41308388113975525,
0.18722347915172577,
-0.3698638081550598,
0.0016460552578791976,
0.2932005524635315,
-0.09663773328065872,
-0.0709826871752739,
0.07596095651388168,
0.2589091956615448,
-0.32232800126075745,
0.11372118443250656,
-0.06573889404535294,
0.1647823601961136,
-0.05655081197619438,
0.19225868582725525,
0.6700755953788757,
0.22707323729991913,
0.04992584139108658,
-0.0694633275270462,
0.16999280452728271,
0.09539502114057541,
0.36280637979507446,
-0.22345663607120514,
0.19276422262191772,
-0.05200457200407982,
0.02463534101843834,
-0.1621609926223755,
-0.3400551676750183,
0.29861074686050415,
0.1632014513015747,
-0.02477487362921238,
0.09867575764656067,
-0.17225874960422516,
0.2616479992866516,
0.15435945987701416,
0.03022289089858532,
-0.26115575432777405,
0.1914433091878891,
-0.12247779965400696,
-0.012982994318008423,
-0.0442100390791893,
-0.2680068016052246,
0.0015667247353121638,
0.15562571585178375,
-0.004661692772060633,
-0.3565726578235626,
0.2555730938911438,
0.3037436306476593,
-0.244086354970932,
-0.4411390423774719,
0.1348092257976532,
0.21249373257160187,
0.03117004781961441,
-0.3002215027809143,
0.15776211023330688,
0.41378042101860046,
0.07809178531169891,
-0.12705528736114502,
0.2019166350364685,
0.4433468282222748,
0.4205474555492401,
-0.3373265266418457,
0.04244174063205719,
0.07533987611532211,
-0.06568092107772827,
-0.023378299549221992,
0.2276100218296051,
0.46722543239593506,
0.2502676248550415,
0.3970099687576294,
0.1184258908033371,
-0.1415998488664627,
-0.03197430446743965,
0.23604975640773773,
-0.06391855329275131,
-0.05667095258831978,
-0.045184873044490814,
-0.0590362623333931,
0.14072102308273315,
-0.4205537736415863,
-0.013584437780082226,
-0.5078697800636292,
0.34002241492271423,
0.16105566918849945,
0.0025867712683975697,
0.17752934992313385,
-0.09258142858743668,
0.0479857474565506,
-0.15697626769542694,
0.39629343152046204,
0.3195849657058716,
0.199141263961792,
-0.3908330202102661,
-0.00899566151201725,
-0.464518666267395,
-0.018635312095284462,
-0.2982341945171356,
0.11210162192583084,
-0.08143274486064911,
0.12865565717220306,
0.07550838589668274,
0.2132711261510849,
0.036631617695093155,
0.04509863629937172,
0.0668022632598877,
0.49491584300994873,
-0.23153194785118103,
-0.24470354616641998,
-0.19481728971004486,
0.21916253864765167,
-0.15832364559173584,
-0.39093199372291565,
0.05759391561150551,
-0.13856172561645508,
0.03407328575849533,
-0.32001999020576477,
-0.06650064140558243,
0.09557345509529114,
0.0059599494561553,
0.33242881298065186,
0.1523781716823578,
0.5925301313400269,
-0.15409474074840546,
-0.20217524468898773,
-0.2086707204580307,
-0.011070453561842442,
-0.159934863448143,
0.3116772770881653,
0.1967301219701767,
0.09890691936016083,
-0.16079406440258026,
-0.11197122931480408,
-0.029564393684267998,
0.2984878122806549,
-0.044816866517066956,
0.19492152333259583,
-0.36696019768714905,
-0.38635677099227905,
0.05791785567998886,
0.11385567486286163,
0.11902748048305511,
0.04692574217915535,
-0.13085585832595825,
-0.0533188059926033,
-0.342149943113327,
-0.3086865544319153,
0.3866538405418396,
-0.3773029148578644,
-0.5697821974754333,
-0.09215575456619263,
0.007928472012281418,
0.04705652594566345,
0.1902984380722046,
-0.3660876452922821,
0.2775554358959198,
0.3897731900215149,
0.051333703100681305,
-0.15096808969974518,
0.16642248630523682,
0.0286492221057415,
-0.01621520146727562,
-0.09404339641332626,
0.11607001721858978,
-0.008283792994916439,
-0.35631418228149414,
-0.22058486938476562,
-0.3912579417228699
] |
https://github.com/huggingface/datasets/issues/2035
|
wiki40b/wikipedia for almost all languages cannot be downloaded
|
Hello @dorost1234,
Indeed, Wikipedia datasets need a lot of preprocessing and this is done using Apache Beam. That is the reason why it is required that you install Apache Beam in order to preform this preprocessing.
For some specific default parameters (English Wikipedia), Hugging Face has already preprocessed the dataset for you (and it is stored in the cloud). That is the reason why you do not get the error for English: the preprocessing is already done by HF and you just get the preprocessed dataset; Apache Beam is not required in that case.
|
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
| 94
|
wiki40b/wikipedia for almost all languages cannot be downloaded
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
Hello @dorost1234,
Indeed, Wikipedia datasets need a lot of preprocessing and this is done using Apache Beam. That is the reason why it is required that you install Apache Beam in order to preform this preprocessing.
For some specific default parameters (English Wikipedia), Hugging Face has already preprocessed the dataset for you (and it is stored in the cloud). That is the reason why you do not get the error for English: the preprocessing is already done by HF and you just get the preprocessed dataset; Apache Beam is not required in that case.
|
[
-0.25449883937835693,
-0.07791971415281296,
-0.1537584364414215,
0.43086686730384827,
0.39970263838768005,
0.3504616618156433,
0.1368502825498581,
0.5331583619117737,
0.1893267184495926,
0.023584548383951187,
-0.17730441689491272,
-0.09421756118535995,
0.0944039598107338,
0.011184575967490673,
-0.0297053474932909,
-0.4591730237007141,
-0.0672900378704071,
0.02953762747347355,
-0.13527131080627441,
-0.11689324676990509,
-0.2519628405570984,
0.12561438977718353,
-0.07917481660842896,
-0.04902834817767143,
-0.038746144622564316,
-0.18283997476100922,
-0.09583571553230286,
-0.20730605721473694,
-0.3507463335990906,
-0.24086488783359528,
0.35457831621170044,
0.019257647916674614,
0.31011223793029785,
0.15299740433692932,
-0.00011143678420921788,
-0.0509641170501709,
0.3131164610385895,
-0.2357948273420334,
-0.29361221194267273,
-0.2888581156730652,
-0.07208938151597977,
-0.3261854648590088,
-0.09043888747692108,
-0.42003169655799866,
0.12744581699371338,
0.04668239504098892,
0.0806712880730629,
-0.13180148601531982,
0.07575755566358566,
0.2992260754108429,
0.2468714565038681,
-0.14260362088680267,
0.3134343922138214,
-0.1457379013299942,
0.3651953637599945,
-0.3777082562446594,
-0.028033530339598656,
0.3395863175392151,
0.218720480799675,
0.07134398818016052,
0.21547909080982208,
0.22204311192035675,
-0.23414066433906555,
0.01349933072924614,
0.04822405055165291,
-0.29122394323349,
0.22220534086227417,
-0.629701554775238,
0.520641565322876,
0.5344274044036865,
0.8290324211120605,
-0.12835131585597992,
-0.08746717870235443,
0.072393499314785,
-0.026059571653604507,
-0.03137509524822235,
-0.05574026703834534,
0.4819800853729248,
-0.18932609260082245,
0.09759890288114548,
0.12616471946239471,
-0.12543044984340668,
-0.15671950578689575,
0.4228460192680359,
-0.1241353303194046,
0.4435884952545166,
-0.05272023379802704,
0.2112599015235901,
-0.0216665156185627,
-0.10270167887210846,
-0.26364099979400635,
-0.06965858489274979,
-0.09616053104400635,
0.2933219373226166,
-0.2793998122215271,
0.019636234268546104,
-0.16150297224521637,
0.05564657226204872,
0.3511344790458679,
-0.15038257837295532,
-0.23462128639221191,
-0.04507802054286003,
0.09601198881864548,
0.15757520496845245,
0.18014878034591675,
0.16378413140773773,
0.0620487779378891,
-0.2000061571598053,
0.2782810628414154,
0.3079039752483368,
-0.08421274274587631,
-0.0761713758111,
-0.2100439965724945,
-0.22305718064308167,
-0.2947562336921692,
0.0944298505783081,
0.08752915263175964,
-0.20317110419273376,
-0.17794694006443024,
0.007112853229045868,
-0.1443609744310379,
-0.01943882554769516,
-0.20239461958408356,
0.36282142996788025,
-0.15014299750328064,
0.43123751878738403,
0.17790168523788452,
0.328822523355484,
-0.10357245802879333,
-0.26130956411361694,
-0.01735268346965313,
0.30654871463775635,
-0.1393190324306488,
-0.1036604642868042,
0.21878241002559662,
-0.10991638898849487,
0.2648518681526184,
-0.08937306702136993,
-0.10313830524682999,
-0.1764124035835266,
-0.1536906510591507,
-0.3695681393146515,
-0.17910411953926086,
0.23040896654129028,
0.1619766354560852,
0.28392747044563293,
0.1476142555475235,
-0.24474751949310303,
-0.23058052361011505,
0.12074483931064606,
-0.3596149981021881,
-0.16815562546253204,
-0.20515534281730652,
0.19446861743927002,
0.06109855696558952,
-0.0546499527990818,
-0.31600698828697205,
0.2876638174057007,
0.3030637502670288,
-0.1423981487751007,
0.1180722787976265,
-0.007545265834778547,
-0.023254673928022385,
-0.22518932819366455,
0.17901143431663513,
0.49079981446266174,
-0.39995941519737244,
0.09189733117818832,
-0.02385012060403824,
-0.03371269255876541,
0.18978251516819,
0.18429774045944214,
-0.17795206606388092,
0.25654172897338867,
-0.09788442403078079,
0.038160406053066254,
0.21013252437114716,
-0.32144269347190857,
-0.5776352882385254,
0.18605440855026245,
0.11341046541929245,
-0.16700491309165955,
0.09948059916496277,
0.016000358387827873,
0.27503105998039246,
-0.04938732087612152,
0.05245454981923103,
0.39567452669143677,
0.13683775067329407,
-0.10564517974853516,
-0.32745084166526794,
-0.5078237056732178,
0.32648128271102905,
0.1633184254169464,
0.45471417903900146,
-0.1322697550058365,
0.27598556876182556,
0.2917204797267914,
0.3191738724708557,
-0.19154725968837738,
0.12467864900827408,
0.23336075246334076,
-0.00894821248948574,
-0.04457567259669304,
-0.0025626758579164743,
-0.33102720975875854,
-0.30975762009620667,
0.14775988459587097,
0.10291292518377304,
0.16546472907066345,
-0.160955548286438,
0.029683437198400497,
-0.31619006395339966,
-0.08880765736103058,
-0.1953120082616806,
0.10326860100030899,
0.1995640993118286,
-0.1052766740322113,
0.11959367990493774,
0.4854587912559509,
0.1265171468257904,
-0.09945830702781677,
-0.4156898558139801,
-0.09485310316085815,
-0.17893461883068085,
0.09233265370130539,
-0.21742913126945496,
0.2044917792081833,
0.03368116915225983,
0.025808528065681458,
0.17968463897705078,
0.0730523020029068,
-0.16072432696819305,
-0.01106140948832035,
-0.0784519836306572,
-0.10354474931955338,
0.1354629248380661,
0.11696359515190125,
0.1331278383731842,
-0.4173748791217804,
0.19202920794487,
0.10847945511341095,
0.32974663376808167,
-0.13577213883399963,
0.11781715601682663,
0.1222362071275711,
0.03997274115681648,
0.3655340373516083,
0.12343069911003113,
0.14983128011226654,
0.45560044050216675,
0.03052617236971855,
0.12635424733161926,
-0.004974493756890297,
0.32711920142173767,
0.15566036105155945,
0.012749645859003067,
-0.13295888900756836,
-0.029277656227350235,
-0.11351632326841354,
0.3166729509830475,
-0.08453336358070374,
0.2671486735343933,
0.2927597761154175,
-0.07651875913143158,
-0.004859514534473419,
-0.09782737493515015,
0.15339845418930054,
0.05220832675695419,
0.069904625415802,
0.10658863931894302,
-0.09984414279460907,
0.3596494197845459,
-0.12939275801181793,
0.264309823513031,
0.17554178833961487,
0.18633411824703217,
0.2091355174779892,
0.13508090376853943,
-0.01117603201419115,
-0.18828310072422028,
-0.1296800971031189,
0.06999470293521881,
0.3717179298400879,
0.06918404996395111,
0.16594617068767548,
-0.04843468591570854,
-0.1418597549200058,
0.0841902494430542,
-0.05239185318350792,
-0.2509417235851288,
-0.2163161039352417,
-0.12563854455947876,
-0.0857282429933548,
0.09158365428447723,
-0.00010400720202596858,
-0.3266661763191223,
-0.07210301607847214,
0.06216660141944885,
-0.3203507661819458,
-0.16056855022907257,
-0.2981228232383728,
-0.36844947934150696,
0.07678727805614471,
0.38712987303733826,
0.11129036545753479,
0.295210063457489,
-0.33262917399406433,
-0.19187872111797333,
-0.0899449810385704,
-0.2681106626987457,
-0.014314225874841213,
-0.15696944296360016,
0.2413957118988037,
-0.024117276072502136,
0.7152191400527954,
-0.17999613285064697,
-0.25142186880111694,
0.1846493035554886,
-0.00701964320614934,
0.06587415933609009,
0.2497716248035431,
-0.1534789502620697,
-0.042924001812934875,
0.08453565835952759,
-0.4856535494327545,
-0.5155774354934692,
-0.2696571946144104,
0.012519567273557186,
0.04851744323968887,
0.08780695497989655,
0.16864076256752014,
0.1924835741519928,
0.06802622973918915,
0.12118712812662125,
0.18090730905532837,
-0.19004331529140472,
-0.1518692821264267,
0.4496891498565674,
-0.02741323597729206,
-0.4299623370170593,
0.18818649649620056,
0.010994188487529755,
0.31493332982063293,
0.007926318794488907,
-0.6572356820106506,
0.14411252737045288,
-0.276358962059021,
0.24994182586669922,
-0.021993543952703476,
0.1834762841463089,
0.11434464901685715,
-0.21369695663452148,
0.04797257483005524,
0.04499596357345581,
0.10590972006320953,
-0.04062100499868393,
-0.2095249891281128,
0.25562170147895813,
0.02994537353515625,
0.2961861491203308,
0.16442067921161652,
0.688840389251709,
0.05485635623335838,
0.16584032773971558,
0.4367818832397461,
0.2385822832584381,
0.23103071749210358,
-0.23142893612384796,
-0.36457201838493347,
0.0605749674141407,
-0.2394915372133255,
-0.031003324314951897,
0.26701223850250244,
-0.16232074797153473,
-0.46741729974746704,
-0.34771326184272766,
-0.2426856905221939,
-0.36746734380722046,
-0.21077078580856323,
0.15399761497974396,
-0.05018191039562225,
0.08294060826301575,
0.0575956255197525,
0.12039817124605179,
0.021574079990386963,
-0.28234976530075073,
0.21378852427005768,
0.5317094922065735,
-0.2486019730567932,
0.16858986020088196,
-0.2782670557498932,
-0.34212255477905273,
-0.4126342236995697,
0.25245562195777893,
0.07770632207393646,
0.41476181149482727,
-0.09380224347114563,
0.34991952776908875,
0.20117996633052826,
-0.0892682746052742,
0.2906241714954376,
-0.17024348676204681,
0.12304995208978653,
0.19724728167057037,
0.10499279201030731,
-0.215217724442482,
-0.062440209090709686,
-0.29433268308639526,
-0.016687719151377678,
0.3054172396659851,
-0.04445454478263855,
-0.6709661483764648,
0.08432866632938385,
-0.042586762458086014,
0.5003295540809631,
-0.05717724561691284,
-0.01735015958547592,
-0.1618575006723404,
-0.5653650760650635,
-0.48540446162223816,
-0.02768666297197342,
0.18957556784152985,
0.4046100080013275,
-0.1972091645002365,
0.26289883255958557,
-0.10207898169755936,
0.2205621600151062,
0.021316133439540863,
0.007735301740467548,
0.21325728297233582,
0.23278552293777466,
0.09743330627679825,
-0.1967879980802536,
-0.13784664869308472,
0.15032637119293213,
0.3620433211326599,
-0.06353205442428589,
-0.23431222140789032,
-0.12124703079462051,
-0.04300352931022644,
0.04348337650299072,
0.1415460705757141,
-0.10129061341285706,
0.04770750552415848,
0.14866259694099426,
-0.1379348486661911,
0.16582104563713074,
-0.01284150592982769,
0.2519466280937195,
-0.10633731633424759,
-0.49623504281044006,
-0.5676649808883667,
0.6620463132858276,
0.02338246814906597,
0.07014172524213791,
0.2541702091693878,
0.175403892993927,
-0.1958615630865097,
0.37537336349487305,
0.1058034598827362,
1.1372191905975342,
-0.22813422977924347,
0.11042021960020065,
-0.1039847731590271,
0.10946564376354218,
0.3614175617694855,
-0.3578394949436188,
0.2084072083234787,
-0.3226420283317566,
-0.1089080199599266,
-0.01951933279633522,
0.07367415726184845,
-0.04613826051354408,
0.09989331662654877,
-0.30722832679748535,
0.2564426064491272,
-0.3662327826023102,
-0.08695473521947861,
0.10564911365509033,
0.23298609256744385,
-0.4058893620967865,
-0.06803661584854126,
-0.32137972116470337,
0.11962873488664627,
-0.21466071903705597,
0.25469282269477844,
-0.21100129187107086,
-0.12547826766967773,
-0.06142396852374077,
-0.2672703266143799,
-0.5050501823425293,
0.07064317911863327,
-0.2883508801460266,
0.32986950874328613,
-0.4893506169319153,
-0.18977464735507965,
0.338620662689209,
0.44487112760543823,
0.041480373591184616,
0.4031551480293274,
-0.2879830598831177,
0.1116526648402214,
-0.2638600170612335,
-0.42361924052238464,
0.09449119120836258,
0.011207900010049343,
0.08713383227586746,
-0.18162909150123596,
-0.3709903955459595,
0.16697277128696442,
-0.057572249323129654,
0.05284922197461128,
-0.09598775207996368,
0.10437755286693573,
0.20165425539016724,
-0.045897744596004486,
-0.3565557301044464,
-0.02228337898850441,
-0.09438604861497879,
-0.08943308889865875,
0.12416666746139526,
0.08219719678163528,
-0.1119045615196228,
0.14091400802135468,
0.1852954924106598,
-0.3349809944629669,
0.02179165743291378,
0.34910571575164795,
0.1834498643875122,
0.02395452931523323,
0.6245270371437073,
0.31554484367370605,
-0.39654046297073364,
-0.18981511890888214,
0.0439140684902668,
-0.2713777422904968,
-0.458574503660202,
-0.08960459381341934,
-0.04218949377536774,
0.33834314346313477,
-0.4149280786514282,
0.35025349259376526,
0.17490629851818085,
-0.23483094573020935,
0.20646440982818604,
-0.7065882682800293,
-0.12402196228504181,
0.21609379351139069,
-0.07890939712524414,
0.006574923172593117,
0.08407143503427505,
-0.30959925055503845,
0.12182705104351044,
0.2352641075849533,
-0.2610889971256256,
0.2092306762933731,
-0.32334259152412415,
0.10076376795768738,
0.09949345886707306,
0.06333241611719131,
0.02230171114206314,
0.1991029679775238,
0.06504811346530914,
0.06916210800409317,
-0.049663886427879333,
-0.25991007685661316,
-0.07022765278816223,
0.1948125660419464,
0.20511353015899658,
-0.05790058150887489,
0.22787503898143768,
-0.5071967840194702,
-0.16867011785507202,
0.08223902434110641,
-0.05847622826695442,
0.11558449268341064,
0.003860039869323373,
0.18110066652297974,
0.20132511854171753,
0.28857046365737915,
-0.35007989406585693,
0.24587731063365936,
-0.08690531551837921,
0.26149821281433105,
0.14082810282707214,
0.07593598961830139,
0.45799243450164795,
0.021300949156284332,
-0.3352101743221283,
-0.033541854470968246,
-0.030077140778303146,
0.08663526177406311,
0.25588056445121765,
-0.23335884511470795,
0.3003470003604889,
0.19892019033432007,
-0.11749520152807236,
0.5623857378959656,
-0.14960479736328125,
0.20659619569778442,
0.41308388113975525,
0.18722347915172577,
-0.3698638081550598,
0.0016460552578791976,
0.2932005524635315,
-0.09663773328065872,
-0.0709826871752739,
0.07596095651388168,
0.2589091956615448,
-0.32232800126075745,
0.11372118443250656,
-0.06573889404535294,
0.1647823601961136,
-0.05655081197619438,
0.19225868582725525,
0.6700755953788757,
0.22707323729991913,
0.04992584139108658,
-0.0694633275270462,
0.16999280452728271,
0.09539502114057541,
0.36280637979507446,
-0.22345663607120514,
0.19276422262191772,
-0.05200457200407982,
0.02463534101843834,
-0.1621609926223755,
-0.3400551676750183,
0.29861074686050415,
0.1632014513015747,
-0.02477487362921238,
0.09867575764656067,
-0.17225874960422516,
0.2616479992866516,
0.15435945987701416,
0.03022289089858532,
-0.26115575432777405,
0.1914433091878891,
-0.12247779965400696,
-0.012982994318008423,
-0.0442100390791893,
-0.2680068016052246,
0.0015667247353121638,
0.15562571585178375,
-0.004661692772060633,
-0.3565726578235626,
0.2555730938911438,
0.3037436306476593,
-0.244086354970932,
-0.4411390423774719,
0.1348092257976532,
0.21249373257160187,
0.03117004781961441,
-0.3002215027809143,
0.15776211023330688,
0.41378042101860046,
0.07809178531169891,
-0.12705528736114502,
0.2019166350364685,
0.4433468282222748,
0.4205474555492401,
-0.3373265266418457,
0.04244174063205719,
0.07533987611532211,
-0.06568092107772827,
-0.023378299549221992,
0.2276100218296051,
0.46722543239593506,
0.2502676248550415,
0.3970099687576294,
0.1184258908033371,
-0.1415998488664627,
-0.03197430446743965,
0.23604975640773773,
-0.06391855329275131,
-0.05667095258831978,
-0.045184873044490814,
-0.0590362623333931,
0.14072102308273315,
-0.4205537736415863,
-0.013584437780082226,
-0.5078697800636292,
0.34002241492271423,
0.16105566918849945,
0.0025867712683975697,
0.17752934992313385,
-0.09258142858743668,
0.0479857474565506,
-0.15697626769542694,
0.39629343152046204,
0.3195849657058716,
0.199141263961792,
-0.3908330202102661,
-0.00899566151201725,
-0.464518666267395,
-0.018635312095284462,
-0.2982341945171356,
0.11210162192583084,
-0.08143274486064911,
0.12865565717220306,
0.07550838589668274,
0.2132711261510849,
0.036631617695093155,
0.04509863629937172,
0.0668022632598877,
0.49491584300994873,
-0.23153194785118103,
-0.24470354616641998,
-0.19481728971004486,
0.21916253864765167,
-0.15832364559173584,
-0.39093199372291565,
0.05759391561150551,
-0.13856172561645508,
0.03407328575849533,
-0.32001999020576477,
-0.06650064140558243,
0.09557345509529114,
0.0059599494561553,
0.33242881298065186,
0.1523781716823578,
0.5925301313400269,
-0.15409474074840546,
-0.20217524468898773,
-0.2086707204580307,
-0.011070453561842442,
-0.159934863448143,
0.3116772770881653,
0.1967301219701767,
0.09890691936016083,
-0.16079406440258026,
-0.11197122931480408,
-0.029564393684267998,
0.2984878122806549,
-0.044816866517066956,
0.19492152333259583,
-0.36696019768714905,
-0.38635677099227905,
0.05791785567998886,
0.11385567486286163,
0.11902748048305511,
0.04692574217915535,
-0.13085585832595825,
-0.0533188059926033,
-0.342149943113327,
-0.3086865544319153,
0.3866538405418396,
-0.3773029148578644,
-0.5697821974754333,
-0.09215575456619263,
0.007928472012281418,
0.04705652594566345,
0.1902984380722046,
-0.3660876452922821,
0.2775554358959198,
0.3897731900215149,
0.051333703100681305,
-0.15096808969974518,
0.16642248630523682,
0.0286492221057415,
-0.01621520146727562,
-0.09404339641332626,
0.11607001721858978,
-0.008283792994916439,
-0.35631418228149414,
-0.22058486938476562,
-0.3912579417228699
] |
https://github.com/huggingface/datasets/issues/2035
|
wiki40b/wikipedia for almost all languages cannot be downloaded
|
Hi
I really appreciate if huggingface can kindly provide preprocessed
datasets, processing these datasets require sufficiently large resources
and I do not have unfortunately access to, and perhaps many others too.
thanks
On Fri, Mar 12, 2021 at 9:04 AM Albert Villanova del Moral <
***@***.***> wrote:
> Hello @dorost1234 <https://github.com/dorost1234>,
>
> Indeed, Wikipedia datasets need a lot of preprocessing and this is done
> using Apache Beam. That is the reason why it is required that you install
> Apache Beam in order to preform this preprocessing.
>
> For some specific default parameters (English Wikipedia), Hugging Face has
> already preprocessed the dataset for you (and it is stored in the cloud).
> That is the reason why you do not get the error for English: the
> preprocessing is already done by HF and you just get the preprocessed
> dataset; Apache Beam is not required in that case.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2035#issuecomment-797310899>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMXACFQZAGMK4VGXRETTDHDI3ANCNFSM4ZA5R2UA>
> .
>
|
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
| 185
|
wiki40b/wikipedia for almost all languages cannot be downloaded
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
Hi
I really appreciate if huggingface can kindly provide preprocessed
datasets, processing these datasets require sufficiently large resources
and I do not have unfortunately access to, and perhaps many others too.
thanks
On Fri, Mar 12, 2021 at 9:04 AM Albert Villanova del Moral <
***@***.***> wrote:
> Hello @dorost1234 <https://github.com/dorost1234>,
>
> Indeed, Wikipedia datasets need a lot of preprocessing and this is done
> using Apache Beam. That is the reason why it is required that you install
> Apache Beam in order to preform this preprocessing.
>
> For some specific default parameters (English Wikipedia), Hugging Face has
> already preprocessed the dataset for you (and it is stored in the cloud).
> That is the reason why you do not get the error for English: the
> preprocessing is already done by HF and you just get the preprocessed
> dataset; Apache Beam is not required in that case.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2035#issuecomment-797310899>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMXACFQZAGMK4VGXRETTDHDI3ANCNFSM4ZA5R2UA>
> .
>
|
[
-0.25449883937835693,
-0.07791971415281296,
-0.1537584364414215,
0.43086686730384827,
0.39970263838768005,
0.3504616618156433,
0.1368502825498581,
0.5331583619117737,
0.1893267184495926,
0.023584548383951187,
-0.17730441689491272,
-0.09421756118535995,
0.0944039598107338,
0.011184575967490673,
-0.0297053474932909,
-0.4591730237007141,
-0.0672900378704071,
0.02953762747347355,
-0.13527131080627441,
-0.11689324676990509,
-0.2519628405570984,
0.12561438977718353,
-0.07917481660842896,
-0.04902834817767143,
-0.038746144622564316,
-0.18283997476100922,
-0.09583571553230286,
-0.20730605721473694,
-0.3507463335990906,
-0.24086488783359528,
0.35457831621170044,
0.019257647916674614,
0.31011223793029785,
0.15299740433692932,
-0.00011143678420921788,
-0.0509641170501709,
0.3131164610385895,
-0.2357948273420334,
-0.29361221194267273,
-0.2888581156730652,
-0.07208938151597977,
-0.3261854648590088,
-0.09043888747692108,
-0.42003169655799866,
0.12744581699371338,
0.04668239504098892,
0.0806712880730629,
-0.13180148601531982,
0.07575755566358566,
0.2992260754108429,
0.2468714565038681,
-0.14260362088680267,
0.3134343922138214,
-0.1457379013299942,
0.3651953637599945,
-0.3777082562446594,
-0.028033530339598656,
0.3395863175392151,
0.218720480799675,
0.07134398818016052,
0.21547909080982208,
0.22204311192035675,
-0.23414066433906555,
0.01349933072924614,
0.04822405055165291,
-0.29122394323349,
0.22220534086227417,
-0.629701554775238,
0.520641565322876,
0.5344274044036865,
0.8290324211120605,
-0.12835131585597992,
-0.08746717870235443,
0.072393499314785,
-0.026059571653604507,
-0.03137509524822235,
-0.05574026703834534,
0.4819800853729248,
-0.18932609260082245,
0.09759890288114548,
0.12616471946239471,
-0.12543044984340668,
-0.15671950578689575,
0.4228460192680359,
-0.1241353303194046,
0.4435884952545166,
-0.05272023379802704,
0.2112599015235901,
-0.0216665156185627,
-0.10270167887210846,
-0.26364099979400635,
-0.06965858489274979,
-0.09616053104400635,
0.2933219373226166,
-0.2793998122215271,
0.019636234268546104,
-0.16150297224521637,
0.05564657226204872,
0.3511344790458679,
-0.15038257837295532,
-0.23462128639221191,
-0.04507802054286003,
0.09601198881864548,
0.15757520496845245,
0.18014878034591675,
0.16378413140773773,
0.0620487779378891,
-0.2000061571598053,
0.2782810628414154,
0.3079039752483368,
-0.08421274274587631,
-0.0761713758111,
-0.2100439965724945,
-0.22305718064308167,
-0.2947562336921692,
0.0944298505783081,
0.08752915263175964,
-0.20317110419273376,
-0.17794694006443024,
0.007112853229045868,
-0.1443609744310379,
-0.01943882554769516,
-0.20239461958408356,
0.36282142996788025,
-0.15014299750328064,
0.43123751878738403,
0.17790168523788452,
0.328822523355484,
-0.10357245802879333,
-0.26130956411361694,
-0.01735268346965313,
0.30654871463775635,
-0.1393190324306488,
-0.1036604642868042,
0.21878241002559662,
-0.10991638898849487,
0.2648518681526184,
-0.08937306702136993,
-0.10313830524682999,
-0.1764124035835266,
-0.1536906510591507,
-0.3695681393146515,
-0.17910411953926086,
0.23040896654129028,
0.1619766354560852,
0.28392747044563293,
0.1476142555475235,
-0.24474751949310303,
-0.23058052361011505,
0.12074483931064606,
-0.3596149981021881,
-0.16815562546253204,
-0.20515534281730652,
0.19446861743927002,
0.06109855696558952,
-0.0546499527990818,
-0.31600698828697205,
0.2876638174057007,
0.3030637502670288,
-0.1423981487751007,
0.1180722787976265,
-0.007545265834778547,
-0.023254673928022385,
-0.22518932819366455,
0.17901143431663513,
0.49079981446266174,
-0.39995941519737244,
0.09189733117818832,
-0.02385012060403824,
-0.03371269255876541,
0.18978251516819,
0.18429774045944214,
-0.17795206606388092,
0.25654172897338867,
-0.09788442403078079,
0.038160406053066254,
0.21013252437114716,
-0.32144269347190857,
-0.5776352882385254,
0.18605440855026245,
0.11341046541929245,
-0.16700491309165955,
0.09948059916496277,
0.016000358387827873,
0.27503105998039246,
-0.04938732087612152,
0.05245454981923103,
0.39567452669143677,
0.13683775067329407,
-0.10564517974853516,
-0.32745084166526794,
-0.5078237056732178,
0.32648128271102905,
0.1633184254169464,
0.45471417903900146,
-0.1322697550058365,
0.27598556876182556,
0.2917204797267914,
0.3191738724708557,
-0.19154725968837738,
0.12467864900827408,
0.23336075246334076,
-0.00894821248948574,
-0.04457567259669304,
-0.0025626758579164743,
-0.33102720975875854,
-0.30975762009620667,
0.14775988459587097,
0.10291292518377304,
0.16546472907066345,
-0.160955548286438,
0.029683437198400497,
-0.31619006395339966,
-0.08880765736103058,
-0.1953120082616806,
0.10326860100030899,
0.1995640993118286,
-0.1052766740322113,
0.11959367990493774,
0.4854587912559509,
0.1265171468257904,
-0.09945830702781677,
-0.4156898558139801,
-0.09485310316085815,
-0.17893461883068085,
0.09233265370130539,
-0.21742913126945496,
0.2044917792081833,
0.03368116915225983,
0.025808528065681458,
0.17968463897705078,
0.0730523020029068,
-0.16072432696819305,
-0.01106140948832035,
-0.0784519836306572,
-0.10354474931955338,
0.1354629248380661,
0.11696359515190125,
0.1331278383731842,
-0.4173748791217804,
0.19202920794487,
0.10847945511341095,
0.32974663376808167,
-0.13577213883399963,
0.11781715601682663,
0.1222362071275711,
0.03997274115681648,
0.3655340373516083,
0.12343069911003113,
0.14983128011226654,
0.45560044050216675,
0.03052617236971855,
0.12635424733161926,
-0.004974493756890297,
0.32711920142173767,
0.15566036105155945,
0.012749645859003067,
-0.13295888900756836,
-0.029277656227350235,
-0.11351632326841354,
0.3166729509830475,
-0.08453336358070374,
0.2671486735343933,
0.2927597761154175,
-0.07651875913143158,
-0.004859514534473419,
-0.09782737493515015,
0.15339845418930054,
0.05220832675695419,
0.069904625415802,
0.10658863931894302,
-0.09984414279460907,
0.3596494197845459,
-0.12939275801181793,
0.264309823513031,
0.17554178833961487,
0.18633411824703217,
0.2091355174779892,
0.13508090376853943,
-0.01117603201419115,
-0.18828310072422028,
-0.1296800971031189,
0.06999470293521881,
0.3717179298400879,
0.06918404996395111,
0.16594617068767548,
-0.04843468591570854,
-0.1418597549200058,
0.0841902494430542,
-0.05239185318350792,
-0.2509417235851288,
-0.2163161039352417,
-0.12563854455947876,
-0.0857282429933548,
0.09158365428447723,
-0.00010400720202596858,
-0.3266661763191223,
-0.07210301607847214,
0.06216660141944885,
-0.3203507661819458,
-0.16056855022907257,
-0.2981228232383728,
-0.36844947934150696,
0.07678727805614471,
0.38712987303733826,
0.11129036545753479,
0.295210063457489,
-0.33262917399406433,
-0.19187872111797333,
-0.0899449810385704,
-0.2681106626987457,
-0.014314225874841213,
-0.15696944296360016,
0.2413957118988037,
-0.024117276072502136,
0.7152191400527954,
-0.17999613285064697,
-0.25142186880111694,
0.1846493035554886,
-0.00701964320614934,
0.06587415933609009,
0.2497716248035431,
-0.1534789502620697,
-0.042924001812934875,
0.08453565835952759,
-0.4856535494327545,
-0.5155774354934692,
-0.2696571946144104,
0.012519567273557186,
0.04851744323968887,
0.08780695497989655,
0.16864076256752014,
0.1924835741519928,
0.06802622973918915,
0.12118712812662125,
0.18090730905532837,
-0.19004331529140472,
-0.1518692821264267,
0.4496891498565674,
-0.02741323597729206,
-0.4299623370170593,
0.18818649649620056,
0.010994188487529755,
0.31493332982063293,
0.007926318794488907,
-0.6572356820106506,
0.14411252737045288,
-0.276358962059021,
0.24994182586669922,
-0.021993543952703476,
0.1834762841463089,
0.11434464901685715,
-0.21369695663452148,
0.04797257483005524,
0.04499596357345581,
0.10590972006320953,
-0.04062100499868393,
-0.2095249891281128,
0.25562170147895813,
0.02994537353515625,
0.2961861491203308,
0.16442067921161652,
0.688840389251709,
0.05485635623335838,
0.16584032773971558,
0.4367818832397461,
0.2385822832584381,
0.23103071749210358,
-0.23142893612384796,
-0.36457201838493347,
0.0605749674141407,
-0.2394915372133255,
-0.031003324314951897,
0.26701223850250244,
-0.16232074797153473,
-0.46741729974746704,
-0.34771326184272766,
-0.2426856905221939,
-0.36746734380722046,
-0.21077078580856323,
0.15399761497974396,
-0.05018191039562225,
0.08294060826301575,
0.0575956255197525,
0.12039817124605179,
0.021574079990386963,
-0.28234976530075073,
0.21378852427005768,
0.5317094922065735,
-0.2486019730567932,
0.16858986020088196,
-0.2782670557498932,
-0.34212255477905273,
-0.4126342236995697,
0.25245562195777893,
0.07770632207393646,
0.41476181149482727,
-0.09380224347114563,
0.34991952776908875,
0.20117996633052826,
-0.0892682746052742,
0.2906241714954376,
-0.17024348676204681,
0.12304995208978653,
0.19724728167057037,
0.10499279201030731,
-0.215217724442482,
-0.062440209090709686,
-0.29433268308639526,
-0.016687719151377678,
0.3054172396659851,
-0.04445454478263855,
-0.6709661483764648,
0.08432866632938385,
-0.042586762458086014,
0.5003295540809631,
-0.05717724561691284,
-0.01735015958547592,
-0.1618575006723404,
-0.5653650760650635,
-0.48540446162223816,
-0.02768666297197342,
0.18957556784152985,
0.4046100080013275,
-0.1972091645002365,
0.26289883255958557,
-0.10207898169755936,
0.2205621600151062,
0.021316133439540863,
0.007735301740467548,
0.21325728297233582,
0.23278552293777466,
0.09743330627679825,
-0.1967879980802536,
-0.13784664869308472,
0.15032637119293213,
0.3620433211326599,
-0.06353205442428589,
-0.23431222140789032,
-0.12124703079462051,
-0.04300352931022644,
0.04348337650299072,
0.1415460705757141,
-0.10129061341285706,
0.04770750552415848,
0.14866259694099426,
-0.1379348486661911,
0.16582104563713074,
-0.01284150592982769,
0.2519466280937195,
-0.10633731633424759,
-0.49623504281044006,
-0.5676649808883667,
0.6620463132858276,
0.02338246814906597,
0.07014172524213791,
0.2541702091693878,
0.175403892993927,
-0.1958615630865097,
0.37537336349487305,
0.1058034598827362,
1.1372191905975342,
-0.22813422977924347,
0.11042021960020065,
-0.1039847731590271,
0.10946564376354218,
0.3614175617694855,
-0.3578394949436188,
0.2084072083234787,
-0.3226420283317566,
-0.1089080199599266,
-0.01951933279633522,
0.07367415726184845,
-0.04613826051354408,
0.09989331662654877,
-0.30722832679748535,
0.2564426064491272,
-0.3662327826023102,
-0.08695473521947861,
0.10564911365509033,
0.23298609256744385,
-0.4058893620967865,
-0.06803661584854126,
-0.32137972116470337,
0.11962873488664627,
-0.21466071903705597,
0.25469282269477844,
-0.21100129187107086,
-0.12547826766967773,
-0.06142396852374077,
-0.2672703266143799,
-0.5050501823425293,
0.07064317911863327,
-0.2883508801460266,
0.32986950874328613,
-0.4893506169319153,
-0.18977464735507965,
0.338620662689209,
0.44487112760543823,
0.041480373591184616,
0.4031551480293274,
-0.2879830598831177,
0.1116526648402214,
-0.2638600170612335,
-0.42361924052238464,
0.09449119120836258,
0.011207900010049343,
0.08713383227586746,
-0.18162909150123596,
-0.3709903955459595,
0.16697277128696442,
-0.057572249323129654,
0.05284922197461128,
-0.09598775207996368,
0.10437755286693573,
0.20165425539016724,
-0.045897744596004486,
-0.3565557301044464,
-0.02228337898850441,
-0.09438604861497879,
-0.08943308889865875,
0.12416666746139526,
0.08219719678163528,
-0.1119045615196228,
0.14091400802135468,
0.1852954924106598,
-0.3349809944629669,
0.02179165743291378,
0.34910571575164795,
0.1834498643875122,
0.02395452931523323,
0.6245270371437073,
0.31554484367370605,
-0.39654046297073364,
-0.18981511890888214,
0.0439140684902668,
-0.2713777422904968,
-0.458574503660202,
-0.08960459381341934,
-0.04218949377536774,
0.33834314346313477,
-0.4149280786514282,
0.35025349259376526,
0.17490629851818085,
-0.23483094573020935,
0.20646440982818604,
-0.7065882682800293,
-0.12402196228504181,
0.21609379351139069,
-0.07890939712524414,
0.006574923172593117,
0.08407143503427505,
-0.30959925055503845,
0.12182705104351044,
0.2352641075849533,
-0.2610889971256256,
0.2092306762933731,
-0.32334259152412415,
0.10076376795768738,
0.09949345886707306,
0.06333241611719131,
0.02230171114206314,
0.1991029679775238,
0.06504811346530914,
0.06916210800409317,
-0.049663886427879333,
-0.25991007685661316,
-0.07022765278816223,
0.1948125660419464,
0.20511353015899658,
-0.05790058150887489,
0.22787503898143768,
-0.5071967840194702,
-0.16867011785507202,
0.08223902434110641,
-0.05847622826695442,
0.11558449268341064,
0.003860039869323373,
0.18110066652297974,
0.20132511854171753,
0.28857046365737915,
-0.35007989406585693,
0.24587731063365936,
-0.08690531551837921,
0.26149821281433105,
0.14082810282707214,
0.07593598961830139,
0.45799243450164795,
0.021300949156284332,
-0.3352101743221283,
-0.033541854470968246,
-0.030077140778303146,
0.08663526177406311,
0.25588056445121765,
-0.23335884511470795,
0.3003470003604889,
0.19892019033432007,
-0.11749520152807236,
0.5623857378959656,
-0.14960479736328125,
0.20659619569778442,
0.41308388113975525,
0.18722347915172577,
-0.3698638081550598,
0.0016460552578791976,
0.2932005524635315,
-0.09663773328065872,
-0.0709826871752739,
0.07596095651388168,
0.2589091956615448,
-0.32232800126075745,
0.11372118443250656,
-0.06573889404535294,
0.1647823601961136,
-0.05655081197619438,
0.19225868582725525,
0.6700755953788757,
0.22707323729991913,
0.04992584139108658,
-0.0694633275270462,
0.16999280452728271,
0.09539502114057541,
0.36280637979507446,
-0.22345663607120514,
0.19276422262191772,
-0.05200457200407982,
0.02463534101843834,
-0.1621609926223755,
-0.3400551676750183,
0.29861074686050415,
0.1632014513015747,
-0.02477487362921238,
0.09867575764656067,
-0.17225874960422516,
0.2616479992866516,
0.15435945987701416,
0.03022289089858532,
-0.26115575432777405,
0.1914433091878891,
-0.12247779965400696,
-0.012982994318008423,
-0.0442100390791893,
-0.2680068016052246,
0.0015667247353121638,
0.15562571585178375,
-0.004661692772060633,
-0.3565726578235626,
0.2555730938911438,
0.3037436306476593,
-0.244086354970932,
-0.4411390423774719,
0.1348092257976532,
0.21249373257160187,
0.03117004781961441,
-0.3002215027809143,
0.15776211023330688,
0.41378042101860046,
0.07809178531169891,
-0.12705528736114502,
0.2019166350364685,
0.4433468282222748,
0.4205474555492401,
-0.3373265266418457,
0.04244174063205719,
0.07533987611532211,
-0.06568092107772827,
-0.023378299549221992,
0.2276100218296051,
0.46722543239593506,
0.2502676248550415,
0.3970099687576294,
0.1184258908033371,
-0.1415998488664627,
-0.03197430446743965,
0.23604975640773773,
-0.06391855329275131,
-0.05667095258831978,
-0.045184873044490814,
-0.0590362623333931,
0.14072102308273315,
-0.4205537736415863,
-0.013584437780082226,
-0.5078697800636292,
0.34002241492271423,
0.16105566918849945,
0.0025867712683975697,
0.17752934992313385,
-0.09258142858743668,
0.0479857474565506,
-0.15697626769542694,
0.39629343152046204,
0.3195849657058716,
0.199141263961792,
-0.3908330202102661,
-0.00899566151201725,
-0.464518666267395,
-0.018635312095284462,
-0.2982341945171356,
0.11210162192583084,
-0.08143274486064911,
0.12865565717220306,
0.07550838589668274,
0.2132711261510849,
0.036631617695093155,
0.04509863629937172,
0.0668022632598877,
0.49491584300994873,
-0.23153194785118103,
-0.24470354616641998,
-0.19481728971004486,
0.21916253864765167,
-0.15832364559173584,
-0.39093199372291565,
0.05759391561150551,
-0.13856172561645508,
0.03407328575849533,
-0.32001999020576477,
-0.06650064140558243,
0.09557345509529114,
0.0059599494561553,
0.33242881298065186,
0.1523781716823578,
0.5925301313400269,
-0.15409474074840546,
-0.20217524468898773,
-0.2086707204580307,
-0.011070453561842442,
-0.159934863448143,
0.3116772770881653,
0.1967301219701767,
0.09890691936016083,
-0.16079406440258026,
-0.11197122931480408,
-0.029564393684267998,
0.2984878122806549,
-0.044816866517066956,
0.19492152333259583,
-0.36696019768714905,
-0.38635677099227905,
0.05791785567998886,
0.11385567486286163,
0.11902748048305511,
0.04692574217915535,
-0.13085585832595825,
-0.0533188059926033,
-0.342149943113327,
-0.3086865544319153,
0.3866538405418396,
-0.3773029148578644,
-0.5697821974754333,
-0.09215575456619263,
0.007928472012281418,
0.04705652594566345,
0.1902984380722046,
-0.3660876452922821,
0.2775554358959198,
0.3897731900215149,
0.051333703100681305,
-0.15096808969974518,
0.16642248630523682,
0.0286492221057415,
-0.01621520146727562,
-0.09404339641332626,
0.11607001721858978,
-0.008283792994916439,
-0.35631418228149414,
-0.22058486938476562,
-0.3912579417228699
] |
https://github.com/huggingface/datasets/issues/2035
|
wiki40b/wikipedia for almost all languages cannot be downloaded
|
Hi everyone
thanks for the helpful pointers, I did it as @bhavitvyamalik suggested, for me this freezes on this command for several hours,
`Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /users/dara/cache/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
`
Do you know how long this takes? Any specific requirements the machine should have? like very large memory or so? @lhoestq
thanks
|
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
| 65
|
wiki40b/wikipedia for almost all languages cannot be downloaded
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
Hi everyone
thanks for the helpful pointers, I did it as @bhavitvyamalik suggested, for me this freezes on this command for several hours,
`Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /users/dara/cache/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
`
Do you know how long this takes? Any specific requirements the machine should have? like very large memory or so? @lhoestq
thanks
|
[
-0.25449883937835693,
-0.07791971415281296,
-0.1537584364414215,
0.43086686730384827,
0.39970263838768005,
0.3504616618156433,
0.1368502825498581,
0.5331583619117737,
0.1893267184495926,
0.023584548383951187,
-0.17730441689491272,
-0.09421756118535995,
0.0944039598107338,
0.011184575967490673,
-0.0297053474932909,
-0.4591730237007141,
-0.0672900378704071,
0.02953762747347355,
-0.13527131080627441,
-0.11689324676990509,
-0.2519628405570984,
0.12561438977718353,
-0.07917481660842896,
-0.04902834817767143,
-0.038746144622564316,
-0.18283997476100922,
-0.09583571553230286,
-0.20730605721473694,
-0.3507463335990906,
-0.24086488783359528,
0.35457831621170044,
0.019257647916674614,
0.31011223793029785,
0.15299740433692932,
-0.00011143678420921788,
-0.0509641170501709,
0.3131164610385895,
-0.2357948273420334,
-0.29361221194267273,
-0.2888581156730652,
-0.07208938151597977,
-0.3261854648590088,
-0.09043888747692108,
-0.42003169655799866,
0.12744581699371338,
0.04668239504098892,
0.0806712880730629,
-0.13180148601531982,
0.07575755566358566,
0.2992260754108429,
0.2468714565038681,
-0.14260362088680267,
0.3134343922138214,
-0.1457379013299942,
0.3651953637599945,
-0.3777082562446594,
-0.028033530339598656,
0.3395863175392151,
0.218720480799675,
0.07134398818016052,
0.21547909080982208,
0.22204311192035675,
-0.23414066433906555,
0.01349933072924614,
0.04822405055165291,
-0.29122394323349,
0.22220534086227417,
-0.629701554775238,
0.520641565322876,
0.5344274044036865,
0.8290324211120605,
-0.12835131585597992,
-0.08746717870235443,
0.072393499314785,
-0.026059571653604507,
-0.03137509524822235,
-0.05574026703834534,
0.4819800853729248,
-0.18932609260082245,
0.09759890288114548,
0.12616471946239471,
-0.12543044984340668,
-0.15671950578689575,
0.4228460192680359,
-0.1241353303194046,
0.4435884952545166,
-0.05272023379802704,
0.2112599015235901,
-0.0216665156185627,
-0.10270167887210846,
-0.26364099979400635,
-0.06965858489274979,
-0.09616053104400635,
0.2933219373226166,
-0.2793998122215271,
0.019636234268546104,
-0.16150297224521637,
0.05564657226204872,
0.3511344790458679,
-0.15038257837295532,
-0.23462128639221191,
-0.04507802054286003,
0.09601198881864548,
0.15757520496845245,
0.18014878034591675,
0.16378413140773773,
0.0620487779378891,
-0.2000061571598053,
0.2782810628414154,
0.3079039752483368,
-0.08421274274587631,
-0.0761713758111,
-0.2100439965724945,
-0.22305718064308167,
-0.2947562336921692,
0.0944298505783081,
0.08752915263175964,
-0.20317110419273376,
-0.17794694006443024,
0.007112853229045868,
-0.1443609744310379,
-0.01943882554769516,
-0.20239461958408356,
0.36282142996788025,
-0.15014299750328064,
0.43123751878738403,
0.17790168523788452,
0.328822523355484,
-0.10357245802879333,
-0.26130956411361694,
-0.01735268346965313,
0.30654871463775635,
-0.1393190324306488,
-0.1036604642868042,
0.21878241002559662,
-0.10991638898849487,
0.2648518681526184,
-0.08937306702136993,
-0.10313830524682999,
-0.1764124035835266,
-0.1536906510591507,
-0.3695681393146515,
-0.17910411953926086,
0.23040896654129028,
0.1619766354560852,
0.28392747044563293,
0.1476142555475235,
-0.24474751949310303,
-0.23058052361011505,
0.12074483931064606,
-0.3596149981021881,
-0.16815562546253204,
-0.20515534281730652,
0.19446861743927002,
0.06109855696558952,
-0.0546499527990818,
-0.31600698828697205,
0.2876638174057007,
0.3030637502670288,
-0.1423981487751007,
0.1180722787976265,
-0.007545265834778547,
-0.023254673928022385,
-0.22518932819366455,
0.17901143431663513,
0.49079981446266174,
-0.39995941519737244,
0.09189733117818832,
-0.02385012060403824,
-0.03371269255876541,
0.18978251516819,
0.18429774045944214,
-0.17795206606388092,
0.25654172897338867,
-0.09788442403078079,
0.038160406053066254,
0.21013252437114716,
-0.32144269347190857,
-0.5776352882385254,
0.18605440855026245,
0.11341046541929245,
-0.16700491309165955,
0.09948059916496277,
0.016000358387827873,
0.27503105998039246,
-0.04938732087612152,
0.05245454981923103,
0.39567452669143677,
0.13683775067329407,
-0.10564517974853516,
-0.32745084166526794,
-0.5078237056732178,
0.32648128271102905,
0.1633184254169464,
0.45471417903900146,
-0.1322697550058365,
0.27598556876182556,
0.2917204797267914,
0.3191738724708557,
-0.19154725968837738,
0.12467864900827408,
0.23336075246334076,
-0.00894821248948574,
-0.04457567259669304,
-0.0025626758579164743,
-0.33102720975875854,
-0.30975762009620667,
0.14775988459587097,
0.10291292518377304,
0.16546472907066345,
-0.160955548286438,
0.029683437198400497,
-0.31619006395339966,
-0.08880765736103058,
-0.1953120082616806,
0.10326860100030899,
0.1995640993118286,
-0.1052766740322113,
0.11959367990493774,
0.4854587912559509,
0.1265171468257904,
-0.09945830702781677,
-0.4156898558139801,
-0.09485310316085815,
-0.17893461883068085,
0.09233265370130539,
-0.21742913126945496,
0.2044917792081833,
0.03368116915225983,
0.025808528065681458,
0.17968463897705078,
0.0730523020029068,
-0.16072432696819305,
-0.01106140948832035,
-0.0784519836306572,
-0.10354474931955338,
0.1354629248380661,
0.11696359515190125,
0.1331278383731842,
-0.4173748791217804,
0.19202920794487,
0.10847945511341095,
0.32974663376808167,
-0.13577213883399963,
0.11781715601682663,
0.1222362071275711,
0.03997274115681648,
0.3655340373516083,
0.12343069911003113,
0.14983128011226654,
0.45560044050216675,
0.03052617236971855,
0.12635424733161926,
-0.004974493756890297,
0.32711920142173767,
0.15566036105155945,
0.012749645859003067,
-0.13295888900756836,
-0.029277656227350235,
-0.11351632326841354,
0.3166729509830475,
-0.08453336358070374,
0.2671486735343933,
0.2927597761154175,
-0.07651875913143158,
-0.004859514534473419,
-0.09782737493515015,
0.15339845418930054,
0.05220832675695419,
0.069904625415802,
0.10658863931894302,
-0.09984414279460907,
0.3596494197845459,
-0.12939275801181793,
0.264309823513031,
0.17554178833961487,
0.18633411824703217,
0.2091355174779892,
0.13508090376853943,
-0.01117603201419115,
-0.18828310072422028,
-0.1296800971031189,
0.06999470293521881,
0.3717179298400879,
0.06918404996395111,
0.16594617068767548,
-0.04843468591570854,
-0.1418597549200058,
0.0841902494430542,
-0.05239185318350792,
-0.2509417235851288,
-0.2163161039352417,
-0.12563854455947876,
-0.0857282429933548,
0.09158365428447723,
-0.00010400720202596858,
-0.3266661763191223,
-0.07210301607847214,
0.06216660141944885,
-0.3203507661819458,
-0.16056855022907257,
-0.2981228232383728,
-0.36844947934150696,
0.07678727805614471,
0.38712987303733826,
0.11129036545753479,
0.295210063457489,
-0.33262917399406433,
-0.19187872111797333,
-0.0899449810385704,
-0.2681106626987457,
-0.014314225874841213,
-0.15696944296360016,
0.2413957118988037,
-0.024117276072502136,
0.7152191400527954,
-0.17999613285064697,
-0.25142186880111694,
0.1846493035554886,
-0.00701964320614934,
0.06587415933609009,
0.2497716248035431,
-0.1534789502620697,
-0.042924001812934875,
0.08453565835952759,
-0.4856535494327545,
-0.5155774354934692,
-0.2696571946144104,
0.012519567273557186,
0.04851744323968887,
0.08780695497989655,
0.16864076256752014,
0.1924835741519928,
0.06802622973918915,
0.12118712812662125,
0.18090730905532837,
-0.19004331529140472,
-0.1518692821264267,
0.4496891498565674,
-0.02741323597729206,
-0.4299623370170593,
0.18818649649620056,
0.010994188487529755,
0.31493332982063293,
0.007926318794488907,
-0.6572356820106506,
0.14411252737045288,
-0.276358962059021,
0.24994182586669922,
-0.021993543952703476,
0.1834762841463089,
0.11434464901685715,
-0.21369695663452148,
0.04797257483005524,
0.04499596357345581,
0.10590972006320953,
-0.04062100499868393,
-0.2095249891281128,
0.25562170147895813,
0.02994537353515625,
0.2961861491203308,
0.16442067921161652,
0.688840389251709,
0.05485635623335838,
0.16584032773971558,
0.4367818832397461,
0.2385822832584381,
0.23103071749210358,
-0.23142893612384796,
-0.36457201838493347,
0.0605749674141407,
-0.2394915372133255,
-0.031003324314951897,
0.26701223850250244,
-0.16232074797153473,
-0.46741729974746704,
-0.34771326184272766,
-0.2426856905221939,
-0.36746734380722046,
-0.21077078580856323,
0.15399761497974396,
-0.05018191039562225,
0.08294060826301575,
0.0575956255197525,
0.12039817124605179,
0.021574079990386963,
-0.28234976530075073,
0.21378852427005768,
0.5317094922065735,
-0.2486019730567932,
0.16858986020088196,
-0.2782670557498932,
-0.34212255477905273,
-0.4126342236995697,
0.25245562195777893,
0.07770632207393646,
0.41476181149482727,
-0.09380224347114563,
0.34991952776908875,
0.20117996633052826,
-0.0892682746052742,
0.2906241714954376,
-0.17024348676204681,
0.12304995208978653,
0.19724728167057037,
0.10499279201030731,
-0.215217724442482,
-0.062440209090709686,
-0.29433268308639526,
-0.016687719151377678,
0.3054172396659851,
-0.04445454478263855,
-0.6709661483764648,
0.08432866632938385,
-0.042586762458086014,
0.5003295540809631,
-0.05717724561691284,
-0.01735015958547592,
-0.1618575006723404,
-0.5653650760650635,
-0.48540446162223816,
-0.02768666297197342,
0.18957556784152985,
0.4046100080013275,
-0.1972091645002365,
0.26289883255958557,
-0.10207898169755936,
0.2205621600151062,
0.021316133439540863,
0.007735301740467548,
0.21325728297233582,
0.23278552293777466,
0.09743330627679825,
-0.1967879980802536,
-0.13784664869308472,
0.15032637119293213,
0.3620433211326599,
-0.06353205442428589,
-0.23431222140789032,
-0.12124703079462051,
-0.04300352931022644,
0.04348337650299072,
0.1415460705757141,
-0.10129061341285706,
0.04770750552415848,
0.14866259694099426,
-0.1379348486661911,
0.16582104563713074,
-0.01284150592982769,
0.2519466280937195,
-0.10633731633424759,
-0.49623504281044006,
-0.5676649808883667,
0.6620463132858276,
0.02338246814906597,
0.07014172524213791,
0.2541702091693878,
0.175403892993927,
-0.1958615630865097,
0.37537336349487305,
0.1058034598827362,
1.1372191905975342,
-0.22813422977924347,
0.11042021960020065,
-0.1039847731590271,
0.10946564376354218,
0.3614175617694855,
-0.3578394949436188,
0.2084072083234787,
-0.3226420283317566,
-0.1089080199599266,
-0.01951933279633522,
0.07367415726184845,
-0.04613826051354408,
0.09989331662654877,
-0.30722832679748535,
0.2564426064491272,
-0.3662327826023102,
-0.08695473521947861,
0.10564911365509033,
0.23298609256744385,
-0.4058893620967865,
-0.06803661584854126,
-0.32137972116470337,
0.11962873488664627,
-0.21466071903705597,
0.25469282269477844,
-0.21100129187107086,
-0.12547826766967773,
-0.06142396852374077,
-0.2672703266143799,
-0.5050501823425293,
0.07064317911863327,
-0.2883508801460266,
0.32986950874328613,
-0.4893506169319153,
-0.18977464735507965,
0.338620662689209,
0.44487112760543823,
0.041480373591184616,
0.4031551480293274,
-0.2879830598831177,
0.1116526648402214,
-0.2638600170612335,
-0.42361924052238464,
0.09449119120836258,
0.011207900010049343,
0.08713383227586746,
-0.18162909150123596,
-0.3709903955459595,
0.16697277128696442,
-0.057572249323129654,
0.05284922197461128,
-0.09598775207996368,
0.10437755286693573,
0.20165425539016724,
-0.045897744596004486,
-0.3565557301044464,
-0.02228337898850441,
-0.09438604861497879,
-0.08943308889865875,
0.12416666746139526,
0.08219719678163528,
-0.1119045615196228,
0.14091400802135468,
0.1852954924106598,
-0.3349809944629669,
0.02179165743291378,
0.34910571575164795,
0.1834498643875122,
0.02395452931523323,
0.6245270371437073,
0.31554484367370605,
-0.39654046297073364,
-0.18981511890888214,
0.0439140684902668,
-0.2713777422904968,
-0.458574503660202,
-0.08960459381341934,
-0.04218949377536774,
0.33834314346313477,
-0.4149280786514282,
0.35025349259376526,
0.17490629851818085,
-0.23483094573020935,
0.20646440982818604,
-0.7065882682800293,
-0.12402196228504181,
0.21609379351139069,
-0.07890939712524414,
0.006574923172593117,
0.08407143503427505,
-0.30959925055503845,
0.12182705104351044,
0.2352641075849533,
-0.2610889971256256,
0.2092306762933731,
-0.32334259152412415,
0.10076376795768738,
0.09949345886707306,
0.06333241611719131,
0.02230171114206314,
0.1991029679775238,
0.06504811346530914,
0.06916210800409317,
-0.049663886427879333,
-0.25991007685661316,
-0.07022765278816223,
0.1948125660419464,
0.20511353015899658,
-0.05790058150887489,
0.22787503898143768,
-0.5071967840194702,
-0.16867011785507202,
0.08223902434110641,
-0.05847622826695442,
0.11558449268341064,
0.003860039869323373,
0.18110066652297974,
0.20132511854171753,
0.28857046365737915,
-0.35007989406585693,
0.24587731063365936,
-0.08690531551837921,
0.26149821281433105,
0.14082810282707214,
0.07593598961830139,
0.45799243450164795,
0.021300949156284332,
-0.3352101743221283,
-0.033541854470968246,
-0.030077140778303146,
0.08663526177406311,
0.25588056445121765,
-0.23335884511470795,
0.3003470003604889,
0.19892019033432007,
-0.11749520152807236,
0.5623857378959656,
-0.14960479736328125,
0.20659619569778442,
0.41308388113975525,
0.18722347915172577,
-0.3698638081550598,
0.0016460552578791976,
0.2932005524635315,
-0.09663773328065872,
-0.0709826871752739,
0.07596095651388168,
0.2589091956615448,
-0.32232800126075745,
0.11372118443250656,
-0.06573889404535294,
0.1647823601961136,
-0.05655081197619438,
0.19225868582725525,
0.6700755953788757,
0.22707323729991913,
0.04992584139108658,
-0.0694633275270462,
0.16999280452728271,
0.09539502114057541,
0.36280637979507446,
-0.22345663607120514,
0.19276422262191772,
-0.05200457200407982,
0.02463534101843834,
-0.1621609926223755,
-0.3400551676750183,
0.29861074686050415,
0.1632014513015747,
-0.02477487362921238,
0.09867575764656067,
-0.17225874960422516,
0.2616479992866516,
0.15435945987701416,
0.03022289089858532,
-0.26115575432777405,
0.1914433091878891,
-0.12247779965400696,
-0.012982994318008423,
-0.0442100390791893,
-0.2680068016052246,
0.0015667247353121638,
0.15562571585178375,
-0.004661692772060633,
-0.3565726578235626,
0.2555730938911438,
0.3037436306476593,
-0.244086354970932,
-0.4411390423774719,
0.1348092257976532,
0.21249373257160187,
0.03117004781961441,
-0.3002215027809143,
0.15776211023330688,
0.41378042101860046,
0.07809178531169891,
-0.12705528736114502,
0.2019166350364685,
0.4433468282222748,
0.4205474555492401,
-0.3373265266418457,
0.04244174063205719,
0.07533987611532211,
-0.06568092107772827,
-0.023378299549221992,
0.2276100218296051,
0.46722543239593506,
0.2502676248550415,
0.3970099687576294,
0.1184258908033371,
-0.1415998488664627,
-0.03197430446743965,
0.23604975640773773,
-0.06391855329275131,
-0.05667095258831978,
-0.045184873044490814,
-0.0590362623333931,
0.14072102308273315,
-0.4205537736415863,
-0.013584437780082226,
-0.5078697800636292,
0.34002241492271423,
0.16105566918849945,
0.0025867712683975697,
0.17752934992313385,
-0.09258142858743668,
0.0479857474565506,
-0.15697626769542694,
0.39629343152046204,
0.3195849657058716,
0.199141263961792,
-0.3908330202102661,
-0.00899566151201725,
-0.464518666267395,
-0.018635312095284462,
-0.2982341945171356,
0.11210162192583084,
-0.08143274486064911,
0.12865565717220306,
0.07550838589668274,
0.2132711261510849,
0.036631617695093155,
0.04509863629937172,
0.0668022632598877,
0.49491584300994873,
-0.23153194785118103,
-0.24470354616641998,
-0.19481728971004486,
0.21916253864765167,
-0.15832364559173584,
-0.39093199372291565,
0.05759391561150551,
-0.13856172561645508,
0.03407328575849533,
-0.32001999020576477,
-0.06650064140558243,
0.09557345509529114,
0.0059599494561553,
0.33242881298065186,
0.1523781716823578,
0.5925301313400269,
-0.15409474074840546,
-0.20217524468898773,
-0.2086707204580307,
-0.011070453561842442,
-0.159934863448143,
0.3116772770881653,
0.1967301219701767,
0.09890691936016083,
-0.16079406440258026,
-0.11197122931480408,
-0.029564393684267998,
0.2984878122806549,
-0.044816866517066956,
0.19492152333259583,
-0.36696019768714905,
-0.38635677099227905,
0.05791785567998886,
0.11385567486286163,
0.11902748048305511,
0.04692574217915535,
-0.13085585832595825,
-0.0533188059926033,
-0.342149943113327,
-0.3086865544319153,
0.3866538405418396,
-0.3773029148578644,
-0.5697821974754333,
-0.09215575456619263,
0.007928472012281418,
0.04705652594566345,
0.1902984380722046,
-0.3660876452922821,
0.2775554358959198,
0.3897731900215149,
0.051333703100681305,
-0.15096808969974518,
0.16642248630523682,
0.0286492221057415,
-0.01621520146727562,
-0.09404339641332626,
0.11607001721858978,
-0.008283792994916439,
-0.35631418228149414,
-0.22058486938476562,
-0.3912579417228699
] |
https://github.com/huggingface/datasets/issues/2035
|
wiki40b/wikipedia for almost all languages cannot be downloaded
|
HI @dorost1234,
The dataset size is 631.84 MiB so depending on your internet speed it'll take some time. You can monitor your internet speed meanwhile to see if it's downloading the dataset or not (use `nload` if you're using linux/mac to monitor the same). In my case it took around 3-4 mins. Since they haven't used `download_and_extract` here that's why there's no download progress bar.
|
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
| 65
|
wiki40b/wikipedia for almost all languages cannot be downloaded
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
HI @dorost1234,
The dataset size is 631.84 MiB so depending on your internet speed it'll take some time. You can monitor your internet speed meanwhile to see if it's downloading the dataset or not (use `nload` if you're using linux/mac to monitor the same). In my case it took around 3-4 mins. Since they haven't used `download_and_extract` here that's why there's no download progress bar.
|
[
-0.25449883937835693,
-0.07791971415281296,
-0.1537584364414215,
0.43086686730384827,
0.39970263838768005,
0.3504616618156433,
0.1368502825498581,
0.5331583619117737,
0.1893267184495926,
0.023584548383951187,
-0.17730441689491272,
-0.09421756118535995,
0.0944039598107338,
0.011184575967490673,
-0.0297053474932909,
-0.4591730237007141,
-0.0672900378704071,
0.02953762747347355,
-0.13527131080627441,
-0.11689324676990509,
-0.2519628405570984,
0.12561438977718353,
-0.07917481660842896,
-0.04902834817767143,
-0.038746144622564316,
-0.18283997476100922,
-0.09583571553230286,
-0.20730605721473694,
-0.3507463335990906,
-0.24086488783359528,
0.35457831621170044,
0.019257647916674614,
0.31011223793029785,
0.15299740433692932,
-0.00011143678420921788,
-0.0509641170501709,
0.3131164610385895,
-0.2357948273420334,
-0.29361221194267273,
-0.2888581156730652,
-0.07208938151597977,
-0.3261854648590088,
-0.09043888747692108,
-0.42003169655799866,
0.12744581699371338,
0.04668239504098892,
0.0806712880730629,
-0.13180148601531982,
0.07575755566358566,
0.2992260754108429,
0.2468714565038681,
-0.14260362088680267,
0.3134343922138214,
-0.1457379013299942,
0.3651953637599945,
-0.3777082562446594,
-0.028033530339598656,
0.3395863175392151,
0.218720480799675,
0.07134398818016052,
0.21547909080982208,
0.22204311192035675,
-0.23414066433906555,
0.01349933072924614,
0.04822405055165291,
-0.29122394323349,
0.22220534086227417,
-0.629701554775238,
0.520641565322876,
0.5344274044036865,
0.8290324211120605,
-0.12835131585597992,
-0.08746717870235443,
0.072393499314785,
-0.026059571653604507,
-0.03137509524822235,
-0.05574026703834534,
0.4819800853729248,
-0.18932609260082245,
0.09759890288114548,
0.12616471946239471,
-0.12543044984340668,
-0.15671950578689575,
0.4228460192680359,
-0.1241353303194046,
0.4435884952545166,
-0.05272023379802704,
0.2112599015235901,
-0.0216665156185627,
-0.10270167887210846,
-0.26364099979400635,
-0.06965858489274979,
-0.09616053104400635,
0.2933219373226166,
-0.2793998122215271,
0.019636234268546104,
-0.16150297224521637,
0.05564657226204872,
0.3511344790458679,
-0.15038257837295532,
-0.23462128639221191,
-0.04507802054286003,
0.09601198881864548,
0.15757520496845245,
0.18014878034591675,
0.16378413140773773,
0.0620487779378891,
-0.2000061571598053,
0.2782810628414154,
0.3079039752483368,
-0.08421274274587631,
-0.0761713758111,
-0.2100439965724945,
-0.22305718064308167,
-0.2947562336921692,
0.0944298505783081,
0.08752915263175964,
-0.20317110419273376,
-0.17794694006443024,
0.007112853229045868,
-0.1443609744310379,
-0.01943882554769516,
-0.20239461958408356,
0.36282142996788025,
-0.15014299750328064,
0.43123751878738403,
0.17790168523788452,
0.328822523355484,
-0.10357245802879333,
-0.26130956411361694,
-0.01735268346965313,
0.30654871463775635,
-0.1393190324306488,
-0.1036604642868042,
0.21878241002559662,
-0.10991638898849487,
0.2648518681526184,
-0.08937306702136993,
-0.10313830524682999,
-0.1764124035835266,
-0.1536906510591507,
-0.3695681393146515,
-0.17910411953926086,
0.23040896654129028,
0.1619766354560852,
0.28392747044563293,
0.1476142555475235,
-0.24474751949310303,
-0.23058052361011505,
0.12074483931064606,
-0.3596149981021881,
-0.16815562546253204,
-0.20515534281730652,
0.19446861743927002,
0.06109855696558952,
-0.0546499527990818,
-0.31600698828697205,
0.2876638174057007,
0.3030637502670288,
-0.1423981487751007,
0.1180722787976265,
-0.007545265834778547,
-0.023254673928022385,
-0.22518932819366455,
0.17901143431663513,
0.49079981446266174,
-0.39995941519737244,
0.09189733117818832,
-0.02385012060403824,
-0.03371269255876541,
0.18978251516819,
0.18429774045944214,
-0.17795206606388092,
0.25654172897338867,
-0.09788442403078079,
0.038160406053066254,
0.21013252437114716,
-0.32144269347190857,
-0.5776352882385254,
0.18605440855026245,
0.11341046541929245,
-0.16700491309165955,
0.09948059916496277,
0.016000358387827873,
0.27503105998039246,
-0.04938732087612152,
0.05245454981923103,
0.39567452669143677,
0.13683775067329407,
-0.10564517974853516,
-0.32745084166526794,
-0.5078237056732178,
0.32648128271102905,
0.1633184254169464,
0.45471417903900146,
-0.1322697550058365,
0.27598556876182556,
0.2917204797267914,
0.3191738724708557,
-0.19154725968837738,
0.12467864900827408,
0.23336075246334076,
-0.00894821248948574,
-0.04457567259669304,
-0.0025626758579164743,
-0.33102720975875854,
-0.30975762009620667,
0.14775988459587097,
0.10291292518377304,
0.16546472907066345,
-0.160955548286438,
0.029683437198400497,
-0.31619006395339966,
-0.08880765736103058,
-0.1953120082616806,
0.10326860100030899,
0.1995640993118286,
-0.1052766740322113,
0.11959367990493774,
0.4854587912559509,
0.1265171468257904,
-0.09945830702781677,
-0.4156898558139801,
-0.09485310316085815,
-0.17893461883068085,
0.09233265370130539,
-0.21742913126945496,
0.2044917792081833,
0.03368116915225983,
0.025808528065681458,
0.17968463897705078,
0.0730523020029068,
-0.16072432696819305,
-0.01106140948832035,
-0.0784519836306572,
-0.10354474931955338,
0.1354629248380661,
0.11696359515190125,
0.1331278383731842,
-0.4173748791217804,
0.19202920794487,
0.10847945511341095,
0.32974663376808167,
-0.13577213883399963,
0.11781715601682663,
0.1222362071275711,
0.03997274115681648,
0.3655340373516083,
0.12343069911003113,
0.14983128011226654,
0.45560044050216675,
0.03052617236971855,
0.12635424733161926,
-0.004974493756890297,
0.32711920142173767,
0.15566036105155945,
0.012749645859003067,
-0.13295888900756836,
-0.029277656227350235,
-0.11351632326841354,
0.3166729509830475,
-0.08453336358070374,
0.2671486735343933,
0.2927597761154175,
-0.07651875913143158,
-0.004859514534473419,
-0.09782737493515015,
0.15339845418930054,
0.05220832675695419,
0.069904625415802,
0.10658863931894302,
-0.09984414279460907,
0.3596494197845459,
-0.12939275801181793,
0.264309823513031,
0.17554178833961487,
0.18633411824703217,
0.2091355174779892,
0.13508090376853943,
-0.01117603201419115,
-0.18828310072422028,
-0.1296800971031189,
0.06999470293521881,
0.3717179298400879,
0.06918404996395111,
0.16594617068767548,
-0.04843468591570854,
-0.1418597549200058,
0.0841902494430542,
-0.05239185318350792,
-0.2509417235851288,
-0.2163161039352417,
-0.12563854455947876,
-0.0857282429933548,
0.09158365428447723,
-0.00010400720202596858,
-0.3266661763191223,
-0.07210301607847214,
0.06216660141944885,
-0.3203507661819458,
-0.16056855022907257,
-0.2981228232383728,
-0.36844947934150696,
0.07678727805614471,
0.38712987303733826,
0.11129036545753479,
0.295210063457489,
-0.33262917399406433,
-0.19187872111797333,
-0.0899449810385704,
-0.2681106626987457,
-0.014314225874841213,
-0.15696944296360016,
0.2413957118988037,
-0.024117276072502136,
0.7152191400527954,
-0.17999613285064697,
-0.25142186880111694,
0.1846493035554886,
-0.00701964320614934,
0.06587415933609009,
0.2497716248035431,
-0.1534789502620697,
-0.042924001812934875,
0.08453565835952759,
-0.4856535494327545,
-0.5155774354934692,
-0.2696571946144104,
0.012519567273557186,
0.04851744323968887,
0.08780695497989655,
0.16864076256752014,
0.1924835741519928,
0.06802622973918915,
0.12118712812662125,
0.18090730905532837,
-0.19004331529140472,
-0.1518692821264267,
0.4496891498565674,
-0.02741323597729206,
-0.4299623370170593,
0.18818649649620056,
0.010994188487529755,
0.31493332982063293,
0.007926318794488907,
-0.6572356820106506,
0.14411252737045288,
-0.276358962059021,
0.24994182586669922,
-0.021993543952703476,
0.1834762841463089,
0.11434464901685715,
-0.21369695663452148,
0.04797257483005524,
0.04499596357345581,
0.10590972006320953,
-0.04062100499868393,
-0.2095249891281128,
0.25562170147895813,
0.02994537353515625,
0.2961861491203308,
0.16442067921161652,
0.688840389251709,
0.05485635623335838,
0.16584032773971558,
0.4367818832397461,
0.2385822832584381,
0.23103071749210358,
-0.23142893612384796,
-0.36457201838493347,
0.0605749674141407,
-0.2394915372133255,
-0.031003324314951897,
0.26701223850250244,
-0.16232074797153473,
-0.46741729974746704,
-0.34771326184272766,
-0.2426856905221939,
-0.36746734380722046,
-0.21077078580856323,
0.15399761497974396,
-0.05018191039562225,
0.08294060826301575,
0.0575956255197525,
0.12039817124605179,
0.021574079990386963,
-0.28234976530075073,
0.21378852427005768,
0.5317094922065735,
-0.2486019730567932,
0.16858986020088196,
-0.2782670557498932,
-0.34212255477905273,
-0.4126342236995697,
0.25245562195777893,
0.07770632207393646,
0.41476181149482727,
-0.09380224347114563,
0.34991952776908875,
0.20117996633052826,
-0.0892682746052742,
0.2906241714954376,
-0.17024348676204681,
0.12304995208978653,
0.19724728167057037,
0.10499279201030731,
-0.215217724442482,
-0.062440209090709686,
-0.29433268308639526,
-0.016687719151377678,
0.3054172396659851,
-0.04445454478263855,
-0.6709661483764648,
0.08432866632938385,
-0.042586762458086014,
0.5003295540809631,
-0.05717724561691284,
-0.01735015958547592,
-0.1618575006723404,
-0.5653650760650635,
-0.48540446162223816,
-0.02768666297197342,
0.18957556784152985,
0.4046100080013275,
-0.1972091645002365,
0.26289883255958557,
-0.10207898169755936,
0.2205621600151062,
0.021316133439540863,
0.007735301740467548,
0.21325728297233582,
0.23278552293777466,
0.09743330627679825,
-0.1967879980802536,
-0.13784664869308472,
0.15032637119293213,
0.3620433211326599,
-0.06353205442428589,
-0.23431222140789032,
-0.12124703079462051,
-0.04300352931022644,
0.04348337650299072,
0.1415460705757141,
-0.10129061341285706,
0.04770750552415848,
0.14866259694099426,
-0.1379348486661911,
0.16582104563713074,
-0.01284150592982769,
0.2519466280937195,
-0.10633731633424759,
-0.49623504281044006,
-0.5676649808883667,
0.6620463132858276,
0.02338246814906597,
0.07014172524213791,
0.2541702091693878,
0.175403892993927,
-0.1958615630865097,
0.37537336349487305,
0.1058034598827362,
1.1372191905975342,
-0.22813422977924347,
0.11042021960020065,
-0.1039847731590271,
0.10946564376354218,
0.3614175617694855,
-0.3578394949436188,
0.2084072083234787,
-0.3226420283317566,
-0.1089080199599266,
-0.01951933279633522,
0.07367415726184845,
-0.04613826051354408,
0.09989331662654877,
-0.30722832679748535,
0.2564426064491272,
-0.3662327826023102,
-0.08695473521947861,
0.10564911365509033,
0.23298609256744385,
-0.4058893620967865,
-0.06803661584854126,
-0.32137972116470337,
0.11962873488664627,
-0.21466071903705597,
0.25469282269477844,
-0.21100129187107086,
-0.12547826766967773,
-0.06142396852374077,
-0.2672703266143799,
-0.5050501823425293,
0.07064317911863327,
-0.2883508801460266,
0.32986950874328613,
-0.4893506169319153,
-0.18977464735507965,
0.338620662689209,
0.44487112760543823,
0.041480373591184616,
0.4031551480293274,
-0.2879830598831177,
0.1116526648402214,
-0.2638600170612335,
-0.42361924052238464,
0.09449119120836258,
0.011207900010049343,
0.08713383227586746,
-0.18162909150123596,
-0.3709903955459595,
0.16697277128696442,
-0.057572249323129654,
0.05284922197461128,
-0.09598775207996368,
0.10437755286693573,
0.20165425539016724,
-0.045897744596004486,
-0.3565557301044464,
-0.02228337898850441,
-0.09438604861497879,
-0.08943308889865875,
0.12416666746139526,
0.08219719678163528,
-0.1119045615196228,
0.14091400802135468,
0.1852954924106598,
-0.3349809944629669,
0.02179165743291378,
0.34910571575164795,
0.1834498643875122,
0.02395452931523323,
0.6245270371437073,
0.31554484367370605,
-0.39654046297073364,
-0.18981511890888214,
0.0439140684902668,
-0.2713777422904968,
-0.458574503660202,
-0.08960459381341934,
-0.04218949377536774,
0.33834314346313477,
-0.4149280786514282,
0.35025349259376526,
0.17490629851818085,
-0.23483094573020935,
0.20646440982818604,
-0.7065882682800293,
-0.12402196228504181,
0.21609379351139069,
-0.07890939712524414,
0.006574923172593117,
0.08407143503427505,
-0.30959925055503845,
0.12182705104351044,
0.2352641075849533,
-0.2610889971256256,
0.2092306762933731,
-0.32334259152412415,
0.10076376795768738,
0.09949345886707306,
0.06333241611719131,
0.02230171114206314,
0.1991029679775238,
0.06504811346530914,
0.06916210800409317,
-0.049663886427879333,
-0.25991007685661316,
-0.07022765278816223,
0.1948125660419464,
0.20511353015899658,
-0.05790058150887489,
0.22787503898143768,
-0.5071967840194702,
-0.16867011785507202,
0.08223902434110641,
-0.05847622826695442,
0.11558449268341064,
0.003860039869323373,
0.18110066652297974,
0.20132511854171753,
0.28857046365737915,
-0.35007989406585693,
0.24587731063365936,
-0.08690531551837921,
0.26149821281433105,
0.14082810282707214,
0.07593598961830139,
0.45799243450164795,
0.021300949156284332,
-0.3352101743221283,
-0.033541854470968246,
-0.030077140778303146,
0.08663526177406311,
0.25588056445121765,
-0.23335884511470795,
0.3003470003604889,
0.19892019033432007,
-0.11749520152807236,
0.5623857378959656,
-0.14960479736328125,
0.20659619569778442,
0.41308388113975525,
0.18722347915172577,
-0.3698638081550598,
0.0016460552578791976,
0.2932005524635315,
-0.09663773328065872,
-0.0709826871752739,
0.07596095651388168,
0.2589091956615448,
-0.32232800126075745,
0.11372118443250656,
-0.06573889404535294,
0.1647823601961136,
-0.05655081197619438,
0.19225868582725525,
0.6700755953788757,
0.22707323729991913,
0.04992584139108658,
-0.0694633275270462,
0.16999280452728271,
0.09539502114057541,
0.36280637979507446,
-0.22345663607120514,
0.19276422262191772,
-0.05200457200407982,
0.02463534101843834,
-0.1621609926223755,
-0.3400551676750183,
0.29861074686050415,
0.1632014513015747,
-0.02477487362921238,
0.09867575764656067,
-0.17225874960422516,
0.2616479992866516,
0.15435945987701416,
0.03022289089858532,
-0.26115575432777405,
0.1914433091878891,
-0.12247779965400696,
-0.012982994318008423,
-0.0442100390791893,
-0.2680068016052246,
0.0015667247353121638,
0.15562571585178375,
-0.004661692772060633,
-0.3565726578235626,
0.2555730938911438,
0.3037436306476593,
-0.244086354970932,
-0.4411390423774719,
0.1348092257976532,
0.21249373257160187,
0.03117004781961441,
-0.3002215027809143,
0.15776211023330688,
0.41378042101860046,
0.07809178531169891,
-0.12705528736114502,
0.2019166350364685,
0.4433468282222748,
0.4205474555492401,
-0.3373265266418457,
0.04244174063205719,
0.07533987611532211,
-0.06568092107772827,
-0.023378299549221992,
0.2276100218296051,
0.46722543239593506,
0.2502676248550415,
0.3970099687576294,
0.1184258908033371,
-0.1415998488664627,
-0.03197430446743965,
0.23604975640773773,
-0.06391855329275131,
-0.05667095258831978,
-0.045184873044490814,
-0.0590362623333931,
0.14072102308273315,
-0.4205537736415863,
-0.013584437780082226,
-0.5078697800636292,
0.34002241492271423,
0.16105566918849945,
0.0025867712683975697,
0.17752934992313385,
-0.09258142858743668,
0.0479857474565506,
-0.15697626769542694,
0.39629343152046204,
0.3195849657058716,
0.199141263961792,
-0.3908330202102661,
-0.00899566151201725,
-0.464518666267395,
-0.018635312095284462,
-0.2982341945171356,
0.11210162192583084,
-0.08143274486064911,
0.12865565717220306,
0.07550838589668274,
0.2132711261510849,
0.036631617695093155,
0.04509863629937172,
0.0668022632598877,
0.49491584300994873,
-0.23153194785118103,
-0.24470354616641998,
-0.19481728971004486,
0.21916253864765167,
-0.15832364559173584,
-0.39093199372291565,
0.05759391561150551,
-0.13856172561645508,
0.03407328575849533,
-0.32001999020576477,
-0.06650064140558243,
0.09557345509529114,
0.0059599494561553,
0.33242881298065186,
0.1523781716823578,
0.5925301313400269,
-0.15409474074840546,
-0.20217524468898773,
-0.2086707204580307,
-0.011070453561842442,
-0.159934863448143,
0.3116772770881653,
0.1967301219701767,
0.09890691936016083,
-0.16079406440258026,
-0.11197122931480408,
-0.029564393684267998,
0.2984878122806549,
-0.044816866517066956,
0.19492152333259583,
-0.36696019768714905,
-0.38635677099227905,
0.05791785567998886,
0.11385567486286163,
0.11902748048305511,
0.04692574217915535,
-0.13085585832595825,
-0.0533188059926033,
-0.342149943113327,
-0.3086865544319153,
0.3866538405418396,
-0.3773029148578644,
-0.5697821974754333,
-0.09215575456619263,
0.007928472012281418,
0.04705652594566345,
0.1902984380722046,
-0.3660876452922821,
0.2775554358959198,
0.3897731900215149,
0.051333703100681305,
-0.15096808969974518,
0.16642248630523682,
0.0286492221057415,
-0.01621520146727562,
-0.09404339641332626,
0.11607001721858978,
-0.008283792994916439,
-0.35631418228149414,
-0.22058486938476562,
-0.3912579417228699
] |
https://github.com/huggingface/datasets/issues/2035
|
wiki40b/wikipedia for almost all languages cannot be downloaded
|
Hi
thanks, my internet speed should be good, but this really freezes for me, this is how I try to get this dataset:
`from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs", beam_runner='DirectRunner')`
the output I see if different also from what you see after writing this command:
`Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /users/dara/cache/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...`
do you have any idea why it might get freezed? anything I am missing @lhoestq @bhavitvyamalik. Do I need maybe to set anything special for apache-beam?
thanks a lot
On Tue, Mar 16, 2021 at 9:03 AM Bhavitvya Malik ***@***.***>
wrote:
> HI @dorost1234 <https://github.com/dorost1234>,
> The dataset size is 631.84 MiB so depending on your internet speed it'll
> take some time. You can monitor your internet speed meanwhile to see if
> it's downloading the dataset or not (use nload if you're using linux/mac
> to monitor the same). In my case it took around 3-4 mins. Since they
> haven't used download_and_extract here that's why there's no download
> progress bar.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2035#issuecomment-800044303>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMQIHNNLM2LGG6QKZ73TD4GDJANCNFSM4ZA5R2UA>
> .
>
|
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
| 212
|
wiki40b/wikipedia for almost all languages cannot be downloaded
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
Hi
thanks, my internet speed should be good, but this really freezes for me, this is how I try to get this dataset:
`from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs", beam_runner='DirectRunner')`
the output I see if different also from what you see after writing this command:
`Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /users/dara/cache/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...`
do you have any idea why it might get freezed? anything I am missing @lhoestq @bhavitvyamalik. Do I need maybe to set anything special for apache-beam?
thanks a lot
On Tue, Mar 16, 2021 at 9:03 AM Bhavitvya Malik ***@***.***>
wrote:
> HI @dorost1234 <https://github.com/dorost1234>,
> The dataset size is 631.84 MiB so depending on your internet speed it'll
> take some time. You can monitor your internet speed meanwhile to see if
> it's downloading the dataset or not (use nload if you're using linux/mac
> to monitor the same). In my case it took around 3-4 mins. Since they
> haven't used download_and_extract here that's why there's no download
> progress bar.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2035#issuecomment-800044303>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMQIHNNLM2LGG6QKZ73TD4GDJANCNFSM4ZA5R2UA>
> .
>
|
[
-0.25449883937835693,
-0.07791971415281296,
-0.1537584364414215,
0.43086686730384827,
0.39970263838768005,
0.3504616618156433,
0.1368502825498581,
0.5331583619117737,
0.1893267184495926,
0.023584548383951187,
-0.17730441689491272,
-0.09421756118535995,
0.0944039598107338,
0.011184575967490673,
-0.0297053474932909,
-0.4591730237007141,
-0.0672900378704071,
0.02953762747347355,
-0.13527131080627441,
-0.11689324676990509,
-0.2519628405570984,
0.12561438977718353,
-0.07917481660842896,
-0.04902834817767143,
-0.038746144622564316,
-0.18283997476100922,
-0.09583571553230286,
-0.20730605721473694,
-0.3507463335990906,
-0.24086488783359528,
0.35457831621170044,
0.019257647916674614,
0.31011223793029785,
0.15299740433692932,
-0.00011143678420921788,
-0.0509641170501709,
0.3131164610385895,
-0.2357948273420334,
-0.29361221194267273,
-0.2888581156730652,
-0.07208938151597977,
-0.3261854648590088,
-0.09043888747692108,
-0.42003169655799866,
0.12744581699371338,
0.04668239504098892,
0.0806712880730629,
-0.13180148601531982,
0.07575755566358566,
0.2992260754108429,
0.2468714565038681,
-0.14260362088680267,
0.3134343922138214,
-0.1457379013299942,
0.3651953637599945,
-0.3777082562446594,
-0.028033530339598656,
0.3395863175392151,
0.218720480799675,
0.07134398818016052,
0.21547909080982208,
0.22204311192035675,
-0.23414066433906555,
0.01349933072924614,
0.04822405055165291,
-0.29122394323349,
0.22220534086227417,
-0.629701554775238,
0.520641565322876,
0.5344274044036865,
0.8290324211120605,
-0.12835131585597992,
-0.08746717870235443,
0.072393499314785,
-0.026059571653604507,
-0.03137509524822235,
-0.05574026703834534,
0.4819800853729248,
-0.18932609260082245,
0.09759890288114548,
0.12616471946239471,
-0.12543044984340668,
-0.15671950578689575,
0.4228460192680359,
-0.1241353303194046,
0.4435884952545166,
-0.05272023379802704,
0.2112599015235901,
-0.0216665156185627,
-0.10270167887210846,
-0.26364099979400635,
-0.06965858489274979,
-0.09616053104400635,
0.2933219373226166,
-0.2793998122215271,
0.019636234268546104,
-0.16150297224521637,
0.05564657226204872,
0.3511344790458679,
-0.15038257837295532,
-0.23462128639221191,
-0.04507802054286003,
0.09601198881864548,
0.15757520496845245,
0.18014878034591675,
0.16378413140773773,
0.0620487779378891,
-0.2000061571598053,
0.2782810628414154,
0.3079039752483368,
-0.08421274274587631,
-0.0761713758111,
-0.2100439965724945,
-0.22305718064308167,
-0.2947562336921692,
0.0944298505783081,
0.08752915263175964,
-0.20317110419273376,
-0.17794694006443024,
0.007112853229045868,
-0.1443609744310379,
-0.01943882554769516,
-0.20239461958408356,
0.36282142996788025,
-0.15014299750328064,
0.43123751878738403,
0.17790168523788452,
0.328822523355484,
-0.10357245802879333,
-0.26130956411361694,
-0.01735268346965313,
0.30654871463775635,
-0.1393190324306488,
-0.1036604642868042,
0.21878241002559662,
-0.10991638898849487,
0.2648518681526184,
-0.08937306702136993,
-0.10313830524682999,
-0.1764124035835266,
-0.1536906510591507,
-0.3695681393146515,
-0.17910411953926086,
0.23040896654129028,
0.1619766354560852,
0.28392747044563293,
0.1476142555475235,
-0.24474751949310303,
-0.23058052361011505,
0.12074483931064606,
-0.3596149981021881,
-0.16815562546253204,
-0.20515534281730652,
0.19446861743927002,
0.06109855696558952,
-0.0546499527990818,
-0.31600698828697205,
0.2876638174057007,
0.3030637502670288,
-0.1423981487751007,
0.1180722787976265,
-0.007545265834778547,
-0.023254673928022385,
-0.22518932819366455,
0.17901143431663513,
0.49079981446266174,
-0.39995941519737244,
0.09189733117818832,
-0.02385012060403824,
-0.03371269255876541,
0.18978251516819,
0.18429774045944214,
-0.17795206606388092,
0.25654172897338867,
-0.09788442403078079,
0.038160406053066254,
0.21013252437114716,
-0.32144269347190857,
-0.5776352882385254,
0.18605440855026245,
0.11341046541929245,
-0.16700491309165955,
0.09948059916496277,
0.016000358387827873,
0.27503105998039246,
-0.04938732087612152,
0.05245454981923103,
0.39567452669143677,
0.13683775067329407,
-0.10564517974853516,
-0.32745084166526794,
-0.5078237056732178,
0.32648128271102905,
0.1633184254169464,
0.45471417903900146,
-0.1322697550058365,
0.27598556876182556,
0.2917204797267914,
0.3191738724708557,
-0.19154725968837738,
0.12467864900827408,
0.23336075246334076,
-0.00894821248948574,
-0.04457567259669304,
-0.0025626758579164743,
-0.33102720975875854,
-0.30975762009620667,
0.14775988459587097,
0.10291292518377304,
0.16546472907066345,
-0.160955548286438,
0.029683437198400497,
-0.31619006395339966,
-0.08880765736103058,
-0.1953120082616806,
0.10326860100030899,
0.1995640993118286,
-0.1052766740322113,
0.11959367990493774,
0.4854587912559509,
0.1265171468257904,
-0.09945830702781677,
-0.4156898558139801,
-0.09485310316085815,
-0.17893461883068085,
0.09233265370130539,
-0.21742913126945496,
0.2044917792081833,
0.03368116915225983,
0.025808528065681458,
0.17968463897705078,
0.0730523020029068,
-0.16072432696819305,
-0.01106140948832035,
-0.0784519836306572,
-0.10354474931955338,
0.1354629248380661,
0.11696359515190125,
0.1331278383731842,
-0.4173748791217804,
0.19202920794487,
0.10847945511341095,
0.32974663376808167,
-0.13577213883399963,
0.11781715601682663,
0.1222362071275711,
0.03997274115681648,
0.3655340373516083,
0.12343069911003113,
0.14983128011226654,
0.45560044050216675,
0.03052617236971855,
0.12635424733161926,
-0.004974493756890297,
0.32711920142173767,
0.15566036105155945,
0.012749645859003067,
-0.13295888900756836,
-0.029277656227350235,
-0.11351632326841354,
0.3166729509830475,
-0.08453336358070374,
0.2671486735343933,
0.2927597761154175,
-0.07651875913143158,
-0.004859514534473419,
-0.09782737493515015,
0.15339845418930054,
0.05220832675695419,
0.069904625415802,
0.10658863931894302,
-0.09984414279460907,
0.3596494197845459,
-0.12939275801181793,
0.264309823513031,
0.17554178833961487,
0.18633411824703217,
0.2091355174779892,
0.13508090376853943,
-0.01117603201419115,
-0.18828310072422028,
-0.1296800971031189,
0.06999470293521881,
0.3717179298400879,
0.06918404996395111,
0.16594617068767548,
-0.04843468591570854,
-0.1418597549200058,
0.0841902494430542,
-0.05239185318350792,
-0.2509417235851288,
-0.2163161039352417,
-0.12563854455947876,
-0.0857282429933548,
0.09158365428447723,
-0.00010400720202596858,
-0.3266661763191223,
-0.07210301607847214,
0.06216660141944885,
-0.3203507661819458,
-0.16056855022907257,
-0.2981228232383728,
-0.36844947934150696,
0.07678727805614471,
0.38712987303733826,
0.11129036545753479,
0.295210063457489,
-0.33262917399406433,
-0.19187872111797333,
-0.0899449810385704,
-0.2681106626987457,
-0.014314225874841213,
-0.15696944296360016,
0.2413957118988037,
-0.024117276072502136,
0.7152191400527954,
-0.17999613285064697,
-0.25142186880111694,
0.1846493035554886,
-0.00701964320614934,
0.06587415933609009,
0.2497716248035431,
-0.1534789502620697,
-0.042924001812934875,
0.08453565835952759,
-0.4856535494327545,
-0.5155774354934692,
-0.2696571946144104,
0.012519567273557186,
0.04851744323968887,
0.08780695497989655,
0.16864076256752014,
0.1924835741519928,
0.06802622973918915,
0.12118712812662125,
0.18090730905532837,
-0.19004331529140472,
-0.1518692821264267,
0.4496891498565674,
-0.02741323597729206,
-0.4299623370170593,
0.18818649649620056,
0.010994188487529755,
0.31493332982063293,
0.007926318794488907,
-0.6572356820106506,
0.14411252737045288,
-0.276358962059021,
0.24994182586669922,
-0.021993543952703476,
0.1834762841463089,
0.11434464901685715,
-0.21369695663452148,
0.04797257483005524,
0.04499596357345581,
0.10590972006320953,
-0.04062100499868393,
-0.2095249891281128,
0.25562170147895813,
0.02994537353515625,
0.2961861491203308,
0.16442067921161652,
0.688840389251709,
0.05485635623335838,
0.16584032773971558,
0.4367818832397461,
0.2385822832584381,
0.23103071749210358,
-0.23142893612384796,
-0.36457201838493347,
0.0605749674141407,
-0.2394915372133255,
-0.031003324314951897,
0.26701223850250244,
-0.16232074797153473,
-0.46741729974746704,
-0.34771326184272766,
-0.2426856905221939,
-0.36746734380722046,
-0.21077078580856323,
0.15399761497974396,
-0.05018191039562225,
0.08294060826301575,
0.0575956255197525,
0.12039817124605179,
0.021574079990386963,
-0.28234976530075073,
0.21378852427005768,
0.5317094922065735,
-0.2486019730567932,
0.16858986020088196,
-0.2782670557498932,
-0.34212255477905273,
-0.4126342236995697,
0.25245562195777893,
0.07770632207393646,
0.41476181149482727,
-0.09380224347114563,
0.34991952776908875,
0.20117996633052826,
-0.0892682746052742,
0.2906241714954376,
-0.17024348676204681,
0.12304995208978653,
0.19724728167057037,
0.10499279201030731,
-0.215217724442482,
-0.062440209090709686,
-0.29433268308639526,
-0.016687719151377678,
0.3054172396659851,
-0.04445454478263855,
-0.6709661483764648,
0.08432866632938385,
-0.042586762458086014,
0.5003295540809631,
-0.05717724561691284,
-0.01735015958547592,
-0.1618575006723404,
-0.5653650760650635,
-0.48540446162223816,
-0.02768666297197342,
0.18957556784152985,
0.4046100080013275,
-0.1972091645002365,
0.26289883255958557,
-0.10207898169755936,
0.2205621600151062,
0.021316133439540863,
0.007735301740467548,
0.21325728297233582,
0.23278552293777466,
0.09743330627679825,
-0.1967879980802536,
-0.13784664869308472,
0.15032637119293213,
0.3620433211326599,
-0.06353205442428589,
-0.23431222140789032,
-0.12124703079462051,
-0.04300352931022644,
0.04348337650299072,
0.1415460705757141,
-0.10129061341285706,
0.04770750552415848,
0.14866259694099426,
-0.1379348486661911,
0.16582104563713074,
-0.01284150592982769,
0.2519466280937195,
-0.10633731633424759,
-0.49623504281044006,
-0.5676649808883667,
0.6620463132858276,
0.02338246814906597,
0.07014172524213791,
0.2541702091693878,
0.175403892993927,
-0.1958615630865097,
0.37537336349487305,
0.1058034598827362,
1.1372191905975342,
-0.22813422977924347,
0.11042021960020065,
-0.1039847731590271,
0.10946564376354218,
0.3614175617694855,
-0.3578394949436188,
0.2084072083234787,
-0.3226420283317566,
-0.1089080199599266,
-0.01951933279633522,
0.07367415726184845,
-0.04613826051354408,
0.09989331662654877,
-0.30722832679748535,
0.2564426064491272,
-0.3662327826023102,
-0.08695473521947861,
0.10564911365509033,
0.23298609256744385,
-0.4058893620967865,
-0.06803661584854126,
-0.32137972116470337,
0.11962873488664627,
-0.21466071903705597,
0.25469282269477844,
-0.21100129187107086,
-0.12547826766967773,
-0.06142396852374077,
-0.2672703266143799,
-0.5050501823425293,
0.07064317911863327,
-0.2883508801460266,
0.32986950874328613,
-0.4893506169319153,
-0.18977464735507965,
0.338620662689209,
0.44487112760543823,
0.041480373591184616,
0.4031551480293274,
-0.2879830598831177,
0.1116526648402214,
-0.2638600170612335,
-0.42361924052238464,
0.09449119120836258,
0.011207900010049343,
0.08713383227586746,
-0.18162909150123596,
-0.3709903955459595,
0.16697277128696442,
-0.057572249323129654,
0.05284922197461128,
-0.09598775207996368,
0.10437755286693573,
0.20165425539016724,
-0.045897744596004486,
-0.3565557301044464,
-0.02228337898850441,
-0.09438604861497879,
-0.08943308889865875,
0.12416666746139526,
0.08219719678163528,
-0.1119045615196228,
0.14091400802135468,
0.1852954924106598,
-0.3349809944629669,
0.02179165743291378,
0.34910571575164795,
0.1834498643875122,
0.02395452931523323,
0.6245270371437073,
0.31554484367370605,
-0.39654046297073364,
-0.18981511890888214,
0.0439140684902668,
-0.2713777422904968,
-0.458574503660202,
-0.08960459381341934,
-0.04218949377536774,
0.33834314346313477,
-0.4149280786514282,
0.35025349259376526,
0.17490629851818085,
-0.23483094573020935,
0.20646440982818604,
-0.7065882682800293,
-0.12402196228504181,
0.21609379351139069,
-0.07890939712524414,
0.006574923172593117,
0.08407143503427505,
-0.30959925055503845,
0.12182705104351044,
0.2352641075849533,
-0.2610889971256256,
0.2092306762933731,
-0.32334259152412415,
0.10076376795768738,
0.09949345886707306,
0.06333241611719131,
0.02230171114206314,
0.1991029679775238,
0.06504811346530914,
0.06916210800409317,
-0.049663886427879333,
-0.25991007685661316,
-0.07022765278816223,
0.1948125660419464,
0.20511353015899658,
-0.05790058150887489,
0.22787503898143768,
-0.5071967840194702,
-0.16867011785507202,
0.08223902434110641,
-0.05847622826695442,
0.11558449268341064,
0.003860039869323373,
0.18110066652297974,
0.20132511854171753,
0.28857046365737915,
-0.35007989406585693,
0.24587731063365936,
-0.08690531551837921,
0.26149821281433105,
0.14082810282707214,
0.07593598961830139,
0.45799243450164795,
0.021300949156284332,
-0.3352101743221283,
-0.033541854470968246,
-0.030077140778303146,
0.08663526177406311,
0.25588056445121765,
-0.23335884511470795,
0.3003470003604889,
0.19892019033432007,
-0.11749520152807236,
0.5623857378959656,
-0.14960479736328125,
0.20659619569778442,
0.41308388113975525,
0.18722347915172577,
-0.3698638081550598,
0.0016460552578791976,
0.2932005524635315,
-0.09663773328065872,
-0.0709826871752739,
0.07596095651388168,
0.2589091956615448,
-0.32232800126075745,
0.11372118443250656,
-0.06573889404535294,
0.1647823601961136,
-0.05655081197619438,
0.19225868582725525,
0.6700755953788757,
0.22707323729991913,
0.04992584139108658,
-0.0694633275270462,
0.16999280452728271,
0.09539502114057541,
0.36280637979507446,
-0.22345663607120514,
0.19276422262191772,
-0.05200457200407982,
0.02463534101843834,
-0.1621609926223755,
-0.3400551676750183,
0.29861074686050415,
0.1632014513015747,
-0.02477487362921238,
0.09867575764656067,
-0.17225874960422516,
0.2616479992866516,
0.15435945987701416,
0.03022289089858532,
-0.26115575432777405,
0.1914433091878891,
-0.12247779965400696,
-0.012982994318008423,
-0.0442100390791893,
-0.2680068016052246,
0.0015667247353121638,
0.15562571585178375,
-0.004661692772060633,
-0.3565726578235626,
0.2555730938911438,
0.3037436306476593,
-0.244086354970932,
-0.4411390423774719,
0.1348092257976532,
0.21249373257160187,
0.03117004781961441,
-0.3002215027809143,
0.15776211023330688,
0.41378042101860046,
0.07809178531169891,
-0.12705528736114502,
0.2019166350364685,
0.4433468282222748,
0.4205474555492401,
-0.3373265266418457,
0.04244174063205719,
0.07533987611532211,
-0.06568092107772827,
-0.023378299549221992,
0.2276100218296051,
0.46722543239593506,
0.2502676248550415,
0.3970099687576294,
0.1184258908033371,
-0.1415998488664627,
-0.03197430446743965,
0.23604975640773773,
-0.06391855329275131,
-0.05667095258831978,
-0.045184873044490814,
-0.0590362623333931,
0.14072102308273315,
-0.4205537736415863,
-0.013584437780082226,
-0.5078697800636292,
0.34002241492271423,
0.16105566918849945,
0.0025867712683975697,
0.17752934992313385,
-0.09258142858743668,
0.0479857474565506,
-0.15697626769542694,
0.39629343152046204,
0.3195849657058716,
0.199141263961792,
-0.3908330202102661,
-0.00899566151201725,
-0.464518666267395,
-0.018635312095284462,
-0.2982341945171356,
0.11210162192583084,
-0.08143274486064911,
0.12865565717220306,
0.07550838589668274,
0.2132711261510849,
0.036631617695093155,
0.04509863629937172,
0.0668022632598877,
0.49491584300994873,
-0.23153194785118103,
-0.24470354616641998,
-0.19481728971004486,
0.21916253864765167,
-0.15832364559173584,
-0.39093199372291565,
0.05759391561150551,
-0.13856172561645508,
0.03407328575849533,
-0.32001999020576477,
-0.06650064140558243,
0.09557345509529114,
0.0059599494561553,
0.33242881298065186,
0.1523781716823578,
0.5925301313400269,
-0.15409474074840546,
-0.20217524468898773,
-0.2086707204580307,
-0.011070453561842442,
-0.159934863448143,
0.3116772770881653,
0.1967301219701767,
0.09890691936016083,
-0.16079406440258026,
-0.11197122931480408,
-0.029564393684267998,
0.2984878122806549,
-0.044816866517066956,
0.19492152333259583,
-0.36696019768714905,
-0.38635677099227905,
0.05791785567998886,
0.11385567486286163,
0.11902748048305511,
0.04692574217915535,
-0.13085585832595825,
-0.0533188059926033,
-0.342149943113327,
-0.3086865544319153,
0.3866538405418396,
-0.3773029148578644,
-0.5697821974754333,
-0.09215575456619263,
0.007928472012281418,
0.04705652594566345,
0.1902984380722046,
-0.3660876452922821,
0.2775554358959198,
0.3897731900215149,
0.051333703100681305,
-0.15096808969974518,
0.16642248630523682,
0.0286492221057415,
-0.01621520146727562,
-0.09404339641332626,
0.11607001721858978,
-0.008283792994916439,
-0.35631418228149414,
-0.22058486938476562,
-0.3912579417228699
] |
https://github.com/huggingface/datasets/issues/2035
|
wiki40b/wikipedia for almost all languages cannot be downloaded
|
I tried this on another machine (followed the same procedure I've mentioned above). This is what it shows (during the freeze period) for me:
```
>>> dataset = load_dataset("wiki40b", "cs", beam_runner='DirectRunner')
Downloading: 5.26kB [00:00, 1.23MB/s]
Downloading: 1.40kB [00:00, 327kB/s]
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/bhavitvya/.cache/huggingface/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
WARNING:apache_beam.internal.gcp.auth:Unable to find default credentials to use: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
Connecting anonymously.
WARNING:apache_beam.io.tfrecordio:Couldn't find python-snappy so the implementation of _TFRecordUtil._masked_crc32c is not as fast as it could be.
```
After around 10 minutes, here's the loading of dataset:
```
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:16<00:00, 16.42s/sources]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.12sources/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.14sources/s]
Dataset wiki40b downloaded and prepared to /home/bhavitvya/.cache/huggingface/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f. Subsequent calls will reuse this data.
```
|
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
| 156
|
wiki40b/wikipedia for almost all languages cannot be downloaded
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
I tried this on another machine (followed the same procedure I've mentioned above). This is what it shows (during the freeze period) for me:
```
>>> dataset = load_dataset("wiki40b", "cs", beam_runner='DirectRunner')
Downloading: 5.26kB [00:00, 1.23MB/s]
Downloading: 1.40kB [00:00, 327kB/s]
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/bhavitvya/.cache/huggingface/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
WARNING:apache_beam.internal.gcp.auth:Unable to find default credentials to use: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
Connecting anonymously.
WARNING:apache_beam.io.tfrecordio:Couldn't find python-snappy so the implementation of _TFRecordUtil._masked_crc32c is not as fast as it could be.
```
After around 10 minutes, here's the loading of dataset:
```
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:16<00:00, 16.42s/sources]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.12sources/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.14sources/s]
Dataset wiki40b downloaded and prepared to /home/bhavitvya/.cache/huggingface/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f. Subsequent calls will reuse this data.
```
|
[
-0.25449883937835693,
-0.07791971415281296,
-0.1537584364414215,
0.43086686730384827,
0.39970263838768005,
0.3504616618156433,
0.1368502825498581,
0.5331583619117737,
0.1893267184495926,
0.023584548383951187,
-0.17730441689491272,
-0.09421756118535995,
0.0944039598107338,
0.011184575967490673,
-0.0297053474932909,
-0.4591730237007141,
-0.0672900378704071,
0.02953762747347355,
-0.13527131080627441,
-0.11689324676990509,
-0.2519628405570984,
0.12561438977718353,
-0.07917481660842896,
-0.04902834817767143,
-0.038746144622564316,
-0.18283997476100922,
-0.09583571553230286,
-0.20730605721473694,
-0.3507463335990906,
-0.24086488783359528,
0.35457831621170044,
0.019257647916674614,
0.31011223793029785,
0.15299740433692932,
-0.00011143678420921788,
-0.0509641170501709,
0.3131164610385895,
-0.2357948273420334,
-0.29361221194267273,
-0.2888581156730652,
-0.07208938151597977,
-0.3261854648590088,
-0.09043888747692108,
-0.42003169655799866,
0.12744581699371338,
0.04668239504098892,
0.0806712880730629,
-0.13180148601531982,
0.07575755566358566,
0.2992260754108429,
0.2468714565038681,
-0.14260362088680267,
0.3134343922138214,
-0.1457379013299942,
0.3651953637599945,
-0.3777082562446594,
-0.028033530339598656,
0.3395863175392151,
0.218720480799675,
0.07134398818016052,
0.21547909080982208,
0.22204311192035675,
-0.23414066433906555,
0.01349933072924614,
0.04822405055165291,
-0.29122394323349,
0.22220534086227417,
-0.629701554775238,
0.520641565322876,
0.5344274044036865,
0.8290324211120605,
-0.12835131585597992,
-0.08746717870235443,
0.072393499314785,
-0.026059571653604507,
-0.03137509524822235,
-0.05574026703834534,
0.4819800853729248,
-0.18932609260082245,
0.09759890288114548,
0.12616471946239471,
-0.12543044984340668,
-0.15671950578689575,
0.4228460192680359,
-0.1241353303194046,
0.4435884952545166,
-0.05272023379802704,
0.2112599015235901,
-0.0216665156185627,
-0.10270167887210846,
-0.26364099979400635,
-0.06965858489274979,
-0.09616053104400635,
0.2933219373226166,
-0.2793998122215271,
0.019636234268546104,
-0.16150297224521637,
0.05564657226204872,
0.3511344790458679,
-0.15038257837295532,
-0.23462128639221191,
-0.04507802054286003,
0.09601198881864548,
0.15757520496845245,
0.18014878034591675,
0.16378413140773773,
0.0620487779378891,
-0.2000061571598053,
0.2782810628414154,
0.3079039752483368,
-0.08421274274587631,
-0.0761713758111,
-0.2100439965724945,
-0.22305718064308167,
-0.2947562336921692,
0.0944298505783081,
0.08752915263175964,
-0.20317110419273376,
-0.17794694006443024,
0.007112853229045868,
-0.1443609744310379,
-0.01943882554769516,
-0.20239461958408356,
0.36282142996788025,
-0.15014299750328064,
0.43123751878738403,
0.17790168523788452,
0.328822523355484,
-0.10357245802879333,
-0.26130956411361694,
-0.01735268346965313,
0.30654871463775635,
-0.1393190324306488,
-0.1036604642868042,
0.21878241002559662,
-0.10991638898849487,
0.2648518681526184,
-0.08937306702136993,
-0.10313830524682999,
-0.1764124035835266,
-0.1536906510591507,
-0.3695681393146515,
-0.17910411953926086,
0.23040896654129028,
0.1619766354560852,
0.28392747044563293,
0.1476142555475235,
-0.24474751949310303,
-0.23058052361011505,
0.12074483931064606,
-0.3596149981021881,
-0.16815562546253204,
-0.20515534281730652,
0.19446861743927002,
0.06109855696558952,
-0.0546499527990818,
-0.31600698828697205,
0.2876638174057007,
0.3030637502670288,
-0.1423981487751007,
0.1180722787976265,
-0.007545265834778547,
-0.023254673928022385,
-0.22518932819366455,
0.17901143431663513,
0.49079981446266174,
-0.39995941519737244,
0.09189733117818832,
-0.02385012060403824,
-0.03371269255876541,
0.18978251516819,
0.18429774045944214,
-0.17795206606388092,
0.25654172897338867,
-0.09788442403078079,
0.038160406053066254,
0.21013252437114716,
-0.32144269347190857,
-0.5776352882385254,
0.18605440855026245,
0.11341046541929245,
-0.16700491309165955,
0.09948059916496277,
0.016000358387827873,
0.27503105998039246,
-0.04938732087612152,
0.05245454981923103,
0.39567452669143677,
0.13683775067329407,
-0.10564517974853516,
-0.32745084166526794,
-0.5078237056732178,
0.32648128271102905,
0.1633184254169464,
0.45471417903900146,
-0.1322697550058365,
0.27598556876182556,
0.2917204797267914,
0.3191738724708557,
-0.19154725968837738,
0.12467864900827408,
0.23336075246334076,
-0.00894821248948574,
-0.04457567259669304,
-0.0025626758579164743,
-0.33102720975875854,
-0.30975762009620667,
0.14775988459587097,
0.10291292518377304,
0.16546472907066345,
-0.160955548286438,
0.029683437198400497,
-0.31619006395339966,
-0.08880765736103058,
-0.1953120082616806,
0.10326860100030899,
0.1995640993118286,
-0.1052766740322113,
0.11959367990493774,
0.4854587912559509,
0.1265171468257904,
-0.09945830702781677,
-0.4156898558139801,
-0.09485310316085815,
-0.17893461883068085,
0.09233265370130539,
-0.21742913126945496,
0.2044917792081833,
0.03368116915225983,
0.025808528065681458,
0.17968463897705078,
0.0730523020029068,
-0.16072432696819305,
-0.01106140948832035,
-0.0784519836306572,
-0.10354474931955338,
0.1354629248380661,
0.11696359515190125,
0.1331278383731842,
-0.4173748791217804,
0.19202920794487,
0.10847945511341095,
0.32974663376808167,
-0.13577213883399963,
0.11781715601682663,
0.1222362071275711,
0.03997274115681648,
0.3655340373516083,
0.12343069911003113,
0.14983128011226654,
0.45560044050216675,
0.03052617236971855,
0.12635424733161926,
-0.004974493756890297,
0.32711920142173767,
0.15566036105155945,
0.012749645859003067,
-0.13295888900756836,
-0.029277656227350235,
-0.11351632326841354,
0.3166729509830475,
-0.08453336358070374,
0.2671486735343933,
0.2927597761154175,
-0.07651875913143158,
-0.004859514534473419,
-0.09782737493515015,
0.15339845418930054,
0.05220832675695419,
0.069904625415802,
0.10658863931894302,
-0.09984414279460907,
0.3596494197845459,
-0.12939275801181793,
0.264309823513031,
0.17554178833961487,
0.18633411824703217,
0.2091355174779892,
0.13508090376853943,
-0.01117603201419115,
-0.18828310072422028,
-0.1296800971031189,
0.06999470293521881,
0.3717179298400879,
0.06918404996395111,
0.16594617068767548,
-0.04843468591570854,
-0.1418597549200058,
0.0841902494430542,
-0.05239185318350792,
-0.2509417235851288,
-0.2163161039352417,
-0.12563854455947876,
-0.0857282429933548,
0.09158365428447723,
-0.00010400720202596858,
-0.3266661763191223,
-0.07210301607847214,
0.06216660141944885,
-0.3203507661819458,
-0.16056855022907257,
-0.2981228232383728,
-0.36844947934150696,
0.07678727805614471,
0.38712987303733826,
0.11129036545753479,
0.295210063457489,
-0.33262917399406433,
-0.19187872111797333,
-0.0899449810385704,
-0.2681106626987457,
-0.014314225874841213,
-0.15696944296360016,
0.2413957118988037,
-0.024117276072502136,
0.7152191400527954,
-0.17999613285064697,
-0.25142186880111694,
0.1846493035554886,
-0.00701964320614934,
0.06587415933609009,
0.2497716248035431,
-0.1534789502620697,
-0.042924001812934875,
0.08453565835952759,
-0.4856535494327545,
-0.5155774354934692,
-0.2696571946144104,
0.012519567273557186,
0.04851744323968887,
0.08780695497989655,
0.16864076256752014,
0.1924835741519928,
0.06802622973918915,
0.12118712812662125,
0.18090730905532837,
-0.19004331529140472,
-0.1518692821264267,
0.4496891498565674,
-0.02741323597729206,
-0.4299623370170593,
0.18818649649620056,
0.010994188487529755,
0.31493332982063293,
0.007926318794488907,
-0.6572356820106506,
0.14411252737045288,
-0.276358962059021,
0.24994182586669922,
-0.021993543952703476,
0.1834762841463089,
0.11434464901685715,
-0.21369695663452148,
0.04797257483005524,
0.04499596357345581,
0.10590972006320953,
-0.04062100499868393,
-0.2095249891281128,
0.25562170147895813,
0.02994537353515625,
0.2961861491203308,
0.16442067921161652,
0.688840389251709,
0.05485635623335838,
0.16584032773971558,
0.4367818832397461,
0.2385822832584381,
0.23103071749210358,
-0.23142893612384796,
-0.36457201838493347,
0.0605749674141407,
-0.2394915372133255,
-0.031003324314951897,
0.26701223850250244,
-0.16232074797153473,
-0.46741729974746704,
-0.34771326184272766,
-0.2426856905221939,
-0.36746734380722046,
-0.21077078580856323,
0.15399761497974396,
-0.05018191039562225,
0.08294060826301575,
0.0575956255197525,
0.12039817124605179,
0.021574079990386963,
-0.28234976530075073,
0.21378852427005768,
0.5317094922065735,
-0.2486019730567932,
0.16858986020088196,
-0.2782670557498932,
-0.34212255477905273,
-0.4126342236995697,
0.25245562195777893,
0.07770632207393646,
0.41476181149482727,
-0.09380224347114563,
0.34991952776908875,
0.20117996633052826,
-0.0892682746052742,
0.2906241714954376,
-0.17024348676204681,
0.12304995208978653,
0.19724728167057037,
0.10499279201030731,
-0.215217724442482,
-0.062440209090709686,
-0.29433268308639526,
-0.016687719151377678,
0.3054172396659851,
-0.04445454478263855,
-0.6709661483764648,
0.08432866632938385,
-0.042586762458086014,
0.5003295540809631,
-0.05717724561691284,
-0.01735015958547592,
-0.1618575006723404,
-0.5653650760650635,
-0.48540446162223816,
-0.02768666297197342,
0.18957556784152985,
0.4046100080013275,
-0.1972091645002365,
0.26289883255958557,
-0.10207898169755936,
0.2205621600151062,
0.021316133439540863,
0.007735301740467548,
0.21325728297233582,
0.23278552293777466,
0.09743330627679825,
-0.1967879980802536,
-0.13784664869308472,
0.15032637119293213,
0.3620433211326599,
-0.06353205442428589,
-0.23431222140789032,
-0.12124703079462051,
-0.04300352931022644,
0.04348337650299072,
0.1415460705757141,
-0.10129061341285706,
0.04770750552415848,
0.14866259694099426,
-0.1379348486661911,
0.16582104563713074,
-0.01284150592982769,
0.2519466280937195,
-0.10633731633424759,
-0.49623504281044006,
-0.5676649808883667,
0.6620463132858276,
0.02338246814906597,
0.07014172524213791,
0.2541702091693878,
0.175403892993927,
-0.1958615630865097,
0.37537336349487305,
0.1058034598827362,
1.1372191905975342,
-0.22813422977924347,
0.11042021960020065,
-0.1039847731590271,
0.10946564376354218,
0.3614175617694855,
-0.3578394949436188,
0.2084072083234787,
-0.3226420283317566,
-0.1089080199599266,
-0.01951933279633522,
0.07367415726184845,
-0.04613826051354408,
0.09989331662654877,
-0.30722832679748535,
0.2564426064491272,
-0.3662327826023102,
-0.08695473521947861,
0.10564911365509033,
0.23298609256744385,
-0.4058893620967865,
-0.06803661584854126,
-0.32137972116470337,
0.11962873488664627,
-0.21466071903705597,
0.25469282269477844,
-0.21100129187107086,
-0.12547826766967773,
-0.06142396852374077,
-0.2672703266143799,
-0.5050501823425293,
0.07064317911863327,
-0.2883508801460266,
0.32986950874328613,
-0.4893506169319153,
-0.18977464735507965,
0.338620662689209,
0.44487112760543823,
0.041480373591184616,
0.4031551480293274,
-0.2879830598831177,
0.1116526648402214,
-0.2638600170612335,
-0.42361924052238464,
0.09449119120836258,
0.011207900010049343,
0.08713383227586746,
-0.18162909150123596,
-0.3709903955459595,
0.16697277128696442,
-0.057572249323129654,
0.05284922197461128,
-0.09598775207996368,
0.10437755286693573,
0.20165425539016724,
-0.045897744596004486,
-0.3565557301044464,
-0.02228337898850441,
-0.09438604861497879,
-0.08943308889865875,
0.12416666746139526,
0.08219719678163528,
-0.1119045615196228,
0.14091400802135468,
0.1852954924106598,
-0.3349809944629669,
0.02179165743291378,
0.34910571575164795,
0.1834498643875122,
0.02395452931523323,
0.6245270371437073,
0.31554484367370605,
-0.39654046297073364,
-0.18981511890888214,
0.0439140684902668,
-0.2713777422904968,
-0.458574503660202,
-0.08960459381341934,
-0.04218949377536774,
0.33834314346313477,
-0.4149280786514282,
0.35025349259376526,
0.17490629851818085,
-0.23483094573020935,
0.20646440982818604,
-0.7065882682800293,
-0.12402196228504181,
0.21609379351139069,
-0.07890939712524414,
0.006574923172593117,
0.08407143503427505,
-0.30959925055503845,
0.12182705104351044,
0.2352641075849533,
-0.2610889971256256,
0.2092306762933731,
-0.32334259152412415,
0.10076376795768738,
0.09949345886707306,
0.06333241611719131,
0.02230171114206314,
0.1991029679775238,
0.06504811346530914,
0.06916210800409317,
-0.049663886427879333,
-0.25991007685661316,
-0.07022765278816223,
0.1948125660419464,
0.20511353015899658,
-0.05790058150887489,
0.22787503898143768,
-0.5071967840194702,
-0.16867011785507202,
0.08223902434110641,
-0.05847622826695442,
0.11558449268341064,
0.003860039869323373,
0.18110066652297974,
0.20132511854171753,
0.28857046365737915,
-0.35007989406585693,
0.24587731063365936,
-0.08690531551837921,
0.26149821281433105,
0.14082810282707214,
0.07593598961830139,
0.45799243450164795,
0.021300949156284332,
-0.3352101743221283,
-0.033541854470968246,
-0.030077140778303146,
0.08663526177406311,
0.25588056445121765,
-0.23335884511470795,
0.3003470003604889,
0.19892019033432007,
-0.11749520152807236,
0.5623857378959656,
-0.14960479736328125,
0.20659619569778442,
0.41308388113975525,
0.18722347915172577,
-0.3698638081550598,
0.0016460552578791976,
0.2932005524635315,
-0.09663773328065872,
-0.0709826871752739,
0.07596095651388168,
0.2589091956615448,
-0.32232800126075745,
0.11372118443250656,
-0.06573889404535294,
0.1647823601961136,
-0.05655081197619438,
0.19225868582725525,
0.6700755953788757,
0.22707323729991913,
0.04992584139108658,
-0.0694633275270462,
0.16999280452728271,
0.09539502114057541,
0.36280637979507446,
-0.22345663607120514,
0.19276422262191772,
-0.05200457200407982,
0.02463534101843834,
-0.1621609926223755,
-0.3400551676750183,
0.29861074686050415,
0.1632014513015747,
-0.02477487362921238,
0.09867575764656067,
-0.17225874960422516,
0.2616479992866516,
0.15435945987701416,
0.03022289089858532,
-0.26115575432777405,
0.1914433091878891,
-0.12247779965400696,
-0.012982994318008423,
-0.0442100390791893,
-0.2680068016052246,
0.0015667247353121638,
0.15562571585178375,
-0.004661692772060633,
-0.3565726578235626,
0.2555730938911438,
0.3037436306476593,
-0.244086354970932,
-0.4411390423774719,
0.1348092257976532,
0.21249373257160187,
0.03117004781961441,
-0.3002215027809143,
0.15776211023330688,
0.41378042101860046,
0.07809178531169891,
-0.12705528736114502,
0.2019166350364685,
0.4433468282222748,
0.4205474555492401,
-0.3373265266418457,
0.04244174063205719,
0.07533987611532211,
-0.06568092107772827,
-0.023378299549221992,
0.2276100218296051,
0.46722543239593506,
0.2502676248550415,
0.3970099687576294,
0.1184258908033371,
-0.1415998488664627,
-0.03197430446743965,
0.23604975640773773,
-0.06391855329275131,
-0.05667095258831978,
-0.045184873044490814,
-0.0590362623333931,
0.14072102308273315,
-0.4205537736415863,
-0.013584437780082226,
-0.5078697800636292,
0.34002241492271423,
0.16105566918849945,
0.0025867712683975697,
0.17752934992313385,
-0.09258142858743668,
0.0479857474565506,
-0.15697626769542694,
0.39629343152046204,
0.3195849657058716,
0.199141263961792,
-0.3908330202102661,
-0.00899566151201725,
-0.464518666267395,
-0.018635312095284462,
-0.2982341945171356,
0.11210162192583084,
-0.08143274486064911,
0.12865565717220306,
0.07550838589668274,
0.2132711261510849,
0.036631617695093155,
0.04509863629937172,
0.0668022632598877,
0.49491584300994873,
-0.23153194785118103,
-0.24470354616641998,
-0.19481728971004486,
0.21916253864765167,
-0.15832364559173584,
-0.39093199372291565,
0.05759391561150551,
-0.13856172561645508,
0.03407328575849533,
-0.32001999020576477,
-0.06650064140558243,
0.09557345509529114,
0.0059599494561553,
0.33242881298065186,
0.1523781716823578,
0.5925301313400269,
-0.15409474074840546,
-0.20217524468898773,
-0.2086707204580307,
-0.011070453561842442,
-0.159934863448143,
0.3116772770881653,
0.1967301219701767,
0.09890691936016083,
-0.16079406440258026,
-0.11197122931480408,
-0.029564393684267998,
0.2984878122806549,
-0.044816866517066956,
0.19492152333259583,
-0.36696019768714905,
-0.38635677099227905,
0.05791785567998886,
0.11385567486286163,
0.11902748048305511,
0.04692574217915535,
-0.13085585832595825,
-0.0533188059926033,
-0.342149943113327,
-0.3086865544319153,
0.3866538405418396,
-0.3773029148578644,
-0.5697821974754333,
-0.09215575456619263,
0.007928472012281418,
0.04705652594566345,
0.1902984380722046,
-0.3660876452922821,
0.2775554358959198,
0.3897731900215149,
0.051333703100681305,
-0.15096808969974518,
0.16642248630523682,
0.0286492221057415,
-0.01621520146727562,
-0.09404339641332626,
0.11607001721858978,
-0.008283792994916439,
-0.35631418228149414,
-0.22058486938476562,
-0.3912579417228699
] |
https://github.com/huggingface/datasets/issues/2035
|
wiki40b/wikipedia for almost all languages cannot be downloaded
|
Hi
I honestly also now tried on another machine and nothing shows up after
hours of waiting. Are you sure you have not set any specific setting? maybe
google cloud which seems it is used here, needs some credential setting?
thanks for any suggestions on this
On Tue, Mar 16, 2021 at 10:02 AM Bhavitvya Malik ***@***.***>
wrote:
> I tried this on another machine (followed the same procedure I've
> mentioned above). This is what it shows (during the freeze period) for me:
>
> >>> dataset = load_dataset("wiki40b", "cs", beam_runner='DirectRunner')
> Downloading: 5.26kB [00:00, 1.23MB/s]
> Downloading: 1.40kB [00:00, 327kB/s]
> Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/bhavitvya/.cache/huggingface/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
> WARNING:apache_beam.internal.gcp.auth:Unable to find default credentials to use: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
> Connecting anonymously.
> WARNING:apache_beam.io.tfrecordio:Couldn't find python-snappy so the implementation of _TFRecordUtil._masked_crc32c is not as fast as it could be.
>
> After around 10 minutes, here's the loading of dataset:
>
> 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:16<00:00, 16.42s/sources]
> 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.12sources/s]
> 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.14sources/s]
> Dataset wiki40b downloaded and prepared to /home/bhavitvya/.cache/huggingface/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f. Subsequent calls will reuse this data.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2035#issuecomment-800081772>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMX6A2ZTRZUIIZVFRCDTD4NC3ANCNFSM4ZA5R2UA>
> .
>
|
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
| 259
|
wiki40b/wikipedia for almost all languages cannot be downloaded
Hi
I am trying to download the data as below:
```
from datasets import load_dataset
dataset = load_dataset("wiki40b", "cs")
print(dataset)
```
I am getting this error. @lhoestq I will be grateful if you could assist me with this error. For almost all languages except english I am getting this error.
I really need majority of languages in this dataset to be able to train my models for a deadline and your great scalable super well-written library is my only hope to train the models at scale while being low on resources.
thank you very much.
```
(fast) dara@vgne046:/user/dara/dev/codes/seq2seq$ python test_data.py
Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to temp/dara/cache_home_2/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
Traceback (most recent call last):
File "test_data.py", line 3, in <module>
dataset = load_dataset("wiki40b", "cs")
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/load.py", line 746, in load_dataset
use_auth_token=use_auth_token,
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 579, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/datasets/builder.py", line 1105, in _download_and_prepare
import apache_beam as beam
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/__init__.py", line 96, in <module>
from apache_beam import io
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/__init__.py", line 23, in <module>
from apache_beam.io.avroio import *
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/apache_beam-2.28.0-py3.7-linux-x86_64.egg/apache_beam/io/avroio.py", line 55, in <module>
import avro
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 34, in <module>
File "/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/__init__.py", line 30, in LoadResource
NotADirectoryError: [Errno 20] Not a directory: '/user/dara/libs/anaconda3/envs/fast/lib/python3.7/site-packages/avro_python3-1.9.2.1-py3.7.egg/avro/VERSION.txt'
```
Hi
I honestly also now tried on another machine and nothing shows up after
hours of waiting. Are you sure you have not set any specific setting? maybe
google cloud which seems it is used here, needs some credential setting?
thanks for any suggestions on this
On Tue, Mar 16, 2021 at 10:02 AM Bhavitvya Malik ***@***.***>
wrote:
> I tried this on another machine (followed the same procedure I've
> mentioned above). This is what it shows (during the freeze period) for me:
>
> >>> dataset = load_dataset("wiki40b", "cs", beam_runner='DirectRunner')
> Downloading: 5.26kB [00:00, 1.23MB/s]
> Downloading: 1.40kB [00:00, 327kB/s]
> Downloading and preparing dataset wiki40b/cs (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/bhavitvya/.cache/huggingface/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f...
> WARNING:apache_beam.internal.gcp.auth:Unable to find default credentials to use: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
> Connecting anonymously.
> WARNING:apache_beam.io.tfrecordio:Couldn't find python-snappy so the implementation of _TFRecordUtil._masked_crc32c is not as fast as it could be.
>
> After around 10 minutes, here's the loading of dataset:
>
> 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:16<00:00, 16.42s/sources]
> 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.12sources/s]
> 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.14sources/s]
> Dataset wiki40b downloaded and prepared to /home/bhavitvya/.cache/huggingface/datasets/wiki40b/cs/1.1.0/063778187363ffb294896eaa010fc254b42b73e31117c71573a953b0b0bf010f. Subsequent calls will reuse this data.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2035#issuecomment-800081772>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMX6A2ZTRZUIIZVFRCDTD4NC3ANCNFSM4ZA5R2UA>
> .
>
|
[
-0.25449883937835693,
-0.07791971415281296,
-0.1537584364414215,
0.43086686730384827,
0.39970263838768005,
0.3504616618156433,
0.1368502825498581,
0.5331583619117737,
0.1893267184495926,
0.023584548383951187,
-0.17730441689491272,
-0.09421756118535995,
0.0944039598107338,
0.011184575967490673,
-0.0297053474932909,
-0.4591730237007141,
-0.0672900378704071,
0.02953762747347355,
-0.13527131080627441,
-0.11689324676990509,
-0.2519628405570984,
0.12561438977718353,
-0.07917481660842896,
-0.04902834817767143,
-0.038746144622564316,
-0.18283997476100922,
-0.09583571553230286,
-0.20730605721473694,
-0.3507463335990906,
-0.24086488783359528,
0.35457831621170044,
0.019257647916674614,
0.31011223793029785,
0.15299740433692932,
-0.00011143678420921788,
-0.0509641170501709,
0.3131164610385895,
-0.2357948273420334,
-0.29361221194267273,
-0.2888581156730652,
-0.07208938151597977,
-0.3261854648590088,
-0.09043888747692108,
-0.42003169655799866,
0.12744581699371338,
0.04668239504098892,
0.0806712880730629,
-0.13180148601531982,
0.07575755566358566,
0.2992260754108429,
0.2468714565038681,
-0.14260362088680267,
0.3134343922138214,
-0.1457379013299942,
0.3651953637599945,
-0.3777082562446594,
-0.028033530339598656,
0.3395863175392151,
0.218720480799675,
0.07134398818016052,
0.21547909080982208,
0.22204311192035675,
-0.23414066433906555,
0.01349933072924614,
0.04822405055165291,
-0.29122394323349,
0.22220534086227417,
-0.629701554775238,
0.520641565322876,
0.5344274044036865,
0.8290324211120605,
-0.12835131585597992,
-0.08746717870235443,
0.072393499314785,
-0.026059571653604507,
-0.03137509524822235,
-0.05574026703834534,
0.4819800853729248,
-0.18932609260082245,
0.09759890288114548,
0.12616471946239471,
-0.12543044984340668,
-0.15671950578689575,
0.4228460192680359,
-0.1241353303194046,
0.4435884952545166,
-0.05272023379802704,
0.2112599015235901,
-0.0216665156185627,
-0.10270167887210846,
-0.26364099979400635,
-0.06965858489274979,
-0.09616053104400635,
0.2933219373226166,
-0.2793998122215271,
0.019636234268546104,
-0.16150297224521637,
0.05564657226204872,
0.3511344790458679,
-0.15038257837295532,
-0.23462128639221191,
-0.04507802054286003,
0.09601198881864548,
0.15757520496845245,
0.18014878034591675,
0.16378413140773773,
0.0620487779378891,
-0.2000061571598053,
0.2782810628414154,
0.3079039752483368,
-0.08421274274587631,
-0.0761713758111,
-0.2100439965724945,
-0.22305718064308167,
-0.2947562336921692,
0.0944298505783081,
0.08752915263175964,
-0.20317110419273376,
-0.17794694006443024,
0.007112853229045868,
-0.1443609744310379,
-0.01943882554769516,
-0.20239461958408356,
0.36282142996788025,
-0.15014299750328064,
0.43123751878738403,
0.17790168523788452,
0.328822523355484,
-0.10357245802879333,
-0.26130956411361694,
-0.01735268346965313,
0.30654871463775635,
-0.1393190324306488,
-0.1036604642868042,
0.21878241002559662,
-0.10991638898849487,
0.2648518681526184,
-0.08937306702136993,
-0.10313830524682999,
-0.1764124035835266,
-0.1536906510591507,
-0.3695681393146515,
-0.17910411953926086,
0.23040896654129028,
0.1619766354560852,
0.28392747044563293,
0.1476142555475235,
-0.24474751949310303,
-0.23058052361011505,
0.12074483931064606,
-0.3596149981021881,
-0.16815562546253204,
-0.20515534281730652,
0.19446861743927002,
0.06109855696558952,
-0.0546499527990818,
-0.31600698828697205,
0.2876638174057007,
0.3030637502670288,
-0.1423981487751007,
0.1180722787976265,
-0.007545265834778547,
-0.023254673928022385,
-0.22518932819366455,
0.17901143431663513,
0.49079981446266174,
-0.39995941519737244,
0.09189733117818832,
-0.02385012060403824,
-0.03371269255876541,
0.18978251516819,
0.18429774045944214,
-0.17795206606388092,
0.25654172897338867,
-0.09788442403078079,
0.038160406053066254,
0.21013252437114716,
-0.32144269347190857,
-0.5776352882385254,
0.18605440855026245,
0.11341046541929245,
-0.16700491309165955,
0.09948059916496277,
0.016000358387827873,
0.27503105998039246,
-0.04938732087612152,
0.05245454981923103,
0.39567452669143677,
0.13683775067329407,
-0.10564517974853516,
-0.32745084166526794,
-0.5078237056732178,
0.32648128271102905,
0.1633184254169464,
0.45471417903900146,
-0.1322697550058365,
0.27598556876182556,
0.2917204797267914,
0.3191738724708557,
-0.19154725968837738,
0.12467864900827408,
0.23336075246334076,
-0.00894821248948574,
-0.04457567259669304,
-0.0025626758579164743,
-0.33102720975875854,
-0.30975762009620667,
0.14775988459587097,
0.10291292518377304,
0.16546472907066345,
-0.160955548286438,
0.029683437198400497,
-0.31619006395339966,
-0.08880765736103058,
-0.1953120082616806,
0.10326860100030899,
0.1995640993118286,
-0.1052766740322113,
0.11959367990493774,
0.4854587912559509,
0.1265171468257904,
-0.09945830702781677,
-0.4156898558139801,
-0.09485310316085815,
-0.17893461883068085,
0.09233265370130539,
-0.21742913126945496,
0.2044917792081833,
0.03368116915225983,
0.025808528065681458,
0.17968463897705078,
0.0730523020029068,
-0.16072432696819305,
-0.01106140948832035,
-0.0784519836306572,
-0.10354474931955338,
0.1354629248380661,
0.11696359515190125,
0.1331278383731842,
-0.4173748791217804,
0.19202920794487,
0.10847945511341095,
0.32974663376808167,
-0.13577213883399963,
0.11781715601682663,
0.1222362071275711,
0.03997274115681648,
0.3655340373516083,
0.12343069911003113,
0.14983128011226654,
0.45560044050216675,
0.03052617236971855,
0.12635424733161926,
-0.004974493756890297,
0.32711920142173767,
0.15566036105155945,
0.012749645859003067,
-0.13295888900756836,
-0.029277656227350235,
-0.11351632326841354,
0.3166729509830475,
-0.08453336358070374,
0.2671486735343933,
0.2927597761154175,
-0.07651875913143158,
-0.004859514534473419,
-0.09782737493515015,
0.15339845418930054,
0.05220832675695419,
0.069904625415802,
0.10658863931894302,
-0.09984414279460907,
0.3596494197845459,
-0.12939275801181793,
0.264309823513031,
0.17554178833961487,
0.18633411824703217,
0.2091355174779892,
0.13508090376853943,
-0.01117603201419115,
-0.18828310072422028,
-0.1296800971031189,
0.06999470293521881,
0.3717179298400879,
0.06918404996395111,
0.16594617068767548,
-0.04843468591570854,
-0.1418597549200058,
0.0841902494430542,
-0.05239185318350792,
-0.2509417235851288,
-0.2163161039352417,
-0.12563854455947876,
-0.0857282429933548,
0.09158365428447723,
-0.00010400720202596858,
-0.3266661763191223,
-0.07210301607847214,
0.06216660141944885,
-0.3203507661819458,
-0.16056855022907257,
-0.2981228232383728,
-0.36844947934150696,
0.07678727805614471,
0.38712987303733826,
0.11129036545753479,
0.295210063457489,
-0.33262917399406433,
-0.19187872111797333,
-0.0899449810385704,
-0.2681106626987457,
-0.014314225874841213,
-0.15696944296360016,
0.2413957118988037,
-0.024117276072502136,
0.7152191400527954,
-0.17999613285064697,
-0.25142186880111694,
0.1846493035554886,
-0.00701964320614934,
0.06587415933609009,
0.2497716248035431,
-0.1534789502620697,
-0.042924001812934875,
0.08453565835952759,
-0.4856535494327545,
-0.5155774354934692,
-0.2696571946144104,
0.012519567273557186,
0.04851744323968887,
0.08780695497989655,
0.16864076256752014,
0.1924835741519928,
0.06802622973918915,
0.12118712812662125,
0.18090730905532837,
-0.19004331529140472,
-0.1518692821264267,
0.4496891498565674,
-0.02741323597729206,
-0.4299623370170593,
0.18818649649620056,
0.010994188487529755,
0.31493332982063293,
0.007926318794488907,
-0.6572356820106506,
0.14411252737045288,
-0.276358962059021,
0.24994182586669922,
-0.021993543952703476,
0.1834762841463089,
0.11434464901685715,
-0.21369695663452148,
0.04797257483005524,
0.04499596357345581,
0.10590972006320953,
-0.04062100499868393,
-0.2095249891281128,
0.25562170147895813,
0.02994537353515625,
0.2961861491203308,
0.16442067921161652,
0.688840389251709,
0.05485635623335838,
0.16584032773971558,
0.4367818832397461,
0.2385822832584381,
0.23103071749210358,
-0.23142893612384796,
-0.36457201838493347,
0.0605749674141407,
-0.2394915372133255,
-0.031003324314951897,
0.26701223850250244,
-0.16232074797153473,
-0.46741729974746704,
-0.34771326184272766,
-0.2426856905221939,
-0.36746734380722046,
-0.21077078580856323,
0.15399761497974396,
-0.05018191039562225,
0.08294060826301575,
0.0575956255197525,
0.12039817124605179,
0.021574079990386963,
-0.28234976530075073,
0.21378852427005768,
0.5317094922065735,
-0.2486019730567932,
0.16858986020088196,
-0.2782670557498932,
-0.34212255477905273,
-0.4126342236995697,
0.25245562195777893,
0.07770632207393646,
0.41476181149482727,
-0.09380224347114563,
0.34991952776908875,
0.20117996633052826,
-0.0892682746052742,
0.2906241714954376,
-0.17024348676204681,
0.12304995208978653,
0.19724728167057037,
0.10499279201030731,
-0.215217724442482,
-0.062440209090709686,
-0.29433268308639526,
-0.016687719151377678,
0.3054172396659851,
-0.04445454478263855,
-0.6709661483764648,
0.08432866632938385,
-0.042586762458086014,
0.5003295540809631,
-0.05717724561691284,
-0.01735015958547592,
-0.1618575006723404,
-0.5653650760650635,
-0.48540446162223816,
-0.02768666297197342,
0.18957556784152985,
0.4046100080013275,
-0.1972091645002365,
0.26289883255958557,
-0.10207898169755936,
0.2205621600151062,
0.021316133439540863,
0.007735301740467548,
0.21325728297233582,
0.23278552293777466,
0.09743330627679825,
-0.1967879980802536,
-0.13784664869308472,
0.15032637119293213,
0.3620433211326599,
-0.06353205442428589,
-0.23431222140789032,
-0.12124703079462051,
-0.04300352931022644,
0.04348337650299072,
0.1415460705757141,
-0.10129061341285706,
0.04770750552415848,
0.14866259694099426,
-0.1379348486661911,
0.16582104563713074,
-0.01284150592982769,
0.2519466280937195,
-0.10633731633424759,
-0.49623504281044006,
-0.5676649808883667,
0.6620463132858276,
0.02338246814906597,
0.07014172524213791,
0.2541702091693878,
0.175403892993927,
-0.1958615630865097,
0.37537336349487305,
0.1058034598827362,
1.1372191905975342,
-0.22813422977924347,
0.11042021960020065,
-0.1039847731590271,
0.10946564376354218,
0.3614175617694855,
-0.3578394949436188,
0.2084072083234787,
-0.3226420283317566,
-0.1089080199599266,
-0.01951933279633522,
0.07367415726184845,
-0.04613826051354408,
0.09989331662654877,
-0.30722832679748535,
0.2564426064491272,
-0.3662327826023102,
-0.08695473521947861,
0.10564911365509033,
0.23298609256744385,
-0.4058893620967865,
-0.06803661584854126,
-0.32137972116470337,
0.11962873488664627,
-0.21466071903705597,
0.25469282269477844,
-0.21100129187107086,
-0.12547826766967773,
-0.06142396852374077,
-0.2672703266143799,
-0.5050501823425293,
0.07064317911863327,
-0.2883508801460266,
0.32986950874328613,
-0.4893506169319153,
-0.18977464735507965,
0.338620662689209,
0.44487112760543823,
0.041480373591184616,
0.4031551480293274,
-0.2879830598831177,
0.1116526648402214,
-0.2638600170612335,
-0.42361924052238464,
0.09449119120836258,
0.011207900010049343,
0.08713383227586746,
-0.18162909150123596,
-0.3709903955459595,
0.16697277128696442,
-0.057572249323129654,
0.05284922197461128,
-0.09598775207996368,
0.10437755286693573,
0.20165425539016724,
-0.045897744596004486,
-0.3565557301044464,
-0.02228337898850441,
-0.09438604861497879,
-0.08943308889865875,
0.12416666746139526,
0.08219719678163528,
-0.1119045615196228,
0.14091400802135468,
0.1852954924106598,
-0.3349809944629669,
0.02179165743291378,
0.34910571575164795,
0.1834498643875122,
0.02395452931523323,
0.6245270371437073,
0.31554484367370605,
-0.39654046297073364,
-0.18981511890888214,
0.0439140684902668,
-0.2713777422904968,
-0.458574503660202,
-0.08960459381341934,
-0.04218949377536774,
0.33834314346313477,
-0.4149280786514282,
0.35025349259376526,
0.17490629851818085,
-0.23483094573020935,
0.20646440982818604,
-0.7065882682800293,
-0.12402196228504181,
0.21609379351139069,
-0.07890939712524414,
0.006574923172593117,
0.08407143503427505,
-0.30959925055503845,
0.12182705104351044,
0.2352641075849533,
-0.2610889971256256,
0.2092306762933731,
-0.32334259152412415,
0.10076376795768738,
0.09949345886707306,
0.06333241611719131,
0.02230171114206314,
0.1991029679775238,
0.06504811346530914,
0.06916210800409317,
-0.049663886427879333,
-0.25991007685661316,
-0.07022765278816223,
0.1948125660419464,
0.20511353015899658,
-0.05790058150887489,
0.22787503898143768,
-0.5071967840194702,
-0.16867011785507202,
0.08223902434110641,
-0.05847622826695442,
0.11558449268341064,
0.003860039869323373,
0.18110066652297974,
0.20132511854171753,
0.28857046365737915,
-0.35007989406585693,
0.24587731063365936,
-0.08690531551837921,
0.26149821281433105,
0.14082810282707214,
0.07593598961830139,
0.45799243450164795,
0.021300949156284332,
-0.3352101743221283,
-0.033541854470968246,
-0.030077140778303146,
0.08663526177406311,
0.25588056445121765,
-0.23335884511470795,
0.3003470003604889,
0.19892019033432007,
-0.11749520152807236,
0.5623857378959656,
-0.14960479736328125,
0.20659619569778442,
0.41308388113975525,
0.18722347915172577,
-0.3698638081550598,
0.0016460552578791976,
0.2932005524635315,
-0.09663773328065872,
-0.0709826871752739,
0.07596095651388168,
0.2589091956615448,
-0.32232800126075745,
0.11372118443250656,
-0.06573889404535294,
0.1647823601961136,
-0.05655081197619438,
0.19225868582725525,
0.6700755953788757,
0.22707323729991913,
0.04992584139108658,
-0.0694633275270462,
0.16999280452728271,
0.09539502114057541,
0.36280637979507446,
-0.22345663607120514,
0.19276422262191772,
-0.05200457200407982,
0.02463534101843834,
-0.1621609926223755,
-0.3400551676750183,
0.29861074686050415,
0.1632014513015747,
-0.02477487362921238,
0.09867575764656067,
-0.17225874960422516,
0.2616479992866516,
0.15435945987701416,
0.03022289089858532,
-0.26115575432777405,
0.1914433091878891,
-0.12247779965400696,
-0.012982994318008423,
-0.0442100390791893,
-0.2680068016052246,
0.0015667247353121638,
0.15562571585178375,
-0.004661692772060633,
-0.3565726578235626,
0.2555730938911438,
0.3037436306476593,
-0.244086354970932,
-0.4411390423774719,
0.1348092257976532,
0.21249373257160187,
0.03117004781961441,
-0.3002215027809143,
0.15776211023330688,
0.41378042101860046,
0.07809178531169891,
-0.12705528736114502,
0.2019166350364685,
0.4433468282222748,
0.4205474555492401,
-0.3373265266418457,
0.04244174063205719,
0.07533987611532211,
-0.06568092107772827,
-0.023378299549221992,
0.2276100218296051,
0.46722543239593506,
0.2502676248550415,
0.3970099687576294,
0.1184258908033371,
-0.1415998488664627,
-0.03197430446743965,
0.23604975640773773,
-0.06391855329275131,
-0.05667095258831978,
-0.045184873044490814,
-0.0590362623333931,
0.14072102308273315,
-0.4205537736415863,
-0.013584437780082226,
-0.5078697800636292,
0.34002241492271423,
0.16105566918849945,
0.0025867712683975697,
0.17752934992313385,
-0.09258142858743668,
0.0479857474565506,
-0.15697626769542694,
0.39629343152046204,
0.3195849657058716,
0.199141263961792,
-0.3908330202102661,
-0.00899566151201725,
-0.464518666267395,
-0.018635312095284462,
-0.2982341945171356,
0.11210162192583084,
-0.08143274486064911,
0.12865565717220306,
0.07550838589668274,
0.2132711261510849,
0.036631617695093155,
0.04509863629937172,
0.0668022632598877,
0.49491584300994873,
-0.23153194785118103,
-0.24470354616641998,
-0.19481728971004486,
0.21916253864765167,
-0.15832364559173584,
-0.39093199372291565,
0.05759391561150551,
-0.13856172561645508,
0.03407328575849533,
-0.32001999020576477,
-0.06650064140558243,
0.09557345509529114,
0.0059599494561553,
0.33242881298065186,
0.1523781716823578,
0.5925301313400269,
-0.15409474074840546,
-0.20217524468898773,
-0.2086707204580307,
-0.011070453561842442,
-0.159934863448143,
0.3116772770881653,
0.1967301219701767,
0.09890691936016083,
-0.16079406440258026,
-0.11197122931480408,
-0.029564393684267998,
0.2984878122806549,
-0.044816866517066956,
0.19492152333259583,
-0.36696019768714905,
-0.38635677099227905,
0.05791785567998886,
0.11385567486286163,
0.11902748048305511,
0.04692574217915535,
-0.13085585832595825,
-0.0533188059926033,
-0.342149943113327,
-0.3086865544319153,
0.3866538405418396,
-0.3773029148578644,
-0.5697821974754333,
-0.09215575456619263,
0.007928472012281418,
0.04705652594566345,
0.1902984380722046,
-0.3660876452922821,
0.2775554358959198,
0.3897731900215149,
0.051333703100681305,
-0.15096808969974518,
0.16642248630523682,
0.0286492221057415,
-0.01621520146727562,
-0.09404339641332626,
0.11607001721858978,
-0.008283792994916439,
-0.35631418228149414,
-0.22058486938476562,
-0.3912579417228699
] |
https://github.com/huggingface/datasets/issues/2031
|
wikipedia.py generator that extracts XML doesn't release memory
|
Hi @miyamonz
Thanks for investigating this issue, good job !
It would be awesome to integrate your fix in the library, could you open a pull request ?
|
I tried downloading Japanese wikipedia, but it always failed because of out of memory maybe.
I found that the generator function that extracts XML data in wikipedia.py doesn't release memory in the loop.
https://github.com/huggingface/datasets/blob/13a5b7db992ad5cf77895e4c0f76595314390418/datasets/wikipedia/wikipedia.py#L464-L502
`root.clear()` intend to clear memory, but it doesn't.
https://github.com/huggingface/datasets/blob/13a5b7db992ad5cf77895e4c0f76595314390418/datasets/wikipedia/wikipedia.py#L490
https://github.com/huggingface/datasets/blob/13a5b7db992ad5cf77895e4c0f76595314390418/datasets/wikipedia/wikipedia.py#L494
I replaced them with `elem.clear()`, then it seems to work correctly.
here is the notebook to reproduce it.
https://gist.github.com/miyamonz/dc06117302b6e85fa51cbf46dde6bb51#file-xtract_content-ipynb
| 28
|
wikipedia.py generator that extracts XML doesn't release memory
I tried downloading Japanese wikipedia, but it always failed because of out of memory maybe.
I found that the generator function that extracts XML data in wikipedia.py doesn't release memory in the loop.
https://github.com/huggingface/datasets/blob/13a5b7db992ad5cf77895e4c0f76595314390418/datasets/wikipedia/wikipedia.py#L464-L502
`root.clear()` intend to clear memory, but it doesn't.
https://github.com/huggingface/datasets/blob/13a5b7db992ad5cf77895e4c0f76595314390418/datasets/wikipedia/wikipedia.py#L490
https://github.com/huggingface/datasets/blob/13a5b7db992ad5cf77895e4c0f76595314390418/datasets/wikipedia/wikipedia.py#L494
I replaced them with `elem.clear()`, then it seems to work correctly.
here is the notebook to reproduce it.
https://gist.github.com/miyamonz/dc06117302b6e85fa51cbf46dde6bb51#file-xtract_content-ipynb
Hi @miyamonz
Thanks for investigating this issue, good job !
It would be awesome to integrate your fix in the library, could you open a pull request ?
|
[
0.21865186095237732,
-0.11096276342868805,
-0.05236707255244255,
0.6246854662895203,
0.31603381037712097,
0.09426528215408325,
-0.2117369920015335,
0.3332330286502838,
0.20938125252723694,
0.2579498887062073,
0.006053086835891008,
0.15176324546337128,
0.23279011249542236,
-0.12655246257781982,
-0.21753044426441193,
-0.2103436142206192,
0.04372904822230339,
0.07434733211994171,
0.03712082281708717,
-0.22254930436611176,
-0.22596606612205505,
0.12416977435350418,
-0.28279349207878113,
-0.12147046625614166,
-0.17570118606090546,
0.15075094997882843,
0.08346185833215714,
-0.19253426790237427,
-0.17684397101402283,
-0.38680529594421387,
0.14274264872074127,
0.002126645063981414,
-0.12528055906295776,
0.22709275782108307,
-0.00011130447819596156,
-0.1786881983280182,
0.5870482325553894,
-0.017546163871884346,
-0.1438790112733841,
0.10739168524742126,
-0.20371279120445251,
-0.07391218841075897,
-0.10068946331739426,
-0.2878383696079254,
0.14150522649288177,
-0.030018195509910583,
0.16945405304431915,
-0.27437737584114075,
0.35883671045303345,
-0.055535197257995605,
0.22966846823692322,
-0.09951086342334747,
0.413444459438324,
-0.046806421130895615,
0.7186951041221619,
0.26629018783569336,
-0.03358685225248337,
0.02949972078204155,
0.14833246171474457,
-0.12021051347255707,
0.026104219257831573,
0.4042426347732544,
-0.1569177806377411,
0.016586609184741974,
0.2526499330997467,
-0.14933709800243378,
0.04398845136165619,
-0.5066651105880737,
0.46207690238952637,
0.34271159768104553,
0.5755244493484497,
-0.14992199838161469,
0.1062830314040184,
0.031070634722709656,
-0.10397179424762726,
-0.13158267736434937,
0.2247128188610077,
0.4001605212688446,
-0.6533278822898865,
-0.06833520531654358,
0.3109062612056732,
-0.48206827044487,
-0.1790924370288849,
0.2063475400209427,
-0.0007473702426068485,
0.31837624311447144,
-0.007374655921012163,
0.06341231614351273,
0.2590228021144867,
-0.0018346707802265882,
-0.1167001724243164,
-0.043484628200531006,
-0.07423201948404312,
0.21876561641693115,
0.030532293021678925,
0.1633385717868805,
0.18440474569797516,
-0.1822950839996338,
0.27799710631370544,
-0.42008018493652344,
-0.4094339609146118,
0.006629391573369503,
0.27806520462036133,
-0.0407770536839962,
0.3894084393978119,
0.027034811675548553,
-0.017056096345186234,
0.11334169656038284,
0.3600495755672455,
0.21157687902450562,
-0.3496331572532654,
-0.08460117876529694,
0.13038887083530426,
0.052047036588191986,
0.08312396705150604,
-0.10651162266731262,
0.01918589137494564,
-0.06765920668840408,
0.1701020449399948,
0.23868530988693237,
-0.26587843894958496,
-0.07087783515453339,
-0.2080516517162323,
0.41201555728912354,
-0.043827980756759644,
0.3727589547634125,
0.18699701130390167,
0.08538974821567535,
-0.4100784957408905,
-0.3116194009780884,
-0.1378389596939087,
0.2522205114364624,
-0.2821921110153198,
0.04728653281927109,
0.0010043347720056772,
-0.14431355893611908,
0.21169862151145935,
0.1731065958738327,
-0.19320295751094818,
-0.40355154871940613,
0.054077066481113434,
-0.19065360724925995,
0.20738475024700165,
0.2648632526397705,
0.06967254728078842,
0.22170551121234894,
-0.11994488537311554,
-0.08726330101490021,
-0.042838793247938156,
0.28291016817092896,
-0.017926877364516258,
-0.0642537921667099,
0.0001689676137175411,
0.24168145656585693,
0.06598080694675446,
0.19537729024887085,
0.008275333791971207,
-0.16247844696044922,
0.5027114152908325,
0.12040172517299652,
0.015703987330198288,
0.006115168333053589,
-0.012003946118056774,
-0.2563001811504364,
0.17826713621616364,
0.45004695653915405,
0.11541351675987244,
0.12497035413980484,
-0.1744927167892456,
0.13344261050224304,
0.48263177275657654,
0.1633789986371994,
0.004184018354862928,
0.4243841767311096,
-0.12278728187084198,
0.2591700851917267,
-0.023981088772416115,
-0.26399531960487366,
-0.31979623436927795,
-0.0183569248765707,
0.12099497020244598,
0.21700319647789001,
-0.039484743028879166,
0.02748723141849041,
0.12404221296310425,
0.33831465244293213,
0.013630198314785957,
0.2789419889450073,
0.0746849924325943,
0.12920039892196655,
-0.45392701029777527,
-0.22717413306236267,
0.21934598684310913,
-0.3085445463657379,
0.31553179025650024,
-0.039595507085323334,
0.12764406204223633,
0.4033352732658386,
0.6220812797546387,
-0.25634047389030457,
0.36805009841918945,
0.15819722414016724,
0.31492093205451965,
0.05500653386116028,
0.03255229815840721,
-0.10549864172935486,
-0.12108281254768372,
0.08155393600463867,
-0.20726975798606873,
0.3825250267982483,
-0.06458009034395218,
-0.13099606335163116,
-0.1074623167514801,
0.0873798131942749,
-0.25465458631515503,
-0.34560254216194153,
0.20499110221862793,
0.10160692781209946,
0.3502485454082489,
0.2771035134792328,
0.13178196549415588,
-0.4485371708869934,
-0.1533709317445755,
0.16422219574451447,
-0.7328394651412964,
0.017482254654169083,
-0.16485802829265594,
-0.08566740900278091,
-0.18846525251865387,
0.07390878349542618,
-0.0746883675456047,
0.014620771631598473,
-0.1174388900399208,
-0.14403657615184784,
0.21054328978061676,
0.1954234391450882,
-0.2769903838634491,
-0.08075764775276184,
0.2259407490491867,
-0.4512326419353485,
0.19409307837486267,
0.4587636888027191,
0.17534734308719635,
-0.09628595411777496,
0.16056685149669647,
-0.11558809876441956,
-0.02120222896337509,
0.0453733466565609,
0.12331144511699677,
0.04452822357416153,
0.24742184579372406,
0.12301135808229446,
0.15930058062076569,
-0.13627591729164124,
0.11218295246362686,
0.5882782936096191,
-0.09063966572284698,
0.020132889971137047,
-0.11099142581224442,
-0.05267311632633209,
0.44894668459892273,
0.23132896423339844,
0.1596061885356903,
0.047936175018548965,
-0.30744004249572754,
-0.3058306574821472,
0.019125068560242653,
0.09201832115650177,
-0.1586141139268875,
-0.0036716153845191,
0.13245800137519836,
-0.05079919099807739,
0.33782532811164856,
-0.2958715260028839,
0.42037612199783325,
-0.0014913324266672134,
0.16118773818016052,
0.21698378026485443,
0.1296709030866623,
-0.027682138606905937,
-0.3015908896923065,
0.29430320858955383,
-0.007241817656904459,
0.3758421838283539,
0.10969073325395584,
-0.20389923453330994,
0.05884851515293121,
-0.44826528429985046,
0.01379071082919836,
-0.1235475242137909,
-0.20246931910514832,
-0.3298221230506897,
0.11095535755157471,
0.2990676462650299,
-0.2745763957500458,
-0.17864885926246643,
0.03982773795723915,
-0.28575676679611206,
0.08824021369218826,
-0.0641835629940033,
-0.16085825860500336,
-0.3678179681301117,
-0.1747339367866516,
0.026735523715615273,
0.286038339138031,
-0.06198343262076378,
0.06039731949567795,
0.06251107156276703,
-0.22415879368782043,
-0.2190747857093811,
-0.12401789426803589,
0.26603373885154724,
-0.09002543985843658,
0.017764220014214516,
-0.22955818474292755,
0.41144996881484985,
0.1463354527950287,
-0.1430455893278122,
0.25133824348449707,
-0.32574620842933655,
0.015833761543035507,
0.2487390786409378,
0.14999961853027344,
0.17447398602962494,
-0.12339608371257782,
-0.4725927412509918,
0.09537284821271896,
-0.48440438508987427,
0.2165411114692688,
-0.0715504139661789,
0.10141488164663315,
0.6841790080070496,
0.0560014508664608,
-0.06514912098646164,
-0.05487362667918205,
0.1761157363653183,
-0.3081727921962738,
-0.19297373294830322,
0.20510326325893402,
-0.16735288500785828,
-0.33770179748535156,
0.03648209944367409,
-0.015344873070716858,
0.3164592385292053,
0.3823050260543823,
-0.28148016333580017,
0.2819819152355194,
-0.16320089995861053,
0.34467804431915283,
0.07123840600252151,
0.2762087881565094,
0.12846344709396362,
-0.03426043689250946,
-0.09649652242660522,
0.09769733995199203,
0.49609464406967163,
-0.05269603431224823,
-0.07069673389196396,
0.07768349349498749,
0.13687336444854736,
0.04942232742905617,
0.04952969774603844,
0.47618627548217773,
0.1436752825975418,
0.5873876214027405,
0.36952248215675354,
0.1171230748295784,
0.09948144108057022,
-0.04633812978863716,
-0.19205619394779205,
0.0076181478798389435,
-0.20973682403564453,
-0.2204037308692932,
0.14378559589385986,
0.03918498754501343,
-0.13615933060646057,
-0.11215975880622864,
-0.01745763048529625,
-0.13551433384418488,
-0.49646416306495667,
0.2188592553138733,
0.23347224295139313,
0.3340347111225128,
-0.0010710667120292783,
0.2686013877391815,
0.12844373285770416,
-0.3472023904323578,
0.07517893612384796,
-0.20737867057323456,
0.20898409187793732,
-0.008934763260185719,
0.009537016041576862,
-0.32980790734291077,
-0.56120365858078,
0.07031828165054321,
0.09460850805044174,
-0.16018271446228027,
0.13694770634174347,
-0.2673754096031189,
0.19153951108455658,
-0.015669774264097214,
0.27613508701324463,
0.12964777648448944,
0.010778247378766537,
0.07975614070892334,
-0.04023357480764389,
-0.09323761612176895,
0.21066316962242126,
-0.13649164140224457,
-0.02089269459247589,
0.21610136330127716,
-0.04519857093691826,
-0.45476239919662476,
-0.15045492351055145,
0.0004931658040732145,
0.3498808443546295,
-0.17178146541118622,
0.03729528933763504,
-0.17724549770355225,
-0.332271933555603,
-0.5068723559379578,
-0.10463324934244156,
0.13797637820243835,
0.41595160961151123,
0.09826232492923737,
-0.13484539091587067,
0.28210172057151794,
0.08946356922388077,
-0.07844740897417068,
0.07640799134969711,
0.30251652002334595,
-0.19990438222885132,
-0.00248813652433455,
-0.033188845962285995,
-0.29163652658462524,
0.0972178652882576,
0.13913537561893463,
0.09377779066562653,
0.0013577846111729741,
-0.3511096239089966,
-0.1426326483488083,
-0.1238645687699318,
0.020906738936901093,
-0.09977167099714279,
0.20293448865413666,
-0.09695994108915329,
0.10065184533596039,
-0.262490451335907,
-0.1832820177078247,
0.12360024452209473,
-0.1975301057100296,
0.1065526083111763,
-0.20939268171787262,
0.3150334656238556,
-0.0883084312081337,
0.09702439606189728,
0.545415997505188,
0.0013297982513904572,
-0.3294948637485504,
-0.021848876029253006,
0.2135731279850006,
0.8503891229629517,
-0.15259552001953125,
0.2035498321056366,
0.38371220231056213,
0.20437784492969513,
0.44386181235313416,
-0.09516692161560059,
0.4557696282863617,
-0.4460810422897339,
0.1965765357017517,
0.1880086362361908,
0.20446456968784332,
-0.12362683564424515,
-0.32612428069114685,
-0.07607707381248474,
0.09267558157444,
-0.1996018886566162,
0.05721884220838547,
-0.07461375743150711,
0.33867672085762024,
-0.06800087541341782,
-0.10128448903560638,
-0.11378953605890274,
0.08971907943487167,
-0.03810537979006767,
0.37478190660476685,
-0.19960714876651764,
0.10928118228912354,
0.15186133980751038,
-0.008616583421826363,
-0.3571416735649109,
0.13471035659313202,
-0.1278681457042694,
0.31383955478668213,
-0.16926230490207672,
-0.2985730767250061,
-0.15227699279785156,
0.20912368595600128,
-0.3088805079460144,
0.26683667302131653,
-0.11832071840763092,
0.009040208533406258,
-0.13434246182441711,
-0.3013685643672943,
-0.09812428057193756,
0.2041153460741043,
0.25142014026641846,
-0.07935115694999695,
-0.39154788851737976,
0.3663361370563507,
-0.12483679503202438,
-0.2694854438304901,
-0.3880550265312195,
0.006317948456853628,
-0.2515430152416229,
-0.00103485316503793,
-0.019907930865883827,
-0.03886684402823448,
-0.4225254952907562,
-0.046749137341976166,
0.176657035946846,
0.20873428881168365,
-0.3466234803199768,
0.12731514871120453,
-0.26204153895378113,
-0.15585562586784363,
-0.010848327539861202,
-0.05306515842676163,
0.4631015360355377,
0.1669982671737671,
0.49854984879493713,
0.3981514871120453,
-0.1369810700416565,
-0.20703047513961792,
-0.2525358498096466,
-0.2442411631345749,
-0.2741571366786957,
0.3001503646373749,
-0.07928194850683212,
-0.019401732832193375,
-0.2108326256275177,
0.14230424165725708,
-0.1996142715215683,
-0.23622068762779236,
0.04272305220365524,
-0.16159142553806305,
-0.293400377035141,
0.23496708273887634,
-0.0004794345877598971,
0.0744677409529686,
-0.021655892953276634,
0.019819142296910286,
0.12765924632549286,
0.13108102977275848,
-0.28106820583343506,
-0.03542902693152428,
-0.00504476111382246,
0.14458812773227692,
0.13831281661987305,
-0.1445304900407791,
-0.06252411752939224,
-0.029495442286133766,
0.07632753252983093,
0.10322478413581848,
-0.12141169607639313,
-0.23547500371932983,
0.127670019865036,
0.08886871486902237,
0.07589850574731827,
-0.13779009878635406,
0.1375182718038559,
-0.25887227058410645,
0.05123705789446831,
-0.2434951663017273,
0.14515988528728485,
0.02469252236187458,
-0.12235631048679352,
0.2717660069465637,
0.05947297066450119,
0.09152733534574509,
-0.1313977688550949,
0.25220242142677307,
0.04261806979775429,
0.3345504105091095,
0.008039440028369427,
0.12592515349388123,
0.39938580989837646,
-0.1260973960161209,
-0.7414157390594482,
-0.043442003428936005,
-0.12351496517658234,
-0.12030848860740662,
0.34505027532577515,
-0.0021809684112668037,
-0.2966975271701813,
0.35815131664276123,
0.14552068710327148,
0.3638097941875458,
0.03177022933959961,
0.07916884869337082,
0.03306104242801666,
0.26614102721214294,
-0.13451804220676422,
0.12335969507694244,
0.01102518942207098,
-0.1922677606344223,
-0.10882902145385742,
0.06272654235363007,
-0.030870018526911736,
-0.23883995413780212,
0.025422289967536926,
0.15984328091144562,
-0.07918135821819305,
-0.18243947625160217,
0.40272220969200134,
0.05159815400838852,
0.16446852684020996,
-0.032585807144641876,
0.02246609888970852,
0.13621699810028076,
0.10645564645528793,
0.2732832431793213,
0.1820957362651825,
0.13620632886886597,
0.09505855292081833,
0.002532079815864563,
-0.19885240495204926,
0.05050484463572502,
-0.1160312220454216,
0.41923701763153076,
-0.36531034111976624,
0.24053943157196045,
-0.1250750571489334,
0.029201511293649673,
0.26453718543052673,
0.01682293601334095,
-0.2856099605560303,
0.2863132953643799,
-0.26935648918151855,
-0.13768191635608673,
0.09084881097078323,
-0.34889301657676697,
0.08299800008535385,
0.13612623512744904,
0.25294721126556396,
-0.19997791945934296,
0.2733370363712311,
0.09979603439569473,
-0.40586766600608826,
-0.31796255707740784,
0.6245741248130798,
-0.02247893437743187,
0.22099043428897858,
-0.4029295742511749,
-0.1296221762895584,
0.15547694265842438,
-0.18128126859664917,
-0.4392136037349701,
0.41111069917678833,
0.29195350408554077,
0.43017444014549255,
-0.5130146145820618,
0.10230007767677307,
-0.16981838643550873,
-0.07900317758321762,
-0.2631185054779053,
0.2411460429430008,
0.19127219915390015,
0.15335091948509216,
-0.08488211035728455,
0.08822043240070343,
-0.20106977224349976,
-0.39692404866218567,
0.512554943561554,
0.2918369174003601,
-0.04001380503177643,
-0.29146578907966614,
0.08263205736875534,
-0.23278576135635376,
-0.10045405477285385,
-0.15153846144676208,
-0.4054410457611084,
0.5398061871528625,
0.19020551443099976,
0.012268821708858013,
-0.01755288615822792,
-0.2326769381761551,
0.09413829445838928,
-0.13956117630004883,
0.2033517211675644,
0.17441244423389435,
0.07702063024044037,
-0.3007371425628662,
-0.29699623584747314,
-0.40831246972084045,
0.4256492257118225,
-0.34813418984413147,
-0.11795971542596817,
0.0067756157368421555,
0.4143888056278229,
-0.28316429257392883,
-0.024461179971694946,
-0.11374074220657349,
-0.4053599536418915,
0.05676361545920372,
0.22547492384910583,
-0.1330944299697876,
0.013169418089091778,
0.04388308897614479,
-0.290219783782959,
-0.059461772441864014,
-0.4011067748069763,
0.315399706363678,
-0.3039942979812622,
0.032792676240205765,
-0.08920302242040634,
0.20109577476978302,
0.24438399076461792,
0.19341051578521729,
0.31212034821510315,
0.17024192214012146,
-0.11303678900003433,
-0.0869574099779129,
-0.5135854482650757,
-0.2686924934387207,
-0.015313965268433094,
0.0984288826584816,
0.12758567929267883,
0.07674814015626907,
0.3675943613052368,
-0.21235986053943634,
-0.059462908655405045,
-0.5560924410820007,
0.42994290590286255,
-0.22012902796268463,
0.00370941124856472,
-0.20143504440784454,
-0.13797436654567719,
-0.04016036540269852,
0.07473880052566528,
0.1364295929670334,
0.3669700622558594,
-0.24268177151679993,
0.04433099180459976,
-0.564395010471344,
-0.45706963539123535,
0.05850519239902496,
-0.4836914539337158,
-0.5538263320922852,
-0.12026341259479523,
0.2507525086402893,
-0.02824077010154724,
-0.1778525561094284,
-0.3676694333553314,
0.26058515906333923,
0.07324673235416412,
0.04826017841696739,
-0.29009103775024414,
-0.1871766597032547,
-0.05938177928328514,
-0.08681251108646393,
0.10220127552747726,
0.26771098375320435,
0.3074437081813812,
-0.3321140706539154,
0.2800380289554596,
-0.10164637118577957
] |
https://github.com/huggingface/datasets/issues/2029
|
Loading a faiss index KeyError
|
In your code `dataset2` doesn't contain the "embeddings" column, since it is created from the pandas DataFrame with columns "text" and "label".
Therefore when you call `dataset2[embeddings_name]`, you get a `KeyError`.
If you want the "embeddings" column back, you can create `dataset2` with
```python
dataset2 = load_from_disk(dataset_filename)
```
where `dataset_filename` is the place where you saved you dataset with the embeddings in the first place.
|
I've recently been testing out RAG and DPR embeddings, and I've run into an issue that is not apparent in the documentation.
The basic steps are:
1. Create a dataset (dataset1)
2. Create an embeddings column using DPR
3. Add a faiss index to the dataset
4. Save faiss index to a file
5. Create a new dataset (dataset2) with the same text and label information as dataset1
6. Try to load the faiss index from file to dataset2
7. Get `KeyError: "Column embeddings not in the dataset"`
I've made a colab notebook that should show exactly what I did. Please switch to GPU runtime; I didn't check on CPU.
https://colab.research.google.com/drive/1X0S9ZuZ8k0ybcoei4w7so6dS_WrABmIx?usp=sharing
Ubuntu Version
VERSION="18.04.5 LTS (Bionic Beaver)"
datasets==1.4.1
faiss==1.5.3
faiss-gpu==1.7.0
torch==1.8.0+cu101
transformers==4.3.3
NVIDIA-SMI 460.56
Driver Version: 460.32.03
CUDA Version: 11.2
Tesla K80
I was basically following the steps here: https://huggingface.co/docs/datasets/faiss_and_ea.html#adding-a-faiss-index
I included the exact code from the documentation at the end of the notebook to show that they don't work either.
| 65
|
Loading a faiss index KeyError
I've recently been testing out RAG and DPR embeddings, and I've run into an issue that is not apparent in the documentation.
The basic steps are:
1. Create a dataset (dataset1)
2. Create an embeddings column using DPR
3. Add a faiss index to the dataset
4. Save faiss index to a file
5. Create a new dataset (dataset2) with the same text and label information as dataset1
6. Try to load the faiss index from file to dataset2
7. Get `KeyError: "Column embeddings not in the dataset"`
I've made a colab notebook that should show exactly what I did. Please switch to GPU runtime; I didn't check on CPU.
https://colab.research.google.com/drive/1X0S9ZuZ8k0ybcoei4w7so6dS_WrABmIx?usp=sharing
Ubuntu Version
VERSION="18.04.5 LTS (Bionic Beaver)"
datasets==1.4.1
faiss==1.5.3
faiss-gpu==1.7.0
torch==1.8.0+cu101
transformers==4.3.3
NVIDIA-SMI 460.56
Driver Version: 460.32.03
CUDA Version: 11.2
Tesla K80
I was basically following the steps here: https://huggingface.co/docs/datasets/faiss_and_ea.html#adding-a-faiss-index
I included the exact code from the documentation at the end of the notebook to show that they don't work either.
In your code `dataset2` doesn't contain the "embeddings" column, since it is created from the pandas DataFrame with columns "text" and "label".
Therefore when you call `dataset2[embeddings_name]`, you get a `KeyError`.
If you want the "embeddings" column back, you can create `dataset2` with
```python
dataset2 = load_from_disk(dataset_filename)
```
where `dataset_filename` is the place where you saved you dataset with the embeddings in the first place.
|
[
0.05507369711995125,
-0.6190826296806335,
0.07024994492530823,
0.36131370067596436,
0.15539924800395966,
0.2710702121257782,
0.3453337848186493,
0.051057182252407074,
0.539132297039032,
0.28440284729003906,
-0.07781468331813812,
0.1564428210258484,
0.40917691588401794,
-0.06366588920354843,
-0.060045890510082245,
-0.036585498601198196,
0.22996442019939423,
0.2709699869155884,
0.27711784839630127,
-0.11723706871271133,
-0.2132824957370758,
0.12541407346725464,
-0.2415110021829605,
0.23965075612068176,
-0.241994246840477,
0.15326286852359772,
-0.23606956005096436,
0.020748980343341827,
-0.1963150054216385,
-0.4184425175189972,
0.321845680475235,
-0.2817218005657196,
0.6558512449264526,
0.19629688560962677,
-0.00012320867972448468,
0.07663360238075256,
0.3582347333431244,
-0.1224534884095192,
-0.21540509164333344,
0.061794862151145935,
0.13875463604927063,
0.06916633993387222,
0.207834392786026,
-0.041727595031261444,
-0.014701779000461102,
-0.6515746712684631,
0.02663644216954708,
-0.15972816944122314,
0.2974441349506378,
-0.005563909187912941,
0.09437331557273865,
0.009831827133893967,
0.08096107840538025,
-0.30128180980682373,
0.0691160187125206,
-0.3261911869049072,
-0.05404331535100937,
0.24273276329040527,
0.04528982192277908,
0.007651420310139656,
0.06686217337846756,
0.29880490899086,
-0.040102072060108185,
0.021910151466727257,
0.4202639162540436,
0.2766130864620209,
0.3658120334148407,
-0.16593973338603973,
0.12981191277503967,
0.18717502057552338,
0.39165443181991577,
-0.10821157693862915,
-0.43089431524276733,
-0.173922598361969,
0.2771783769130707,
-0.11611438542604446,
0.21102067828178406,
-0.3297826945781708,
-0.015711860731244087,
0.2792978286743164,
0.4298001825809479,
-0.24344827234745026,
0.11592914164066315,
0.08304152637720108,
-0.08956475555896759,
-0.0029275810811668634,
-0.1924942284822464,
0.039062414318323135,
0.17960569262504578,
-0.12817446887493134,
-0.30799734592437744,
-0.11444228142499924,
0.1000971794128418,
0.12095916271209717,
-0.3051656186580658,
0.10964810848236084,
0.19388870894908905,
0.008168764412403107,
-0.1355563998222351,
0.00805242732167244,
-0.25095897912979126,
-0.03736930713057518,
0.057298168540000916,
0.3799479305744171,
-0.16400542855262756,
0.014769592322409153,
0.09003292769193649,
0.061175789684057236,
0.06046682596206665,
0.23283250629901886,
0.03346897289156914,
-0.2108222246170044,
-0.1764005571603775,
-0.15491729974746704,
-0.49530985951423645,
-0.3186212182044983,
-0.045025430619716644,
-0.3158310055732727,
-0.46812838315963745,
0.3127000331878662,
-0.40210822224617004,
-0.10819969326257706,
-0.0031757752876728773,
0.5753399133682251,
0.20597432553768158,
-0.1731281876564026,
0.2817460894584656,
0.34107691049575806,
-0.2425622195005417,
0.2558038830757141,
-0.16184693574905396,
0.12062755227088928,
-0.1269555538892746,
0.37447991967201233,
0.05277063697576523,
-0.4389057755470276,
0.20528972148895264,
0.044482920318841934,
0.21070033311843872,
0.1028745099902153,
-0.4216083586215973,
0.00016870170657057315,
0.28302425146102905,
0.281286358833313,
-0.08307678997516632,
0.09201382845640182,
0.340328186750412,
-0.3423231244087219,
-0.19096577167510986,
0.045186933130025864,
-0.11482203751802444,
-0.07473158836364746,
-0.17848876118659973,
0.09114915877580643,
-0.07040056586265564,
-0.08972418308258057,
0.17439964413642883,
0.05619008094072342,
0.15862728655338287,
-0.2581045925617218,
0.08013936877250671,
0.02519923262298107,
-0.1384517401456833,
-0.17999321222305298,
0.47841691970825195,
0.39562082290649414,
-0.7722757458686829,
-0.39882782101631165,
0.1143987849354744,
0.16897709667682648,
-0.13443759083747864,
0.2855874001979828,
-0.08924376219511032,
0.062367506325244904,
-0.23198017477989197,
0.42193543910980225,
0.11154882609844208,
-0.1278715878725052,
-0.19274456799030304,
0.06857138872146606,
0.06793220341205597,
0.00482603907585144,
0.22713130712509155,
-0.16176098585128784,
0.3247582018375397,
0.1531335711479187,
0.3888317048549652,
0.07133734226226807,
0.0399593710899353,
-0.3257414698600769,
-0.1789889931678772,
-0.3758673667907715,
0.09911667555570602,
0.10267618298530579,
-0.09611961245536804,
-0.07423561066389084,
-0.18361099064350128,
-0.3227064311504364,
0.08831499516963959,
-0.2380024641752243,
-0.048561740666627884,
0.040044352412223816,
0.30230945348739624,
0.4282279312610626,
0.4427756369113922,
0.03683076053857803,
-0.011563464067876339,
0.2662014663219452,
0.032486822456121445,
0.09515586495399475,
-0.2985559403896332,
-0.05198778957128525,
-0.23569121956825256,
0.04640094190835953,
-0.0661986917257309,
-0.20133858919143677,
-0.06590913981199265,
-0.009109540842473507,
-0.024678025394678116,
0.047528039664030075,
-0.32207056879997253,
0.07772862911224365,
-0.19476966559886932,
0.21952633559703827,
-0.46182650327682495,
0.4788581132888794,
-0.26204586029052734,
-0.2415875494480133,
0.04626569151878357,
0.3040074110031128,
0.1866382658481598,
-0.17258453369140625,
0.16633276641368866,
0.09493891894817352,
-0.09374523162841797,
-0.19922277331352234,
0.1190163642168045,
-0.19176684319972992,
0.15935789048671722,
-0.15710046887397766,
0.05744333565235138,
-0.06692233681678772,
0.19235515594482422,
0.12207777053117752,
-0.17929889261722565,
0.4870295226573944,
0.039200812578201294,
0.2792644202709198,
-0.18538619577884674,
-0.15398234128952026,
0.11312634497880936,
-0.0026398859918117523,
0.010103278793394566,
-0.33826473355293274,
-0.08892590552568436,
-0.00465522101148963,
-0.11991819739341736,
-0.06265706568956375,
0.0268103014677763,
0.12312795221805573,
0.01741459220647812,
0.028570394963026047,
-0.10387669503688812,
0.053534433245658875,
-0.3347169756889343,
0.06762395799160004,
0.04714629799127579,
-0.36819326877593994,
0.35424160957336426,
0.2893676161766052,
-0.16698826849460602,
-0.2466781735420227,
-0.2466316968202591,
-0.2522490620613098,
0.13046510517597198,
-0.05279005318880081,
-0.2380266636610031,
0.0619877465069294,
-0.13294607400894165,
0.0930446982383728,
-0.20396363735198975,
-0.03931238502264023,
0.007351962383836508,
0.19901001453399658,
-0.5885114669799805,
0.08747075498104095,
-0.3268990218639374,
-0.08485225588083267,
-0.00893395021557808,
-0.11832118034362793,
-0.035032376646995544,
-0.3714097738265991,
0.18186724185943604,
-0.18428654968738556,
-0.03390425443649292,
0.22882036864757538,
0.010825177654623985,
0.19860516488552094,
-0.015873145312070847,
0.0349428653717041,
-0.19947198033332825,
-0.19226892292499542,
-0.27665361762046814,
-0.07508500665426254,
-0.02612627111375332,
0.21214407682418823,
0.2464045137166977,
-0.017493827268481255,
-0.10351838171482086,
-0.10360095649957657,
-0.29018211364746094,
0.2608537971973419,
-0.21846823394298553,
0.09603186696767807,
-0.1443021297454834,
0.1334662288427353,
-0.11501505970954895,
-0.2030881643295288,
0.31624019145965576,
-0.07128570228815079,
-0.22333702445030212,
-0.07486990839242935,
0.1445915699005127,
-0.017257703468203545,
-0.11714136600494385,
-0.3439751863479614,
0.08656997233629227,
-0.2017679661512375,
-0.05190025642514229,
-0.17155557870864868,
-0.0757848471403122,
-0.3403170108795166,
0.38888728618621826,
0.10980268567800522,
-0.12065868824720383,
0.0835883840918541,
-0.27835583686828613,
0.07603324204683304,
0.3620348572731018,
-0.04950646683573723,
-0.22942164540290833,
0.16086211800575256,
0.053470756858587265,
-0.2114241123199463,
-0.07397095113992691,
-0.30189642310142517,
-0.5255085825920105,
-0.013785513117909431,
0.20829342305660248,
0.22941547632217407,
0.4104635417461395,
0.14614348113536835,
-0.016688255593180656,
-0.0821891650557518,
-0.08180674910545349,
-0.349111944437027,
0.033990632742643356,
-0.12745818495750427,
0.1863526850938797,
-0.15800654888153076,
0.5168382525444031,
-0.26276254653930664,
0.4241444170475006,
0.41822654008865356,
-0.33448365330696106,
0.40186354517936707,
-0.10264299809932709,
0.4811013638973236,
-0.19389024376869202,
-0.1900721788406372,
0.1305028349161148,
0.0521102212369442,
0.041434913873672485,
0.22562269866466522,
-0.07838470488786697,
0.15157802402973175,
0.050075460225343704,
0.27468353509902954,
-0.13586291670799255,
-0.24876797199249268,
0.06968227028846741,
-0.026574114337563515,
-0.0034900482278317213,
-0.106273353099823,
0.2850157618522644,
-0.12927468121051788,
0.15036222338676453,
0.2282380610704422,
0.4088185429573059,
0.3697274327278137,
-0.11079514026641846,
0.3304602801799774,
-0.32461756467819214,
-0.24792270362377167,
0.5417060256004333,
0.07691456377506256,
0.2590823173522949,
-0.1951613575220108,
-0.0886172354221344,
0.4172731339931488,
0.16333141922950745,
0.5660611987113953,
-0.3769989609718323,
-0.3231423497200012,
0.2717078924179077,
0.26718416810035706,
-0.37121227383613586,
-0.11774470657110214,
-0.020698610693216324,
-0.04353157430887222,
-0.01803193800151348,
0.6748080849647522,
-0.44304025173187256,
-0.04734224081039429,
0.2658812403678894,
0.06509615480899811,
-0.1818183958530426,
-0.42568325996398926,
-0.49097469449043274,
-0.10806632786989212,
-0.47352394461631775,
-0.03776683658361435,
-0.06436038017272949,
0.3547741770744324,
0.05869954824447632,
0.28144264221191406,
-0.07200530171394348,
0.021322648972272873,
0.2308117002248764,
0.3325810730457306,
0.08805614709854126,
0.059656430035829544,
0.19274932146072388,
0.4122955799102783,
0.44057580828666687,
0.28764498233795166,
0.38522055745124817,
-0.08862307667732239,
-0.5030118823051453,
0.11899511516094208,
0.07952912896871567,
0.19151334464550018,
0.3066503405570984,
-0.05773404240608215,
0.2583630681037903,
-0.15171153843402863,
0.091291144490242,
-0.2620263695716858,
-0.3267892301082611,
0.12303818017244339,
0.11361546069383621,
0.032000161707401276,
-0.27923038601875305,
0.4609560966491699,
-0.002797922817990184,
-0.11770512163639069,
-0.11319463700056076,
0.7454817295074463,
-0.044564276933670044,
0.9066892266273499,
-0.022489961236715317,
0.9038160443305969,
-0.18376630544662476,
0.005494782235473394,
0.412469744682312,
-0.14304329454898834,
0.5982558131217957,
-0.13974632322788239,
0.005640167277306318,
-0.43720680475234985,
-0.14949540793895721,
-0.05437413975596428,
0.013611921109259129,
0.214519202709198,
-0.07287195324897766,
-0.30708611011505127,
0.12280218303203583,
-0.07230083644390106,
-0.14651784300804138,
-0.08935743570327759,
-0.02706795372068882,
0.06110202148556709,
-0.4498352110385895,
-0.32945936918258667,
0.007823972031474113,
0.44732457399368286,
0.3218051493167877,
0.05954105406999588,
-0.07983049750328064,
-0.3183341324329376,
0.00491389911621809,
-0.35883885622024536,
0.07128779590129852,
0.29945504665374756,
0.16056153178215027,
0.36016592383384705,
-0.20492051541805267,
0.2669720947742462,
0.12774448096752167,
0.7160648703575134,
-0.38895994424819946,
-0.25288125872612,
0.12047983705997467,
-0.3667644262313843,
-0.24271781742572784,
-0.12803639471530914,
-0.30137622356414795,
0.3244975507259369,
0.24489474296569824,
-0.4326154589653015,
0.29452863335609436,
0.18069657683372498,
-0.1646515280008316,
-0.16185595095157623,
0.1455041468143463,
-0.06770645827054977,
-0.35634827613830566,
-0.11755284667015076,
-0.09057255834341049,
0.33756691217422485,
-0.144400954246521,
0.0659765973687172,
0.2046820968389511,
-0.08204805850982666,
0.10913703590631485,
0.08383049815893173,
-0.12310962378978729,
-0.00553372735157609,
0.5033713579177856,
-0.22855880856513977,
0.11460503190755844,
0.34994032979011536,
0.1286236047744751,
-0.44989249110221863,
0.00038828534889034927,
-0.4983135759830475,
0.5014630556106567,
-0.3836683928966522,
-0.18451571464538574,
0.34912019968032837,
-0.23497048020362854,
-0.022677112370729446,
-0.0013699028640985489,
0.373008131980896,
-0.23263715207576752,
-0.2815306782722473,
-0.2601918876171112,
-0.10827600210905075,
0.3613975942134857,
-0.1328592598438263,
0.16167598962783813,
-0.08604373782873154,
0.11582843214273453,
-0.12790386378765106,
0.012833649292588234,
-0.21264848113059998,
0.15792320668697357,
-0.1372292935848236,
0.07535101473331451,
-0.0734349861741066,
-0.2143033742904663,
-0.0054207840003073215,
-0.2459959238767624,
0.01982959546148777,
0.16605117917060852,
0.028093809261918068,
-0.016721373423933983,
-0.010272372514009476,
0.1721182018518448,
0.06172097474336624,
0.1258154958486557,
-0.41393721103668213,
-0.07177047431468964,
-0.03208104148507118,
-0.39670562744140625,
0.35435447096824646,
0.20075079798698425,
-0.0468914769589901,
-0.07181423157453537,
0.0021623768843710423,
0.07318676263093948,
0.041261062026023865,
0.2462111860513687,
0.12417788058519363,
0.5196707248687744,
0.28026342391967773,
-0.11639020591974258,
-0.4827328622341156,
0.14838950335979462,
0.024220095947384834,
0.4092269837856293,
0.15061557292938232,
-0.04090210050344467,
0.35046830773353577,
-0.2940051555633545,
-0.06803062558174133,
0.004270510282367468,
0.22359351813793182,
0.38118940591812134,
-0.09775005280971527,
0.06811676919460297,
0.2136993408203125,
0.04740568622946739,
-0.25035691261291504,
0.03477853536605835,
0.3809853792190552,
-0.14747153222560883,
-0.034124184399843216,
0.23386886715888977,
0.1813003122806549,
0.12278915196657181,
-0.19792480766773224,
0.06926035135984421,
0.20642626285552979,
0.1313115656375885,
-0.3917590379714966,
0.048544254153966904,
0.1434890627861023,
0.25316542387008667,
0.42076101899147034,
0.22606384754180908,
0.3615337312221527,
0.1074410006403923,
-0.16831566393375397,
0.030405521392822266,
-0.04286941513419151,
0.3624771237373352,
-0.17027731239795685,
-0.5442954301834106,
0.45911532640457153,
0.19908098876476288,
0.4446192979812622,
-0.3005715608596802,
0.011093547567725182,
0.22464388608932495,
-0.007512628100812435,
0.002991428831592202,
-0.12642993032932281,
0.019480565562844276,
-0.2073533982038498,
-0.48146864771842957,
0.24696943163871765,
0.00703946640715003,
-0.1617952287197113,
-0.07484188675880432,
0.09046386182308197,
-0.1671428382396698,
-0.11276168376207352,
-0.1288219839334488,
-0.31276318430900574,
-0.16332946717739105,
-0.3798965811729431,
0.29762423038482666,
0.2746294438838959,
0.017205964773893356,
-0.09242977201938629,
-0.08203697204589844,
-0.012951117940247059,
0.3628845810890198,
0.07100293785333633,
0.5582458972930908,
0.09283282607793808,
-0.11611943691968918,
0.11368660628795624,
0.010832199826836586,
0.052257273346185684,
-0.014790182933211327,
0.11803708225488663,
-0.1604047566652298,
0.25155115127563477,
0.28140634298324585,
0.07933168113231659,
-0.12622292339801788,
-0.38666754961013794,
-0.026021182537078857,
0.6515324115753174,
0.0928589254617691,
-0.12936869263648987,
-0.40745285153388977,
0.07243664562702179,
-0.11088035255670547,
0.03836307302117348,
-0.3113241493701935,
0.298348069190979,
0.03686947375535965,
-0.09624949097633362,
-0.012902206741273403,
0.26674947142601013,
0.023688020184636116,
-0.1871163696050644,
0.25475430488586426,
0.862918496131897,
-0.08747681975364685,
-0.2432614415884018,
0.15776009857654572,
-0.5931997895240784,
0.23700416088104248,
-0.07493859529495239,
-0.22063148021697998,
0.2276029735803604,
0.6163490414619446,
0.43112823367118835,
-0.03190997242927551,
-0.010508817620575428,
-0.04498836770653725,
0.26897990703582764,
0.42199036478996277,
-0.00008637850260129198,
-0.3120776414871216,
-0.11986438184976578,
-0.2052941620349884,
-0.10858389735221863,
0.016001176089048386,
0.11131498962640762,
-0.1017325222492218,
-0.0438833124935627,
0.03898738697171211,
0.12288020551204681,
-0.17387506365776062,
-0.36295101046562195,
0.6114466786384583,
0.036907684057950974,
0.3470853865146637,
-0.13605983555316925,
-0.005968828219920397,
-0.17508326470851898,
-0.1696823686361313,
0.03294539451599121,
0.28291454911231995,
-0.180660218000412,
0.22057268023490906,
-0.1766619086265564,
-0.28836819529533386,
-0.2644261419773102,
0.2516522705554962,
0.07120179384946823,
-0.2701532244682312,
-0.20919953286647797,
0.18262222409248352,
-0.17582398653030396,
0.04481235519051552,
-0.03616824746131897,
0.05219434201717377,
-0.04623410105705261,
0.29663926362991333,
0.10567658394575119,
-0.26403698325157166,
0.6632550954818726,
-0.379784494638443,
0.03185688331723213,
0.18262958526611328,
0.1951088160276413,
0.49074816703796387,
0.007105058524757624,
-0.8905530571937561,
0.04151303693652153,
0.03829366713762283,
-0.061208344995975494,
-0.32320064306259155,
-0.09070611000061035,
0.20052209496498108,
0.07877697795629501,
-0.23113080859184265,
-0.17332282662391663,
0.016819266602396965,
0.12169080972671509,
0.017773009836673737,
-0.26730772852897644
] |
https://github.com/huggingface/datasets/issues/2029
|
Loading a faiss index KeyError
|
Ok in that case HF should fix their misleading example at https://huggingface.co/docs/datasets/faiss_and_ea.html#adding-a-faiss-index
I copy-pasted it here.
> When you are done with your queries you can save your index on disk:
>
> ```python
> ds_with_embeddings.save_faiss_index('embeddings', 'my_index.faiss')
> ```
> Then reload it later:
>
> ```python
> ds = load_dataset('crime_and_punish', split='train[:100]')
> ds.load_faiss_index('embeddings', 'my_index.faiss')
> ```
|
I've recently been testing out RAG and DPR embeddings, and I've run into an issue that is not apparent in the documentation.
The basic steps are:
1. Create a dataset (dataset1)
2. Create an embeddings column using DPR
3. Add a faiss index to the dataset
4. Save faiss index to a file
5. Create a new dataset (dataset2) with the same text and label information as dataset1
6. Try to load the faiss index from file to dataset2
7. Get `KeyError: "Column embeddings not in the dataset"`
I've made a colab notebook that should show exactly what I did. Please switch to GPU runtime; I didn't check on CPU.
https://colab.research.google.com/drive/1X0S9ZuZ8k0ybcoei4w7so6dS_WrABmIx?usp=sharing
Ubuntu Version
VERSION="18.04.5 LTS (Bionic Beaver)"
datasets==1.4.1
faiss==1.5.3
faiss-gpu==1.7.0
torch==1.8.0+cu101
transformers==4.3.3
NVIDIA-SMI 460.56
Driver Version: 460.32.03
CUDA Version: 11.2
Tesla K80
I was basically following the steps here: https://huggingface.co/docs/datasets/faiss_and_ea.html#adding-a-faiss-index
I included the exact code from the documentation at the end of the notebook to show that they don't work either.
| 57
|
Loading a faiss index KeyError
I've recently been testing out RAG and DPR embeddings, and I've run into an issue that is not apparent in the documentation.
The basic steps are:
1. Create a dataset (dataset1)
2. Create an embeddings column using DPR
3. Add a faiss index to the dataset
4. Save faiss index to a file
5. Create a new dataset (dataset2) with the same text and label information as dataset1
6. Try to load the faiss index from file to dataset2
7. Get `KeyError: "Column embeddings not in the dataset"`
I've made a colab notebook that should show exactly what I did. Please switch to GPU runtime; I didn't check on CPU.
https://colab.research.google.com/drive/1X0S9ZuZ8k0ybcoei4w7so6dS_WrABmIx?usp=sharing
Ubuntu Version
VERSION="18.04.5 LTS (Bionic Beaver)"
datasets==1.4.1
faiss==1.5.3
faiss-gpu==1.7.0
torch==1.8.0+cu101
transformers==4.3.3
NVIDIA-SMI 460.56
Driver Version: 460.32.03
CUDA Version: 11.2
Tesla K80
I was basically following the steps here: https://huggingface.co/docs/datasets/faiss_and_ea.html#adding-a-faiss-index
I included the exact code from the documentation at the end of the notebook to show that they don't work either.
Ok in that case HF should fix their misleading example at https://huggingface.co/docs/datasets/faiss_and_ea.html#adding-a-faiss-index
I copy-pasted it here.
> When you are done with your queries you can save your index on disk:
>
> ```python
> ds_with_embeddings.save_faiss_index('embeddings', 'my_index.faiss')
> ```
> Then reload it later:
>
> ```python
> ds = load_dataset('crime_and_punish', split='train[:100]')
> ds.load_faiss_index('embeddings', 'my_index.faiss')
> ```
|
[
0.017279090359807014,
-0.5772308707237244,
0.06312286108732224,
0.2795134484767914,
0.08014900237321854,
0.27220627665519714,
0.3179301917552948,
0.10324826091527939,
0.5430008172988892,
0.2702878713607788,
-0.11547411978244781,
0.11195165663957596,
0.4107098877429962,
-0.10571785271167755,
-0.058256082236766815,
-0.019388390704989433,
0.2288176417350769,
0.2564590573310852,
0.22517064213752747,
-0.13394178450107574,
-0.20510023832321167,
0.09734829515218735,
-0.2735077142715454,
0.2104550451040268,
-0.2178778201341629,
0.15188883244991302,
-0.22787700593471527,
0.056893106549978256,
-0.176864355802536,
-0.43198162317276,
0.3245595693588257,
-0.22393395006656647,
0.6598069071769714,
0.1977233737707138,
-0.00012157022865721956,
0.12187885493040085,
0.3807430863380432,
-0.15951009094715118,
-0.25136780738830566,
0.11509944498538971,
0.07641706615686417,
0.027224114164710045,
0.21321357786655426,
-0.07267852872610092,
0.006099788937717676,
-0.60956209897995,
0.053328752517700195,
-0.179419606924057,
0.24127569794654846,
0.024558817967772484,
0.11260125041007996,
0.057679466903209686,
0.042205143719911575,
-0.37552666664123535,
0.09923268109560013,
-0.3127260208129883,
-0.06819196045398712,
0.28482112288475037,
-0.0071601965464651585,
0.002301085740327835,
0.006348287221044302,
0.35736283659935,
-0.02006934955716133,
0.01934049464762211,
0.40046218037605286,
0.22847646474838257,
0.3043685853481293,
-0.10442670434713364,
0.15673664212226868,
0.17006196081638336,
0.31592169404029846,
-0.15487755835056305,
-0.3962079584598541,
-0.12166702002286911,
0.19430692493915558,
-0.12639954686164856,
0.19703765213489532,
-0.3063466250896454,
0.02351357974112034,
0.3119216561317444,
0.3952241837978363,
-0.19003736972808838,
0.11773975938558578,
0.08200884610414505,
-0.0645466223359108,
-0.051381900906562805,
-0.21085520088672638,
0.0240795761346817,
0.19028018414974213,
-0.08653070777654648,
-0.2820090055465698,
-0.15597328543663025,
0.07476291805505753,
0.08232700824737549,
-0.35040947794914246,
0.16805097460746765,
0.20654480159282684,
0.020944098010659218,
-0.07232416421175003,
-0.02485913410782814,
-0.20643164217472076,
0.01526011060923338,
0.15694217383861542,
0.3611032962799072,
-0.2030467540025711,
-0.01781097613275051,
0.04489067569375038,
0.019162192940711975,
0.10140622407197952,
0.2769637703895569,
-0.001017570961266756,
-0.2169070690870285,
-0.11316918581724167,
-0.15016528964042664,
-0.4902270436286926,
-0.3367261290550232,
-0.041440337896347046,
-0.3489937484264374,
-0.47869569063186646,
0.3067212700843811,
-0.45527318120002747,
-0.1304345428943634,
0.018646134063601494,
0.6528444290161133,
0.18601402640342712,
-0.25719109177589417,
0.2522355318069458,
0.32968178391456604,
-0.3448682725429535,
0.22038933634757996,
-0.1981094926595688,
0.1131349503993988,
-0.11607952415943146,
0.41278597712516785,
0.10975611954927444,
-0.4600396156311035,
0.175447478890419,
0.01208527758717537,
0.22217988967895508,
0.08428318798542023,
-0.34303390979766846,
-0.03079094924032688,
0.3162077069282532,
0.29776960611343384,
-0.06580428034067154,
0.07196753472089767,
0.37832918763160706,
-0.32620611786842346,
-0.22400645911693573,
0.0465690940618515,
-0.12611716985702515,
-0.11553005129098892,
-0.1683066487312317,
0.11499923467636108,
-0.044719621539115906,
-0.06951585412025452,
0.23598091304302216,
0.09916059672832489,
0.14315764605998993,
-0.26346156001091003,
0.08151625096797943,
0.039304886013269424,
-0.18172316253185272,
-0.17815250158309937,
0.4668322801589966,
0.4261370003223419,
-0.7533144354820251,
-0.35830727219581604,
0.1044602021574974,
0.224639892578125,
-0.1304665207862854,
0.2801527678966522,
-0.13365556299686432,
0.05120418965816498,
-0.2663241922855377,
0.4776732325553894,
0.16053630411624908,
-0.1500927358865738,
-0.21011501550674438,
0.11528708040714264,
0.10371846705675125,
0.016355253756046295,
0.190667986869812,
-0.15384358167648315,
0.33974024653434753,
0.11711208522319794,
0.337292343378067,
-0.02421325072646141,
0.036470361053943634,
-0.3472738265991211,
-0.25519677996635437,
-0.3373102843761444,
0.08232652395963669,
0.0959319993853569,
-0.05802910029888153,
-0.11279766261577606,
-0.10977780073881149,
-0.3149943947792053,
0.1116442009806633,
-0.21942834556102753,
-0.06899134069681168,
0.13419802486896515,
0.2931421399116516,
0.39780867099761963,
0.45099151134490967,
0.06530415266752243,
-0.07931531965732574,
0.26044031977653503,
0.028583955019712448,
0.060843612998723984,
-0.18461327254772186,
-0.10177172720432281,
-0.282864511013031,
0.047787196934223175,
-0.1088208481669426,
-0.21916650235652924,
-0.028245026245713234,
-0.0028133385349065065,
-0.05790245532989502,
0.05746203288435936,
-0.31441909074783325,
0.10719037055969238,
-0.20376241207122803,
0.15304744243621826,
-0.4385947287082672,
0.46634089946746826,
-0.3173552453517914,
-0.2310289889574051,
0.04600241780281067,
0.2543332576751709,
0.17450113594532013,
-0.1636391580104828,
0.12952573597431183,
0.10269736498594284,
-0.05661939084529877,
-0.26187318563461304,
0.1746409386396408,
-0.1655096858739853,
0.142762690782547,
-0.22919057309627533,
0.08322961628437042,
-0.041944295167922974,
0.20455212891101837,
0.11576402932405472,
-0.22818516194820404,
0.4575839340686798,
0.05205976963043213,
0.2677699029445648,
-0.1473606377840042,
-0.22050374746322632,
0.1386888176202774,
0.029801899567246437,
-0.0034483231138437986,
-0.3238335847854614,
-0.10255736112594604,
0.037752144038677216,
-0.11645340919494629,
-0.06538473069667816,
0.018121520057320595,
0.19225607812404633,
0.019890081137418747,
0.031670406460762024,
-0.10305505245923996,
0.08113818615674973,
-0.25992825627326965,
0.025388339534401894,
0.09230579435825348,
-0.4249448776245117,
0.3604761064052582,
0.2861747145652771,
-0.13271459937095642,
-0.2303943634033203,
-0.2657187879085541,
-0.2874983549118042,
0.0673752948641777,
-0.08044181019067764,
-0.22731280326843262,
0.12740160524845123,
-0.0742553323507309,
0.08627095818519592,
-0.22239293158054352,
-0.04405159130692482,
0.012266875244677067,
0.1490369737148285,
-0.5887733697891235,
0.1396595686674118,
-0.38800281286239624,
-0.09424638748168945,
0.029118429869413376,
-0.13836416602134705,
-0.0869029089808464,
-0.3894467055797577,
0.2312362939119339,
-0.18681377172470093,
-0.05425768345594406,
0.23514825105667114,
-0.08085557073354721,
0.18291036784648895,
0.01586742140352726,
-0.009838325902819633,
-0.16900357604026794,
-0.16157105565071106,
-0.36486688256263733,
-0.08544263988733292,
-0.024151964113116264,
0.297039270401001,
0.23584432899951935,
-0.03164590895175934,
-0.12092918157577515,
-0.13398733735084534,
-0.35244014859199524,
0.27625685930252075,
-0.14326460659503937,
0.12914817035198212,
-0.1065499484539032,
0.07737097889184952,
-0.1703571230173111,
-0.17098361253738403,
0.31471407413482666,
-0.022214343771338463,
-0.197548508644104,
-0.014908635057508945,
0.12426102161407471,
0.035561446100473404,
-0.06515350192785263,
-0.3328301012516022,
0.10470739752054214,
-0.2776852548122406,
-0.11367104947566986,
-0.18865928053855896,
-0.053594693541526794,
-0.30467501282691956,
0.3891739845275879,
0.1195937842130661,
-0.10833172500133514,
0.09647055715322495,
-0.29303133487701416,
0.1472291648387909,
0.3678102195262909,
-0.10097198188304901,
-0.29944077134132385,
0.18631429970264435,
0.028902266174554825,
-0.21744553744792938,
-0.043900445103645325,
-0.3964250385761261,
-0.4838356673717499,
-0.026264090090990067,
0.22400014102458954,
0.20831763744354248,
0.3773667812347412,
0.1585731953382492,
-0.08787543326616287,
-0.08576837927103043,
-0.09887877106666565,
-0.35161808133125305,
0.08676175028085709,
-0.18403339385986328,
0.16073162853717804,
-0.1917373687028885,
0.5027087330818176,
-0.2363254427909851,
0.44152048230171204,
0.47348466515541077,
-0.313849538564682,
0.43598100543022156,
-0.056027598679065704,
0.5026711225509644,
-0.2558842599391937,
-0.16060006618499756,
0.12896744906902313,
0.041561998426914215,
-0.015302512794733047,
0.23191238939762115,
-0.06993439048528671,
0.13131669163703918,
0.07958380877971649,
0.24801982939243317,
-0.08464426547288895,
-0.28263553977012634,
0.11312291771173477,
0.027945758774876595,
0.004901120439171791,
-0.08292484283447266,
0.2915314733982086,
-0.0784447193145752,
0.1364879608154297,
0.2619972229003906,
0.49949440360069275,
0.374680757522583,
-0.05959772691130638,
0.39227908849716187,
-0.2716048061847687,
-0.29883265495300293,
0.540686309337616,
0.07666893303394318,
0.2704480290412903,
-0.23162689805030823,
-0.13291044533252716,
0.3817063868045807,
0.11871708184480667,
0.4669494926929474,
-0.3202119767665863,
-0.2769588828086853,
0.36230379343032837,
0.21574720740318298,
-0.35391178727149963,
-0.1602836698293686,
-0.042199037969112396,
-0.0649765357375145,
-0.04565991088747978,
0.6810318827629089,
-0.44880953431129456,
-0.0919196829199791,
0.2719631791114807,
0.04849434643983841,
-0.19177532196044922,
-0.42965996265411377,
-0.4913121461868286,
-0.20999804139137268,
-0.4370388984680176,
-0.07126688212156296,
-0.08320913463830948,
0.28824582695961,
0.06757616251707077,
0.2692580223083496,
-0.06398657709360123,
0.02113502100110054,
0.17592650651931763,
0.29881542921066284,
0.08544528484344482,
0.055400192737579346,
0.22257858514785767,
0.3516511619091034,
0.4493594467639923,
0.3105459213256836,
0.3761473000049591,
-0.09229930490255356,
-0.3685179352760315,
0.19497846066951752,
0.12154834717512131,
0.13476227223873138,
0.3488333821296692,
-0.05989224836230278,
0.31283295154571533,
-0.14109429717063904,
0.13426701724529266,
-0.25919097661972046,
-0.310554563999176,
0.07688929885625839,
0.05827222391963005,
0.043759774416685104,
-0.20969581604003906,
0.5280880331993103,
-0.01768258400261402,
-0.10884223878383636,
-0.10193239152431488,
0.7750857472419739,
-0.0008796608890406787,
0.8857616782188416,
0.056503452360630035,
0.909035861492157,
-0.17131681740283966,
0.0234892088919878,
0.44638147950172424,
-0.18763069808483124,
0.4825913608074188,
-0.1951453536748886,
0.04261310026049614,
-0.43739256262779236,
-0.25198832154273987,
-0.05661400035023689,
0.004872055724263191,
0.16581101715564728,
-0.0841318890452385,
-0.357144296169281,
0.10297711938619614,
-0.04961544647812843,
-0.16446121037006378,
-0.0859975591301918,
-0.0637868270277977,
-0.0010357308201491833,
-0.37926149368286133,
-0.30390065908432007,
0.0290282741189003,
0.482296884059906,
0.36954230070114136,
0.022044168785214424,
-0.07903243601322174,
-0.2914414703845978,
0.006443065125495195,
-0.3014765977859497,
0.040912359952926636,
0.2598641812801361,
0.15976373851299286,
0.3091946840286255,
-0.16461312770843506,
0.24547964334487915,
0.035960301756858826,
0.6067773699760437,
-0.3963736295700073,
-0.22782717645168304,
0.06608572602272034,
-0.2978227436542511,
-0.23671410977840424,
-0.09107329696416855,
-0.32103070616722107,
0.3530057966709137,
0.21641336381435394,
-0.3930777609348297,
0.24555876851081848,
0.12775632739067078,
-0.16995207965373993,
-0.19087393581867218,
0.17982366681098938,
-0.10010890662670135,
-0.362191379070282,
-0.07925151288509369,
-0.08531530946493149,
0.24354781210422516,
-0.0945238545536995,
0.07483956962823868,
0.17136205732822418,
-0.019291622564196587,
0.13981696963310242,
0.12925508618354797,
-0.13242609798908234,
0.006368463393300772,
0.5463545918464661,
-0.26051729917526245,
0.13050426542758942,
0.32125282287597656,
0.15464115142822266,
-0.4956636130809784,
-0.03223566710948944,
-0.5321471095085144,
0.4935277998447418,
-0.3097326457500458,
-0.17656998336315155,
0.22866757214069366,
-0.1850273162126541,
-0.0002233952545793727,
0.03565599396824837,
0.4112839698791504,
-0.30130645632743835,
-0.29879599809646606,
-0.2700883448123932,
-0.09514724463224411,
0.43404117226600647,
-0.0944090411067009,
0.15650364756584167,
-0.08192308992147446,
0.07990212738513947,
-0.10405702888965607,
0.04196228086948395,
-0.2391066700220108,
0.15090619027614594,
-0.12278814613819122,
0.037888053804636,
-0.17882861196994781,
-0.21388140320777893,
0.020579950883984566,
-0.1755603700876236,
0.016847945749759674,
0.17163793742656708,
-0.0522172711789608,
-0.042493563145399094,
0.011464391835033894,
0.17594623565673828,
0.02684413641691208,
0.09678073972463608,
-0.38266146183013916,
-0.0819118469953537,
-0.06489748507738113,
-0.3780137896537781,
0.30313101410865784,
0.19706156849861145,
-0.07791723310947418,
-0.11886611580848694,
0.015341652557253838,
0.030786558985710144,
0.06248927116394043,
0.25312182307243347,
0.18423038721084595,
0.5281661748886108,
0.24601873755455017,
-0.1327630579471588,
-0.5212600827217102,
0.12348851561546326,
0.07253625243902206,
0.4531131088733673,
0.14549854397773743,
-0.06404584646224976,
0.37157684564590454,
-0.33486586809158325,
-0.03544582426548004,
-0.06358138471841812,
0.281999796628952,
0.3686337172985077,
-0.11746957153081894,
0.03124338388442993,
0.17433039844036102,
0.06965313851833344,
-0.244689479470253,
0.06746375560760498,
0.3783983886241913,
-0.12763983011245728,
0.021246444433927536,
0.25951167941093445,
0.19606906175613403,
0.12451039999723434,
-0.17767836153507233,
0.09349197149276733,
0.14377261698246002,
0.18012630939483643,
-0.42037999629974365,
0.014665283262729645,
0.059392090886831284,
0.2737785577774048,
0.3931554853916168,
0.18469847738742828,
0.4034121334552765,
0.0729813277721405,
-0.12661661207675934,
0.07672630250453949,
0.004841732792556286,
0.3915558159351349,
-0.20590123534202576,
-0.6314293742179871,
0.47307300567626953,
0.24343687295913696,
0.5203185081481934,
-0.30032721161842346,
-0.027321424335241318,
0.2113480418920517,
0.015867043286561966,
0.0019211566541343927,
-0.14044694602489471,
0.008724670857191086,
-0.17970235645771027,
-0.42284470796585083,
0.26030752062797546,
-0.013575393706560135,
-0.25005781650543213,
-0.10145353525876999,
0.05563583970069885,
-0.13754291832447052,
-0.12219960987567902,
-0.09836644679307938,
-0.27382364869117737,
-0.13516554236412048,
-0.2959297299385071,
0.3009167015552521,
0.2911668121814728,
0.04079738259315491,
-0.025355923920869827,
-0.04205454885959625,
0.007270293775945902,
0.3467198312282562,
0.048500582575798035,
0.5328800678253174,
0.14213970303535461,
-0.10488172620534897,
0.0760594829916954,
0.06317327171564102,
0.05899390950798988,
0.00003605926758609712,
0.13441620767116547,
-0.16734693944454193,
0.218189999461174,
0.3409718871116638,
0.06370183825492859,
-0.13141553103923798,
-0.3197767734527588,
-0.05049708113074303,
0.5998360514640808,
0.1000029593706131,
-0.16187702119350433,
-0.3587874472141266,
0.10461120307445526,
-0.06218958646059036,
0.021511739119887352,
-0.2632645070552826,
0.28260278701782227,
0.11950474232435226,
-0.14053532481193542,
0.08468208461999893,
0.28743666410446167,
0.03859058395028114,
-0.1772705763578415,
0.3113381266593933,
0.8044189214706421,
-0.07803373783826828,
-0.2670661211013794,
0.12880809605121613,
-0.5427352786064148,
0.2680162191390991,
-0.18297697603702545,
-0.18503481149673462,
0.2906182110309601,
0.6496260762214661,
0.4190312325954437,
-0.03230676054954529,
0.07213114202022552,
-0.11047174781560898,
0.3419908285140991,
0.4437321722507477,
0.021263737231492996,
-0.3350871801376343,
-0.16642223298549652,
-0.2112397700548172,
-0.13984423875808716,
-0.06455466896295547,
0.13040737807750702,
-0.06124436482787132,
-0.012106657959520817,
0.03484547138214111,
0.10608703643083572,
-0.0949871763586998,
-0.34371089935302734,
0.6024433374404907,
0.03808657079935074,
0.3508705496788025,
-0.16024264693260193,
-0.044802479445934296,
-0.17961814999580383,
-0.11768197268247604,
0.03824390843510628,
0.23024213314056396,
-0.21099622547626495,
0.163653165102005,
-0.1435656100511551,
-0.31418153643608093,
-0.26847466826438904,
0.2933228313922882,
0.09347735345363617,
-0.281721293926239,
-0.17171810567378998,
0.14325928688049316,
-0.20024868845939636,
0.03347446396946907,
-0.027098437771201134,
0.07889395207166672,
-0.03356679156422615,
0.33099913597106934,
0.07544208317995071,
-0.29627078771591187,
0.6966264247894287,
-0.3728349804878235,
0.07053182274103165,
0.20385167002677917,
0.2360532432794571,
0.5011436343193054,
0.03288130462169647,
-0.8710229396820068,
-0.006415088661015034,
0.0906476154923439,
-0.07195483148097992,
-0.27403324842453003,
-0.05546482652425766,
0.1980946660041809,
0.03844509273767471,
-0.2326391488313675,
-0.08695077896118164,
-0.0006064811022952199,
0.11367872357368469,
-0.04630861058831215,
-0.2873270511627197
] |
https://github.com/huggingface/datasets/issues/2029
|
Loading a faiss index KeyError
|
Hi !
The code of the example is valid.
An index is a search engine, it's not considered a column of a dataset.
When you do `ds.load_faiss_index("embeddings", 'my_index.faiss')`, it attaches an index named "embeddings" to the dataset but it doesn't re-add the "embeddings" column. You can list the indexes of a dataset by using `ds.list_indexes()`.
If I understand correctly by reading this example you thought that it was re-adding the "embeddings" column.
This looks misleading indeed, and we should add a note to make it more explicit that it doesn't store the column that was used to build the index.
Feel free to open a PR to suggest an improvement on the documentation if you want to contribute :)
|
I've recently been testing out RAG and DPR embeddings, and I've run into an issue that is not apparent in the documentation.
The basic steps are:
1. Create a dataset (dataset1)
2. Create an embeddings column using DPR
3. Add a faiss index to the dataset
4. Save faiss index to a file
5. Create a new dataset (dataset2) with the same text and label information as dataset1
6. Try to load the faiss index from file to dataset2
7. Get `KeyError: "Column embeddings not in the dataset"`
I've made a colab notebook that should show exactly what I did. Please switch to GPU runtime; I didn't check on CPU.
https://colab.research.google.com/drive/1X0S9ZuZ8k0ybcoei4w7so6dS_WrABmIx?usp=sharing
Ubuntu Version
VERSION="18.04.5 LTS (Bionic Beaver)"
datasets==1.4.1
faiss==1.5.3
faiss-gpu==1.7.0
torch==1.8.0+cu101
transformers==4.3.3
NVIDIA-SMI 460.56
Driver Version: 460.32.03
CUDA Version: 11.2
Tesla K80
I was basically following the steps here: https://huggingface.co/docs/datasets/faiss_and_ea.html#adding-a-faiss-index
I included the exact code from the documentation at the end of the notebook to show that they don't work either.
| 119
|
Loading a faiss index KeyError
I've recently been testing out RAG and DPR embeddings, and I've run into an issue that is not apparent in the documentation.
The basic steps are:
1. Create a dataset (dataset1)
2. Create an embeddings column using DPR
3. Add a faiss index to the dataset
4. Save faiss index to a file
5. Create a new dataset (dataset2) with the same text and label information as dataset1
6. Try to load the faiss index from file to dataset2
7. Get `KeyError: "Column embeddings not in the dataset"`
I've made a colab notebook that should show exactly what I did. Please switch to GPU runtime; I didn't check on CPU.
https://colab.research.google.com/drive/1X0S9ZuZ8k0ybcoei4w7so6dS_WrABmIx?usp=sharing
Ubuntu Version
VERSION="18.04.5 LTS (Bionic Beaver)"
datasets==1.4.1
faiss==1.5.3
faiss-gpu==1.7.0
torch==1.8.0+cu101
transformers==4.3.3
NVIDIA-SMI 460.56
Driver Version: 460.32.03
CUDA Version: 11.2
Tesla K80
I was basically following the steps here: https://huggingface.co/docs/datasets/faiss_and_ea.html#adding-a-faiss-index
I included the exact code from the documentation at the end of the notebook to show that they don't work either.
Hi !
The code of the example is valid.
An index is a search engine, it's not considered a column of a dataset.
When you do `ds.load_faiss_index("embeddings", 'my_index.faiss')`, it attaches an index named "embeddings" to the dataset but it doesn't re-add the "embeddings" column. You can list the indexes of a dataset by using `ds.list_indexes()`.
If I understand correctly by reading this example you thought that it was re-adding the "embeddings" column.
This looks misleading indeed, and we should add a note to make it more explicit that it doesn't store the column that was used to build the index.
Feel free to open a PR to suggest an improvement on the documentation if you want to contribute :)
|
[
0.13970786333084106,
-0.5335456728935242,
0.051471393555402756,
0.31969815492630005,
0.12647362053394318,
0.27505627274513245,
0.4119958281517029,
-0.04047825559973717,
0.6586285829544067,
0.20735472440719604,
-0.062414199113845825,
0.1538594663143158,
0.38660573959350586,
-0.04890061169862747,
0.013030258938670158,
-0.01736125349998474,
0.30340293049812317,
0.2208624929189682,
0.24146080017089844,
-0.15659812092781067,
-0.18136973679065704,
0.07171767204999924,
-0.27705028653144836,
0.11127299815416336,
-0.19683198630809784,
0.17544299364089966,
-0.2499140501022339,
-0.032796286046504974,
-0.2255379855632782,
-0.3927153944969177,
0.32989418506622314,
-0.24550427496433258,
0.6396087408065796,
0.19093172252178192,
-0.00012441030412446707,
0.113666832447052,
0.38217753171920776,
-0.13723792135715485,
-0.25953802466392517,
0.12433896958827972,
-0.04079248011112213,
0.028388611972332,
0.22597303986549377,
-0.07417555153369904,
0.044399239122867584,
-0.6045318245887756,
0.03061801567673683,
-0.2664100229740143,
0.20416736602783203,
0.0784027948975563,
0.08112339675426483,
0.0266718827188015,
0.05949370935559273,
-0.3501582443714142,
0.14530663192272186,
-0.29446953535079956,
-0.10723968595266342,
0.27233776450157166,
0.03636642172932625,
0.05917983129620552,
0.09677064418792725,
0.22348366677761078,
-0.02970086596906185,
-0.004461229313164949,
0.3816761076450348,
0.320675790309906,
0.32335200905799866,
-0.14994128048419952,
0.18329724669456482,
0.13964374363422394,
0.4778421223163605,
-0.08671443164348602,
-0.3786839544773102,
-0.12745805084705353,
0.21332211792469025,
-0.1693475991487503,
0.1781805455684662,
-0.30183419585227966,
0.049487460404634476,
0.28333842754364014,
0.394721120595932,
-0.23051750659942627,
0.17291881144046783,
0.111018106341362,
-0.10586409270763397,
0.029613154008984566,
-0.2333698272705078,
0.08126936107873917,
0.12547871470451355,
-0.08155497163534164,
-0.2309120148420334,
-0.11102153360843658,
0.120383620262146,
0.11445918679237366,
-0.3478143811225891,
0.22444738447666168,
0.21049919724464417,
0.019231494516134262,
-0.11707387864589691,
0.035504940897226334,
-0.11751287430524826,
0.04515202343463898,
0.08257146924734116,
0.3602951169013977,
-0.16128002107143402,
0.042595066130161285,
0.0905507430434227,
-0.0014764165971428156,
0.031570978462696075,
0.20606309175491333,
0.03466910496354103,
-0.23547275364398956,
-0.1273183375597,
-0.05116510018706322,
-0.4601163864135742,
-0.39723965525627136,
-0.022084258496761322,
-0.2939673662185669,
-0.46825581789016724,
0.3269698917865753,
-0.3949016034603119,
-0.14955107867717743,
0.0359078124165535,
0.6100534796714783,
0.24236471951007843,
-0.2410045713186264,
0.25742024183273315,
0.3329063355922699,
-0.24940764904022217,
0.2505553364753723,
-0.21557915210723877,
0.10016126930713654,
-0.1791628897190094,
0.4160982370376587,
0.08831668645143509,
-0.43629828095436096,
0.2058907151222229,
-0.015685247257351875,
0.11531803011894226,
0.016085561364889145,
-0.4422794580459595,
-0.010799664072692394,
0.3289079964160919,
0.3100947439670563,
-0.11815432459115982,
0.06469913572072983,
0.2906969487667084,
-0.39395108819007874,
-0.17814409732818604,
0.08676418662071228,
-0.11326071619987488,
-0.024349981918931007,
-0.19088681042194366,
0.07114719599485397,
-0.11139890551567078,
-0.13815434277057648,
0.20290952920913696,
0.1236758679151535,
0.15408018231391907,
-0.26102280616760254,
0.10423678904771805,
0.032444197684526443,
-0.16945049166679382,
-0.18805131316184998,
0.5441304445266724,
0.3905656635761261,
-0.7543736696243286,
-0.35465624928474426,
0.021023128181695938,
0.1953679323196411,
-0.08983239531517029,
0.20882487297058105,
-0.07030344754457474,
0.1384417563676834,
-0.2801351249217987,
0.43640342354774475,
0.2500106692314148,
-0.02992735616862774,
-0.136725515127182,
-0.027881870046257973,
0.08228377252817154,
0.011289806105196476,
0.14624029397964478,
-0.04641091823577881,
0.3089679181575775,
0.23037484288215637,
0.28614866733551025,
0.006139147095382214,
0.059796493500471115,
-0.3615944981575012,
-0.19483840465545654,
-0.27271807193756104,
0.11601187288761139,
0.08043087273836136,
-0.03724269941449165,
-0.028009165078401566,
-0.09629333764314651,
-0.36188027262687683,
0.06445062160491943,
-0.1609582006931305,
-0.047905199229717255,
0.05180799216032028,
0.31995663046836853,
0.42494693398475647,
0.4439716339111328,
0.06355396658182144,
-0.14283713698387146,
0.2731238603591919,
0.16685666143894196,
0.00247644423507154,
-0.19464044272899628,
-0.04104709252715111,
-0.3104977607727051,
0.10023582726716995,
-0.08617175370454788,
-0.19012705981731415,
-0.093602754175663,
0.043404847383499146,
-0.03930339589715004,
0.03485738858580589,
-0.3543607294559479,
0.0917697474360466,
-0.13899311423301697,
0.18693126738071442,
-0.46183088421821594,
0.4687992036342621,
-0.24467280507087708,
-0.2399791181087494,
-0.06605641543865204,
0.29288768768310547,
0.0953238308429718,
-0.2305019348859787,
0.1591462939977646,
0.11849060654640198,
0.015008135698735714,
-0.2839362323284149,
0.17430171370506287,
-0.17552562057971954,
0.15072256326675415,
-0.2129494845867157,
0.10873384773731232,
-0.06528947502374649,
0.25667625665664673,
0.06909541040658951,
-0.23927418887615204,
0.4237161874771118,
0.01811792515218258,
0.29577797651290894,
-0.1987946778535843,
-0.21147842705249786,
0.1270294189453125,
0.041851289570331573,
-0.05457298085093498,
-0.3016963005065918,
-0.18672528862953186,
-0.02595113404095173,
-0.12244896590709686,
-0.0458274781703949,
0.0013797510182484984,
0.1479823738336563,
-0.03177347034215927,
0.05332549661397934,
-0.07620534300804138,
0.04678402841091156,
-0.35940346121788025,
0.0175264123827219,
0.06330156326293945,
-0.40149950981140137,
0.40998759865760803,
0.2676880657672882,
-0.04248359426856041,
-0.2847330868244171,
-0.15804100036621094,
-0.2927660644054413,
0.03624895215034485,
-0.037261467427015305,
-0.23390032351016998,
0.13301894068717957,
-0.05644923821091652,
0.024952534586191177,
-0.2709626257419586,
0.03848881274461746,
0.10107475519180298,
0.1226186454296112,
-0.555382490158081,
0.09186024963855743,
-0.32174092531204224,
-0.022808481007814407,
0.024796031415462494,
-0.10728058218955994,
-0.04404246062040329,
-0.3912595808506012,
0.1531030386686325,
-0.11462333053350449,
-0.01693396456539631,
0.21432438492774963,
-0.06199882552027702,
0.21817024052143097,
-0.02472018264234066,
-0.04014451801776886,
-0.18765287101268768,
-0.21245500445365906,
-0.30345869064331055,
-0.09880777448415756,
-0.0032454298343509436,
0.2954046130180359,
0.2241869419813156,
-0.02026682160794735,
-0.07088197767734528,
-0.16172179579734802,
-0.3294927477836609,
0.256000280380249,
-0.16733498871326447,
0.13258931040763855,
-0.1251005083322525,
0.11967203766107559,
-0.19699151813983917,
-0.1260322779417038,
0.2635347247123718,
-0.04873977228999138,
-0.17949263751506805,
-0.053756605833768845,
0.18226516246795654,
0.024911684915423393,
-0.10082297772169113,
-0.4248008131980896,
0.13421326875686646,
-0.1854071468114853,
-0.0751742273569107,
-0.16832520067691803,
-0.0700717344880104,
-0.2950831949710846,
0.3934321403503418,
0.12326295673847198,
-0.08229871094226837,
0.08145897835493088,
-0.36216455698013306,
0.14329461753368378,
0.35592713952064514,
-0.05116509646177292,
-0.3062046766281128,
0.2269732803106308,
-0.0238692257553339,
-0.2126525193452835,
-0.023243360221385956,
-0.30016493797302246,
-0.4479030966758728,
0.024727046489715576,
0.1486494094133377,
0.30763813853263855,
0.41441991925239563,
0.19592373073101044,
-0.12592607736587524,
-0.03822259232401848,
-0.12480176985263824,
-0.42076098918914795,
0.12425237149000168,
-0.011737139895558357,
0.1973402053117752,
-0.09833177924156189,
0.5074977874755859,
-0.3051089346408844,
0.4946763217449188,
0.3491694927215576,
-0.40386325120925903,
0.4498752951622009,
-0.1538049280643463,
0.5353220701217651,
-0.22702814638614655,
-0.18764746189117432,
0.09773100912570953,
0.09771297872066498,
-0.07425662130117416,
0.22915643453598022,
-0.07714679837226868,
0.10777895897626877,
0.07862512022256851,
0.3998541235923767,
-0.15349899232387543,
-0.23505935072898865,
0.09338144958019257,
0.04169979318976402,
-0.004332593642175198,
-0.09674803912639618,
0.2947266101837158,
-0.09905830770730972,
0.14029814302921295,
0.1448270082473755,
0.4661462903022766,
0.41058892011642456,
-0.11447285115718842,
0.36407360434532166,
-0.27890193462371826,
-0.3221742510795593,
0.5076090693473816,
-0.009489194490015507,
0.31124618649482727,
-0.1909676194190979,
-0.22576306760311127,
0.427091509103775,
0.1622132509946823,
0.5094699263572693,
-0.3713759779930115,
-0.3883597254753113,
0.33263006806373596,
0.2954972982406616,
-0.36318835616111755,
-0.15254122018814087,
-0.027386710047721863,
-0.021593041718006134,
-0.03700214996933937,
0.6526851058006287,
-0.4228720963001251,
-0.0011686073848977685,
0.24165968596935272,
0.08184235543012619,
-0.20179976522922516,
-0.38222256302833557,
-0.5365287661552429,
-0.2004130482673645,
-0.3691929578781128,
-0.05371985211968422,
-0.117436483502388,
0.31326282024383545,
0.16939249634742737,
0.17669416964054108,
-0.09361791610717773,
-0.06188909336924553,
0.19373725354671478,
0.30946266651153564,
0.08490951359272003,
0.18151037395000458,
0.22773201763629913,
0.3715895414352417,
0.48763003945350647,
0.2552192509174347,
0.3997562825679779,
-0.1900372952222824,
-0.2439509481191635,
0.18601833283901215,
0.025717655196785927,
0.21177427470684052,
0.2899096608161926,
-0.0330045260488987,
0.2036445587873459,
-0.1958998739719391,
0.06492577493190765,
-0.22016578912734985,
-0.2590916156768799,
0.14629170298576355,
0.09349191188812256,
0.004181505646556616,
-0.29145458340644836,
0.5448601245880127,
-0.017598120495676994,
-0.22072617709636688,
-0.16301745176315308,
0.7354044318199158,
-0.05294780805706978,
0.8978899717330933,
-0.0028402148745954037,
0.9030036330223083,
-0.2579963803291321,
-0.056095462292432785,
0.41464710235595703,
-0.08457908779382706,
0.5710955858230591,
-0.1455385535955429,
0.07414917647838593,
-0.41898563504219055,
-0.2335904985666275,
-0.08286312967538834,
-0.05230998247861862,
0.18024268746376038,
-0.10725151747465134,
-0.2900484800338745,
0.08747389167547226,
-0.0836210623383522,
-0.1342565268278122,
-0.08750080317258835,
-0.07320353388786316,
0.1548389047384262,
-0.3399551212787628,
-0.20966127514839172,
0.011137840338051319,
0.4751353859901428,
0.37162303924560547,
0.000449377519544214,
-0.004981917794793844,
-0.3148494064807892,
-0.020830508321523666,
-0.29482126235961914,
0.025919921696186066,
0.30433908104896545,
0.14374661445617676,
0.30110490322113037,
-0.2468365579843521,
0.20286644995212555,
0.13603854179382324,
0.5763696432113647,
-0.4888341724872589,
-0.1904982179403305,
0.11825358122587204,
-0.3001483976840973,
-0.22964957356452942,
-0.15868239104747772,
-0.3349229693412781,
0.2959027886390686,
0.3055287301540375,
-0.3957156836986542,
0.21168304979801178,
0.13475094735622406,
-0.2160881906747818,
-0.181022047996521,
0.20220863819122314,
-0.034885235130786896,
-0.40233778953552246,
-0.11476309597492218,
0.008067958056926727,
0.2858682870864868,
-0.0976252481341362,
0.04075618088245392,
0.16612710058689117,
-0.03704991564154625,
0.20139338076114655,
0.14747421443462372,
-0.14115513861179352,
-0.005466933362185955,
0.571030855178833,
-0.2033814787864685,
0.17250467836856842,
0.2977311611175537,
0.1402340978384018,
-0.43582913279533386,
-0.03534264862537384,
-0.5515812039375305,
0.5049022436141968,
-0.26441314816474915,
-0.20701776444911957,
0.2630946934223175,
-0.17694653570652008,
0.05232184752821922,
0.021085256710648537,
0.3146515190601349,
-0.25097256898880005,
-0.3915973901748657,
-0.27117055654525757,
-0.047690171748399734,
0.4246586859226227,
-0.08915900439023972,
0.18838369846343994,
-0.1719495803117752,
0.00017682208272162825,
-0.09201578795909882,
0.013145814649760723,
-0.19611698389053345,
0.16572429239749908,
-0.07582729309797287,
0.10750260204076767,
-0.029734697192907333,
-0.17648692429065704,
0.007622974459081888,
-0.3154182434082031,
0.01218460313975811,
0.08215884119272232,
0.02006775140762329,
-0.017369449138641357,
0.055853649973869324,
0.18419352173805237,
0.08154813945293427,
0.15430589020252228,
-0.46903756260871887,
-0.03691696375608444,
-0.056625399738550186,
-0.4456322491168976,
0.326277494430542,
0.14440181851387024,
-0.1596529483795166,
-0.1317911595106125,
0.03734998777508736,
0.1413358449935913,
0.047460298985242844,
0.2125561237335205,
0.13606855273246765,
0.516484797000885,
0.23257920145988464,
-0.13561254739761353,
-0.4268547296524048,
0.155196875333786,
0.08980018645524979,
0.42542001605033875,
0.16615928709506989,
-0.14813672006130219,
0.3840102553367615,
-0.30688363313674927,
0.01126804482191801,
-0.01353452168405056,
0.21346010267734528,
0.45607465505599976,
-0.06282937526702881,
0.07916554808616638,
0.19103537499904633,
0.04117802903056145,
-0.19625476002693176,
0.08363277465105057,
0.395475834608078,
-0.10426508635282516,
0.01510643120855093,
0.2821965217590332,
0.21611188352108002,
0.15743842720985413,
-0.23133079707622528,
0.046725403517484665,
0.16956281661987305,
0.2741906940937042,
-0.3947870135307312,
-0.003168302122503519,
0.07394690066576004,
0.27835506200790405,
0.44036319851875305,
0.17064842581748962,
0.3151625394821167,
0.1510324329137802,
-0.16431240737438202,
0.10359685868024826,
0.03899110481142998,
0.4055023491382599,
-0.1853334754705429,
-0.579870879650116,
0.5499576926231384,
0.2564825415611267,
0.4967404901981354,
-0.278512179851532,
0.027635885402560234,
0.21316319704055786,
0.007769148331135511,
-0.011287443339824677,
-0.2104988694190979,
0.037028152495622635,
-0.14640246331691742,
-0.443144291639328,
0.2175282984972,
-0.044386621564626694,
-0.23701930046081543,
-0.10080034285783768,
0.02985183335840702,
-0.19731612503528595,
-0.10290893912315369,
-0.16728420555591583,
-0.30349719524383545,
-0.16123822331428528,
-0.33518755435943604,
0.2984619140625,
0.22374920547008514,
0.06942339986562729,
-0.051012612879276276,
-0.1726655662059784,
-0.014790545217692852,
0.36510351300239563,
0.09828724712133408,
0.4093315899372101,
0.09224291890859604,
-0.05016673728823662,
0.13715402781963348,
0.047671400010585785,
0.009827282279729843,
-0.06809045374393463,
0.13684983551502228,
-0.2060667723417282,
0.1784699410200119,
0.2098882794380188,
0.062412556260824203,
-0.06111731380224228,
-0.3300629258155823,
-0.02720680460333824,
0.6360582113265991,
0.0477030947804451,
-0.1378117799758911,
-0.398053914308548,
0.039239175617694855,
-0.08326288312673569,
-0.011674385517835617,
-0.2653488218784332,
0.2788216471672058,
0.059834711253643036,
-0.13426494598388672,
0.05671294033527374,
0.3222053647041321,
0.011663091368973255,
-0.21669812500476837,
0.26536324620246887,
0.7818445563316345,
-0.09926514327526093,
-0.17186138033866882,
0.11673568189144135,
-0.5884343385696411,
0.20827139914035797,
-0.13383232057094574,
-0.22993862628936768,
0.23741699755191803,
0.6179015636444092,
0.4279892146587372,
-0.05817805603146553,
0.031735993921756744,
-0.06839389353990555,
0.29861539602279663,
0.39980876445770264,
0.024749252945184708,
-0.3153727352619171,
-0.16264444589614868,
-0.16445593535900116,
-0.13962028920650482,
0.012509088031947613,
0.12872709333896637,
-0.14962731301784515,
-0.06127855181694031,
0.04955676943063736,
0.11296223849058151,
-0.1767140030860901,
-0.36492735147476196,
0.7231631278991699,
0.011546461842954159,
0.3714827299118042,
-0.11306919157505035,
0.05163923650979996,
-0.26284411549568176,
-0.20426885783672333,
0.047276679426431656,
0.3148730993270874,
-0.19293951988220215,
0.1571580022573471,
-0.1494898647069931,
-0.2276141196489334,
-0.1884859800338745,
0.24760590493679047,
0.09087496250867844,
-0.27144819498062134,
-0.23099401593208313,
0.12852218747138977,
-0.24787341058254242,
0.010283758863806725,
-0.014985906891524792,
0.02484484389424324,
-0.04832038655877113,
0.27728888392448425,
0.10548465698957443,
-0.27249768376350403,
0.5993977785110474,
-0.40960898995399475,
0.1013205498456955,
0.09720958769321442,
0.22118040919303894,
0.5730553865432739,
0.022323574870824814,
-0.8656445145606995,
-0.005810118746012449,
0.08379566669464111,
-0.1317085474729538,
-0.2458978295326233,
-0.09870456904172897,
0.1803893744945526,
0.05585465580224991,
-0.3165009915828705,
-0.15917931497097015,
-0.012557816691696644,
0.13696613907814026,
-0.09018435329198837,
-0.28962260484695435
] |
https://github.com/huggingface/datasets/issues/2029
|
Loading a faiss index KeyError
|
> If I understand correctly by reading this example you thought that it was re-adding the "embeddings" column.
Yes. I was trying to use the dataset in RAG and it complained that the dataset didn't have the right columns. No problems when loading the dataset with `load_from_disk` and then doing `load_faiss_index`
What I learned was
1. column and index are different
2. loading the index does not create a column
3. the column is not needed to be able to use the index
4. RAG needs both the embeddings column and the index
If I can come up with a way to articulate this in the right spot in the docs, I'll open a PR
|
I've recently been testing out RAG and DPR embeddings, and I've run into an issue that is not apparent in the documentation.
The basic steps are:
1. Create a dataset (dataset1)
2. Create an embeddings column using DPR
3. Add a faiss index to the dataset
4. Save faiss index to a file
5. Create a new dataset (dataset2) with the same text and label information as dataset1
6. Try to load the faiss index from file to dataset2
7. Get `KeyError: "Column embeddings not in the dataset"`
I've made a colab notebook that should show exactly what I did. Please switch to GPU runtime; I didn't check on CPU.
https://colab.research.google.com/drive/1X0S9ZuZ8k0ybcoei4w7so6dS_WrABmIx?usp=sharing
Ubuntu Version
VERSION="18.04.5 LTS (Bionic Beaver)"
datasets==1.4.1
faiss==1.5.3
faiss-gpu==1.7.0
torch==1.8.0+cu101
transformers==4.3.3
NVIDIA-SMI 460.56
Driver Version: 460.32.03
CUDA Version: 11.2
Tesla K80
I was basically following the steps here: https://huggingface.co/docs/datasets/faiss_and_ea.html#adding-a-faiss-index
I included the exact code from the documentation at the end of the notebook to show that they don't work either.
| 115
|
Loading a faiss index KeyError
I've recently been testing out RAG and DPR embeddings, and I've run into an issue that is not apparent in the documentation.
The basic steps are:
1. Create a dataset (dataset1)
2. Create an embeddings column using DPR
3. Add a faiss index to the dataset
4. Save faiss index to a file
5. Create a new dataset (dataset2) with the same text and label information as dataset1
6. Try to load the faiss index from file to dataset2
7. Get `KeyError: "Column embeddings not in the dataset"`
I've made a colab notebook that should show exactly what I did. Please switch to GPU runtime; I didn't check on CPU.
https://colab.research.google.com/drive/1X0S9ZuZ8k0ybcoei4w7so6dS_WrABmIx?usp=sharing
Ubuntu Version
VERSION="18.04.5 LTS (Bionic Beaver)"
datasets==1.4.1
faiss==1.5.3
faiss-gpu==1.7.0
torch==1.8.0+cu101
transformers==4.3.3
NVIDIA-SMI 460.56
Driver Version: 460.32.03
CUDA Version: 11.2
Tesla K80
I was basically following the steps here: https://huggingface.co/docs/datasets/faiss_and_ea.html#adding-a-faiss-index
I included the exact code from the documentation at the end of the notebook to show that they don't work either.
> If I understand correctly by reading this example you thought that it was re-adding the "embeddings" column.
Yes. I was trying to use the dataset in RAG and it complained that the dataset didn't have the right columns. No problems when loading the dataset with `load_from_disk` and then doing `load_faiss_index`
What I learned was
1. column and index are different
2. loading the index does not create a column
3. the column is not needed to be able to use the index
4. RAG needs both the embeddings column and the index
If I can come up with a way to articulate this in the right spot in the docs, I'll open a PR
|
[
0.11416603624820709,
-0.6093639731407166,
0.06223629042506218,
0.37251168489456177,
0.13730132579803467,
0.28628310561180115,
0.4066280722618103,
0.027965614572167397,
0.5614453554153442,
0.2074248492717743,
-0.0576399527490139,
0.151422917842865,
0.47379183769226074,
-0.06073513254523277,
-0.05298921838402748,
-0.041615504771471024,
0.27029091119766235,
0.24316266179084778,
0.273733913898468,
-0.1626688688993454,
-0.2025642991065979,
0.12476590275764465,
-0.2621254622936249,
0.17187058925628662,
-0.248212069272995,
0.2487477958202362,
-0.27781233191490173,
0.030895428732037544,
-0.2404201626777649,
-0.3826127052307129,
0.3425864577293396,
-0.29520195722579956,
0.6600486040115356,
0.14926281571388245,
-0.0001231915521202609,
0.10207825899124146,
0.3273307979106903,
-0.18719424307346344,
-0.21228481829166412,
0.09153493493795395,
0.1122799888253212,
0.014388865791261196,
0.20146840810775757,
-0.08705747872591019,
-0.005722377449274063,
-0.6249668002128601,
-0.012162740342319012,
-0.16448265314102173,
0.1824401170015335,
0.03326994553208351,
0.1068648248910904,
-0.006537399720400572,
0.035155195742845535,
-0.37838926911354065,
0.20511287450790405,
-0.33389878273010254,
-0.10932494699954987,
0.322783887386322,
0.09181777387857437,
0.06594255566596985,
0.05419258773326874,
0.18775580823421478,
-0.06825392693281174,
0.1206272542476654,
0.41528213024139404,
0.28053537011146545,
0.32714447379112244,
-0.09415603429079056,
0.19169752299785614,
0.19262662529945374,
0.4542692303657532,
-0.040183234959840775,
-0.33391398191452026,
-0.11438319832086563,
0.256390243768692,
-0.15852677822113037,
0.23078754544258118,
-0.25897789001464844,
0.01837579905986786,
0.3088288903236389,
0.39133772253990173,
-0.20830249786376953,
0.14921161532402039,
0.11256033182144165,
-0.07019581645727158,
-0.049941543489694595,
-0.23364366590976715,
0.10628318786621094,
0.11876221001148224,
-0.04122404754161835,
-0.22930750250816345,
-0.1664852499961853,
0.06980278342962265,
0.08679461479187012,
-0.33133062720298767,
0.1300155222415924,
0.16414067149162292,
0.06615978479385376,
-0.10914354026317596,
0.05478470027446747,
-0.18937523663043976,
-0.026487022638320923,
0.13745062053203583,
0.3345860540866852,
-0.1803782731294632,
0.024697108194231987,
0.04442104697227478,
-0.0005222659092396498,
-0.011388314887881279,
0.22251637279987335,
0.044128283858299255,
-0.26777979731559753,
-0.09624789655208588,
-0.10686231404542923,
-0.5135735869407654,
-0.30398619174957275,
-0.11294396966695786,
-0.3393262028694153,
-0.4211421012878418,
0.22226305305957794,
-0.4232884645462036,
-0.14129027724266052,
-0.02981557697057724,
0.5755090713500977,
0.2752484083175659,
-0.16360844671726227,
0.21799983084201813,
0.3787243962287903,
-0.2972566485404968,
0.17818394303321838,
-0.1884080469608307,
0.08736339956521988,
-0.17981752753257751,
0.4388464093208313,
0.10415312647819519,
-0.4247676134109497,
0.21506674587726593,
0.09942509233951569,
0.08978529274463654,
0.06372150033712387,
-0.3770466148853302,
-0.05507608875632286,
0.34083983302116394,
0.27611351013183594,
-0.08713121712207794,
0.08471066504716873,
0.35609883069992065,
-0.2921208441257477,
-0.20509688556194305,
0.05920598655939102,
-0.12360922992229462,
-0.10763321071863174,
-0.14795130491256714,
0.09175988286733627,
-0.0937495082616806,
-0.05814453214406967,
0.19963939487934113,
0.040503278374671936,
0.15049932897090912,
-0.3299959599971771,
0.044983405619859695,
-0.009383069351315498,
-0.16189135611057281,
-0.2245410680770874,
0.4479087293148041,
0.3724355399608612,
-0.7759330868721008,
-0.3368355631828308,
0.05504043772816658,
0.15568597614765167,
-0.08233638107776642,
0.24277853965759277,
-0.12442319840192795,
0.1349114030599594,
-0.27099910378456116,
0.4014904499053955,
0.12205461412668228,
-0.09015495330095291,
-0.17089131474494934,
0.04489331319928169,
0.09302481263875961,
0.028585616499185562,
0.2380022257566452,
-0.09867052733898163,
0.3254885673522949,
0.14974834024906158,
0.3354105055332184,
-0.00019868435629177839,
0.004355049692094326,
-0.3671830892562866,
-0.16304807364940643,
-0.39216411113739014,
0.06977266073226929,
0.09562227129936218,
-0.13257305324077606,
-0.025171440094709396,
-0.13507789373397827,
-0.41437190771102905,
0.08103970438241959,
-0.24818198382854462,
-0.04805605858564377,
0.02445322833955288,
0.26749128103256226,
0.34555429220199585,
0.4671975374221802,
0.08245954662561417,
-0.1673387885093689,
0.25648775696754456,
0.12915903329849243,
0.0423055998980999,
-0.12255214154720306,
-0.015737561509013176,
-0.27942872047424316,
-0.012706158682703972,
-0.0496826097369194,
-0.18181338906288147,
-0.0790599137544632,
0.014589839614927769,
-0.011876450851559639,
-0.07578451931476593,
-0.33210745453834534,
0.13034361600875854,
-0.2576688826084137,
0.2069559246301651,
-0.5300254225730896,
0.45209091901779175,
-0.2802719473838806,
-0.2228666990995407,
0.032998740673065186,
0.24889101088047028,
0.14724354445934296,
-0.21286390721797943,
0.14380161464214325,
0.10140614956617355,
-0.0003669222060125321,
-0.2585802674293518,
0.11111704260110855,
-0.1829441785812378,
0.16200374066829681,
-0.14460134506225586,
0.0851273387670517,
-0.11798340082168579,
0.25496867299079895,
0.06506327539682388,
-0.22447296977043152,
0.459136426448822,
-0.023493321612477303,
0.3052203357219696,
-0.20298920571804047,
-0.21193543076515198,
0.11735730618238449,
-0.01786637492477894,
-0.02672879956662655,
-0.33005112409591675,
-0.11730065941810608,
0.0439031757414341,
-0.16801896691322327,
-0.05418844148516655,
0.08579887449741364,
0.1069030687212944,
-0.028232920914888382,
0.05229511484503746,
-0.15526501834392548,
0.011299200356006622,
-0.2901860475540161,
0.018938256427645683,
0.08877180516719818,
-0.37209901213645935,
0.4891069233417511,
0.2894638478755951,
-0.151506245136261,
-0.2688125967979431,
-0.21404190361499786,
-0.3313247859477997,
0.05957718938589096,
-0.0840369164943695,
-0.2100369930267334,
0.15871737897396088,
-0.11572267860174179,
0.05468130484223366,
-0.2241608202457428,
0.008105180226266384,
0.07596322894096375,
0.15769724547863007,
-0.5991171002388,
0.05723761022090912,
-0.3049143850803375,
-0.03660206496715546,
0.030858350917696953,
-0.10123042017221451,
0.04151923581957817,
-0.34873059391975403,
0.1815750151872635,
-0.11908356845378876,
-0.03779352456331253,
0.15112929046154022,
-0.06264033168554306,
0.2203103005886078,
-0.08167769759893417,
0.048869434744119644,
-0.19511310756206512,
-0.2207871824502945,
-0.33454930782318115,
-0.06908871978521347,
-0.0555734783411026,
0.3011600971221924,
0.18259193003177643,
-0.04116268455982208,
-0.1298971176147461,
-0.13964176177978516,
-0.2877683639526367,
0.30020272731781006,
-0.16889427602291107,
0.15247631072998047,
-0.11279387772083282,
0.11339692771434784,
-0.13852889835834503,
-0.15317092835903168,
0.32622113823890686,
-0.035774655640125275,
-0.1949460655450821,
-0.07042818516492844,
0.09430045634508133,
-0.02988981083035469,
-0.08833293616771698,
-0.47851964831352234,
0.19022822380065918,
-0.20062978565692902,
-0.1416560262441635,
-0.19470472633838654,
-0.08397801220417023,
-0.4174037575721741,
0.41108590364456177,
0.09257400780916214,
-0.06988324970006943,
0.0943000391125679,
-0.38010165095329285,
0.06980875134468079,
0.30633965134620667,
-0.08150285482406616,
-0.2894352972507477,
0.14652292430400848,
0.009655541740357876,
-0.21569690108299255,
0.03900792449712753,
-0.31960317492485046,
-0.5543971657752991,
0.02174680121243,
0.15951068699359894,
0.2703961133956909,
0.4036833345890045,
0.15676721930503845,
-0.10570316761732101,
-0.053315866738557816,
-0.11792030185461044,
-0.4052334427833557,
0.032800499349832535,
-0.05352069064974785,
0.21136562526226044,
-0.11476006358861923,
0.48694881796836853,
-0.3206724226474762,
0.5223792195320129,
0.38105762004852295,
-0.33831870555877686,
0.4276522397994995,
-0.11276935786008835,
0.5202953219413757,
-0.2422710508108139,
-0.14221295714378357,
0.19874508678913116,
0.05869460478425026,
0.0017604016466066241,
0.24371860921382904,
-0.09586464613676071,
0.11906559020280838,
0.06895995140075684,
0.3653143644332886,
-0.08962175995111465,
-0.26740339398384094,
0.13140442967414856,
0.03055204078555107,
-0.01604531705379486,
-0.07163826376199722,
0.3272539973258972,
-0.09209056198596954,
0.15457655489444733,
0.18492162227630615,
0.39696869254112244,
0.39986279606819153,
-0.07306167483329773,
0.2712450623512268,
-0.3327043950557709,
-0.20810659229755402,
0.5384796261787415,
0.08142214268445969,
0.2804942727088928,
-0.19650255143642426,
-0.1623130738735199,
0.4398685097694397,
0.18525350093841553,
0.5423484444618225,
-0.4256880581378937,
-0.3764917850494385,
0.30586332082748413,
0.3216742277145386,
-0.43372511863708496,
-0.14761480689048767,
-0.022491727024316788,
-0.04536082595586777,
-0.01499198842793703,
0.7402044534683228,
-0.47425368428230286,
-0.01776265911757946,
0.2606264054775238,
0.10666908323764801,
-0.1701066792011261,
-0.4776914715766907,
-0.5002138018608093,
-0.14443746209144592,
-0.4203999638557434,
-0.07626912742853165,
-0.2062745988368988,
0.30784428119659424,
0.10219285637140274,
0.23671899735927582,
-0.08121606707572937,
0.012986917980015278,
0.1501796543598175,
0.3022860288619995,
0.04460716247558594,
0.05259767919778824,
0.21014951169490814,
0.4190894663333893,
0.43588918447494507,
0.27208974957466125,
0.4205085039138794,
-0.13997779786586761,
-0.332022488117218,
0.2088840752840042,
-0.000685250386595726,
0.16122810542583466,
0.3638092875480652,
0.02995229884982109,
0.2056962251663208,
-0.16692590713500977,
0.01032338012009859,
-0.21242326498031616,
-0.3417506217956543,
0.09682758152484894,
0.06270801275968552,
0.07182426750659943,
-0.2635457515716553,
0.4906758964061737,
0.02960759587585926,
-0.14652161300182343,
-0.10244773328304291,
0.7082789540290833,
-0.0038834756705909967,
0.964350163936615,
-0.006847513373941183,
0.9512913227081299,
-0.1551675945520401,
-0.03763600438833237,
0.44086235761642456,
-0.1820317804813385,
0.49782493710517883,
-0.16123466193675995,
0.10901305079460144,
-0.4382881224155426,
-0.21741703152656555,
-0.07921425253152847,
-0.04545661434531212,
0.19187957048416138,
-0.02338366024196148,
-0.26816442608833313,
0.15533694624900818,
-0.10227881371974945,
-0.0949525237083435,
-0.0957578644156456,
-0.0553625114262104,
0.0645112469792366,
-0.4010763168334961,
-0.19228294491767883,
0.01874030940234661,
0.4626621603965759,
0.35808268189430237,
0.025602664798498154,
0.029727142304182053,
-0.32381966710090637,
-0.011519347317516804,
-0.30980148911476135,
0.04637101665139198,
0.31206825375556946,
0.1080770269036293,
0.3823549151420593,
-0.2416807860136032,
0.2194238305091858,
0.10668102651834488,
0.634817361831665,
-0.49094751477241516,
-0.1986655294895172,
0.13144731521606445,
-0.225016787648201,
-0.24956822395324707,
-0.1412055790424347,
-0.34027203917503357,
0.303634375333786,
0.24554820358753204,
-0.4158515930175781,
0.26101523637771606,
0.11050199717283249,
-0.13139991462230682,
-0.1638641506433487,
0.15263302624225616,
0.009876769036054611,
-0.47593042254447937,
-0.10791677981615067,
-0.023459581658244133,
0.3508497178554535,
-0.09615761041641235,
0.05728254094719887,
0.10417846590280533,
-0.02182125858962536,
0.19862885773181915,
0.07227940112352371,
-0.12420397996902466,
-0.0319024883210659,
0.4855904281139374,
-0.16332179307937622,
0.14178253710269928,
0.33449000120162964,
0.09869197756052017,
-0.4170288145542145,
-0.028461487963795662,
-0.5361006259918213,
0.5242931842803955,
-0.36463987827301025,
-0.18971100449562073,
0.31458500027656555,
-0.17211207747459412,
0.06391406059265137,
0.014536099508404732,
0.3819759786128998,
-0.20456178486347198,
-0.28629598021507263,
-0.26019513607025146,
-0.020643014460802078,
0.38786160945892334,
-0.0625406950712204,
0.13801199197769165,
-0.11810768395662308,
0.004195420537143946,
-0.12067557871341705,
0.07014211267232895,
-0.20638613402843475,
0.17697212100028992,
-0.06977776437997818,
0.13052870333194733,
-0.034991033375263214,
-0.20452655851840973,
-0.036428581923246384,
-0.23918040096759796,
0.018126513808965683,
0.09277023375034332,
-0.01831231266260147,
-0.005997102241963148,
0.013901972211897373,
0.18154746294021606,
0.09017972648143768,
0.11116287112236023,
-0.4262261688709259,
-0.047481924295425415,
-0.06762828677892685,
-0.3948301374912262,
0.35418176651000977,
0.17563562095165253,
-0.11669526249170303,
-0.16516312956809998,
0.049595244228839874,
0.06970033049583435,
-0.05639612302184105,
0.26389119029045105,
0.127339169383049,
0.505432665348053,
0.2831275463104248,
-0.1307985484600067,
-0.466946542263031,
0.15154680609703064,
0.06834841519594193,
0.3996822237968445,
0.1805761307477951,
-0.09227105975151062,
0.3608173131942749,
-0.21893282234668732,
0.028939951211214066,
-0.0035552172921597958,
0.1313316524028778,
0.4595060348510742,
-0.05300452187657356,
0.05779517441987991,
0.17336824536323547,
0.056339871138334274,
-0.1533016562461853,
0.09759312868118286,
0.3312353789806366,
-0.09352950006723404,
-0.038081251084804535,
0.23219773173332214,
0.21017400920391083,
0.09216293692588806,
-0.1772087663412094,
0.033709943294525146,
0.2256147861480713,
0.18712852895259857,
-0.3880457580089569,
-0.012070602737367153,
0.10332167893648148,
0.26103559136390686,
0.49015840888023376,
0.10795047134160995,
0.32499632239341736,
0.04467242583632469,
-0.10877332836389542,
0.043283119797706604,
0.047110237181186676,
0.4198779761791229,
-0.1686377078294754,
-0.6134323477745056,
0.5157344937324524,
0.29003727436065674,
0.47445425391197205,
-0.3256703317165375,
0.0362972617149353,
0.23244696855545044,
0.013147376477718353,
-0.006487029604613781,
-0.17167000472545624,
-0.03228158503770828,
-0.16261659562587738,
-0.44945815205574036,
0.1296895146369934,
-0.03750988095998764,
-0.15597042441368103,
-0.030580943450331688,
0.02360784076154232,
-0.0976375937461853,
-0.005641445983201265,
-0.09764784574508667,
-0.3179900646209717,
-0.1804518848657608,
-0.32939982414245605,
0.2765714228153229,
0.23270012438297272,
0.06574354320764542,
-0.045187078416347504,
-0.11335481703281403,
-0.03200933709740639,
0.45097747445106506,
0.03849608451128006,
0.5022717714309692,
0.12591637670993805,
0.016480425372719765,
0.03369588777422905,
0.06946749985218048,
0.046382591128349304,
-0.01185522135347128,
0.21214282512664795,
-0.1274936944246292,
0.24947813153266907,
0.2408226579427719,
0.09029392153024673,
-0.10382509231567383,
-0.3525877892971039,
-0.054138656705617905,
0.5762385129928589,
0.06361906975507736,
-0.1043970137834549,
-0.3979020416736603,
0.05231180042028427,
-0.08341347426176071,
0.013453641906380653,
-0.19973646104335785,
0.3871748447418213,
-0.003299668664112687,
-0.10491912066936493,
0.038102127611637115,
0.3390268087387085,
0.023447977378964424,
-0.18518097698688507,
0.24326084554195404,
0.8182138204574585,
-0.22009457647800446,
-0.232718363404274,
0.12558943033218384,
-0.5277740955352783,
0.25838157534599304,
-0.13816988468170166,
-0.16598038375377655,
0.20669355988502502,
0.6418516635894775,
0.4926259517669678,
-0.044890522956848145,
-0.026389405131340027,
-0.04076588153839111,
0.2749055027961731,
0.4152502715587616,
0.04232163727283478,
-0.33993157744407654,
-0.09488222748041153,
-0.21206606924533844,
-0.16273686289787292,
-0.059730853885412216,
0.10980583727359772,
-0.046407584100961685,
-0.06074666604399681,
0.06806791573762894,
0.06998157501220703,
-0.1350306123495102,
-0.3679940104484558,
0.6232002377510071,
0.058759450912475586,
0.362682968378067,
-0.1151079535484314,
0.02545815519988537,
-0.280435174703598,
-0.15380506217479706,
-0.0043475693091750145,
0.2639605700969696,
-0.19374005496501923,
0.14828096330165863,
-0.15942512452602386,
-0.15167617797851562,
-0.24382710456848145,
0.23025494813919067,
0.04256132245063782,
-0.18301735818386078,
-0.20475894212722778,
0.16143852472305298,
-0.25034138560295105,
0.022425569593906403,
-0.0029807379469275475,
0.02319168671965599,
-0.05041918158531189,
0.27514493465423584,
0.07465862482786179,
-0.2265361249446869,
0.6171563267707825,
-0.3164280652999878,
0.09093835204839706,
0.16473670303821564,
0.21018852293491364,
0.4974491000175476,
0.043661389499902725,
-0.816381573677063,
-0.013322290033102036,
0.07788742333650589,
-0.13949066400527954,
-0.24824072420597076,
-0.0961587205529213,
0.22678878903388977,
0.022993719205260277,
-0.2847953140735626,
-0.22235625982284546,
0.05003733932971954,
0.05270175263285637,
-0.06664007902145386,
-0.24812427163124084
] |
https://github.com/huggingface/datasets/issues/2026
|
KeyError on using map after renaming a column
|
Hi,
Actually, the error occurs due to these two lines:
```python
raw_dataset.set_format('torch',columns=['img','label'])
raw_dataset = raw_dataset.rename_column('img','image')
```
`Dataset.rename_column` doesn't update the `_format_columns` attribute, previously defined by `Dataset.set_format`, with a new column name which is why this new column is missing in the output.
|
Hi,
I'm trying to use `cifar10` dataset. I want to rename the `img` feature to `image` in order to make it consistent with `mnist`, which I'm also planning to use. By doing this, I was trying to avoid modifying `prepare_train_features` function.
Here is what I try:
```python
transform = Compose([ToPILImage(),ToTensor(),Normalize([0.0,0.0,0.0],[1.0,1.0,1.0])])
def prepare_features(examples):
images = []
labels = []
print(examples)
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(examples["image"][example_idx].permute(2,0,1)))
else:
images.append(examples["image"][example_idx].permute(2,0,1))
labels.append(examples["label"][example_idx])
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('cifar10')
raw_dataset.set_format('torch',columns=['img','label'])
raw_dataset = raw_dataset.rename_column('img','image')
features = datasets.Features({
"image": datasets.Array3D(shape=(3,32,32),dtype="float32"),
"label": datasets.features.ClassLabel(names=[
"airplane",
"automobile",
"bird",
"cat",
"deer",
"dog",
"frog",
"horse",
"ship",
"truck",
]),
})
train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
```
The error:
```python
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-54-bf29672c53ee> in <module>()
14 ]),
15 })
---> 16 train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
2 frames
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint)
1287 test_inputs = self[:2] if batched else self[0]
1288 test_indices = [0, 1] if batched else 0
-> 1289 update_data = does_function_return_dict(test_inputs, test_indices)
1290 logger.info("Testing finished, running the mapping function on the dataset")
1291
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in does_function_return_dict(inputs, indices)
1258 fn_args = [inputs] if input_columns is None else [inputs[col] for col in input_columns]
1259 processed_inputs = (
-> 1260 function(*fn_args, indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1261 )
1262 does_return_dict = isinstance(processed_inputs, Mapping)
<ipython-input-52-b4dccbafb70d> in prepare_features(examples)
3 labels = []
4 print(examples)
----> 5 for example_idx, example in enumerate(examples["image"]):
6 if transform is not None:
7 images.append(transform(examples["image"][example_idx].permute(2,0,1)))
KeyError: 'image'
```
The print statement inside returns this:
```python
{'label': tensor([6, 9])}
```
Apparently, both `img` and `image` do not exist after renaming.
Note that this code works fine with `img` everywhere.
Notebook: https://colab.research.google.com/drive/1SzESAlz3BnVYrgQeJ838vbMp1OsukiA2?usp=sharing
| 42
|
KeyError on using map after renaming a column
Hi,
I'm trying to use `cifar10` dataset. I want to rename the `img` feature to `image` in order to make it consistent with `mnist`, which I'm also planning to use. By doing this, I was trying to avoid modifying `prepare_train_features` function.
Here is what I try:
```python
transform = Compose([ToPILImage(),ToTensor(),Normalize([0.0,0.0,0.0],[1.0,1.0,1.0])])
def prepare_features(examples):
images = []
labels = []
print(examples)
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(examples["image"][example_idx].permute(2,0,1)))
else:
images.append(examples["image"][example_idx].permute(2,0,1))
labels.append(examples["label"][example_idx])
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('cifar10')
raw_dataset.set_format('torch',columns=['img','label'])
raw_dataset = raw_dataset.rename_column('img','image')
features = datasets.Features({
"image": datasets.Array3D(shape=(3,32,32),dtype="float32"),
"label": datasets.features.ClassLabel(names=[
"airplane",
"automobile",
"bird",
"cat",
"deer",
"dog",
"frog",
"horse",
"ship",
"truck",
]),
})
train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
```
The error:
```python
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-54-bf29672c53ee> in <module>()
14 ]),
15 })
---> 16 train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
2 frames
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint)
1287 test_inputs = self[:2] if batched else self[0]
1288 test_indices = [0, 1] if batched else 0
-> 1289 update_data = does_function_return_dict(test_inputs, test_indices)
1290 logger.info("Testing finished, running the mapping function on the dataset")
1291
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in does_function_return_dict(inputs, indices)
1258 fn_args = [inputs] if input_columns is None else [inputs[col] for col in input_columns]
1259 processed_inputs = (
-> 1260 function(*fn_args, indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1261 )
1262 does_return_dict = isinstance(processed_inputs, Mapping)
<ipython-input-52-b4dccbafb70d> in prepare_features(examples)
3 labels = []
4 print(examples)
----> 5 for example_idx, example in enumerate(examples["image"]):
6 if transform is not None:
7 images.append(transform(examples["image"][example_idx].permute(2,0,1)))
KeyError: 'image'
```
The print statement inside returns this:
```python
{'label': tensor([6, 9])}
```
Apparently, both `img` and `image` do not exist after renaming.
Note that this code works fine with `img` everywhere.
Notebook: https://colab.research.google.com/drive/1SzESAlz3BnVYrgQeJ838vbMp1OsukiA2?usp=sharing
Hi,
Actually, the error occurs due to these two lines:
```python
raw_dataset.set_format('torch',columns=['img','label'])
raw_dataset = raw_dataset.rename_column('img','image')
```
`Dataset.rename_column` doesn't update the `_format_columns` attribute, previously defined by `Dataset.set_format`, with a new column name which is why this new column is missing in the output.
|
[
0.03439004719257355,
0.006200449075549841,
-0.06358039379119873,
-0.33422738313674927,
0.4808429181575775,
0.2616387903690338,
0.6042653322219849,
0.23733164370059967,
0.13709120452404022,
0.08659175783395767,
0.0540347620844841,
0.5270304679870605,
-0.15589512884616852,
0.29946333169937134,
-0.19450080394744873,
-0.08811743557453156,
0.41338208317756653,
0.0935039073228836,
-0.11563385277986526,
0.19720254838466644,
-0.44354814291000366,
0.04970678314566612,
-0.3014577627182007,
0.28078484535217285,
-0.3147513270378113,
-0.17789645493030548,
0.05453328415751457,
-0.19385521113872528,
-0.24731791019439697,
-0.27466878294944763,
-0.04921545460820198,
0.0971030741930008,
-0.02236613631248474,
0.6005280613899231,
-0.00011894206545548514,
0.08269856125116348,
0.18870729207992554,
-0.08655141294002533,
0.08298621326684952,
-0.29607492685317993,
-0.1819148063659668,
-0.011541446670889854,
-0.223061665892601,
-0.5142752528190613,
0.04068552702665329,
-0.06361610442399979,
-0.0771729126572609,
-0.2671767771244049,
0.10244928300380707,
0.246700257062912,
0.1638299524784088,
-0.11388253420591354,
0.22092358767986298,
-0.0220476184040308,
0.04394765570759773,
0.23825466632843018,
-0.19265101850032806,
0.07693206518888474,
0.049104537814855576,
-0.35819947719573975,
0.2290983945131302,
0.6931737661361694,
-0.21425239741802216,
-0.0826263353228569,
0.2492942214012146,
0.14856673777103424,
0.413211464881897,
-0.3595774173736572,
0.3614654242992401,
-0.13661780953407288,
0.23790566623210907,
-0.1512388437986374,
-0.10437972843647003,
-0.05423123389482498,
-0.0018233235459774733,
-0.2537839114665985,
-0.023235514760017395,
-0.3196370601654053,
0.0776958018541336,
-0.2296994924545288,
-0.33052679896354675,
-0.18500743806362152,
0.12853623926639557,
0.20784422755241394,
0.12311432510614395,
-0.0971985012292862,
-0.029608486220240593,
0.4492819309234619,
0.1049039289355278,
-0.3226710855960846,
-0.12460561841726303,
0.02691228874027729,
0.0980830192565918,
0.2211734652519226,
-0.22417840361595154,
-0.06977559626102448,
0.10546539723873138,
-0.022715503349900246,
-0.2865687310695648,
-0.6728145480155945,
0.01709994301199913,
-0.1154983788728714,
0.18046408891677856,
0.07850198447704315,
0.10636134445667267,
0.2072904258966446,
-0.08792552351951599,
0.3839033544063568,
0.04374191164970398,
0.04999126121401787,
-0.3903316557407379,
-0.2533300817012787,
0.18438215553760529,
-0.39901572465896606,
0.35976073145866394,
0.24726173281669617,
0.3776051700115204,
0.09367865324020386,
0.41185250878334045,
-0.01276182197034359,
0.13943642377853394,
-0.09651055932044983,
-0.023579813539981842,
0.3582359254360199,
0.24442654848098755,
-0.05046595260500908,
0.10449724644422531,
0.14741156995296478,
-0.037725646048784256,
0.27445587515830994,
-0.039970025420188904,
0.1520816534757614,
-0.5921458005905151,
-0.10537679493427277,
-0.1591850072145462,
0.0644550770521164,
0.02737477235496044,
-0.1856069564819336,
0.12004158645868301,
-0.10297928750514984,
-0.01741429977118969,
-0.06256157904863358,
0.4089106321334839,
0.19146110117435455,
-0.3518824279308319,
0.11432355642318726,
0.22875149548053741,
-0.2352551817893982,
-0.12316090613603592,
0.2178235650062561,
-0.6010242700576782,
-0.18661949038505554,
-0.19354093074798584,
0.09118697792291641,
0.20307785272598267,
0.199644073843956,
-0.2752974033355713,
-0.13464492559432983,
0.5062406063079834,
-0.4040706753730774,
0.08267814666032791,
-0.24270913004875183,
-0.29490023851394653,
-0.23645538091659546,
-0.16903305053710938,
-0.033954694867134094,
-0.04627559334039688,
-0.025684235617518425,
-0.17594215273857117,
0.3576532006263733,
0.015510299243032932,
-0.04866238310933113,
-0.10098207741975784,
0.21325355768203735,
-0.03428361564874649,
0.16026607155799866,
0.42716532945632935,
-0.31456249952316284,
-0.2063589096069336,
-0.015260114334523678,
-0.22039894759655,
-0.1616610437631607,
-0.09202196449041367,
0.0930316299200058,
0.20390422642230988,
-0.07271372526884079,
0.43998223543167114,
-0.15441381931304932,
-0.08987114578485489,
0.17854785919189453,
0.13115881383419037,
-0.04621483385562897,
0.1775304675102234,
-0.07912331074476242,
0.12811186909675598,
0.20867323875427246,
0.11113552749156952,
0.011696133762598038,
-0.022794464603066444,
-0.20689229667186737,
0.0939345508813858,
0.09910296648740768,
0.21925212442874908,
-0.0245536919683218,
0.036057692021131516,
0.08036869764328003,
-0.32553017139434814,
0.16788126528263092,
0.18034137785434723,
0.14161288738250732,
-0.2925773859024048,
-0.11960219591856003,
-0.2550840675830841,
-0.1336408108472824,
-0.17606741189956665,
0.03164337947964668,
0.05520448461174965,
-0.054001182317733765,
-0.034420132637023926,
-0.14912444353103638,
-0.16488295793533325,
-0.15275627374649048,
0.049740396440029144,
0.10933196544647217,
-0.3486712872982025,
-0.018465556204319,
-0.2111009806394577,
-0.1441623717546463,
-0.38502371311187744,
0.01327594555914402,
0.1881345510482788,
-0.05409702658653259,
-0.23810803890228271,
0.3495650291442871,
0.139309361577034,
0.044096700847148895,
-0.3154120147228241,
0.17560657858848572,
0.0911012813448906,
-0.03345215693116188,
-0.0013047403190284967,
0.1042700782418251,
0.18146535754203796,
-0.034804414957761765,
0.11235760152339935,
0.25579163432121277,
-0.25813615322113037,
0.3806617558002472,
-0.23958876729011536,
0.1288553923368454,
-0.08415872603654861,
-0.176690936088562,
-0.2373664379119873,
-0.3937818109989166,
-0.14378254115581512,
-0.2950775623321533,
-0.23233146965503693,
-0.07121983915567398,
0.3053763508796692,
-0.20798106491565704,
0.5871581435203552,
-0.040982846170663834,
0.02409217320382595,
-0.005709812045097351,
0.06156255304813385,
0.28961747884750366,
0.011416779831051826,
0.10648953914642334,
0.29782959818840027,
-0.00961479265242815,
-0.2233598679304123,
0.2672613859176636,
0.17085197567939758,
0.2767238914966583,
0.20409442484378815,
0.216706320643425,
0.2447044551372528,
0.048027146607637405,
0.14855384826660156,
-0.06138908118009567,
0.016496771946549416,
-0.29990142583847046,
0.30999845266342163,
0.2844224274158478,
-0.2336350977420807,
0.09982375055551529,
-0.06604212522506714,
0.07008671760559082,
0.28239038586616516,
-0.15271690487861633,
0.056223124265670776,
-0.2700425684452057,
-0.09488902986049652,
0.3865874409675598,
0.09207707643508911,
0.43321388959884644,
-0.1842416673898697,
-0.37890252470970154,
0.24179691076278687,
-0.35465481877326965,
-0.036553673446178436,
-0.44943323731422424,
0.03062579594552517,
-0.032506063580513,
0.0856918916106224,
-0.4606234133243561,
0.08175579458475113,
-0.16478295624256134,
-0.135561004281044,
-0.12113343179225922,
-0.5227623581886292,
0.12185563892126083,
-0.44264599680900574,
0.01480346079915762,
0.24688883125782013,
0.2771115303039551,
-0.2926225960254669,
-0.17715120315551758,
0.4542587697505951,
-0.21786613762378693,
-0.14943160116672516,
0.12586769461631775,
0.012162660248577595,
-0.03933398425579071,
-0.11803414672613144,
-0.1904161125421524,
-0.026528362184762955,
-0.12349459528923035,
0.11690796166658401,
-0.26469686627388,
0.01631486788392067,
0.5068836212158203,
0.27591830492019653,
-0.2442614883184433,
0.1430359035730362,
-0.04893207550048828,
-0.15842889249324799,
-0.3822789490222931,
0.2083153873682022,
-0.08685991168022156,
0.08384066820144653,
0.004729356151074171,
-0.11430387943983078,
-0.0037283762358129025,
0.0410396084189415,
-0.18132184445858002,
-0.2923722565174103,
-0.08111485093832016,
0.25206610560417175,
0.1551317721605301,
0.10158838331699371,
0.2861320972442627,
0.41639354825019836,
-0.12338296324014664,
0.015547244809567928,
-0.22976134717464447,
-0.0407739020884037,
0.4496159851551056,
0.27504464983940125,
0.2839067280292511,
0.44892457127571106,
-0.016130419448018074,
0.29311317205429077,
-0.13201092183589935,
-0.1058143675327301,
0.45527327060699463,
-0.3281627297401428,
0.09713892638683319,
-0.42715132236480713,
-0.49833008646965027,
0.021225372329354286,
-0.3456515371799469,
-0.2692149579524994,
-0.2526130676269531,
-0.19740383327007294,
-0.20742984116077423,
-0.12508274614810944,
0.2784176468849182,
-0.48623475432395935,
-0.3314017355442047,
0.16035780310630798,
0.07059638947248459,
0.3074232041835785,
0.04876434803009033,
-0.019280221313238144,
-0.4495789110660553,
-0.16887983679771423,
0.09809505939483643,
0.024485046043992043,
0.055905334651470184,
-0.33550721406936646,
-0.6632707118988037,
-0.23652374744415283,
-0.3934516906738281,
0.4276644289493561,
0.11316049098968506,
0.15297795832157135,
-0.14101174473762512,
-0.06066591665148735,
-0.05564679205417633,
0.06886545568704605,
0.7746019959449768,
-0.44157689809799194,
-0.11490025371313095,
0.30108603835105896,
-0.04762253910303116,
-0.09884585440158844,
-0.24329794943332672,
-0.06724275648593903,
0.27336105704307556,
0.04728996753692627,
0.8124082684516907,
0.047417424619197845,
0.08439159393310547,
0.21454544365406036,
0.0629550889134407,
-0.06583381444215775,
0.028617115691304207,
-0.4060550928115845,
-0.28940096497535706,
-0.590724527835846,
-0.020670132711529732,
0.05729418992996216,
0.217359259724617,
0.3088783621788025,
0.18899616599082947,
0.1960790455341339,
-0.19456790387630463,
0.015449299477040768,
0.26640766859054565,
0.19868749380111694,
0.3779757618904114,
0.056051235646009445,
-0.04836863651871681,
0.12463360279798508,
0.003019434167072177,
0.14063869416713715,
-0.2207593023777008,
-0.27769407629966736,
-0.05735965073108673,
0.042271893471479416,
0.3460409939289093,
0.22131982445716858,
0.06288747489452362,
0.09592432528734207,
0.14610306918621063,
0.2581588327884674,
-0.27591368556022644,
0.29633432626724243,
0.49333029985427856,
0.14033092558383942,
-0.4810522496700287,
-0.3202231228351593,
0.23703111708164215,
0.21850544214248657,
-0.16900992393493652,
0.3816416263580322,
0.09295251220464706,
-0.329831600189209,
0.5882657766342163,
0.08547098934650421,
0.8382588028907776,
-0.3112327754497528,
0.05548463389277458,
-0.08506755530834198,
0.07848834991455078,
0.28673821687698364,
0.06256788969039917,
0.22338099777698517,
-0.19899560511112213,
-0.4336816668510437,
0.029441185295581818,
-0.058724645525217056,
0.3476182520389557,
0.08719182014465332,
-0.18709039688110352,
0.2699609696865082,
-0.22248677909374237,
0.5848435759544373,
-0.2539539337158203,
-0.24099120497703552,
0.21160350739955902,
-0.37431228160858154,
0.12431842088699341,
0.05664917826652527,
-0.06866119056940079,
0.09045165777206421,
0.010076339356601238,
0.14018556475639343,
-0.1021830290555954,
-0.3583540618419647,
0.06752730160951614,
-0.053940221667289734,
-0.2007296234369278,
0.2325121909379959,
-0.21370679140090942,
-0.21946506202220917,
-0.06756113469600677,
0.337904691696167,
0.3049488365650177,
0.2256919890642166,
0.07697935402393341,
0.2345018982887268,
0.44317036867141724,
0.20916670560836792,
-0.040884025394916534,
-0.16178523004055023,
-0.04702966287732124,
0.14012101292610168,
-0.28522947430610657,
0.1369480937719345,
-0.014186234213411808,
-0.24163059890270233,
-0.3642423748970032,
0.041563283652067184,
0.4323451817035675,
-0.3393738567829132,
-0.24990487098693848,
-0.15704187750816345,
-0.011291840113699436,
-0.10009327530860901,
0.06785985082387924,
-0.3800923228263855,
-0.1897212415933609,
0.4002576172351837,
-0.1145985797047615,
-0.4112882614135742,
0.1257440596818924,
0.36346906423568726,
0.08220595866441727,
0.013131429441273212,
0.5031774640083313,
-0.19953960180282593,
0.011348126456141472,
-0.08634303510189056,
0.09820550680160522,
0.215865358710289,
-0.08675048500299454,
0.029796890914440155,
0.3238893151283264,
-0.030904604122042656,
-0.1596028059720993,
0.4304635226726532,
0.05671415105462074,
0.2015259563922882,
0.0784539058804512,
-0.24326728284358978,
-0.6696435213088989,
0.4877867102622986,
0.10315081477165222,
0.24921631813049316,
0.1051928922533989,
0.3467663824558258,
-0.29485565423965454,
-0.011245349422097206,
-0.23995518684387207,
0.06492078304290771,
-0.043821681290864944,
0.3154599666595459,
0.4421725273132324,
0.025338510051369667,
-0.08960835635662079,
-0.2898135185241699,
0.20927779376506805,
0.2641288638114929,
-0.08504612743854523,
-0.21385926008224487,
-0.016767961904406548,
0.118308424949646,
0.10531659424304962,
-0.15056483447551727,
-0.024389751255512238,
-0.32315683364868164,
-0.027443792670965195,
-0.2703385055065155,
-0.08286922425031662,
0.33890169858932495,
0.03391844406723976,
0.1923673450946808,
-0.5534645915031433,
-0.08619105815887451,
0.30651867389678955,
0.13931012153625488,
-0.1251818835735321,
-0.05674056336283684,
0.2653049826622009,
0.1776149868965149,
-0.050407830625772476,
0.09706325829029083,
-0.29158011078834534,
-0.06840866804122925,
-0.15435175597667694,
0.11561371386051178,
0.34722843766212463,
-0.18881483376026154,
0.1339825838804245,
0.05610465258359909,
0.27962711453437805,
0.13100071251392365,
-0.25989609956741333,
-0.19481462240219116,
0.3021291196346283,
0.09886638820171356,
-0.3267251253128052,
-0.1829238384962082,
0.5215921401977539,
-0.015641186386346817,
0.24111248552799225,
0.23524221777915955,
-0.04850732535123825,
0.13168832659721375,
-0.2601727843284607,
-0.017790885642170906,
0.15293475985527039,
-0.07377735525369644,
0.24698084592819214,
0.6254125237464905,
-0.1150745153427124,
0.2715165615081787,
0.2926056385040283,
0.37308067083358765,
-0.12497740238904953,
0.6644849181175232,
0.06354989856481552,
0.20422035455703735,
0.158662810921669,
0.2688653767108917,
-0.11448035389184952,
-0.08995036035776138,
0.5314697027206421,
0.13465896248817444,
-0.22350244224071503,
0.29695627093315125,
0.19078734517097473,
-0.25905632972717285,
-0.001836314331740141,
-0.22525769472122192,
-0.0775449201464653,
0.28075897693634033,
-0.21775323152542114,
-0.25543010234832764,
-0.15150289237499237,
-0.036062996834516525,
0.0017213645623996854,
0.08056265860795975,
-0.05720824375748634,
0.06858707964420319,
0.6512491703033447,
0.026029402390122414,
0.05100424215197563,
0.09604521095752716,
-0.5209684371948242,
0.1352977305650711,
0.3933670222759247,
-0.13343563675880432,
-0.01799987442791462,
0.057154685258865356,
0.16420550644397736,
0.22000421583652496,
0.015519684180617332,
0.35678860545158386,
0.16927573084831238,
-0.2766987979412079,
0.16297942399978638,
-0.01959056593477726,
-0.1051778793334961,
0.26419588923454285,
0.04390417039394379,
0.32678356766700745,
0.008746059611439705,
0.10008305311203003,
0.03574595972895622,
-0.18553736805915833,
-0.1050802618265152,
0.14878053963184357,
0.19944779574871063,
0.19670633971691132,
-0.06667429208755493,
0.07766871154308319,
-0.13841837644577026,
-0.061289217323064804,
0.16629303991794586,
-0.2106761336326599,
-0.2168649435043335,
0.4741010367870331,
-0.11827561259269714,
0.18315531313419342,
0.1314241588115692,
0.06226655840873718,
0.1147591769695282,
0.19018597900867462,
0.10686147958040237,
-0.1823742687702179,
-0.5617815852165222,
-0.05064915493130684,
-0.3618876338005066,
-0.14546018838882446,
-0.048324957489967346,
0.09589316695928574,
0.00018412114877719432,
-0.2958844006061554,
0.28071820735931396,
0.10118994116783142,
0.435057669878006,
-0.48306161165237427,
-0.056659601628780365,
0.5606936812400818,
0.053983815014362335,
-0.06014345958828926,
0.02028477005660534,
0.24734295904636383,
0.10788930207490921,
-0.3471126854419708,
0.09702702611684799,
0.05866142362356186,
-0.008825809694826603,
-0.3392797112464905,
-0.1747090369462967,
-0.2541409134864807,
-0.22222813963890076,
0.4715783894062042,
0.17470340430736542,
0.42493101954460144,
-0.15176603198051453,
-0.0727754682302475,
0.1637454628944397,
-0.16768202185630798,
-0.016834426671266556,
0.20952224731445312,
0.2309509962797165,
0.3883240520954132,
-0.07110321521759033,
0.12801773846149445,
-0.3970898389816284,
0.0074614910408854485,
0.030202006921172142,
-0.18531100451946259,
-0.37659338116645813,
0.1869211047887802,
0.25499364733695984,
0.04083440080285072,
-0.18534451723098755,
0.3607898950576782,
0.03889675438404083,
0.5180012583732605,
-0.06803161650896072,
-0.3690662086009979,
0.7985031604766846,
-0.3579199016094208,
-0.6600227952003479,
0.08235903829336166,
-0.09001582860946655,
-0.1427427977323532,
0.041208624839782715,
-0.23881474137306213,
-0.06306424736976624,
0.0736408531665802,
-0.03345387056469917,
-0.34661582112312317,
0.09012875705957413,
-0.16457703709602356,
0.07983666658401489,
0.03644755855202675,
0.48609793186187744,
-0.31976714730262756,
-0.09455718845129013,
-0.24672704935073853,
-0.06323845684528351
] |
https://github.com/huggingface/datasets/issues/2026
|
KeyError on using map after renaming a column
|
Hi @mariosasko,
Thanks for opening a PR on this :)
Why does the old name also disappear?
|
Hi,
I'm trying to use `cifar10` dataset. I want to rename the `img` feature to `image` in order to make it consistent with `mnist`, which I'm also planning to use. By doing this, I was trying to avoid modifying `prepare_train_features` function.
Here is what I try:
```python
transform = Compose([ToPILImage(),ToTensor(),Normalize([0.0,0.0,0.0],[1.0,1.0,1.0])])
def prepare_features(examples):
images = []
labels = []
print(examples)
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(examples["image"][example_idx].permute(2,0,1)))
else:
images.append(examples["image"][example_idx].permute(2,0,1))
labels.append(examples["label"][example_idx])
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('cifar10')
raw_dataset.set_format('torch',columns=['img','label'])
raw_dataset = raw_dataset.rename_column('img','image')
features = datasets.Features({
"image": datasets.Array3D(shape=(3,32,32),dtype="float32"),
"label": datasets.features.ClassLabel(names=[
"airplane",
"automobile",
"bird",
"cat",
"deer",
"dog",
"frog",
"horse",
"ship",
"truck",
]),
})
train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
```
The error:
```python
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-54-bf29672c53ee> in <module>()
14 ]),
15 })
---> 16 train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
2 frames
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint)
1287 test_inputs = self[:2] if batched else self[0]
1288 test_indices = [0, 1] if batched else 0
-> 1289 update_data = does_function_return_dict(test_inputs, test_indices)
1290 logger.info("Testing finished, running the mapping function on the dataset")
1291
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in does_function_return_dict(inputs, indices)
1258 fn_args = [inputs] if input_columns is None else [inputs[col] for col in input_columns]
1259 processed_inputs = (
-> 1260 function(*fn_args, indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1261 )
1262 does_return_dict = isinstance(processed_inputs, Mapping)
<ipython-input-52-b4dccbafb70d> in prepare_features(examples)
3 labels = []
4 print(examples)
----> 5 for example_idx, example in enumerate(examples["image"]):
6 if transform is not None:
7 images.append(transform(examples["image"][example_idx].permute(2,0,1)))
KeyError: 'image'
```
The print statement inside returns this:
```python
{'label': tensor([6, 9])}
```
Apparently, both `img` and `image` do not exist after renaming.
Note that this code works fine with `img` everywhere.
Notebook: https://colab.research.google.com/drive/1SzESAlz3BnVYrgQeJ838vbMp1OsukiA2?usp=sharing
| 17
|
KeyError on using map after renaming a column
Hi,
I'm trying to use `cifar10` dataset. I want to rename the `img` feature to `image` in order to make it consistent with `mnist`, which I'm also planning to use. By doing this, I was trying to avoid modifying `prepare_train_features` function.
Here is what I try:
```python
transform = Compose([ToPILImage(),ToTensor(),Normalize([0.0,0.0,0.0],[1.0,1.0,1.0])])
def prepare_features(examples):
images = []
labels = []
print(examples)
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(examples["image"][example_idx].permute(2,0,1)))
else:
images.append(examples["image"][example_idx].permute(2,0,1))
labels.append(examples["label"][example_idx])
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('cifar10')
raw_dataset.set_format('torch',columns=['img','label'])
raw_dataset = raw_dataset.rename_column('img','image')
features = datasets.Features({
"image": datasets.Array3D(shape=(3,32,32),dtype="float32"),
"label": datasets.features.ClassLabel(names=[
"airplane",
"automobile",
"bird",
"cat",
"deer",
"dog",
"frog",
"horse",
"ship",
"truck",
]),
})
train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
```
The error:
```python
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-54-bf29672c53ee> in <module>()
14 ]),
15 })
---> 16 train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
2 frames
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint)
1287 test_inputs = self[:2] if batched else self[0]
1288 test_indices = [0, 1] if batched else 0
-> 1289 update_data = does_function_return_dict(test_inputs, test_indices)
1290 logger.info("Testing finished, running the mapping function on the dataset")
1291
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in does_function_return_dict(inputs, indices)
1258 fn_args = [inputs] if input_columns is None else [inputs[col] for col in input_columns]
1259 processed_inputs = (
-> 1260 function(*fn_args, indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1261 )
1262 does_return_dict = isinstance(processed_inputs, Mapping)
<ipython-input-52-b4dccbafb70d> in prepare_features(examples)
3 labels = []
4 print(examples)
----> 5 for example_idx, example in enumerate(examples["image"]):
6 if transform is not None:
7 images.append(transform(examples["image"][example_idx].permute(2,0,1)))
KeyError: 'image'
```
The print statement inside returns this:
```python
{'label': tensor([6, 9])}
```
Apparently, both `img` and `image` do not exist after renaming.
Note that this code works fine with `img` everywhere.
Notebook: https://colab.research.google.com/drive/1SzESAlz3BnVYrgQeJ838vbMp1OsukiA2?usp=sharing
Hi @mariosasko,
Thanks for opening a PR on this :)
Why does the old name also disappear?
|
[
0.03439004719257355,
0.006200449075549841,
-0.06358039379119873,
-0.33422738313674927,
0.4808429181575775,
0.2616387903690338,
0.6042653322219849,
0.23733164370059967,
0.13709120452404022,
0.08659175783395767,
0.0540347620844841,
0.5270304679870605,
-0.15589512884616852,
0.29946333169937134,
-0.19450080394744873,
-0.08811743557453156,
0.41338208317756653,
0.0935039073228836,
-0.11563385277986526,
0.19720254838466644,
-0.44354814291000366,
0.04970678314566612,
-0.3014577627182007,
0.28078484535217285,
-0.3147513270378113,
-0.17789645493030548,
0.05453328415751457,
-0.19385521113872528,
-0.24731791019439697,
-0.27466878294944763,
-0.04921545460820198,
0.0971030741930008,
-0.02236613631248474,
0.6005280613899231,
-0.00011894206545548514,
0.08269856125116348,
0.18870729207992554,
-0.08655141294002533,
0.08298621326684952,
-0.29607492685317993,
-0.1819148063659668,
-0.011541446670889854,
-0.223061665892601,
-0.5142752528190613,
0.04068552702665329,
-0.06361610442399979,
-0.0771729126572609,
-0.2671767771244049,
0.10244928300380707,
0.246700257062912,
0.1638299524784088,
-0.11388253420591354,
0.22092358767986298,
-0.0220476184040308,
0.04394765570759773,
0.23825466632843018,
-0.19265101850032806,
0.07693206518888474,
0.049104537814855576,
-0.35819947719573975,
0.2290983945131302,
0.6931737661361694,
-0.21425239741802216,
-0.0826263353228569,
0.2492942214012146,
0.14856673777103424,
0.413211464881897,
-0.3595774173736572,
0.3614654242992401,
-0.13661780953407288,
0.23790566623210907,
-0.1512388437986374,
-0.10437972843647003,
-0.05423123389482498,
-0.0018233235459774733,
-0.2537839114665985,
-0.023235514760017395,
-0.3196370601654053,
0.0776958018541336,
-0.2296994924545288,
-0.33052679896354675,
-0.18500743806362152,
0.12853623926639557,
0.20784422755241394,
0.12311432510614395,
-0.0971985012292862,
-0.029608486220240593,
0.4492819309234619,
0.1049039289355278,
-0.3226710855960846,
-0.12460561841726303,
0.02691228874027729,
0.0980830192565918,
0.2211734652519226,
-0.22417840361595154,
-0.06977559626102448,
0.10546539723873138,
-0.022715503349900246,
-0.2865687310695648,
-0.6728145480155945,
0.01709994301199913,
-0.1154983788728714,
0.18046408891677856,
0.07850198447704315,
0.10636134445667267,
0.2072904258966446,
-0.08792552351951599,
0.3839033544063568,
0.04374191164970398,
0.04999126121401787,
-0.3903316557407379,
-0.2533300817012787,
0.18438215553760529,
-0.39901572465896606,
0.35976073145866394,
0.24726173281669617,
0.3776051700115204,
0.09367865324020386,
0.41185250878334045,
-0.01276182197034359,
0.13943642377853394,
-0.09651055932044983,
-0.023579813539981842,
0.3582359254360199,
0.24442654848098755,
-0.05046595260500908,
0.10449724644422531,
0.14741156995296478,
-0.037725646048784256,
0.27445587515830994,
-0.039970025420188904,
0.1520816534757614,
-0.5921458005905151,
-0.10537679493427277,
-0.1591850072145462,
0.0644550770521164,
0.02737477235496044,
-0.1856069564819336,
0.12004158645868301,
-0.10297928750514984,
-0.01741429977118969,
-0.06256157904863358,
0.4089106321334839,
0.19146110117435455,
-0.3518824279308319,
0.11432355642318726,
0.22875149548053741,
-0.2352551817893982,
-0.12316090613603592,
0.2178235650062561,
-0.6010242700576782,
-0.18661949038505554,
-0.19354093074798584,
0.09118697792291641,
0.20307785272598267,
0.199644073843956,
-0.2752974033355713,
-0.13464492559432983,
0.5062406063079834,
-0.4040706753730774,
0.08267814666032791,
-0.24270913004875183,
-0.29490023851394653,
-0.23645538091659546,
-0.16903305053710938,
-0.033954694867134094,
-0.04627559334039688,
-0.025684235617518425,
-0.17594215273857117,
0.3576532006263733,
0.015510299243032932,
-0.04866238310933113,
-0.10098207741975784,
0.21325355768203735,
-0.03428361564874649,
0.16026607155799866,
0.42716532945632935,
-0.31456249952316284,
-0.2063589096069336,
-0.015260114334523678,
-0.22039894759655,
-0.1616610437631607,
-0.09202196449041367,
0.0930316299200058,
0.20390422642230988,
-0.07271372526884079,
0.43998223543167114,
-0.15441381931304932,
-0.08987114578485489,
0.17854785919189453,
0.13115881383419037,
-0.04621483385562897,
0.1775304675102234,
-0.07912331074476242,
0.12811186909675598,
0.20867323875427246,
0.11113552749156952,
0.011696133762598038,
-0.022794464603066444,
-0.20689229667186737,
0.0939345508813858,
0.09910296648740768,
0.21925212442874908,
-0.0245536919683218,
0.036057692021131516,
0.08036869764328003,
-0.32553017139434814,
0.16788126528263092,
0.18034137785434723,
0.14161288738250732,
-0.2925773859024048,
-0.11960219591856003,
-0.2550840675830841,
-0.1336408108472824,
-0.17606741189956665,
0.03164337947964668,
0.05520448461174965,
-0.054001182317733765,
-0.034420132637023926,
-0.14912444353103638,
-0.16488295793533325,
-0.15275627374649048,
0.049740396440029144,
0.10933196544647217,
-0.3486712872982025,
-0.018465556204319,
-0.2111009806394577,
-0.1441623717546463,
-0.38502371311187744,
0.01327594555914402,
0.1881345510482788,
-0.05409702658653259,
-0.23810803890228271,
0.3495650291442871,
0.139309361577034,
0.044096700847148895,
-0.3154120147228241,
0.17560657858848572,
0.0911012813448906,
-0.03345215693116188,
-0.0013047403190284967,
0.1042700782418251,
0.18146535754203796,
-0.034804414957761765,
0.11235760152339935,
0.25579163432121277,
-0.25813615322113037,
0.3806617558002472,
-0.23958876729011536,
0.1288553923368454,
-0.08415872603654861,
-0.176690936088562,
-0.2373664379119873,
-0.3937818109989166,
-0.14378254115581512,
-0.2950775623321533,
-0.23233146965503693,
-0.07121983915567398,
0.3053763508796692,
-0.20798106491565704,
0.5871581435203552,
-0.040982846170663834,
0.02409217320382595,
-0.005709812045097351,
0.06156255304813385,
0.28961747884750366,
0.011416779831051826,
0.10648953914642334,
0.29782959818840027,
-0.00961479265242815,
-0.2233598679304123,
0.2672613859176636,
0.17085197567939758,
0.2767238914966583,
0.20409442484378815,
0.216706320643425,
0.2447044551372528,
0.048027146607637405,
0.14855384826660156,
-0.06138908118009567,
0.016496771946549416,
-0.29990142583847046,
0.30999845266342163,
0.2844224274158478,
-0.2336350977420807,
0.09982375055551529,
-0.06604212522506714,
0.07008671760559082,
0.28239038586616516,
-0.15271690487861633,
0.056223124265670776,
-0.2700425684452057,
-0.09488902986049652,
0.3865874409675598,
0.09207707643508911,
0.43321388959884644,
-0.1842416673898697,
-0.37890252470970154,
0.24179691076278687,
-0.35465481877326965,
-0.036553673446178436,
-0.44943323731422424,
0.03062579594552517,
-0.032506063580513,
0.0856918916106224,
-0.4606234133243561,
0.08175579458475113,
-0.16478295624256134,
-0.135561004281044,
-0.12113343179225922,
-0.5227623581886292,
0.12185563892126083,
-0.44264599680900574,
0.01480346079915762,
0.24688883125782013,
0.2771115303039551,
-0.2926225960254669,
-0.17715120315551758,
0.4542587697505951,
-0.21786613762378693,
-0.14943160116672516,
0.12586769461631775,
0.012162660248577595,
-0.03933398425579071,
-0.11803414672613144,
-0.1904161125421524,
-0.026528362184762955,
-0.12349459528923035,
0.11690796166658401,
-0.26469686627388,
0.01631486788392067,
0.5068836212158203,
0.27591830492019653,
-0.2442614883184433,
0.1430359035730362,
-0.04893207550048828,
-0.15842889249324799,
-0.3822789490222931,
0.2083153873682022,
-0.08685991168022156,
0.08384066820144653,
0.004729356151074171,
-0.11430387943983078,
-0.0037283762358129025,
0.0410396084189415,
-0.18132184445858002,
-0.2923722565174103,
-0.08111485093832016,
0.25206610560417175,
0.1551317721605301,
0.10158838331699371,
0.2861320972442627,
0.41639354825019836,
-0.12338296324014664,
0.015547244809567928,
-0.22976134717464447,
-0.0407739020884037,
0.4496159851551056,
0.27504464983940125,
0.2839067280292511,
0.44892457127571106,
-0.016130419448018074,
0.29311317205429077,
-0.13201092183589935,
-0.1058143675327301,
0.45527327060699463,
-0.3281627297401428,
0.09713892638683319,
-0.42715132236480713,
-0.49833008646965027,
0.021225372329354286,
-0.3456515371799469,
-0.2692149579524994,
-0.2526130676269531,
-0.19740383327007294,
-0.20742984116077423,
-0.12508274614810944,
0.2784176468849182,
-0.48623475432395935,
-0.3314017355442047,
0.16035780310630798,
0.07059638947248459,
0.3074232041835785,
0.04876434803009033,
-0.019280221313238144,
-0.4495789110660553,
-0.16887983679771423,
0.09809505939483643,
0.024485046043992043,
0.055905334651470184,
-0.33550721406936646,
-0.6632707118988037,
-0.23652374744415283,
-0.3934516906738281,
0.4276644289493561,
0.11316049098968506,
0.15297795832157135,
-0.14101174473762512,
-0.06066591665148735,
-0.05564679205417633,
0.06886545568704605,
0.7746019959449768,
-0.44157689809799194,
-0.11490025371313095,
0.30108603835105896,
-0.04762253910303116,
-0.09884585440158844,
-0.24329794943332672,
-0.06724275648593903,
0.27336105704307556,
0.04728996753692627,
0.8124082684516907,
0.047417424619197845,
0.08439159393310547,
0.21454544365406036,
0.0629550889134407,
-0.06583381444215775,
0.028617115691304207,
-0.4060550928115845,
-0.28940096497535706,
-0.590724527835846,
-0.020670132711529732,
0.05729418992996216,
0.217359259724617,
0.3088783621788025,
0.18899616599082947,
0.1960790455341339,
-0.19456790387630463,
0.015449299477040768,
0.26640766859054565,
0.19868749380111694,
0.3779757618904114,
0.056051235646009445,
-0.04836863651871681,
0.12463360279798508,
0.003019434167072177,
0.14063869416713715,
-0.2207593023777008,
-0.27769407629966736,
-0.05735965073108673,
0.042271893471479416,
0.3460409939289093,
0.22131982445716858,
0.06288747489452362,
0.09592432528734207,
0.14610306918621063,
0.2581588327884674,
-0.27591368556022644,
0.29633432626724243,
0.49333029985427856,
0.14033092558383942,
-0.4810522496700287,
-0.3202231228351593,
0.23703111708164215,
0.21850544214248657,
-0.16900992393493652,
0.3816416263580322,
0.09295251220464706,
-0.329831600189209,
0.5882657766342163,
0.08547098934650421,
0.8382588028907776,
-0.3112327754497528,
0.05548463389277458,
-0.08506755530834198,
0.07848834991455078,
0.28673821687698364,
0.06256788969039917,
0.22338099777698517,
-0.19899560511112213,
-0.4336816668510437,
0.029441185295581818,
-0.058724645525217056,
0.3476182520389557,
0.08719182014465332,
-0.18709039688110352,
0.2699609696865082,
-0.22248677909374237,
0.5848435759544373,
-0.2539539337158203,
-0.24099120497703552,
0.21160350739955902,
-0.37431228160858154,
0.12431842088699341,
0.05664917826652527,
-0.06866119056940079,
0.09045165777206421,
0.010076339356601238,
0.14018556475639343,
-0.1021830290555954,
-0.3583540618419647,
0.06752730160951614,
-0.053940221667289734,
-0.2007296234369278,
0.2325121909379959,
-0.21370679140090942,
-0.21946506202220917,
-0.06756113469600677,
0.337904691696167,
0.3049488365650177,
0.2256919890642166,
0.07697935402393341,
0.2345018982887268,
0.44317036867141724,
0.20916670560836792,
-0.040884025394916534,
-0.16178523004055023,
-0.04702966287732124,
0.14012101292610168,
-0.28522947430610657,
0.1369480937719345,
-0.014186234213411808,
-0.24163059890270233,
-0.3642423748970032,
0.041563283652067184,
0.4323451817035675,
-0.3393738567829132,
-0.24990487098693848,
-0.15704187750816345,
-0.011291840113699436,
-0.10009327530860901,
0.06785985082387924,
-0.3800923228263855,
-0.1897212415933609,
0.4002576172351837,
-0.1145985797047615,
-0.4112882614135742,
0.1257440596818924,
0.36346906423568726,
0.08220595866441727,
0.013131429441273212,
0.5031774640083313,
-0.19953960180282593,
0.011348126456141472,
-0.08634303510189056,
0.09820550680160522,
0.215865358710289,
-0.08675048500299454,
0.029796890914440155,
0.3238893151283264,
-0.030904604122042656,
-0.1596028059720993,
0.4304635226726532,
0.05671415105462074,
0.2015259563922882,
0.0784539058804512,
-0.24326728284358978,
-0.6696435213088989,
0.4877867102622986,
0.10315081477165222,
0.24921631813049316,
0.1051928922533989,
0.3467663824558258,
-0.29485565423965454,
-0.011245349422097206,
-0.23995518684387207,
0.06492078304290771,
-0.043821681290864944,
0.3154599666595459,
0.4421725273132324,
0.025338510051369667,
-0.08960835635662079,
-0.2898135185241699,
0.20927779376506805,
0.2641288638114929,
-0.08504612743854523,
-0.21385926008224487,
-0.016767961904406548,
0.118308424949646,
0.10531659424304962,
-0.15056483447551727,
-0.024389751255512238,
-0.32315683364868164,
-0.027443792670965195,
-0.2703385055065155,
-0.08286922425031662,
0.33890169858932495,
0.03391844406723976,
0.1923673450946808,
-0.5534645915031433,
-0.08619105815887451,
0.30651867389678955,
0.13931012153625488,
-0.1251818835735321,
-0.05674056336283684,
0.2653049826622009,
0.1776149868965149,
-0.050407830625772476,
0.09706325829029083,
-0.29158011078834534,
-0.06840866804122925,
-0.15435175597667694,
0.11561371386051178,
0.34722843766212463,
-0.18881483376026154,
0.1339825838804245,
0.05610465258359909,
0.27962711453437805,
0.13100071251392365,
-0.25989609956741333,
-0.19481462240219116,
0.3021291196346283,
0.09886638820171356,
-0.3267251253128052,
-0.1829238384962082,
0.5215921401977539,
-0.015641186386346817,
0.24111248552799225,
0.23524221777915955,
-0.04850732535123825,
0.13168832659721375,
-0.2601727843284607,
-0.017790885642170906,
0.15293475985527039,
-0.07377735525369644,
0.24698084592819214,
0.6254125237464905,
-0.1150745153427124,
0.2715165615081787,
0.2926056385040283,
0.37308067083358765,
-0.12497740238904953,
0.6644849181175232,
0.06354989856481552,
0.20422035455703735,
0.158662810921669,
0.2688653767108917,
-0.11448035389184952,
-0.08995036035776138,
0.5314697027206421,
0.13465896248817444,
-0.22350244224071503,
0.29695627093315125,
0.19078734517097473,
-0.25905632972717285,
-0.001836314331740141,
-0.22525769472122192,
-0.0775449201464653,
0.28075897693634033,
-0.21775323152542114,
-0.25543010234832764,
-0.15150289237499237,
-0.036062996834516525,
0.0017213645623996854,
0.08056265860795975,
-0.05720824375748634,
0.06858707964420319,
0.6512491703033447,
0.026029402390122414,
0.05100424215197563,
0.09604521095752716,
-0.5209684371948242,
0.1352977305650711,
0.3933670222759247,
-0.13343563675880432,
-0.01799987442791462,
0.057154685258865356,
0.16420550644397736,
0.22000421583652496,
0.015519684180617332,
0.35678860545158386,
0.16927573084831238,
-0.2766987979412079,
0.16297942399978638,
-0.01959056593477726,
-0.1051778793334961,
0.26419588923454285,
0.04390417039394379,
0.32678356766700745,
0.008746059611439705,
0.10008305311203003,
0.03574595972895622,
-0.18553736805915833,
-0.1050802618265152,
0.14878053963184357,
0.19944779574871063,
0.19670633971691132,
-0.06667429208755493,
0.07766871154308319,
-0.13841837644577026,
-0.061289217323064804,
0.16629303991794586,
-0.2106761336326599,
-0.2168649435043335,
0.4741010367870331,
-0.11827561259269714,
0.18315531313419342,
0.1314241588115692,
0.06226655840873718,
0.1147591769695282,
0.19018597900867462,
0.10686147958040237,
-0.1823742687702179,
-0.5617815852165222,
-0.05064915493130684,
-0.3618876338005066,
-0.14546018838882446,
-0.048324957489967346,
0.09589316695928574,
0.00018412114877719432,
-0.2958844006061554,
0.28071820735931396,
0.10118994116783142,
0.435057669878006,
-0.48306161165237427,
-0.056659601628780365,
0.5606936812400818,
0.053983815014362335,
-0.06014345958828926,
0.02028477005660534,
0.24734295904636383,
0.10788930207490921,
-0.3471126854419708,
0.09702702611684799,
0.05866142362356186,
-0.008825809694826603,
-0.3392797112464905,
-0.1747090369462967,
-0.2541409134864807,
-0.22222813963890076,
0.4715783894062042,
0.17470340430736542,
0.42493101954460144,
-0.15176603198051453,
-0.0727754682302475,
0.1637454628944397,
-0.16768202185630798,
-0.016834426671266556,
0.20952224731445312,
0.2309509962797165,
0.3883240520954132,
-0.07110321521759033,
0.12801773846149445,
-0.3970898389816284,
0.0074614910408854485,
0.030202006921172142,
-0.18531100451946259,
-0.37659338116645813,
0.1869211047887802,
0.25499364733695984,
0.04083440080285072,
-0.18534451723098755,
0.3607898950576782,
0.03889675438404083,
0.5180012583732605,
-0.06803161650896072,
-0.3690662086009979,
0.7985031604766846,
-0.3579199016094208,
-0.6600227952003479,
0.08235903829336166,
-0.09001582860946655,
-0.1427427977323532,
0.041208624839782715,
-0.23881474137306213,
-0.06306424736976624,
0.0736408531665802,
-0.03345387056469917,
-0.34661582112312317,
0.09012875705957413,
-0.16457703709602356,
0.07983666658401489,
0.03644755855202675,
0.48609793186187744,
-0.31976714730262756,
-0.09455718845129013,
-0.24672704935073853,
-0.06323845684528351
] |
https://github.com/huggingface/datasets/issues/2026
|
KeyError on using map after renaming a column
|
I just merged a @mariosasko 's PR that fixes this issue.
If it happens again, feel free to re-open :)
|
Hi,
I'm trying to use `cifar10` dataset. I want to rename the `img` feature to `image` in order to make it consistent with `mnist`, which I'm also planning to use. By doing this, I was trying to avoid modifying `prepare_train_features` function.
Here is what I try:
```python
transform = Compose([ToPILImage(),ToTensor(),Normalize([0.0,0.0,0.0],[1.0,1.0,1.0])])
def prepare_features(examples):
images = []
labels = []
print(examples)
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(examples["image"][example_idx].permute(2,0,1)))
else:
images.append(examples["image"][example_idx].permute(2,0,1))
labels.append(examples["label"][example_idx])
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('cifar10')
raw_dataset.set_format('torch',columns=['img','label'])
raw_dataset = raw_dataset.rename_column('img','image')
features = datasets.Features({
"image": datasets.Array3D(shape=(3,32,32),dtype="float32"),
"label": datasets.features.ClassLabel(names=[
"airplane",
"automobile",
"bird",
"cat",
"deer",
"dog",
"frog",
"horse",
"ship",
"truck",
]),
})
train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
```
The error:
```python
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-54-bf29672c53ee> in <module>()
14 ]),
15 })
---> 16 train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
2 frames
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint)
1287 test_inputs = self[:2] if batched else self[0]
1288 test_indices = [0, 1] if batched else 0
-> 1289 update_data = does_function_return_dict(test_inputs, test_indices)
1290 logger.info("Testing finished, running the mapping function on the dataset")
1291
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in does_function_return_dict(inputs, indices)
1258 fn_args = [inputs] if input_columns is None else [inputs[col] for col in input_columns]
1259 processed_inputs = (
-> 1260 function(*fn_args, indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1261 )
1262 does_return_dict = isinstance(processed_inputs, Mapping)
<ipython-input-52-b4dccbafb70d> in prepare_features(examples)
3 labels = []
4 print(examples)
----> 5 for example_idx, example in enumerate(examples["image"]):
6 if transform is not None:
7 images.append(transform(examples["image"][example_idx].permute(2,0,1)))
KeyError: 'image'
```
The print statement inside returns this:
```python
{'label': tensor([6, 9])}
```
Apparently, both `img` and `image` do not exist after renaming.
Note that this code works fine with `img` everywhere.
Notebook: https://colab.research.google.com/drive/1SzESAlz3BnVYrgQeJ838vbMp1OsukiA2?usp=sharing
| 20
|
KeyError on using map after renaming a column
Hi,
I'm trying to use `cifar10` dataset. I want to rename the `img` feature to `image` in order to make it consistent with `mnist`, which I'm also planning to use. By doing this, I was trying to avoid modifying `prepare_train_features` function.
Here is what I try:
```python
transform = Compose([ToPILImage(),ToTensor(),Normalize([0.0,0.0,0.0],[1.0,1.0,1.0])])
def prepare_features(examples):
images = []
labels = []
print(examples)
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(examples["image"][example_idx].permute(2,0,1)))
else:
images.append(examples["image"][example_idx].permute(2,0,1))
labels.append(examples["label"][example_idx])
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('cifar10')
raw_dataset.set_format('torch',columns=['img','label'])
raw_dataset = raw_dataset.rename_column('img','image')
features = datasets.Features({
"image": datasets.Array3D(shape=(3,32,32),dtype="float32"),
"label": datasets.features.ClassLabel(names=[
"airplane",
"automobile",
"bird",
"cat",
"deer",
"dog",
"frog",
"horse",
"ship",
"truck",
]),
})
train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
```
The error:
```python
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-54-bf29672c53ee> in <module>()
14 ]),
15 })
---> 16 train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
2 frames
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint)
1287 test_inputs = self[:2] if batched else self[0]
1288 test_indices = [0, 1] if batched else 0
-> 1289 update_data = does_function_return_dict(test_inputs, test_indices)
1290 logger.info("Testing finished, running the mapping function on the dataset")
1291
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in does_function_return_dict(inputs, indices)
1258 fn_args = [inputs] if input_columns is None else [inputs[col] for col in input_columns]
1259 processed_inputs = (
-> 1260 function(*fn_args, indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1261 )
1262 does_return_dict = isinstance(processed_inputs, Mapping)
<ipython-input-52-b4dccbafb70d> in prepare_features(examples)
3 labels = []
4 print(examples)
----> 5 for example_idx, example in enumerate(examples["image"]):
6 if transform is not None:
7 images.append(transform(examples["image"][example_idx].permute(2,0,1)))
KeyError: 'image'
```
The print statement inside returns this:
```python
{'label': tensor([6, 9])}
```
Apparently, both `img` and `image` do not exist after renaming.
Note that this code works fine with `img` everywhere.
Notebook: https://colab.research.google.com/drive/1SzESAlz3BnVYrgQeJ838vbMp1OsukiA2?usp=sharing
I just merged a @mariosasko 's PR that fixes this issue.
If it happens again, feel free to re-open :)
|
[
0.03439004719257355,
0.006200449075549841,
-0.06358039379119873,
-0.33422738313674927,
0.4808429181575775,
0.2616387903690338,
0.6042653322219849,
0.23733164370059967,
0.13709120452404022,
0.08659175783395767,
0.0540347620844841,
0.5270304679870605,
-0.15589512884616852,
0.29946333169937134,
-0.19450080394744873,
-0.08811743557453156,
0.41338208317756653,
0.0935039073228836,
-0.11563385277986526,
0.19720254838466644,
-0.44354814291000366,
0.04970678314566612,
-0.3014577627182007,
0.28078484535217285,
-0.3147513270378113,
-0.17789645493030548,
0.05453328415751457,
-0.19385521113872528,
-0.24731791019439697,
-0.27466878294944763,
-0.04921545460820198,
0.0971030741930008,
-0.02236613631248474,
0.6005280613899231,
-0.00011894206545548514,
0.08269856125116348,
0.18870729207992554,
-0.08655141294002533,
0.08298621326684952,
-0.29607492685317993,
-0.1819148063659668,
-0.011541446670889854,
-0.223061665892601,
-0.5142752528190613,
0.04068552702665329,
-0.06361610442399979,
-0.0771729126572609,
-0.2671767771244049,
0.10244928300380707,
0.246700257062912,
0.1638299524784088,
-0.11388253420591354,
0.22092358767986298,
-0.0220476184040308,
0.04394765570759773,
0.23825466632843018,
-0.19265101850032806,
0.07693206518888474,
0.049104537814855576,
-0.35819947719573975,
0.2290983945131302,
0.6931737661361694,
-0.21425239741802216,
-0.0826263353228569,
0.2492942214012146,
0.14856673777103424,
0.413211464881897,
-0.3595774173736572,
0.3614654242992401,
-0.13661780953407288,
0.23790566623210907,
-0.1512388437986374,
-0.10437972843647003,
-0.05423123389482498,
-0.0018233235459774733,
-0.2537839114665985,
-0.023235514760017395,
-0.3196370601654053,
0.0776958018541336,
-0.2296994924545288,
-0.33052679896354675,
-0.18500743806362152,
0.12853623926639557,
0.20784422755241394,
0.12311432510614395,
-0.0971985012292862,
-0.029608486220240593,
0.4492819309234619,
0.1049039289355278,
-0.3226710855960846,
-0.12460561841726303,
0.02691228874027729,
0.0980830192565918,
0.2211734652519226,
-0.22417840361595154,
-0.06977559626102448,
0.10546539723873138,
-0.022715503349900246,
-0.2865687310695648,
-0.6728145480155945,
0.01709994301199913,
-0.1154983788728714,
0.18046408891677856,
0.07850198447704315,
0.10636134445667267,
0.2072904258966446,
-0.08792552351951599,
0.3839033544063568,
0.04374191164970398,
0.04999126121401787,
-0.3903316557407379,
-0.2533300817012787,
0.18438215553760529,
-0.39901572465896606,
0.35976073145866394,
0.24726173281669617,
0.3776051700115204,
0.09367865324020386,
0.41185250878334045,
-0.01276182197034359,
0.13943642377853394,
-0.09651055932044983,
-0.023579813539981842,
0.3582359254360199,
0.24442654848098755,
-0.05046595260500908,
0.10449724644422531,
0.14741156995296478,
-0.037725646048784256,
0.27445587515830994,
-0.039970025420188904,
0.1520816534757614,
-0.5921458005905151,
-0.10537679493427277,
-0.1591850072145462,
0.0644550770521164,
0.02737477235496044,
-0.1856069564819336,
0.12004158645868301,
-0.10297928750514984,
-0.01741429977118969,
-0.06256157904863358,
0.4089106321334839,
0.19146110117435455,
-0.3518824279308319,
0.11432355642318726,
0.22875149548053741,
-0.2352551817893982,
-0.12316090613603592,
0.2178235650062561,
-0.6010242700576782,
-0.18661949038505554,
-0.19354093074798584,
0.09118697792291641,
0.20307785272598267,
0.199644073843956,
-0.2752974033355713,
-0.13464492559432983,
0.5062406063079834,
-0.4040706753730774,
0.08267814666032791,
-0.24270913004875183,
-0.29490023851394653,
-0.23645538091659546,
-0.16903305053710938,
-0.033954694867134094,
-0.04627559334039688,
-0.025684235617518425,
-0.17594215273857117,
0.3576532006263733,
0.015510299243032932,
-0.04866238310933113,
-0.10098207741975784,
0.21325355768203735,
-0.03428361564874649,
0.16026607155799866,
0.42716532945632935,
-0.31456249952316284,
-0.2063589096069336,
-0.015260114334523678,
-0.22039894759655,
-0.1616610437631607,
-0.09202196449041367,
0.0930316299200058,
0.20390422642230988,
-0.07271372526884079,
0.43998223543167114,
-0.15441381931304932,
-0.08987114578485489,
0.17854785919189453,
0.13115881383419037,
-0.04621483385562897,
0.1775304675102234,
-0.07912331074476242,
0.12811186909675598,
0.20867323875427246,
0.11113552749156952,
0.011696133762598038,
-0.022794464603066444,
-0.20689229667186737,
0.0939345508813858,
0.09910296648740768,
0.21925212442874908,
-0.0245536919683218,
0.036057692021131516,
0.08036869764328003,
-0.32553017139434814,
0.16788126528263092,
0.18034137785434723,
0.14161288738250732,
-0.2925773859024048,
-0.11960219591856003,
-0.2550840675830841,
-0.1336408108472824,
-0.17606741189956665,
0.03164337947964668,
0.05520448461174965,
-0.054001182317733765,
-0.034420132637023926,
-0.14912444353103638,
-0.16488295793533325,
-0.15275627374649048,
0.049740396440029144,
0.10933196544647217,
-0.3486712872982025,
-0.018465556204319,
-0.2111009806394577,
-0.1441623717546463,
-0.38502371311187744,
0.01327594555914402,
0.1881345510482788,
-0.05409702658653259,
-0.23810803890228271,
0.3495650291442871,
0.139309361577034,
0.044096700847148895,
-0.3154120147228241,
0.17560657858848572,
0.0911012813448906,
-0.03345215693116188,
-0.0013047403190284967,
0.1042700782418251,
0.18146535754203796,
-0.034804414957761765,
0.11235760152339935,
0.25579163432121277,
-0.25813615322113037,
0.3806617558002472,
-0.23958876729011536,
0.1288553923368454,
-0.08415872603654861,
-0.176690936088562,
-0.2373664379119873,
-0.3937818109989166,
-0.14378254115581512,
-0.2950775623321533,
-0.23233146965503693,
-0.07121983915567398,
0.3053763508796692,
-0.20798106491565704,
0.5871581435203552,
-0.040982846170663834,
0.02409217320382595,
-0.005709812045097351,
0.06156255304813385,
0.28961747884750366,
0.011416779831051826,
0.10648953914642334,
0.29782959818840027,
-0.00961479265242815,
-0.2233598679304123,
0.2672613859176636,
0.17085197567939758,
0.2767238914966583,
0.20409442484378815,
0.216706320643425,
0.2447044551372528,
0.048027146607637405,
0.14855384826660156,
-0.06138908118009567,
0.016496771946549416,
-0.29990142583847046,
0.30999845266342163,
0.2844224274158478,
-0.2336350977420807,
0.09982375055551529,
-0.06604212522506714,
0.07008671760559082,
0.28239038586616516,
-0.15271690487861633,
0.056223124265670776,
-0.2700425684452057,
-0.09488902986049652,
0.3865874409675598,
0.09207707643508911,
0.43321388959884644,
-0.1842416673898697,
-0.37890252470970154,
0.24179691076278687,
-0.35465481877326965,
-0.036553673446178436,
-0.44943323731422424,
0.03062579594552517,
-0.032506063580513,
0.0856918916106224,
-0.4606234133243561,
0.08175579458475113,
-0.16478295624256134,
-0.135561004281044,
-0.12113343179225922,
-0.5227623581886292,
0.12185563892126083,
-0.44264599680900574,
0.01480346079915762,
0.24688883125782013,
0.2771115303039551,
-0.2926225960254669,
-0.17715120315551758,
0.4542587697505951,
-0.21786613762378693,
-0.14943160116672516,
0.12586769461631775,
0.012162660248577595,
-0.03933398425579071,
-0.11803414672613144,
-0.1904161125421524,
-0.026528362184762955,
-0.12349459528923035,
0.11690796166658401,
-0.26469686627388,
0.01631486788392067,
0.5068836212158203,
0.27591830492019653,
-0.2442614883184433,
0.1430359035730362,
-0.04893207550048828,
-0.15842889249324799,
-0.3822789490222931,
0.2083153873682022,
-0.08685991168022156,
0.08384066820144653,
0.004729356151074171,
-0.11430387943983078,
-0.0037283762358129025,
0.0410396084189415,
-0.18132184445858002,
-0.2923722565174103,
-0.08111485093832016,
0.25206610560417175,
0.1551317721605301,
0.10158838331699371,
0.2861320972442627,
0.41639354825019836,
-0.12338296324014664,
0.015547244809567928,
-0.22976134717464447,
-0.0407739020884037,
0.4496159851551056,
0.27504464983940125,
0.2839067280292511,
0.44892457127571106,
-0.016130419448018074,
0.29311317205429077,
-0.13201092183589935,
-0.1058143675327301,
0.45527327060699463,
-0.3281627297401428,
0.09713892638683319,
-0.42715132236480713,
-0.49833008646965027,
0.021225372329354286,
-0.3456515371799469,
-0.2692149579524994,
-0.2526130676269531,
-0.19740383327007294,
-0.20742984116077423,
-0.12508274614810944,
0.2784176468849182,
-0.48623475432395935,
-0.3314017355442047,
0.16035780310630798,
0.07059638947248459,
0.3074232041835785,
0.04876434803009033,
-0.019280221313238144,
-0.4495789110660553,
-0.16887983679771423,
0.09809505939483643,
0.024485046043992043,
0.055905334651470184,
-0.33550721406936646,
-0.6632707118988037,
-0.23652374744415283,
-0.3934516906738281,
0.4276644289493561,
0.11316049098968506,
0.15297795832157135,
-0.14101174473762512,
-0.06066591665148735,
-0.05564679205417633,
0.06886545568704605,
0.7746019959449768,
-0.44157689809799194,
-0.11490025371313095,
0.30108603835105896,
-0.04762253910303116,
-0.09884585440158844,
-0.24329794943332672,
-0.06724275648593903,
0.27336105704307556,
0.04728996753692627,
0.8124082684516907,
0.047417424619197845,
0.08439159393310547,
0.21454544365406036,
0.0629550889134407,
-0.06583381444215775,
0.028617115691304207,
-0.4060550928115845,
-0.28940096497535706,
-0.590724527835846,
-0.020670132711529732,
0.05729418992996216,
0.217359259724617,
0.3088783621788025,
0.18899616599082947,
0.1960790455341339,
-0.19456790387630463,
0.015449299477040768,
0.26640766859054565,
0.19868749380111694,
0.3779757618904114,
0.056051235646009445,
-0.04836863651871681,
0.12463360279798508,
0.003019434167072177,
0.14063869416713715,
-0.2207593023777008,
-0.27769407629966736,
-0.05735965073108673,
0.042271893471479416,
0.3460409939289093,
0.22131982445716858,
0.06288747489452362,
0.09592432528734207,
0.14610306918621063,
0.2581588327884674,
-0.27591368556022644,
0.29633432626724243,
0.49333029985427856,
0.14033092558383942,
-0.4810522496700287,
-0.3202231228351593,
0.23703111708164215,
0.21850544214248657,
-0.16900992393493652,
0.3816416263580322,
0.09295251220464706,
-0.329831600189209,
0.5882657766342163,
0.08547098934650421,
0.8382588028907776,
-0.3112327754497528,
0.05548463389277458,
-0.08506755530834198,
0.07848834991455078,
0.28673821687698364,
0.06256788969039917,
0.22338099777698517,
-0.19899560511112213,
-0.4336816668510437,
0.029441185295581818,
-0.058724645525217056,
0.3476182520389557,
0.08719182014465332,
-0.18709039688110352,
0.2699609696865082,
-0.22248677909374237,
0.5848435759544373,
-0.2539539337158203,
-0.24099120497703552,
0.21160350739955902,
-0.37431228160858154,
0.12431842088699341,
0.05664917826652527,
-0.06866119056940079,
0.09045165777206421,
0.010076339356601238,
0.14018556475639343,
-0.1021830290555954,
-0.3583540618419647,
0.06752730160951614,
-0.053940221667289734,
-0.2007296234369278,
0.2325121909379959,
-0.21370679140090942,
-0.21946506202220917,
-0.06756113469600677,
0.337904691696167,
0.3049488365650177,
0.2256919890642166,
0.07697935402393341,
0.2345018982887268,
0.44317036867141724,
0.20916670560836792,
-0.040884025394916534,
-0.16178523004055023,
-0.04702966287732124,
0.14012101292610168,
-0.28522947430610657,
0.1369480937719345,
-0.014186234213411808,
-0.24163059890270233,
-0.3642423748970032,
0.041563283652067184,
0.4323451817035675,
-0.3393738567829132,
-0.24990487098693848,
-0.15704187750816345,
-0.011291840113699436,
-0.10009327530860901,
0.06785985082387924,
-0.3800923228263855,
-0.1897212415933609,
0.4002576172351837,
-0.1145985797047615,
-0.4112882614135742,
0.1257440596818924,
0.36346906423568726,
0.08220595866441727,
0.013131429441273212,
0.5031774640083313,
-0.19953960180282593,
0.011348126456141472,
-0.08634303510189056,
0.09820550680160522,
0.215865358710289,
-0.08675048500299454,
0.029796890914440155,
0.3238893151283264,
-0.030904604122042656,
-0.1596028059720993,
0.4304635226726532,
0.05671415105462074,
0.2015259563922882,
0.0784539058804512,
-0.24326728284358978,
-0.6696435213088989,
0.4877867102622986,
0.10315081477165222,
0.24921631813049316,
0.1051928922533989,
0.3467663824558258,
-0.29485565423965454,
-0.011245349422097206,
-0.23995518684387207,
0.06492078304290771,
-0.043821681290864944,
0.3154599666595459,
0.4421725273132324,
0.025338510051369667,
-0.08960835635662079,
-0.2898135185241699,
0.20927779376506805,
0.2641288638114929,
-0.08504612743854523,
-0.21385926008224487,
-0.016767961904406548,
0.118308424949646,
0.10531659424304962,
-0.15056483447551727,
-0.024389751255512238,
-0.32315683364868164,
-0.027443792670965195,
-0.2703385055065155,
-0.08286922425031662,
0.33890169858932495,
0.03391844406723976,
0.1923673450946808,
-0.5534645915031433,
-0.08619105815887451,
0.30651867389678955,
0.13931012153625488,
-0.1251818835735321,
-0.05674056336283684,
0.2653049826622009,
0.1776149868965149,
-0.050407830625772476,
0.09706325829029083,
-0.29158011078834534,
-0.06840866804122925,
-0.15435175597667694,
0.11561371386051178,
0.34722843766212463,
-0.18881483376026154,
0.1339825838804245,
0.05610465258359909,
0.27962711453437805,
0.13100071251392365,
-0.25989609956741333,
-0.19481462240219116,
0.3021291196346283,
0.09886638820171356,
-0.3267251253128052,
-0.1829238384962082,
0.5215921401977539,
-0.015641186386346817,
0.24111248552799225,
0.23524221777915955,
-0.04850732535123825,
0.13168832659721375,
-0.2601727843284607,
-0.017790885642170906,
0.15293475985527039,
-0.07377735525369644,
0.24698084592819214,
0.6254125237464905,
-0.1150745153427124,
0.2715165615081787,
0.2926056385040283,
0.37308067083358765,
-0.12497740238904953,
0.6644849181175232,
0.06354989856481552,
0.20422035455703735,
0.158662810921669,
0.2688653767108917,
-0.11448035389184952,
-0.08995036035776138,
0.5314697027206421,
0.13465896248817444,
-0.22350244224071503,
0.29695627093315125,
0.19078734517097473,
-0.25905632972717285,
-0.001836314331740141,
-0.22525769472122192,
-0.0775449201464653,
0.28075897693634033,
-0.21775323152542114,
-0.25543010234832764,
-0.15150289237499237,
-0.036062996834516525,
0.0017213645623996854,
0.08056265860795975,
-0.05720824375748634,
0.06858707964420319,
0.6512491703033447,
0.026029402390122414,
0.05100424215197563,
0.09604521095752716,
-0.5209684371948242,
0.1352977305650711,
0.3933670222759247,
-0.13343563675880432,
-0.01799987442791462,
0.057154685258865356,
0.16420550644397736,
0.22000421583652496,
0.015519684180617332,
0.35678860545158386,
0.16927573084831238,
-0.2766987979412079,
0.16297942399978638,
-0.01959056593477726,
-0.1051778793334961,
0.26419588923454285,
0.04390417039394379,
0.32678356766700745,
0.008746059611439705,
0.10008305311203003,
0.03574595972895622,
-0.18553736805915833,
-0.1050802618265152,
0.14878053963184357,
0.19944779574871063,
0.19670633971691132,
-0.06667429208755493,
0.07766871154308319,
-0.13841837644577026,
-0.061289217323064804,
0.16629303991794586,
-0.2106761336326599,
-0.2168649435043335,
0.4741010367870331,
-0.11827561259269714,
0.18315531313419342,
0.1314241588115692,
0.06226655840873718,
0.1147591769695282,
0.19018597900867462,
0.10686147958040237,
-0.1823742687702179,
-0.5617815852165222,
-0.05064915493130684,
-0.3618876338005066,
-0.14546018838882446,
-0.048324957489967346,
0.09589316695928574,
0.00018412114877719432,
-0.2958844006061554,
0.28071820735931396,
0.10118994116783142,
0.435057669878006,
-0.48306161165237427,
-0.056659601628780365,
0.5606936812400818,
0.053983815014362335,
-0.06014345958828926,
0.02028477005660534,
0.24734295904636383,
0.10788930207490921,
-0.3471126854419708,
0.09702702611684799,
0.05866142362356186,
-0.008825809694826603,
-0.3392797112464905,
-0.1747090369462967,
-0.2541409134864807,
-0.22222813963890076,
0.4715783894062042,
0.17470340430736542,
0.42493101954460144,
-0.15176603198051453,
-0.0727754682302475,
0.1637454628944397,
-0.16768202185630798,
-0.016834426671266556,
0.20952224731445312,
0.2309509962797165,
0.3883240520954132,
-0.07110321521759033,
0.12801773846149445,
-0.3970898389816284,
0.0074614910408854485,
0.030202006921172142,
-0.18531100451946259,
-0.37659338116645813,
0.1869211047887802,
0.25499364733695984,
0.04083440080285072,
-0.18534451723098755,
0.3607898950576782,
0.03889675438404083,
0.5180012583732605,
-0.06803161650896072,
-0.3690662086009979,
0.7985031604766846,
-0.3579199016094208,
-0.6600227952003479,
0.08235903829336166,
-0.09001582860946655,
-0.1427427977323532,
0.041208624839782715,
-0.23881474137306213,
-0.06306424736976624,
0.0736408531665802,
-0.03345387056469917,
-0.34661582112312317,
0.09012875705957413,
-0.16457703709602356,
0.07983666658401489,
0.03644755855202675,
0.48609793186187744,
-0.31976714730262756,
-0.09455718845129013,
-0.24672704935073853,
-0.06323845684528351
] |
https://github.com/huggingface/datasets/issues/2022
|
ValueError when rename_column on splitted dataset
|
Hi,
This is a bug so thanks for reporting it. `Dataset.__setstate__` is the problem, which is called when `Dataset.rename_column` tries to copy the dataset with `copy.deepcopy(self)`. This only happens if the `split` arg in `load_dataset` was defined as `ReadInstruction`.
To overcome this issue, use the named splits API (for now):
```python
train_ds, test_ds = load_dataset(
path='csv',
delimiter='\t',
data_files=text_files,
split=['train[:90%]', 'train[-10%:]'],
)
train_ds = train_ds.rename_column('sentence', 'text')
```
|
Hi there,
I am loading `.tsv` file via `load_dataset` and subsequently split the rows into training and test set via the `ReadInstruction` API like so:
```python
split = {
'train': ReadInstruction('train', to=90, unit='%'),
'test': ReadInstruction('train', from_=-10, unit='%')
}
dataset = load_dataset(
path='csv', # use 'text' loading script to load from local txt-files
delimiter='\t', # xxx
data_files=text_files, # list of paths to local text files
split=split, # xxx
)
dataset
```
Part of output:
```python
DatasetDict({
train: Dataset({
features: ['sentence', 'sentiment'],
num_rows: 900
})
test: Dataset({
features: ['sentence', 'sentiment'],
num_rows: 100
})
})
```
Afterwards I'd like to rename the 'sentence' column to 'text' in order to be compatible with my modelin pipeline. If I run the following code I experience a `ValueError` however:
```python
dataset['train'].rename_column('sentence', 'text')
```
```python
/usr/local/lib/python3.7/dist-packages/datasets/splits.py in __init__(self, name)
353 for split_name in split_names_from_instruction:
354 if not re.match(_split_re, split_name):
--> 355 raise ValueError(f"Split name should match '{_split_re}'' but got '{split_name}'.")
356
357 def __str__(self):
ValueError: Split name should match '^\w+(\.\w+)*$'' but got 'ReadInstruction('.
```
In particular, these behavior does not arise if I use the deprecated `rename_column_` method. Any idea what causes the error? Would assume something in the way I defined the split.
Thanks in advance! :)
| 66
|
ValueError when rename_column on splitted dataset
Hi there,
I am loading `.tsv` file via `load_dataset` and subsequently split the rows into training and test set via the `ReadInstruction` API like so:
```python
split = {
'train': ReadInstruction('train', to=90, unit='%'),
'test': ReadInstruction('train', from_=-10, unit='%')
}
dataset = load_dataset(
path='csv', # use 'text' loading script to load from local txt-files
delimiter='\t', # xxx
data_files=text_files, # list of paths to local text files
split=split, # xxx
)
dataset
```
Part of output:
```python
DatasetDict({
train: Dataset({
features: ['sentence', 'sentiment'],
num_rows: 900
})
test: Dataset({
features: ['sentence', 'sentiment'],
num_rows: 100
})
})
```
Afterwards I'd like to rename the 'sentence' column to 'text' in order to be compatible with my modelin pipeline. If I run the following code I experience a `ValueError` however:
```python
dataset['train'].rename_column('sentence', 'text')
```
```python
/usr/local/lib/python3.7/dist-packages/datasets/splits.py in __init__(self, name)
353 for split_name in split_names_from_instruction:
354 if not re.match(_split_re, split_name):
--> 355 raise ValueError(f"Split name should match '{_split_re}'' but got '{split_name}'.")
356
357 def __str__(self):
ValueError: Split name should match '^\w+(\.\w+)*$'' but got 'ReadInstruction('.
```
In particular, these behavior does not arise if I use the deprecated `rename_column_` method. Any idea what causes the error? Would assume something in the way I defined the split.
Thanks in advance! :)
Hi,
This is a bug so thanks for reporting it. `Dataset.__setstate__` is the problem, which is called when `Dataset.rename_column` tries to copy the dataset with `copy.deepcopy(self)`. This only happens if the `split` arg in `load_dataset` was defined as `ReadInstruction`.
To overcome this issue, use the named splits API (for now):
```python
train_ds, test_ds = load_dataset(
path='csv',
delimiter='\t',
data_files=text_files,
split=['train[:90%]', 'train[-10%:]'],
)
train_ds = train_ds.rename_column('sentence', 'text')
```
|
[
-0.08357539027929306,
0.2197989523410797,
-0.03482964634895325,
-0.04238370060920715,
0.42087602615356445,
0.07306133955717087,
0.6438035368919373,
0.4179837703704834,
-0.02255256474018097,
0.339653342962265,
-0.08668701350688934,
0.3978041410446167,
-0.052184607833623886,
0.364435613155365,
-0.2562583386898041,
-0.24770545959472656,
0.10441388934850693,
-0.07954174280166626,
0.1267358660697937,
0.2697296142578125,
-0.33005258440971375,
0.07780793309211731,
-0.3932778239250183,
0.12606869637966156,
-0.07813368737697601,
0.06238041818141937,
0.032519564032554626,
0.09537623822689056,
0.028275813907384872,
-0.36107751727104187,
0.1441165953874588,
-0.035510074347257614,
0.18996478617191315,
0.5556841492652893,
-0.00011623618775047362,
0.12328147143125534,
0.22254841029644012,
-0.12801766395568848,
-0.18916267156600952,
-0.4528481662273407,
-0.005278439726680517,
-0.16803602874279022,
0.0017359595512971282,
-0.3506769835948944,
0.17072398960590363,
0.22847692668437958,
-0.23099543154239655,
-0.2584793269634247,
0.10060704499483109,
0.36931291222572327,
0.1076900064945221,
0.09653060883283615,
-0.010720080696046352,
0.11912558227777481,
0.10851556062698364,
0.02124818228185177,
-0.30477219820022583,
0.08998295664787292,
-0.076124407351017,
-0.17922036349773407,
-0.11379043757915497,
0.23175112903118134,
-0.0711771547794342,
0.14804230630397797,
-0.02354508452117443,
0.3106744587421417,
0.03458888828754425,
-0.04696495831012726,
0.08885286748409271,
0.06717966496944427,
0.21446935832500458,
-0.24017870426177979,
-0.46399039030075073,
-0.44429439306259155,
0.16377171874046326,
-0.3250170648097992,
0.25705012679100037,
-0.18774577975273132,
0.12323673814535141,
0.18407465517520905,
-0.13986559212207794,
0.052361778914928436,
-0.13730551302433014,
-0.140639066696167,
-0.09230343252420425,
0.0893622562289238,
-0.03236187994480133,
0.40946972370147705,
-0.10029364377260208,
-0.11142924427986145,
0.17490851879119873,
0.051333244889974594,
-0.07852088660001755,
-0.13118037581443787,
-0.5019624829292297,
0.027813702821731567,
-0.2302481234073639,
-0.2595575153827667,
-0.3201276957988739,
-0.12000276148319244,
0.015836108475923538,
-0.2517312169075012,
0.2726791799068451,
0.21649785339832306,
-0.036298803985118866,
0.1996530294418335,
0.1301002949476242,
0.48517727851867676,
0.23599696159362793,
0.14029863476753235,
-0.2038479894399643,
-0.0915253609418869,
0.06073436886072159,
-0.29887381196022034,
0.14961859583854675,
0.19085855782032013,
0.13883854448795319,
0.10122460871934891,
-0.42232125997543335,
-0.021415838971734047,
-0.29993119835853577,
-0.18861718475818634,
-0.03053387813270092,
0.22145597636699677,
0.20323878526687622,
0.4568878710269928,
0.16938713192939758,
0.05747990310192108,
-0.0006994742434471846,
-0.14065146446228027,
-0.03712533786892891,
0.17933303117752075,
-0.30196866393089294,
0.1505986750125885,
0.03997021168470383,
0.1964549869298935,
0.08144459128379822,
-0.27065742015838623,
-0.020825011655688286,
-0.29915452003479004,
-0.02031986229121685,
-0.19919276237487793,
0.09521114081144333,
0.2918281853199005,
-0.08355164527893066,
-0.10790881514549255,
0.11641368269920349,
-0.44579821825027466,
0.035215720534324646,
0.25792405009269714,
-0.25360509753227234,
-0.32079240679740906,
0.13972537219524384,
0.12860003113746643,
0.03990136459469795,
-0.05275364965200424,
0.04824020341038704,
-0.022960688918828964,
0.6056430339813232,
-0.13944490253925323,
0.13514497876167297,
-0.3096872568130493,
-0.22670595347881317,
-0.01604033075273037,
-0.03327888250350952,
0.10004330426454544,
-0.5333274006843567,
-0.11848381906747818,
0.06362029165029526,
0.1941964030265808,
0.1769789755344391,
0.175530344247818,
0.18300136923789978,
0.1583339124917984,
0.13353906571865082,
0.2669028341770172,
0.296729177236557,
-0.39586517214775085,
0.028894972056150436,
0.2807649075984955,
-0.3185529112815857,
-0.1601911038160324,
0.37078163027763367,
-0.21733854711055756,
0.12075065076351166,
-0.10769324749708176,
0.1341785043478012,
0.011336690746247768,
-0.06573580950498581,
0.09607699513435364,
-0.037814583629369736,
-0.07014581561088562,
0.3307214677333832,
-0.01802160032093525,
0.018864039331674576,
-0.11579025536775589,
-0.15686190128326416,
-0.2933062016963959,
0.32436126470565796,
-0.026464805006980896,
0.11641806364059448,
0.13003329932689667,
0.10575735569000244,
0.5420784950256348,
0.12000124156475067,
-0.08323013037443161,
-0.22531437873840332,
0.02838347852230072,
0.3180809020996094,
-0.16832496225833893,
-0.3165961503982544,
-0.1709282547235489,
-0.43260112404823303,
0.048943862318992615,
-0.07522281259298325,
0.04720456153154373,
0.03131360560655594,
0.2542942464351654,
-0.1051323264837265,
-0.12179061025381088,
-0.4117276966571808,
0.2951658070087433,
-0.5749082565307617,
0.24643275141716003,
-0.31800052523612976,
0.07760030776262283,
0.0061791036278009415,
-0.3219505548477173,
-0.2502313256263733,
0.15526656806468964,
0.1714714765548706,
-0.011289727874100208,
-0.2374323457479477,
0.6657506823539734,
0.34775152802467346,
0.04634331166744232,
-0.37653350830078125,
-0.27698177099227905,
-0.10850021988153458,
0.24177514016628265,
-0.23580539226531982,
-0.13306982815265656,
0.24574753642082214,
-0.04125108942389488,
-0.06281234323978424,
0.2938639223575592,
-0.42021557688713074,
0.5500608086585999,
-0.010936718434095383,
-0.15323716402053833,
0.00206885882653296,
-0.25750765204429626,
-0.10373634845018387,
-0.3930051624774933,
-0.1505557894706726,
-0.33116137981414795,
0.11401921510696411,
-0.1965567171573639,
-0.18692408502101898,
-0.2932327091693878,
0.6310693621635437,
-0.05368245020508766,
-0.17080320417881012,
0.007796681951731443,
0.13579364120960236,
-0.04664803296327591,
-0.0799039676785469,
0.6231102347373962,
0.4926968216896057,
0.029491804540157318,
-0.10185770690441132,
0.2511085271835327,
0.1871856153011322,
-0.2857351303100586,
0.2048230618238449,
0.26811543107032776,
0.1419735848903656,
0.4111420512199402,
0.24564330279827118,
0.0051553742960095406,
-0.22683781385421753,
-0.18386517465114594,
0.39680537581443787,
0.11953739076852798,
-0.4919114112854004,
0.023562828078866005,
-0.164912149310112,
0.2419186383485794,
-0.20570147037506104,
-0.22671175003051758,
0.1853095442056656,
-0.5442613363265991,
-0.2349187284708023,
0.3472462296485901,
-0.3372877240180969,
0.305102676153183,
-0.15899142622947693,
-0.39504995942115784,
0.09221474081277847,
-0.1661282628774643,
-0.07192223519086838,
-0.178211510181427,
-0.08851935714483261,
-0.04583705961704254,
-0.12614622712135315,
-0.09722818434238434,
0.04102711379528046,
-0.16622288525104523,
-0.09439699351787567,
-0.1365431547164917,
-0.29238295555114746,
-0.027404198423027992,
-0.4529344141483307,
-0.009383833035826683,
0.40050846338272095,
0.03669022023677826,
0.1800096184015274,
-0.4637696444988251,
0.22884565591812134,
0.07759455591440201,
-0.020974457263946533,
0.03460133448243141,
0.29294586181640625,
0.0061278012581169605,
-0.1640407145023346,
-0.6690237522125244,
-0.2725988030433655,
-0.304246723651886,
0.1338285356760025,
-0.272978812456131,
-0.1675984263420105,
0.059671882539987564,
-0.16183848679065704,
0.014235062524676323,
0.17344848811626434,
0.1514369249343872,
-0.021506013348698616,
0.011956136673688889,
0.1503857672214508,
0.014629896730184555,
0.17769506573677063,
0.12653127312660217,
0.18276843428611755,
-0.10115835815668106,
0.05922207981348038,
-0.13647325336933136,
-0.05647861957550049,
-0.0916980430483818,
0.33805352449417114,
0.09303000569343567,
-0.001782098668627441,
0.2639891505241394,
0.29799559712409973,
-0.036332644522190094,
-0.1717984676361084,
-0.26750078797340393,
0.24655967950820923,
0.05763230845332146,
0.11982335895299911,
0.08033160120248795,
0.6318516135215759,
0.20554153621196747,
0.1752791702747345,
-0.150717094540596,
-0.07017875462770462,
0.06589493155479431,
-0.06931529194116592,
0.018884262070059776,
-0.19038072228431702,
-0.014346800744533539,
-0.07193158566951752,
-0.3799413740634918,
-0.2754397988319397,
0.09684751182794571,
-0.14041543006896973,
-0.07464218884706497,
-0.03706200048327446,
0.00862853229045868,
0.043680138885974884,
-0.2274763584136963,
-0.052438925951719284,
-0.08824016898870468,
0.42756780982017517,
0.1327887922525406,
0.1390775740146637,
-0.07488738745450974,
-0.05873127654194832,
0.12603196501731873,
0.1799946427345276,
0.12195856124162674,
-0.30822399258613586,
-0.2348100244998932,
0.027889803051948547,
-0.22187352180480957,
0.23117563128471375,
0.36543530225753784,
0.5237166285514832,
0.10950043797492981,
-0.4189072251319885,
0.03912634775042534,
0.12440771609544754,
0.5819935202598572,
-0.2301916778087616,
-0.030865611508488655,
0.1820007562637329,
-0.15825477242469788,
0.09986428916454315,
-0.16809484362602234,
-0.2026176005601883,
-0.029727963730692863,
0.2626565396785736,
0.43126240372657776,
-0.08188311010599136,
-0.04554620757699013,
0.5021077394485474,
0.2213868945837021,
-0.0002621520252432674,
-0.20037411153316498,
-0.14440800249576569,
-0.33491185307502747,
-0.24913211166858673,
-0.020762495696544647,
0.051585301756858826,
0.1574818342924118,
0.05139968544244766,
0.31279388070106506,
-0.030131671577692032,
-0.3142569065093994,
0.14049653708934784,
0.232598215341568,
-0.04283236712217331,
-0.07765977829694748,
0.18954923748970032,
0.05597446486353874,
0.17877404391765594,
0.08049432933330536,
0.23186442255973816,
-0.4986409544944763,
-0.6792051792144775,
-0.08389947563409805,
-0.17330622673034668,
0.4837508499622345,
0.23735779523849487,
-0.23550328612327576,
0.23864519596099854,
-0.062269292771816254,
0.2222553789615631,
-0.105573870241642,
-0.005489792674779892,
0.3826487064361572,
0.08413272351026535,
-0.3165592551231384,
-0.5406337976455688,
0.3414802849292755,
0.07956387847661972,
-0.08305183053016663,
0.0900755524635315,
0.3665968179702759,
-0.4676121473312378,
0.4190032184123993,
-0.12727072834968567,
0.5394488573074341,
0.17117957770824432,
-0.03420901298522949,
0.42040136456489563,
-0.15845456719398499,
-0.06789179891347885,
-0.06878259032964706,
0.1058085635304451,
-0.3747585415840149,
-0.2032317966222763,
-0.06291453540325165,
0.09812528640031815,
0.44577276706695557,
0.04399126023054123,
-0.02398812770843506,
0.3131881654262543,
-0.03774604573845863,
0.3181700110435486,
-0.012960188090801239,
-0.023680008947849274,
-0.1248428225517273,
-0.28908947110176086,
0.03141659498214722,
0.017025575041770935,
0.05851130560040474,
-0.33078810572624207,
0.34682345390319824,
0.18506000936031342,
-0.0445539727807045,
-0.00688058091327548,
-0.17967361211776733,
-0.09209686517715454,
-0.03962104395031929,
0.26215365529060364,
-0.07027346640825272,
-0.20682932436466217,
0.25616803765296936,
0.23600240051746368,
0.34552475810050964,
0.12043934315443039,
0.22182469069957733,
0.2901317775249481,
0.05360233783721924,
0.315018892288208,
0.05109281465411186,
-0.05201394110918045,
0.35497206449508667,
0.25595709681510925,
-0.18926769495010376,
-0.1287589967250824,
-0.09706515818834305,
-0.15928888320922852,
-0.13698449730873108,
0.0045310258865356445,
0.3254048824310303,
-0.7125171422958374,
-0.2792523503303528,
-0.14634479582309723,
0.00762120122089982,
-0.20571452379226685,
0.07022290676832199,
-0.4360506534576416,
-0.3211269974708557,
0.04235142096877098,
-0.24731631577014923,
-0.5409815311431885,
-0.041053079068660736,
0.2723686397075653,
0.09287901967763901,
0.4236695170402527,
0.6302579045295715,
0.07445213198661804,
-0.11896053701639175,
-0.07692879438400269,
0.28152942657470703,
-0.001707676681689918,
-0.23728704452514648,
0.3587239682674408,
0.24915538728237152,
0.012526636011898518,
0.14215174317359924,
0.08940526843070984,
0.013923276215791702,
0.13743624091148376,
-0.17947325110435486,
-0.2946625351905823,
-0.23643504083156586,
0.03648025915026665,
0.23717716336250305,
0.09858117252588272,
0.18280336260795593,
0.2921196520328522,
-0.4138018488883972,
-0.1671646237373352,
-0.19800487160682678,
-0.06796648353338242,
-0.04453824833035469,
0.33950960636138916,
0.2307618409395218,
0.07579978555440903,
-0.022577838972210884,
-0.16920657455921173,
0.20930059254169464,
0.36601147055625916,
0.3369353413581848,
-0.1701856553554535,
-0.31154361367225647,
0.10452491790056229,
0.08796148747205734,
0.31999415159225464,
-0.2685278356075287,
-0.06452808529138565,
-0.16549056768417358,
-0.24329067766666412,
0.13979125022888184,
0.4403591454029083,
0.009370483458042145,
0.6279405951499939,
-0.23263944685459137,
0.06180841848254204,
-0.022114235907793045,
0.19735105335712433,
-0.3701750934123993,
0.13640744984149933,
-0.17789502441883087,
0.30948057770729065,
-0.04631143808364868,
0.19478939473628998,
-0.38712701201438904,
-0.14074668288230896,
-0.10170416533946991,
0.09191727638244629,
0.1624632179737091,
-0.23298831284046173,
0.027549969032406807,
-0.227639302611351,
0.34214237332344055,
0.5766679644584656,
-0.03660151734948158,
-0.34062325954437256,
0.2601463198661804,
0.0938544049859047,
-0.21498948335647583,
0.2604694664478302,
0.13139869272708893,
-0.34914064407348633,
0.2399219274520874,
0.21982161700725555,
0.023826656863093376,
0.2739402651786804,
-0.4158228635787964,
0.0962313786149025,
0.4593585431575775,
-0.23125827312469482,
0.0933075025677681,
0.7471664547920227,
-0.07168784737586975,
0.3275979459285736,
0.24111995100975037,
0.11742381006479263,
-0.1474771648645401,
0.5122221112251282,
0.2956358790397644,
0.3313482105731964,
0.18359585106372833,
0.08737127482891083,
-0.19883477687835693,
-0.044069286435842514,
0.07180207967758179,
0.02331484667956829,
-0.2806175649166107,
-0.001032825792208314,
0.052383504807949066,
0.09938894212245941,
-0.135128453373909,
0.006386393681168556,
0.07644599676132202,
0.07877914607524872,
-0.08532130718231201,
-0.3726902902126312,
-0.18073150515556335,
-0.07732054591178894,
-0.4351944029331207,
0.010004505515098572,
-0.0010134740732610226,
0.22390805184841156,
0.5572524070739746,
-0.06309932470321655,
0.23307950794696808,
-0.40226390957832336,
-0.12164073437452316,
-0.06716703623533249,
0.3376489281654358,
-0.43629804253578186,
0.04500743746757507,
0.19677644968032837,
0.09785112738609314,
0.34611594676971436,
-0.27364233136177063,
0.3674904704093933,
0.01587127335369587,
-0.031347665935754776,
-0.32783210277557373,
-0.2703058421611786,
-0.14794467389583588,
0.25842854380607605,
0.4770178198814392,
-0.24737606942653656,
0.16012689471244812,
0.34260013699531555,
0.07084942609071732,
-0.021418655291199684,
0.3009720742702484,
0.29210659861564636,
0.14847947657108307,
-0.35368600487709045,
0.627041220664978,
0.03427882865071297,
-0.1725037842988968,
-0.06490053236484528,
0.029127022251486778,
-0.22071146965026855,
0.015346413478255272,
0.49279239773750305,
-0.08570581674575806,
0.2625671327114105,
0.09815138578414917,
0.02940424717962742,
0.20183365046977997,
0.3894340991973877,
0.2932918667793274,
-0.45336124300956726,
-0.053682439029216766,
0.16588063538074493,
-0.34338435530662537,
-0.1413583755493164,
0.10903378576040268,
-0.15238940715789795,
-0.1043175682425499,
-0.26103994250297546,
0.10036817938089371,
-0.03623979538679123,
0.04484149441123009,
0.18436285853385925,
-0.2561522424221039,
0.2380363792181015,
-0.005735540296882391,
-0.37587031722068787,
-0.08419784903526306,
0.020969003438949585,
0.037042196840047836,
-0.3455043137073517,
-0.019040867686271667,
0.4193589389324188,
-0.10627749562263489,
-0.2612069845199585,
-0.1117047667503357,
0.39657434821128845,
0.021207433193922043,
-0.07021442800760269,
0.20496916770935059,
0.5175046920776367,
-0.21314063668251038,
0.11916044354438782,
0.0022149630822241306,
-0.35881340503692627,
-0.4568064510822296,
0.41729822754859924,
-0.07683546841144562,
0.3570574223995209,
0.03739894926548004,
0.012648491188883781,
-0.04935729503631592,
0.1037038043141365,
-0.2392890900373459,
0.03445623442530632,
-0.46730512380599976,
0.031080791726708412,
0.2342393547296524,
0.06496528536081314,
0.13972067832946777,
0.2943553626537323,
0.1055683121085167,
0.4483822286128998,
-0.12422995269298553,
-0.3101108968257904,
0.5607990026473999,
-0.3047522008419037,
-0.6528940200805664,
0.12099035084247589,
-0.17440934479236603,
0.3874818980693817,
0.09591782093048096,
-0.6975592970848083,
-0.10597764700651169,
0.32796943187713623,
-0.09646642953157425,
-0.20878221094608307,
0.17757457494735718,
0.21007972955703735,
-0.022770075127482414,
0.024789920076727867,
0.1218385398387909,
0.04367467388510704,
-0.18340179324150085,
-0.01617848314344883,
-0.07344045490026474
] |
https://github.com/huggingface/datasets/issues/2022
|
ValueError when rename_column on splitted dataset
|
This has been fixed in #2043 , thanks @mariosasko
The fix is available on master and we'll do a new release soon :)
feel free to re-open if you still have issues
|
Hi there,
I am loading `.tsv` file via `load_dataset` and subsequently split the rows into training and test set via the `ReadInstruction` API like so:
```python
split = {
'train': ReadInstruction('train', to=90, unit='%'),
'test': ReadInstruction('train', from_=-10, unit='%')
}
dataset = load_dataset(
path='csv', # use 'text' loading script to load from local txt-files
delimiter='\t', # xxx
data_files=text_files, # list of paths to local text files
split=split, # xxx
)
dataset
```
Part of output:
```python
DatasetDict({
train: Dataset({
features: ['sentence', 'sentiment'],
num_rows: 900
})
test: Dataset({
features: ['sentence', 'sentiment'],
num_rows: 100
})
})
```
Afterwards I'd like to rename the 'sentence' column to 'text' in order to be compatible with my modelin pipeline. If I run the following code I experience a `ValueError` however:
```python
dataset['train'].rename_column('sentence', 'text')
```
```python
/usr/local/lib/python3.7/dist-packages/datasets/splits.py in __init__(self, name)
353 for split_name in split_names_from_instruction:
354 if not re.match(_split_re, split_name):
--> 355 raise ValueError(f"Split name should match '{_split_re}'' but got '{split_name}'.")
356
357 def __str__(self):
ValueError: Split name should match '^\w+(\.\w+)*$'' but got 'ReadInstruction('.
```
In particular, these behavior does not arise if I use the deprecated `rename_column_` method. Any idea what causes the error? Would assume something in the way I defined the split.
Thanks in advance! :)
| 32
|
ValueError when rename_column on splitted dataset
Hi there,
I am loading `.tsv` file via `load_dataset` and subsequently split the rows into training and test set via the `ReadInstruction` API like so:
```python
split = {
'train': ReadInstruction('train', to=90, unit='%'),
'test': ReadInstruction('train', from_=-10, unit='%')
}
dataset = load_dataset(
path='csv', # use 'text' loading script to load from local txt-files
delimiter='\t', # xxx
data_files=text_files, # list of paths to local text files
split=split, # xxx
)
dataset
```
Part of output:
```python
DatasetDict({
train: Dataset({
features: ['sentence', 'sentiment'],
num_rows: 900
})
test: Dataset({
features: ['sentence', 'sentiment'],
num_rows: 100
})
})
```
Afterwards I'd like to rename the 'sentence' column to 'text' in order to be compatible with my modelin pipeline. If I run the following code I experience a `ValueError` however:
```python
dataset['train'].rename_column('sentence', 'text')
```
```python
/usr/local/lib/python3.7/dist-packages/datasets/splits.py in __init__(self, name)
353 for split_name in split_names_from_instruction:
354 if not re.match(_split_re, split_name):
--> 355 raise ValueError(f"Split name should match '{_split_re}'' but got '{split_name}'.")
356
357 def __str__(self):
ValueError: Split name should match '^\w+(\.\w+)*$'' but got 'ReadInstruction('.
```
In particular, these behavior does not arise if I use the deprecated `rename_column_` method. Any idea what causes the error? Would assume something in the way I defined the split.
Thanks in advance! :)
This has been fixed in #2043 , thanks @mariosasko
The fix is available on master and we'll do a new release soon :)
feel free to re-open if you still have issues
|
[
-0.08357539027929306,
0.2197989523410797,
-0.03482964634895325,
-0.04238370060920715,
0.42087602615356445,
0.07306133955717087,
0.6438035368919373,
0.4179837703704834,
-0.02255256474018097,
0.339653342962265,
-0.08668701350688934,
0.3978041410446167,
-0.052184607833623886,
0.364435613155365,
-0.2562583386898041,
-0.24770545959472656,
0.10441388934850693,
-0.07954174280166626,
0.1267358660697937,
0.2697296142578125,
-0.33005258440971375,
0.07780793309211731,
-0.3932778239250183,
0.12606869637966156,
-0.07813368737697601,
0.06238041818141937,
0.032519564032554626,
0.09537623822689056,
0.028275813907384872,
-0.36107751727104187,
0.1441165953874588,
-0.035510074347257614,
0.18996478617191315,
0.5556841492652893,
-0.00011623618775047362,
0.12328147143125534,
0.22254841029644012,
-0.12801766395568848,
-0.18916267156600952,
-0.4528481662273407,
-0.005278439726680517,
-0.16803602874279022,
0.0017359595512971282,
-0.3506769835948944,
0.17072398960590363,
0.22847692668437958,
-0.23099543154239655,
-0.2584793269634247,
0.10060704499483109,
0.36931291222572327,
0.1076900064945221,
0.09653060883283615,
-0.010720080696046352,
0.11912558227777481,
0.10851556062698364,
0.02124818228185177,
-0.30477219820022583,
0.08998295664787292,
-0.076124407351017,
-0.17922036349773407,
-0.11379043757915497,
0.23175112903118134,
-0.0711771547794342,
0.14804230630397797,
-0.02354508452117443,
0.3106744587421417,
0.03458888828754425,
-0.04696495831012726,
0.08885286748409271,
0.06717966496944427,
0.21446935832500458,
-0.24017870426177979,
-0.46399039030075073,
-0.44429439306259155,
0.16377171874046326,
-0.3250170648097992,
0.25705012679100037,
-0.18774577975273132,
0.12323673814535141,
0.18407465517520905,
-0.13986559212207794,
0.052361778914928436,
-0.13730551302433014,
-0.140639066696167,
-0.09230343252420425,
0.0893622562289238,
-0.03236187994480133,
0.40946972370147705,
-0.10029364377260208,
-0.11142924427986145,
0.17490851879119873,
0.051333244889974594,
-0.07852088660001755,
-0.13118037581443787,
-0.5019624829292297,
0.027813702821731567,
-0.2302481234073639,
-0.2595575153827667,
-0.3201276957988739,
-0.12000276148319244,
0.015836108475923538,
-0.2517312169075012,
0.2726791799068451,
0.21649785339832306,
-0.036298803985118866,
0.1996530294418335,
0.1301002949476242,
0.48517727851867676,
0.23599696159362793,
0.14029863476753235,
-0.2038479894399643,
-0.0915253609418869,
0.06073436886072159,
-0.29887381196022034,
0.14961859583854675,
0.19085855782032013,
0.13883854448795319,
0.10122460871934891,
-0.42232125997543335,
-0.021415838971734047,
-0.29993119835853577,
-0.18861718475818634,
-0.03053387813270092,
0.22145597636699677,
0.20323878526687622,
0.4568878710269928,
0.16938713192939758,
0.05747990310192108,
-0.0006994742434471846,
-0.14065146446228027,
-0.03712533786892891,
0.17933303117752075,
-0.30196866393089294,
0.1505986750125885,
0.03997021168470383,
0.1964549869298935,
0.08144459128379822,
-0.27065742015838623,
-0.020825011655688286,
-0.29915452003479004,
-0.02031986229121685,
-0.19919276237487793,
0.09521114081144333,
0.2918281853199005,
-0.08355164527893066,
-0.10790881514549255,
0.11641368269920349,
-0.44579821825027466,
0.035215720534324646,
0.25792405009269714,
-0.25360509753227234,
-0.32079240679740906,
0.13972537219524384,
0.12860003113746643,
0.03990136459469795,
-0.05275364965200424,
0.04824020341038704,
-0.022960688918828964,
0.6056430339813232,
-0.13944490253925323,
0.13514497876167297,
-0.3096872568130493,
-0.22670595347881317,
-0.01604033075273037,
-0.03327888250350952,
0.10004330426454544,
-0.5333274006843567,
-0.11848381906747818,
0.06362029165029526,
0.1941964030265808,
0.1769789755344391,
0.175530344247818,
0.18300136923789978,
0.1583339124917984,
0.13353906571865082,
0.2669028341770172,
0.296729177236557,
-0.39586517214775085,
0.028894972056150436,
0.2807649075984955,
-0.3185529112815857,
-0.1601911038160324,
0.37078163027763367,
-0.21733854711055756,
0.12075065076351166,
-0.10769324749708176,
0.1341785043478012,
0.011336690746247768,
-0.06573580950498581,
0.09607699513435364,
-0.037814583629369736,
-0.07014581561088562,
0.3307214677333832,
-0.01802160032093525,
0.018864039331674576,
-0.11579025536775589,
-0.15686190128326416,
-0.2933062016963959,
0.32436126470565796,
-0.026464805006980896,
0.11641806364059448,
0.13003329932689667,
0.10575735569000244,
0.5420784950256348,
0.12000124156475067,
-0.08323013037443161,
-0.22531437873840332,
0.02838347852230072,
0.3180809020996094,
-0.16832496225833893,
-0.3165961503982544,
-0.1709282547235489,
-0.43260112404823303,
0.048943862318992615,
-0.07522281259298325,
0.04720456153154373,
0.03131360560655594,
0.2542942464351654,
-0.1051323264837265,
-0.12179061025381088,
-0.4117276966571808,
0.2951658070087433,
-0.5749082565307617,
0.24643275141716003,
-0.31800052523612976,
0.07760030776262283,
0.0061791036278009415,
-0.3219505548477173,
-0.2502313256263733,
0.15526656806468964,
0.1714714765548706,
-0.011289727874100208,
-0.2374323457479477,
0.6657506823539734,
0.34775152802467346,
0.04634331166744232,
-0.37653350830078125,
-0.27698177099227905,
-0.10850021988153458,
0.24177514016628265,
-0.23580539226531982,
-0.13306982815265656,
0.24574753642082214,
-0.04125108942389488,
-0.06281234323978424,
0.2938639223575592,
-0.42021557688713074,
0.5500608086585999,
-0.010936718434095383,
-0.15323716402053833,
0.00206885882653296,
-0.25750765204429626,
-0.10373634845018387,
-0.3930051624774933,
-0.1505557894706726,
-0.33116137981414795,
0.11401921510696411,
-0.1965567171573639,
-0.18692408502101898,
-0.2932327091693878,
0.6310693621635437,
-0.05368245020508766,
-0.17080320417881012,
0.007796681951731443,
0.13579364120960236,
-0.04664803296327591,
-0.0799039676785469,
0.6231102347373962,
0.4926968216896057,
0.029491804540157318,
-0.10185770690441132,
0.2511085271835327,
0.1871856153011322,
-0.2857351303100586,
0.2048230618238449,
0.26811543107032776,
0.1419735848903656,
0.4111420512199402,
0.24564330279827118,
0.0051553742960095406,
-0.22683781385421753,
-0.18386517465114594,
0.39680537581443787,
0.11953739076852798,
-0.4919114112854004,
0.023562828078866005,
-0.164912149310112,
0.2419186383485794,
-0.20570147037506104,
-0.22671175003051758,
0.1853095442056656,
-0.5442613363265991,
-0.2349187284708023,
0.3472462296485901,
-0.3372877240180969,
0.305102676153183,
-0.15899142622947693,
-0.39504995942115784,
0.09221474081277847,
-0.1661282628774643,
-0.07192223519086838,
-0.178211510181427,
-0.08851935714483261,
-0.04583705961704254,
-0.12614622712135315,
-0.09722818434238434,
0.04102711379528046,
-0.16622288525104523,
-0.09439699351787567,
-0.1365431547164917,
-0.29238295555114746,
-0.027404198423027992,
-0.4529344141483307,
-0.009383833035826683,
0.40050846338272095,
0.03669022023677826,
0.1800096184015274,
-0.4637696444988251,
0.22884565591812134,
0.07759455591440201,
-0.020974457263946533,
0.03460133448243141,
0.29294586181640625,
0.0061278012581169605,
-0.1640407145023346,
-0.6690237522125244,
-0.2725988030433655,
-0.304246723651886,
0.1338285356760025,
-0.272978812456131,
-0.1675984263420105,
0.059671882539987564,
-0.16183848679065704,
0.014235062524676323,
0.17344848811626434,
0.1514369249343872,
-0.021506013348698616,
0.011956136673688889,
0.1503857672214508,
0.014629896730184555,
0.17769506573677063,
0.12653127312660217,
0.18276843428611755,
-0.10115835815668106,
0.05922207981348038,
-0.13647325336933136,
-0.05647861957550049,
-0.0916980430483818,
0.33805352449417114,
0.09303000569343567,
-0.001782098668627441,
0.2639891505241394,
0.29799559712409973,
-0.036332644522190094,
-0.1717984676361084,
-0.26750078797340393,
0.24655967950820923,
0.05763230845332146,
0.11982335895299911,
0.08033160120248795,
0.6318516135215759,
0.20554153621196747,
0.1752791702747345,
-0.150717094540596,
-0.07017875462770462,
0.06589493155479431,
-0.06931529194116592,
0.018884262070059776,
-0.19038072228431702,
-0.014346800744533539,
-0.07193158566951752,
-0.3799413740634918,
-0.2754397988319397,
0.09684751182794571,
-0.14041543006896973,
-0.07464218884706497,
-0.03706200048327446,
0.00862853229045868,
0.043680138885974884,
-0.2274763584136963,
-0.052438925951719284,
-0.08824016898870468,
0.42756780982017517,
0.1327887922525406,
0.1390775740146637,
-0.07488738745450974,
-0.05873127654194832,
0.12603196501731873,
0.1799946427345276,
0.12195856124162674,
-0.30822399258613586,
-0.2348100244998932,
0.027889803051948547,
-0.22187352180480957,
0.23117563128471375,
0.36543530225753784,
0.5237166285514832,
0.10950043797492981,
-0.4189072251319885,
0.03912634775042534,
0.12440771609544754,
0.5819935202598572,
-0.2301916778087616,
-0.030865611508488655,
0.1820007562637329,
-0.15825477242469788,
0.09986428916454315,
-0.16809484362602234,
-0.2026176005601883,
-0.029727963730692863,
0.2626565396785736,
0.43126240372657776,
-0.08188311010599136,
-0.04554620757699013,
0.5021077394485474,
0.2213868945837021,
-0.0002621520252432674,
-0.20037411153316498,
-0.14440800249576569,
-0.33491185307502747,
-0.24913211166858673,
-0.020762495696544647,
0.051585301756858826,
0.1574818342924118,
0.05139968544244766,
0.31279388070106506,
-0.030131671577692032,
-0.3142569065093994,
0.14049653708934784,
0.232598215341568,
-0.04283236712217331,
-0.07765977829694748,
0.18954923748970032,
0.05597446486353874,
0.17877404391765594,
0.08049432933330536,
0.23186442255973816,
-0.4986409544944763,
-0.6792051792144775,
-0.08389947563409805,
-0.17330622673034668,
0.4837508499622345,
0.23735779523849487,
-0.23550328612327576,
0.23864519596099854,
-0.062269292771816254,
0.2222553789615631,
-0.105573870241642,
-0.005489792674779892,
0.3826487064361572,
0.08413272351026535,
-0.3165592551231384,
-0.5406337976455688,
0.3414802849292755,
0.07956387847661972,
-0.08305183053016663,
0.0900755524635315,
0.3665968179702759,
-0.4676121473312378,
0.4190032184123993,
-0.12727072834968567,
0.5394488573074341,
0.17117957770824432,
-0.03420901298522949,
0.42040136456489563,
-0.15845456719398499,
-0.06789179891347885,
-0.06878259032964706,
0.1058085635304451,
-0.3747585415840149,
-0.2032317966222763,
-0.06291453540325165,
0.09812528640031815,
0.44577276706695557,
0.04399126023054123,
-0.02398812770843506,
0.3131881654262543,
-0.03774604573845863,
0.3181700110435486,
-0.012960188090801239,
-0.023680008947849274,
-0.1248428225517273,
-0.28908947110176086,
0.03141659498214722,
0.017025575041770935,
0.05851130560040474,
-0.33078810572624207,
0.34682345390319824,
0.18506000936031342,
-0.0445539727807045,
-0.00688058091327548,
-0.17967361211776733,
-0.09209686517715454,
-0.03962104395031929,
0.26215365529060364,
-0.07027346640825272,
-0.20682932436466217,
0.25616803765296936,
0.23600240051746368,
0.34552475810050964,
0.12043934315443039,
0.22182469069957733,
0.2901317775249481,
0.05360233783721924,
0.315018892288208,
0.05109281465411186,
-0.05201394110918045,
0.35497206449508667,
0.25595709681510925,
-0.18926769495010376,
-0.1287589967250824,
-0.09706515818834305,
-0.15928888320922852,
-0.13698449730873108,
0.0045310258865356445,
0.3254048824310303,
-0.7125171422958374,
-0.2792523503303528,
-0.14634479582309723,
0.00762120122089982,
-0.20571452379226685,
0.07022290676832199,
-0.4360506534576416,
-0.3211269974708557,
0.04235142096877098,
-0.24731631577014923,
-0.5409815311431885,
-0.041053079068660736,
0.2723686397075653,
0.09287901967763901,
0.4236695170402527,
0.6302579045295715,
0.07445213198661804,
-0.11896053701639175,
-0.07692879438400269,
0.28152942657470703,
-0.001707676681689918,
-0.23728704452514648,
0.3587239682674408,
0.24915538728237152,
0.012526636011898518,
0.14215174317359924,
0.08940526843070984,
0.013923276215791702,
0.13743624091148376,
-0.17947325110435486,
-0.2946625351905823,
-0.23643504083156586,
0.03648025915026665,
0.23717716336250305,
0.09858117252588272,
0.18280336260795593,
0.2921196520328522,
-0.4138018488883972,
-0.1671646237373352,
-0.19800487160682678,
-0.06796648353338242,
-0.04453824833035469,
0.33950960636138916,
0.2307618409395218,
0.07579978555440903,
-0.022577838972210884,
-0.16920657455921173,
0.20930059254169464,
0.36601147055625916,
0.3369353413581848,
-0.1701856553554535,
-0.31154361367225647,
0.10452491790056229,
0.08796148747205734,
0.31999415159225464,
-0.2685278356075287,
-0.06452808529138565,
-0.16549056768417358,
-0.24329067766666412,
0.13979125022888184,
0.4403591454029083,
0.009370483458042145,
0.6279405951499939,
-0.23263944685459137,
0.06180841848254204,
-0.022114235907793045,
0.19735105335712433,
-0.3701750934123993,
0.13640744984149933,
-0.17789502441883087,
0.30948057770729065,
-0.04631143808364868,
0.19478939473628998,
-0.38712701201438904,
-0.14074668288230896,
-0.10170416533946991,
0.09191727638244629,
0.1624632179737091,
-0.23298831284046173,
0.027549969032406807,
-0.227639302611351,
0.34214237332344055,
0.5766679644584656,
-0.03660151734948158,
-0.34062325954437256,
0.2601463198661804,
0.0938544049859047,
-0.21498948335647583,
0.2604694664478302,
0.13139869272708893,
-0.34914064407348633,
0.2399219274520874,
0.21982161700725555,
0.023826656863093376,
0.2739402651786804,
-0.4158228635787964,
0.0962313786149025,
0.4593585431575775,
-0.23125827312469482,
0.0933075025677681,
0.7471664547920227,
-0.07168784737586975,
0.3275979459285736,
0.24111995100975037,
0.11742381006479263,
-0.1474771648645401,
0.5122221112251282,
0.2956358790397644,
0.3313482105731964,
0.18359585106372833,
0.08737127482891083,
-0.19883477687835693,
-0.044069286435842514,
0.07180207967758179,
0.02331484667956829,
-0.2806175649166107,
-0.001032825792208314,
0.052383504807949066,
0.09938894212245941,
-0.135128453373909,
0.006386393681168556,
0.07644599676132202,
0.07877914607524872,
-0.08532130718231201,
-0.3726902902126312,
-0.18073150515556335,
-0.07732054591178894,
-0.4351944029331207,
0.010004505515098572,
-0.0010134740732610226,
0.22390805184841156,
0.5572524070739746,
-0.06309932470321655,
0.23307950794696808,
-0.40226390957832336,
-0.12164073437452316,
-0.06716703623533249,
0.3376489281654358,
-0.43629804253578186,
0.04500743746757507,
0.19677644968032837,
0.09785112738609314,
0.34611594676971436,
-0.27364233136177063,
0.3674904704093933,
0.01587127335369587,
-0.031347665935754776,
-0.32783210277557373,
-0.2703058421611786,
-0.14794467389583588,
0.25842854380607605,
0.4770178198814392,
-0.24737606942653656,
0.16012689471244812,
0.34260013699531555,
0.07084942609071732,
-0.021418655291199684,
0.3009720742702484,
0.29210659861564636,
0.14847947657108307,
-0.35368600487709045,
0.627041220664978,
0.03427882865071297,
-0.1725037842988968,
-0.06490053236484528,
0.029127022251486778,
-0.22071146965026855,
0.015346413478255272,
0.49279239773750305,
-0.08570581674575806,
0.2625671327114105,
0.09815138578414917,
0.02940424717962742,
0.20183365046977997,
0.3894340991973877,
0.2932918667793274,
-0.45336124300956726,
-0.053682439029216766,
0.16588063538074493,
-0.34338435530662537,
-0.1413583755493164,
0.10903378576040268,
-0.15238940715789795,
-0.1043175682425499,
-0.26103994250297546,
0.10036817938089371,
-0.03623979538679123,
0.04484149441123009,
0.18436285853385925,
-0.2561522424221039,
0.2380363792181015,
-0.005735540296882391,
-0.37587031722068787,
-0.08419784903526306,
0.020969003438949585,
0.037042196840047836,
-0.3455043137073517,
-0.019040867686271667,
0.4193589389324188,
-0.10627749562263489,
-0.2612069845199585,
-0.1117047667503357,
0.39657434821128845,
0.021207433193922043,
-0.07021442800760269,
0.20496916770935059,
0.5175046920776367,
-0.21314063668251038,
0.11916044354438782,
0.0022149630822241306,
-0.35881340503692627,
-0.4568064510822296,
0.41729822754859924,
-0.07683546841144562,
0.3570574223995209,
0.03739894926548004,
0.012648491188883781,
-0.04935729503631592,
0.1037038043141365,
-0.2392890900373459,
0.03445623442530632,
-0.46730512380599976,
0.031080791726708412,
0.2342393547296524,
0.06496528536081314,
0.13972067832946777,
0.2943553626537323,
0.1055683121085167,
0.4483822286128998,
-0.12422995269298553,
-0.3101108968257904,
0.5607990026473999,
-0.3047522008419037,
-0.6528940200805664,
0.12099035084247589,
-0.17440934479236603,
0.3874818980693817,
0.09591782093048096,
-0.6975592970848083,
-0.10597764700651169,
0.32796943187713623,
-0.09646642953157425,
-0.20878221094608307,
0.17757457494735718,
0.21007972955703735,
-0.022770075127482414,
0.024789920076727867,
0.1218385398387909,
0.04367467388510704,
-0.18340179324150085,
-0.01617848314344883,
-0.07344045490026474
] |
https://github.com/huggingface/datasets/issues/2021
|
Interactively doing save_to_disk and load_from_disk corrupts the datasets object?
|
Hi,
Can you give us a minimal reproducible example? This [part](https://huggingface.co/docs/datasets/master/processing.html#controling-the-cache-behavior) of the docs explains how to control caching.
|
dataset_info.json file saved after using save_to_disk gets corrupted as follows.

Is there a way to disable the cache that will save to /tmp/huggiface/datastes ?
I have a feeling there is a serious issue with cashing.
| 19
|
Interactively doing save_to_disk and load_from_disk corrupts the datasets object?
dataset_info.json file saved after using save_to_disk gets corrupted as follows.

Is there a way to disable the cache that will save to /tmp/huggiface/datastes ?
I have a feeling there is a serious issue with cashing.
Hi,
Can you give us a minimal reproducible example? This [part](https://huggingface.co/docs/datasets/master/processing.html#controling-the-cache-behavior) of the docs explains how to control caching.
|
[
-0.07485492527484894,
-0.14697198569774628,
0.05617254227399826,
0.7758021354675293,
0.29052162170410156,
0.3213840425014496,
-0.23171862959861755,
0.1311904489994049,
0.19429510831832886,
0.13167037069797516,
-0.15026973187923431,
0.06683621555566788,
0.23899388313293457,
0.2033746987581253,
0.13799887895584106,
0.23944824934005737,
0.40925195813179016,
-0.10221779346466064,
-0.2969149053096771,
-0.002489494625478983,
-0.057139378041028976,
0.20132076740264893,
0.23924431204795837,
-0.047508224844932556,
-0.370827317237854,
-0.16654008626937866,
0.08654282242059708,
0.33701035380363464,
-0.04578706622123718,
-0.3307516574859619,
0.17031486332416534,
0.25001826882362366,
-0.28069403767585754,
0.39975178241729736,
-0.00013223481073509902,
-0.2780957818031311,
0.06549101322889328,
-0.11208989471197128,
-0.4807291626930237,
0.3449930250644684,
-0.21468310058116913,
0.10561980307102203,
0.1832553595304489,
-0.051475025713443756,
0.018075712025165558,
0.03057188168168068,
-0.044868309050798416,
-0.2771775424480438,
0.49461448192596436,
-0.14180944859981537,
0.009972143918275833,
0.29399001598358154,
0.05407969281077385,
0.17054378986358643,
-0.08911118656396866,
0.3520078957080841,
-0.17303262650966644,
0.24737724661827087,
-0.056708935648202896,
-0.042235568165779114,
-0.13353510200977325,
0.32717832922935486,
-0.19429247081279755,
-0.22153186798095703,
0.47507283091545105,
0.1670788675546646,
-0.2261085957288742,
-0.10156118869781494,
0.14168065786361694,
0.0300043523311615,
0.24046514928340912,
-0.44137370586395264,
-0.49014177918434143,
-0.40945661067962646,
-0.16263389587402344,
-0.26228010654449463,
0.48295700550079346,
0.11493078619241714,
0.023763643577694893,
0.2698061168193817,
-0.6267794966697693,
-0.38224202394485474,
-0.07521263509988785,
0.10468518733978271,
0.2587694227695465,
-0.6426102519035339,
-0.2962203323841095,
-0.020288797095417976,
0.09609672427177429,
-0.02691556327044964,
-0.25181856751441956,
-0.28429388999938965,
-0.40943899750709534,
0.2043648213148117,
-0.28043001890182495,
-0.1706215739250183,
-0.03651270642876625,
0.6992856860160828,
0.3096770942211151,
0.02667265571653843,
0.15397033095359802,
-0.02687949500977993,
-0.3828500807285309,
0.05703624337911606,
0.44509196281433105,
0.18410952389240265,
-0.15103422105312347,
-0.30386388301849365,
0.19378302991390228,
0.24870188534259796,
0.1934027075767517,
-0.1279371678829193,
0.6235284209251404,
0.06540308147668839,
0.3158109486103058,
-0.2794090509414673,
0.10270258784294128,
-0.4267747700214386,
-0.15818725526332855,
0.2238549143075943,
0.11368446797132492,
0.12708188593387604,
0.1518254429101944,
0.2743179202079773,
-0.20324745774269104,
0.23887503147125244,
-0.17414239048957825,
0.2308163046836853,
-0.11128334701061249,
-0.16446901857852936,
-0.24118046462535858,
0.020055480301380157,
-0.10284008085727692,
0.4697910249233246,
0.3572978675365448,
-0.21585750579833984,
0.15554122626781464,
0.14887982606887817,
-0.21947745978832245,
-0.21771135926246643,
-0.14139625430107117,
-0.17308947443962097,
0.21104849874973297,
0.20017556846141815,
-0.07840123772621155,
0.26144900918006897,
0.04421423375606537,
0.18134421110153198,
-0.10440854728221893,
-0.016748758032917976,
-0.3025812804698944,
-0.1653328686952591,
0.2371426671743393,
-0.009331372566521168,
-0.3137509822845459,
-0.02042965777218342,
-0.3833118975162506,
-0.04067717120051384,
0.3734040856361389,
-0.060660555958747864,
0.22709771990776062,
0.3761097490787506,
-0.4323400855064392,
-0.21262690424919128,
0.11869960278272629,
0.7272843718528748,
-0.07770027965307236,
-0.18090474605560303,
0.33803167939186096,
-0.06770578771829605,
-0.09764546900987625,
0.49556660652160645,
-0.04616732522845268,
0.12404051423072815,
-0.17512547969818115,
-0.000053749441576655954,
0.09213482588529587,
-0.40367600321769714,
-0.5119620561599731,
-0.0031913579441607,
0.24356845021247864,
0.1814946085214615,
0.08188490569591522,
0.1703975647687912,
0.027677644044160843,
-0.20803335309028625,
-0.302143394947052,
0.2457527369260788,
0.057198040187358856,
0.10074180364608765,
-0.24728785455226898,
-0.2150130718946457,
0.08342113345861435,
-0.04443781450390816,
-0.35684552788734436,
0.4231313467025757,
-0.043162114918231964,
-0.03453981503844261,
0.029222631826996803,
-0.004833429120481014,
0.2021772712469101,
0.32845598459243774,
0.23721086978912354,
0.12978148460388184,
0.023876722902059555,
0.0728912353515625,
-0.44573652744293213,
0.12064973264932632,
0.0823678970336914,
-0.2579558491706848,
-0.03352266177535057,
-0.25115305185317993,
-0.021195046603679657,
0.13511179387569427,
-0.07826624810695648,
0.11930740624666214,
-0.09831666946411133,
-0.03230541944503784,
0.24603070318698883,
0.17170512676239014,
-0.29770776629447937,
0.8645342588424683,
0.0648760050535202,
0.23026590049266815,
-0.5460049510002136,
-0.06536785513162613,
0.1276172399520874,
-0.09124168008565903,
-0.320709228515625,
-0.14510421454906464,
0.17519772052764893,
-0.21266454458236694,
-0.08147738873958588,
0.6701145768165588,
-0.017503730952739716,
0.41554298996925354,
0.038986340165138245,
0.3504501283168793,
0.2606140375137329,
0.17641320824623108,
-0.03858276084065437,
-0.011304891668260098,
0.1953110545873642,
0.003096394008025527,
-0.20791631937026978,
0.23237383365631104,
0.040124811232089996,
-0.0596020482480526,
-0.059562813490629196,
-0.11374731361865997,
0.1619168370962143,
-0.1846327930688858,
0.020550835877656937,
-0.31816303730010986,
-0.03802414610981941,
-0.20648737251758575,
0.2917066514492035,
-0.023800937458872795,
-0.3807870149612427,
0.11579393595457077,
0.24473102390766144,
0.024722870439291,
0.03209416940808296,
-0.0001368970551993698,
-0.019897550344467163,
-0.3366119861602783,
0.04102124646306038,
0.254047691822052,
0.5070422291755676,
-0.08930464833974838,
0.0645955353975296,
0.028731394559144974,
0.0835932120680809,
-0.06301041692495346,
0.14695143699645996,
0.03723786398768425,
0.0762842670083046,
0.11653174459934235,
0.02703479304909706,
-0.003983100410550833,
-0.4554964303970337,
0.4673801064491272,
-0.12039011716842651,
0.13107410073280334,
-0.42884573340415955,
0.3027193546295166,
-0.07545721530914307,
-0.18272462487220764,
-0.0489480085670948,
0.019473055377602577,
-0.35863059759140015,
-0.2553168535232544,
0.12005643546581268,
0.7634335160255432,
0.009686131961643696,
-0.034358877688646317,
-0.09738490730524063,
0.659559965133667,
-0.1374252587556839,
0.1637321412563324,
-0.5104169249534607,
0.08529376983642578,
-0.11503688991069794,
-0.20062409341335297,
0.1317945122718811,
-0.22834700345993042,
0.33606263995170593,
-0.20176655054092407,
-0.11695198714733124,
-0.327432245016098,
0.1613985300064087,
0.16729554533958435,
0.15272706747055054,
0.16049538552761078,
-0.030452445149421692,
0.1365015059709549,
-0.04917784407734871,
0.26919227838516235,
0.026231547817587852,
-0.23777951300144196,
-0.2840479016304016,
0.040584366768598557,
0.13417159020900726,
0.0388815812766552,
-0.11390494555234909,
0.34980133175849915,
-0.032941050827503204,
-0.05417441949248314,
0.2562650740146637,
-0.16043873131275177,
0.044698212295770645,
0.14429134130477905,
0.05146420747041702,
-0.11741621792316437,
-0.24123786389827728,
0.09537000209093094,
-0.34601664543151855,
-0.8206101655960083,
0.3271395266056061,
0.018704574555158615,
-0.24292394518852234,
0.17734144628047943,
0.4334370493888855,
-0.06862509995698929,
0.25574252009391785,
-0.4300450086593628,
-0.32363465428352356,
-0.14161601662635803,
-0.12640739977359772,
-0.23158356547355652,
0.020772626623511314,
0.11105254292488098,
0.10768109560012817,
0.02917887084186077,
-0.04604851454496384,
-0.2006746232509613,
0.23170983791351318,
-0.03162786364555359,
0.46529027819633484,
-0.15878210961818695,
0.28571411967277527,
0.14454331994056702,
0.16522638499736786,
0.04741542413830757,
0.08712843060493469,
0.5161072015762329,
0.19887687265872955,
0.7607290148735046,
-0.09009220451116562,
-0.18151706457138062,
-0.341968834400177,
-0.287255197763443,
-0.14737056195735931,
-0.03249776363372803,
0.22556625306606293,
0.29732397198677063,
-0.08421777188777924,
0.03803763538599014,
-0.1443547010421753,
-0.273095965385437,
-0.127672016620636,
0.04628818854689598,
0.19490008056163788,
-0.01108568161725998,
0.0630224421620369,
0.009692879393696785,
-0.2521272301673889,
0.17205774784088135,
0.309835821390152,
0.3786345422267914,
0.055717118084430695,
-0.3670055568218231,
0.05773871764540672,
-0.29186657071113586,
0.07476252317428589,
-0.3715939223766327,
0.20762215554714203,
-0.1661173403263092,
0.05296355113387108,
0.1380397528409958,
-0.11513863503932953,
1.0467963218688965,
0.05934914946556091,
0.20434579253196716,
-0.18691496551036835,
-0.3095414936542511,
-0.0777508020401001,
0.06915841996669769,
0.016184011474251747,
0.26117247343063354,
0.059515438973903656,
0.6162334084510803,
-0.1501953899860382,
-0.42838189005851746,
-0.0670602023601532,
0.2121831625699997,
-0.3520034849643707,
-0.11926092207431793,
-0.029031477868556976,
-0.009223371744155884,
-0.1950497180223465,
-0.12640723586082458,
-0.05321124941110611,
-0.032607704401016235,
0.07090360671281815,
0.1760478913784027,
-0.18670958280563354,
0.13014130294322968,
0.08166492730379105,
-0.06648280471563339,
0.40747231245040894,
-0.06748839467763901,
0.1242031678557396,
0.07306113094091415,
0.24560166895389557,
0.1384437382221222,
0.23809866607189178,
0.19989319145679474,
-0.19746486842632294,
-0.13809476792812347,
0.22152303159236908,
-0.019640984013676643,
0.3996651768684387,
-0.15747924149036407,
-0.058995407074689865,
0.14056040346622467,
-0.11382494866847992,
-0.35579627752304077,
0.10306169092655182,
0.06608385592699051,
0.04921162500977516,
-0.306036114692688,
-0.0036097795236855745,
0.2606484591960907,
0.11601253598928452,
-0.04040547460317612,
-0.1814967691898346,
0.1962469071149826,
-0.37678447365760803,
0.2850160002708435,
0.22179849445819855,
1.1114580631256104,
-0.09658657759428024,
0.4467279016971588,
-0.019025124609470367,
-0.18580296635627747,
0.4888448715209961,
-0.40049415826797485,
0.0697796642780304,
-0.30766862630844116,
0.07054419070482254,
-0.23818479478359222,
-0.09948210418224335,
0.011401600204408169,
0.054205384105443954,
-0.026404445990920067,
0.3500371277332306,
-0.3125455677509308,
0.38766464591026306,
-0.29432621598243713,
-0.030238701030611992,
-0.29954707622528076,
-0.4565078914165497,
-0.15429623425006866,
0.009506721049547195,
-0.12278468161821365,
0.06942366808652878,
0.09243007749319077,
-0.13524338603019714,
-0.07313874363899231,
0.03102354146540165,
-0.07559479027986526,
0.04350008815526962,
-0.11272558569908142,
0.04686775803565979,
0.10025186091661453,
-0.19014547765254974,
-0.18070480227470398,
0.4376678764820099,
0.5001233816146851,
0.02097647823393345,
-0.24491912126541138,
0.011641311459243298,
-0.28249379992485046,
0.025380566716194153,
-0.15005064010620117,
0.13428285717964172,
0.20043975114822388,
0.08599933236837387,
0.15133652091026306,
-0.15904463827610016,
-0.07975810021162033,
-0.11970390379428864,
-0.04146965965628624,
-0.09373198449611664,
-0.11135362088680267,
-0.4145837426185608,
-0.46752774715423584,
-0.0541548952460289,
0.2668149471282959,
-0.14065887033939362,
-0.002448765793815255,
0.30706942081451416,
-0.01843729242682457,
0.07864555716514587,
-0.3082562983036041,
-0.11369169503450394,
-0.10699418187141418,
0.6052973866462708,
-0.023878023028373718,
-0.17463907599449158,
0.28373631834983826,
-0.23771676421165466,
-0.07940718531608582,
-0.17190021276474,
-0.14769922196865082,
0.19233602285385132,
-0.48845404386520386,
0.06624869257211685,
0.0631108507514,
-0.07605090737342834,
-0.37015485763549805,
-0.1271536499261856,
0.09420505911111832,
-0.13519316911697388,
0.025170711800456047,
-0.18506591022014618,
-0.40533456206321716,
0.0911819189786911,
0.40460166335105896,
0.26756560802459717,
0.19159530103206635,
-0.25860536098480225,
-0.3346122205257416,
0.008308586664497852,
-0.1136094182729721,
0.02933860756456852,
-0.07233507931232452,
-0.1758129596710205,
0.4042056202888489,
0.15956932306289673,
0.36287328600883484,
-0.34102779626846313,
-0.13444404304027557,
-0.0828423872590065,
-0.28985801339149475,
-0.052439093589782715,
-0.06711254268884659,
0.22080817818641663,
0.12865327298641205,
-0.2424936294555664,
-0.07857082784175873,
-0.09338001906871796,
0.11156170070171356,
-0.22091884911060333,
0.19322384893894196,
0.34359997510910034,
0.08919498324394226,
0.091330386698246,
-0.04062722995877266,
0.3802590072154999,
0.056800130754709244,
-0.11131395399570465,
0.15127600729465485,
0.15281571447849274,
-0.03996718302369118,
0.009917489252984524,
-0.308069109916687,
-0.2685753405094147,
-0.23127374053001404,
0.13765455782413483,
0.31238681077957153,
0.02861158922314644,
0.06965570896863937,
-0.22918425500392914,
-0.19856174290180206,
0.17940057814121246,
0.4456970989704132,
0.3498784005641937,
-0.1561807096004486,
-0.1637626439332962,
0.2775178849697113,
-0.03430115804076195,
0.22831179201602936,
-0.2759065628051758,
0.3110443651676178,
-0.1442945897579193,
-0.21815301477909088,
0.2194906771183014,
0.14577491581439972,
0.08942466974258423,
0.15087363123893738,
-0.015993306413292885,
0.596602737903595,
0.16353584825992584,
0.15627910196781158,
-0.033190421760082245,
-0.17555736005306244,
0.28588342666625977,
0.2703327536582947,
0.27111726999282837,
0.05430919677019119,
0.22973982989788055,
0.18294471502304077,
0.2589285671710968,
-0.004605875816196203,
0.15493690967559814,
-0.28515660762786865,
-0.339741587638855,
0.1565559208393097,
0.12722647190093994,
-0.1917475461959839,
0.2534336447715759,
0.007706103380769491,
0.5218225121498108,
-0.03363931551575661,
-0.5268297791481018,
-0.25924989581108093,
0.31499189138412476,
-0.23930546641349792,
-0.192098930478096,
0.1573888063430786,
-0.0409390814602375,
0.3146926462650299,
0.3009052276611328,
-0.1844603419303894,
-0.21950902044773102,
0.34855878353118896,
-0.036060888320207596,
-0.021857209503650665,
-0.18287651240825653,
-0.09299563616514206,
0.16651861369609833,
0.1911555975675583,
-0.03523622453212738,
-0.08294796198606491,
-0.15251590311527252,
0.011723477393388748,
-0.2291649430990219,
0.33401399850845337,
0.09440749883651733,
0.16145554184913635,
0.2619740068912506,
0.1246224120259285,
0.0411863699555397,
0.04916209727525711,
0.10890126973390579,
0.12432124465703964,
-0.1317133754491806,
-0.2439187914133072,
0.13014771044254303,
-0.10438724607229233,
0.08130568265914917,
-0.030560297891497612,
0.0009527932852506638,
0.5091179609298706,
-0.1864432692527771,
-0.13535600900650024,
-0.15051844716072083,
-0.049947138875722885,
-0.12390907108783722,
0.04327474161982536,
-0.2306687831878662,
-0.03943562135100365,
0.35301974415779114,
-0.09094162285327911,
0.09348674863576889,
-0.08407153189182281,
-0.02116219513118267,
0.1385379582643509,
0.6743150949478149,
0.31105878949165344,
-0.2636904716491699,
-0.17818816006183624,
0.05582893267273903,
-0.37841618061065674,
0.1127919927239418,
0.1490982174873352,
0.26896658539772034,
-0.23755808174610138,
0.09250421822071075,
-0.2027713507413864,
0.19090382754802704,
0.01639172062277794,
-0.22666724026203156,
-0.040878135710954666,
0.23889192938804626,
-0.03393295779824257,
-0.10323070734739304,
-0.06015850231051445,
0.09454167634248734,
0.09010595083236694,
-0.10533598065376282,
0.44792261719703674,
0.2539934813976288,
-0.08849937468767166,
0.1033501848578453,
0.23871615529060364,
-0.6483798623085022,
-0.009517742320895195,
0.3108651638031006,
0.3298609256744385,
-0.1611229032278061,
0.07239022105932236,
-0.13246646523475647,
-0.047458913177251816,
-0.1372136026620865,
-0.15520986914634705,
-0.08791927993297577,
-0.0672587901353836,
0.21290022134780884,
-0.30414125323295593,
-0.07166787981987,
-0.28155025839805603,
0.2846008539199829,
0.10855952650308609,
-0.17373664677143097,
-0.11527788639068604,
0.19783689081668854,
0.1536783128976822,
-0.00985320471227169,
0.32558754086494446,
0.2880612909793854,
-0.10771217197179794,
0.4771924614906311,
-0.5032351016998291,
0.12474466115236282,
0.3944433629512787,
-0.18707376718521118,
-0.022914504632353783,
0.16464166343212128,
0.2516712546348572,
0.48099514842033386,
-0.569150984287262,
-0.6756882071495056,
0.011508951894938946,
-0.038503143936395645,
-0.19430242478847504,
-0.2786024510860443,
0.5799131989479065,
-0.44108355045318604,
-0.1232311874628067,
0.004527697339653969,
0.6662645936012268,
0.37535160779953003,
-0.11917266249656677,
0.3322756588459015,
-0.09271792322397232
] |
https://github.com/huggingface/datasets/issues/2012
|
No upstream branch
|
What's the issue exactly ?
Given an `upstream` remote repository with url `https://github.com/huggingface/datasets.git`, you can totally rebase from `upstream/master`.
It's mentioned at the beginning how to add the `upstream` remote repository
https://github.com/huggingface/datasets/blob/987df6b4e9e20fc0c92bc9df48137d170756fd7b/ADD_NEW_DATASET.md#L10-L14
|
Feels like the documentation on adding a new dataset is outdated?
https://github.com/huggingface/datasets/blob/987df6b4e9e20fc0c92bc9df48137d170756fd7b/ADD_NEW_DATASET.md#L49-L54
There is no upstream branch on remote.
| 32
|
No upstream branch
Feels like the documentation on adding a new dataset is outdated?
https://github.com/huggingface/datasets/blob/987df6b4e9e20fc0c92bc9df48137d170756fd7b/ADD_NEW_DATASET.md#L49-L54
There is no upstream branch on remote.
What's the issue exactly ?
Given an `upstream` remote repository with url `https://github.com/huggingface/datasets.git`, you can totally rebase from `upstream/master`.
It's mentioned at the beginning how to add the `upstream` remote repository
https://github.com/huggingface/datasets/blob/987df6b4e9e20fc0c92bc9df48137d170756fd7b/ADD_NEW_DATASET.md#L10-L14
|
[
-0.05419668182730675,
-0.3429028391838074,
-0.07095746695995331,
-0.22341224551200867,
0.13222409784793854,
0.0014158106641843915,
0.12123457342386246,
0.014974893070757389,
-0.4329248070716858,
0.16632796823978424,
0.010383781976997852,
-0.05045618116855621,
0.1446351706981659,
0.20273880660533905,
0.07673271000385284,
-0.06221248209476471,
0.2159232646226883,
-0.11128239333629608,
0.009495262056589127,
-0.38771960139274597,
-0.09594641625881195,
0.04078613966703415,
0.0525696761906147,
-0.46425625681877136,
-0.04451572522521019,
0.09810374677181244,
-0.1298280954360962,
0.007910655811429024,
-0.4901849627494812,
-0.4163929224014282,
0.3651946485042572,
-0.032904982566833496,
-0.042988020926713943,
0.4762798249721527,
-0.00011294059368083254,
-0.015029525384306908,
0.33860060572624207,
0.005578826647251844,
-0.19534367322921753,
-0.25801709294319153,
-0.43188613653182983,
-0.4034755825996399,
-0.003309560241177678,
0.22230884432792664,
-0.18756337463855743,
0.06526614725589752,
0.17415601015090942,
0.09764618426561356,
0.19493705034255981,
0.14454305171966553,
0.2238372415304184,
0.204938143491745,
0.2905174493789673,
-0.40317627787590027,
0.1369871348142624,
0.3619065582752228,
-0.22849135100841522,
0.6680127382278442,
0.2545555830001831,
0.48735129833221436,
0.07013761252164841,
0.14298588037490845,
0.31439444422721863,
-0.1501750499010086,
0.2716197371482849,
0.0007994110346771777,
0.08263928443193436,
-0.19877023994922638,
0.0030306053813546896,
0.19265659153461456,
0.609488844871521,
0.12202642112970352,
-0.5760810375213623,
-0.1504698395729065,
-0.01585620455443859,
-0.2908191978931427,
0.006097392179071903,
0.15176630020141602,
-0.012704480439424515,
0.11869800835847855,
-0.2797861695289612,
-0.5576735734939575,
-0.1758410483598709,
0.3202895224094391,
0.21982942521572113,
0.28377363085746765,
-0.15869033336639404,
-0.05961191654205322,
0.11483485251665115,
0.15833453834056854,
-0.3049243986606598,
0.25958648324012756,
-0.1861926168203354,
0.04995550215244293,
0.05248652771115303,
-0.11125265061855316,
0.017377089709043503,
0.17934149503707886,
0.11479930579662323,
0.43888330459594727,
-0.20548845827579498,
-0.2199707329273224,
-0.23147813975811005,
0.07531123608350754,
0.21653050184249878,
0.07562199234962463,
-0.031271763145923615,
-0.07908700406551361,
0.19869793951511383,
0.06020793318748474,
0.3548206388950348,
-0.22590404748916626,
0.08186859637498856,
-0.048449598252773285,
-0.3386685848236084,
-0.14331109821796417,
0.2231084406375885,
-0.3168766498565674,
0.1877772957086563,
-0.21545903384685516,
-0.026035664603114128,
-0.010540186427533627,
-0.013222998939454556,
-0.029433874413371086,
0.011092117056250572,
-0.005000562872737646,
-0.1991397887468338,
0.23915842175483704,
-0.17272794246673584,
-0.09769013524055481,
-0.24512842297554016,
0.04718485474586487,
-0.34218630194664,
-0.07749058306217194,
-0.010398531332612038,
-0.5276145935058594,
0.42983588576316833,
0.2547619640827179,
0.23932060599327087,
0.22547724843025208,
-0.43731555342674255,
0.1930019110441208,
-0.020711226388812065,
0.2717288136482239,
-0.02861724980175495,
-0.023809853941202164,
-0.09571488201618195,
0.0014506860170513391,
-0.06228470429778099,
-0.30666598677635193,
-0.23708897829055786,
-0.353568434715271,
-0.3002397119998932,
0.16840767860412598,
-0.20777523517608643,
-0.08394245058298111,
-0.461335152387619,
0.2800750136375427,
-0.20343977212905884,
-0.19496329128742218,
0.21607068181037903,
0.3117634952068329,
-0.1525011956691742,
-0.2019263058900833,
0.32195845246315,
0.3567752242088318,
0.12601768970489502,
-0.24486078321933746,
-0.16716453433036804,
0.02700061723589897,
0.01859421283006668,
0.2317686676979065,
-0.1968216449022293,
0.06611143052577972,
-0.14163871109485626,
-0.3127043843269348,
0.10760847479104996,
-0.39017626643180847,
-0.21166084706783295,
0.1747913956642151,
-0.18288318812847137,
-0.21972842514514923,
-0.031187308952212334,
0.10896767675876617,
0.0628402978181839,
-0.12084459513425827,
-0.1521594524383545,
-0.026000279933214188,
-0.21952812373638153,
-0.31928378343582153,
-0.14811110496520996,
-0.1362626701593399,
-0.4844517111778259,
-0.08429630845785141,
0.05734013020992279,
0.16307850182056427,
0.3549592196941376,
-0.002610425930470228,
-0.1355060636997223,
0.08396819233894348,
0.0962490439414978,
0.40973588824272156,
0.6342185735702515,
0.22271476686000824,
-0.14829222857952118,
0.07104239612817764,
-0.41926366090774536,
0.10083165019750595,
0.11693350225687027,
0.3873184323310852,
0.15212254226207733,
-0.08502282202243805,
-0.04435986652970314,
-0.1968238353729248,
-0.00048640562454238534,
-0.42590001225471497,
0.024492774158716202,
0.1884879767894745,
0.21385350823402405,
0.2234974354505539,
-0.2566765546798706,
0.09588316828012466,
-0.029491595923900604,
0.1528882384300232,
-0.6297125816345215,
0.10881180316209793,
-0.16648514568805695,
0.09394347667694092,
0.023717356845736504,
0.21249647438526154,
0.007032489869743586,
-0.2777436375617981,
0.09662305563688278,
0.32370445132255554,
-0.277469664812088,
0.28171634674072266,
0.3697199523448944,
0.19441165030002594,
0.3049986660480499,
-0.13338609039783478,
-0.09435024857521057,
-0.1449742466211319,
-0.08895406126976013,
0.19311994314193726,
-0.21828001737594604,
0.09466732293367386,
0.01109420508146286,
-0.0022165467962622643,
0.23117506504058838,
0.11431673169136047,
0.28474822640419006,
0.07653193920850754,
-0.05141720920801163,
-0.3194243013858795,
0.17160123586654663,
-0.022641265764832497,
0.24450244009494781,
-0.08637185394763947,
-0.16928552091121674,
0.29994112253189087,
0.1181776374578476,
-0.19173464179039001,
-0.2504562735557556,
0.2126443088054657,
0.05530634522438049,
-0.03494023159146309,
0.15094183385372162,
0.3782610595226288,
0.20948094129562378,
0.31401753425598145,
0.25908172130584717,
0.2057405561208725,
0.22975555062294006,
-0.2771492004394531,
0.03328556567430496,
-0.013366201892495155,
-0.09763521701097488,
0.01019981037825346,
0.2610307037830353,
0.08931534737348557,
-0.20380792021751404,
0.2617347538471222,
-0.1053248941898346,
0.2662076950073242,
0.03945421054959297,
0.13917860388755798,
-0.2544876039028168,
-0.19878074526786804,
-0.27733859419822693,
-0.4256401062011719,
-0.4906124770641327,
-0.28606584668159485,
0.05033222585916519,
0.22274601459503174,
0.04361246898770332,
0.048166316002607346,
0.18027737736701965,
0.06527358293533325,
-0.37731534242630005,
0.07415367662906647,
-0.022974319756031036,
-0.271695613861084,
-0.09496376663446426,
0.12811405956745148,
0.05934435874223709,
-0.11305463314056396,
0.5370501279830933,
-0.3216632306575775,
-0.014812303707003593,
-0.551178514957428,
-0.715752363204956,
0.14648135006427765,
-0.18880926072597504,
0.23675696551799774,
0.3718586564064026,
-0.09062052518129349,
-0.05355633422732353,
-0.12146948277950287,
0.13720087707042694,
-0.37952813506126404,
-0.2920962870121002,
-0.2372153401374817,
-0.18623194098472595,
-0.05491466075181961,
-0.16971877217292786,
-0.5078220963478088,
0.0070129455998539925,
-0.31144917011260986,
0.6385706663131714,
-0.16541209816932678,
-0.05978045240044594,
0.33904922008514404,
0.05032838508486748,
-0.12827442586421967,
-0.23004429042339325,
0.07834295183420181,
-0.10047917068004608,
-0.37812110781669617,
0.1260281354188919,
-0.30466601252555847,
-0.3719869554042816,
0.3863867521286011,
0.13932673633098602,
0.4151361882686615,
-0.10586754977703094,
-0.5360226631164551,
0.08737269788980484,
-0.13371641933918,
0.12597283720970154,
0.25949037075042725,
0.3358609974384308,
0.42465004324913025,
-0.2974682152271271,
-0.09980658441781998,
-0.13670772314071655,
-0.19377779960632324,
0.025569960474967957,
0.029075929895043373,
0.3333817422389984,
-0.13513004779815674,
0.6006180644035339,
-0.049907587468624115,
0.6402544975280762,
-0.09828008711338043,
-0.0154753178358078,
0.11437465995550156,
-0.14939172565937042,
0.632347583770752,
-0.33167731761932373,
-0.32336241006851196,
0.13649620115756989,
0.03455276042222977,
0.006887461524456739,
0.11257974058389664,
0.42487937211990356,
0.09232500195503235,
-0.24681241810321808,
-0.3051486611366272,
-0.10026393830776215,
-0.14601202309131622,
-0.155808687210083,
-0.1389601081609726,
0.027338355779647827,
0.1567370444536209,
-0.1699376255273819,
-0.12946473062038422,
0.05949928238987923,
-0.1904822736978531,
0.49836206436157227,
0.31191959977149963,
0.17629633843898773,
-0.11391682177782059,
-0.02002466470003128,
-0.3287767171859741,
0.022379577159881592,
0.1333620697259903,
0.1110152006149292,
-0.09896556288003922,
0.02277710847556591,
0.06395069509744644,
0.004518880974501371,
0.0821685716509819,
-0.26841211318969727,
-0.08768678456544876,
-0.1755533665418625,
-0.3973674476146698,
-0.0734749510884285,
0.07618749886751175,
0.129465714097023,
0.21938495337963104,
0.52292400598526,
0.1918778419494629,
-0.4371403157711029,
-0.24947121739387512,
0.4528583288192749,
-0.10363036394119263,
0.02423783950507641,
0.07747967541217804,
-0.363913893699646,
-0.19278228282928467,
-0.14176806807518005,
-0.15612687170505524,
-0.14998218417167664,
-0.24232953786849976,
0.2002391517162323,
0.20974136888980865,
0.08045563846826553,
0.13073131442070007,
-0.02185896225273609,
-0.11008644849061966,
-0.07818957418203354,
0.17542701959609985,
0.10592653602361679,
0.13795138895511627,
0.28651508688926697,
0.5018661618232727,
0.6798104643821716,
-0.14568597078323364,
-0.09530316293239594,
0.1463412493467331,
-0.10234830528497696,
0.36244577169418335,
0.2534075975418091,
0.30156373977661133,
0.3917585015296936,
0.3839935064315796,
0.04691644012928009,
-0.13799120485782623,
0.03684724122285843,
0.19822323322296143,
0.09812387824058533,
-0.15254800021648407,
-0.5134527087211609,
0.34817594289779663,
-0.24560506641864777,
0.1051679328083992,
0.2561163902282715,
0.6245747208595276,
0.11923319846391678,
-0.17024609446525574,
-0.1379125565290451,
0.7449837327003479,
0.27115750312805176,
0.18395058810710907,
0.281358927488327,
-0.20679871737957,
0.6587556600570679,
-0.02525542676448822,
0.12059954553842545,
0.019294461235404015,
0.14907099306583405,
-0.027701806277036667,
-0.03830515965819359,
-0.1677701324224472,
-0.33072537183761597,
0.14689479768276215,
0.333395779132843,
0.20542003214359283,
0.8445011973381042,
0.15784895420074463,
0.2077127993106842,
0.10238026827573776,
0.10105793178081512,
-0.32590699195861816,
0.17629610002040863,
0.10654392838478088,
0.16276614367961884,
-0.21117542684078217,
-0.35453569889068604,
-0.25338855385780334,
-0.20738238096237183,
-0.2653510868549347,
-0.1439168006181717,
0.15213355422019958,
0.15104536712169647,
0.15302115678787231,
-0.4044541120529175,
0.14838682115077972,
-0.11247693747282028,
0.615048885345459,
0.006537491921335459,
-0.40307286381721497,
0.08431485295295715,
-0.08268745988607407,
-0.251729816198349,
-0.03606739267706871,
0.032389428466558456,
0.0447334386408329,
-0.23641622066497803,
-0.30173709988594055,
-0.15462493896484375,
-0.02946220152080059,
-0.6098451614379883,
-0.13349522650241852,
0.09297596663236618,
-0.4606907367706299,
0.04198426380753517,
0.11056902259588242,
0.3218733072280884,
-0.06633539497852325,
-0.24800047278404236,
0.09487957507371902,
0.03474557399749756,
-0.15560941398143768,
-0.4615311622619629,
0.2726501226425171,
-0.09906536340713501,
-0.3219060003757477,
0.43356722593307495,
-0.09013251960277557,
-0.1981194019317627,
0.035044800490140915,
0.11761337518692017,
-0.175215944647789,
-0.07870292663574219,
-0.25997114181518555,
0.4198154807090759,
-0.665597677230835,
-0.07202017307281494,
-0.06026614457368851,
0.14047330617904663,
0.2696121633052826,
0.020143859088420868,
0.19319897890090942,
-0.15548978745937347,
-0.03990466147661209,
-0.06577607989311218,
-0.43664589524269104,
0.4004325568675995,
-0.4324069917201996,
-0.029674595221877098,
-0.03450916334986687,
-0.02626379393041134,
0.26089978218078613,
0.09949139505624771,
-0.3136252760887146,
0.10218489915132523,
0.07107706367969513,
0.17820970714092255,
0.12318418174982071,
-0.1891823261976242,
0.36617112159729004,
-0.30879634618759155,
-0.015416979789733887,
-0.28102272748947144,
-0.3800629675388336,
-0.11211250722408295,
-0.07063288986682892,
0.10568304359912872,
-0.03886323422193527,
0.002596117788925767,
-0.010812186636030674,
0.02626653015613556,
-0.2635308802127838,
0.06493843346834183,
0.1544000655412674,
0.2039615511894226,
0.04494607821106911,
-0.08050201088190079,
0.21328215301036835,
0.16361655294895172,
0.0024129534140229225,
-0.015585258603096008,
0.2798174023628235,
0.2435320019721985,
-0.011638336814939976,
-0.057994235306978226,
-0.12433589994907379,
-0.060525547713041306,
-0.044278260320425034,
0.12733687460422516,
-0.0094812186434865,
0.0360427051782608,
0.2648448646068573,
-0.018352201208472252,
0.20347492396831512,
-0.1404740959405899,
0.4461747407913208,
-0.04096387326717377,
0.22878654301166534,
0.29139477014541626,
0.11612758040428162,
0.100362129509449,
-0.15217003226280212,
-0.012298502959311008,
0.1328456848859787,
0.1795760691165924,
0.11246742308139801,
0.32697024941444397,
0.5192696452140808,
-0.08695044368505478,
0.1475420743227005,
0.2571846544742584,
-0.013117561116814613,
-0.02532872185111046,
0.3326091170310974,
0.3951195478439331,
0.09557868540287018,
0.10726094990968704,
0.09866885840892792,
0.21870757639408112,
0.10123006999492645,
0.04152410104870796,
-0.09902455657720566,
0.2544952929019928,
0.008600601926445961,
-0.05340281501412392,
0.21186690032482147,
-0.07292290031909943,
-0.14156712591648102,
0.08910452574491501,
0.3963586091995239,
-0.11694375425577164,
-0.0006473041139543056,
0.42328080534935,
0.08123145997524261,
-0.11445362865924835,
-0.1230814978480339,
0.24723435938358307,
0.05314471945166588,
-0.10366899520158768,
-0.1387127786874771,
-0.06996655464172363,
0.02237807586789131,
0.030968189239501953,
0.05886990949511528,
-0.1924854815006256,
0.23924243450164795,
-0.046143192797899246,
-0.11773711442947388,
-0.12225539982318878,
0.06648841500282288,
-0.020142197608947754,
0.21059100329875946,
0.11616028100252151,
0.26278460025787354,
0.3309721350669861,
-0.30427756905555725,
0.1512642800807953,
0.44037410616874695,
0.34462305903434753,
0.07839914411306381,
0.300810307264328,
0.24245844781398773,
0.10010925680398941,
-0.10459787398576736,
0.028108710423111916,
0.41486749053001404,
-0.03873854875564575,
0.119141586124897,
-0.09586267173290253,
0.16890642046928406,
-0.08975622802972794,
0.5723364353179932,
-0.1623559594154358,
0.11403533816337585,
-0.07978470623493195,
0.42208802700042725,
-0.1311388462781906,
0.03504752367734909,
-0.20596660673618317,
0.3387080132961273,
-0.3323354721069336,
0.13307040929794312,
0.11888781189918518,
-0.0054399012587964535,
-0.10032401233911514,
-0.08442144095897675,
0.10774553567171097,
0.1567726880311966,
0.4633117914199829,
0.5227730870246887,
0.09737180918455124,
-0.012158566154539585,
-0.32832321524620056,
-0.3530431091785431,
-0.08914515376091003,
-0.1584778130054474,
0.16872604191303253,
-0.10218455642461777,
0.1534791737794876,
0.1190970242023468,
0.04662396013736725,
0.10407502204179764,
-0.12263192236423492,
-0.08314530551433563,
-0.10036394000053406,
-0.019765781238675117,
-0.14047738909721375,
-0.028627460822463036,
-0.07371553033590317,
0.04570051655173302,
0.21245524287223816,
0.07544611394405365,
-0.13547559082508087,
0.044820286333560944,
0.2117476910352707,
0.34827515482902527,
-0.03739441558718681,
-0.1236434057354927,
-0.1607390195131302,
0.10377547144889832,
0.18004822731018066,
-0.12061715871095657,
-0.510187566280365,
-0.43857353925704956,
-0.2309194654226303,
-0.253713995218277,
0.33381760120391846,
-0.22557325661182404,
0.42258232831954956,
-0.26488596200942993,
-0.2386309653520584,
-0.3333469331264496,
0.17119425535202026,
0.15138418972492218,
0.010809075087308884,
-0.26211875677108765,
0.23013271391391754,
-0.14687494933605194,
-0.0217886995524168,
0.23127959668636322,
0.15073317289352417,
-0.09928633272647858,
-0.027318216860294342,
-0.39741387963294983,
-0.13343879580497742,
0.5408660173416138,
-0.36372774839401245,
0.2908591628074646,
-0.11502599716186523,
0.033961668610572815,
0.6897439360618591,
-0.2621999680995941,
-0.7218084931373596,
0.11651710420846939,
0.11827041208744049,
0.1573733389377594,
-0.2257874608039856,
0.32578933238983154,
-0.22512981295585632,
-0.3165767788887024,
0.017839400097727776,
0.4571695327758789,
0.13286450505256653,
-0.3172664940357208,
0.175241157412529,
-0.1456601768732071
] |
https://github.com/huggingface/datasets/issues/2012
|
No upstream branch
|
~~What difference is there with the default `origin` remote that is set when you clone the repo?~~ I've just understood that this applies to **forks** of the repo 🤡
|
Feels like the documentation on adding a new dataset is outdated?
https://github.com/huggingface/datasets/blob/987df6b4e9e20fc0c92bc9df48137d170756fd7b/ADD_NEW_DATASET.md#L49-L54
There is no upstream branch on remote.
| 29
|
No upstream branch
Feels like the documentation on adding a new dataset is outdated?
https://github.com/huggingface/datasets/blob/987df6b4e9e20fc0c92bc9df48137d170756fd7b/ADD_NEW_DATASET.md#L49-L54
There is no upstream branch on remote.
~~What difference is there with the default `origin` remote that is set when you clone the repo?~~ I've just understood that this applies to **forks** of the repo 🤡
|
[
-0.15264354646205902,
-0.3908185362815857,
-0.056868553161621094,
-0.38039615750312805,
-0.05352897569537163,
-0.12343915551900864,
0.3151799142360687,
-0.0022331594955176115,
-0.35390594601631165,
0.2694287896156311,
-0.009294304065406322,
-0.04662778601050377,
0.3955136835575104,
0.2351265549659729,
0.24673795700073242,
-0.06801839172840118,
0.32741671800613403,
-0.1903986930847168,
0.2409137636423111,
-0.7290987372398376,
-0.2180352658033371,
-0.049280911684036255,
0.12126419693231583,
-0.20999836921691895,
-0.14653970301151276,
0.2308080941438675,
0.04827611520886421,
0.18149113655090332,
-0.29021668434143066,
-0.3672449290752411,
0.45382124185562134,
0.06178596615791321,
0.015986593440175056,
0.45363080501556396,
-0.00012143696221755818,
-0.035285692662000656,
0.42747756838798523,
0.03579751029610634,
-0.2610287070274353,
-0.15297596156597137,
-0.594042956829071,
-0.2314036339521408,
0.007119045592844486,
0.07150898873806,
-0.029064010828733444,
0.18049387633800507,
0.2290712147951126,
-0.11033917963504791,
0.04691631719470024,
0.12953388690948486,
0.14207834005355835,
0.19139808416366577,
0.03621632233262062,
-0.37785273790359497,
0.282126247882843,
0.4759957492351532,
-0.22669340670108795,
0.875223696231842,
0.24170903861522675,
0.5030216574668884,
0.17168249189853668,
-0.06528215110301971,
0.10753738135099411,
0.04306717589497566,
-0.03737013041973114,
0.10297346115112305,
0.17499931156635284,
-0.15494437515735626,
0.1622277945280075,
0.4301552474498749,
0.7702745795249939,
0.23607057332992554,
-0.4754001796245575,
0.021270116791129112,
-0.012533972039818764,
-0.38959935307502747,
-0.05936967954039574,
0.3834999203681946,
0.06466498970985413,
0.09515085816383362,
-0.19794128835201263,
-0.3189459443092346,
-0.3143383264541626,
0.2806483507156372,
-0.06581758707761765,
0.4146610498428345,
-0.13668935000896454,
0.08400186151266098,
-0.025212744250893593,
0.25577694177627563,
-0.16606394946575165,
0.0732244998216629,
-0.21529361605644226,
-0.11906693875789642,
0.015090357512235641,
-0.17599646747112274,
0.0897790715098381,
0.08729245513677597,
0.07181163877248764,
0.5886421799659729,
-0.33821335434913635,
-0.12449035793542862,
-0.25463250279426575,
0.08341651409864426,
0.16287729144096375,
-0.00496460497379303,
0.06893934309482574,
0.12332264333963394,
0.3434399664402008,
-0.18443578481674194,
0.3132750391960144,
-0.15800830721855164,
0.06242585554718971,
0.14616559445858002,
-0.21678917109966278,
-0.15689216554164886,
0.34826213121414185,
-0.40605834126472473,
0.22223781049251556,
-0.11245475709438324,
-0.12770052254199982,
-0.2261953353881836,
-0.1769111603498459,
-0.0030165421776473522,
0.05418893322348595,
0.14219003915786743,
-0.47687608003616333,
0.28589922189712524,
-0.1810339242219925,
-0.16085602343082428,
-0.25938108563423157,
-0.10990122705698013,
-0.16111856698989868,
-0.03405134379863739,
-0.05750489979982376,
-0.44123804569244385,
0.49181482195854187,
0.15357261896133423,
0.26453110575675964,
0.3689870834350586,
-0.1172584742307663,
0.05523055046796799,
0.09563104063272476,
0.383159875869751,
-0.12710018455982208,
0.0321272537112236,
-0.11345968395471573,
0.10482762008905411,
-0.14274241030216217,
-0.02694448083639145,
-0.19899700582027435,
-0.48190271854400635,
-0.22531291842460632,
0.09541710466146469,
-0.2828335165977478,
-0.20538699626922607,
-0.6288794279098511,
0.1489567905664444,
-0.3456103503704071,
-0.0665430873632431,
0.33761757612228394,
0.15094196796417236,
-0.014385976828634739,
-0.17803996801376343,
0.09571706503629684,
0.4086878001689911,
-0.016841961070895195,
-0.2962553799152374,
-0.12484819442033768,
-0.19757989048957825,
-0.01739911362528801,
0.2092633694410324,
-0.35931289196014404,
-0.045793090015649796,
0.05381108447909355,
-0.09897303581237793,
0.04497493430972099,
-0.417921781539917,
-0.15437401831150055,
0.09062034636735916,
-0.2368861436843872,
-0.23999696969985962,
0.0398537814617157,
0.08184044063091278,
0.20990346372127533,
-0.15547358989715576,
-0.1764332503080368,
0.03916925936937332,
-0.21719694137573242,
-0.22060814499855042,
-0.17835530638694763,
-0.04829179123044014,
-0.38473477959632874,
0.11118825525045395,
0.014250447042286396,
0.11735127121210098,
0.31903666257858276,
-0.13958042860031128,
-0.2348848134279251,
0.06228167563676834,
-0.13157710433006287,
0.18529005348682404,
0.709537923336029,
-0.05903176590800285,
-0.10038164258003235,
0.22342392802238464,
-0.527783989906311,
0.16857890784740448,
0.19478416442871094,
0.25247105956077576,
0.34220102429389954,
-0.009450197219848633,
0.07559546828269958,
-0.086631178855896,
-0.18108637630939484,
-0.16496089100837708,
-0.08941925317049026,
0.24651718139648438,
0.29777929186820984,
0.16713273525238037,
-0.5274184346199036,
0.009059217758476734,
-0.22399985790252686,
0.1525304913520813,
-0.464669406414032,
0.2709398865699768,
-0.040806274861097336,
0.14901478588581085,
-0.24671928584575653,
0.0117409136146307,
-0.07814233750104904,
-0.26708582043647766,
0.04792913794517517,
0.27139812707901,
-0.18042892217636108,
0.41895076632499695,
0.485128253698349,
0.2931002378463745,
0.3441983163356781,
-0.24791067838668823,
0.1567426472902298,
-0.04401346668601036,
-0.1111486554145813,
0.19807134568691254,
-0.2691898047924042,
0.09703511744737625,
0.1809609830379486,
-0.03143005445599556,
0.14527612924575806,
-0.11582717299461365,
0.2320699393749237,
0.015004958026111126,
-0.10417713969945908,
-0.3393942415714264,
0.051903706043958664,
0.21700872480869293,
0.28672951459884644,
-0.05796247348189354,
-0.15933944284915924,
0.38181424140930176,
0.09627840667963028,
-0.5721608400344849,
-0.2647398114204407,
0.22777065634727478,
0.09363803267478943,
-0.20304255187511444,
0.13167594373226166,
0.5656309127807617,
0.3525889217853546,
0.1717989146709442,
0.27332037687301636,
0.19779643416404724,
0.09862649440765381,
-0.4801005423069,
0.18986131250858307,
-0.016746975481510162,
-0.12675030529499054,
-0.00970415398478508,
0.1698026806116104,
-0.019926970824599266,
-0.15595458447933197,
0.0612974613904953,
0.098296619951725,
0.21831431984901428,
0.12693610787391663,
0.0965893343091011,
-0.36883416771888733,
-0.17662623524665833,
-0.34482958912849426,
-0.2950814962387085,
-0.5318100452423096,
-0.33497563004493713,
-0.01985456608235836,
0.01832103729248047,
-0.09651269018650055,
-0.08179078996181488,
0.17705433070659637,
0.17092536389827728,
-0.4175530970096588,
0.03437425568699837,
-0.030464569106698036,
-0.3974846601486206,
-0.10179252177476883,
0.03605484589934349,
-0.1647348403930664,
-0.0609862245619297,
0.5170270204544067,
-0.4658842384815216,
-0.16915100812911987,
-0.4035305082798004,
-0.537556529045105,
0.12568899989128113,
0.05981886759400368,
0.1879422962665558,
0.16972915828227997,
0.1899944692850113,
0.08905906975269318,
0.03158845379948616,
0.16395680606365204,
-0.23397256433963776,
-0.229644313454628,
-0.26270949840545654,
-0.23791836202144623,
-0.11414054781198502,
-0.004667403642088175,
-0.40126878023147583,
-0.11817623674869537,
-0.2007211148738861,
0.46426862478256226,
-0.1780482679605484,
0.037975940853357315,
0.2009671926498413,
-0.16171756386756897,
-0.06569389998912811,
-0.2549111843109131,
0.08394236117601395,
-0.1440751552581787,
-0.5398861765861511,
0.055047713220119476,
-0.21482278406620026,
-0.1005779504776001,
0.3010256588459015,
0.05457736924290657,
0.28007206320762634,
0.04770610108971596,
-0.5282682776451111,
-0.010065581649541855,
-0.16903653740882874,
0.30686822533607483,
0.5019606351852417,
0.37537047266960144,
0.5677350163459778,
-0.45304539799690247,
-0.0075602163560688496,
0.014791225083172321,
-0.30031153559684753,
0.03704725205898285,
0.20825998485088348,
0.16500309109687805,
-0.048484839498996735,
0.4850192070007324,
-0.27237460017204285,
0.7536587715148926,
-0.13005530834197998,
0.08229955285787582,
-0.04041358456015587,
0.008438554592430592,
0.5139186978340149,
-0.40797561407089233,
-0.08114109188318253,
0.23014743626117706,
0.12414216995239258,
-0.06543219089508057,
0.025667471811175346,
0.33373233675956726,
-0.020179471001029015,
-0.17287679016590118,
-0.5013919472694397,
0.0714675560593605,
-0.1127299889922142,
-0.069722481071949,
-0.06874646991491318,
0.1283309906721115,
0.15902994573116302,
-0.16382402181625366,
-0.0739336907863617,
0.0784255862236023,
-0.2701798677444458,
0.44936132431030273,
0.19998034834861755,
-0.008048666641116142,
-0.5328280925750732,
-0.10791194438934326,
-0.14441855251789093,
0.08932243287563324,
0.12601539492607117,
-0.0015053615206852555,
-0.007838170044124126,
-0.16758562624454498,
0.1276492178440094,
-0.0504656583070755,
0.017726970836520195,
-0.30455589294433594,
-0.1077801063656807,
-0.21224045753479004,
-0.4268770217895508,
-0.005509767681360245,
-0.12259682267904282,
0.05506257340312004,
0.15360312163829803,
0.4221291244029999,
0.2055986076593399,
-0.29682493209838867,
-0.2599080204963684,
0.47033220529556274,
0.09194754809141159,
-0.026870207861065865,
0.16496069729328156,
-0.33719223737716675,
-0.016205091029405594,
-0.11417025327682495,
-0.048229679465293884,
-0.3885568678379059,
-0.345029354095459,
-0.011361424811184406,
0.2983244061470032,
0.02682698518037796,
0.13255874812602997,
-0.2346959412097931,
0.08127138763666153,
-0.18783341348171234,
-0.0034692834597080946,
0.04836568236351013,
0.2260618507862091,
0.16477932035923004,
0.5362098217010498,
0.6573819518089294,
-0.18387261033058167,
-0.2224893867969513,
0.06368616223335266,
-0.06942150741815567,
0.20161600410938263,
0.444896399974823,
0.4241693317890167,
0.2504863142967224,
0.3098902106285095,
-0.0499735027551651,
0.05369073152542114,
-0.025444958359003067,
0.07952461391687393,
0.12705297768115997,
-0.2192225158214569,
-0.3969980478286743,
0.4532274603843689,
-0.24843472242355347,
0.03080274909734726,
0.2647313177585602,
0.6452975273132324,
0.2309073954820633,
-0.16147193312644958,
-0.1040877178311348,
0.8261780738830566,
0.41811761260032654,
0.2513292729854584,
0.3437053859233856,
-0.2981671094894409,
0.4382248818874359,
-0.009354347363114357,
0.006491720676422119,
-0.05544585734605789,
0.17792563140392303,
-0.01863459125161171,
-0.10227959603071213,
-0.07569999992847443,
-0.1465049535036087,
0.28459712862968445,
0.18538331985473633,
0.07161792367696762,
0.7963951230049133,
0.177462637424469,
0.13132034242153168,
0.2925497889518738,
0.14267104864120483,
-0.2062413990497589,
0.07739491760730743,
-0.07846367359161377,
0.14662693440914154,
-0.15340939164161682,
-0.11972453445196152,
-0.17705339193344116,
-0.16678844392299652,
-0.26643431186676025,
-0.05464116111397743,
0.30319204926490784,
0.011773955076932907,
0.29715022444725037,
-0.5078310370445251,
-0.12068234384059906,
-0.2457905262708664,
0.6949752569198608,
-0.0030174758285284042,
-0.13073742389678955,
0.07456254959106445,
0.13535064458847046,
-0.02127775177359581,
0.2675527036190033,
-0.11569186300039291,
0.013834942132234573,
-0.22649525105953217,
-0.546622633934021,
-0.06053651124238968,
-0.053943537175655365,
-0.5696588158607483,
-0.15813881158828735,
0.01994055137038231,
-0.36256763339042664,
0.02652902342379093,
0.052579473704099655,
0.4546346664428711,
-0.03101240284740925,
-0.11706707626581192,
0.02292666770517826,
0.11071405559778214,
-0.10566743463277817,
-0.3512170910835266,
0.05177953094244003,
-0.15263158082962036,
-0.39983081817626953,
0.32131093740463257,
-0.03648344799876213,
-0.22095248103141785,
0.026542268693447113,
-0.080067478120327,
-0.13108935952186584,
-0.08112858980894089,
0.045174408704042435,
0.36838722229003906,
-0.744109034538269,
0.063863605260849,
-0.17490148544311523,
0.01165916956961155,
0.2676515579223633,
-0.015374599024653435,
0.009913011454045773,
0.05287979915738106,
-0.1558084636926651,
-0.012355031445622444,
-0.1575993448495865,
0.23365353047847748,
-0.3643549084663391,
0.09062212705612183,
0.1775619089603424,
-0.3076359033584595,
0.1613842397928238,
-0.06238223612308502,
-0.2264406532049179,
0.13885410130023956,
0.09806810319423676,
0.22575314342975616,
0.14070968329906464,
-0.0913134440779686,
0.2690117657184601,
-0.35360223054885864,
-0.026734158396720886,
-0.39609530568122864,
-0.27257487177848816,
-0.11628361791372299,
-0.22291505336761475,
0.18967080116271973,
-0.0910482332110405,
-0.2563016414642334,
0.10808134078979492,
-0.14171791076660156,
-0.13777706027030945,
0.21552413702011108,
0.2188664674758911,
0.21756696701049805,
0.06444673240184784,
0.014909517019987106,
0.22432513535022736,
0.03606078401207924,
-0.1561959683895111,
0.14758971333503723,
0.25177621841430664,
0.33750638365745544,
-0.02728024497628212,
0.09079672396183014,
-0.1516253501176834,
-0.15144173800945282,
-0.22057968378067017,
0.1333143711090088,
-0.13220669329166412,
0.1608879715204239,
0.16465306282043457,
-0.01804138347506523,
0.21006880700588226,
-0.2077450305223465,
0.2365712970495224,
0.10066425800323486,
0.08471306413412094,
0.07049696147441864,
0.1817001849412918,
0.11102795600891113,
-0.021496346220374107,
-0.18473194539546967,
0.3753149211406708,
0.23016303777694702,
0.04689731076359749,
0.33827370405197144,
0.42785051465034485,
0.010821024887263775,
0.4604399800300598,
0.18214769661426544,
0.07763160765171051,
-0.08835473656654358,
0.6449832916259766,
0.5471994280815125,
0.026091722771525383,
0.2726815938949585,
0.017038388177752495,
0.22920843958854675,
0.007152207661420107,
-0.028006335720419884,
-0.0036755232140421867,
0.15947678685188293,
0.23487882316112518,
0.00223587267100811,
0.36672359704971313,
-0.027277646586298943,
-0.05358254909515381,
-0.061104968190193176,
0.10473395138978958,
-0.14187897741794586,
0.20868073403835297,
0.24160031974315643,
-0.01017729565501213,
-0.0855589285492897,
-0.22053183615207672,
0.17177090048789978,
0.01241348311305046,
-0.20534184575080872,
-0.36896228790283203,
0.05457644909620285,
0.20006224513053894,
0.20042702555656433,
-0.1807774007320404,
-0.2027123123407364,
0.1707306206226349,
0.06113358587026596,
-0.10067925602197647,
-0.04210713133215904,
0.26874566078186035,
-0.23983882367610931,
0.10682700574398041,
0.2622811198234558,
0.22688190639019012,
0.4346134066581726,
-0.3286222517490387,
0.26404035091400146,
0.49570146203041077,
0.17932382225990295,
0.031549565494060516,
0.3371666669845581,
0.34609395265579224,
0.30190303921699524,
-0.14997152984142303,
0.19911174476146698,
0.2072291076183319,
0.044498261064291,
0.17129798233509064,
-0.13475143909454346,
0.1457044631242752,
0.01612183265388012,
0.5959383249282837,
-0.04844491183757782,
0.049268051981925964,
-0.11223296076059341,
0.418130487203598,
-0.0545029491186142,
0.11221392452716827,
-0.23903614282608032,
0.3924519419670105,
-0.29747816920280457,
0.25981950759887695,
0.11903245002031326,
0.03626447543501854,
-0.23353472352027893,
-0.05344107374548912,
0.04907149448990822,
0.01119907759130001,
0.558273434638977,
0.4555201530456543,
0.08614551275968552,
-0.042880360037088394,
-0.14856289327144623,
0.00970360916107893,
-0.004738003481179476,
-0.2231488972902298,
0.08955652266740799,
-0.16045120358467102,
0.07507500797510147,
0.09479837864637375,
0.21053121984004974,
-0.035096120089292526,
-0.12062845379114151,
-0.14631672203540802,
0.0992906466126442,
0.11644520610570908,
-0.21360674500465393,
0.03449126332998276,
-0.006906734313815832,
-0.17136649787425995,
0.04824689030647278,
0.09963757544755936,
0.05671669542789459,
-0.10078990459442139,
0.17011912167072296,
0.16249901056289673,
0.14794941246509552,
-0.18199503421783447,
-0.2239585965871811,
0.19419747591018677,
0.18531526625156403,
0.13809485733509064,
-0.3846305310726166,
-0.2508637607097626,
-0.19126863777637482,
-0.41256213188171387,
0.20450010895729065,
-0.21365854144096375,
0.3190743625164032,
-0.088316909968853,
-0.12721092998981476,
-0.16039617359638214,
0.049093637615442276,
0.07885874062776566,
0.2051479071378708,
-0.11128951609134674,
-0.016524551436305046,
-0.07589341700077057,
-0.35863062739372253,
0.2597537636756897,
0.03159148618578911,
0.014925154857337475,
-0.1502954065799713,
-0.3193626403808594,
0.07434593886137009,
0.4109383225440979,
-0.3343654274940491,
0.39132899045944214,
-0.33472126722335815,
0.027334708720445633,
0.5880256295204163,
-0.15753662586212158,
-0.4989500343799591,
0.17429405450820923,
0.1900554895401001,
-0.17720265686511993,
-0.3052074909210205,
0.3734639286994934,
-0.03306658938527107,
-0.3052956461906433,
-0.009174644947052002,
0.41892990469932556,
0.1355573982000351,
-0.44800224900245667,
0.018125133588910103,
-0.06387636810541153
] |
https://github.com/huggingface/datasets/issues/2010
|
Local testing fails
|
I'm not able to reproduce on my side.
Can you provide the full stacktrace please ?
What version of `python` and `dill` do you have ? Which OS are you using ?
|
I'm following the CI setup as described in
https://github.com/huggingface/datasets/blob/8eee4fa9e133fe873a7993ba746d32ca2b687551/.circleci/config.yml#L16-L19
in a new conda environment, at commit https://github.com/huggingface/datasets/commit/4de6dbf84e93dad97e1000120d6628c88954e5d4
and getting
```
FAILED tests/test_caching.py::RecurseDumpTest::test_dump_ipython_function - TypeError: an integer is required (got type bytes)
1 failed, 2321 passed, 5109 skipped, 10 warnings in 124.32s (0:02:04)
```
Seems like a discrepancy with CI, perhaps a lib version that's not controlled?
Tried with `pyarrow=={1.0.0,0.17.1,2.0.0}`
| 32
|
Local testing fails
I'm following the CI setup as described in
https://github.com/huggingface/datasets/blob/8eee4fa9e133fe873a7993ba746d32ca2b687551/.circleci/config.yml#L16-L19
in a new conda environment, at commit https://github.com/huggingface/datasets/commit/4de6dbf84e93dad97e1000120d6628c88954e5d4
and getting
```
FAILED tests/test_caching.py::RecurseDumpTest::test_dump_ipython_function - TypeError: an integer is required (got type bytes)
1 failed, 2321 passed, 5109 skipped, 10 warnings in 124.32s (0:02:04)
```
Seems like a discrepancy with CI, perhaps a lib version that's not controlled?
Tried with `pyarrow=={1.0.0,0.17.1,2.0.0}`
I'm not able to reproduce on my side.
Can you provide the full stacktrace please ?
What version of `python` and `dill` do you have ? Which OS are you using ?
|
[
-0.1566007137298584,
0.09454060345888138,
0.0029508157167583704,
0.05197590962052345,
-0.1364506185054779,
-0.2591090202331543,
0.4086027443408966,
0.22406497597694397,
-0.10595908015966415,
0.26768821477890015,
-0.005887904204428196,
0.0788336768746376,
-0.15376603603363037,
0.5032172203063965,
-0.23508311808109283,
0.10643479973077774,
0.029259320348501205,
0.15190726518630981,
-0.2006695419549942,
0.07912078499794006,
-0.037601668387651443,
0.2799374759197235,
-0.22658266127109528,
-0.0447770357131958,
-0.3562319278717041,
-0.03419354557991028,
-0.21877910196781158,
0.18961738049983978,
-0.16089659929275513,
-0.32544755935668945,
0.6411893963813782,
0.03247732296586037,
0.027730608358979225,
0.7641420960426331,
-0.0001287131744902581,
0.03934740647673607,
0.46740391850471497,
-0.18515396118164062,
-0.35706308484077454,
-0.28900983929634094,
0.35207599401474,
-0.07479467988014221,
0.47891315817832947,
-0.12173081189393997,
-0.05356942117214203,
0.36816808581352234,
-0.35716646909713745,
-0.28292304277420044,
0.33778297901153564,
0.29636168479919434,
0.08195802569389343,
0.5929409861564636,
-0.15777623653411865,
-0.051014091819524765,
-0.09359608590602875,
0.6183963418006897,
-0.28038665652275085,
0.6484382748603821,
0.43518728017807007,
-0.15342621505260468,
-0.1185106709599495,
-0.0808708593249321,
0.11256160587072372,
0.10811159759759903,
-0.1265396773815155,
0.049117714166641235,
-0.12125799059867859,
-0.28176742792129517,
0.18828415870666504,
-0.043496519327163696,
0.4278687536716461,
-0.3348487615585327,
-0.3669341802597046,
0.29186007380485535,
-0.13226592540740967,
-0.3039441406726837,
0.4314470887184143,
-0.09469659626483917,
-0.4797496497631073,
0.2464619278907776,
-0.5746464133262634,
0.18038088083267212,
-0.0959850549697876,
0.18898384273052216,
-0.3290414810180664,
0.013924749568104744,
-0.0037794564850628376,
0.07569825649261475,
-0.08330938220024109,
-0.07591883093118668,
0.0775504931807518,
0.21807540953159332,
0.11248967796564102,
0.21054738759994507,
0.019203729927539825,
-0.1825951486825943,
0.0042885104194283485,
0.2666117548942566,
0.24720506370067596,
0.42406296730041504,
-0.18247747421264648,
-0.12257456034421921,
0.09414906799793243,
0.1986428201198578,
0.029791682958602905,
0.4149537682533264,
0.17679065465927124,
0.3287166655063629,
0.44727352261543274,
-0.03142731636762619,
-0.034934595227241516,
0.21398097276687622,
0.27012693881988525,
-0.2194727659225464,
0.08743302524089813,
-0.05996796861290932,
0.1236557886004448,
-0.4884462356567383,
-0.24302031099796295,
0.3342877924442291,
-0.22558346390724182,
0.013030842877924442,
0.29213768243789673,
0.2375742346048355,
0.08711080253124237,
0.19623719155788422,
0.16213764250278473,
0.40796998143196106,
-0.11786012351512909,
0.3706069588661194,
-0.10396312177181244,
-0.11246354132890701,
-0.13226068019866943,
0.19034385681152344,
0.5385650992393494,
-0.04718140512704849,
0.4167155921459198,
-0.007028001826256514,
0.5418524146080017,
-0.07364309579133987,
0.030018948018550873,
-0.02249353565275669,
0.19875355064868927,
0.5158854722976685,
-0.23142459988594055,
-0.04309479519724846,
0.23183876276016235,
-0.16801609098911285,
-0.29344797134399414,
0.18763642013072968,
-0.03655451908707619,
-0.3601260483264923,
-0.1811523735523224,
-0.03283309191465378,
-0.24028407037258148,
0.004947906360030174,
0.40451982617378235,
-0.423861026763916,
0.17298942804336548,
0.01573151908814907,
0.012632385827600956,
-0.24059359729290009,
0.00430922769010067,
0.09559232741594315,
0.32552531361579895,
0.5624169707298279,
-0.1283837854862213,
-0.04054568335413933,
0.09093127399682999,
0.05603460967540741,
0.3275013864040375,
0.32299667596817017,
-0.2174915224313736,
-0.07976531982421875,
-0.1228107362985611,
-0.15186083316802979,
0.38637810945510864,
-0.5328124761581421,
-0.27624744176864624,
0.3100045621395111,
0.12892884016036987,
-0.16965921223163605,
-0.142743781208992,
-0.20810963213443756,
0.12035568803548813,
0.12683430314064026,
0.3403016924858093,
0.03396917134523392,
-0.1404903680086136,
-0.025243625044822693,
-0.37126681208610535,
-0.2300165891647339,
0.00159086799249053,
0.013334520161151886,
0.025610269978642464,
0.16001296043395996,
0.16676472127437592,
-0.42791274189949036,
0.13110089302062988,
-0.051847219467163086,
-0.1038098931312561,
0.0527336411178112,
0.48860472440719604,
-0.4241809844970703,
0.06365212798118591,
0.22768215835094452,
-0.183699369430542,
0.3035300672054291,
-0.07845281064510345,
0.3136445879936218,
-0.1373230665922165,
-0.05884130299091339,
-0.5334239602088928,
0.40654078125953674,
-0.018879374489188194,
-0.12672875821590424,
-0.12202481925487518,
0.04482223838567734,
0.3527244031429291,
0.1135556548833847,
-0.17422518134117126,
0.060451582074165344,
-0.11823581904172897,
0.10452423989772797,
0.3406907618045807,
-0.019402174279093742,
-0.406343549489975,
-0.4013943374156952,
-0.1491001844406128,
-0.028608303517103195,
0.011514606885612011,
-0.25191354751586914,
-0.3854120075702667,
0.2479810118675232,
0.05697095766663551,
-0.22441914677619934,
0.23058286309242249,
0.08168505877256393,
0.29543375968933105,
-0.016210103407502174,
0.036769524216651917,
0.00039692368591204286,
-0.18492239713668823,
-0.03391334414482117,
0.009830906055867672,
0.39704954624176025,
-0.03169309347867966,
0.16998173296451569,
-0.17502310872077942,
0.1441197395324707,
0.40024271607398987,
0.031011592596769333,
-0.1585002988576889,
-0.2736609876155853,
0.3045322895050049,
-0.004912210162729025,
0.5264104604721069,
0.051644742488861084,
-0.11319788545370102,
-0.01989169232547283,
-0.23784470558166504,
-0.15690313279628754,
0.06675157696008682,
0.32040098309516907,
0.2629222273826599,
-0.013487632386386395,
0.2638956606388092,
0.00339486263692379,
0.5038727521896362,
-0.12402452528476715,
0.18165482580661774,
0.13843271136283875,
-0.27716508507728577,
-0.3122502863407135,
0.040148861706256866,
-0.18180516362190247,
-0.0960160419344902,
0.23778404295444489,
0.25079861283302307,
-0.07022958248853683,
-0.21757064759731293,
-0.21249181032180786,
-0.1106228157877922,
0.3328878581523895,
-0.2270730435848236,
0.24567697942256927,
-0.149220272898674,
0.19995617866516113,
-0.1773371547460556,
-0.2198432981967926,
-0.10610505193471909,
-0.26378723978996277,
-0.03785756230354309,
0.23957329988479614,
-0.040709130465984344,
0.2350502610206604,
-0.3171921670436859,
0.4599709212779999,
0.15770535171031952,
-0.6352954506874084,
-0.2629723846912384,
-0.144438698887825,
-0.33957937359809875,
-0.07766358554363251,
0.3256200850009918,
-0.37274476885795593,
0.18438094854354858,
-0.4821208715438843,
0.01236728299409151,
0.16150249540805817,
-0.4731442928314209,
0.29492953419685364,
0.1354278028011322,
0.5952262282371521,
-0.04591824486851692,
0.15083381533622742,
-0.19222643971443176,
-0.3344011902809143,
0.41081467270851135,
-0.31922298669815063,
-0.3365819454193115,
0.054778944700956345,
0.007266141474246979,
-0.1681361049413681,
-0.5058826804161072,
-0.3063301742076874,
-0.3148084878921509,
-0.05334955081343651,
0.19180117547512054,
0.05011240765452385,
0.1443275511264801,
0.33399948477745056,
0.41015079617500305,
-0.004437247756868601,
0.20733784139156342,
0.050700489431619644,
-0.01002827100455761,
-0.4861401319503784,
0.23715491592884064,
-0.30614322423934937,
-0.36150944232940674,
-0.1987360268831253,
-0.052922572940588,
0.3845674693584442,
0.184077188372612,
-0.5582751631736755,
-0.2909570038318634,
-0.17779231071472168,
0.45462411642074585,
0.10301557928323746,
-0.046816691756248474,
0.29206743836402893,
0.04220401123166084,
0.036501672118902206,
-0.027070021256804466,
-0.3199694752693176,
0.2881188690662384,
0.023783240467309952,
0.3060823976993561,
-0.023914003744721413,
0.1803092509508133,
-0.030555007979273796,
0.7351318001747131,
0.19585402309894562,
-0.24084950983524323,
0.3919069766998291,
0.18050901591777802,
0.3743957579135895,
-0.43118369579315186,
-0.26281294226646423,
0.29024413228034973,
0.03689571097493172,
-0.4468590021133423,
0.028093909844756126,
0.03275197371840477,
-0.7290294170379639,
-0.2692888081073761,
0.0021745730191469193,
-0.18882139027118683,
-0.25019270181655884,
0.27224302291870117,
-0.29992949962615967,
0.36383455991744995,
-0.08397521823644638,
0.07558924704790115,
-0.07109151035547256,
-0.02299857884645462,
0.004649989772588015,
0.28359517455101013,
-0.039383698254823685,
0.05367105081677437,
-0.1316990703344345,
-0.424386590719223,
-0.4543830156326294,
0.2604151666164398,
0.18150536715984344,
0.7051227688789368,
-0.3466789722442627,
-0.28446269035339355,
0.08267142623662949,
-0.012800155207514763,
0.15474571287631989,
0.18881727755069733,
-0.2712614834308624,
0.24395373463630676,
-0.33596035838127136,
-0.4482179284095764,
-0.2516496777534485,
0.03708861023187637,
0.34146976470947266,
0.19309668242931366,
0.44077011942863464,
0.07027781754732132,
-0.09867803752422333,
0.16572219133377075,
0.1349700391292572,
0.0760149210691452,
-0.07483407109975815,
-0.386775940656662,
-0.4530237317085266,
-0.37258008122444153,
0.30675169825553894,
-0.05647604912519455,
0.11854889988899231,
-0.1779242753982544,
0.0036993834655731916,
0.17224788665771484,
-0.021882643923163414,
-0.05728388577699661,
0.3491230010986328,
0.023207657039165497,
-0.15631423890590668,
0.09276235848665237,
-0.023924570530653,
0.16093353927135468,
0.04875388741493225,
0.10744892060756683,
-0.06942068040370941,
0.2719089090824127,
0.27269136905670166,
-0.06429645419120789,
0.0036002055276185274,
0.4597548544406891,
-0.007835404947400093,
-0.2611927390098572,
-0.009829439222812653,
-0.09111674129962921,
-0.1698317974805832,
0.2874855101108551,
-0.018847541883587837,
-0.05193950980901718,
-0.054229386150836945,
0.20328134298324585,
-0.03497058525681496,
0.048102185130119324,
-0.08592070639133453,
0.4281362295150757,
-0.06710370630025864,
0.01268662977963686,
0.27424725890159607,
0.1784001588821411,
0.9760029315948486,
-0.04344812035560608,
0.056465476751327515,
0.1795068085193634,
0.021546268835663795,
-0.2822619378566742,
0.2678420841693878,
-0.0515400730073452,
-0.1963825225830078,
0.23892001807689667,
0.020877011120319366,
-0.3305763304233551,
0.2563531696796417,
-0.14275890588760376,
-0.264415979385376,
0.07216436415910721,
-0.4716953933238983,
0.20732182264328003,
0.09745635837316513,
-0.07848881930112839,
-0.32238340377807617,
0.007412710227072239,
0.04529689997434616,
0.09264039248228073,
0.11557343602180481,
0.6465584635734558,
-0.16744555532932281,
0.10426834225654602,
-0.458901584148407,
-0.3181267976760864,
-0.33724546432495117,
-0.07504139095544815,
-0.30585935711860657,
0.1702500283718109,
0.4338042140007019,
-0.6257206797599792,
-0.1260719746351242,
0.2802780568599701,
0.5041135549545288,
0.2558199167251587,
-0.3557368814945221,
-0.02345908060669899,
-0.20543543994426727,
0.0840059295296669,
0.44238102436065674,
-0.1081312820315361,
0.12122700363397598,
-0.1389622688293457,
-0.371651291847229,
-0.20031632483005524,
-0.16850240528583527,
-0.32243940234184265,
0.3863140642642975,
0.10033617913722992,
-0.008643749170005322,
-0.21094205975532532,
0.23049406707286835,
-0.13336052000522614,
-0.034041617065668106,
-0.01591584086418152,
0.04604582116007805,
0.0832817330956459,
0.060429856181144714,
0.37734758853912354,
-0.09589267522096634,
-0.18466603755950928,
-0.1365639716386795,
0.09561892598867416,
-0.03830944001674652,
-0.1852356493473053,
0.31236007809638977,
-0.08220930397510529,
-0.03995879366993904,
-0.0955229252576828,
0.10177504271268845,
-0.30299288034439087,
-0.16600412130355835,
0.056776802986860275,
-0.16003559529781342,
-0.35826730728149414,
-0.20829208195209503,
0.5189061760902405,
0.3025403618812561,
0.2123361974954605,
0.006827859207987785,
-0.19373387098312378,
-0.6883792877197266,
0.15805885195732117,
0.13932575285434723,
0.2334802895784378,
-0.05019789934158325,
0.3976536691188812,
0.09559429436922073,
-0.08192204684019089,
-0.11546603590250015,
-0.07779301702976227,
-0.4233626127243042,
0.09480500221252441,
0.09106940031051636,
-0.18755891919136047,
0.3472158908843994,
-0.11002475768327713,
-0.052695028483867645,
0.04465322569012642,
0.024698453024029732,
-0.09282226860523224,
-0.04537671059370041,
0.1755245327949524,
0.020619630813598633,
-0.3655264675617218,
0.1706092208623886,
-0.04153624549508095,
0.119966059923172,
-0.15344052016735077,
-0.0975067988038063,
-0.037173256278038025,
-0.004948275163769722,
-0.0805913507938385,
-0.24905487895011902,
0.16809222102165222,
-0.05594395846128464,
0.1664370745420456,
0.021386364474892616,
0.31518658995628357,
-0.04941161349415779,
0.11043048650026321,
0.014966640621423721,
-0.12505757808685303,
0.16893962025642395,
0.22275212407112122,
-0.20501475036144257,
0.080527164041996,
0.01576816290616989,
-0.17309455573558807,
-0.017868654802441597,
-0.022093234583735466,
0.4400375783443451,
0.08000286668539047,
-0.17802727222442627,
0.10113665461540222,
0.44033607840538025,
0.06419190764427185,
-0.018032163381576538,
-0.06141113117337227,
0.1983548402786255,
0.16255904734134674,
-0.0008158970740623772,
0.4802026152610779,
0.06418928503990173,
-0.3462328612804413,
0.4527817368507385,
-0.0038465973921120167,
0.1812501698732376,
-0.06621462106704712,
-0.0012352908961474895,
-0.029139388352632523,
-0.05326000228524208,
0.31748107075691223,
0.14114834368228912,
-0.1872008889913559,
0.16617818176746368,
-0.08766596019268036,
-0.09365130960941315,
-0.09329620003700256,
-0.2477652132511139,
0.25968483090400696,
0.054089877754449844,
-0.1713441163301468,
0.24992883205413818,
-0.3742426335811615,
0.15509085357189178,
-0.0024955300614237785,
-0.1267191767692566,
0.6321120858192444,
-0.49661070108413696,
-0.3118754029273987,
-0.36510807275772095,
-0.04073137044906616,
-0.10912283509969711,
-0.12330202013254166,
-0.22573848068714142,
-0.06333954632282257,
0.14754316210746765,
0.040672484785318375,
0.013158785179257393,
0.17047961056232452,
0.26082542538642883,
0.11692414432764053,
-0.2754316031932831,
-0.4348374903202057,
-0.05348370224237442,
0.10396505147218704,
0.08752908557653427,
-0.02000446803867817,
0.5283895134925842,
0.20620743930339813,
-0.282741516828537,
-0.2568261921405792,
0.47946956753730774,
0.5924423336982727,
0.3914429545402527,
0.0883471816778183,
-0.20706908404827118,
-0.22086232900619507,
0.031134426593780518,
-0.34356728196144104,
0.21054242551326752,
0.13870371878147125,
-0.09177446365356445,
0.022551529109477997,
0.021067220717668533,
-0.08279170095920563,
0.03287234157323837,
-0.13485702872276306,
0.1390838772058487,
-0.07596883177757263,
0.3264741599559784,
-0.025334423407912254,
0.04350123926997185,
0.02439790591597557,
0.13395729660987854,
-0.24875237047672272,
0.39291244745254517,
0.08334144204854965,
0.0035570452455431223,
0.17698149383068085,
0.04381326586008072,
-0.013007844798266888,
-0.06831667572259903,
0.47707682847976685,
0.379443496465683,
0.307386189699173,
-0.23296253383159637,
-0.23394647240638733,
-0.17142511904239655,
0.17979653179645538,
0.13344015181064606,
0.3775708079338074,
-0.0777677521109581,
0.1723690629005432,
0.14740729331970215,
0.14936445653438568,
0.0007755537517368793,
-0.22886325418949127,
0.007079921197146177,
-0.04034212604165077,
-0.25093981623649597,
0.07985919713973999,
-0.5340788960456848,
-0.15187062323093414,
0.09360411763191223,
-0.3492441475391388,
0.37748855352401733,
-0.2518049478530884,
-0.0802711695432663,
0.014088633470237255,
-0.25664860010147095,
0.19460012018680573,
-0.026912447065114975,
0.22618643939495087,
0.3685007095336914,
0.46663811802864075,
0.18969419598579407,
-0.2133904993534088,
-0.16799373924732208,
-0.39074140787124634,
0.10599574446678162,
0.045763786882162094,
-0.23440714180469513,
0.210458904504776,
-0.27495357394218445,
-0.034455448389053345,
-0.18378525972366333,
0.44032129645347595,
0.19640181958675385,
-0.28307145833969116,
0.334146648645401,
-0.16894514858722687,
-0.20946626365184784,
-0.19000457227230072,
0.12341751158237457,
0.47767776250839233,
-0.06163286417722702,
0.23712678253650665,
-0.28272148966789246,
-0.18462404608726501,
0.5225757360458374,
-0.22784405946731567,
-0.015275939367711544,
-0.07484568655490875,
-0.024468600749969482,
-0.12319468706846237,
-0.07270678877830505,
-0.3173840641975403,
-0.10970345884561539,
-0.06196141615509987,
-0.10957717150449753,
-0.4085155725479126,
0.31549951434135437,
0.2680284082889557,
-0.05704334378242493,
-0.04131731763482094,
0.5945867896080017,
-0.14248597621917725,
0.012222758494317532,
-0.004242411348968744,
-0.07613524794578552
] |
https://github.com/huggingface/datasets/issues/2010
|
Local testing fails
|
```
co_filename = '<ipython-input-2-e0383a102aae>', returned_obj = [0]
def create_ipython_func(co_filename, returned_obj):
def func():
return returned_obj
code = func.__code__
> code = CodeType(*[getattr(code, k) if k != "co_filename" else co_filename for k in code_args])
E TypeError: an integer is required (got type bytes)
tests/test_caching.py:152: TypeError
```
Python 3.8.8
dill==0.3.1.1
|
I'm following the CI setup as described in
https://github.com/huggingface/datasets/blob/8eee4fa9e133fe873a7993ba746d32ca2b687551/.circleci/config.yml#L16-L19
in a new conda environment, at commit https://github.com/huggingface/datasets/commit/4de6dbf84e93dad97e1000120d6628c88954e5d4
and getting
```
FAILED tests/test_caching.py::RecurseDumpTest::test_dump_ipython_function - TypeError: an integer is required (got type bytes)
1 failed, 2321 passed, 5109 skipped, 10 warnings in 124.32s (0:02:04)
```
Seems like a discrepancy with CI, perhaps a lib version that's not controlled?
Tried with `pyarrow=={1.0.0,0.17.1,2.0.0}`
| 47
|
Local testing fails
I'm following the CI setup as described in
https://github.com/huggingface/datasets/blob/8eee4fa9e133fe873a7993ba746d32ca2b687551/.circleci/config.yml#L16-L19
in a new conda environment, at commit https://github.com/huggingface/datasets/commit/4de6dbf84e93dad97e1000120d6628c88954e5d4
and getting
```
FAILED tests/test_caching.py::RecurseDumpTest::test_dump_ipython_function - TypeError: an integer is required (got type bytes)
1 failed, 2321 passed, 5109 skipped, 10 warnings in 124.32s (0:02:04)
```
Seems like a discrepancy with CI, perhaps a lib version that's not controlled?
Tried with `pyarrow=={1.0.0,0.17.1,2.0.0}`
```
co_filename = '<ipython-input-2-e0383a102aae>', returned_obj = [0]
def create_ipython_func(co_filename, returned_obj):
def func():
return returned_obj
code = func.__code__
> code = CodeType(*[getattr(code, k) if k != "co_filename" else co_filename for k in code_args])
E TypeError: an integer is required (got type bytes)
tests/test_caching.py:152: TypeError
```
Python 3.8.8
dill==0.3.1.1
|
[
-0.15954309701919556,
0.08368678390979767,
0.008074168115854263,
0.05419477820396423,
-0.06059182807803154,
-0.2532822787761688,
0.43223199248313904,
0.321085661649704,
0.06659120321273804,
0.21157009899616241,
-0.024157408624887466,
0.10391586273908615,
-0.19237174093723297,
0.49519994854927063,
-0.215873122215271,
0.1359182596206665,
0.05527942627668381,
0.1934272050857544,
-0.13184216618537903,
0.08386075496673584,
-0.09596597403287888,
0.24995999038219452,
-0.2564114034175873,
-0.04104273021221161,
-0.3022981286048889,
-0.02459966577589512,
-0.1487216353416443,
0.18303248286247253,
-0.18266604840755463,
-0.36032962799072266,
0.679720401763916,
0.0199893806129694,
-0.0009310093009844422,
0.6896496415138245,
-0.00012576002336572856,
0.02707918919622898,
0.505276620388031,
-0.18094132840633392,
-0.40395450592041016,
-0.33205103874206543,
0.15198902785778046,
0.003736975369974971,
0.34486326575279236,
-0.13040627539157867,
-0.05944344028830528,
0.42550748586654663,
-0.26927217841148376,
-0.38869422674179077,
0.2537176012992859,
0.3457772731781006,
0.0861627385020256,
0.662593424320221,
-0.1529206782579422,
-0.0738561600446701,
-0.09133794158697128,
0.7564923167228699,
-0.2964869737625122,
0.616054117679596,
0.3982495963573456,
-0.15299224853515625,
-0.08901278674602509,
-0.037063438445329666,
0.12386201322078705,
0.20787985622882843,
-0.19369511306285858,
0.10462270677089691,
-0.1856212615966797,
-0.3124099671840668,
0.1273617297410965,
-0.04072413221001625,
0.30771487951278687,
-0.2930813729763031,
-0.42101362347602844,
0.26401206851005554,
-0.19624198973178864,
-0.421631783246994,
0.44772619009017944,
-0.032105740159749985,
-0.5543987154960632,
0.14411303400993347,
-0.616428792476654,
0.3599107563495636,
-0.09563503414392471,
0.19370149075984955,
-0.2613498568534851,
-0.08602352440357208,
-0.12195226550102234,
0.10394472628831863,
-0.06896856427192688,
-0.1067538633942604,
-0.09502074867486954,
0.11584340035915375,
0.08932376652956009,
0.2673546373844147,
0.041705865412950516,
-0.212066188454628,
0.07456540316343307,
0.28862500190734863,
0.19568541646003723,
0.4594939947128296,
-0.22105148434638977,
-0.09700778871774673,
0.07518622279167175,
0.1858525276184082,
0.04222854971885681,
0.3725651800632477,
0.15670651197433472,
0.36910784244537354,
0.4090419113636017,
0.09819750487804413,
-0.12367043644189835,
0.14232540130615234,
0.22340194880962372,
-0.2243613451719284,
0.14639750123023987,
0.01688404195010662,
0.18985803425312042,
-0.45229655504226685,
-0.28176096081733704,
0.30505791306495667,
-0.15729188919067383,
0.033510252833366394,
0.30838170647621155,
0.22987952828407288,
0.09247910231351852,
0.17902657389640808,
0.15446814894676208,
0.3162519335746765,
-0.21778105199337006,
0.24948535859584808,
-0.07182995229959488,
-0.09283708781003952,
-0.15755890309810638,
0.22927303612232208,
0.5492323040962219,
0.039637643843889236,
0.40598851442337036,
0.0170018058270216,
0.5969008207321167,
-0.05302790179848671,
0.08457300066947937,
-0.082026407122612,
0.229627788066864,
0.4612749218940735,
-0.2623295485973358,
0.0007761114975437522,
0.2538807988166809,
-0.1570134162902832,
-0.30969205498695374,
0.07165718823671341,
0.025491073727607727,
-0.3389889895915985,
-0.19037102162837982,
-0.004122710786759853,
-0.23627087473869324,
0.044088926166296005,
0.3062956929206848,
-0.4115748107433319,
0.23501192033290863,
-0.03392551839351654,
0.0666692703962326,
-0.29796290397644043,
0.03340862691402435,
0.09072397649288177,
0.29403191804885864,
0.5816888213157654,
0.032019760459661484,
-0.05871321260929108,
0.08722206205129623,
0.17036642134189606,
0.32226288318634033,
0.31978172063827515,
-0.27119767665863037,
-0.08010677248239517,
-0.20099017024040222,
-0.21222396194934845,
0.4604296386241913,
-0.5281285643577576,
-0.22052708268165588,
0.33835917711257935,
0.16301043331623077,
-0.04699379950761795,
-0.024037396535277367,
-0.1779366284608841,
0.12301527708768845,
0.025045445188879967,
0.3560102581977844,
0.020115429535508156,
-0.14397583901882172,
-0.050727490335702896,
-0.3050993084907532,
-0.20969156920909882,
-0.032653409987688065,
-0.05200110375881195,
-0.012500760145485401,
0.14782176911830902,
0.168252095580101,
-0.355397492647171,
0.13168711960315704,
-0.09263581037521362,
-0.10036813467741013,
-0.026564739644527435,
0.49844804406166077,
-0.436465859413147,
-0.0033524332102388144,
0.17794206738471985,
-0.14666706323623657,
0.3157599866390228,
-0.06520190089941025,
0.3325461745262146,
-0.12679144740104675,
-0.0786101371049881,
-0.493803471326828,
0.31827664375305176,
-0.09209437668323517,
-0.14166323840618134,
-0.08799440413713455,
0.13500867784023285,
0.35907015204429626,
0.11580933630466461,
-0.20306317508220673,
0.19767695665359497,
-0.1674301028251648,
0.06740839779376984,
0.1798955500125885,
-0.11731954663991928,
-0.331875741481781,
-0.39386606216430664,
-0.1756165474653244,
-0.04379430413246155,
-0.05761314183473587,
-0.2317659705877304,
-0.37196382880210876,
0.20775346457958221,
0.09611023962497711,
-0.16597874462604523,
0.1020841971039772,
0.06583737581968307,
0.27482929825782776,
0.07116323709487915,
0.005669994745403528,
0.013898812234401703,
-0.13402312994003296,
0.03244246169924736,
-0.058663077652454376,
0.503277063369751,
0.016101183369755745,
0.14363665878772736,
-0.1191537082195282,
0.09936385601758957,
0.35898396372795105,
0.04626433178782463,
-0.2223191261291504,
-0.2488672435283661,
0.3026215434074402,
0.08158258348703384,
0.4269847273826599,
0.1282004714012146,
-0.1495223045349121,
0.020826466381549835,
0.020805399864912033,
-0.16235454380512238,
0.03479955345392227,
0.26547861099243164,
0.27462321519851685,
-0.028559349477291107,
0.27430230379104614,
-0.048758283257484436,
0.6123741865158081,
-0.1288357526063919,
0.1622854620218277,
0.08334458619356155,
-0.27826356887817383,
-0.261178582906723,
0.09429328888654709,
-0.12725992500782013,
-0.1880999505519867,
0.1684158891439438,
0.239955335855484,
-0.028326772153377533,
-0.24380271136760712,
-0.225151926279068,
-0.1123579815030098,
0.2600671350955963,
-0.31672072410583496,
0.309211403131485,
-0.16572433710098267,
0.16264840960502625,
-0.22436678409576416,
-0.19491495192050934,
0.03397754952311516,
-0.21563242375850677,
-0.11140724271535873,
0.3362272083759308,
-0.042950503528118134,
0.24929307401180267,
-0.35986581444740295,
0.37891003489494324,
0.1270725429058075,
-0.6568127870559692,
-0.2761151194572449,
-0.049391742795705795,
-0.3580281436443329,
-0.07832678407430649,
0.38843363523483276,
-0.3923019468784332,
0.2230750322341919,
-0.4847140312194824,
-0.008308187127113342,
0.16423524916172028,
-0.49763569235801697,
0.24484647810459137,
0.10522318631410599,
0.5596279501914978,
0.008849588222801685,
0.08865703642368317,
-0.2389034777879715,
-0.41239026188850403,
0.40631353855133057,
-0.26314279437065125,
-0.3811517357826233,
0.09733407199382782,
-0.033276528120040894,
-0.23520301282405853,
-0.5069953203201294,
-0.3434549570083618,
-0.26405444741249084,
-0.06903152167797089,
0.3037874698638916,
0.08826340734958649,
0.11016916483640671,
0.45852571725845337,
0.4080488085746765,
-0.0020047526340931654,
0.12820343673229218,
0.04671676084399223,
-0.07915596663951874,
-0.580621063709259,
0.2987906038761139,
-0.3213188648223877,
-0.30687132477760315,
-0.2398095726966858,
-0.12181881815195084,
0.4034661650657654,
0.22952258586883545,
-0.44565802812576294,
-0.1923147290945053,
-0.19110171496868134,
0.4425348937511444,
0.19646117091178894,
0.00904750358313322,
0.29456081986427307,
0.007989438250660896,
0.002995467511937022,
-0.0171322263777256,
-0.2513270974159241,
0.2703379690647125,
0.10974554717540741,
0.31678879261016846,
0.0037347530014812946,
0.2698603570461273,
0.037968769669532776,
0.6234935522079468,
0.3126421570777893,
-0.23715056478977203,
0.3645983636379242,
0.12784123420715332,
0.41743141412734985,
-0.5137653350830078,
-0.32059529423713684,
0.3046324849128723,
-0.024382829666137695,
-0.46111875772476196,
-0.052328404039144516,
0.012906641699373722,
-0.6639065146446228,
-0.19391080737113953,
0.016217898577451706,
-0.12644413113594055,
-0.3065948188304901,
0.27994781732559204,
-0.22779013216495514,
0.3235548436641693,
-0.06027635559439659,
0.06507054716348648,
-0.17724813520908356,
-0.0182549636811018,
-0.023235933855175972,
0.2895433306694031,
0.045812442898750305,
0.07012628763914108,
-0.09667696058750153,
-0.3918629586696625,
-0.4547607898712158,
0.24722422659397125,
0.2436317503452301,
0.6850360035896301,
-0.26538074016571045,
-0.27279356122016907,
-0.012528383173048496,
0.01563977263867855,
0.008544860407710075,
0.238878533244133,
-0.2327781617641449,
0.26906120777130127,
-0.3548610806465149,
-0.41053542494773865,
-0.22299209237098694,
-0.011318926699459553,
0.4066477417945862,
0.1472596973180771,
0.4968002140522003,
0.08193249255418777,
-0.1409919559955597,
0.263105571269989,
0.13536691665649414,
0.05558038130402565,
0.036329127848148346,
-0.4470663368701935,
-0.38372787833213806,
-0.3355281949043274,
0.29882046580314636,
0.05928502604365349,
0.0493525005877018,
-0.12056112289428711,
-0.005728664342314005,
0.13241392374038696,
-0.019162042066454887,
0.05922100692987442,
0.37177494168281555,
-0.031931038945913315,
-0.09581687301397324,
0.09432674944400787,
-0.10941421985626221,
0.019469641149044037,
-0.01919965073466301,
0.16495287418365479,
0.011050021275877953,
0.06870976835489273,
0.20909610390663147,
-0.04163002967834473,
0.018017631024122238,
0.4032589793205261,
-0.08496695756912231,
-0.3252239525318146,
-0.004623358603566885,
-0.0674562007188797,
-0.26094648241996765,
0.33937814831733704,
0.059051480144262314,
-0.02896697260439396,
-0.131760373711586,
0.10667882114648819,
0.0054077450186014175,
-0.030933300033211708,
-0.06704787164926529,
0.550689160823822,
-0.022020021453499794,
-0.04178087040781975,
0.22688034176826477,
0.1652175486087799,
0.8252400755882263,
0.06444486230611801,
0.10214198380708694,
0.24965740740299225,
0.05488991364836693,
-0.19104404747486115,
0.3437019884586334,
0.016282904893159866,
-0.13066688179969788,
0.26281094551086426,
0.0059525142423808575,
-0.316922664642334,
0.3387095034122467,
-0.12932135164737701,
-0.24768613278865814,
0.10913094133138657,
-0.3752104341983795,
0.35337790846824646,
0.06859686225652695,
-0.03444637730717659,
-0.31801944971084595,
-0.05508909747004509,
-0.01109187863767147,
0.11565518379211426,
0.11046460270881653,
0.5969861149787903,
-0.09077689796686172,
0.05943487957119942,
-0.4712797701358795,
-0.32458198070526123,
-0.33805665373802185,
-0.04600619897246361,
-0.34875252842903137,
0.19526684284210205,
0.3555600345134735,
-0.5530381798744202,
-0.0638657733798027,
0.18386586010456085,
0.4580521583557129,
0.22211556136608124,
-0.3360337018966675,
-0.04483800753951073,
-0.08726568520069122,
0.12770478427410126,
0.4157726764678955,
-0.18991592526435852,
0.18035969138145447,
-0.07805414497852325,
-0.2937191128730774,
-0.22604863345623016,
-0.16011162102222443,
-0.34290480613708496,
0.39902785420417786,
0.08023562282323837,
0.06684841960668564,
-0.23529420793056488,
0.17354360222816467,
-0.14135785400867462,
0.0017301577609032393,
-0.024589786306023598,
0.06016504019498825,
0.01104261726140976,
0.050463706254959106,
0.30549630522727966,
-0.15860521793365479,
-0.18892480432987213,
-0.13475070893764496,
0.07679673284292221,
-0.037765081971883774,
-0.15416847169399261,
0.33680251240730286,
-0.23170256614685059,
-0.05907950550317764,
-0.10620862245559692,
0.1889459788799286,
-0.25157472491264343,
-0.26812121272087097,
0.08377431333065033,
-0.10970049351453781,
-0.3355255722999573,
-0.18891839683055878,
0.5555793642997742,
0.25361013412475586,
0.1449698805809021,
0.06758548319339752,
-0.21992754936218262,
-0.6909090876579285,
0.14233312010765076,
0.04761699587106705,
0.22398774325847626,
-0.03853173181414604,
0.3672912120819092,
0.04047504812479019,
-0.1701394021511078,
-0.1303739696741104,
-0.17467528581619263,
-0.36406421661376953,
0.08016957342624664,
0.17964628338813782,
-0.13696447014808655,
0.3592989444732666,
-0.08911381661891937,
-0.015051934868097305,
0.055410515516996384,
0.005698069930076599,
-0.10878323763608932,
-0.10233970731496811,
0.16109506785869598,
-0.020992904901504517,
-0.3436928689479828,
0.22498123347759247,
0.0064687300473451614,
0.08985313028097153,
-0.24503707885742188,
-0.07616927474737167,
0.01710514724254608,
-0.017608223482966423,
-0.06699828803539276,
-0.3150104880332947,
0.1212766170501709,
0.012703568674623966,
0.1613847315311432,
-0.011732109822332859,
0.2935882806777954,
-0.02300269529223442,
0.11981367319822311,
0.00018469047790858895,
-0.07505276799201965,
0.11439649760723114,
0.23723863065242767,
-0.242738738656044,
0.142827570438385,
0.029105957597494125,
-0.1974075585603714,
-0.05497598648071289,
-0.04334080591797829,
0.33610284328460693,
0.12951694428920746,
-0.14755962789058685,
0.0766783356666565,
0.3650749921798706,
0.07515926659107208,
-0.019595148041844368,
-0.02572266384959221,
0.10183349251747131,
0.15059784054756165,
0.02283678762614727,
0.5174657106399536,
0.023122504353523254,
-0.34358295798301697,
0.5378295183181763,
-0.07494396716356277,
0.22763647139072418,
-0.10151077061891556,
0.10557793825864792,
-0.04024052619934082,
-0.03031422384083271,
0.2926291525363922,
0.1018693819642067,
-0.1841757744550705,
0.20633091032505035,
-0.06791763007640839,
-0.12822461128234863,
-0.14122657477855682,
-0.18888209760189056,
0.2897826135158539,
-0.014353841543197632,
-0.139730304479599,
0.15683072805404663,
-0.37572506070137024,
0.09371491521596909,
0.15007147192955017,
-0.05785716325044632,
0.5642972588539124,
-0.5855814814567566,
-0.28299424052238464,
-0.3944425582885742,
-0.14394253492355347,
-0.07905057817697525,
-0.16226261854171753,
-0.22227981686592102,
-0.015267323702573776,
0.0844990611076355,
0.05220921337604523,
0.03217896819114685,
0.2010476440191269,
0.3205493688583374,
0.12757731974124908,
-0.26238030195236206,
-0.33414629101753235,
-0.05279289186000824,
0.08784860372543335,
0.09494896978139877,
-0.020266417413949966,
0.5610430836677551,
0.23456253111362457,
-0.24237972497940063,
-0.20022380352020264,
0.4721876084804535,
0.5895771384239197,
0.3786361813545227,
0.12273202836513519,
-0.19510416686534882,
-0.2294456511735916,
0.012983286753296852,
-0.3257732093334198,
0.2213946431875229,
0.12427239865064621,
-0.013165323995053768,
-0.05325450748205185,
0.057423558086156845,
-0.07164677232503891,
0.007535422220826149,
-0.14398819208145142,
0.0037622626405209303,
-0.18290293216705322,
0.44682443141937256,
-0.09854432195425034,
0.093850277364254,
0.051418811082839966,
0.15546582639217377,
-0.2413606196641922,
0.2823251485824585,
0.08885782957077026,
0.057353150099515915,
0.20492291450500488,
0.1141095757484436,
0.002820126246660948,
-0.061785608530044556,
0.44796544313430786,
0.23571699857711792,
0.21317601203918457,
-0.22734448313713074,
-0.1807403415441513,
-0.18360160291194916,
0.11411845684051514,
0.1576034277677536,
0.28573060035705566,
-0.11369367688894272,
0.22414973378181458,
0.18395055830478668,
0.07126487046480179,
-0.04945605620741844,
-0.3080793619155884,
0.0026945555582642555,
-0.04280351102352142,
-0.21356016397476196,
-0.01273060031235218,
-0.4230506122112274,
-0.1899387389421463,
0.09159750491380692,
-0.4213809072971344,
0.3242907226085663,
-0.2475101202726364,
-0.04844561591744423,
0.04069729521870613,
-0.24192048609256744,
0.18704862892627716,
-0.10467325896024704,
0.25839096307754517,
0.4208628535270691,
0.41235703229904175,
0.12196603417396545,
-0.28010350465774536,
-0.2073027342557907,
-0.32723313570022583,
0.10925512760877609,
0.15121348202228546,
-0.27964091300964355,
0.3367859125137329,
-0.24442675709724426,
0.03863947466015816,
-0.24676814675331116,
0.390726774930954,
0.19720128178596497,
-0.3832685649394989,
0.3099583387374878,
-0.1385192573070526,
-0.287046879529953,
-0.11506783217191696,
0.04468417912721634,
0.504111647605896,
-0.11775758862495422,
0.2682075798511505,
-0.25250810384750366,
-0.16204072535037994,
0.5046148896217346,
-0.43645691871643066,
-0.09341198951005936,
-0.029394296929240227,
0.05014460161328316,
-0.16969123482704163,
-0.04894454777240753,
-0.35200589895248413,
-0.05491388589143753,
-0.012023905292153358,
-0.10737678408622742,
-0.38549214601516724,
0.3357224464416504,
0.22343142330646515,
-0.03219807893037796,
-0.04044516012072563,
0.7254135608673096,
-0.20317994058132172,
-0.025389621034264565,
0.04309054836630821,
-0.0735737532377243
] |
https://github.com/huggingface/datasets/issues/2010
|
Local testing fails
|
I managed to reproduce. This comes from the CodeType init signature that is different in python 3.8.8
I opened a PR to fix this test
Thanks !
|
I'm following the CI setup as described in
https://github.com/huggingface/datasets/blob/8eee4fa9e133fe873a7993ba746d32ca2b687551/.circleci/config.yml#L16-L19
in a new conda environment, at commit https://github.com/huggingface/datasets/commit/4de6dbf84e93dad97e1000120d6628c88954e5d4
and getting
```
FAILED tests/test_caching.py::RecurseDumpTest::test_dump_ipython_function - TypeError: an integer is required (got type bytes)
1 failed, 2321 passed, 5109 skipped, 10 warnings in 124.32s (0:02:04)
```
Seems like a discrepancy with CI, perhaps a lib version that's not controlled?
Tried with `pyarrow=={1.0.0,0.17.1,2.0.0}`
| 27
|
Local testing fails
I'm following the CI setup as described in
https://github.com/huggingface/datasets/blob/8eee4fa9e133fe873a7993ba746d32ca2b687551/.circleci/config.yml#L16-L19
in a new conda environment, at commit https://github.com/huggingface/datasets/commit/4de6dbf84e93dad97e1000120d6628c88954e5d4
and getting
```
FAILED tests/test_caching.py::RecurseDumpTest::test_dump_ipython_function - TypeError: an integer is required (got type bytes)
1 failed, 2321 passed, 5109 skipped, 10 warnings in 124.32s (0:02:04)
```
Seems like a discrepancy with CI, perhaps a lib version that's not controlled?
Tried with `pyarrow=={1.0.0,0.17.1,2.0.0}`
I managed to reproduce. This comes from the CodeType init signature that is different in python 3.8.8
I opened a PR to fix this test
Thanks !
|
[
-0.21295182406902313,
0.082365021109581,
0.02384120412170887,
0.0946626141667366,
0.04961475729942322,
-0.19082453846931458,
0.3812559247016907,
0.3104429841041565,
0.050583988428115845,
0.2253708690404892,
0.13752314448356628,
0.11011497676372528,
-0.18604972958564758,
0.657594621181488,
-0.11238282173871994,
0.15623441338539124,
0.06747852265834808,
0.2533705532550812,
-0.02660261280834675,
0.13123819231987,
-0.12005802989006042,
0.26802530884742737,
-0.24322453141212463,
-0.06532587110996246,
-0.2336266189813614,
-0.007686093915253878,
-0.15736888349056244,
0.22698700428009033,
-0.1869489699602127,
-0.5005515813827515,
0.7258080840110779,
-0.05969462916254997,
-0.01177719421684742,
0.6850969195365906,
-0.00012768027954734862,
0.046028926968574524,
0.590076744556427,
-0.13112445175647736,
-0.2848137319087982,
-0.20905455946922302,
0.12253287434577942,
-0.009903314523398876,
0.4425722360610962,
-0.05848599225282669,
-0.0636175125837326,
0.42321333289146423,
-0.3844328224658966,
-0.4504123330116272,
0.3081776201725006,
0.34122592210769653,
0.08565647155046463,
0.6891784071922302,
-0.18334917724132538,
-0.06472676247358322,
-0.15570665895938873,
0.7216375470161438,
-0.2735093832015991,
0.5735632181167603,
0.4503450393676758,
-0.12010093778371811,
-0.06787849962711334,
-0.10771476477384567,
0.11484052240848541,
0.18799994885921478,
-0.12248939275741577,
0.022485483437776566,
-0.09368613362312317,
-0.18824030458927155,
0.13830097019672394,
-0.07370182871818542,
0.32498249411582947,
-0.25476327538490295,
-0.34291642904281616,
0.18587522208690643,
-0.14956866204738617,
-0.5330845713615417,
0.5146339535713196,
-0.11135279387235641,
-0.4768412113189697,
0.191598042845726,
-0.5451622009277344,
0.29674798250198364,
-0.07489582896232605,
0.15539111196994781,
-0.3125755190849304,
-0.08327119052410126,
-0.10468658804893494,
0.11072450131177902,
-0.0891965925693512,
-0.0674922913312912,
0.09891805052757263,
0.1787141114473343,
-0.007632409688085318,
0.28727927803993225,
0.10704744607210159,
-0.21118322014808655,
0.014469661749899387,
0.3994743525981903,
0.17871049046516418,
0.45566901564598083,
-0.25141891837120056,
-0.07275260239839554,
0.12223184108734131,
0.1218675971031189,
-0.008883033879101276,
0.3863522708415985,
0.2146194875240326,
0.23066295683383942,
0.3758423626422882,
0.0232175774872303,
-0.08103641867637634,
0.14151954650878906,
0.22081969678401947,
-0.2816322445869446,
0.28228944540023804,
-0.032186854630708694,
0.14620360732078552,
-0.43897464871406555,
-0.09227070957422256,
0.2229408323764801,
-0.06820157915353775,
0.01679186150431633,
0.23276759684085846,
0.2272423952817917,
0.18241243064403534,
0.15234781801700592,
0.09443031996488571,
0.42982998490333557,
-0.17783555388450623,
0.2726742625236511,
-0.08764594048261642,
-0.1687563955783844,
-0.15376371145248413,
0.1956516057252884,
0.4986814260482788,
-0.15370532870292664,
0.4561304450035095,
-0.005797729827463627,
0.6063701510429382,
-0.031099781394004822,
0.02066342532634735,
-0.027587156742811203,
0.22374698519706726,
0.4527343511581421,
-0.26693135499954224,
-0.023172900080680847,
0.308040589094162,
-0.22730794548988342,
-0.3217346966266632,
0.04994837939739227,
0.10058385878801346,
-0.441042423248291,
-0.21975988149642944,
-0.018829409033060074,
-0.2830909192562103,
-0.010693421587347984,
0.2729870676994324,
-0.4864024519920349,
0.2079424262046814,
0.0007711565704084933,
0.06493456661701202,
-0.2876129150390625,
0.10681741684675217,
0.10759225487709045,
0.2090531885623932,
0.5335057377815247,
0.019548537209630013,
-0.04795903339982033,
0.0798538401722908,
0.07931765168905258,
0.28572285175323486,
0.317619264125824,
-0.2670457065105438,
-0.09587070345878601,
-0.19927607476711273,
-0.1947420984506607,
0.4257679283618927,
-0.5156857967376709,
-0.1774299591779709,
0.3740013539791107,
0.1563422530889511,
-0.19855748116970062,
-0.049449071288108826,
-0.26841431856155396,
0.0657714381814003,
0.09862285852432251,
0.24021188914775848,
0.05674372985959053,
-0.16658824682235718,
0.060193177312612534,
-0.302229642868042,
-0.29047051072120667,
-0.021047154441475868,
0.033827219158411026,
0.024978017434477806,
0.1769675761461258,
0.19980627298355103,
-0.4017612636089325,
0.1179298684000969,
-0.09269560873508453,
-0.11643534898757935,
0.02058531902730465,
0.5448552370071411,
-0.38643938302993774,
-0.0036125839687883854,
0.19993671774864197,
-0.03277046978473663,
0.3577796220779419,
-0.07800361514091492,
0.20455484092235565,
-0.14009569585323334,
-0.02090740017592907,
-0.5408807992935181,
0.38009729981422424,
-0.09910227358341217,
-0.05283486843109131,
-0.11798550188541412,
0.06091086193919182,
0.3830116391181946,
0.14356110990047455,
-0.2402084618806839,
0.06536447256803513,
-0.0774741992354393,
0.09466545283794403,
0.2909976541996002,
-0.08611277490854263,
-0.3287920653820038,
-0.4251507520675659,
-0.15633419156074524,
-0.023316707462072372,
0.004896681290119886,
-0.22420960664749146,
-0.4006008207798004,
0.21714846789836884,
0.08867431432008743,
-0.1416560709476471,
0.07461366057395935,
0.09536165744066238,
0.2319161295890808,
0.028279317542910576,
-0.005821876227855682,
0.011978724971413612,
-0.18691779673099518,
-0.03538435325026512,
0.014793738722801208,
0.4722610414028168,
0.029819238930940628,
0.08339839428663254,
-0.159187912940979,
0.10932742804288864,
0.35306650400161743,
0.023485591635107994,
-0.18242356181144714,
-0.31590062379837036,
0.2667006552219391,
0.031715817749500275,
0.5888888835906982,
0.12915979325771332,
-0.14106087386608124,
-0.10752888023853302,
-0.050820667296648026,
-0.15997199714183807,
-0.001790147158317268,
0.1870499849319458,
0.22710056602954865,
-0.015888312831521034,
0.22669342160224915,
-0.110166996717453,
0.5531960725784302,
-0.15857966244220734,
0.07493378967046738,
0.18165123462677002,
-0.22378592193126678,
-0.30287036299705505,
0.1822282373905182,
-0.15176309645175934,
-0.011956238187849522,
0.14674650132656097,
0.22637684643268585,
-0.0592963732779026,
-0.23833243548870087,
-0.2199624478816986,
-0.06923744082450867,
0.18346652388572693,
-0.3558001220226288,
0.24071654677391052,
-0.14395102858543396,
0.09364408254623413,
-0.36811089515686035,
-0.21255357563495636,
0.0038103172555565834,
-0.25374874472618103,
-0.1256660670042038,
0.25704795122146606,
0.016705606132745743,
0.21249011158943176,
-0.30557146668434143,
0.44170287251472473,
0.11034723371267319,
-0.6165695190429688,
-0.23074868321418762,
-0.04218050837516785,
-0.28746095299720764,
-0.11028330028057098,
0.34401437640190125,
-0.42519423365592957,
0.14426256716251373,
-0.543674886226654,
-0.010643689893186092,
0.209975928068161,
-0.5716860890388489,
0.36104118824005127,
0.11012833565473557,
0.5630653500556946,
0.09089002758264542,
0.13597853481769562,
-0.08333580940961838,
-0.32854634523391724,
0.39074528217315674,
-0.281105101108551,
-0.3202838897705078,
0.11164596676826477,
-0.05928798019886017,
-0.2386704981327057,
-0.4834079146385193,
-0.22417587041854858,
-0.173221617937088,
-0.04867034777998924,
0.2961150109767914,
0.08135096728801727,
0.06921517848968506,
0.43724989891052246,
0.32392480969429016,
-0.0071035162545740604,
0.08791571855545044,
0.04921487718820572,
-0.03230411186814308,
-0.6007468700408936,
0.251829594373703,
-0.2372848391532898,
-0.2854533791542053,
-0.1597943753004074,
-0.08642598986625671,
0.48622867465019226,
0.09819301217794418,
-0.399862676858902,
-0.18029767274856567,
-0.12120208144187927,
0.4978189766407013,
0.17718610167503357,
-0.09013102948665619,
0.31635189056396484,
0.02466246485710144,
0.049382779747247696,
-0.057371679693460464,
-0.22627484798431396,
0.1844121664762497,
-0.004375712480396032,
0.3145066797733307,
0.017887311056256294,
0.2293650060892105,
-0.07370248436927795,
0.6722054481506348,
0.23465974628925323,
-0.2608802020549774,
0.304029256105423,
0.09127887338399887,
0.32935020327568054,
-0.45123976469039917,
-0.20178461074829102,
0.26011160016059875,
0.024302097037434578,
-0.4762878119945526,
-0.04373784363269806,
0.024765660986304283,
-0.6657314300537109,
-0.13949771225452423,
0.17448551952838898,
-0.15485765039920807,
-0.18061064183712006,
0.25037410855293274,
-0.2951570749282837,
0.37918585538864136,
-0.0946984514594078,
0.1134410873055458,
-0.13528527319431305,
-0.031215976923704147,
-0.010914874263107777,
0.33985939621925354,
-0.10451465100049973,
0.04212268069386482,
-0.12971554696559906,
-0.4960706830024719,
-0.3819338083267212,
0.2305469661951065,
0.21823841333389282,
0.6499719619750977,
-0.2102145403623581,
-0.3641648292541504,
0.024985846132040024,
0.04654347524046898,
0.09636466950178146,
0.17627859115600586,
-0.23801538348197937,
0.2721737027168274,
-0.3735034167766571,
-0.49162742495536804,
-0.29253309965133667,
0.02558271959424019,
0.40434473752975464,
0.07840137928724289,
0.5375297665596008,
0.1264638751745224,
-0.12717916071414948,
0.13428464531898499,
0.11026690900325775,
0.09292175620794296,
-0.037576090544462204,
-0.4543285667896271,
-0.42382749915122986,
-0.3833262026309967,
0.31483301520347595,
0.019740357995033264,
0.03449912741780281,
-0.20984867215156555,
0.024978170171380043,
0.031227093189954758,
0.01653919741511345,
-0.07208406925201416,
0.39441385865211487,
0.022351939231157303,
-0.1345166265964508,
0.09044371545314789,
-0.08835886418819427,
0.07294224202632904,
-0.020175810903310776,
0.1470244973897934,
0.11288539320230484,
0.09449226409196854,
0.14238211512565613,
-0.11684417724609375,
-0.035682838410139084,
0.4573664367198944,
-0.03838203847408295,
-0.19472190737724304,
0.10691331326961517,
-0.10834135860204697,
-0.26608824729919434,
0.21292531490325928,
0.012191180139780045,
-0.06847792863845825,
-0.09590347111225128,
0.13708390295505524,
0.022638197988271713,
-0.003493853146210313,
-0.09942363947629929,
0.4119963049888611,
-0.05516979470849037,
-0.029877634719014168,
0.365151584148407,
0.17756147682666779,
0.8157602548599243,
-0.008665532805025578,
0.06927743554115295,
0.2503991425037384,
-0.020991142839193344,
-0.3450791537761688,
0.5113021731376648,
-0.040166422724723816,
-0.26925352215766907,
0.24521504342556,
-0.014183859340846539,
-0.360307902097702,
0.31927913427352905,
-0.12704510986804962,
-0.25228434801101685,
0.0036987639032304287,
-0.40360671281814575,
0.3278357982635498,
0.06436655670404434,
-0.12360171228647232,
-0.3593875467777252,
-0.034586772322654724,
-0.14254747331142426,
0.08362571150064468,
0.1283954679965973,
0.6133267283439636,
-0.11067912727594376,
0.07679349184036255,
-0.37904438376426697,
-0.3198164403438568,
-0.3265846073627472,
-0.06535633653402328,
-0.2735280394554138,
0.2031434029340744,
0.49235254526138306,
-0.4473854899406433,
-0.007633259054273367,
0.18971334397792816,
0.5910069942474365,
0.21510134637355804,
-0.3710511326789856,
-0.024135125800967216,
0.09597638249397278,
0.018727462738752365,
0.3918747901916504,
-0.1623620092868805,
0.13908661901950836,
-0.04677262902259827,
-0.3181013762950897,
-0.19995763897895813,
-0.24352003633975983,
-0.33898019790649414,
0.39418208599090576,
0.0037316230591386557,
-0.0933828204870224,
-0.30953842401504517,
0.13876083493232727,
-0.15270157158374786,
0.07070595771074295,
-0.03479669243097305,
0.04512177035212517,
0.007147411350160837,
0.09959471970796585,
0.3269571363925934,
-0.07984163612127304,
-0.2007293701171875,
-0.11528826504945755,
0.039094097912311554,
-0.05778568983078003,
-0.1012965589761734,
0.3804948031902313,
-0.11017166078090668,
-0.005504586733877659,
-0.11181708425283432,
0.15054041147232056,
-0.2089616358280182,
-0.24609985947608948,
0.07593032717704773,
-0.11049582809209824,
-0.3170498013496399,
-0.09751740097999573,
0.5581839084625244,
0.2994665503501892,
0.15949833393096924,
0.051262687891721725,
-0.10699339956045151,
-0.6706628799438477,
0.10325465351343155,
0.06696901470422745,
0.2133818417787552,
0.014643245376646519,
0.45753729343414307,
-0.010357901453971863,
-0.21442201733589172,
-0.12200754880905151,
-0.08851870894432068,
-0.37799254059791565,
0.0571427196264267,
0.06815678626298904,
-0.07522133737802505,
0.3518756628036499,
-0.16780488193035126,
-0.03053034283220768,
0.025039363652467728,
-0.049674808979034424,
-0.09002329409122467,
-0.04621673747897148,
0.174230694770813,
0.048428975045681,
-0.3221476078033447,
0.3157864212989807,
0.0064822048880159855,
0.11836834996938705,
-0.11517126858234406,
0.005788320675492287,
-0.08561506122350693,
0.014218523167073727,
-0.08096937090158463,
-0.20231395959854126,
0.09769774228334427,
-0.11701875180006027,
0.09608572721481323,
-0.09269252419471741,
0.3523990511894226,
-0.08898602426052094,
0.14396639168262482,
-0.05549170821905136,
-0.047797974199056625,
0.2524561583995819,
0.26997482776641846,
-0.2041543871164322,
0.16875116527080536,
0.030309734866023064,
-0.2895762324333191,
0.017219075933098793,
0.06558210402727127,
0.3042149841785431,
0.0805387794971466,
-0.29110801219940186,
0.12011748552322388,
0.2948727607727051,
0.07223494350910187,
0.04547305032610893,
-0.012031021527945995,
-0.12173686176538467,
0.1613793522119522,
-0.015614924021065235,
0.49486997723579407,
0.20025944709777832,
-0.3090679943561554,
0.40066981315612793,
-0.032426752150058746,
0.34574419260025024,
-0.030458012595772743,
0.055967386811971664,
-0.005587057676166296,
-0.02968270145356655,
0.26384031772613525,
0.1978762298822403,
-0.12670956552028656,
0.11028094589710236,
-0.12037888914346695,
-0.08202530443668365,
-0.04440365359187126,
-0.2603594958782196,
0.3358684182167053,
-0.05842888727784157,
-0.10321912914514542,
0.27195674180984497,
-0.33370375633239746,
0.11023782938718796,
0.06331074982881546,
-0.0020901397801935673,
0.6600578427314758,
-0.6151893734931946,
-0.30022820830345154,
-0.37129178643226624,
-0.17742906510829926,
-0.0651964619755745,
-0.17146636545658112,
-0.3542010486125946,
0.050139572471380234,
0.04438129439949989,
0.06222168728709221,
-0.06412816792726517,
0.25484198331832886,
0.3229338228702545,
0.12236428260803223,
-0.20197603106498718,
-0.4548484981060028,
-0.0604463666677475,
0.0894831120967865,
0.08838284015655518,
-0.05646320804953575,
0.5304112434387207,
0.14470739662647247,
-0.3150203227996826,
-0.12226655334234238,
0.5399010181427002,
0.661506712436676,
0.2859225571155548,
0.0971388965845108,
-0.256099134683609,
-0.22927002608776093,
0.009942336939275265,
-0.2649984061717987,
0.12559352815151215,
0.1515679955482483,
0.10815879702568054,
-0.05812305957078934,
0.058435339480638504,
-0.041793160140514374,
0.04283634200692177,
-0.1470208764076233,
0.06761422008275986,
-0.17398479580879211,
0.33677220344543457,
-0.03566053882241249,
0.1551562398672104,
0.00264755729585886,
0.19357351958751678,
-0.23814727365970612,
0.3953506350517273,
0.1332026869058609,
0.08254005014896393,
0.17719830572605133,
0.1677241176366806,
-0.001088069984689355,
0.06688050925731659,
0.5126706957817078,
0.29181763529777527,
0.15037447214126587,
-0.18541210889816284,
-0.2878718674182892,
-0.19384229183197021,
0.13870081305503845,
0.16637030243873596,
0.2949793338775635,
-0.048884663730859756,
0.1859445869922638,
0.12059710174798965,
0.08942479640245438,
-0.011965151876211166,
-0.14412948489189148,
-0.12153765559196472,
-0.13357728719711304,
-0.1835174858570099,
-0.025003785267472267,
-0.37017062306404114,
-0.1906798928976059,
0.014999229460954666,
-0.3371472954750061,
0.35247376561164856,
-0.14099091291427612,
-0.06371933966875076,
-0.0543731264770031,
-0.2187347114086151,
0.1781962662935257,
-0.2250039279460907,
0.2600571811199188,
0.34806832671165466,
0.3272460103034973,
0.1648104041814804,
-0.31052759289741516,
-0.11078932881355286,
-0.4063548445701599,
0.023759404197335243,
0.1805656999349594,
-0.31481438875198364,
0.3108046054840088,
-0.21335366368293762,
-0.027485892176628113,
-0.23380014300346375,
0.2657324969768524,
0.1744321584701538,
-0.34078678488731384,
0.15137708187103271,
-0.13942565023899078,
-0.29183298349380493,
-0.08409599959850311,
0.16672195494174957,
0.4874754250049591,
-0.11432928591966629,
0.22222521901130676,
-0.16199122369289398,
-0.2502768635749817,
0.43205225467681885,
-0.314612478017807,
-0.03567905351519585,
0.017135484144091606,
-0.030336569994688034,
-0.23457302153110504,
-0.05236928537487984,
-0.327553927898407,
-0.054778553545475006,
-0.07552038878202438,
-0.1453133374452591,
-0.4074229300022125,
0.3302372097969055,
0.24674761295318604,
-0.02924058772623539,
-0.07922728359699249,
0.6571492552757263,
-0.1429568976163864,
0.004196560475975275,
-0.07792709767818451,
-0.033836036920547485
] |
https://github.com/huggingface/datasets/issues/2009
|
Ambiguous documentation
|
Hi @theo-m !
A few lines above this line, you'll find that the `_split_generators` method returns a list of `SplitGenerator`s objects:
```python
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"filepath": os.path.join(data_dir, "dev.jsonl"),
"split": "dev",
},
),
```
Notice the `gen_kwargs` argument passed to the constructor of `SplitGenerator`: this dict will be unpacked as keyword arguments to pass to the `_generat_examples` method (in this case the `filepath` and `split` arguments).
Let me know if that helps!
|
https://github.com/huggingface/datasets/blob/2ac9a0d24a091989f869af55f9f6411b37ff5188/templates/new_dataset_script.py#L156-L158
Looking at the template, I find this documentation line to be confusing, the method parameters don't include the `gen_kwargs` so I'm unclear where they're coming from.
Happy to push a PR with a clearer statement when I understand the meaning.
| 79
|
Ambiguous documentation
https://github.com/huggingface/datasets/blob/2ac9a0d24a091989f869af55f9f6411b37ff5188/templates/new_dataset_script.py#L156-L158
Looking at the template, I find this documentation line to be confusing, the method parameters don't include the `gen_kwargs` so I'm unclear where they're coming from.
Happy to push a PR with a clearer statement when I understand the meaning.
Hi @theo-m !
A few lines above this line, you'll find that the `_split_generators` method returns a list of `SplitGenerator`s objects:
```python
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"filepath": os.path.join(data_dir, "dev.jsonl"),
"split": "dev",
},
),
```
Notice the `gen_kwargs` argument passed to the constructor of `SplitGenerator`: this dict will be unpacked as keyword arguments to pass to the `_generat_examples` method (in this case the `filepath` and `split` arguments).
Let me know if that helps!
|
[
0.06302561610937119,
-0.055988408625125885,
-0.05370436608791351,
0.10703021287918091,
0.023567261174321175,
0.16932398080825806,
0.3407928943634033,
0.10250898450613022,
-0.1445973515510559,
-0.16507549583911896,
0.08257456868886948,
0.35922113060951233,
0.04754771664738655,
0.022965136915445328,
0.1957673579454422,
-0.22672075033187866,
0.09677062183618546,
0.1418137401342392,
-0.016018075868487358,
-0.15531215071678162,
-0.3404797911643982,
0.26017332077026367,
-0.32861125469207764,
0.3037538528442383,
-0.24053587019443512,
-0.21402403712272644,
-0.1296742856502533,
0.3539072573184967,
-0.4259346127510071,
-0.263862669467926,
0.21498528122901917,
0.1732773780822754,
-0.1561238318681717,
0.19875968992710114,
-0.00011244768393225968,
0.006170398090034723,
0.2945782244205475,
-0.18925310671329498,
-0.1790917068719864,
0.021082406863570213,
-0.36793655157089233,
-0.1775045245885849,
0.028906341642141342,
-0.35336098074913025,
0.19100244343280792,
-0.32744845747947693,
0.03658663108944893,
-0.15655754506587982,
0.5122286081314087,
0.19034358859062195,
0.1555774211883545,
0.023027529940009117,
0.13952100276947021,
-0.18158957362174988,
-0.16110244393348694,
0.5714956521987915,
-0.24545824527740479,
-0.11392009258270264,
0.040884073823690414,
0.1185346469283104,
0.06282240897417068,
0.21830762922763824,
0.09054245054721832,
-0.11169125884771347,
0.46554362773895264,
-0.04112499579787254,
-0.2104078233242035,
-0.538992166519165,
0.09714823216199875,
0.2854476869106293,
0.5018535852432251,
-0.2640076279640198,
-0.2595457136631012,
-0.2530969977378845,
-0.18307095766067505,
-0.1483083963394165,
-0.13075077533721924,
0.3472195863723755,
-0.3724949359893799,
-0.010222586803138256,
-0.3185657560825348,
-0.2991989254951477,
-0.2664615511894226,
-0.30254608392715454,
0.1488547921180725,
0.37380173802375793,
-0.15064941346645355,
0.14002567529678345,
0.04731764271855354,
0.12097623944282532,
-0.06526017189025879,
-0.227573961019516,
0.028452521190047264,
0.4920313060283661,
0.0334746427834034,
-0.14789588749408722,
0.22511610388755798,
0.005313205067068338,
0.40099769830703735,
0.22510619461536407,
-0.0026094417553395033,
-0.2663421332836151,
0.07310925424098969,
0.19786110520362854,
0.35880425572395325,
-0.20315618813037872,
0.3699667751789093,
0.0002880067622754723,
0.06916658580303192,
0.014731048606336117,
0.2263575792312622,
-0.1669275313615799,
0.1684107929468155,
-0.38308945298194885,
0.04494168609380722,
0.037931956350803375,
0.39376771450042725,
-0.11233337968587875,
-0.0958525687456131,
0.04141819849610329,
-0.13739100098609924,
-0.39357075095176697,
0.05582481995224953,
0.049334753304719925,
0.21715132892131805,
-0.002919879974797368,
-0.08906139433383942,
-0.10216620564460754,
-0.12448503077030182,
-0.26166003942489624,
-0.2409772425889969,
0.28364747762680054,
-0.186666801571846,
0.17430487275123596,
-0.19422100484371185,
-0.20254629850387573,
0.3773423731327057,
0.2009476125240326,
0.2653460204601288,
0.14258602261543274,
0.10700170695781708,
0.18380387127399445,
0.13371217250823975,
0.28187286853790283,
-0.03530966117978096,
0.17374129593372345,
0.2208319455385208,
0.037970270961523056,
-0.30280908942222595,
0.021115755662322044,
-0.41558733582496643,
-0.38428500294685364,
0.04517150670289993,
0.10549930483102798,
-0.27652379870414734,
0.1617235541343689,
-0.20133014023303986,
0.33486390113830566,
0.05460013821721077,
-0.11717180907726288,
0.09207110106945038,
0.010471350513398647,
-0.039068132638931274,
-0.5046519637107849,
0.31237325072288513,
0.456909716129303,
-0.4068634808063507,
-0.14708583056926727,
-0.19765622913837433,
-0.239491268992424,
-0.014220024459064007,
0.017830755561590195,
-0.30502384901046753,
0.40718066692352295,
-0.20980437099933624,
0.41110578179359436,
0.5502254962921143,
-0.026428021490573883,
0.2617902457714081,
0.4143202304840088,
0.24409884214401245,
0.04009517654776573,
0.19678087532520294,
-0.3653973639011383,
0.1281253546476364,
-0.17263206839561462,
-0.22876125574111938,
0.10942468047142029,
-0.12041938304901123,
-0.2198893427848816,
0.09268122166395187,
0.002551543526351452,
-0.12289323657751083,
-0.1769023835659027,
-0.11595145612955093,
0.013556077145040035,
0.010281178168952465,
0.19566354155540466,
0.40946775674819946,
-0.238291397690773,
0.1461007446050644,
0.3196188807487488,
0.30913877487182617,
-0.19955025613307953,
0.22278638184070587,
0.057504210621118546,
-0.6098822951316833,
-0.08887441456317902,
0.019350137561559677,
0.10566257685422897,
-0.16841939091682434,
-0.2631368339061737,
-0.39379817247390747,
0.07140439748764038,
-0.24209876358509064,
-0.23682492971420288,
0.11458060145378113,
-0.09829530119895935,
0.27838724851608276,
-0.1827615350484848,
-0.30415505170822144,
-0.017917081713676453,
-0.020674316212534904,
0.07759782671928406,
-0.6391502022743225,
0.19063179194927216,
-0.0363025963306427,
0.15592211484909058,
-0.053047064691782,
0.0459434874355793,
0.06311875581741333,
-0.23247680068016052,
0.1714743971824646,
0.4587952792644501,
0.4186866581439972,
-0.03339307755231857,
-0.06340024620294571,
0.3129424452781677,
-0.0341997891664505,
-0.026127686724066734,
0.30358177423477173,
-0.043939847499132156,
0.16508570313453674,
0.05736701563000679,
-0.33584409952163696,
0.4323945641517639,
-0.24072709679603577,
0.33305859565734863,
0.2003154158592224,
0.02071313001215458,
0.15678447484970093,
0.19186337292194366,
-0.1606847196817398,
-0.1137874647974968,
-0.2559688091278076,
0.2064652293920517,
0.3144341707229614,
0.08097919076681137,
-0.2916623651981354,
0.4554876983165741,
0.5633218884468079,
-0.3260160982608795,
-0.22433456778526306,
0.019281776621937752,
0.019523214548826218,
-0.37285271286964417,
-0.06733827292919159,
0.3394278585910797,
0.5309392809867859,
0.024987081065773964,
0.17431220412254333,
0.08868525177240372,
-0.26710617542266846,
-0.2269398272037506,
0.41968879103660583,
0.07941841334104538,
0.06100313365459442,
0.06512638926506042,
-0.5002262592315674,
-0.2657811939716339,
-0.34898123145103455,
-0.15418817102909088,
0.25629058480262756,
0.21850773692131042,
-0.36757683753967285,
0.28024962544441223,
0.06447679549455643,
0.12093548476696014,
-0.26252928376197815,
-0.11413963884115219,
-0.27506595849990845,
-0.561281681060791,
0.0426919125020504,
-0.029997749254107475,
-0.08988916873931885,
0.045008596032857895,
0.035285044461488724,
0.228587806224823,
-0.0247042253613472,
0.17709305882453918,
-0.3000345230102539,
-0.19255296885967255,
-0.026238352060317993,
0.10838433355093002,
-0.004430846311151981,
0.019843893125653267,
0.2194131463766098,
-0.16604268550872803,
0.1192987784743309,
-0.26695188879966736,
-0.37010458111763,
0.2968112528324127,
-0.42685312032699585,
0.2855001389980316,
0.7126973867416382,
0.3422035276889801,
0.04949747025966644,
-0.23329102993011475,
0.050464995205402374,
-0.14689067006111145,
-0.2825329899787903,
-0.20106974244117737,
-0.1071048229932785,
0.07248727232217789,
-0.3547917902469635,
-0.5272272825241089,
0.034172430634498596,
-0.20805616676807404,
0.24928821623325348,
-0.057388730347156525,
0.25173965096473694,
0.2855533957481384,
0.20628666877746582,
0.24444429576396942,
0.08744315803050995,
0.16485881805419922,
-0.16097597777843475,
-0.31662410497665405,
0.28561684489250183,
-0.48654085397720337,
-0.15366287529468536,
0.10324637591838837,
-0.09227559715509415,
0.4634685218334198,
-0.03691071644425392,
-0.10640567541122437,
-0.37019896507263184,
-0.1186550036072731,
0.042470552027225494,
0.01869734562933445,
0.3841691017150879,
0.1690153330564499,
-0.02730533853173256,
0.025609247386455536,
-0.36478516459465027,
-0.1000136062502861,
0.055192336440086365,
-0.34730732440948486,
0.18235257267951965,
0.06089266017079353,
0.41555026173591614,
-0.07044883072376251,
0.6626816391944885,
0.3334251642227173,
0.04070759937167168,
-0.05795054882764816,
-0.11775520443916321,
0.4817962944507599,
-0.019931411370635033,
-0.16615022718906403,
0.07487137615680695,
0.10153676569461823,
-0.1329633742570877,
0.09534308314323425,
0.09037265926599503,
0.09375090152025223,
0.14870122075080872,
-0.02741478942334652,
-0.2631871700286865,
-0.35217562317848206,
0.12544672191143036,
0.21026331186294556,
0.27742478251457214,
-0.07122639566659927,
0.2989455461502075,
-0.19032469391822815,
0.18211805820465088,
-0.2548035979270935,
0.49085643887519836,
0.6145683526992798,
0.08277648687362671,
-0.3357667326927185,
-0.16448047757148743,
-0.3440627455711365,
0.13100163638591766,
-0.007412257604300976,
-0.08518444746732712,
-0.09274336695671082,
-0.12339591234922409,
0.14148160815238953,
-0.14611567556858063,
0.41383668780326843,
-0.34779515862464905,
-0.19352847337722778,
0.15258288383483887,
-0.016320981085300446,
-0.17387951910495758,
0.06592153757810593,
-0.15772274136543274,
0.29363369941711426,
0.17642098665237427,
0.0440509170293808,
-0.5996692180633545,
-0.49800169467926025,
0.19345176219940186,
0.010827680118381977,
-0.2041817009449005,
0.12988120317459106,
-0.15110564231872559,
-0.6448948383331299,
-0.08616698533296585,
-0.13225580751895905,
0.18499019742012024,
0.05452501028776169,
-0.17930755019187927,
0.39479267597198486,
0.13125964999198914,
0.12182224541902542,
0.15209800004959106,
0.46954724192619324,
0.306617796421051,
-0.11204786598682404,
-0.2064918577671051,
0.07654041051864624,
0.11021893471479416,
0.02025410532951355,
0.35728129744529724,
-0.14492473006248474,
-0.24036137759685516,
-0.0022134550381451845,
-0.2800568640232086,
0.5578081011772156,
0.29270222783088684,
-0.19023489952087402,
0.03479357063770294,
-0.14908923208713531,
-0.13576896488666534,
-0.239486962556839,
0.0017746449448168278,
0.38523155450820923,
-0.3035714626312256,
-0.30608269572257996,
-0.869810163974762,
0.4335879981517792,
0.34809577465057373,
-0.20586255192756653,
0.348325252532959,
0.3761308789253235,
-0.24766762554645538,
0.0583869069814682,
0.38353317975997925,
0.7816465497016907,
0.43720492720603943,
0.23352424800395966,
0.44353047013282776,
-0.21888768672943115,
0.5801466107368469,
0.05651512369513512,
-0.07854215800762177,
-0.4775749444961548,
0.0045595974661409855,
-0.21903224289417267,
-0.16594408452510834,
0.2511468231678009,
0.388783723115921,
-0.21797464787960052,
0.19363273680210114,
-0.1872214823961258,
0.06770683825016022,
-0.16185112297534943,
0.22551828622817993,
-0.12536226212978363,
-0.09130187332630157,
-0.202947735786438,
0.11334016174077988,
0.056984793394804,
-0.003909077029675245,
-0.04604637995362282,
-0.26790285110473633,
0.06449571996927261,
-0.4196644425392151,
-0.36844906210899353,
-0.060995981097221375,
0.307955801486969,
0.06724324077367783,
0.24745911359786987,
-0.22703059017658234,
0.38865363597869873,
0.12021602690219879,
0.2785610556602478,
-0.06698176264762878,
-0.12096428126096725,
0.17906522750854492,
-0.17073701322078705,
0.015560131520032883,
-0.1539045125246048,
0.16772380471229553,
0.4168994724750519,
0.09698068350553513,
-0.05401474982500076,
0.05655486136674881,
-0.1589331179857254,
-0.08833495527505875,
-0.4750371277332306,
0.18106310069561005,
-0.2370459884405136,
-0.5176569223403931,
-0.11484462767839432,
0.08287228643894196,
-0.2824349105358124,
-0.07623070478439331,
0.05548928678035736,
0.24438506364822388,
-0.23205764591693878,
0.29360294342041016,
-0.30239924788475037,
-0.02248157560825348,
0.048907797783613205,
-0.2302011400461197,
0.08626016229391098,
0.03687215968966484,
0.26180508732795715,
0.011296074837446213,
-0.1381823569536209,
-0.32728341221809387,
0.2000405192375183,
0.5726197361946106,
-0.6263505816459656,
0.256440132856369,
0.24687062203884125,
0.176998108625412,
0.15484102070331573,
0.17776183784008026,
-0.18418921530246735,
0.34372979402542114,
-0.2117955982685089,
-0.30275851488113403,
0.03210902214050293,
0.3065125644207001,
-0.22231261432170868,
0.20318971574306488,
0.02340059168636799,
-0.01578626222908497,
0.19777432084083557,
0.1179465502500534,
-0.29932427406311035,
0.11516812443733215,
0.1789735108613968,
0.03591466695070267,
0.20885680615901947,
0.015480615198612213,
0.10032767802476883,
0.0752103179693222,
0.003877595765516162,
-0.05265400931239128,
-0.3928080201148987,
-0.1168733686208725,
-0.21869100630283356,
0.18305806815624237,
-0.02885851263999939,
-0.1877184957265854,
0.1499778777360916,
0.16684450209140778,
-0.4248848259449005,
-0.0539344921708107,
0.33413949608802795,
-0.03730824962258339,
0.05516770854592323,
0.2743200361728668,
0.13238942623138428,
0.1528705209493637,
-0.17300812900066376,
-0.1509544998407364,
0.1343631148338318,
0.4246545732021332,
0.22463075816631317,
0.24329815804958344,
-0.22409726679325104,
-0.08632557094097137,
-0.15762685239315033,
0.4860994815826416,
0.24949486553668976,
-0.08477003127336502,
0.3280569314956665,
0.12166417390108109,
0.08732455968856812,
-0.4062584340572357,
0.44404536485671997,
0.4752523899078369,
-0.017964312806725502,
0.2364116758108139,
-0.05184822157025337,
0.09444165974855423,
-0.06887248903512955,
-0.1788323074579239,
0.1537090539932251,
0.04254070296883583,
0.1513473391532898,
0.3643040955066681,
0.1570616215467453,
0.21817009150981903,
-0.054238297045230865,
-0.2468825876712799,
0.5586369037628174,
-0.0006455948459915817,
0.3511778712272644,
0.7551180720329285,
-0.03546018525958061,
0.12356475740671158,
0.2820728123188019,
0.056719593703746796,
0.10680348426103592,
0.10888063162565231,
0.02399526722729206,
0.23939122259616852,
0.06699639558792114,
-0.012340706773102283,
0.28625407814979553,
-0.16195590794086456,
-0.026989873498678207,
0.2715640664100647,
0.04870634898543358,
0.13257184624671936,
-0.02620968036353588,
0.2715277671813965,
-0.060020722448825836,
0.10209648311138153,
-0.2493349015712738,
0.23157019913196564,
0.001593034598045051,
-0.20973116159439087,
-0.4564838409423828,
-0.25763311982154846,
-0.18726006150245667,
-0.08493165671825409,
0.06057438626885414,
-0.411541610956192,
0.34707289934158325,
-0.35003405809402466,
0.28074419498443604,
0.02307397872209549,
0.40158653259277344,
0.01152119506150484,
0.056205544620752335,
-0.04867861047387123,
0.03920422121882439,
0.19394168257713318,
-0.07024167478084564,
0.2330796867609024,
0.4043903052806854,
0.44648462533950806,
0.2524730861186981,
0.08699702471494675,
-0.1364700049161911,
-0.13093040883541107,
-0.049409154802560806,
0.0036348344292491674,
0.15377968549728394,
-0.3043949604034424,
-0.1800205558538437,
0.22088971734046936,
0.15445537865161896,
-0.002964575542137027,
-0.03888537734746933,
0.19890229403972626,
0.07924095541238785,
-0.10732462257146835,
0.5643259286880493,
-0.25656333565711975,
-0.12104403227567673,
-0.007953655906021595,
0.09752196073532104,
-0.35013046860694885,
-0.3489459753036499,
0.27837541699409485,
0.24495060741901398,
0.052512276917696,
-0.3614910840988159,
0.08282008767127991,
-0.03641272336244583,
0.592509925365448,
0.021375387907028198,
0.0422787070274353,
-0.1893228441476822,
-0.26087936758995056,
-0.4184708893299103,
-0.19523978233337402,
-0.01207643374800682,
-0.36242756247520447,
0.12394065409898758,
0.26397785544395447,
0.05118441954255104,
0.04532045125961304,
-0.11077725142240524,
0.006659252103418112,
-0.06471382081508636,
0.30011969804763794,
-0.24985188245773315,
-0.1399870663881302,
0.09746628999710083,
0.12805764377117157,
-0.11263327300548553,
-0.007093219552189112,
0.10195675492286682,
-0.010542835108935833,
-0.02535514533519745,
-0.08757980167865753,
0.1269019991159439,
0.32888779044151306,
0.33557888865470886,
-0.18880465626716614,
0.24490781128406525,
0.23538552224636078,
-0.08251024782657623,
-0.2910899519920349,
-0.238295778632164,
0.16945688426494598,
-0.3728817105293274,
0.49299389123916626,
-0.016186704859137535,
0.17973479628562927,
-0.07022116333246231,
-0.21983331441879272,
-0.29985758662223816,
0.20331281423568726,
0.08259773999452591,
-0.0941118448972702,
-0.23726148903369904,
0.24534760415554047,
-0.47478488087654114,
-0.020936930552124977,
0.25467321276664734,
0.3233118951320648,
-0.12943759560585022,
0.06689886748790741,
-0.08583392202854156,
-0.32034358382225037,
0.48120149970054626,
-0.20443807542324066,
-0.3090691864490509,
-0.12415008991956711,
0.05938355252146721,
0.02174323797225952,
-0.3169492483139038,
-0.5852500796318054,
-0.06435316056013107,
0.25322437286376953,
-0.11136800795793533,
-0.14046035706996918,
0.12807534635066986,
0.04938469082117081,
-0.29894304275512695,
-0.1453460305929184,
0.19236408174037933,
0.17094293236732483,
-0.30891093611717224,
0.18242108821868896,
-0.17368340492248535
] |
https://github.com/huggingface/datasets/issues/2009
|
Ambiguous documentation
|
Oh ok I hadn't made the connection between those two, will offer a tweak to the comment and the template then - thanks!
|
https://github.com/huggingface/datasets/blob/2ac9a0d24a091989f869af55f9f6411b37ff5188/templates/new_dataset_script.py#L156-L158
Looking at the template, I find this documentation line to be confusing, the method parameters don't include the `gen_kwargs` so I'm unclear where they're coming from.
Happy to push a PR with a clearer statement when I understand the meaning.
| 23
|
Ambiguous documentation
https://github.com/huggingface/datasets/blob/2ac9a0d24a091989f869af55f9f6411b37ff5188/templates/new_dataset_script.py#L156-L158
Looking at the template, I find this documentation line to be confusing, the method parameters don't include the `gen_kwargs` so I'm unclear where they're coming from.
Happy to push a PR with a clearer statement when I understand the meaning.
Oh ok I hadn't made the connection between those two, will offer a tweak to the comment and the template then - thanks!
|
[
0.09075407683849335,
-0.17848140001296997,
-0.082181416451931,
-0.1347760409116745,
0.20261019468307495,
0.10430463403463364,
0.43210193514823914,
0.07421460747718811,
-0.09254396706819534,
-0.12975072860717773,
0.1296098679304123,
0.20715518295764923,
0.014975572004914284,
0.10097161680459976,
0.31267157196998596,
0.03194793686270714,
0.20202229917049408,
0.0814611166715622,
-0.12701554596424103,
-0.18600212037563324,
-0.35094889998435974,
0.12044558674097061,
-0.20264020562171936,
0.24741870164871216,
-0.321433424949646,
-0.07153786718845367,
-0.09570005536079407,
0.3153887391090393,
-0.3801499903202057,
-0.3472009599208832,
0.39363670349121094,
0.2135889083147049,
-0.1184883788228035,
0.15078750252723694,
-0.00010648414172464982,
0.03133513033390045,
0.4308873414993286,
-0.18483257293701172,
-0.19259782135486603,
0.2388111799955368,
-0.20639728009700775,
-0.243521586060524,
0.0402124859392643,
-0.31962406635284424,
0.09195470064878464,
-0.2830057144165039,
0.10822048038244247,
-0.04741533473134041,
0.39472824335098267,
0.2065672129392624,
0.2524826228618622,
0.018118491396307945,
0.051402151584625244,
-0.2937714457511902,
-0.021461375057697296,
0.35281720757484436,
-0.25510841608047485,
0.1114552691578865,
0.18929030001163483,
-0.017818372696638107,
-0.22241441905498505,
0.31525638699531555,
0.06035792455077171,
-0.2014649212360382,
0.5262853503227234,
-0.09146004170179367,
0.12538063526153564,
-0.3355514407157898,
0.23067478835582733,
0.19552330672740936,
0.6530069708824158,
-0.28807181119918823,
-0.33906152844429016,
-0.158779576420784,
-0.015997346490621567,
-0.17256233096122742,
-0.11068332195281982,
0.14561603963375092,
-0.44381800293922424,
0.0985821932554245,
-0.3290766775608063,
-0.29952776432037354,
-0.33813461661338806,
-0.18937772512435913,
0.10415434092283249,
0.3985580503940582,
-0.14672228693962097,
0.028783459216356277,
-0.07981061190366745,
-0.06371099501848221,
0.060642458498477936,
-0.0514686219394207,
-0.06203203275799751,
0.4795161783695221,
0.047522787004709244,
-0.05710627883672714,
0.39132776856422424,
0.3072204887866974,
0.4849088191986084,
0.3319510817527771,
0.06475231051445007,
-0.12495696544647217,
0.0482139028608799,
0.12198130786418915,
0.16885681450366974,
-0.09521249681711197,
0.2625269591808319,
-0.19813966751098633,
0.1932668387889862,
0.071688711643219,
0.21935267746448517,
-0.18510419130325317,
0.16516369581222534,
-0.4140145778656006,
0.09602726995944977,
-0.1382642537355423,
0.3235104978084564,
-0.2193560153245926,
-0.047859761863946915,
0.021296050399541855,
0.15417061746120453,
-0.23298034071922302,
0.0033720259089022875,
0.14600101113319397,
0.09775435924530029,
-0.029409412294626236,
-0.02674059011042118,
-0.08247708529233932,
-0.16394367814064026,
-0.017776165157556534,
-0.3367518484592438,
0.22821752727031708,
-0.28196269273757935,
0.21590642631053925,
-0.23834429681301117,
-0.10508377104997635,
0.36398497223854065,
0.29324162006378174,
0.2600690722465515,
0.37622779607772827,
-0.11562934517860413,
0.20625033974647522,
0.14413879811763763,
0.2639550268650055,
-0.30725184082984924,
0.1014636904001236,
0.15148191154003143,
0.0976405143737793,
-0.21210931241512299,
0.02225218154489994,
-0.33755746483802795,
-0.4068913161754608,
0.03315594419836998,
0.15586437284946442,
-0.2776876986026764,
-0.05171574279665947,
-0.05283430963754654,
0.4435337781906128,
0.1255670189857483,
-0.18624788522720337,
0.043944310396909714,
0.0011072017950937152,
-0.06437404453754425,
-0.4972918927669525,
0.3103570342063904,
0.4556654393672943,
-0.30020949244499207,
-0.20153725147247314,
-0.05562921613454819,
-0.2588975131511688,
0.18018844723701477,
0.18005111813545227,
-0.2338034063577652,
0.11578205972909927,
-0.2990381419658661,
0.24529549479484558,
0.400996595621109,
-0.030505580827593803,
0.1852111667394638,
0.28868722915649414,
0.24084381759166718,
-0.045603491365909576,
0.2281845062971115,
-0.1671772003173828,
-0.12021777033805847,
-0.19614291191101074,
-0.12878714501857758,
-0.07713513821363449,
0.049337536096572876,
-0.13976550102233887,
-0.1034407913684845,
-0.07113007456064224,
-0.07051917910575867,
-0.11752581596374512,
-0.1683058738708496,
0.05475993826985359,
0.09533507376909256,
0.10155435651540756,
0.39323312044143677,
-0.23459306359291077,
0.12852559983730316,
0.34670794010162354,
0.41899022459983826,
-0.12886205315589905,
0.07942095398902893,
0.056518446654081345,
-0.6715264916419983,
-0.04660489782691002,
0.013108721934258938,
0.24239501357078552,
-0.18822042644023895,
-0.2485075294971466,
-0.4149162471294403,
0.0028946874663233757,
-0.04663880169391632,
-0.26504090428352356,
0.149155393242836,
-0.011379184201359749,
0.15154704451560974,
-0.13663949072360992,
-0.19815967977046967,
-0.07850993424654007,
-0.028242208063602448,
0.011772279627621174,
-0.4073154032230377,
0.1264132559299469,
-0.03086084872484207,
0.05494808778166771,
0.06609384715557098,
0.12116382271051407,
0.14555206894874573,
0.012739105150103569,
0.23027466237545013,
0.3799111843109131,
0.2193594127893448,
0.05449417233467102,
0.11662829667329788,
0.3671429455280304,
-0.1192401573061943,
0.09653914719820023,
0.26406943798065186,
-0.08311212807893753,
0.14383041858673096,
-0.03617602586746216,
-0.3096535801887512,
0.29353582859039307,
0.1455036997795105,
0.16450706124305725,
0.1982656717300415,
-0.08753286302089691,
0.12342137098312378,
0.11117563396692276,
-0.14373895525932312,
-0.10316075384616852,
-0.2327033430337906,
0.15119129419326782,
0.4141843914985657,
0.09494069963693619,
-0.3783418834209442,
0.43648335337638855,
0.2460181713104248,
-0.2534930109977722,
-0.1884203851222992,
0.1434512436389923,
0.09206420928239822,
-0.4229127764701843,
-0.04247160628437996,
-0.00898524560034275,
0.47923824191093445,
0.1818932294845581,
0.23705381155014038,
0.10933049768209457,
-0.2840774953365326,
-0.3740886151790619,
0.2590412497520447,
-0.006726491264998913,
-0.0551692470908165,
0.024030903354287148,
-0.1259053647518158,
-0.2680931091308594,
-0.2931365966796875,
-0.010390915907919407,
0.06463286280632019,
0.24185113608837128,
-0.4246808588504791,
0.15127971768379211,
0.013872445560991764,
-0.04885835945606232,
-0.20732180774211884,
-0.13205358386039734,
-0.3677155375480652,
-0.5768338441848755,
0.06485337764024734,
0.0012633911101147532,
-0.20231029391288757,
0.0999627411365509,
-0.12996430695056915,
0.3149806559085846,
0.06950023025274277,
0.2884175479412079,
-0.35008421540260315,
-0.25099048018455505,
0.0356566421687603,
0.15217101573944092,
-0.004658734891563654,
-0.10697024315595627,
0.3328811526298523,
-0.1114896759390831,
0.06817398220300674,
-0.4380580186843872,
-0.5030035972595215,
0.17673234641551971,
-0.3395254611968994,
0.3017343282699585,
0.5701350569725037,
0.4036955237388611,
0.05652463436126709,
-0.08302335441112518,
0.09479937702417374,
-0.17775306105613708,
-0.24369706213474274,
-0.2531808614730835,
-0.16253764927387238,
0.08252517879009247,
-0.34328824281692505,
-0.34737181663513184,
-0.03417946770787239,
-0.278212308883667,
0.23223869502544403,
0.08113563060760498,
0.1493462473154068,
0.4569232165813446,
0.11859796941280365,
0.1602659970521927,
0.046369098126888275,
0.14831897616386414,
-0.20614440739154816,
-0.3614019453525543,
0.35228148102760315,
-0.3719359338283539,
-0.2803909182548523,
0.018699677661061287,
0.043676041066646576,
0.4063164293766022,
-0.026121489703655243,
-0.20846952497959137,
-0.4375230371952057,
-0.09881540387868881,
0.22551079094409943,
0.07956002652645111,
0.46326398849487305,
0.17542241513729095,
-0.1288132518529892,
-0.16906459629535675,
-0.36972424387931824,
-0.1438211351633072,
0.005605278071016073,
-0.5320711135864258,
0.13507507741451263,
0.11612647026777267,
0.20165526866912842,
-0.13737305998802185,
0.6183991432189941,
0.18341176211833954,
-0.03933294862508774,
0.08632535487413406,
-0.23570118844509125,
0.6174340844154358,
-0.14255768060684204,
-0.05198457092046738,
0.17157858610153198,
0.04551772400736809,
-0.029540156945586205,
0.20160746574401855,
0.19067859649658203,
0.02522355504333973,
0.04899192601442337,
-0.0591115839779377,
-0.04396000877022743,
-0.37562811374664307,
0.03854452073574066,
0.2568560540676117,
0.1877182573080063,
-0.01453047338873148,
0.1676342785358429,
-0.27169501781463623,
0.007592266891151667,
-0.12250308692455292,
0.4069207012653351,
0.4516632556915283,
0.1684548556804657,
-0.2381349503993988,
0.01870054192841053,
-0.48035502433776855,
0.28030839562416077,
-0.048240579664707184,
-0.05259691923856735,
-0.1732233464717865,
-0.28884366154670715,
0.12352799624204636,
-0.08844844251871109,
0.29024752974510193,
-0.2935282588005066,
-0.2524644732475281,
0.1743185967206955,
0.1187518909573555,
-0.37808412313461304,
-0.015644323080778122,
-0.12833711504936218,
0.2648369371891022,
0.26696836948394775,
0.092648446559906,
-0.5838428735733032,
-0.4488584101200104,
0.08714643120765686,
0.03397207707166672,
-0.09441590309143066,
0.04180920869112015,
-0.25122177600860596,
-0.6246230006217957,
-0.03165322542190552,
-0.13254573941230774,
0.06766124814748764,
-0.08960063010454178,
-0.20216284692287445,
0.3516407608985901,
0.21784813702106476,
0.17411568760871887,
0.13694420456886292,
0.3481552004814148,
0.1863056719303131,
0.058536410331726074,
-0.11715788394212723,
0.0357600674033165,
0.26290932297706604,
0.15641190111637115,
0.3872838318347931,
-0.24500185251235962,
-0.15561820566654205,
-0.091391921043396,
-0.24306529760360718,
0.503779411315918,
0.4062495231628418,
-0.19079996645450592,
0.10119888931512833,
-0.06806306540966034,
-0.057671405375003815,
-0.22235532104969025,
-0.04980030655860901,
0.2901691198348999,
-0.17594808340072632,
-0.3967420160770416,
-0.8526319265365601,
0.5501227974891663,
0.22215081751346588,
-0.35092607140541077,
0.12337671220302582,
0.3864317834377289,
-0.25406473875045776,
-0.1042570173740387,
0.23903337121009827,
0.9269064664840698,
0.46659934520721436,
0.381386935710907,
0.5670024752616882,
-0.019357815384864807,
0.39439791440963745,
0.2751511335372925,
-0.08544637262821198,
-0.55063396692276,
-0.1121298149228096,
-0.14181450009346008,
-0.11993348598480225,
0.11939305067062378,
0.3322308659553528,
-0.07280611991882324,
0.2612597644329071,
-0.2402748316526413,
0.11520681530237198,
-0.12837569415569305,
-0.011382697150111198,
-0.19960738718509674,
-0.08779344707727432,
-0.3388989567756653,
0.20315761864185333,
0.08033914864063263,
-0.02780757285654545,
-0.11159931868314743,
-0.21379537880420685,
0.03834068030118942,
-0.3241896331310272,
-0.33651137351989746,
-0.011235164478421211,
0.16630710661411285,
0.12326518446207047,
0.18985868990421295,
-0.11643698811531067,
0.19515164196491241,
0.06203484535217285,
0.37509921193122864,
-0.06631021201610565,
-0.27110761404037476,
0.14843405783176422,
-0.15166643261909485,
0.032263968139886856,
-0.07261507958173752,
0.20966681838035583,
0.5035302042961121,
-0.015519601292908192,
-0.16644862294197083,
0.07060692459344864,
-0.03751856088638306,
-0.04959959536790848,
-0.5324884653091431,
0.0037839957512915134,
-0.3056994080543518,
-0.5237838625907898,
-0.2686622440814972,
-0.05526820570230484,
-0.18284150958061218,
-0.10468660295009613,
0.12078776955604553,
0.25441595911979675,
0.041453808546066284,
0.29857975244522095,
-0.16159215569496155,
-0.010248269885778427,
0.013082481920719147,
0.054699063301086426,
-0.089469313621521,
0.05767369270324707,
0.3235439360141754,
0.055472202599048615,
-0.3141048848628998,
-0.31132084131240845,
-0.002712211338803172,
0.5453393459320068,
-0.5239100456237793,
0.12505491077899933,
0.42242321372032166,
0.18554624915122986,
0.03523027151823044,
0.26992666721343994,
-0.1150503009557724,
0.10455862432718277,
-0.10198023915290833,
-0.24708688259124756,
-0.27669841051101685,
0.39570534229278564,
-0.21522630751132965,
0.2896229922771454,
-0.042039770632982254,
-0.0012257453054189682,
0.2128678560256958,
-0.06500320136547089,
-0.4069844186306,
-0.06392083317041397,
0.20351341366767883,
-0.03132213279604912,
0.3573606610298157,
0.028350919485092163,
0.16423097252845764,
0.09974298626184464,
0.061715107411146164,
-0.10781602561473846,
-0.45562076568603516,
-0.17327605187892914,
-0.16206026077270508,
0.14704711735248566,
-0.08217235654592514,
-0.19665294885635376,
0.2791030704975128,
0.0727943480014801,
-0.3431837856769562,
-0.037316396832466125,
0.4923638105392456,
0.0939221978187561,
-0.015170635655522346,
0.26184988021850586,
0.04403350129723549,
0.15816527605056763,
0.14475440979003906,
-0.04781845957040787,
0.23076412081718445,
0.2744840383529663,
0.14321249723434448,
0.07818420976400375,
-0.3892541825771332,
-0.11418382823467255,
0.3225952684879303,
0.564365565776825,
0.23075181245803833,
-0.007492619100958109,
0.21254028379917145,
0.11366967111825943,
-0.012727410532534122,
-0.17723077535629272,
0.37571683526039124,
0.33665332198143005,
-0.14396744966506958,
0.12916310131549835,
0.08737209439277649,
0.19601157307624817,
-0.29598137736320496,
-0.13628298044204712,
-0.0016898605972528458,
0.0013867398956790566,
0.19355405867099762,
0.2963775396347046,
0.11718026548624039,
0.02321602776646614,
-0.02994983084499836,
-0.16305966675281525,
0.4087218940258026,
-0.12788349390029907,
0.030938848853111267,
0.47379612922668457,
-0.0006788211176171899,
0.04577140137553215,
0.3533288538455963,
0.23772045969963074,
0.0006730580935254693,
0.16270790994167328,
0.022444630041718483,
0.139356791973114,
0.061436235904693604,
-0.03737664967775345,
-0.005246123299002647,
-0.283974826335907,
0.015807434916496277,
0.3037022650241852,
0.03544052317738533,
0.08365211635828018,
0.055017512291669846,
0.35768502950668335,
0.26737964153289795,
0.07826568186283112,
-0.17516663670539856,
0.2874334156513214,
-0.029082417488098145,
-0.35689881443977356,
-0.281084805727005,
-0.23414313793182373,
-0.0568818673491478,
-0.20313021540641785,
-0.056024931371212006,
-0.3469700813293457,
0.3962550461292267,
-0.28429579734802246,
0.3317696154117584,
-0.026289861649274826,
0.2526834309101105,
0.030821578577160835,
0.2138831913471222,
0.01918293908238411,
0.10567011684179306,
0.34387868642807007,
-0.09203800559043884,
0.3848397433757782,
0.4586822986602783,
0.683443009853363,
0.23319624364376068,
0.2456309199333191,
-0.11297150701284409,
-0.18201538920402527,
-0.03387138620018959,
-0.038764238357543945,
0.18520352244377136,
-0.11104413866996765,
-0.160518616437912,
0.2998465895652771,
0.18130026757717133,
-0.0675625428557396,
0.159036785364151,
0.19811265170574188,
0.14917421340942383,
-0.1206936165690422,
0.4673972427845001,
-0.16421730816364288,
-0.2568283677101135,
-0.16327454149723053,
0.2003328949213028,
-0.3464719355106354,
-0.14833956956863403,
0.24936605989933014,
0.22657573223114014,
0.099087193608284,
-0.2746405303478241,
0.13393135368824005,
0.1253909170627594,
0.7037276029586792,
0.13804031908512115,
0.054493311792612076,
-0.07642251998186111,
-0.18340180814266205,
-0.5739243626594543,
-0.1766328513622284,
0.11146923899650574,
-0.4577985107898712,
0.014780391938984394,
-0.028479157015681267,
0.17493031919002533,
-0.05768661946058273,
-0.02285115048289299,
-0.05760292708873749,
0.08306604623794556,
0.05209295451641083,
-0.34599679708480835,
-0.04294831305742264,
-0.016524625942111015,
0.055800870060920715,
-0.04550765082240105,
-0.03073115088045597,
0.07581724226474762,
-0.04352878779172897,
0.09064046293497086,
-0.048841360956430435,
0.28201180696487427,
0.14648349583148956,
0.31402984261512756,
-0.04890478774905205,
0.20109163224697113,
0.4074596166610718,
-0.15195651352405548,
-0.32344532012939453,
-0.3913863003253937,
-0.06761376559734344,
-0.3365265130996704,
0.4239859879016876,
-0.020409809425473213,
0.035030629485845566,
-0.05162740498781204,
-0.4418331980705261,
-0.19301588833332062,
0.39307543635368347,
0.09235960990190506,
-0.1800708919763565,
-0.17328624427318573,
0.24957185983657837,
-0.29526662826538086,
-0.21622781455516815,
0.03893623501062393,
0.29924318194389343,
-0.08709871768951416,
-0.017105797305703163,
-0.04397713765501976,
-0.5386337637901306,
0.7789409160614014,
-0.28154903650283813,
-0.27078714966773987,
-0.14146776497364044,
0.17809687554836273,
-0.06995229423046112,
-0.23719121515750885,
-0.6841176152229309,
0.11797488480806351,
0.18550686538219452,
0.07755274325609207,
-0.22214537858963013,
0.22765852510929108,
-0.18036118149757385,
-0.27494126558303833,
-0.1646127700805664,
0.2249433696269989,
0.14349041879177094,
-0.2990715503692627,
-0.05709889903664589,
-0.23723368346691132
] |
https://github.com/huggingface/datasets/issues/2007
|
How to not load huggingface datasets into memory
|
So maybe a summary here:
If I could fit a large model with batch_size = X into memory, is there a way I could train this model for huge datasets with keeping setting the same? thanks
|
Hi
I am running this example from transformers library version 4.3.3:
(Here is the full documentation https://github.com/huggingface/transformers/issues/8771 but the running command should work out of the box)
USE_TF=0 deepspeed run_seq2seq.py --model_name_or_path google/mt5-base --dataset_name wmt16 --dataset_config_name ro-en --source_prefix "translate English to Romanian: " --task translation_en_to_ro --output_dir /test/test_large --do_train --do_eval --predict_with_generate --max_train_samples 500 --max_val_samples 500 --max_source_length 128 --max_target_length 128 --sortish_sampler --per_device_train_batch_size 8 --val_max_target_length 128 --deepspeed ds_config.json --num_train_epochs 1 --eval_steps 25000 --warmup_steps 500 --overwrite_output_dir
(Here please find the script: https://github.com/huggingface/transformers/blob/master/examples/seq2seq/run_seq2seq.py)
If you do not pass max_train_samples in above command to load the full dataset, then I get memory issue on a gpu with 24 GigBytes of memory.
I need to train large-scale mt5 model on large-scale datasets of wikipedia (multiple of them concatenated or other datasets in multiple languages like OPUS), could you help me how I can avoid loading the full data into memory? to make the scripts not related to data size?
In above example, I was hoping the script could work without relying on dataset size, so I can still train the model without subsampling training set.
thank you so much @lhoestq for your great help in advance
| 36
|
How to not load huggingface datasets into memory
Hi
I am running this example from transformers library version 4.3.3:
(Here is the full documentation https://github.com/huggingface/transformers/issues/8771 but the running command should work out of the box)
USE_TF=0 deepspeed run_seq2seq.py --model_name_or_path google/mt5-base --dataset_name wmt16 --dataset_config_name ro-en --source_prefix "translate English to Romanian: " --task translation_en_to_ro --output_dir /test/test_large --do_train --do_eval --predict_with_generate --max_train_samples 500 --max_val_samples 500 --max_source_length 128 --max_target_length 128 --sortish_sampler --per_device_train_batch_size 8 --val_max_target_length 128 --deepspeed ds_config.json --num_train_epochs 1 --eval_steps 25000 --warmup_steps 500 --overwrite_output_dir
(Here please find the script: https://github.com/huggingface/transformers/blob/master/examples/seq2seq/run_seq2seq.py)
If you do not pass max_train_samples in above command to load the full dataset, then I get memory issue on a gpu with 24 GigBytes of memory.
I need to train large-scale mt5 model on large-scale datasets of wikipedia (multiple of them concatenated or other datasets in multiple languages like OPUS), could you help me how I can avoid loading the full data into memory? to make the scripts not related to data size?
In above example, I was hoping the script could work without relying on dataset size, so I can still train the model without subsampling training set.
thank you so much @lhoestq for your great help in advance
So maybe a summary here:
If I could fit a large model with batch_size = X into memory, is there a way I could train this model for huge datasets with keeping setting the same? thanks
|
[
-0.15727531909942627,
-0.5049954652786255,
0.0060413675382733345,
0.530023455619812,
0.5585078597068787,
0.04716886952519417,
0.0790676549077034,
0.26013049483299255,
0.392534464597702,
0.1179509088397026,
-0.025012746453285217,
-0.25722402334213257,
-0.33554503321647644,
0.3502962589263916,
0.07988317310810089,
-0.16710786521434784,
0.04809894412755966,
-0.009337745606899261,
-0.49064916372299194,
0.08144275844097137,
-0.25675317645072937,
-0.05833578482270241,
0.023544058203697205,
-0.3496476709842682,
-0.36085808277130127,
0.07816018909215927,
0.08022090047597885,
0.06284555792808533,
0.015035604126751423,
-0.00040828128112480044,
0.027333281934261322,
-0.07058224827051163,
0.19962112605571747,
0.4450736343860626,
-0.00012403001892380416,
0.09557297825813293,
0.10588572174310684,
-0.34305036067962646,
-0.011348577216267586,
-0.02023337036371231,
-0.0401829332113266,
-0.1584908366203308,
0.17591063678264618,
-0.09605607390403748,
-0.12496515363454819,
0.16420254111289978,
0.05707438662648201,
-0.11926903575658798,
0.6155737638473511,
0.03770345076918602,
0.0811978131532669,
0.15577290952205658,
-0.18679100275039673,
0.13917182385921478,
0.09970694780349731,
0.17155088484287262,
0.06137100234627724,
0.19247029721736908,
-0.11176520586013794,
0.08047432452440262,
-0.020595012232661247,
0.3296146094799042,
-0.15510566532611847,
-0.1606442928314209,
0.37128952145576477,
-0.02968166582286358,
0.09771305322647095,
-0.4963959753513336,
0.06988625228404999,
0.22780777513980865,
0.33271273970603943,
-0.1846725046634674,
-0.28159773349761963,
-0.2376715987920761,
-0.2664920687675476,
-0.2981773316860199,
0.03562192991375923,
0.3874972462654114,
-0.16271090507507324,
0.19529420137405396,
-0.564727783203125,
-0.35832610726356506,
-0.11733006685972214,
-0.07938192784786224,
0.01709599979221821,
-0.14798644185066223,
-0.11177249252796173,
0.09310148656368256,
0.3886773884296417,
-0.1748267412185669,
-0.3857351243495941,
0.05350803583860397,
0.12446344643831253,
0.2021837830543518,
-0.44651028513908386,
-0.2754253149032593,
-0.09813347458839417,
-0.012659074738621712,
0.5197051167488098,
0.06968352943658829,
-0.08406534045934677,
0.14355167746543884,
0.36780643463134766,
-0.012454777956008911,
0.25592777132987976,
0.2244560271501541,
-0.35793882608413696,
-0.02268960140645504,
0.30583858489990234,
0.15482264757156372,
0.06663566827774048,
-0.09807982295751572,
-0.048380132764577866,
-0.10398268699645996,
-0.11874962598085403,
-0.21783895790576935,
0.19384227693080902,
-0.24721011519432068,
0.11519411951303482,
-0.10141752660274506,
-0.003416912630200386,
0.14570343494415283,
-0.07070567458868027,
0.5723386406898499,
-0.10757672786712646,
0.2447868287563324,
-0.05470295250415802,
0.13190850615501404,
-0.40477174520492554,
0.019961506128311157,
-0.1732325255870819,
0.1808786243200302,
-0.2549782991409302,
0.3128553032875061,
0.3761706054210663,
0.10773683339357376,
0.38844484090805054,
-0.12955613434314728,
0.06677611917257309,
-0.0720064789056778,
0.0200998242944479,
-0.3184734880924225,
0.07431338727474213,
0.41209876537323,
0.05142991989850998,
0.10466652363538742,
0.05255947262048721,
0.2978246510028839,
-0.21430079638957977,
0.3047834634780884,
-0.18778814375400543,
-0.3000201880931854,
0.4647502899169922,
0.026090707629919052,
-0.3193109929561615,
0.29635971784591675,
-0.5062705278396606,
0.23296475410461426,
0.13442981243133545,
0.21492072939872742,
0.026301316916942596,
0.06527087092399597,
-0.3889734447002411,
-0.09688755869865417,
0.44458818435668945,
0.727624237537384,
-0.0871046930551529,
-0.37357768416404724,
0.26251479983329773,
-0.09192444384098053,
0.09987429529428482,
0.6178457736968994,
-0.014417656697332859,
0.026507310569286346,
0.006341088097542524,
-0.3365328013896942,
0.09796053916215897,
-0.14028260111808777,
-0.3693668842315674,
0.2471100091934204,
-0.20831653475761414,
0.17370006442070007,
0.2634851634502411,
0.19606851041316986,
-0.15708868205547333,
0.12543195486068726,
-0.01424198318272829,
0.44110211730003357,
0.02682100422680378,
0.24726222455501556,
-0.13989591598510742,
-0.5316060781478882,
0.12084987014532089,
0.2106376737356186,
0.22566501796245575,
0.057258158922195435,
-0.15098291635513306,
0.5526153445243835,
0.08866731077432632,
-0.13657909631729126,
0.14130976796150208,
0.4671056866645813,
-0.044079504907131195,
-0.17227095365524292,
-0.013390042819082737,
0.03272998705506325,
-0.5094314813613892,
0.20024637877941132,
-0.2553131580352783,
0.03257199004292488,
-0.10795580595731735,
-0.010127142071723938,
0.048687513917684555,
-0.09302116930484772,
0.1028221994638443,
-0.19377689063549042,
-0.09281647205352783,
-0.302774578332901,
0.18680717051029205,
-0.07716676592826843,
-0.05798080191016197,
0.1618715077638626,
0.05336977168917656,
0.2807011604309082,
-0.6293290257453918,
-0.18641355633735657,
0.08766868710517883,
-0.08234109729528427,
0.050921183079481125,
0.08698932826519012,
-0.05716898292303085,
-0.07526227086782455,
0.1155376210808754,
0.18458163738250732,
0.06814088672399521,
0.022121373564004898,
-0.28768646717071533,
0.5894054174423218,
0.2645449936389923,
-0.21517834067344666,
0.1873774379491806,
0.05682380869984627,
0.08075737953186035,
-0.016797609627246857,
-0.22811108827590942,
0.275605708360672,
0.0014035403728485107,
0.35335573554039,
0.06751562654972076,
-0.24337567389011383,
-0.01537680346518755,
-0.2704690992832184,
-0.09662670642137527,
-0.3189067244529724,
0.19481651484966278,
0.37012580037117004,
0.2904970049858093,
0.3180949091911316,
-0.10975725203752518,
-0.6400562524795532,
0.4141528010368347,
0.028522450476884842,
0.011982343159615993,
0.12402065843343735,
-0.44411519169807434,
-0.044127266854047775,
-0.10439625382423401,
-0.4297688603401184,
0.2082958072423935,
0.22344206273555756,
-0.02863309718668461,
0.1574379801750183,
0.4532972276210785,
-0.03835490718483925,
0.15972770750522614,
0.3495733141899109,
0.22938625514507294,
-0.021721025928854942,
0.07189610600471497,
-0.1523364633321762,
-0.13773033022880554,
0.1474388986825943,
0.041609637439250946,
-0.28683412075042725,
-0.39082494378089905,
0.0496990866959095,
-0.10450710356235504,
-0.18144163489341736,
-0.2212860882282257,
0.245741069316864,
-0.4682888388633728,
0.14058268070220947,
-0.02431338094174862,
0.18286076188087463,
-0.07907609641551971,
0.12983696162700653,
0.13444754481315613,
0.4491237699985504,
0.20740005373954773,
-0.3838307857513428,
0.03988689184188843,
0.02107025869190693,
0.026875972747802734,
-0.01980721950531006,
0.15810346603393555,
-0.18727168440818787,
0.21344348788261414,
0.1074104905128479,
-0.2879984676837921,
0.08815301209688187,
-0.10725073516368866,
0.2509247958660126,
-0.10203035175800323,
0.3402288556098938,
-0.1145429015159607,
0.1728454977273941,
0.18165884912014008,
0.047414667904376984,
-0.10805251449346542,
-0.17352502048015594,
-0.03949477896094322,
0.09622620791196823,
0.05923052132129669,
0.3814135193824768,
-0.20717297494411469,
-0.16165949404239655,
-0.0630652979016304,
-0.4113819897174835,
0.5235665440559387,
0.108538419008255,
-0.014470056630671024,
0.38267001509666443,
0.25277069211006165,
0.05536113306879997,
-0.2323654443025589,
0.2439739853143692,
-0.04540340602397919,
-0.18669520318508148,
0.41612106561660767,
-0.02489432506263256,
-0.20298485457897186,
0.1008620336651802,
-0.11281341314315796,
0.1595999151468277,
0.2732183039188385,
-0.5897442698478699,
-0.02668384090065956,
-0.20097847282886505,
-0.3303205966949463,
-0.0016956457402557135,
0.1910514086484909,
0.215205579996109,
-0.3849968910217285,
0.056703969836235046,
0.10275208204984665,
-0.054119549691677094,
0.10806094110012054,
-0.021795257925987244,
0.3186103105545044,
0.13368144631385803,
0.5374329090118408,
-0.07030943036079407,
0.8954890370368958,
0.08737556636333466,
0.23482491075992584,
0.05918316915631294,
0.012796515598893166,
0.18766221404075623,
-0.12136345356702805,
0.031882043927907944,
-0.1025441363453865,
-0.11589790880680084,
-0.17615722119808197,
0.23530006408691406,
-0.00910656526684761,
0.14027179777622223,
-0.21118025481700897,
-0.11607122421264648,
0.20837847888469696,
-0.3471619188785553,
0.3769305348396301,
0.02728792279958725,
0.08529693633317947,
-0.06752228736877441,
-0.0631658062338829,
0.023664500564336777,
-0.2326021045446396,
0.04978444427251816,
0.09128795564174652,
0.2584250569343567,
0.16411060094833374,
-0.13996575772762299,
-0.03774202987551689,
-0.6823842525482178,
0.04729023948311806,
-0.16285134851932526,
0.07054969668388367,
-0.011834612116217613,
-0.36287635564804077,
-0.10110306739807129,
0.14957016706466675,
0.7003597021102905,
0.20931117236614227,
-0.09929686039686203,
-0.15136945247650146,
-0.6746281385421753,
-0.3832985460758209,
0.008751800283789635,
-0.19946199655532837,
-0.1459469199180603,
0.1336379051208496,
0.33630144596099854,
-0.29804539680480957,
-0.1955028921365738,
0.14031250774860382,
0.22183534502983093,
-0.28504684567451477,
-0.18150591850280762,
-0.4925498366355896,
-0.0061125378124415874,
-0.4370327591896057,
0.11374855041503906,
0.3473297357559204,
0.08877692371606827,
-0.17728260159492493,
0.06353314965963364,
-0.04171796888113022,
-0.041481517255306244,
0.3954688012599945,
-0.00795033760368824,
0.25316542387008667,
0.005849808920174837,
-0.0506550595164299,
0.11097683757543564,
0.0996192991733551,
-0.0075124758295714855,
0.616642951965332,
0.29458653926849365,
-0.2460389882326126,
0.19506780803203583,
0.22993557155132294,
0.4992120563983917,
0.2186073660850525,
-0.07312776148319244,
0.060115937143564224,
0.18478591740131378,
0.33941367268562317,
-0.4147096574306488,
0.36235612630844116,
-0.057516004890203476,
-0.10004662722349167,
-0.2485257387161255,
-0.2642425298690796,
0.5508924722671509,
0.27322593331336975,
0.16027849912643433,
-0.06582072377204895,
-0.09297309070825577,
-0.3220255672931671,
0.2822607755661011,
0.14270290732383728,
0.9183735847473145,
-0.23078025877475739,
0.4209928512573242,
0.09391742199659348,
0.3291235864162445,
0.4919894337654114,
-0.321001261472702,
0.2628656327724457,
-0.18502379953861237,
-0.3845911920070648,
0.054186251014471054,
-0.24255912005901337,
-0.08958330750465393,
0.20866352319717407,
-0.10838185995817184,
0.526911199092865,
0.003922031726688147,
0.05590325966477394,
-0.03589170426130295,
0.21784859895706177,
0.048002224415540695,
-0.5682674646377563,
-0.39843809604644775,
-0.03150912746787071,
0.018267879262566566,
0.05490625649690628,
-0.0910816639661789,
0.01964387856423855,
0.3000803291797638,
-0.29666873812675476,
0.09157544374465942,
0.04706165939569473,
-0.6259868144989014,
-0.06201788783073425,
-0.13735400140285492,
0.03999976068735123,
0.2674296200275421,
0.13791587948799133,
-0.07572764158248901,
0.39677131175994873,
-0.19718167185783386,
-0.13525356352329254,
-0.23230932652950287,
-0.028519289568066597,
-0.23190762102603912,
0.13666659593582153,
0.2972683906555176,
0.08818894624710083,
-0.07165443152189255,
0.0905376523733139,
-0.04240346699953079,
0.005204693414270878,
-0.06771668791770935,
-0.3298540711402893,
-0.135856494307518,
-0.24938036501407623,
-0.20009750127792358,
-0.035298366099596024,
-0.006109828595072031,
0.16819046437740326,
0.024074876680970192,
-0.014477216638624668,
-0.22601580619812012,
0.16626183688640594,
0.17553852498531342,
-0.49449846148490906,
-0.19151663780212402,
0.6306136846542358,
0.05814583972096443,
-0.13180914521217346,
0.38460564613342285,
0.2682076692581177,
0.015630731359124184,
-0.10551364719867706,
-0.08018629997968674,
0.45318174362182617,
-0.4024278223514557,
0.20406848192214966,
0.1334739625453949,
-0.16697873175144196,
-0.23008647561073303,
0.17605742812156677,
0.07834594696760178,
-0.2996075749397278,
0.03955499082803726,
-0.07674200087785721,
-0.6522594690322876,
0.5526911020278931,
-0.1600833684206009,
0.14572477340698242,
0.221074178814888,
0.009821496903896332,
-0.10010410845279694,
0.3121762275695801,
-0.17713241279125214,
-0.12392077594995499,
-0.2733057141304016,
0.02649940550327301,
0.15477296710014343,
-0.16644005477428436,
0.2666949927806854,
0.16077187657356262,
-0.0716533362865448,
0.18320265412330627,
-0.22983549535274506,
-0.1442573219537735,
-0.008322160691022873,
0.18109442293643951,
-0.012728363275527954,
0.09242551773786545,
-0.027355602011084557,
-0.006376779172569513,
0.012505924329161644,
-0.17346881330013275,
0.6875872015953064,
0.06993643194437027,
0.18867816030979156,
0.08078742027282715,
0.09897786378860474,
0.025181444361805916,
-0.38383057713508606,
0.12728135287761688,
0.06434687972068787,
0.12450527399778366,
0.359357088804245,
0.04593997448682785,
0.041266776621341705,
-0.0036159239243716,
-0.43446093797683716,
-0.011932477355003357,
0.44888198375701904,
-0.13604505360126495,
-0.02000690996646881,
-0.0839250460267067,
-0.2861679494380951,
0.20592570304870605,
0.06951996684074402,
0.16057151556015015,
-0.25929221510887146,
-0.0067395372316241264,
0.1479414850473404,
0.06309524178504944,
-0.07582594454288483,
0.006250594276934862,
0.12690123915672302,
-0.3414536714553833,
0.01044454611837864,
0.6033733487129211,
0.16430720686912537,
0.043260250240564346,
0.0644848495721817,
0.12934373319149017,
0.2971212863922119,
0.04887336120009422,
0.07112999260425568,
0.06000340357422829,
0.016529055312275887,
0.0223457682877779,
0.38406646251678467,
0.44986748695373535,
0.42909765243530273,
0.15332046151161194,
-0.015200422145426273,
0.2711757719516754,
-0.6283987760543823,
0.22733384370803833,
-0.16535116732120514,
-0.5089750289916992,
-0.3248366415500641,
0.4284752309322357,
-0.21222707629203796,
0.12089155614376068,
-0.4700196385383606,
0.0007579916273243725,
0.3411906063556671,
-0.18160024285316467,
-0.23548653721809387,
0.2056102752685547,
-0.23339508473873138,
-0.16250310838222504,
0.20383137464523315,
-0.041025400161743164,
-0.24419879913330078,
0.3038095235824585,
0.05284401774406433,
-0.36026179790496826,
0.23834224045276642,
0.20095691084861755,
-0.09193964302539825,
0.1840379536151886,
-0.04093586653470993,
0.3867119550704956,
-0.010937533341348171,
-0.3442849814891815,
0.0856592059135437,
0.16586413979530334,
0.13663209974765778,
-0.03885596990585327,
0.09826250374317169,
0.09759703278541565,
0.03749987855553627,
-0.09687940776348114,
-0.013247445225715637,
0.28228089213371277,
0.0023819145280867815,
-0.19332019984722137,
0.18972887098789215,
0.17482635378837585,
0.5260716676712036,
0.02713802084326744,
0.0026789603289216757,
-0.023128816857933998,
-0.030111240223050117,
0.007849077694118023,
0.13321390748023987,
-0.4083065390586853,
0.11059454083442688,
0.3215964436531067,
0.012033207342028618,
-0.22426605224609375,
0.1360994279384613,
-0.5450899004936218,
0.11930298805236816,
0.3821789622306824,
-0.3217519521713257,
0.09505144506692886,
0.10023701936006546,
-0.0032948823645710945,
-0.224820077419281,
0.6864811778068542,
0.11666160076856613,
0.08426093310117722,
-0.5442649722099304,
0.18974518775939941,
-0.19600683450698853,
0.028713930398225784,
-0.06128344312310219,
0.3867126703262329,
0.14481337368488312,
0.24283666908740997,
-0.03645859658718109,
0.17841890454292297,
-0.48868346214294434,
-0.08894514292478561,
-0.343077689409256,
-0.15445151925086975,
-0.14515092968940735,
-0.150417298078537,
-0.44107651710510254,
0.33653905987739563,
0.14525404572486877,
-0.17598463594913483,
0.0739884003996849,
-0.12769538164138794,
-0.22321148216724396,
-0.11746398359537125,
-0.0170469731092453,
-0.037243735045194626,
0.3146267235279083,
0.21628844738006592,
0.10405133664608002,
0.16226769983768463,
-0.14833588898181915,
-0.1856822818517685,
-0.19421754777431488,
-0.03626351058483124,
-0.24063588678836823,
-0.24034442007541656,
-0.03477925434708595,
0.24314530193805695,
-0.27452781796455383,
0.0526009127497673,
-0.2590034604072571,
0.0730438232421875,
-0.014622483402490616,
-0.30162152647972107,
0.09456820040941238,
-0.12221419811248779,
0.08139277249574661,
0.262632817029953,
0.1797943115234375,
0.38551464676856995,
-0.2010316699743271,
-0.062267087399959564,
-0.1728285402059555,
-0.02521982230246067,
0.40783166885375977,
-0.22101636230945587,
-0.16230246424674988,
-0.22039367258548737,
0.2522377669811249,
-0.1805458515882492,
-0.07965225726366043,
-0.5692539811134338,
0.25798845291137695,
0.04816697910428047,
0.15226952731609344,
-0.3700573146343231,
0.4148780405521393,
-0.0936158299446106,
-0.1156226098537445,
-0.20932643115520477,
0.13172949850559235,
-0.014185975305736065,
-0.15151794254779816,
-0.25112292170524597,
-0.37918105721473694
] |
https://github.com/huggingface/datasets/issues/2007
|
How to not load huggingface datasets into memory
|
The `datastets` library doesn't load datasets into memory. Therefore you can load a dataset that is terabytes big without filling up your RAM.
The only thing that's loaded into memory during training is the batch used in the training step.
So as long as your model works with batch_size = X, then you can load an even bigger dataset and it will work as well with the same batch_size.
Note that you still have to take into account that some batches take more memory than others, depending on the texts lengths. If it works for a batch with batch_size = X and with texts of maximum length, then it will work for all batches.
In your case I guess that there are a few long sentences in the dataset. For those long sentences you get a memory error on your GPU because they're too long. By passing `max_train_samples` you may have taken a subset of the dataset that only contain short sentences. That's probably why in your case it worked only when you set `max_train_samples`.
I'd suggest you to reduce the batch size so that the batches with long sentences can be loaded on the GPU.
Let me know if that helps or if you have other questions
|
Hi
I am running this example from transformers library version 4.3.3:
(Here is the full documentation https://github.com/huggingface/transformers/issues/8771 but the running command should work out of the box)
USE_TF=0 deepspeed run_seq2seq.py --model_name_or_path google/mt5-base --dataset_name wmt16 --dataset_config_name ro-en --source_prefix "translate English to Romanian: " --task translation_en_to_ro --output_dir /test/test_large --do_train --do_eval --predict_with_generate --max_train_samples 500 --max_val_samples 500 --max_source_length 128 --max_target_length 128 --sortish_sampler --per_device_train_batch_size 8 --val_max_target_length 128 --deepspeed ds_config.json --num_train_epochs 1 --eval_steps 25000 --warmup_steps 500 --overwrite_output_dir
(Here please find the script: https://github.com/huggingface/transformers/blob/master/examples/seq2seq/run_seq2seq.py)
If you do not pass max_train_samples in above command to load the full dataset, then I get memory issue on a gpu with 24 GigBytes of memory.
I need to train large-scale mt5 model on large-scale datasets of wikipedia (multiple of them concatenated or other datasets in multiple languages like OPUS), could you help me how I can avoid loading the full data into memory? to make the scripts not related to data size?
In above example, I was hoping the script could work without relying on dataset size, so I can still train the model without subsampling training set.
thank you so much @lhoestq for your great help in advance
| 208
|
How to not load huggingface datasets into memory
Hi
I am running this example from transformers library version 4.3.3:
(Here is the full documentation https://github.com/huggingface/transformers/issues/8771 but the running command should work out of the box)
USE_TF=0 deepspeed run_seq2seq.py --model_name_or_path google/mt5-base --dataset_name wmt16 --dataset_config_name ro-en --source_prefix "translate English to Romanian: " --task translation_en_to_ro --output_dir /test/test_large --do_train --do_eval --predict_with_generate --max_train_samples 500 --max_val_samples 500 --max_source_length 128 --max_target_length 128 --sortish_sampler --per_device_train_batch_size 8 --val_max_target_length 128 --deepspeed ds_config.json --num_train_epochs 1 --eval_steps 25000 --warmup_steps 500 --overwrite_output_dir
(Here please find the script: https://github.com/huggingface/transformers/blob/master/examples/seq2seq/run_seq2seq.py)
If you do not pass max_train_samples in above command to load the full dataset, then I get memory issue on a gpu with 24 GigBytes of memory.
I need to train large-scale mt5 model on large-scale datasets of wikipedia (multiple of them concatenated or other datasets in multiple languages like OPUS), could you help me how I can avoid loading the full data into memory? to make the scripts not related to data size?
In above example, I was hoping the script could work without relying on dataset size, so I can still train the model without subsampling training set.
thank you so much @lhoestq for your great help in advance
The `datastets` library doesn't load datasets into memory. Therefore you can load a dataset that is terabytes big without filling up your RAM.
The only thing that's loaded into memory during training is the batch used in the training step.
So as long as your model works with batch_size = X, then you can load an even bigger dataset and it will work as well with the same batch_size.
Note that you still have to take into account that some batches take more memory than others, depending on the texts lengths. If it works for a batch with batch_size = X and with texts of maximum length, then it will work for all batches.
In your case I guess that there are a few long sentences in the dataset. For those long sentences you get a memory error on your GPU because they're too long. By passing `max_train_samples` you may have taken a subset of the dataset that only contain short sentences. That's probably why in your case it worked only when you set `max_train_samples`.
I'd suggest you to reduce the batch size so that the batches with long sentences can be loaded on the GPU.
Let me know if that helps or if you have other questions
|
[
-0.15187768638134003,
-0.514714777469635,
0.03321659192442894,
0.4974530041217804,
0.5210763216018677,
0.013915181159973145,
0.11802653223276138,
0.23573383688926697,
0.4079464375972748,
0.18799620866775513,
0.007618934381753206,
-0.20288385450839996,
-0.28504678606987,
0.34070295095443726,
0.08864233642816544,
-0.10324947535991669,
0.05328204482793808,
0.08662509173154831,
-0.5714516639709473,
0.05235006660223007,
-0.2737419009208679,
-0.016126614063978195,
0.015972131863236427,
-0.36415690183639526,
-0.3886547386646271,
0.16008852422237396,
0.06248687952756882,
0.11862457543611526,
-0.009863506071269512,
-0.07142031192779541,
0.142812117934227,
-0.03939500078558922,
0.17701725661754608,
0.4372493028640747,
-0.00012698220962192863,
0.10796455293893814,
0.1380947232246399,
-0.3148231506347656,
-0.030640514567494392,
-0.03222977742552757,
-0.004192469175904989,
-0.2059282809495926,
0.28096070885658264,
-0.17894110083580017,
-0.1503947377204895,
0.12923939526081085,
-0.004397057928144932,
-0.17683029174804688,
0.6732682585716248,
0.0866893082857132,
0.058953311294317245,
0.15354131162166595,
-0.245238795876503,
0.16674409806728363,
0.15763424336910248,
0.19760861992835999,
0.05862358212471008,
0.11640053242444992,
-0.10491622984409332,
0.10343325138092041,
0.030460722744464874,
0.3367854654788971,
-0.2480969876050949,
-0.12710405886173248,
0.4123440086841583,
0.0033178008161485195,
0.017605725675821304,
-0.4697834849357605,
0.10207826644182205,
0.2507309019565582,
0.4073405861854553,
-0.2239229679107666,
-0.21384358406066895,
-0.2794681787490845,
-0.34624868631362915,
-0.2446088194847107,
0.13702723383903503,
0.30818551778793335,
-0.14336906373500824,
0.21125304698944092,
-0.5356801748275757,
-0.34743165969848633,
-0.11709553748369217,
-0.039161745458841324,
0.06109514459967613,
-0.1411518156528473,
-0.11476839333772659,
0.11860880255699158,
0.4361449182033539,
-0.1669548600912094,
-0.33585792779922485,
-0.0003862943849526346,
0.17075127363204956,
0.22306814789772034,
-0.5019474625587463,
-0.3163248300552368,
-0.06577380746603012,
-0.10572618991136551,
0.47210973501205444,
0.12158497422933578,
-0.07961063832044601,
0.09369992464780807,
0.32991018891334534,
0.009159005247056484,
0.2849011719226837,
0.15744644403457642,
-0.3003249168395996,
-0.007296333089470863,
0.29694947600364685,
0.14906863868236542,
0.14342933893203735,
-0.11053230613470078,
-0.033380135893821716,
-0.05073830857872963,
-0.20474958419799805,
-0.25915417075157166,
0.28458476066589355,
-0.2782018482685089,
0.07945925742387772,
-0.08929979801177979,
-0.0343102291226387,
0.17012611031532288,
-0.06992343068122864,
0.5180568099021912,
-0.08270540833473206,
0.3102346658706665,
-0.007110522128641605,
0.13159695267677307,
-0.43387389183044434,
0.014576232992112637,
-0.19417984783649445,
0.2515982985496521,
-0.22401893138885498,
0.3322905898094177,
0.4116665720939636,
0.049927905201911926,
0.37970444560050964,
-0.09566906839609146,
0.0674581229686737,
-0.0763128250837326,
0.0796646699309349,
-0.3235818147659302,
0.12391332536935806,
0.4826918840408325,
0.035579606890678406,
0.19510672986507416,
0.0725170373916626,
0.17660313844680786,
-0.21363238990306854,
0.39688751101493835,
-0.23073071241378784,
-0.2883968949317932,
0.3630964756011963,
0.005372524261474609,
-0.42092832922935486,
0.2904190421104431,
-0.5321804285049438,
0.2664291560649872,
0.12232870608568192,
0.2021842747926712,
0.05576309934258461,
0.07896775007247925,
-0.39844760298728943,
-0.08628036081790924,
0.48739463090896606,
0.8010210990905762,
-0.1476050764322281,
-0.39311131834983826,
0.13294434547424316,
-0.10045818239450455,
0.19597801566123962,
0.5725111365318298,
-0.014279845170676708,
0.01484869234263897,
-0.014456421136856079,
-0.21403510868549347,
0.07092668861150742,
-0.141577810049057,
-0.3544338047504425,
0.28427037596702576,
-0.17089629173278809,
0.17428265511989594,
0.25948718190193176,
0.24584083259105682,
-0.0926852598786354,
0.1357041597366333,
-0.10187951475381851,
0.37446728348731995,
0.06811388581991196,
0.22523492574691772,
-0.1271796077489853,
-0.5379963517189026,
0.20407867431640625,
0.21697036921977997,
0.20226317644119263,
0.08728832751512527,
-0.13509374856948853,
0.6384109854698181,
0.023845301941037178,
-0.12332256883382797,
0.15025553107261658,
0.5214675664901733,
-0.029772363603115082,
-0.09621497243642807,
-0.010851344093680382,
-0.06479304283857346,
-0.5006038546562195,
0.19892653822898865,
-0.058680202811956406,
0.044442061334848404,
-0.1048358604311943,
0.0006818340625613928,
0.057362623512744904,
-0.12732583284378052,
0.09569983929395676,
-0.17718636989593506,
-0.12119332700967789,
-0.2916914224624634,
0.15145465731620789,
-0.13470245897769928,
-0.09034644067287445,
0.14886264503002167,
-0.0584074966609478,
0.2972840666770935,
-0.6091175675392151,
-0.10886771231889725,
0.11029151827096939,
-0.12348701804876328,
0.025996018201112747,
0.12480352818965912,
-0.08821509033441544,
-0.08458539843559265,
0.10677850991487503,
0.2415028214454651,
0.11242000758647919,
0.017839079722762108,
-0.22226449847221375,
0.6307311058044434,
0.243430957198143,
-0.31276994943618774,
0.12051257491111755,
0.0697665810585022,
0.12512707710266113,
0.025260571390390396,
-0.1785951852798462,
0.19503971934318542,
-0.13313782215118408,
0.348458468914032,
0.0058565204963088036,
-0.2301434874534607,
-0.035879939794540405,
-0.2495763748884201,
-0.12386544048786163,
-0.3175208270549774,
0.22977079451084137,
0.3747284710407257,
0.31595146656036377,
0.3822621703147888,
-0.13016429543495178,
-0.6248906254768372,
0.4318449795246124,
-0.001992422854527831,
0.007370554376393557,
0.14880649745464325,
-0.44522878527641296,
-0.08009184151887894,
-0.059690650552511215,
-0.37476539611816406,
0.20527949929237366,
0.22007568180561066,
-0.013582929968833923,
0.1306920051574707,
0.40825212001800537,
-0.05133703723549843,
0.16274943947792053,
0.3493758738040924,
0.1488744467496872,
-0.05484417825937271,
-0.03125985711812973,
-0.15416011214256287,
-0.19042140245437622,
0.21000854671001434,
0.027009978890419006,
-0.25558754801750183,
-0.4284452199935913,
0.05460101366043091,
-0.18637850880622864,
-0.15334515273571014,
-0.19714432954788208,
0.2054145187139511,
-0.4946776330471039,
0.11873726546764374,
-0.015111157670617104,
0.17512856423854828,
-0.06624327600002289,
0.1509777158498764,
0.19968025386333466,
0.441235214471817,
0.19188179075717926,
-0.4602295458316803,
-0.0057206726633012295,
0.003894181689247489,
0.02922322228550911,
-0.0567874051630497,
0.1562744826078415,
-0.1057104840874672,
0.20353840291500092,
0.08142749965190887,
-0.25941404700279236,
0.06312906742095947,
-0.11288689821958542,
0.24161775410175323,
-0.13432525098323822,
0.30477190017700195,
-0.09087038785219193,
0.2014535516500473,
0.18460331857204437,
0.07115986943244934,
-0.10574238747358322,
-0.14959245920181274,
-0.032635901123285294,
0.14212241768836975,
0.09933055937290192,
0.3976775109767914,
-0.3058060109615326,
-0.20627066493034363,
-0.0010531290899962187,
-0.37368690967559814,
0.42154526710510254,
0.10117966681718826,
-0.0064920587465167046,
0.35712930560112,
0.276991605758667,
0.08486232161521912,
-0.19523848593235016,
0.2956119477748871,
-0.09051033109426498,
-0.20001354813575745,
0.4355368912220001,
0.02014137990772724,
-0.22682607173919678,
0.20559819042682648,
-0.0464501716196537,
0.1957232803106308,
0.2565191984176636,
-0.6173762083053589,
-0.0449284203350544,
-0.24506647884845734,
-0.32395830750465393,
-0.05271904915571213,
0.22975444793701172,
0.2915317118167877,
-0.3330809473991394,
0.0619436651468277,
0.041418131440877914,
-0.12229347974061966,
0.0963732972741127,
-0.04288462921977043,
0.20263636112213135,
0.20029784739017487,
0.5743066668510437,
-0.09091511368751526,
0.9312586784362793,
0.1241060420870781,
0.18048891425132751,
0.0755290687084198,
-0.037401944398880005,
0.25255224108695984,
-0.13143648207187653,
0.015397676266729832,
-0.11865556240081787,
-0.005834643729031086,
-0.14306938648223877,
0.26577287912368774,
-0.02550412341952324,
0.19750049710273743,
-0.24316982924938202,
0.044229406863451004,
0.15303756296634674,
-0.29624393582344055,
0.35519862174987793,
-0.006709844805300236,
0.12537455558776855,
-0.04032691568136215,
-0.025875283405184746,
0.010809759609401226,
-0.24129517376422882,
0.012306079268455505,
0.15309375524520874,
0.24567240476608276,
0.195731982588768,
-0.19068725407123566,
-0.07605504989624023,
-0.6258141994476318,
0.0005801964434795082,
-0.196940079331398,
0.09938663244247437,
-0.05860394984483719,
-0.3489123284816742,
-0.027702590450644493,
0.1523524671792984,
0.6768872737884521,
0.253206342458725,
-0.1729898899793625,
-0.14874273538589478,
-0.7294564843177795,
-0.40251705050468445,
-0.00959622859954834,
-0.22916027903556824,
-0.12381594628095627,
0.07381083816289902,
0.3609039783477783,
-0.391492635011673,
-0.2916172444820404,
0.07330598682165146,
0.2556802034378052,
-0.27276623249053955,
-0.15386717021465302,
-0.5318127274513245,
-0.09207246452569962,
-0.43766114115715027,
0.0552050918340683,
0.3393109440803528,
0.08707286417484283,
-0.19919370114803314,
0.04102922976016998,
-0.0185953788459301,
-0.09400645643472672,
0.4132975935935974,
-0.04334646463394165,
0.2744603753089905,
-0.0019251592457294464,
-0.013676948845386505,
0.1732081025838852,
0.11165609955787659,
-0.019367743283510208,
0.6520426869392395,
0.3140738904476166,
-0.1921580284833908,
0.19880811870098114,
0.21868866682052612,
0.4826217293739319,
0.21931807696819305,
-0.13577115535736084,
0.1231536865234375,
0.13721208274364471,
0.28708416223526,
-0.4672873914241791,
0.3837455213069916,
0.009192259982228279,
-0.09021881222724915,
-0.14644280076026917,
-0.3138219714164734,
0.5189356803894043,
0.3223372995853424,
0.15450169146060944,
-0.0994463637471199,
0.0033895622473210096,
-0.28735974431037903,
0.17863555252552032,
0.1093040183186531,
0.9667980670928955,
-0.2780705690383911,
0.42638352513313293,
0.09635098278522491,
0.31568068265914917,
0.6530100703239441,
-0.2819080650806427,
0.21292860805988312,
-0.17297397553920746,
-0.3770298659801483,
0.0020609560888260603,
-0.23522962629795074,
-0.026804069057106972,
0.2167581468820572,
-0.07668154686689377,
0.4903029203414917,
0.024577688425779343,
0.20996318757534027,
-0.025812607258558273,
0.21987582743167877,
0.1225685104727745,
-0.5316356420516968,
-0.36665183305740356,
-0.04115396365523338,
-0.03307053819298744,
0.023753942921757698,
-0.01482745073735714,
0.02827792800962925,
0.22341987490653992,
-0.3717513978481293,
0.09538908302783966,
0.05725754797458649,
-0.47549811005592346,
-0.03442296013236046,
-0.11708284914493561,
0.018239326775074005,
0.3291778564453125,
0.21114115417003632,
-0.08042335510253906,
0.34483441710472107,
-0.22168050706386566,
-0.2169555276632309,
-0.3277765214443207,
-0.022613823413848877,
-0.2501814365386963,
0.18602792918682098,
0.27708420157432556,
0.07318912446498871,
-0.09088703244924545,
0.1434045135974884,
-0.02902591973543167,
-0.02907618321478367,
-0.05414973571896553,
-0.2843363583087921,
-0.08970504999160767,
-0.26743918657302856,
-0.20328907668590546,
0.033483605831861496,
0.02847301959991455,
0.18634139001369476,
0.008672176860272884,
0.05323479697108269,
-0.20109811425209045,
0.15198777616024017,
0.12267767637968063,
-0.49706438183784485,
-0.1683170348405838,
0.6233403086662292,
0.08270403742790222,
-0.05501534044742584,
0.40000438690185547,
0.2361922711133957,
-0.02428576722741127,
-0.11131209135055542,
-0.10814499855041504,
0.3746092915534973,
-0.3981398046016693,
0.17011958360671997,
0.14485269784927368,
-0.19618818163871765,
-0.28915002942085266,
0.13200876116752625,
0.030323723331093788,
-0.268139511346817,
-0.0012035066029056907,
-0.014727472327649593,
-0.5990898609161377,
0.5723324418067932,
-0.156962588429451,
0.22246885299682617,
0.21935267746448517,
0.01366971805691719,
-0.17396093904972076,
0.23256634175777435,
-0.16299289464950562,
-0.07492267340421677,
-0.30243390798568726,
0.050944894552230835,
0.18448495864868164,
-0.14532020688056946,
0.24247927963733673,
0.09739692509174347,
-0.08831438422203064,
0.13873597979545593,
-0.20381829142570496,
-0.11814006417989731,
0.0385502390563488,
0.2056160867214203,
0.010196042247116566,
0.03452131152153015,
-0.05671294778585434,
-0.03008848801255226,
-0.04459202289581299,
-0.21337544918060303,
0.6652677655220032,
0.055938608944416046,
0.1515231728553772,
0.20133361220359802,
0.10880738496780396,
0.029383840039372444,
-0.43033039569854736,
0.1400621384382248,
0.015727762132883072,
0.16910870373249054,
0.2504599094390869,
0.08288437128067017,
0.10037025064229965,
-0.031039142981171608,
-0.4541803300380707,
0.06291346997022629,
0.46005117893218994,
-0.1720423847436905,
-0.08075539767742157,
-0.08805149793624878,
-0.23820440471172333,
0.21629644930362701,
0.07308754324913025,
0.2468598335981369,
-0.26933878660202026,
-0.04181990399956703,
0.1638188660144806,
0.023993762210011482,
-0.08638712018728256,
-0.025184376165270805,
0.09913524240255356,
-0.31052160263061523,
0.01915452443063259,
0.6123439073562622,
0.17441977560520172,
0.056627754122018814,
0.08716006577014923,
0.10889675468206406,
0.30702295899391174,
0.10722986608743668,
0.09153126180171967,
0.14319589734077454,
-0.03775008022785187,
0.007317748386412859,
0.26314643025398254,
0.4207814335823059,
0.34982120990753174,
0.2286442518234253,
-0.03360893204808235,
0.3077256679534912,
-0.5739445090293884,
0.22163397073745728,
-0.23410741984844208,
-0.4970014691352844,
-0.3280584514141083,
0.40785104036331177,
-0.17678819596767426,
0.04547000676393509,
-0.4919367730617523,
0.09693140536546707,
0.2620435655117035,
-0.15572847425937653,
-0.2288413792848587,
0.18975774943828583,
-0.19932100176811218,
-0.14960773289203644,
0.14616122841835022,
-0.000746321224141866,
-0.3564021587371826,
0.2511366009712219,
0.05283401906490326,
-0.36491602659225464,
0.3265799880027771,
0.12205922603607178,
-0.10097699612379074,
0.14105361700057983,
-0.052826207131147385,
0.40611517429351807,
-0.08528004586696625,
-0.289326012134552,
0.05627596005797386,
0.14396588504314423,
0.10410641133785248,
0.021318579092621803,
0.11774450540542603,
0.06370977312326431,
0.030446995049715042,
-0.08800268173217773,
-0.017703017219901085,
0.23209547996520996,
-0.018174709752202034,
-0.11799575388431549,
0.20107051730155945,
0.0862523540854454,
0.4885614216327667,
0.04141189157962799,
-0.04120418056845665,
-0.007316322065889835,
-0.12236136943101883,
-0.006367933005094528,
0.1090928316116333,
-0.4597761332988739,
0.14224028587341309,
0.2558186650276184,
0.02643989399075508,
-0.21834683418273926,
0.152957484126091,
-0.5634781718254089,
-0.0025331517681479454,
0.39736443758010864,
-0.23949691653251648,
0.08164826035499573,
0.05703847482800484,
-0.012404659762978554,
-0.2247118055820465,
0.7063220739364624,
0.1493247002363205,
0.10099495947360992,
-0.4904627799987793,
0.08786965161561966,
-0.2523307800292969,
0.01169718150049448,
-0.05647999048233032,
0.3043070137500763,
0.15084326267242432,
0.21247589588165283,
-0.056299686431884766,
0.22392325103282928,
-0.5081440210342407,
-0.07571269571781158,
-0.3126005232334137,
-0.1842355579137802,
-0.09842073917388916,
-0.15483468770980835,
-0.4467175304889679,
0.29845452308654785,
0.10489245504140854,
-0.16870802640914917,
0.09458141773939133,
-0.1009216159582138,
-0.23752880096435547,
-0.07834059000015259,
0.05724097043275833,
-0.03779307007789612,
0.3225003778934479,
0.23684468865394592,
0.1222197562456131,
0.20721927285194397,
-0.16052721440792084,
-0.15557549893856049,
-0.14739447832107544,
-0.09276198595762253,
-0.25736507773399353,
-0.21156804263591766,
-0.07414019107818604,
0.20127877593040466,
-0.3087122440338135,
0.07079162448644638,
-0.2480507791042328,
0.07432261109352112,
-0.03390774503350258,
-0.22583948075771332,
0.06301868706941605,
-0.11844462901353836,
-0.0050119818188250065,
0.29038384556770325,
0.129593163728714,
0.3474196493625641,
-0.1978289633989334,
0.01905727945268154,
-0.17499327659606934,
-0.06002228334546089,
0.4449533522129059,
-0.2349964827299118,
-0.12134633958339691,
-0.2829088866710663,
0.22633790969848633,
-0.0986078754067421,
-0.11315739154815674,
-0.5062587857246399,
0.19411234557628632,
0.057232048362493515,
0.1676398068666458,
-0.43046140670776367,
0.46600961685180664,
-0.1316935271024704,
-0.1142582967877388,
-0.2120937556028366,
0.19248215854167938,
0.009714308194816113,
-0.08529789745807648,
-0.1749821901321411,
-0.4122219383716583
] |
https://github.com/huggingface/datasets/issues/2005
|
Setting to torch format not working with torchvision and MNIST
|
Adding to the previous information, I think `torch.utils.data.DataLoader` is doing some conversion.
What I tried:
```python
train_dataset = load_dataset('mnist')
```
I don't use any `map` or `set_format` or any `transform`. I use this directly, and try to load batches using the `DataLoader` with batch size 2, I get an output like this for the `image`:
```
[[tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor...
```
For `label`, it works fine:
```
tensor([7, 6])
```
Note that I didn't specify conversion to torch tensors anywhere.
Basically, there are two problems here:
1. `dataset.map` doesn't return tensor type objects, even though it uses the transforms, the grayscale conversion in transform was done, but the output was lists only.
2. The `DataLoader` performs its own conversion, which may be not desired.
I understand that we can't change `DataLoader` because it is a torch functionality, however, is there a way we can handle image data to allow using it with torch `DataLoader` and `torchvision` properly?
I think if the `image` was a torch tensor (N,H,W,C), or a list of torch tensors (H,W,C), before it is passed to `DataLoader`, then we might not face this issue.
|
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
| 202
|
Setting to torch format not working with torchvision and MNIST
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
Adding to the previous information, I think `torch.utils.data.DataLoader` is doing some conversion.
What I tried:
```python
train_dataset = load_dataset('mnist')
```
I don't use any `map` or `set_format` or any `transform`. I use this directly, and try to load batches using the `DataLoader` with batch size 2, I get an output like this for the `image`:
```
[[tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor([0, 0]), tensor...
```
For `label`, it works fine:
```
tensor([7, 6])
```
Note that I didn't specify conversion to torch tensors anywhere.
Basically, there are two problems here:
1. `dataset.map` doesn't return tensor type objects, even though it uses the transforms, the grayscale conversion in transform was done, but the output was lists only.
2. The `DataLoader` performs its own conversion, which may be not desired.
I understand that we can't change `DataLoader` because it is a torch functionality, however, is there a way we can handle image data to allow using it with torch `DataLoader` and `torchvision` properly?
I think if the `image` was a torch tensor (N,H,W,C), or a list of torch tensors (H,W,C), before it is passed to `DataLoader`, then we might not face this issue.
|
[
-0.12737570703029633,
-0.35116511583328247,
-0.017932923510670662,
0.35361000895500183,
0.47600212693214417,
0.08871375024318695,
0.7330290675163269,
0.38043445348739624,
0.0655258372426033,
-0.03804275766015053,
-0.11115400493144989,
0.3819511830806732,
-0.232968270778656,
-0.33393388986587524,
0.0351090282201767,
-0.5614945292472839,
0.22258029878139496,
-0.09982749819755554,
-0.28079864382743835,
-0.061347298324108124,
-0.2431342899799347,
0.03548954799771309,
-0.21849703788757324,
-0.1084955632686615,
-0.5479358434677124,
0.04409617930650711,
-0.01955590769648552,
-0.07656845450401306,
-0.06229906901717186,
-0.13918034732341766,
0.12234674394130707,
-0.17449605464935303,
0.4444536864757538,
0.7012933492660522,
-0.00012770107423420995,
0.07030169665813446,
0.364272803068161,
-0.17377816140651703,
0.050000473856925964,
-0.16101454198360443,
0.04004686325788498,
-0.2573828101158142,
0.07277651876211166,
-0.09468385577201843,
-0.22349463403224945,
-0.17084583640098572,
0.09591015428304672,
-0.17902974784374237,
-0.028141988441348076,
0.4191688597202301,
0.07713013887405396,
0.27901145815849304,
0.2466621696949005,
0.1386314481496811,
0.22781182825565338,
0.5182868838310242,
-0.2734377086162567,
-0.056116677820682526,
0.22615014016628265,
0.37547871470451355,
0.12400563061237335,
0.5647351145744324,
-0.29133492708206177,
-0.03623355180025101,
0.266944944858551,
0.1290055513381958,
-0.10145455598831177,
-0.31400567293167114,
0.04915764555335045,
0.08946295082569122,
0.42194435000419617,
-0.1494389921426773,
-0.0807788297533989,
-0.14366267621517181,
-0.14397884905338287,
-0.1273804008960724,
0.040591731667518616,
0.28032049536705017,
-0.07184044271707535,
-0.18723881244659424,
-0.5392423868179321,
0.3052913546562195,
-0.1486240178346634,
0.21315890550613403,
-0.28052353858947754,
-0.00341961532831192,
-0.1381634622812271,
0.29280975461006165,
-0.047119006514549255,
-0.1127130463719368,
0.193081334233284,
-0.1234150230884552,
0.13007473945617676,
-0.009825581684708595,
-0.14363226294517517,
-0.05349101126194,
-0.38960033655166626,
-0.3150123357772827,
-0.20014815032482147,
-0.16026559472084045,
0.16648422181606293,
0.13927561044692993,
-0.11639533191919327,
0.12807147204875946,
0.1826331913471222,
0.26803410053253174,
0.10578341782093048,
0.3207029104232788,
-0.08589301258325577,
-0.2895815074443817,
-0.04691976681351662,
0.08773334324359894,
-0.29622700810432434,
-0.43575266003608704,
0.15453515946865082,
0.325297087430954,
0.24522194266319275,
0.06874252110719681,
0.1298559010028839,
-0.323941171169281,
-0.1089225485920906,
-0.009587236680090427,
0.07522497326135635,
0.2850382924079895,
-0.11867944151163101,
0.2439039945602417,
0.4804830253124237,
0.3972030580043793,
-0.15381820499897003,
0.06956276297569275,
0.025072438642382622,
0.031521398574113846,
-0.4404948055744171,
-0.28569871187210083,
0.15340910851955414,
-0.11777321249246597,
0.10007045418024063,
0.03743145242333412,
0.04641531780362129,
0.10069561749696732,
0.07349712401628494,
-0.18587076663970947,
0.624629020690918,
0.14764760434627533,
-0.1944737732410431,
0.2767927348613739,
0.27090680599212646,
0.5297790765762329,
-0.3042984902858734,
0.25653210282325745,
-0.5095705986022949,
0.06525290012359619,
-0.023092517629265785,
-0.01454417034983635,
0.21865519881248474,
-0.020721379667520523,
-0.212163507938385,
0.015828415751457214,
0.5923123359680176,
-0.08367788791656494,
0.27348753809928894,
-0.5791618227958679,
0.0949634462594986,
-0.19133517146110535,
0.034152254462242126,
0.06366843730211258,
-0.20471493899822235,
-0.05235865339636803,
0.38634437322616577,
0.09194900840520859,
0.3154592216014862,
0.16028200089931488,
0.05108356848359108,
0.0798705592751503,
-0.22535325586795807,
-0.2350505143404007,
0.33632397651672363,
-0.3768565356731415,
0.09203927218914032,
-0.017693262547254562,
0.09388009458780289,
-0.06380412727594376,
0.11201874911785126,
0.3361783027648926,
0.032600611448287964,
-0.12800158560276031,
0.02944803424179554,
0.1963144689798355,
-0.16618186235427856,
0.14028693735599518,
0.07735977321863174,
0.191302090883255,
0.19337399303913116,
0.035006530582904816,
-0.015683665871620178,
0.20765356719493866,
-0.22167105972766876,
0.17757576704025269,
-0.05428007245063782,
-0.07471297681331635,
0.07117706537246704,
0.04037829488515854,
-0.36989060044288635,
-0.012196503579616547,
-0.04746989905834198,
0.18646599352359772,
-0.23310047388076782,
-0.04872153326869011,
0.023633727803826332,
0.0822167620062828,
0.05827893689274788,
0.04792506992816925,
0.004977794364094734,
-0.19195637106895447,
-0.18220625817775726,
-0.13902683556079865,
-0.003242077771574259,
0.09221076220273972,
-0.2094762921333313,
-0.2617236077785492,
-0.05234289541840553,
-0.12324877083301544,
0.17830325663089752,
0.05883768945932388,
-0.35903725028038025,
0.05102585256099701,
0.019273217767477036,
-0.36533084511756897,
-0.20136012136936188,
0.17339138686656952,
0.2676694989204407,
-0.09962080419063568,
-0.042235422879457474,
0.19160348176956177,
0.06328949332237244,
0.1146327331662178,
-0.5482736825942993,
0.08346544206142426,
0.17784206569194794,
-0.24697065353393555,
0.20439080893993378,
0.2162802666425705,
0.14853428304195404,
-0.2755032479763031,
-0.19603464007377625,
0.4387865960597992,
0.16040943562984467,
0.315912663936615,
-0.330026239156723,
0.1161012351512909,
-0.07264634966850281,
-0.03940199315547943,
-0.190633624792099,
-0.040807757526636124,
-0.2772822380065918,
0.07302431017160416,
-0.1318601816892624,
0.012982583604753017,
-0.45691853761672974,
-0.04493805393576622,
0.2962622046470642,
0.08876386284828186,
0.17587202787399292,
-0.0012165154330432415,
-0.39984655380249023,
0.2133127748966217,
0.17712648212909698,
-0.6013534069061279,
0.29783862829208374,
-0.004362158942967653,
0.18920691311359406,
-0.10501903295516968,
0.095583975315094,
-0.16254277527332306,
0.2484450340270996,
0.114042729139328,
0.09074881672859192,
-0.19946494698524475,
0.14185264706611633,
-0.10792634636163712,
0.02684619091451168,
0.02637050859630108,
-0.1406290978193283,
-0.23369313776493073,
-0.3589506447315216,
0.2713833451271057,
-0.16618283092975616,
-0.1345188319683075,
-0.40185487270355225,
-0.26218584179878235,
0.0360567644238472,
-0.07400472462177277,
-0.08233476430177689,
0.15075814723968506,
0.18556828796863556,
0.19043514132499695,
0.2634184956550598,
-0.18189533054828644,
0.37431660294532776,
-0.4130289554595947,
-0.035354580730199814,
-0.07500956952571869,
-0.2867961525917053,
-0.09916506707668304,
0.08965617418289185,
-0.5234104990959167,
0.0914849191904068,
-0.22899025678634644,
-0.09319118410348892,
-0.250176340341568,
0.01354741770774126,
0.14182190597057343,
-0.2678496539592743,
-0.2850019037723541,
0.30859076976776123,
0.1939285397529602,
-0.14248299598693848,
0.0406617745757103,
0.266352117061615,
0.01030689850449562,
0.0469016432762146,
0.1537831574678421,
-0.08962060511112213,
0.11655968427658081,
-0.06329794228076935,
-0.17674095928668976,
-0.09661899507045746,
-0.0750613883137703,
-0.0704168975353241,
-0.02175893634557724,
0.06337761878967285,
0.34625765681266785,
0.3721839189529419,
-0.08989089727401733,
-0.05204273387789726,
0.03560885041952133,
0.06296458095312119,
-0.39768847823143005,
0.522503137588501,
-0.22615385055541992,
-0.3608255684375763,
0.1192026361823082,
0.02385600470006466,
0.06514681875705719,
0.4862675368785858,
0.06052308529615402,
0.04973135143518448,
0.011782038025557995,
-0.07894453406333923,
0.252593070268631,
0.22119753062725067,
0.35101956129074097,
-0.09112474322319031,
0.019166184589266777,
-0.16470706462860107,
0.015416686423122883,
-0.10187150537967682,
-0.06325522065162659,
0.6088864803314209,
0.1850852370262146,
0.23994265496730804,
0.09925788640975952,
0.6996644139289856,
-0.0611368790268898,
-0.7380953431129456,
0.21680711209774017,
-0.2425093650817871,
0.1921667605638504,
-0.1181219145655632,
-0.3539586067199707,
0.3988560140132904,
-0.20941965281963348,
0.06437405943870544,
-0.08596731722354889,
-0.024907300248742104,
-0.2391580194234848,
-0.09022410213947296,
0.3573613464832306,
-0.3172072470188141,
-0.15857382118701935,
0.4044298827648163,
-0.14470174908638,
0.27637261152267456,
-0.2313428670167923,
0.32458868622779846,
-0.26092591881752014,
-0.21379251778125763,
0.06005644053220749,
0.4487727880477905,
0.13851283490657806,
0.04172501713037491,
-0.3342851400375366,
-0.21669772267341614,
-0.14322695136070251,
0.3568277955055237,
0.11957772076129913,
0.5672698616981506,
-0.09803582727909088,
-0.07446420937776566,
0.10155694931745529,
0.2413697987794876,
0.8307591676712036,
0.04555749520659447,
-0.09045996516942978,
0.15144257247447968,
-0.3478345572948456,
-0.45497843623161316,
-0.1022297739982605,
-0.05141737684607506,
0.0906815379858017,
0.1716911345720291,
0.120386503636837,
-0.09105350077152252,
-0.1833338737487793,
-0.005832722410559654,
0.19555459916591644,
-0.05512532591819763,
0.03471822291612625,
-0.2269120067358017,
0.05875823274254799,
-0.12965017557144165,
-0.15528295934200287,
0.2211824208498001,
0.029675675556063652,
0.005161960609257221,
-0.3081284463405609,
-0.32623085379600525,
-0.12669925391674042,
0.18248170614242554,
-0.13301241397857666,
0.41106799244880676,
0.09925045818090439,
-0.17808569967746735,
0.07690616697072983,
0.5561061501502991,
0.41840389370918274,
-0.038939449936151505,
-0.1187736913561821,
0.08064316213130951,
0.29311075806617737,
0.1064324676990509,
0.3002043068408966,
0.3208223879337311,
-0.06187339872121811,
-0.4396645724773407,
-0.22684842348098755,
-0.1938147097826004,
-0.3305322825908661,
0.3972935676574707,
0.4080634117126465,
0.0989358127117157,
-0.49535518884658813,
-0.4921706020832062,
0.38619035482406616,
0.29371973872184753,
0.19583012163639069,
0.20459096133708954,
-0.5417592525482178,
-0.40096795558929443,
0.07817897200584412,
0.46624186635017395,
0.8556221723556519,
-0.03707917407155037,
0.3702821433544159,
0.03156490623950958,
0.010806628502905369,
0.17210309207439423,
-0.0018883941229432821,
0.4117940664291382,
-0.35428154468536377,
0.1392892599105835,
-0.1648537665605545,
-0.3125496804714203,
0.25252386927604675,
-0.060203149914741516,
-0.24397021532058716,
0.0425368957221508,
-0.34947165846824646,
0.19361911714076996,
-0.12569408118724823,
-0.08285272121429443,
-0.04982588440179825,
-0.4714173376560211,
0.18787355720996857,
0.015451944433152676,
-0.08251404762268066,
0.2617388367652893,
0.1111610159277916,
-0.16362012922763824,
-0.3798595070838928,
0.06169590353965759,
-0.07622290402650833,
-0.015012153424322605,
-0.24596934020519257,
-0.16324220597743988,
-0.024310031905770302,
-0.7298651337623596,
0.05867947265505791,
0.49615857005119324,
0.33455440402030945,
-0.16056616604328156,
-0.04783592000603676,
0.13964177668094635,
0.44384774565696716,
0.1628999412059784,
-0.09901812672615051,
-0.34018367528915405,
0.2853395342826843,
0.09737548977136612,
0.18433162569999695,
0.10863793641328812,
0.06814868003129959,
0.21052005887031555,
-0.5777892470359802,
0.03725156560540199,
0.306029736995697,
-0.34495052695274353,
-0.32298538088798523,
-0.19845089316368103,
0.04918496683239937,
0.038163524121046066,
0.028618529438972473,
0.1244889497756958,
-0.03890340402722359,
0.20724399387836456,
-0.04151169955730438,
-0.22646178305149078,
0.13289012014865875,
0.4523313045501709,
0.1129847913980484,
-0.35004591941833496,
0.3907565176486969,
0.3549588918685913,
-0.04477759078145027,
-0.0437440387904644,
0.4166942536830902,
0.6353183388710022,
-0.3456965386867523,
0.09949697554111481,
-0.10271568596363068,
-0.1569867581129074,
-0.011073986068367958,
0.5430944561958313,
-0.23431730270385742,
-0.13097745180130005,
-0.23895679414272308,
-0.04081777483224869,
-0.4308936297893524,
0.010813296772539616,
-0.31629839539527893,
0.45663103461265564,
-0.04322148859500885,
0.36270955204963684,
0.21050532162189484,
-0.18734773993492126,
-0.14413577318191528,
-0.2586488127708435,
0.17234940826892853,
0.36793309450149536,
-0.24718208611011505,
0.21876199543476105,
-0.12695848941802979,
-0.12202277034521103,
-0.03625253215432167,
0.026030853390693665,
-0.24973903596401215,
-0.03339084982872009,
-0.057677797973155975,
0.17730605602264404,
0.06661400943994522,
-0.11354026198387146,
-0.0735473707318306,
-0.1736702024936676,
-0.13858070969581604,
-0.2681717276573181,
-0.03771835193037987,
0.11092091351747513,
-0.11599960178136826,
0.35316169261932373,
-0.1783653348684311,
0.23122534155845642,
0.3186754882335663,
-0.2699998617172241,
-0.10262306034564972,
0.03587070479989052,
0.22296245396137238,
0.06005034223198891,
0.004532386548817158,
-0.06155698746442795,
-0.27723708748817444,
0.11259099841117859,
0.16520337760448456,
0.25497496128082275,
0.204617440700531,
-0.09999638050794601,
0.10917830467224121,
-0.043806593865156174,
0.2041834443807602,
0.10125498473644257,
-0.1718701869249344,
-0.05082887038588524,
0.060372959822416306,
-0.007623572368174791,
0.1006215363740921,
0.14499858021736145,
0.0388689860701561,
0.12528176605701447,
-0.08346445858478546,
0.2755776643753052,
0.066558837890625,
0.3113951086997986,
-0.37050771713256836,
0.04514264315366745,
0.41785672307014465,
-0.24107347428798676,
0.23508600890636444,
0.4640142619609833,
0.014800028875470161,
0.19304944574832916,
0.2907048463821411,
0.10934361070394516,
-0.11870168149471283,
0.32269686460494995,
0.3945169150829315,
0.8204306960105896,
0.5895959734916687,
0.08376991748809814,
0.27460289001464844,
0.09925739467144012,
-0.15360744297504425,
-0.2072506844997406,
0.2358231246471405,
0.39196810126304626,
0.01886700838804245,
0.18569335341453552,
-0.24079890549182892,
-0.48712414503097534,
0.2258816957473755,
0.12177547812461853,
-0.1946176141500473,
-0.0822240486741066,
-0.6648061871528625,
0.011875501833856106,
0.1358264982700348,
-0.18665948510169983,
-0.17971482872962952,
-0.050137199461460114,
0.2205909788608551,
0.25975432991981506,
-0.10322102159261703,
-0.16091208159923553,
-0.17247481644153595,
0.0691017135977745,
0.0375286303460598,
-0.00732995243743062,
0.16975809633731842,
-0.13684530556201935,
0.16176103055477142,
0.24482403695583344,
0.1969076693058014,
0.2849538326263428,
0.4870804250240326,
-0.16817134618759155,
-0.1598939746618271,
-0.01055342610925436,
-0.19236592948436737,
0.08990199863910675,
0.06671139597892761,
0.03153395652770996,
-0.1532081961631775,
-0.014956638216972351,
0.008462493307888508,
0.038628142327070236,
0.03146027401089668,
-0.09408091753721237,
-0.21825915575027466,
0.1676250845193863,
0.30557534098625183,
-0.36377817392349243,
-0.1490931510925293,
-0.09989839047193527,
-0.24665571749210358,
-0.3483101725578308,
-0.26553383469581604,
0.532738447189331,
0.027895571663975716,
0.128010094165802,
0.14216819405555725,
-0.042159657925367355,
0.04878508672118187,
0.15741172432899475,
-0.12155678123235703,
0.07757643610239029,
-0.15409401059150696,
0.1359660029411316,
-0.08580464869737625,
0.03191022947430611,
0.11847498267889023,
-0.3834477365016937,
-0.01884886994957924,
-0.03916456550359726,
0.24254119396209717,
0.0646747574210167,
0.20209071040153503,
-0.09834738820791245,
0.49874529242515564,
0.6146568655967712,
-0.1336161345243454,
-0.1414812207221985,
-0.13041949272155762,
0.37065133452415466,
0.07330799847841263,
-0.07746578752994537,
0.021921372041106224,
0.10242687165737152,
0.006506701465696096,
-0.3420656621456146,
-0.25549033284187317,
-0.01998201757669449,
0.3041451573371887,
0.35128214955329895,
0.09328848868608475,
0.3203136622905731,
-0.01922053098678589,
0.04841059818863869,
-0.24113258719444275,
0.05041498318314552,
-0.1276015043258667,
0.00967057328671217,
-0.022802552208304405,
0.5810174345970154,
-0.22440259158611298,
-0.059341490268707275,
-0.41364961862564087,
0.4290265738964081,
0.09053075313568115,
-0.3388557434082031,
-0.08051913231611252,
0.3583991527557373,
-0.3173205554485321,
-0.20108820497989655,
0.22619524598121643,
0.4100225567817688,
0.1513604074716568,
0.19435736536979675,
-0.5254402160644531,
-0.40691110491752625,
0.44720226526260376,
-0.44170674681663513,
-0.5069129467010498,
0.02907400205731392,
-0.313393771648407,
0.06790363043546677,
0.49642351269721985,
-0.47104936838150024,
-0.14913403987884521,
0.0015055699041113257,
-0.08082757890224457,
-0.09160425513982773,
-0.09819342195987701,
0.2610405683517456,
0.015111553482711315,
-0.25184622406959534,
0.17900702357292175,
0.1764499396085739,
-0.0228157639503479,
-0.42041638493537903,
-0.27535977959632874
] |
https://github.com/huggingface/datasets/issues/2005
|
Setting to torch format not working with torchvision and MNIST
|
What's the feature types of your new dataset after `.map` ?
Can you try with adding `features=` in the `.map` call in order to set the "image" feature type to `Array2D` ?
The default feature type is lists of lists, we've not implemented shape verification to use ArrayXD instead of nested lists yet
|
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
| 53
|
Setting to torch format not working with torchvision and MNIST
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
What's the feature types of your new dataset after `.map` ?
Can you try with adding `features=` in the `.map` call in order to set the "image" feature type to `Array2D` ?
The default feature type is lists of lists, we've not implemented shape verification to use ArrayXD instead of nested lists yet
|
[
-0.12737570703029633,
-0.35116511583328247,
-0.017932923510670662,
0.35361000895500183,
0.47600212693214417,
0.08871375024318695,
0.7330290675163269,
0.38043445348739624,
0.0655258372426033,
-0.03804275766015053,
-0.11115400493144989,
0.3819511830806732,
-0.232968270778656,
-0.33393388986587524,
0.0351090282201767,
-0.5614945292472839,
0.22258029878139496,
-0.09982749819755554,
-0.28079864382743835,
-0.061347298324108124,
-0.2431342899799347,
0.03548954799771309,
-0.21849703788757324,
-0.1084955632686615,
-0.5479358434677124,
0.04409617930650711,
-0.01955590769648552,
-0.07656845450401306,
-0.06229906901717186,
-0.13918034732341766,
0.12234674394130707,
-0.17449605464935303,
0.4444536864757538,
0.7012933492660522,
-0.00012770107423420995,
0.07030169665813446,
0.364272803068161,
-0.17377816140651703,
0.050000473856925964,
-0.16101454198360443,
0.04004686325788498,
-0.2573828101158142,
0.07277651876211166,
-0.09468385577201843,
-0.22349463403224945,
-0.17084583640098572,
0.09591015428304672,
-0.17902974784374237,
-0.028141988441348076,
0.4191688597202301,
0.07713013887405396,
0.27901145815849304,
0.2466621696949005,
0.1386314481496811,
0.22781182825565338,
0.5182868838310242,
-0.2734377086162567,
-0.056116677820682526,
0.22615014016628265,
0.37547871470451355,
0.12400563061237335,
0.5647351145744324,
-0.29133492708206177,
-0.03623355180025101,
0.266944944858551,
0.1290055513381958,
-0.10145455598831177,
-0.31400567293167114,
0.04915764555335045,
0.08946295082569122,
0.42194435000419617,
-0.1494389921426773,
-0.0807788297533989,
-0.14366267621517181,
-0.14397884905338287,
-0.1273804008960724,
0.040591731667518616,
0.28032049536705017,
-0.07184044271707535,
-0.18723881244659424,
-0.5392423868179321,
0.3052913546562195,
-0.1486240178346634,
0.21315890550613403,
-0.28052353858947754,
-0.00341961532831192,
-0.1381634622812271,
0.29280975461006165,
-0.047119006514549255,
-0.1127130463719368,
0.193081334233284,
-0.1234150230884552,
0.13007473945617676,
-0.009825581684708595,
-0.14363226294517517,
-0.05349101126194,
-0.38960033655166626,
-0.3150123357772827,
-0.20014815032482147,
-0.16026559472084045,
0.16648422181606293,
0.13927561044692993,
-0.11639533191919327,
0.12807147204875946,
0.1826331913471222,
0.26803410053253174,
0.10578341782093048,
0.3207029104232788,
-0.08589301258325577,
-0.2895815074443817,
-0.04691976681351662,
0.08773334324359894,
-0.29622700810432434,
-0.43575266003608704,
0.15453515946865082,
0.325297087430954,
0.24522194266319275,
0.06874252110719681,
0.1298559010028839,
-0.323941171169281,
-0.1089225485920906,
-0.009587236680090427,
0.07522497326135635,
0.2850382924079895,
-0.11867944151163101,
0.2439039945602417,
0.4804830253124237,
0.3972030580043793,
-0.15381820499897003,
0.06956276297569275,
0.025072438642382622,
0.031521398574113846,
-0.4404948055744171,
-0.28569871187210083,
0.15340910851955414,
-0.11777321249246597,
0.10007045418024063,
0.03743145242333412,
0.04641531780362129,
0.10069561749696732,
0.07349712401628494,
-0.18587076663970947,
0.624629020690918,
0.14764760434627533,
-0.1944737732410431,
0.2767927348613739,
0.27090680599212646,
0.5297790765762329,
-0.3042984902858734,
0.25653210282325745,
-0.5095705986022949,
0.06525290012359619,
-0.023092517629265785,
-0.01454417034983635,
0.21865519881248474,
-0.020721379667520523,
-0.212163507938385,
0.015828415751457214,
0.5923123359680176,
-0.08367788791656494,
0.27348753809928894,
-0.5791618227958679,
0.0949634462594986,
-0.19133517146110535,
0.034152254462242126,
0.06366843730211258,
-0.20471493899822235,
-0.05235865339636803,
0.38634437322616577,
0.09194900840520859,
0.3154592216014862,
0.16028200089931488,
0.05108356848359108,
0.0798705592751503,
-0.22535325586795807,
-0.2350505143404007,
0.33632397651672363,
-0.3768565356731415,
0.09203927218914032,
-0.017693262547254562,
0.09388009458780289,
-0.06380412727594376,
0.11201874911785126,
0.3361783027648926,
0.032600611448287964,
-0.12800158560276031,
0.02944803424179554,
0.1963144689798355,
-0.16618186235427856,
0.14028693735599518,
0.07735977321863174,
0.191302090883255,
0.19337399303913116,
0.035006530582904816,
-0.015683665871620178,
0.20765356719493866,
-0.22167105972766876,
0.17757576704025269,
-0.05428007245063782,
-0.07471297681331635,
0.07117706537246704,
0.04037829488515854,
-0.36989060044288635,
-0.012196503579616547,
-0.04746989905834198,
0.18646599352359772,
-0.23310047388076782,
-0.04872153326869011,
0.023633727803826332,
0.0822167620062828,
0.05827893689274788,
0.04792506992816925,
0.004977794364094734,
-0.19195637106895447,
-0.18220625817775726,
-0.13902683556079865,
-0.003242077771574259,
0.09221076220273972,
-0.2094762921333313,
-0.2617236077785492,
-0.05234289541840553,
-0.12324877083301544,
0.17830325663089752,
0.05883768945932388,
-0.35903725028038025,
0.05102585256099701,
0.019273217767477036,
-0.36533084511756897,
-0.20136012136936188,
0.17339138686656952,
0.2676694989204407,
-0.09962080419063568,
-0.042235422879457474,
0.19160348176956177,
0.06328949332237244,
0.1146327331662178,
-0.5482736825942993,
0.08346544206142426,
0.17784206569194794,
-0.24697065353393555,
0.20439080893993378,
0.2162802666425705,
0.14853428304195404,
-0.2755032479763031,
-0.19603464007377625,
0.4387865960597992,
0.16040943562984467,
0.315912663936615,
-0.330026239156723,
0.1161012351512909,
-0.07264634966850281,
-0.03940199315547943,
-0.190633624792099,
-0.040807757526636124,
-0.2772822380065918,
0.07302431017160416,
-0.1318601816892624,
0.012982583604753017,
-0.45691853761672974,
-0.04493805393576622,
0.2962622046470642,
0.08876386284828186,
0.17587202787399292,
-0.0012165154330432415,
-0.39984655380249023,
0.2133127748966217,
0.17712648212909698,
-0.6013534069061279,
0.29783862829208374,
-0.004362158942967653,
0.18920691311359406,
-0.10501903295516968,
0.095583975315094,
-0.16254277527332306,
0.2484450340270996,
0.114042729139328,
0.09074881672859192,
-0.19946494698524475,
0.14185264706611633,
-0.10792634636163712,
0.02684619091451168,
0.02637050859630108,
-0.1406290978193283,
-0.23369313776493073,
-0.3589506447315216,
0.2713833451271057,
-0.16618283092975616,
-0.1345188319683075,
-0.40185487270355225,
-0.26218584179878235,
0.0360567644238472,
-0.07400472462177277,
-0.08233476430177689,
0.15075814723968506,
0.18556828796863556,
0.19043514132499695,
0.2634184956550598,
-0.18189533054828644,
0.37431660294532776,
-0.4130289554595947,
-0.035354580730199814,
-0.07500956952571869,
-0.2867961525917053,
-0.09916506707668304,
0.08965617418289185,
-0.5234104990959167,
0.0914849191904068,
-0.22899025678634644,
-0.09319118410348892,
-0.250176340341568,
0.01354741770774126,
0.14182190597057343,
-0.2678496539592743,
-0.2850019037723541,
0.30859076976776123,
0.1939285397529602,
-0.14248299598693848,
0.0406617745757103,
0.266352117061615,
0.01030689850449562,
0.0469016432762146,
0.1537831574678421,
-0.08962060511112213,
0.11655968427658081,
-0.06329794228076935,
-0.17674095928668976,
-0.09661899507045746,
-0.0750613883137703,
-0.0704168975353241,
-0.02175893634557724,
0.06337761878967285,
0.34625765681266785,
0.3721839189529419,
-0.08989089727401733,
-0.05204273387789726,
0.03560885041952133,
0.06296458095312119,
-0.39768847823143005,
0.522503137588501,
-0.22615385055541992,
-0.3608255684375763,
0.1192026361823082,
0.02385600470006466,
0.06514681875705719,
0.4862675368785858,
0.06052308529615402,
0.04973135143518448,
0.011782038025557995,
-0.07894453406333923,
0.252593070268631,
0.22119753062725067,
0.35101956129074097,
-0.09112474322319031,
0.019166184589266777,
-0.16470706462860107,
0.015416686423122883,
-0.10187150537967682,
-0.06325522065162659,
0.6088864803314209,
0.1850852370262146,
0.23994265496730804,
0.09925788640975952,
0.6996644139289856,
-0.0611368790268898,
-0.7380953431129456,
0.21680711209774017,
-0.2425093650817871,
0.1921667605638504,
-0.1181219145655632,
-0.3539586067199707,
0.3988560140132904,
-0.20941965281963348,
0.06437405943870544,
-0.08596731722354889,
-0.024907300248742104,
-0.2391580194234848,
-0.09022410213947296,
0.3573613464832306,
-0.3172072470188141,
-0.15857382118701935,
0.4044298827648163,
-0.14470174908638,
0.27637261152267456,
-0.2313428670167923,
0.32458868622779846,
-0.26092591881752014,
-0.21379251778125763,
0.06005644053220749,
0.4487727880477905,
0.13851283490657806,
0.04172501713037491,
-0.3342851400375366,
-0.21669772267341614,
-0.14322695136070251,
0.3568277955055237,
0.11957772076129913,
0.5672698616981506,
-0.09803582727909088,
-0.07446420937776566,
0.10155694931745529,
0.2413697987794876,
0.8307591676712036,
0.04555749520659447,
-0.09045996516942978,
0.15144257247447968,
-0.3478345572948456,
-0.45497843623161316,
-0.1022297739982605,
-0.05141737684607506,
0.0906815379858017,
0.1716911345720291,
0.120386503636837,
-0.09105350077152252,
-0.1833338737487793,
-0.005832722410559654,
0.19555459916591644,
-0.05512532591819763,
0.03471822291612625,
-0.2269120067358017,
0.05875823274254799,
-0.12965017557144165,
-0.15528295934200287,
0.2211824208498001,
0.029675675556063652,
0.005161960609257221,
-0.3081284463405609,
-0.32623085379600525,
-0.12669925391674042,
0.18248170614242554,
-0.13301241397857666,
0.41106799244880676,
0.09925045818090439,
-0.17808569967746735,
0.07690616697072983,
0.5561061501502991,
0.41840389370918274,
-0.038939449936151505,
-0.1187736913561821,
0.08064316213130951,
0.29311075806617737,
0.1064324676990509,
0.3002043068408966,
0.3208223879337311,
-0.06187339872121811,
-0.4396645724773407,
-0.22684842348098755,
-0.1938147097826004,
-0.3305322825908661,
0.3972935676574707,
0.4080634117126465,
0.0989358127117157,
-0.49535518884658813,
-0.4921706020832062,
0.38619035482406616,
0.29371973872184753,
0.19583012163639069,
0.20459096133708954,
-0.5417592525482178,
-0.40096795558929443,
0.07817897200584412,
0.46624186635017395,
0.8556221723556519,
-0.03707917407155037,
0.3702821433544159,
0.03156490623950958,
0.010806628502905369,
0.17210309207439423,
-0.0018883941229432821,
0.4117940664291382,
-0.35428154468536377,
0.1392892599105835,
-0.1648537665605545,
-0.3125496804714203,
0.25252386927604675,
-0.060203149914741516,
-0.24397021532058716,
0.0425368957221508,
-0.34947165846824646,
0.19361911714076996,
-0.12569408118724823,
-0.08285272121429443,
-0.04982588440179825,
-0.4714173376560211,
0.18787355720996857,
0.015451944433152676,
-0.08251404762268066,
0.2617388367652893,
0.1111610159277916,
-0.16362012922763824,
-0.3798595070838928,
0.06169590353965759,
-0.07622290402650833,
-0.015012153424322605,
-0.24596934020519257,
-0.16324220597743988,
-0.024310031905770302,
-0.7298651337623596,
0.05867947265505791,
0.49615857005119324,
0.33455440402030945,
-0.16056616604328156,
-0.04783592000603676,
0.13964177668094635,
0.44384774565696716,
0.1628999412059784,
-0.09901812672615051,
-0.34018367528915405,
0.2853395342826843,
0.09737548977136612,
0.18433162569999695,
0.10863793641328812,
0.06814868003129959,
0.21052005887031555,
-0.5777892470359802,
0.03725156560540199,
0.306029736995697,
-0.34495052695274353,
-0.32298538088798523,
-0.19845089316368103,
0.04918496683239937,
0.038163524121046066,
0.028618529438972473,
0.1244889497756958,
-0.03890340402722359,
0.20724399387836456,
-0.04151169955730438,
-0.22646178305149078,
0.13289012014865875,
0.4523313045501709,
0.1129847913980484,
-0.35004591941833496,
0.3907565176486969,
0.3549588918685913,
-0.04477759078145027,
-0.0437440387904644,
0.4166942536830902,
0.6353183388710022,
-0.3456965386867523,
0.09949697554111481,
-0.10271568596363068,
-0.1569867581129074,
-0.011073986068367958,
0.5430944561958313,
-0.23431730270385742,
-0.13097745180130005,
-0.23895679414272308,
-0.04081777483224869,
-0.4308936297893524,
0.010813296772539616,
-0.31629839539527893,
0.45663103461265564,
-0.04322148859500885,
0.36270955204963684,
0.21050532162189484,
-0.18734773993492126,
-0.14413577318191528,
-0.2586488127708435,
0.17234940826892853,
0.36793309450149536,
-0.24718208611011505,
0.21876199543476105,
-0.12695848941802979,
-0.12202277034521103,
-0.03625253215432167,
0.026030853390693665,
-0.24973903596401215,
-0.03339084982872009,
-0.057677797973155975,
0.17730605602264404,
0.06661400943994522,
-0.11354026198387146,
-0.0735473707318306,
-0.1736702024936676,
-0.13858070969581604,
-0.2681717276573181,
-0.03771835193037987,
0.11092091351747513,
-0.11599960178136826,
0.35316169261932373,
-0.1783653348684311,
0.23122534155845642,
0.3186754882335663,
-0.2699998617172241,
-0.10262306034564972,
0.03587070479989052,
0.22296245396137238,
0.06005034223198891,
0.004532386548817158,
-0.06155698746442795,
-0.27723708748817444,
0.11259099841117859,
0.16520337760448456,
0.25497496128082275,
0.204617440700531,
-0.09999638050794601,
0.10917830467224121,
-0.043806593865156174,
0.2041834443807602,
0.10125498473644257,
-0.1718701869249344,
-0.05082887038588524,
0.060372959822416306,
-0.007623572368174791,
0.1006215363740921,
0.14499858021736145,
0.0388689860701561,
0.12528176605701447,
-0.08346445858478546,
0.2755776643753052,
0.066558837890625,
0.3113951086997986,
-0.37050771713256836,
0.04514264315366745,
0.41785672307014465,
-0.24107347428798676,
0.23508600890636444,
0.4640142619609833,
0.014800028875470161,
0.19304944574832916,
0.2907048463821411,
0.10934361070394516,
-0.11870168149471283,
0.32269686460494995,
0.3945169150829315,
0.8204306960105896,
0.5895959734916687,
0.08376991748809814,
0.27460289001464844,
0.09925739467144012,
-0.15360744297504425,
-0.2072506844997406,
0.2358231246471405,
0.39196810126304626,
0.01886700838804245,
0.18569335341453552,
-0.24079890549182892,
-0.48712414503097534,
0.2258816957473755,
0.12177547812461853,
-0.1946176141500473,
-0.0822240486741066,
-0.6648061871528625,
0.011875501833856106,
0.1358264982700348,
-0.18665948510169983,
-0.17971482872962952,
-0.050137199461460114,
0.2205909788608551,
0.25975432991981506,
-0.10322102159261703,
-0.16091208159923553,
-0.17247481644153595,
0.0691017135977745,
0.0375286303460598,
-0.00732995243743062,
0.16975809633731842,
-0.13684530556201935,
0.16176103055477142,
0.24482403695583344,
0.1969076693058014,
0.2849538326263428,
0.4870804250240326,
-0.16817134618759155,
-0.1598939746618271,
-0.01055342610925436,
-0.19236592948436737,
0.08990199863910675,
0.06671139597892761,
0.03153395652770996,
-0.1532081961631775,
-0.014956638216972351,
0.008462493307888508,
0.038628142327070236,
0.03146027401089668,
-0.09408091753721237,
-0.21825915575027466,
0.1676250845193863,
0.30557534098625183,
-0.36377817392349243,
-0.1490931510925293,
-0.09989839047193527,
-0.24665571749210358,
-0.3483101725578308,
-0.26553383469581604,
0.532738447189331,
0.027895571663975716,
0.128010094165802,
0.14216819405555725,
-0.042159657925367355,
0.04878508672118187,
0.15741172432899475,
-0.12155678123235703,
0.07757643610239029,
-0.15409401059150696,
0.1359660029411316,
-0.08580464869737625,
0.03191022947430611,
0.11847498267889023,
-0.3834477365016937,
-0.01884886994957924,
-0.03916456550359726,
0.24254119396209717,
0.0646747574210167,
0.20209071040153503,
-0.09834738820791245,
0.49874529242515564,
0.6146568655967712,
-0.1336161345243454,
-0.1414812207221985,
-0.13041949272155762,
0.37065133452415466,
0.07330799847841263,
-0.07746578752994537,
0.021921372041106224,
0.10242687165737152,
0.006506701465696096,
-0.3420656621456146,
-0.25549033284187317,
-0.01998201757669449,
0.3041451573371887,
0.35128214955329895,
0.09328848868608475,
0.3203136622905731,
-0.01922053098678589,
0.04841059818863869,
-0.24113258719444275,
0.05041498318314552,
-0.1276015043258667,
0.00967057328671217,
-0.022802552208304405,
0.5810174345970154,
-0.22440259158611298,
-0.059341490268707275,
-0.41364961862564087,
0.4290265738964081,
0.09053075313568115,
-0.3388557434082031,
-0.08051913231611252,
0.3583991527557373,
-0.3173205554485321,
-0.20108820497989655,
0.22619524598121643,
0.4100225567817688,
0.1513604074716568,
0.19435736536979675,
-0.5254402160644531,
-0.40691110491752625,
0.44720226526260376,
-0.44170674681663513,
-0.5069129467010498,
0.02907400205731392,
-0.313393771648407,
0.06790363043546677,
0.49642351269721985,
-0.47104936838150024,
-0.14913403987884521,
0.0015055699041113257,
-0.08082757890224457,
-0.09160425513982773,
-0.09819342195987701,
0.2610405683517456,
0.015111553482711315,
-0.25184622406959534,
0.17900702357292175,
0.1764499396085739,
-0.0228157639503479,
-0.42041638493537903,
-0.27535977959632874
] |
https://github.com/huggingface/datasets/issues/2005
|
Setting to torch format not working with torchvision and MNIST
|
Hi @lhoestq
Raw feature types are like this:
```
Image:
<class 'list'> 60000 #(type, len)
<class 'list'> 28
<class 'list'> 28
<class 'int'>
Label:
<class 'list'> 60000
<class 'int'>
```
Inside the `prepare_feature` method with batch size 100000 , after processing, they are like this:
Inside Prepare Train Features
```
Image:
<class 'list'> 10000
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'list'> 10000
<class 'torch.Tensor'>
```
After map, the feature type are like this:
```
Image:
<class 'list'> 60000
<class 'list'> 1
<class 'list'> 28
<class 'list'> 28
<class 'float'>
Label:
<class 'list'> 60000
<class 'int'>
```
After dataloader with batch size 2, the batch features are like this:
```
Image:
<class 'list'> 1
<class 'list'> 28
<class 'list'> 28
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
<hr>
When I was setting the format of `train_dataset` to 'torch' after mapping -
```
Image:
<class 'list'> 60000
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'>
```
Corresponding DataLoader batch:
```
From DataLoader batch features
Image:
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 2
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
I will check with features and get back.
|
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
| 213
|
Setting to torch format not working with torchvision and MNIST
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
Hi @lhoestq
Raw feature types are like this:
```
Image:
<class 'list'> 60000 #(type, len)
<class 'list'> 28
<class 'list'> 28
<class 'int'>
Label:
<class 'list'> 60000
<class 'int'>
```
Inside the `prepare_feature` method with batch size 100000 , after processing, they are like this:
Inside Prepare Train Features
```
Image:
<class 'list'> 10000
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'list'> 10000
<class 'torch.Tensor'>
```
After map, the feature type are like this:
```
Image:
<class 'list'> 60000
<class 'list'> 1
<class 'list'> 28
<class 'list'> 28
<class 'float'>
Label:
<class 'list'> 60000
<class 'int'>
```
After dataloader with batch size 2, the batch features are like this:
```
Image:
<class 'list'> 1
<class 'list'> 28
<class 'list'> 28
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
<hr>
When I was setting the format of `train_dataset` to 'torch' after mapping -
```
Image:
<class 'list'> 60000
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'>
```
Corresponding DataLoader batch:
```
From DataLoader batch features
Image:
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 2
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
I will check with features and get back.
|
[
-0.12737570703029633,
-0.35116511583328247,
-0.017932923510670662,
0.35361000895500183,
0.47600212693214417,
0.08871375024318695,
0.7330290675163269,
0.38043445348739624,
0.0655258372426033,
-0.03804275766015053,
-0.11115400493144989,
0.3819511830806732,
-0.232968270778656,
-0.33393388986587524,
0.0351090282201767,
-0.5614945292472839,
0.22258029878139496,
-0.09982749819755554,
-0.28079864382743835,
-0.061347298324108124,
-0.2431342899799347,
0.03548954799771309,
-0.21849703788757324,
-0.1084955632686615,
-0.5479358434677124,
0.04409617930650711,
-0.01955590769648552,
-0.07656845450401306,
-0.06229906901717186,
-0.13918034732341766,
0.12234674394130707,
-0.17449605464935303,
0.4444536864757538,
0.7012933492660522,
-0.00012770107423420995,
0.07030169665813446,
0.364272803068161,
-0.17377816140651703,
0.050000473856925964,
-0.16101454198360443,
0.04004686325788498,
-0.2573828101158142,
0.07277651876211166,
-0.09468385577201843,
-0.22349463403224945,
-0.17084583640098572,
0.09591015428304672,
-0.17902974784374237,
-0.028141988441348076,
0.4191688597202301,
0.07713013887405396,
0.27901145815849304,
0.2466621696949005,
0.1386314481496811,
0.22781182825565338,
0.5182868838310242,
-0.2734377086162567,
-0.056116677820682526,
0.22615014016628265,
0.37547871470451355,
0.12400563061237335,
0.5647351145744324,
-0.29133492708206177,
-0.03623355180025101,
0.266944944858551,
0.1290055513381958,
-0.10145455598831177,
-0.31400567293167114,
0.04915764555335045,
0.08946295082569122,
0.42194435000419617,
-0.1494389921426773,
-0.0807788297533989,
-0.14366267621517181,
-0.14397884905338287,
-0.1273804008960724,
0.040591731667518616,
0.28032049536705017,
-0.07184044271707535,
-0.18723881244659424,
-0.5392423868179321,
0.3052913546562195,
-0.1486240178346634,
0.21315890550613403,
-0.28052353858947754,
-0.00341961532831192,
-0.1381634622812271,
0.29280975461006165,
-0.047119006514549255,
-0.1127130463719368,
0.193081334233284,
-0.1234150230884552,
0.13007473945617676,
-0.009825581684708595,
-0.14363226294517517,
-0.05349101126194,
-0.38960033655166626,
-0.3150123357772827,
-0.20014815032482147,
-0.16026559472084045,
0.16648422181606293,
0.13927561044692993,
-0.11639533191919327,
0.12807147204875946,
0.1826331913471222,
0.26803410053253174,
0.10578341782093048,
0.3207029104232788,
-0.08589301258325577,
-0.2895815074443817,
-0.04691976681351662,
0.08773334324359894,
-0.29622700810432434,
-0.43575266003608704,
0.15453515946865082,
0.325297087430954,
0.24522194266319275,
0.06874252110719681,
0.1298559010028839,
-0.323941171169281,
-0.1089225485920906,
-0.009587236680090427,
0.07522497326135635,
0.2850382924079895,
-0.11867944151163101,
0.2439039945602417,
0.4804830253124237,
0.3972030580043793,
-0.15381820499897003,
0.06956276297569275,
0.025072438642382622,
0.031521398574113846,
-0.4404948055744171,
-0.28569871187210083,
0.15340910851955414,
-0.11777321249246597,
0.10007045418024063,
0.03743145242333412,
0.04641531780362129,
0.10069561749696732,
0.07349712401628494,
-0.18587076663970947,
0.624629020690918,
0.14764760434627533,
-0.1944737732410431,
0.2767927348613739,
0.27090680599212646,
0.5297790765762329,
-0.3042984902858734,
0.25653210282325745,
-0.5095705986022949,
0.06525290012359619,
-0.023092517629265785,
-0.01454417034983635,
0.21865519881248474,
-0.020721379667520523,
-0.212163507938385,
0.015828415751457214,
0.5923123359680176,
-0.08367788791656494,
0.27348753809928894,
-0.5791618227958679,
0.0949634462594986,
-0.19133517146110535,
0.034152254462242126,
0.06366843730211258,
-0.20471493899822235,
-0.05235865339636803,
0.38634437322616577,
0.09194900840520859,
0.3154592216014862,
0.16028200089931488,
0.05108356848359108,
0.0798705592751503,
-0.22535325586795807,
-0.2350505143404007,
0.33632397651672363,
-0.3768565356731415,
0.09203927218914032,
-0.017693262547254562,
0.09388009458780289,
-0.06380412727594376,
0.11201874911785126,
0.3361783027648926,
0.032600611448287964,
-0.12800158560276031,
0.02944803424179554,
0.1963144689798355,
-0.16618186235427856,
0.14028693735599518,
0.07735977321863174,
0.191302090883255,
0.19337399303913116,
0.035006530582904816,
-0.015683665871620178,
0.20765356719493866,
-0.22167105972766876,
0.17757576704025269,
-0.05428007245063782,
-0.07471297681331635,
0.07117706537246704,
0.04037829488515854,
-0.36989060044288635,
-0.012196503579616547,
-0.04746989905834198,
0.18646599352359772,
-0.23310047388076782,
-0.04872153326869011,
0.023633727803826332,
0.0822167620062828,
0.05827893689274788,
0.04792506992816925,
0.004977794364094734,
-0.19195637106895447,
-0.18220625817775726,
-0.13902683556079865,
-0.003242077771574259,
0.09221076220273972,
-0.2094762921333313,
-0.2617236077785492,
-0.05234289541840553,
-0.12324877083301544,
0.17830325663089752,
0.05883768945932388,
-0.35903725028038025,
0.05102585256099701,
0.019273217767477036,
-0.36533084511756897,
-0.20136012136936188,
0.17339138686656952,
0.2676694989204407,
-0.09962080419063568,
-0.042235422879457474,
0.19160348176956177,
0.06328949332237244,
0.1146327331662178,
-0.5482736825942993,
0.08346544206142426,
0.17784206569194794,
-0.24697065353393555,
0.20439080893993378,
0.2162802666425705,
0.14853428304195404,
-0.2755032479763031,
-0.19603464007377625,
0.4387865960597992,
0.16040943562984467,
0.315912663936615,
-0.330026239156723,
0.1161012351512909,
-0.07264634966850281,
-0.03940199315547943,
-0.190633624792099,
-0.040807757526636124,
-0.2772822380065918,
0.07302431017160416,
-0.1318601816892624,
0.012982583604753017,
-0.45691853761672974,
-0.04493805393576622,
0.2962622046470642,
0.08876386284828186,
0.17587202787399292,
-0.0012165154330432415,
-0.39984655380249023,
0.2133127748966217,
0.17712648212909698,
-0.6013534069061279,
0.29783862829208374,
-0.004362158942967653,
0.18920691311359406,
-0.10501903295516968,
0.095583975315094,
-0.16254277527332306,
0.2484450340270996,
0.114042729139328,
0.09074881672859192,
-0.19946494698524475,
0.14185264706611633,
-0.10792634636163712,
0.02684619091451168,
0.02637050859630108,
-0.1406290978193283,
-0.23369313776493073,
-0.3589506447315216,
0.2713833451271057,
-0.16618283092975616,
-0.1345188319683075,
-0.40185487270355225,
-0.26218584179878235,
0.0360567644238472,
-0.07400472462177277,
-0.08233476430177689,
0.15075814723968506,
0.18556828796863556,
0.19043514132499695,
0.2634184956550598,
-0.18189533054828644,
0.37431660294532776,
-0.4130289554595947,
-0.035354580730199814,
-0.07500956952571869,
-0.2867961525917053,
-0.09916506707668304,
0.08965617418289185,
-0.5234104990959167,
0.0914849191904068,
-0.22899025678634644,
-0.09319118410348892,
-0.250176340341568,
0.01354741770774126,
0.14182190597057343,
-0.2678496539592743,
-0.2850019037723541,
0.30859076976776123,
0.1939285397529602,
-0.14248299598693848,
0.0406617745757103,
0.266352117061615,
0.01030689850449562,
0.0469016432762146,
0.1537831574678421,
-0.08962060511112213,
0.11655968427658081,
-0.06329794228076935,
-0.17674095928668976,
-0.09661899507045746,
-0.0750613883137703,
-0.0704168975353241,
-0.02175893634557724,
0.06337761878967285,
0.34625765681266785,
0.3721839189529419,
-0.08989089727401733,
-0.05204273387789726,
0.03560885041952133,
0.06296458095312119,
-0.39768847823143005,
0.522503137588501,
-0.22615385055541992,
-0.3608255684375763,
0.1192026361823082,
0.02385600470006466,
0.06514681875705719,
0.4862675368785858,
0.06052308529615402,
0.04973135143518448,
0.011782038025557995,
-0.07894453406333923,
0.252593070268631,
0.22119753062725067,
0.35101956129074097,
-0.09112474322319031,
0.019166184589266777,
-0.16470706462860107,
0.015416686423122883,
-0.10187150537967682,
-0.06325522065162659,
0.6088864803314209,
0.1850852370262146,
0.23994265496730804,
0.09925788640975952,
0.6996644139289856,
-0.0611368790268898,
-0.7380953431129456,
0.21680711209774017,
-0.2425093650817871,
0.1921667605638504,
-0.1181219145655632,
-0.3539586067199707,
0.3988560140132904,
-0.20941965281963348,
0.06437405943870544,
-0.08596731722354889,
-0.024907300248742104,
-0.2391580194234848,
-0.09022410213947296,
0.3573613464832306,
-0.3172072470188141,
-0.15857382118701935,
0.4044298827648163,
-0.14470174908638,
0.27637261152267456,
-0.2313428670167923,
0.32458868622779846,
-0.26092591881752014,
-0.21379251778125763,
0.06005644053220749,
0.4487727880477905,
0.13851283490657806,
0.04172501713037491,
-0.3342851400375366,
-0.21669772267341614,
-0.14322695136070251,
0.3568277955055237,
0.11957772076129913,
0.5672698616981506,
-0.09803582727909088,
-0.07446420937776566,
0.10155694931745529,
0.2413697987794876,
0.8307591676712036,
0.04555749520659447,
-0.09045996516942978,
0.15144257247447968,
-0.3478345572948456,
-0.45497843623161316,
-0.1022297739982605,
-0.05141737684607506,
0.0906815379858017,
0.1716911345720291,
0.120386503636837,
-0.09105350077152252,
-0.1833338737487793,
-0.005832722410559654,
0.19555459916591644,
-0.05512532591819763,
0.03471822291612625,
-0.2269120067358017,
0.05875823274254799,
-0.12965017557144165,
-0.15528295934200287,
0.2211824208498001,
0.029675675556063652,
0.005161960609257221,
-0.3081284463405609,
-0.32623085379600525,
-0.12669925391674042,
0.18248170614242554,
-0.13301241397857666,
0.41106799244880676,
0.09925045818090439,
-0.17808569967746735,
0.07690616697072983,
0.5561061501502991,
0.41840389370918274,
-0.038939449936151505,
-0.1187736913561821,
0.08064316213130951,
0.29311075806617737,
0.1064324676990509,
0.3002043068408966,
0.3208223879337311,
-0.06187339872121811,
-0.4396645724773407,
-0.22684842348098755,
-0.1938147097826004,
-0.3305322825908661,
0.3972935676574707,
0.4080634117126465,
0.0989358127117157,
-0.49535518884658813,
-0.4921706020832062,
0.38619035482406616,
0.29371973872184753,
0.19583012163639069,
0.20459096133708954,
-0.5417592525482178,
-0.40096795558929443,
0.07817897200584412,
0.46624186635017395,
0.8556221723556519,
-0.03707917407155037,
0.3702821433544159,
0.03156490623950958,
0.010806628502905369,
0.17210309207439423,
-0.0018883941229432821,
0.4117940664291382,
-0.35428154468536377,
0.1392892599105835,
-0.1648537665605545,
-0.3125496804714203,
0.25252386927604675,
-0.060203149914741516,
-0.24397021532058716,
0.0425368957221508,
-0.34947165846824646,
0.19361911714076996,
-0.12569408118724823,
-0.08285272121429443,
-0.04982588440179825,
-0.4714173376560211,
0.18787355720996857,
0.015451944433152676,
-0.08251404762268066,
0.2617388367652893,
0.1111610159277916,
-0.16362012922763824,
-0.3798595070838928,
0.06169590353965759,
-0.07622290402650833,
-0.015012153424322605,
-0.24596934020519257,
-0.16324220597743988,
-0.024310031905770302,
-0.7298651337623596,
0.05867947265505791,
0.49615857005119324,
0.33455440402030945,
-0.16056616604328156,
-0.04783592000603676,
0.13964177668094635,
0.44384774565696716,
0.1628999412059784,
-0.09901812672615051,
-0.34018367528915405,
0.2853395342826843,
0.09737548977136612,
0.18433162569999695,
0.10863793641328812,
0.06814868003129959,
0.21052005887031555,
-0.5777892470359802,
0.03725156560540199,
0.306029736995697,
-0.34495052695274353,
-0.32298538088798523,
-0.19845089316368103,
0.04918496683239937,
0.038163524121046066,
0.028618529438972473,
0.1244889497756958,
-0.03890340402722359,
0.20724399387836456,
-0.04151169955730438,
-0.22646178305149078,
0.13289012014865875,
0.4523313045501709,
0.1129847913980484,
-0.35004591941833496,
0.3907565176486969,
0.3549588918685913,
-0.04477759078145027,
-0.0437440387904644,
0.4166942536830902,
0.6353183388710022,
-0.3456965386867523,
0.09949697554111481,
-0.10271568596363068,
-0.1569867581129074,
-0.011073986068367958,
0.5430944561958313,
-0.23431730270385742,
-0.13097745180130005,
-0.23895679414272308,
-0.04081777483224869,
-0.4308936297893524,
0.010813296772539616,
-0.31629839539527893,
0.45663103461265564,
-0.04322148859500885,
0.36270955204963684,
0.21050532162189484,
-0.18734773993492126,
-0.14413577318191528,
-0.2586488127708435,
0.17234940826892853,
0.36793309450149536,
-0.24718208611011505,
0.21876199543476105,
-0.12695848941802979,
-0.12202277034521103,
-0.03625253215432167,
0.026030853390693665,
-0.24973903596401215,
-0.03339084982872009,
-0.057677797973155975,
0.17730605602264404,
0.06661400943994522,
-0.11354026198387146,
-0.0735473707318306,
-0.1736702024936676,
-0.13858070969581604,
-0.2681717276573181,
-0.03771835193037987,
0.11092091351747513,
-0.11599960178136826,
0.35316169261932373,
-0.1783653348684311,
0.23122534155845642,
0.3186754882335663,
-0.2699998617172241,
-0.10262306034564972,
0.03587070479989052,
0.22296245396137238,
0.06005034223198891,
0.004532386548817158,
-0.06155698746442795,
-0.27723708748817444,
0.11259099841117859,
0.16520337760448456,
0.25497496128082275,
0.204617440700531,
-0.09999638050794601,
0.10917830467224121,
-0.043806593865156174,
0.2041834443807602,
0.10125498473644257,
-0.1718701869249344,
-0.05082887038588524,
0.060372959822416306,
-0.007623572368174791,
0.1006215363740921,
0.14499858021736145,
0.0388689860701561,
0.12528176605701447,
-0.08346445858478546,
0.2755776643753052,
0.066558837890625,
0.3113951086997986,
-0.37050771713256836,
0.04514264315366745,
0.41785672307014465,
-0.24107347428798676,
0.23508600890636444,
0.4640142619609833,
0.014800028875470161,
0.19304944574832916,
0.2907048463821411,
0.10934361070394516,
-0.11870168149471283,
0.32269686460494995,
0.3945169150829315,
0.8204306960105896,
0.5895959734916687,
0.08376991748809814,
0.27460289001464844,
0.09925739467144012,
-0.15360744297504425,
-0.2072506844997406,
0.2358231246471405,
0.39196810126304626,
0.01886700838804245,
0.18569335341453552,
-0.24079890549182892,
-0.48712414503097534,
0.2258816957473755,
0.12177547812461853,
-0.1946176141500473,
-0.0822240486741066,
-0.6648061871528625,
0.011875501833856106,
0.1358264982700348,
-0.18665948510169983,
-0.17971482872962952,
-0.050137199461460114,
0.2205909788608551,
0.25975432991981506,
-0.10322102159261703,
-0.16091208159923553,
-0.17247481644153595,
0.0691017135977745,
0.0375286303460598,
-0.00732995243743062,
0.16975809633731842,
-0.13684530556201935,
0.16176103055477142,
0.24482403695583344,
0.1969076693058014,
0.2849538326263428,
0.4870804250240326,
-0.16817134618759155,
-0.1598939746618271,
-0.01055342610925436,
-0.19236592948436737,
0.08990199863910675,
0.06671139597892761,
0.03153395652770996,
-0.1532081961631775,
-0.014956638216972351,
0.008462493307888508,
0.038628142327070236,
0.03146027401089668,
-0.09408091753721237,
-0.21825915575027466,
0.1676250845193863,
0.30557534098625183,
-0.36377817392349243,
-0.1490931510925293,
-0.09989839047193527,
-0.24665571749210358,
-0.3483101725578308,
-0.26553383469581604,
0.532738447189331,
0.027895571663975716,
0.128010094165802,
0.14216819405555725,
-0.042159657925367355,
0.04878508672118187,
0.15741172432899475,
-0.12155678123235703,
0.07757643610239029,
-0.15409401059150696,
0.1359660029411316,
-0.08580464869737625,
0.03191022947430611,
0.11847498267889023,
-0.3834477365016937,
-0.01884886994957924,
-0.03916456550359726,
0.24254119396209717,
0.0646747574210167,
0.20209071040153503,
-0.09834738820791245,
0.49874529242515564,
0.6146568655967712,
-0.1336161345243454,
-0.1414812207221985,
-0.13041949272155762,
0.37065133452415466,
0.07330799847841263,
-0.07746578752994537,
0.021921372041106224,
0.10242687165737152,
0.006506701465696096,
-0.3420656621456146,
-0.25549033284187317,
-0.01998201757669449,
0.3041451573371887,
0.35128214955329895,
0.09328848868608475,
0.3203136622905731,
-0.01922053098678589,
0.04841059818863869,
-0.24113258719444275,
0.05041498318314552,
-0.1276015043258667,
0.00967057328671217,
-0.022802552208304405,
0.5810174345970154,
-0.22440259158611298,
-0.059341490268707275,
-0.41364961862564087,
0.4290265738964081,
0.09053075313568115,
-0.3388557434082031,
-0.08051913231611252,
0.3583991527557373,
-0.3173205554485321,
-0.20108820497989655,
0.22619524598121643,
0.4100225567817688,
0.1513604074716568,
0.19435736536979675,
-0.5254402160644531,
-0.40691110491752625,
0.44720226526260376,
-0.44170674681663513,
-0.5069129467010498,
0.02907400205731392,
-0.313393771648407,
0.06790363043546677,
0.49642351269721985,
-0.47104936838150024,
-0.14913403987884521,
0.0015055699041113257,
-0.08082757890224457,
-0.09160425513982773,
-0.09819342195987701,
0.2610405683517456,
0.015111553482711315,
-0.25184622406959534,
0.17900702357292175,
0.1764499396085739,
-0.0228157639503479,
-0.42041638493537903,
-0.27535977959632874
] |
https://github.com/huggingface/datasets/issues/2005
|
Setting to torch format not working with torchvision and MNIST
|
Hi @lhoestq
# Using Array3D
I tried this:
```python
features = datasets.Features({
"image": datasets.Array3D(shape=(1,28,28),dtype="float32"),
"label": datasets.features.ClassLabel(names=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]),
})
train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
```
and it didn't fix the issue.
During the `prepare_train_features:
```
Image:
<class 'list'> 10000
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'list'> 10000
<class 'torch.Tensor'>
```
After the `map`:
```
Image:
<class 'list'> 60000
<class 'list'> 1
<class 'list'> 28
<class 'list'> 28
<class 'float'>
Label:
<class 'list'> 60000
<class 'int'>
```
From the DataLoader batch:
```
Image:
<class 'list'> 1
<class 'list'> 28
<class 'list'> 28
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
It is the same as before.
---
Using `datasets.Sequence(datasets.Array2D(shape=(28,28),dtype="float32"))` gave an error during `map`:
```python
ArrowNotImplementedError Traceback (most recent call last)
<ipython-input-95-d28e69289084> in <module>()
3 "label": datasets.features.ClassLabel(names=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]),
4 })
----> 5 train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
15 frames
/usr/local/lib/python3.7/dist-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc)
446 num_proc=num_proc,
447 )
--> 448 for k, dataset in self.items()
449 }
450 )
/usr/local/lib/python3.7/dist-packages/datasets/dataset_dict.py in <dictcomp>(.0)
446 num_proc=num_proc,
447 )
--> 448 for k, dataset in self.items()
449 }
450 )
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint)
1307 fn_kwargs=fn_kwargs,
1308 new_fingerprint=new_fingerprint,
-> 1309 update_data=update_data,
1310 )
1311 else:
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
202 }
203 # apply actual function
--> 204 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
205 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
206 # re-apply format to the output
/usr/local/lib/python3.7/dist-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
335 # Call actual function
336
--> 337 out = func(self, *args, **kwargs)
338
339 # Update fingerprint of in-place transforms + update in-place history of transforms
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, update_data)
1580 if update_data:
1581 batch = cast_to_python_objects(batch)
-> 1582 writer.write_batch(batch)
1583 if update_data:
1584 writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file
/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
274 typed_sequence = TypedSequence(batch_examples[col], type=col_type, try_type=col_try_type)
275 typed_sequence_examples[col] = typed_sequence
--> 276 pa_table = pa.Table.from_pydict(typed_sequence_examples)
277 self.write_table(pa_table, writer_batch_size)
278
/usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_pydict()
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.asarray()
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.array()
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
95 out = pa.ExtensionArray.from_storage(type, pa.array(self.data, type.storage_dtype))
96 else:
---> 97 out = pa.array(self.data, type=type)
98 if trying_type and out[0].as_py() != self.data[0]:
99 raise TypeError(
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.array()
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
/usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
ArrowNotImplementedError: extension
```
|
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
| 447
|
Setting to torch format not working with torchvision and MNIST
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
Hi @lhoestq
# Using Array3D
I tried this:
```python
features = datasets.Features({
"image": datasets.Array3D(shape=(1,28,28),dtype="float32"),
"label": datasets.features.ClassLabel(names=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]),
})
train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
```
and it didn't fix the issue.
During the `prepare_train_features:
```
Image:
<class 'list'> 10000
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'list'> 10000
<class 'torch.Tensor'>
```
After the `map`:
```
Image:
<class 'list'> 60000
<class 'list'> 1
<class 'list'> 28
<class 'list'> 28
<class 'float'>
Label:
<class 'list'> 60000
<class 'int'>
```
From the DataLoader batch:
```
Image:
<class 'list'> 1
<class 'list'> 28
<class 'list'> 28
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
It is the same as before.
---
Using `datasets.Sequence(datasets.Array2D(shape=(28,28),dtype="float32"))` gave an error during `map`:
```python
ArrowNotImplementedError Traceback (most recent call last)
<ipython-input-95-d28e69289084> in <module>()
3 "label": datasets.features.ClassLabel(names=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]),
4 })
----> 5 train_dataset = raw_dataset.map(prepare_features, features = features,batched=True, batch_size=10000)
15 frames
/usr/local/lib/python3.7/dist-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc)
446 num_proc=num_proc,
447 )
--> 448 for k, dataset in self.items()
449 }
450 )
/usr/local/lib/python3.7/dist-packages/datasets/dataset_dict.py in <dictcomp>(.0)
446 num_proc=num_proc,
447 )
--> 448 for k, dataset in self.items()
449 }
450 )
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint)
1307 fn_kwargs=fn_kwargs,
1308 new_fingerprint=new_fingerprint,
-> 1309 update_data=update_data,
1310 )
1311 else:
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
202 }
203 # apply actual function
--> 204 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
205 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
206 # re-apply format to the output
/usr/local/lib/python3.7/dist-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
335 # Call actual function
336
--> 337 out = func(self, *args, **kwargs)
338
339 # Update fingerprint of in-place transforms + update in-place history of transforms
/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, update_data)
1580 if update_data:
1581 batch = cast_to_python_objects(batch)
-> 1582 writer.write_batch(batch)
1583 if update_data:
1584 writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file
/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
274 typed_sequence = TypedSequence(batch_examples[col], type=col_type, try_type=col_try_type)
275 typed_sequence_examples[col] = typed_sequence
--> 276 pa_table = pa.Table.from_pydict(typed_sequence_examples)
277 self.write_table(pa_table, writer_batch_size)
278
/usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_pydict()
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.asarray()
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.array()
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
95 out = pa.ExtensionArray.from_storage(type, pa.array(self.data, type.storage_dtype))
96 else:
---> 97 out = pa.array(self.data, type=type)
98 if trying_type and out[0].as_py() != self.data[0]:
99 raise TypeError(
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.array()
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
/usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
ArrowNotImplementedError: extension
```
|
[
-0.12737570703029633,
-0.35116511583328247,
-0.017932923510670662,
0.35361000895500183,
0.47600212693214417,
0.08871375024318695,
0.7330290675163269,
0.38043445348739624,
0.0655258372426033,
-0.03804275766015053,
-0.11115400493144989,
0.3819511830806732,
-0.232968270778656,
-0.33393388986587524,
0.0351090282201767,
-0.5614945292472839,
0.22258029878139496,
-0.09982749819755554,
-0.28079864382743835,
-0.061347298324108124,
-0.2431342899799347,
0.03548954799771309,
-0.21849703788757324,
-0.1084955632686615,
-0.5479358434677124,
0.04409617930650711,
-0.01955590769648552,
-0.07656845450401306,
-0.06229906901717186,
-0.13918034732341766,
0.12234674394130707,
-0.17449605464935303,
0.4444536864757538,
0.7012933492660522,
-0.00012770107423420995,
0.07030169665813446,
0.364272803068161,
-0.17377816140651703,
0.050000473856925964,
-0.16101454198360443,
0.04004686325788498,
-0.2573828101158142,
0.07277651876211166,
-0.09468385577201843,
-0.22349463403224945,
-0.17084583640098572,
0.09591015428304672,
-0.17902974784374237,
-0.028141988441348076,
0.4191688597202301,
0.07713013887405396,
0.27901145815849304,
0.2466621696949005,
0.1386314481496811,
0.22781182825565338,
0.5182868838310242,
-0.2734377086162567,
-0.056116677820682526,
0.22615014016628265,
0.37547871470451355,
0.12400563061237335,
0.5647351145744324,
-0.29133492708206177,
-0.03623355180025101,
0.266944944858551,
0.1290055513381958,
-0.10145455598831177,
-0.31400567293167114,
0.04915764555335045,
0.08946295082569122,
0.42194435000419617,
-0.1494389921426773,
-0.0807788297533989,
-0.14366267621517181,
-0.14397884905338287,
-0.1273804008960724,
0.040591731667518616,
0.28032049536705017,
-0.07184044271707535,
-0.18723881244659424,
-0.5392423868179321,
0.3052913546562195,
-0.1486240178346634,
0.21315890550613403,
-0.28052353858947754,
-0.00341961532831192,
-0.1381634622812271,
0.29280975461006165,
-0.047119006514549255,
-0.1127130463719368,
0.193081334233284,
-0.1234150230884552,
0.13007473945617676,
-0.009825581684708595,
-0.14363226294517517,
-0.05349101126194,
-0.38960033655166626,
-0.3150123357772827,
-0.20014815032482147,
-0.16026559472084045,
0.16648422181606293,
0.13927561044692993,
-0.11639533191919327,
0.12807147204875946,
0.1826331913471222,
0.26803410053253174,
0.10578341782093048,
0.3207029104232788,
-0.08589301258325577,
-0.2895815074443817,
-0.04691976681351662,
0.08773334324359894,
-0.29622700810432434,
-0.43575266003608704,
0.15453515946865082,
0.325297087430954,
0.24522194266319275,
0.06874252110719681,
0.1298559010028839,
-0.323941171169281,
-0.1089225485920906,
-0.009587236680090427,
0.07522497326135635,
0.2850382924079895,
-0.11867944151163101,
0.2439039945602417,
0.4804830253124237,
0.3972030580043793,
-0.15381820499897003,
0.06956276297569275,
0.025072438642382622,
0.031521398574113846,
-0.4404948055744171,
-0.28569871187210083,
0.15340910851955414,
-0.11777321249246597,
0.10007045418024063,
0.03743145242333412,
0.04641531780362129,
0.10069561749696732,
0.07349712401628494,
-0.18587076663970947,
0.624629020690918,
0.14764760434627533,
-0.1944737732410431,
0.2767927348613739,
0.27090680599212646,
0.5297790765762329,
-0.3042984902858734,
0.25653210282325745,
-0.5095705986022949,
0.06525290012359619,
-0.023092517629265785,
-0.01454417034983635,
0.21865519881248474,
-0.020721379667520523,
-0.212163507938385,
0.015828415751457214,
0.5923123359680176,
-0.08367788791656494,
0.27348753809928894,
-0.5791618227958679,
0.0949634462594986,
-0.19133517146110535,
0.034152254462242126,
0.06366843730211258,
-0.20471493899822235,
-0.05235865339636803,
0.38634437322616577,
0.09194900840520859,
0.3154592216014862,
0.16028200089931488,
0.05108356848359108,
0.0798705592751503,
-0.22535325586795807,
-0.2350505143404007,
0.33632397651672363,
-0.3768565356731415,
0.09203927218914032,
-0.017693262547254562,
0.09388009458780289,
-0.06380412727594376,
0.11201874911785126,
0.3361783027648926,
0.032600611448287964,
-0.12800158560276031,
0.02944803424179554,
0.1963144689798355,
-0.16618186235427856,
0.14028693735599518,
0.07735977321863174,
0.191302090883255,
0.19337399303913116,
0.035006530582904816,
-0.015683665871620178,
0.20765356719493866,
-0.22167105972766876,
0.17757576704025269,
-0.05428007245063782,
-0.07471297681331635,
0.07117706537246704,
0.04037829488515854,
-0.36989060044288635,
-0.012196503579616547,
-0.04746989905834198,
0.18646599352359772,
-0.23310047388076782,
-0.04872153326869011,
0.023633727803826332,
0.0822167620062828,
0.05827893689274788,
0.04792506992816925,
0.004977794364094734,
-0.19195637106895447,
-0.18220625817775726,
-0.13902683556079865,
-0.003242077771574259,
0.09221076220273972,
-0.2094762921333313,
-0.2617236077785492,
-0.05234289541840553,
-0.12324877083301544,
0.17830325663089752,
0.05883768945932388,
-0.35903725028038025,
0.05102585256099701,
0.019273217767477036,
-0.36533084511756897,
-0.20136012136936188,
0.17339138686656952,
0.2676694989204407,
-0.09962080419063568,
-0.042235422879457474,
0.19160348176956177,
0.06328949332237244,
0.1146327331662178,
-0.5482736825942993,
0.08346544206142426,
0.17784206569194794,
-0.24697065353393555,
0.20439080893993378,
0.2162802666425705,
0.14853428304195404,
-0.2755032479763031,
-0.19603464007377625,
0.4387865960597992,
0.16040943562984467,
0.315912663936615,
-0.330026239156723,
0.1161012351512909,
-0.07264634966850281,
-0.03940199315547943,
-0.190633624792099,
-0.040807757526636124,
-0.2772822380065918,
0.07302431017160416,
-0.1318601816892624,
0.012982583604753017,
-0.45691853761672974,
-0.04493805393576622,
0.2962622046470642,
0.08876386284828186,
0.17587202787399292,
-0.0012165154330432415,
-0.39984655380249023,
0.2133127748966217,
0.17712648212909698,
-0.6013534069061279,
0.29783862829208374,
-0.004362158942967653,
0.18920691311359406,
-0.10501903295516968,
0.095583975315094,
-0.16254277527332306,
0.2484450340270996,
0.114042729139328,
0.09074881672859192,
-0.19946494698524475,
0.14185264706611633,
-0.10792634636163712,
0.02684619091451168,
0.02637050859630108,
-0.1406290978193283,
-0.23369313776493073,
-0.3589506447315216,
0.2713833451271057,
-0.16618283092975616,
-0.1345188319683075,
-0.40185487270355225,
-0.26218584179878235,
0.0360567644238472,
-0.07400472462177277,
-0.08233476430177689,
0.15075814723968506,
0.18556828796863556,
0.19043514132499695,
0.2634184956550598,
-0.18189533054828644,
0.37431660294532776,
-0.4130289554595947,
-0.035354580730199814,
-0.07500956952571869,
-0.2867961525917053,
-0.09916506707668304,
0.08965617418289185,
-0.5234104990959167,
0.0914849191904068,
-0.22899025678634644,
-0.09319118410348892,
-0.250176340341568,
0.01354741770774126,
0.14182190597057343,
-0.2678496539592743,
-0.2850019037723541,
0.30859076976776123,
0.1939285397529602,
-0.14248299598693848,
0.0406617745757103,
0.266352117061615,
0.01030689850449562,
0.0469016432762146,
0.1537831574678421,
-0.08962060511112213,
0.11655968427658081,
-0.06329794228076935,
-0.17674095928668976,
-0.09661899507045746,
-0.0750613883137703,
-0.0704168975353241,
-0.02175893634557724,
0.06337761878967285,
0.34625765681266785,
0.3721839189529419,
-0.08989089727401733,
-0.05204273387789726,
0.03560885041952133,
0.06296458095312119,
-0.39768847823143005,
0.522503137588501,
-0.22615385055541992,
-0.3608255684375763,
0.1192026361823082,
0.02385600470006466,
0.06514681875705719,
0.4862675368785858,
0.06052308529615402,
0.04973135143518448,
0.011782038025557995,
-0.07894453406333923,
0.252593070268631,
0.22119753062725067,
0.35101956129074097,
-0.09112474322319031,
0.019166184589266777,
-0.16470706462860107,
0.015416686423122883,
-0.10187150537967682,
-0.06325522065162659,
0.6088864803314209,
0.1850852370262146,
0.23994265496730804,
0.09925788640975952,
0.6996644139289856,
-0.0611368790268898,
-0.7380953431129456,
0.21680711209774017,
-0.2425093650817871,
0.1921667605638504,
-0.1181219145655632,
-0.3539586067199707,
0.3988560140132904,
-0.20941965281963348,
0.06437405943870544,
-0.08596731722354889,
-0.024907300248742104,
-0.2391580194234848,
-0.09022410213947296,
0.3573613464832306,
-0.3172072470188141,
-0.15857382118701935,
0.4044298827648163,
-0.14470174908638,
0.27637261152267456,
-0.2313428670167923,
0.32458868622779846,
-0.26092591881752014,
-0.21379251778125763,
0.06005644053220749,
0.4487727880477905,
0.13851283490657806,
0.04172501713037491,
-0.3342851400375366,
-0.21669772267341614,
-0.14322695136070251,
0.3568277955055237,
0.11957772076129913,
0.5672698616981506,
-0.09803582727909088,
-0.07446420937776566,
0.10155694931745529,
0.2413697987794876,
0.8307591676712036,
0.04555749520659447,
-0.09045996516942978,
0.15144257247447968,
-0.3478345572948456,
-0.45497843623161316,
-0.1022297739982605,
-0.05141737684607506,
0.0906815379858017,
0.1716911345720291,
0.120386503636837,
-0.09105350077152252,
-0.1833338737487793,
-0.005832722410559654,
0.19555459916591644,
-0.05512532591819763,
0.03471822291612625,
-0.2269120067358017,
0.05875823274254799,
-0.12965017557144165,
-0.15528295934200287,
0.2211824208498001,
0.029675675556063652,
0.005161960609257221,
-0.3081284463405609,
-0.32623085379600525,
-0.12669925391674042,
0.18248170614242554,
-0.13301241397857666,
0.41106799244880676,
0.09925045818090439,
-0.17808569967746735,
0.07690616697072983,
0.5561061501502991,
0.41840389370918274,
-0.038939449936151505,
-0.1187736913561821,
0.08064316213130951,
0.29311075806617737,
0.1064324676990509,
0.3002043068408966,
0.3208223879337311,
-0.06187339872121811,
-0.4396645724773407,
-0.22684842348098755,
-0.1938147097826004,
-0.3305322825908661,
0.3972935676574707,
0.4080634117126465,
0.0989358127117157,
-0.49535518884658813,
-0.4921706020832062,
0.38619035482406616,
0.29371973872184753,
0.19583012163639069,
0.20459096133708954,
-0.5417592525482178,
-0.40096795558929443,
0.07817897200584412,
0.46624186635017395,
0.8556221723556519,
-0.03707917407155037,
0.3702821433544159,
0.03156490623950958,
0.010806628502905369,
0.17210309207439423,
-0.0018883941229432821,
0.4117940664291382,
-0.35428154468536377,
0.1392892599105835,
-0.1648537665605545,
-0.3125496804714203,
0.25252386927604675,
-0.060203149914741516,
-0.24397021532058716,
0.0425368957221508,
-0.34947165846824646,
0.19361911714076996,
-0.12569408118724823,
-0.08285272121429443,
-0.04982588440179825,
-0.4714173376560211,
0.18787355720996857,
0.015451944433152676,
-0.08251404762268066,
0.2617388367652893,
0.1111610159277916,
-0.16362012922763824,
-0.3798595070838928,
0.06169590353965759,
-0.07622290402650833,
-0.015012153424322605,
-0.24596934020519257,
-0.16324220597743988,
-0.024310031905770302,
-0.7298651337623596,
0.05867947265505791,
0.49615857005119324,
0.33455440402030945,
-0.16056616604328156,
-0.04783592000603676,
0.13964177668094635,
0.44384774565696716,
0.1628999412059784,
-0.09901812672615051,
-0.34018367528915405,
0.2853395342826843,
0.09737548977136612,
0.18433162569999695,
0.10863793641328812,
0.06814868003129959,
0.21052005887031555,
-0.5777892470359802,
0.03725156560540199,
0.306029736995697,
-0.34495052695274353,
-0.32298538088798523,
-0.19845089316368103,
0.04918496683239937,
0.038163524121046066,
0.028618529438972473,
0.1244889497756958,
-0.03890340402722359,
0.20724399387836456,
-0.04151169955730438,
-0.22646178305149078,
0.13289012014865875,
0.4523313045501709,
0.1129847913980484,
-0.35004591941833496,
0.3907565176486969,
0.3549588918685913,
-0.04477759078145027,
-0.0437440387904644,
0.4166942536830902,
0.6353183388710022,
-0.3456965386867523,
0.09949697554111481,
-0.10271568596363068,
-0.1569867581129074,
-0.011073986068367958,
0.5430944561958313,
-0.23431730270385742,
-0.13097745180130005,
-0.23895679414272308,
-0.04081777483224869,
-0.4308936297893524,
0.010813296772539616,
-0.31629839539527893,
0.45663103461265564,
-0.04322148859500885,
0.36270955204963684,
0.21050532162189484,
-0.18734773993492126,
-0.14413577318191528,
-0.2586488127708435,
0.17234940826892853,
0.36793309450149536,
-0.24718208611011505,
0.21876199543476105,
-0.12695848941802979,
-0.12202277034521103,
-0.03625253215432167,
0.026030853390693665,
-0.24973903596401215,
-0.03339084982872009,
-0.057677797973155975,
0.17730605602264404,
0.06661400943994522,
-0.11354026198387146,
-0.0735473707318306,
-0.1736702024936676,
-0.13858070969581604,
-0.2681717276573181,
-0.03771835193037987,
0.11092091351747513,
-0.11599960178136826,
0.35316169261932373,
-0.1783653348684311,
0.23122534155845642,
0.3186754882335663,
-0.2699998617172241,
-0.10262306034564972,
0.03587070479989052,
0.22296245396137238,
0.06005034223198891,
0.004532386548817158,
-0.06155698746442795,
-0.27723708748817444,
0.11259099841117859,
0.16520337760448456,
0.25497496128082275,
0.204617440700531,
-0.09999638050794601,
0.10917830467224121,
-0.043806593865156174,
0.2041834443807602,
0.10125498473644257,
-0.1718701869249344,
-0.05082887038588524,
0.060372959822416306,
-0.007623572368174791,
0.1006215363740921,
0.14499858021736145,
0.0388689860701561,
0.12528176605701447,
-0.08346445858478546,
0.2755776643753052,
0.066558837890625,
0.3113951086997986,
-0.37050771713256836,
0.04514264315366745,
0.41785672307014465,
-0.24107347428798676,
0.23508600890636444,
0.4640142619609833,
0.014800028875470161,
0.19304944574832916,
0.2907048463821411,
0.10934361070394516,
-0.11870168149471283,
0.32269686460494995,
0.3945169150829315,
0.8204306960105896,
0.5895959734916687,
0.08376991748809814,
0.27460289001464844,
0.09925739467144012,
-0.15360744297504425,
-0.2072506844997406,
0.2358231246471405,
0.39196810126304626,
0.01886700838804245,
0.18569335341453552,
-0.24079890549182892,
-0.48712414503097534,
0.2258816957473755,
0.12177547812461853,
-0.1946176141500473,
-0.0822240486741066,
-0.6648061871528625,
0.011875501833856106,
0.1358264982700348,
-0.18665948510169983,
-0.17971482872962952,
-0.050137199461460114,
0.2205909788608551,
0.25975432991981506,
-0.10322102159261703,
-0.16091208159923553,
-0.17247481644153595,
0.0691017135977745,
0.0375286303460598,
-0.00732995243743062,
0.16975809633731842,
-0.13684530556201935,
0.16176103055477142,
0.24482403695583344,
0.1969076693058014,
0.2849538326263428,
0.4870804250240326,
-0.16817134618759155,
-0.1598939746618271,
-0.01055342610925436,
-0.19236592948436737,
0.08990199863910675,
0.06671139597892761,
0.03153395652770996,
-0.1532081961631775,
-0.014956638216972351,
0.008462493307888508,
0.038628142327070236,
0.03146027401089668,
-0.09408091753721237,
-0.21825915575027466,
0.1676250845193863,
0.30557534098625183,
-0.36377817392349243,
-0.1490931510925293,
-0.09989839047193527,
-0.24665571749210358,
-0.3483101725578308,
-0.26553383469581604,
0.532738447189331,
0.027895571663975716,
0.128010094165802,
0.14216819405555725,
-0.042159657925367355,
0.04878508672118187,
0.15741172432899475,
-0.12155678123235703,
0.07757643610239029,
-0.15409401059150696,
0.1359660029411316,
-0.08580464869737625,
0.03191022947430611,
0.11847498267889023,
-0.3834477365016937,
-0.01884886994957924,
-0.03916456550359726,
0.24254119396209717,
0.0646747574210167,
0.20209071040153503,
-0.09834738820791245,
0.49874529242515564,
0.6146568655967712,
-0.1336161345243454,
-0.1414812207221985,
-0.13041949272155762,
0.37065133452415466,
0.07330799847841263,
-0.07746578752994537,
0.021921372041106224,
0.10242687165737152,
0.006506701465696096,
-0.3420656621456146,
-0.25549033284187317,
-0.01998201757669449,
0.3041451573371887,
0.35128214955329895,
0.09328848868608475,
0.3203136622905731,
-0.01922053098678589,
0.04841059818863869,
-0.24113258719444275,
0.05041498318314552,
-0.1276015043258667,
0.00967057328671217,
-0.022802552208304405,
0.5810174345970154,
-0.22440259158611298,
-0.059341490268707275,
-0.41364961862564087,
0.4290265738964081,
0.09053075313568115,
-0.3388557434082031,
-0.08051913231611252,
0.3583991527557373,
-0.3173205554485321,
-0.20108820497989655,
0.22619524598121643,
0.4100225567817688,
0.1513604074716568,
0.19435736536979675,
-0.5254402160644531,
-0.40691110491752625,
0.44720226526260376,
-0.44170674681663513,
-0.5069129467010498,
0.02907400205731392,
-0.313393771648407,
0.06790363043546677,
0.49642351269721985,
-0.47104936838150024,
-0.14913403987884521,
0.0015055699041113257,
-0.08082757890224457,
-0.09160425513982773,
-0.09819342195987701,
0.2610405683517456,
0.015111553482711315,
-0.25184622406959534,
0.17900702357292175,
0.1764499396085739,
-0.0228157639503479,
-0.42041638493537903,
-0.27535977959632874
] |
https://github.com/huggingface/datasets/issues/2005
|
Setting to torch format not working with torchvision and MNIST
|
# Convert raw tensors to torch format
Strangely, converting to torch tensors works perfectly on `raw_dataset`:
```python
raw_dataset.set_format('torch',columns=['image','label'])
```
Types:
```
Image:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'>
```
Using this for transforms:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
examples["image"][example_idx].numpy()
))
else:
images.append(examples["image"][example_idx].numpy())
labels.append(examples["label"][example_idx])
output = {"label":labels, "image":images}
return output
```
Inside `prepare_train_features`:
```
Image:
<class 'list'> 10000
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'list'> 10000
<class 'torch.Tensor'>
```
After `map`:
```
Image:
<class 'list'> 60000
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'>
```
DataLoader batch:
```
Image:
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 2
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
---
## Using `torch` format:
```
Image:
<class 'list'> 60000
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'>
```
DataLoader batches:
```
Image:
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 2
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
---
## Using the features - `Array3D`:
```
Image:
<class 'list'> 10000
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'list'> 10000
<class 'torch.Tensor'>
```
After `map`:
```
Image:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'>
```
After DataLoader `batch`:
```
Image:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
The last one works perfectly.

I wonder why this worked, and others didn't.
|
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
| 299
|
Setting to torch format not working with torchvision and MNIST
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
# Convert raw tensors to torch format
Strangely, converting to torch tensors works perfectly on `raw_dataset`:
```python
raw_dataset.set_format('torch',columns=['image','label'])
```
Types:
```
Image:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'>
```
Using this for transforms:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
examples["image"][example_idx].numpy()
))
else:
images.append(examples["image"][example_idx].numpy())
labels.append(examples["label"][example_idx])
output = {"label":labels, "image":images}
return output
```
Inside `prepare_train_features`:
```
Image:
<class 'list'> 10000
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'list'> 10000
<class 'torch.Tensor'>
```
After `map`:
```
Image:
<class 'list'> 60000
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'>
```
DataLoader batch:
```
Image:
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 2
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
---
## Using `torch` format:
```
Image:
<class 'list'> 60000
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'>
```
DataLoader batches:
```
Image:
<class 'list'> 1
<class 'list'> 28
<class 'torch.Tensor'> 2
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
---
## Using the features - `Array3D`:
```
Image:
<class 'list'> 10000
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'list'> 10000
<class 'torch.Tensor'>
```
After `map`:
```
Image:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 60000
<class 'torch.Tensor'>
```
After DataLoader `batch`:
```
Image:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'> 1
<class 'torch.Tensor'> 28
<class 'torch.Tensor'> 28
<class 'torch.Tensor'>
Label:
<class 'torch.Tensor'> 2
<class 'torch.Tensor'>
```
The last one works perfectly.

I wonder why this worked, and others didn't.
|
[
-0.12737570703029633,
-0.35116511583328247,
-0.017932923510670662,
0.35361000895500183,
0.47600212693214417,
0.08871375024318695,
0.7330290675163269,
0.38043445348739624,
0.0655258372426033,
-0.03804275766015053,
-0.11115400493144989,
0.3819511830806732,
-0.232968270778656,
-0.33393388986587524,
0.0351090282201767,
-0.5614945292472839,
0.22258029878139496,
-0.09982749819755554,
-0.28079864382743835,
-0.061347298324108124,
-0.2431342899799347,
0.03548954799771309,
-0.21849703788757324,
-0.1084955632686615,
-0.5479358434677124,
0.04409617930650711,
-0.01955590769648552,
-0.07656845450401306,
-0.06229906901717186,
-0.13918034732341766,
0.12234674394130707,
-0.17449605464935303,
0.4444536864757538,
0.7012933492660522,
-0.00012770107423420995,
0.07030169665813446,
0.364272803068161,
-0.17377816140651703,
0.050000473856925964,
-0.16101454198360443,
0.04004686325788498,
-0.2573828101158142,
0.07277651876211166,
-0.09468385577201843,
-0.22349463403224945,
-0.17084583640098572,
0.09591015428304672,
-0.17902974784374237,
-0.028141988441348076,
0.4191688597202301,
0.07713013887405396,
0.27901145815849304,
0.2466621696949005,
0.1386314481496811,
0.22781182825565338,
0.5182868838310242,
-0.2734377086162567,
-0.056116677820682526,
0.22615014016628265,
0.37547871470451355,
0.12400563061237335,
0.5647351145744324,
-0.29133492708206177,
-0.03623355180025101,
0.266944944858551,
0.1290055513381958,
-0.10145455598831177,
-0.31400567293167114,
0.04915764555335045,
0.08946295082569122,
0.42194435000419617,
-0.1494389921426773,
-0.0807788297533989,
-0.14366267621517181,
-0.14397884905338287,
-0.1273804008960724,
0.040591731667518616,
0.28032049536705017,
-0.07184044271707535,
-0.18723881244659424,
-0.5392423868179321,
0.3052913546562195,
-0.1486240178346634,
0.21315890550613403,
-0.28052353858947754,
-0.00341961532831192,
-0.1381634622812271,
0.29280975461006165,
-0.047119006514549255,
-0.1127130463719368,
0.193081334233284,
-0.1234150230884552,
0.13007473945617676,
-0.009825581684708595,
-0.14363226294517517,
-0.05349101126194,
-0.38960033655166626,
-0.3150123357772827,
-0.20014815032482147,
-0.16026559472084045,
0.16648422181606293,
0.13927561044692993,
-0.11639533191919327,
0.12807147204875946,
0.1826331913471222,
0.26803410053253174,
0.10578341782093048,
0.3207029104232788,
-0.08589301258325577,
-0.2895815074443817,
-0.04691976681351662,
0.08773334324359894,
-0.29622700810432434,
-0.43575266003608704,
0.15453515946865082,
0.325297087430954,
0.24522194266319275,
0.06874252110719681,
0.1298559010028839,
-0.323941171169281,
-0.1089225485920906,
-0.009587236680090427,
0.07522497326135635,
0.2850382924079895,
-0.11867944151163101,
0.2439039945602417,
0.4804830253124237,
0.3972030580043793,
-0.15381820499897003,
0.06956276297569275,
0.025072438642382622,
0.031521398574113846,
-0.4404948055744171,
-0.28569871187210083,
0.15340910851955414,
-0.11777321249246597,
0.10007045418024063,
0.03743145242333412,
0.04641531780362129,
0.10069561749696732,
0.07349712401628494,
-0.18587076663970947,
0.624629020690918,
0.14764760434627533,
-0.1944737732410431,
0.2767927348613739,
0.27090680599212646,
0.5297790765762329,
-0.3042984902858734,
0.25653210282325745,
-0.5095705986022949,
0.06525290012359619,
-0.023092517629265785,
-0.01454417034983635,
0.21865519881248474,
-0.020721379667520523,
-0.212163507938385,
0.015828415751457214,
0.5923123359680176,
-0.08367788791656494,
0.27348753809928894,
-0.5791618227958679,
0.0949634462594986,
-0.19133517146110535,
0.034152254462242126,
0.06366843730211258,
-0.20471493899822235,
-0.05235865339636803,
0.38634437322616577,
0.09194900840520859,
0.3154592216014862,
0.16028200089931488,
0.05108356848359108,
0.0798705592751503,
-0.22535325586795807,
-0.2350505143404007,
0.33632397651672363,
-0.3768565356731415,
0.09203927218914032,
-0.017693262547254562,
0.09388009458780289,
-0.06380412727594376,
0.11201874911785126,
0.3361783027648926,
0.032600611448287964,
-0.12800158560276031,
0.02944803424179554,
0.1963144689798355,
-0.16618186235427856,
0.14028693735599518,
0.07735977321863174,
0.191302090883255,
0.19337399303913116,
0.035006530582904816,
-0.015683665871620178,
0.20765356719493866,
-0.22167105972766876,
0.17757576704025269,
-0.05428007245063782,
-0.07471297681331635,
0.07117706537246704,
0.04037829488515854,
-0.36989060044288635,
-0.012196503579616547,
-0.04746989905834198,
0.18646599352359772,
-0.23310047388076782,
-0.04872153326869011,
0.023633727803826332,
0.0822167620062828,
0.05827893689274788,
0.04792506992816925,
0.004977794364094734,
-0.19195637106895447,
-0.18220625817775726,
-0.13902683556079865,
-0.003242077771574259,
0.09221076220273972,
-0.2094762921333313,
-0.2617236077785492,
-0.05234289541840553,
-0.12324877083301544,
0.17830325663089752,
0.05883768945932388,
-0.35903725028038025,
0.05102585256099701,
0.019273217767477036,
-0.36533084511756897,
-0.20136012136936188,
0.17339138686656952,
0.2676694989204407,
-0.09962080419063568,
-0.042235422879457474,
0.19160348176956177,
0.06328949332237244,
0.1146327331662178,
-0.5482736825942993,
0.08346544206142426,
0.17784206569194794,
-0.24697065353393555,
0.20439080893993378,
0.2162802666425705,
0.14853428304195404,
-0.2755032479763031,
-0.19603464007377625,
0.4387865960597992,
0.16040943562984467,
0.315912663936615,
-0.330026239156723,
0.1161012351512909,
-0.07264634966850281,
-0.03940199315547943,
-0.190633624792099,
-0.040807757526636124,
-0.2772822380065918,
0.07302431017160416,
-0.1318601816892624,
0.012982583604753017,
-0.45691853761672974,
-0.04493805393576622,
0.2962622046470642,
0.08876386284828186,
0.17587202787399292,
-0.0012165154330432415,
-0.39984655380249023,
0.2133127748966217,
0.17712648212909698,
-0.6013534069061279,
0.29783862829208374,
-0.004362158942967653,
0.18920691311359406,
-0.10501903295516968,
0.095583975315094,
-0.16254277527332306,
0.2484450340270996,
0.114042729139328,
0.09074881672859192,
-0.19946494698524475,
0.14185264706611633,
-0.10792634636163712,
0.02684619091451168,
0.02637050859630108,
-0.1406290978193283,
-0.23369313776493073,
-0.3589506447315216,
0.2713833451271057,
-0.16618283092975616,
-0.1345188319683075,
-0.40185487270355225,
-0.26218584179878235,
0.0360567644238472,
-0.07400472462177277,
-0.08233476430177689,
0.15075814723968506,
0.18556828796863556,
0.19043514132499695,
0.2634184956550598,
-0.18189533054828644,
0.37431660294532776,
-0.4130289554595947,
-0.035354580730199814,
-0.07500956952571869,
-0.2867961525917053,
-0.09916506707668304,
0.08965617418289185,
-0.5234104990959167,
0.0914849191904068,
-0.22899025678634644,
-0.09319118410348892,
-0.250176340341568,
0.01354741770774126,
0.14182190597057343,
-0.2678496539592743,
-0.2850019037723541,
0.30859076976776123,
0.1939285397529602,
-0.14248299598693848,
0.0406617745757103,
0.266352117061615,
0.01030689850449562,
0.0469016432762146,
0.1537831574678421,
-0.08962060511112213,
0.11655968427658081,
-0.06329794228076935,
-0.17674095928668976,
-0.09661899507045746,
-0.0750613883137703,
-0.0704168975353241,
-0.02175893634557724,
0.06337761878967285,
0.34625765681266785,
0.3721839189529419,
-0.08989089727401733,
-0.05204273387789726,
0.03560885041952133,
0.06296458095312119,
-0.39768847823143005,
0.522503137588501,
-0.22615385055541992,
-0.3608255684375763,
0.1192026361823082,
0.02385600470006466,
0.06514681875705719,
0.4862675368785858,
0.06052308529615402,
0.04973135143518448,
0.011782038025557995,
-0.07894453406333923,
0.252593070268631,
0.22119753062725067,
0.35101956129074097,
-0.09112474322319031,
0.019166184589266777,
-0.16470706462860107,
0.015416686423122883,
-0.10187150537967682,
-0.06325522065162659,
0.6088864803314209,
0.1850852370262146,
0.23994265496730804,
0.09925788640975952,
0.6996644139289856,
-0.0611368790268898,
-0.7380953431129456,
0.21680711209774017,
-0.2425093650817871,
0.1921667605638504,
-0.1181219145655632,
-0.3539586067199707,
0.3988560140132904,
-0.20941965281963348,
0.06437405943870544,
-0.08596731722354889,
-0.024907300248742104,
-0.2391580194234848,
-0.09022410213947296,
0.3573613464832306,
-0.3172072470188141,
-0.15857382118701935,
0.4044298827648163,
-0.14470174908638,
0.27637261152267456,
-0.2313428670167923,
0.32458868622779846,
-0.26092591881752014,
-0.21379251778125763,
0.06005644053220749,
0.4487727880477905,
0.13851283490657806,
0.04172501713037491,
-0.3342851400375366,
-0.21669772267341614,
-0.14322695136070251,
0.3568277955055237,
0.11957772076129913,
0.5672698616981506,
-0.09803582727909088,
-0.07446420937776566,
0.10155694931745529,
0.2413697987794876,
0.8307591676712036,
0.04555749520659447,
-0.09045996516942978,
0.15144257247447968,
-0.3478345572948456,
-0.45497843623161316,
-0.1022297739982605,
-0.05141737684607506,
0.0906815379858017,
0.1716911345720291,
0.120386503636837,
-0.09105350077152252,
-0.1833338737487793,
-0.005832722410559654,
0.19555459916591644,
-0.05512532591819763,
0.03471822291612625,
-0.2269120067358017,
0.05875823274254799,
-0.12965017557144165,
-0.15528295934200287,
0.2211824208498001,
0.029675675556063652,
0.005161960609257221,
-0.3081284463405609,
-0.32623085379600525,
-0.12669925391674042,
0.18248170614242554,
-0.13301241397857666,
0.41106799244880676,
0.09925045818090439,
-0.17808569967746735,
0.07690616697072983,
0.5561061501502991,
0.41840389370918274,
-0.038939449936151505,
-0.1187736913561821,
0.08064316213130951,
0.29311075806617737,
0.1064324676990509,
0.3002043068408966,
0.3208223879337311,
-0.06187339872121811,
-0.4396645724773407,
-0.22684842348098755,
-0.1938147097826004,
-0.3305322825908661,
0.3972935676574707,
0.4080634117126465,
0.0989358127117157,
-0.49535518884658813,
-0.4921706020832062,
0.38619035482406616,
0.29371973872184753,
0.19583012163639069,
0.20459096133708954,
-0.5417592525482178,
-0.40096795558929443,
0.07817897200584412,
0.46624186635017395,
0.8556221723556519,
-0.03707917407155037,
0.3702821433544159,
0.03156490623950958,
0.010806628502905369,
0.17210309207439423,
-0.0018883941229432821,
0.4117940664291382,
-0.35428154468536377,
0.1392892599105835,
-0.1648537665605545,
-0.3125496804714203,
0.25252386927604675,
-0.060203149914741516,
-0.24397021532058716,
0.0425368957221508,
-0.34947165846824646,
0.19361911714076996,
-0.12569408118724823,
-0.08285272121429443,
-0.04982588440179825,
-0.4714173376560211,
0.18787355720996857,
0.015451944433152676,
-0.08251404762268066,
0.2617388367652893,
0.1111610159277916,
-0.16362012922763824,
-0.3798595070838928,
0.06169590353965759,
-0.07622290402650833,
-0.015012153424322605,
-0.24596934020519257,
-0.16324220597743988,
-0.024310031905770302,
-0.7298651337623596,
0.05867947265505791,
0.49615857005119324,
0.33455440402030945,
-0.16056616604328156,
-0.04783592000603676,
0.13964177668094635,
0.44384774565696716,
0.1628999412059784,
-0.09901812672615051,
-0.34018367528915405,
0.2853395342826843,
0.09737548977136612,
0.18433162569999695,
0.10863793641328812,
0.06814868003129959,
0.21052005887031555,
-0.5777892470359802,
0.03725156560540199,
0.306029736995697,
-0.34495052695274353,
-0.32298538088798523,
-0.19845089316368103,
0.04918496683239937,
0.038163524121046066,
0.028618529438972473,
0.1244889497756958,
-0.03890340402722359,
0.20724399387836456,
-0.04151169955730438,
-0.22646178305149078,
0.13289012014865875,
0.4523313045501709,
0.1129847913980484,
-0.35004591941833496,
0.3907565176486969,
0.3549588918685913,
-0.04477759078145027,
-0.0437440387904644,
0.4166942536830902,
0.6353183388710022,
-0.3456965386867523,
0.09949697554111481,
-0.10271568596363068,
-0.1569867581129074,
-0.011073986068367958,
0.5430944561958313,
-0.23431730270385742,
-0.13097745180130005,
-0.23895679414272308,
-0.04081777483224869,
-0.4308936297893524,
0.010813296772539616,
-0.31629839539527893,
0.45663103461265564,
-0.04322148859500885,
0.36270955204963684,
0.21050532162189484,
-0.18734773993492126,
-0.14413577318191528,
-0.2586488127708435,
0.17234940826892853,
0.36793309450149536,
-0.24718208611011505,
0.21876199543476105,
-0.12695848941802979,
-0.12202277034521103,
-0.03625253215432167,
0.026030853390693665,
-0.24973903596401215,
-0.03339084982872009,
-0.057677797973155975,
0.17730605602264404,
0.06661400943994522,
-0.11354026198387146,
-0.0735473707318306,
-0.1736702024936676,
-0.13858070969581604,
-0.2681717276573181,
-0.03771835193037987,
0.11092091351747513,
-0.11599960178136826,
0.35316169261932373,
-0.1783653348684311,
0.23122534155845642,
0.3186754882335663,
-0.2699998617172241,
-0.10262306034564972,
0.03587070479989052,
0.22296245396137238,
0.06005034223198891,
0.004532386548817158,
-0.06155698746442795,
-0.27723708748817444,
0.11259099841117859,
0.16520337760448456,
0.25497496128082275,
0.204617440700531,
-0.09999638050794601,
0.10917830467224121,
-0.043806593865156174,
0.2041834443807602,
0.10125498473644257,
-0.1718701869249344,
-0.05082887038588524,
0.060372959822416306,
-0.007623572368174791,
0.1006215363740921,
0.14499858021736145,
0.0388689860701561,
0.12528176605701447,
-0.08346445858478546,
0.2755776643753052,
0.066558837890625,
0.3113951086997986,
-0.37050771713256836,
0.04514264315366745,
0.41785672307014465,
-0.24107347428798676,
0.23508600890636444,
0.4640142619609833,
0.014800028875470161,
0.19304944574832916,
0.2907048463821411,
0.10934361070394516,
-0.11870168149471283,
0.32269686460494995,
0.3945169150829315,
0.8204306960105896,
0.5895959734916687,
0.08376991748809814,
0.27460289001464844,
0.09925739467144012,
-0.15360744297504425,
-0.2072506844997406,
0.2358231246471405,
0.39196810126304626,
0.01886700838804245,
0.18569335341453552,
-0.24079890549182892,
-0.48712414503097534,
0.2258816957473755,
0.12177547812461853,
-0.1946176141500473,
-0.0822240486741066,
-0.6648061871528625,
0.011875501833856106,
0.1358264982700348,
-0.18665948510169983,
-0.17971482872962952,
-0.050137199461460114,
0.2205909788608551,
0.25975432991981506,
-0.10322102159261703,
-0.16091208159923553,
-0.17247481644153595,
0.0691017135977745,
0.0375286303460598,
-0.00732995243743062,
0.16975809633731842,
-0.13684530556201935,
0.16176103055477142,
0.24482403695583344,
0.1969076693058014,
0.2849538326263428,
0.4870804250240326,
-0.16817134618759155,
-0.1598939746618271,
-0.01055342610925436,
-0.19236592948436737,
0.08990199863910675,
0.06671139597892761,
0.03153395652770996,
-0.1532081961631775,
-0.014956638216972351,
0.008462493307888508,
0.038628142327070236,
0.03146027401089668,
-0.09408091753721237,
-0.21825915575027466,
0.1676250845193863,
0.30557534098625183,
-0.36377817392349243,
-0.1490931510925293,
-0.09989839047193527,
-0.24665571749210358,
-0.3483101725578308,
-0.26553383469581604,
0.532738447189331,
0.027895571663975716,
0.128010094165802,
0.14216819405555725,
-0.042159657925367355,
0.04878508672118187,
0.15741172432899475,
-0.12155678123235703,
0.07757643610239029,
-0.15409401059150696,
0.1359660029411316,
-0.08580464869737625,
0.03191022947430611,
0.11847498267889023,
-0.3834477365016937,
-0.01884886994957924,
-0.03916456550359726,
0.24254119396209717,
0.0646747574210167,
0.20209071040153503,
-0.09834738820791245,
0.49874529242515564,
0.6146568655967712,
-0.1336161345243454,
-0.1414812207221985,
-0.13041949272155762,
0.37065133452415466,
0.07330799847841263,
-0.07746578752994537,
0.021921372041106224,
0.10242687165737152,
0.006506701465696096,
-0.3420656621456146,
-0.25549033284187317,
-0.01998201757669449,
0.3041451573371887,
0.35128214955329895,
0.09328848868608475,
0.3203136622905731,
-0.01922053098678589,
0.04841059818863869,
-0.24113258719444275,
0.05041498318314552,
-0.1276015043258667,
0.00967057328671217,
-0.022802552208304405,
0.5810174345970154,
-0.22440259158611298,
-0.059341490268707275,
-0.41364961862564087,
0.4290265738964081,
0.09053075313568115,
-0.3388557434082031,
-0.08051913231611252,
0.3583991527557373,
-0.3173205554485321,
-0.20108820497989655,
0.22619524598121643,
0.4100225567817688,
0.1513604074716568,
0.19435736536979675,
-0.5254402160644531,
-0.40691110491752625,
0.44720226526260376,
-0.44170674681663513,
-0.5069129467010498,
0.02907400205731392,
-0.313393771648407,
0.06790363043546677,
0.49642351269721985,
-0.47104936838150024,
-0.14913403987884521,
0.0015055699041113257,
-0.08082757890224457,
-0.09160425513982773,
-0.09819342195987701,
0.2610405683517456,
0.015111553482711315,
-0.25184622406959534,
0.17900702357292175,
0.1764499396085739,
-0.0228157639503479,
-0.42041638493537903,
-0.27535977959632874
] |
https://github.com/huggingface/datasets/issues/2005
|
Setting to torch format not working with torchvision and MNIST
|
Concluding, the way it works right now is:
1. Converting raw dataset to `torch` format.
2. Use the transform and apply using `map`, ensure the returned values are tensors.
3. When mapping, use `features` with `image` being `Array3D` type.
|
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
| 39
|
Setting to torch format not working with torchvision and MNIST
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
Concluding, the way it works right now is:
1. Converting raw dataset to `torch` format.
2. Use the transform and apply using `map`, ensure the returned values are tensors.
3. When mapping, use `features` with `image` being `Array3D` type.
|
[
-0.12737570703029633,
-0.35116511583328247,
-0.017932923510670662,
0.35361000895500183,
0.47600212693214417,
0.08871375024318695,
0.7330290675163269,
0.38043445348739624,
0.0655258372426033,
-0.03804275766015053,
-0.11115400493144989,
0.3819511830806732,
-0.232968270778656,
-0.33393388986587524,
0.0351090282201767,
-0.5614945292472839,
0.22258029878139496,
-0.09982749819755554,
-0.28079864382743835,
-0.061347298324108124,
-0.2431342899799347,
0.03548954799771309,
-0.21849703788757324,
-0.1084955632686615,
-0.5479358434677124,
0.04409617930650711,
-0.01955590769648552,
-0.07656845450401306,
-0.06229906901717186,
-0.13918034732341766,
0.12234674394130707,
-0.17449605464935303,
0.4444536864757538,
0.7012933492660522,
-0.00012770107423420995,
0.07030169665813446,
0.364272803068161,
-0.17377816140651703,
0.050000473856925964,
-0.16101454198360443,
0.04004686325788498,
-0.2573828101158142,
0.07277651876211166,
-0.09468385577201843,
-0.22349463403224945,
-0.17084583640098572,
0.09591015428304672,
-0.17902974784374237,
-0.028141988441348076,
0.4191688597202301,
0.07713013887405396,
0.27901145815849304,
0.2466621696949005,
0.1386314481496811,
0.22781182825565338,
0.5182868838310242,
-0.2734377086162567,
-0.056116677820682526,
0.22615014016628265,
0.37547871470451355,
0.12400563061237335,
0.5647351145744324,
-0.29133492708206177,
-0.03623355180025101,
0.266944944858551,
0.1290055513381958,
-0.10145455598831177,
-0.31400567293167114,
0.04915764555335045,
0.08946295082569122,
0.42194435000419617,
-0.1494389921426773,
-0.0807788297533989,
-0.14366267621517181,
-0.14397884905338287,
-0.1273804008960724,
0.040591731667518616,
0.28032049536705017,
-0.07184044271707535,
-0.18723881244659424,
-0.5392423868179321,
0.3052913546562195,
-0.1486240178346634,
0.21315890550613403,
-0.28052353858947754,
-0.00341961532831192,
-0.1381634622812271,
0.29280975461006165,
-0.047119006514549255,
-0.1127130463719368,
0.193081334233284,
-0.1234150230884552,
0.13007473945617676,
-0.009825581684708595,
-0.14363226294517517,
-0.05349101126194,
-0.38960033655166626,
-0.3150123357772827,
-0.20014815032482147,
-0.16026559472084045,
0.16648422181606293,
0.13927561044692993,
-0.11639533191919327,
0.12807147204875946,
0.1826331913471222,
0.26803410053253174,
0.10578341782093048,
0.3207029104232788,
-0.08589301258325577,
-0.2895815074443817,
-0.04691976681351662,
0.08773334324359894,
-0.29622700810432434,
-0.43575266003608704,
0.15453515946865082,
0.325297087430954,
0.24522194266319275,
0.06874252110719681,
0.1298559010028839,
-0.323941171169281,
-0.1089225485920906,
-0.009587236680090427,
0.07522497326135635,
0.2850382924079895,
-0.11867944151163101,
0.2439039945602417,
0.4804830253124237,
0.3972030580043793,
-0.15381820499897003,
0.06956276297569275,
0.025072438642382622,
0.031521398574113846,
-0.4404948055744171,
-0.28569871187210083,
0.15340910851955414,
-0.11777321249246597,
0.10007045418024063,
0.03743145242333412,
0.04641531780362129,
0.10069561749696732,
0.07349712401628494,
-0.18587076663970947,
0.624629020690918,
0.14764760434627533,
-0.1944737732410431,
0.2767927348613739,
0.27090680599212646,
0.5297790765762329,
-0.3042984902858734,
0.25653210282325745,
-0.5095705986022949,
0.06525290012359619,
-0.023092517629265785,
-0.01454417034983635,
0.21865519881248474,
-0.020721379667520523,
-0.212163507938385,
0.015828415751457214,
0.5923123359680176,
-0.08367788791656494,
0.27348753809928894,
-0.5791618227958679,
0.0949634462594986,
-0.19133517146110535,
0.034152254462242126,
0.06366843730211258,
-0.20471493899822235,
-0.05235865339636803,
0.38634437322616577,
0.09194900840520859,
0.3154592216014862,
0.16028200089931488,
0.05108356848359108,
0.0798705592751503,
-0.22535325586795807,
-0.2350505143404007,
0.33632397651672363,
-0.3768565356731415,
0.09203927218914032,
-0.017693262547254562,
0.09388009458780289,
-0.06380412727594376,
0.11201874911785126,
0.3361783027648926,
0.032600611448287964,
-0.12800158560276031,
0.02944803424179554,
0.1963144689798355,
-0.16618186235427856,
0.14028693735599518,
0.07735977321863174,
0.191302090883255,
0.19337399303913116,
0.035006530582904816,
-0.015683665871620178,
0.20765356719493866,
-0.22167105972766876,
0.17757576704025269,
-0.05428007245063782,
-0.07471297681331635,
0.07117706537246704,
0.04037829488515854,
-0.36989060044288635,
-0.012196503579616547,
-0.04746989905834198,
0.18646599352359772,
-0.23310047388076782,
-0.04872153326869011,
0.023633727803826332,
0.0822167620062828,
0.05827893689274788,
0.04792506992816925,
0.004977794364094734,
-0.19195637106895447,
-0.18220625817775726,
-0.13902683556079865,
-0.003242077771574259,
0.09221076220273972,
-0.2094762921333313,
-0.2617236077785492,
-0.05234289541840553,
-0.12324877083301544,
0.17830325663089752,
0.05883768945932388,
-0.35903725028038025,
0.05102585256099701,
0.019273217767477036,
-0.36533084511756897,
-0.20136012136936188,
0.17339138686656952,
0.2676694989204407,
-0.09962080419063568,
-0.042235422879457474,
0.19160348176956177,
0.06328949332237244,
0.1146327331662178,
-0.5482736825942993,
0.08346544206142426,
0.17784206569194794,
-0.24697065353393555,
0.20439080893993378,
0.2162802666425705,
0.14853428304195404,
-0.2755032479763031,
-0.19603464007377625,
0.4387865960597992,
0.16040943562984467,
0.315912663936615,
-0.330026239156723,
0.1161012351512909,
-0.07264634966850281,
-0.03940199315547943,
-0.190633624792099,
-0.040807757526636124,
-0.2772822380065918,
0.07302431017160416,
-0.1318601816892624,
0.012982583604753017,
-0.45691853761672974,
-0.04493805393576622,
0.2962622046470642,
0.08876386284828186,
0.17587202787399292,
-0.0012165154330432415,
-0.39984655380249023,
0.2133127748966217,
0.17712648212909698,
-0.6013534069061279,
0.29783862829208374,
-0.004362158942967653,
0.18920691311359406,
-0.10501903295516968,
0.095583975315094,
-0.16254277527332306,
0.2484450340270996,
0.114042729139328,
0.09074881672859192,
-0.19946494698524475,
0.14185264706611633,
-0.10792634636163712,
0.02684619091451168,
0.02637050859630108,
-0.1406290978193283,
-0.23369313776493073,
-0.3589506447315216,
0.2713833451271057,
-0.16618283092975616,
-0.1345188319683075,
-0.40185487270355225,
-0.26218584179878235,
0.0360567644238472,
-0.07400472462177277,
-0.08233476430177689,
0.15075814723968506,
0.18556828796863556,
0.19043514132499695,
0.2634184956550598,
-0.18189533054828644,
0.37431660294532776,
-0.4130289554595947,
-0.035354580730199814,
-0.07500956952571869,
-0.2867961525917053,
-0.09916506707668304,
0.08965617418289185,
-0.5234104990959167,
0.0914849191904068,
-0.22899025678634644,
-0.09319118410348892,
-0.250176340341568,
0.01354741770774126,
0.14182190597057343,
-0.2678496539592743,
-0.2850019037723541,
0.30859076976776123,
0.1939285397529602,
-0.14248299598693848,
0.0406617745757103,
0.266352117061615,
0.01030689850449562,
0.0469016432762146,
0.1537831574678421,
-0.08962060511112213,
0.11655968427658081,
-0.06329794228076935,
-0.17674095928668976,
-0.09661899507045746,
-0.0750613883137703,
-0.0704168975353241,
-0.02175893634557724,
0.06337761878967285,
0.34625765681266785,
0.3721839189529419,
-0.08989089727401733,
-0.05204273387789726,
0.03560885041952133,
0.06296458095312119,
-0.39768847823143005,
0.522503137588501,
-0.22615385055541992,
-0.3608255684375763,
0.1192026361823082,
0.02385600470006466,
0.06514681875705719,
0.4862675368785858,
0.06052308529615402,
0.04973135143518448,
0.011782038025557995,
-0.07894453406333923,
0.252593070268631,
0.22119753062725067,
0.35101956129074097,
-0.09112474322319031,
0.019166184589266777,
-0.16470706462860107,
0.015416686423122883,
-0.10187150537967682,
-0.06325522065162659,
0.6088864803314209,
0.1850852370262146,
0.23994265496730804,
0.09925788640975952,
0.6996644139289856,
-0.0611368790268898,
-0.7380953431129456,
0.21680711209774017,
-0.2425093650817871,
0.1921667605638504,
-0.1181219145655632,
-0.3539586067199707,
0.3988560140132904,
-0.20941965281963348,
0.06437405943870544,
-0.08596731722354889,
-0.024907300248742104,
-0.2391580194234848,
-0.09022410213947296,
0.3573613464832306,
-0.3172072470188141,
-0.15857382118701935,
0.4044298827648163,
-0.14470174908638,
0.27637261152267456,
-0.2313428670167923,
0.32458868622779846,
-0.26092591881752014,
-0.21379251778125763,
0.06005644053220749,
0.4487727880477905,
0.13851283490657806,
0.04172501713037491,
-0.3342851400375366,
-0.21669772267341614,
-0.14322695136070251,
0.3568277955055237,
0.11957772076129913,
0.5672698616981506,
-0.09803582727909088,
-0.07446420937776566,
0.10155694931745529,
0.2413697987794876,
0.8307591676712036,
0.04555749520659447,
-0.09045996516942978,
0.15144257247447968,
-0.3478345572948456,
-0.45497843623161316,
-0.1022297739982605,
-0.05141737684607506,
0.0906815379858017,
0.1716911345720291,
0.120386503636837,
-0.09105350077152252,
-0.1833338737487793,
-0.005832722410559654,
0.19555459916591644,
-0.05512532591819763,
0.03471822291612625,
-0.2269120067358017,
0.05875823274254799,
-0.12965017557144165,
-0.15528295934200287,
0.2211824208498001,
0.029675675556063652,
0.005161960609257221,
-0.3081284463405609,
-0.32623085379600525,
-0.12669925391674042,
0.18248170614242554,
-0.13301241397857666,
0.41106799244880676,
0.09925045818090439,
-0.17808569967746735,
0.07690616697072983,
0.5561061501502991,
0.41840389370918274,
-0.038939449936151505,
-0.1187736913561821,
0.08064316213130951,
0.29311075806617737,
0.1064324676990509,
0.3002043068408966,
0.3208223879337311,
-0.06187339872121811,
-0.4396645724773407,
-0.22684842348098755,
-0.1938147097826004,
-0.3305322825908661,
0.3972935676574707,
0.4080634117126465,
0.0989358127117157,
-0.49535518884658813,
-0.4921706020832062,
0.38619035482406616,
0.29371973872184753,
0.19583012163639069,
0.20459096133708954,
-0.5417592525482178,
-0.40096795558929443,
0.07817897200584412,
0.46624186635017395,
0.8556221723556519,
-0.03707917407155037,
0.3702821433544159,
0.03156490623950958,
0.010806628502905369,
0.17210309207439423,
-0.0018883941229432821,
0.4117940664291382,
-0.35428154468536377,
0.1392892599105835,
-0.1648537665605545,
-0.3125496804714203,
0.25252386927604675,
-0.060203149914741516,
-0.24397021532058716,
0.0425368957221508,
-0.34947165846824646,
0.19361911714076996,
-0.12569408118724823,
-0.08285272121429443,
-0.04982588440179825,
-0.4714173376560211,
0.18787355720996857,
0.015451944433152676,
-0.08251404762268066,
0.2617388367652893,
0.1111610159277916,
-0.16362012922763824,
-0.3798595070838928,
0.06169590353965759,
-0.07622290402650833,
-0.015012153424322605,
-0.24596934020519257,
-0.16324220597743988,
-0.024310031905770302,
-0.7298651337623596,
0.05867947265505791,
0.49615857005119324,
0.33455440402030945,
-0.16056616604328156,
-0.04783592000603676,
0.13964177668094635,
0.44384774565696716,
0.1628999412059784,
-0.09901812672615051,
-0.34018367528915405,
0.2853395342826843,
0.09737548977136612,
0.18433162569999695,
0.10863793641328812,
0.06814868003129959,
0.21052005887031555,
-0.5777892470359802,
0.03725156560540199,
0.306029736995697,
-0.34495052695274353,
-0.32298538088798523,
-0.19845089316368103,
0.04918496683239937,
0.038163524121046066,
0.028618529438972473,
0.1244889497756958,
-0.03890340402722359,
0.20724399387836456,
-0.04151169955730438,
-0.22646178305149078,
0.13289012014865875,
0.4523313045501709,
0.1129847913980484,
-0.35004591941833496,
0.3907565176486969,
0.3549588918685913,
-0.04477759078145027,
-0.0437440387904644,
0.4166942536830902,
0.6353183388710022,
-0.3456965386867523,
0.09949697554111481,
-0.10271568596363068,
-0.1569867581129074,
-0.011073986068367958,
0.5430944561958313,
-0.23431730270385742,
-0.13097745180130005,
-0.23895679414272308,
-0.04081777483224869,
-0.4308936297893524,
0.010813296772539616,
-0.31629839539527893,
0.45663103461265564,
-0.04322148859500885,
0.36270955204963684,
0.21050532162189484,
-0.18734773993492126,
-0.14413577318191528,
-0.2586488127708435,
0.17234940826892853,
0.36793309450149536,
-0.24718208611011505,
0.21876199543476105,
-0.12695848941802979,
-0.12202277034521103,
-0.03625253215432167,
0.026030853390693665,
-0.24973903596401215,
-0.03339084982872009,
-0.057677797973155975,
0.17730605602264404,
0.06661400943994522,
-0.11354026198387146,
-0.0735473707318306,
-0.1736702024936676,
-0.13858070969581604,
-0.2681717276573181,
-0.03771835193037987,
0.11092091351747513,
-0.11599960178136826,
0.35316169261932373,
-0.1783653348684311,
0.23122534155845642,
0.3186754882335663,
-0.2699998617172241,
-0.10262306034564972,
0.03587070479989052,
0.22296245396137238,
0.06005034223198891,
0.004532386548817158,
-0.06155698746442795,
-0.27723708748817444,
0.11259099841117859,
0.16520337760448456,
0.25497496128082275,
0.204617440700531,
-0.09999638050794601,
0.10917830467224121,
-0.043806593865156174,
0.2041834443807602,
0.10125498473644257,
-0.1718701869249344,
-0.05082887038588524,
0.060372959822416306,
-0.007623572368174791,
0.1006215363740921,
0.14499858021736145,
0.0388689860701561,
0.12528176605701447,
-0.08346445858478546,
0.2755776643753052,
0.066558837890625,
0.3113951086997986,
-0.37050771713256836,
0.04514264315366745,
0.41785672307014465,
-0.24107347428798676,
0.23508600890636444,
0.4640142619609833,
0.014800028875470161,
0.19304944574832916,
0.2907048463821411,
0.10934361070394516,
-0.11870168149471283,
0.32269686460494995,
0.3945169150829315,
0.8204306960105896,
0.5895959734916687,
0.08376991748809814,
0.27460289001464844,
0.09925739467144012,
-0.15360744297504425,
-0.2072506844997406,
0.2358231246471405,
0.39196810126304626,
0.01886700838804245,
0.18569335341453552,
-0.24079890549182892,
-0.48712414503097534,
0.2258816957473755,
0.12177547812461853,
-0.1946176141500473,
-0.0822240486741066,
-0.6648061871528625,
0.011875501833856106,
0.1358264982700348,
-0.18665948510169983,
-0.17971482872962952,
-0.050137199461460114,
0.2205909788608551,
0.25975432991981506,
-0.10322102159261703,
-0.16091208159923553,
-0.17247481644153595,
0.0691017135977745,
0.0375286303460598,
-0.00732995243743062,
0.16975809633731842,
-0.13684530556201935,
0.16176103055477142,
0.24482403695583344,
0.1969076693058014,
0.2849538326263428,
0.4870804250240326,
-0.16817134618759155,
-0.1598939746618271,
-0.01055342610925436,
-0.19236592948436737,
0.08990199863910675,
0.06671139597892761,
0.03153395652770996,
-0.1532081961631775,
-0.014956638216972351,
0.008462493307888508,
0.038628142327070236,
0.03146027401089668,
-0.09408091753721237,
-0.21825915575027466,
0.1676250845193863,
0.30557534098625183,
-0.36377817392349243,
-0.1490931510925293,
-0.09989839047193527,
-0.24665571749210358,
-0.3483101725578308,
-0.26553383469581604,
0.532738447189331,
0.027895571663975716,
0.128010094165802,
0.14216819405555725,
-0.042159657925367355,
0.04878508672118187,
0.15741172432899475,
-0.12155678123235703,
0.07757643610239029,
-0.15409401059150696,
0.1359660029411316,
-0.08580464869737625,
0.03191022947430611,
0.11847498267889023,
-0.3834477365016937,
-0.01884886994957924,
-0.03916456550359726,
0.24254119396209717,
0.0646747574210167,
0.20209071040153503,
-0.09834738820791245,
0.49874529242515564,
0.6146568655967712,
-0.1336161345243454,
-0.1414812207221985,
-0.13041949272155762,
0.37065133452415466,
0.07330799847841263,
-0.07746578752994537,
0.021921372041106224,
0.10242687165737152,
0.006506701465696096,
-0.3420656621456146,
-0.25549033284187317,
-0.01998201757669449,
0.3041451573371887,
0.35128214955329895,
0.09328848868608475,
0.3203136622905731,
-0.01922053098678589,
0.04841059818863869,
-0.24113258719444275,
0.05041498318314552,
-0.1276015043258667,
0.00967057328671217,
-0.022802552208304405,
0.5810174345970154,
-0.22440259158611298,
-0.059341490268707275,
-0.41364961862564087,
0.4290265738964081,
0.09053075313568115,
-0.3388557434082031,
-0.08051913231611252,
0.3583991527557373,
-0.3173205554485321,
-0.20108820497989655,
0.22619524598121643,
0.4100225567817688,
0.1513604074716568,
0.19435736536979675,
-0.5254402160644531,
-0.40691110491752625,
0.44720226526260376,
-0.44170674681663513,
-0.5069129467010498,
0.02907400205731392,
-0.313393771648407,
0.06790363043546677,
0.49642351269721985,
-0.47104936838150024,
-0.14913403987884521,
0.0015055699041113257,
-0.08082757890224457,
-0.09160425513982773,
-0.09819342195987701,
0.2610405683517456,
0.015111553482711315,
-0.25184622406959534,
0.17900702357292175,
0.1764499396085739,
-0.0228157639503479,
-0.42041638493537903,
-0.27535977959632874
] |
https://github.com/huggingface/datasets/issues/2005
|
Setting to torch format not working with torchvision and MNIST
|
What the dataset returns depends on the feature type.
For a feature type that is Sequence(Sequence(Sequence(Value("uint8")))), a dataset formatted as "torch" return lists of lists of tensors. This is because the lists lengths may vary.
For a feature type that is Array3D on the other hand it returns one tensor. This is because the size of the tensor is fixed and defined bu the Array3D type.
|
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
| 66
|
Setting to torch format not working with torchvision and MNIST
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
What the dataset returns depends on the feature type.
For a feature type that is Sequence(Sequence(Sequence(Value("uint8")))), a dataset formatted as "torch" return lists of lists of tensors. This is because the lists lengths may vary.
For a feature type that is Array3D on the other hand it returns one tensor. This is because the size of the tensor is fixed and defined bu the Array3D type.
|
[
-0.12737570703029633,
-0.35116511583328247,
-0.017932923510670662,
0.35361000895500183,
0.47600212693214417,
0.08871375024318695,
0.7330290675163269,
0.38043445348739624,
0.0655258372426033,
-0.03804275766015053,
-0.11115400493144989,
0.3819511830806732,
-0.232968270778656,
-0.33393388986587524,
0.0351090282201767,
-0.5614945292472839,
0.22258029878139496,
-0.09982749819755554,
-0.28079864382743835,
-0.061347298324108124,
-0.2431342899799347,
0.03548954799771309,
-0.21849703788757324,
-0.1084955632686615,
-0.5479358434677124,
0.04409617930650711,
-0.01955590769648552,
-0.07656845450401306,
-0.06229906901717186,
-0.13918034732341766,
0.12234674394130707,
-0.17449605464935303,
0.4444536864757538,
0.7012933492660522,
-0.00012770107423420995,
0.07030169665813446,
0.364272803068161,
-0.17377816140651703,
0.050000473856925964,
-0.16101454198360443,
0.04004686325788498,
-0.2573828101158142,
0.07277651876211166,
-0.09468385577201843,
-0.22349463403224945,
-0.17084583640098572,
0.09591015428304672,
-0.17902974784374237,
-0.028141988441348076,
0.4191688597202301,
0.07713013887405396,
0.27901145815849304,
0.2466621696949005,
0.1386314481496811,
0.22781182825565338,
0.5182868838310242,
-0.2734377086162567,
-0.056116677820682526,
0.22615014016628265,
0.37547871470451355,
0.12400563061237335,
0.5647351145744324,
-0.29133492708206177,
-0.03623355180025101,
0.266944944858551,
0.1290055513381958,
-0.10145455598831177,
-0.31400567293167114,
0.04915764555335045,
0.08946295082569122,
0.42194435000419617,
-0.1494389921426773,
-0.0807788297533989,
-0.14366267621517181,
-0.14397884905338287,
-0.1273804008960724,
0.040591731667518616,
0.28032049536705017,
-0.07184044271707535,
-0.18723881244659424,
-0.5392423868179321,
0.3052913546562195,
-0.1486240178346634,
0.21315890550613403,
-0.28052353858947754,
-0.00341961532831192,
-0.1381634622812271,
0.29280975461006165,
-0.047119006514549255,
-0.1127130463719368,
0.193081334233284,
-0.1234150230884552,
0.13007473945617676,
-0.009825581684708595,
-0.14363226294517517,
-0.05349101126194,
-0.38960033655166626,
-0.3150123357772827,
-0.20014815032482147,
-0.16026559472084045,
0.16648422181606293,
0.13927561044692993,
-0.11639533191919327,
0.12807147204875946,
0.1826331913471222,
0.26803410053253174,
0.10578341782093048,
0.3207029104232788,
-0.08589301258325577,
-0.2895815074443817,
-0.04691976681351662,
0.08773334324359894,
-0.29622700810432434,
-0.43575266003608704,
0.15453515946865082,
0.325297087430954,
0.24522194266319275,
0.06874252110719681,
0.1298559010028839,
-0.323941171169281,
-0.1089225485920906,
-0.009587236680090427,
0.07522497326135635,
0.2850382924079895,
-0.11867944151163101,
0.2439039945602417,
0.4804830253124237,
0.3972030580043793,
-0.15381820499897003,
0.06956276297569275,
0.025072438642382622,
0.031521398574113846,
-0.4404948055744171,
-0.28569871187210083,
0.15340910851955414,
-0.11777321249246597,
0.10007045418024063,
0.03743145242333412,
0.04641531780362129,
0.10069561749696732,
0.07349712401628494,
-0.18587076663970947,
0.624629020690918,
0.14764760434627533,
-0.1944737732410431,
0.2767927348613739,
0.27090680599212646,
0.5297790765762329,
-0.3042984902858734,
0.25653210282325745,
-0.5095705986022949,
0.06525290012359619,
-0.023092517629265785,
-0.01454417034983635,
0.21865519881248474,
-0.020721379667520523,
-0.212163507938385,
0.015828415751457214,
0.5923123359680176,
-0.08367788791656494,
0.27348753809928894,
-0.5791618227958679,
0.0949634462594986,
-0.19133517146110535,
0.034152254462242126,
0.06366843730211258,
-0.20471493899822235,
-0.05235865339636803,
0.38634437322616577,
0.09194900840520859,
0.3154592216014862,
0.16028200089931488,
0.05108356848359108,
0.0798705592751503,
-0.22535325586795807,
-0.2350505143404007,
0.33632397651672363,
-0.3768565356731415,
0.09203927218914032,
-0.017693262547254562,
0.09388009458780289,
-0.06380412727594376,
0.11201874911785126,
0.3361783027648926,
0.032600611448287964,
-0.12800158560276031,
0.02944803424179554,
0.1963144689798355,
-0.16618186235427856,
0.14028693735599518,
0.07735977321863174,
0.191302090883255,
0.19337399303913116,
0.035006530582904816,
-0.015683665871620178,
0.20765356719493866,
-0.22167105972766876,
0.17757576704025269,
-0.05428007245063782,
-0.07471297681331635,
0.07117706537246704,
0.04037829488515854,
-0.36989060044288635,
-0.012196503579616547,
-0.04746989905834198,
0.18646599352359772,
-0.23310047388076782,
-0.04872153326869011,
0.023633727803826332,
0.0822167620062828,
0.05827893689274788,
0.04792506992816925,
0.004977794364094734,
-0.19195637106895447,
-0.18220625817775726,
-0.13902683556079865,
-0.003242077771574259,
0.09221076220273972,
-0.2094762921333313,
-0.2617236077785492,
-0.05234289541840553,
-0.12324877083301544,
0.17830325663089752,
0.05883768945932388,
-0.35903725028038025,
0.05102585256099701,
0.019273217767477036,
-0.36533084511756897,
-0.20136012136936188,
0.17339138686656952,
0.2676694989204407,
-0.09962080419063568,
-0.042235422879457474,
0.19160348176956177,
0.06328949332237244,
0.1146327331662178,
-0.5482736825942993,
0.08346544206142426,
0.17784206569194794,
-0.24697065353393555,
0.20439080893993378,
0.2162802666425705,
0.14853428304195404,
-0.2755032479763031,
-0.19603464007377625,
0.4387865960597992,
0.16040943562984467,
0.315912663936615,
-0.330026239156723,
0.1161012351512909,
-0.07264634966850281,
-0.03940199315547943,
-0.190633624792099,
-0.040807757526636124,
-0.2772822380065918,
0.07302431017160416,
-0.1318601816892624,
0.012982583604753017,
-0.45691853761672974,
-0.04493805393576622,
0.2962622046470642,
0.08876386284828186,
0.17587202787399292,
-0.0012165154330432415,
-0.39984655380249023,
0.2133127748966217,
0.17712648212909698,
-0.6013534069061279,
0.29783862829208374,
-0.004362158942967653,
0.18920691311359406,
-0.10501903295516968,
0.095583975315094,
-0.16254277527332306,
0.2484450340270996,
0.114042729139328,
0.09074881672859192,
-0.19946494698524475,
0.14185264706611633,
-0.10792634636163712,
0.02684619091451168,
0.02637050859630108,
-0.1406290978193283,
-0.23369313776493073,
-0.3589506447315216,
0.2713833451271057,
-0.16618283092975616,
-0.1345188319683075,
-0.40185487270355225,
-0.26218584179878235,
0.0360567644238472,
-0.07400472462177277,
-0.08233476430177689,
0.15075814723968506,
0.18556828796863556,
0.19043514132499695,
0.2634184956550598,
-0.18189533054828644,
0.37431660294532776,
-0.4130289554595947,
-0.035354580730199814,
-0.07500956952571869,
-0.2867961525917053,
-0.09916506707668304,
0.08965617418289185,
-0.5234104990959167,
0.0914849191904068,
-0.22899025678634644,
-0.09319118410348892,
-0.250176340341568,
0.01354741770774126,
0.14182190597057343,
-0.2678496539592743,
-0.2850019037723541,
0.30859076976776123,
0.1939285397529602,
-0.14248299598693848,
0.0406617745757103,
0.266352117061615,
0.01030689850449562,
0.0469016432762146,
0.1537831574678421,
-0.08962060511112213,
0.11655968427658081,
-0.06329794228076935,
-0.17674095928668976,
-0.09661899507045746,
-0.0750613883137703,
-0.0704168975353241,
-0.02175893634557724,
0.06337761878967285,
0.34625765681266785,
0.3721839189529419,
-0.08989089727401733,
-0.05204273387789726,
0.03560885041952133,
0.06296458095312119,
-0.39768847823143005,
0.522503137588501,
-0.22615385055541992,
-0.3608255684375763,
0.1192026361823082,
0.02385600470006466,
0.06514681875705719,
0.4862675368785858,
0.06052308529615402,
0.04973135143518448,
0.011782038025557995,
-0.07894453406333923,
0.252593070268631,
0.22119753062725067,
0.35101956129074097,
-0.09112474322319031,
0.019166184589266777,
-0.16470706462860107,
0.015416686423122883,
-0.10187150537967682,
-0.06325522065162659,
0.6088864803314209,
0.1850852370262146,
0.23994265496730804,
0.09925788640975952,
0.6996644139289856,
-0.0611368790268898,
-0.7380953431129456,
0.21680711209774017,
-0.2425093650817871,
0.1921667605638504,
-0.1181219145655632,
-0.3539586067199707,
0.3988560140132904,
-0.20941965281963348,
0.06437405943870544,
-0.08596731722354889,
-0.024907300248742104,
-0.2391580194234848,
-0.09022410213947296,
0.3573613464832306,
-0.3172072470188141,
-0.15857382118701935,
0.4044298827648163,
-0.14470174908638,
0.27637261152267456,
-0.2313428670167923,
0.32458868622779846,
-0.26092591881752014,
-0.21379251778125763,
0.06005644053220749,
0.4487727880477905,
0.13851283490657806,
0.04172501713037491,
-0.3342851400375366,
-0.21669772267341614,
-0.14322695136070251,
0.3568277955055237,
0.11957772076129913,
0.5672698616981506,
-0.09803582727909088,
-0.07446420937776566,
0.10155694931745529,
0.2413697987794876,
0.8307591676712036,
0.04555749520659447,
-0.09045996516942978,
0.15144257247447968,
-0.3478345572948456,
-0.45497843623161316,
-0.1022297739982605,
-0.05141737684607506,
0.0906815379858017,
0.1716911345720291,
0.120386503636837,
-0.09105350077152252,
-0.1833338737487793,
-0.005832722410559654,
0.19555459916591644,
-0.05512532591819763,
0.03471822291612625,
-0.2269120067358017,
0.05875823274254799,
-0.12965017557144165,
-0.15528295934200287,
0.2211824208498001,
0.029675675556063652,
0.005161960609257221,
-0.3081284463405609,
-0.32623085379600525,
-0.12669925391674042,
0.18248170614242554,
-0.13301241397857666,
0.41106799244880676,
0.09925045818090439,
-0.17808569967746735,
0.07690616697072983,
0.5561061501502991,
0.41840389370918274,
-0.038939449936151505,
-0.1187736913561821,
0.08064316213130951,
0.29311075806617737,
0.1064324676990509,
0.3002043068408966,
0.3208223879337311,
-0.06187339872121811,
-0.4396645724773407,
-0.22684842348098755,
-0.1938147097826004,
-0.3305322825908661,
0.3972935676574707,
0.4080634117126465,
0.0989358127117157,
-0.49535518884658813,
-0.4921706020832062,
0.38619035482406616,
0.29371973872184753,
0.19583012163639069,
0.20459096133708954,
-0.5417592525482178,
-0.40096795558929443,
0.07817897200584412,
0.46624186635017395,
0.8556221723556519,
-0.03707917407155037,
0.3702821433544159,
0.03156490623950958,
0.010806628502905369,
0.17210309207439423,
-0.0018883941229432821,
0.4117940664291382,
-0.35428154468536377,
0.1392892599105835,
-0.1648537665605545,
-0.3125496804714203,
0.25252386927604675,
-0.060203149914741516,
-0.24397021532058716,
0.0425368957221508,
-0.34947165846824646,
0.19361911714076996,
-0.12569408118724823,
-0.08285272121429443,
-0.04982588440179825,
-0.4714173376560211,
0.18787355720996857,
0.015451944433152676,
-0.08251404762268066,
0.2617388367652893,
0.1111610159277916,
-0.16362012922763824,
-0.3798595070838928,
0.06169590353965759,
-0.07622290402650833,
-0.015012153424322605,
-0.24596934020519257,
-0.16324220597743988,
-0.024310031905770302,
-0.7298651337623596,
0.05867947265505791,
0.49615857005119324,
0.33455440402030945,
-0.16056616604328156,
-0.04783592000603676,
0.13964177668094635,
0.44384774565696716,
0.1628999412059784,
-0.09901812672615051,
-0.34018367528915405,
0.2853395342826843,
0.09737548977136612,
0.18433162569999695,
0.10863793641328812,
0.06814868003129959,
0.21052005887031555,
-0.5777892470359802,
0.03725156560540199,
0.306029736995697,
-0.34495052695274353,
-0.32298538088798523,
-0.19845089316368103,
0.04918496683239937,
0.038163524121046066,
0.028618529438972473,
0.1244889497756958,
-0.03890340402722359,
0.20724399387836456,
-0.04151169955730438,
-0.22646178305149078,
0.13289012014865875,
0.4523313045501709,
0.1129847913980484,
-0.35004591941833496,
0.3907565176486969,
0.3549588918685913,
-0.04477759078145027,
-0.0437440387904644,
0.4166942536830902,
0.6353183388710022,
-0.3456965386867523,
0.09949697554111481,
-0.10271568596363068,
-0.1569867581129074,
-0.011073986068367958,
0.5430944561958313,
-0.23431730270385742,
-0.13097745180130005,
-0.23895679414272308,
-0.04081777483224869,
-0.4308936297893524,
0.010813296772539616,
-0.31629839539527893,
0.45663103461265564,
-0.04322148859500885,
0.36270955204963684,
0.21050532162189484,
-0.18734773993492126,
-0.14413577318191528,
-0.2586488127708435,
0.17234940826892853,
0.36793309450149536,
-0.24718208611011505,
0.21876199543476105,
-0.12695848941802979,
-0.12202277034521103,
-0.03625253215432167,
0.026030853390693665,
-0.24973903596401215,
-0.03339084982872009,
-0.057677797973155975,
0.17730605602264404,
0.06661400943994522,
-0.11354026198387146,
-0.0735473707318306,
-0.1736702024936676,
-0.13858070969581604,
-0.2681717276573181,
-0.03771835193037987,
0.11092091351747513,
-0.11599960178136826,
0.35316169261932373,
-0.1783653348684311,
0.23122534155845642,
0.3186754882335663,
-0.2699998617172241,
-0.10262306034564972,
0.03587070479989052,
0.22296245396137238,
0.06005034223198891,
0.004532386548817158,
-0.06155698746442795,
-0.27723708748817444,
0.11259099841117859,
0.16520337760448456,
0.25497496128082275,
0.204617440700531,
-0.09999638050794601,
0.10917830467224121,
-0.043806593865156174,
0.2041834443807602,
0.10125498473644257,
-0.1718701869249344,
-0.05082887038588524,
0.060372959822416306,
-0.007623572368174791,
0.1006215363740921,
0.14499858021736145,
0.0388689860701561,
0.12528176605701447,
-0.08346445858478546,
0.2755776643753052,
0.066558837890625,
0.3113951086997986,
-0.37050771713256836,
0.04514264315366745,
0.41785672307014465,
-0.24107347428798676,
0.23508600890636444,
0.4640142619609833,
0.014800028875470161,
0.19304944574832916,
0.2907048463821411,
0.10934361070394516,
-0.11870168149471283,
0.32269686460494995,
0.3945169150829315,
0.8204306960105896,
0.5895959734916687,
0.08376991748809814,
0.27460289001464844,
0.09925739467144012,
-0.15360744297504425,
-0.2072506844997406,
0.2358231246471405,
0.39196810126304626,
0.01886700838804245,
0.18569335341453552,
-0.24079890549182892,
-0.48712414503097534,
0.2258816957473755,
0.12177547812461853,
-0.1946176141500473,
-0.0822240486741066,
-0.6648061871528625,
0.011875501833856106,
0.1358264982700348,
-0.18665948510169983,
-0.17971482872962952,
-0.050137199461460114,
0.2205909788608551,
0.25975432991981506,
-0.10322102159261703,
-0.16091208159923553,
-0.17247481644153595,
0.0691017135977745,
0.0375286303460598,
-0.00732995243743062,
0.16975809633731842,
-0.13684530556201935,
0.16176103055477142,
0.24482403695583344,
0.1969076693058014,
0.2849538326263428,
0.4870804250240326,
-0.16817134618759155,
-0.1598939746618271,
-0.01055342610925436,
-0.19236592948436737,
0.08990199863910675,
0.06671139597892761,
0.03153395652770996,
-0.1532081961631775,
-0.014956638216972351,
0.008462493307888508,
0.038628142327070236,
0.03146027401089668,
-0.09408091753721237,
-0.21825915575027466,
0.1676250845193863,
0.30557534098625183,
-0.36377817392349243,
-0.1490931510925293,
-0.09989839047193527,
-0.24665571749210358,
-0.3483101725578308,
-0.26553383469581604,
0.532738447189331,
0.027895571663975716,
0.128010094165802,
0.14216819405555725,
-0.042159657925367355,
0.04878508672118187,
0.15741172432899475,
-0.12155678123235703,
0.07757643610239029,
-0.15409401059150696,
0.1359660029411316,
-0.08580464869737625,
0.03191022947430611,
0.11847498267889023,
-0.3834477365016937,
-0.01884886994957924,
-0.03916456550359726,
0.24254119396209717,
0.0646747574210167,
0.20209071040153503,
-0.09834738820791245,
0.49874529242515564,
0.6146568655967712,
-0.1336161345243454,
-0.1414812207221985,
-0.13041949272155762,
0.37065133452415466,
0.07330799847841263,
-0.07746578752994537,
0.021921372041106224,
0.10242687165737152,
0.006506701465696096,
-0.3420656621456146,
-0.25549033284187317,
-0.01998201757669449,
0.3041451573371887,
0.35128214955329895,
0.09328848868608475,
0.3203136622905731,
-0.01922053098678589,
0.04841059818863869,
-0.24113258719444275,
0.05041498318314552,
-0.1276015043258667,
0.00967057328671217,
-0.022802552208304405,
0.5810174345970154,
-0.22440259158611298,
-0.059341490268707275,
-0.41364961862564087,
0.4290265738964081,
0.09053075313568115,
-0.3388557434082031,
-0.08051913231611252,
0.3583991527557373,
-0.3173205554485321,
-0.20108820497989655,
0.22619524598121643,
0.4100225567817688,
0.1513604074716568,
0.19435736536979675,
-0.5254402160644531,
-0.40691110491752625,
0.44720226526260376,
-0.44170674681663513,
-0.5069129467010498,
0.02907400205731392,
-0.313393771648407,
0.06790363043546677,
0.49642351269721985,
-0.47104936838150024,
-0.14913403987884521,
0.0015055699041113257,
-0.08082757890224457,
-0.09160425513982773,
-0.09819342195987701,
0.2610405683517456,
0.015111553482711315,
-0.25184622406959534,
0.17900702357292175,
0.1764499396085739,
-0.0228157639503479,
-0.42041638493537903,
-0.27535977959632874
] |
https://github.com/huggingface/datasets/issues/2005
|
Setting to torch format not working with torchvision and MNIST
|
Okay, that makes sense.
Raw images are list of Array2D, hence we get a single tensor when `set_format` is used. But, why should I need to convert the raw images to `torch` format when `map` does this internally?
Using `Array3D` did not work with `map` when raw images weren't `set_format`ted to torch type.
|
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
| 53
|
Setting to torch format not working with torchvision and MNIST
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
Okay, that makes sense.
Raw images are list of Array2D, hence we get a single tensor when `set_format` is used. But, why should I need to convert the raw images to `torch` format when `map` does this internally?
Using `Array3D` did not work with `map` when raw images weren't `set_format`ted to torch type.
|
[
-0.12737570703029633,
-0.35116511583328247,
-0.017932923510670662,
0.35361000895500183,
0.47600212693214417,
0.08871375024318695,
0.7330290675163269,
0.38043445348739624,
0.0655258372426033,
-0.03804275766015053,
-0.11115400493144989,
0.3819511830806732,
-0.232968270778656,
-0.33393388986587524,
0.0351090282201767,
-0.5614945292472839,
0.22258029878139496,
-0.09982749819755554,
-0.28079864382743835,
-0.061347298324108124,
-0.2431342899799347,
0.03548954799771309,
-0.21849703788757324,
-0.1084955632686615,
-0.5479358434677124,
0.04409617930650711,
-0.01955590769648552,
-0.07656845450401306,
-0.06229906901717186,
-0.13918034732341766,
0.12234674394130707,
-0.17449605464935303,
0.4444536864757538,
0.7012933492660522,
-0.00012770107423420995,
0.07030169665813446,
0.364272803068161,
-0.17377816140651703,
0.050000473856925964,
-0.16101454198360443,
0.04004686325788498,
-0.2573828101158142,
0.07277651876211166,
-0.09468385577201843,
-0.22349463403224945,
-0.17084583640098572,
0.09591015428304672,
-0.17902974784374237,
-0.028141988441348076,
0.4191688597202301,
0.07713013887405396,
0.27901145815849304,
0.2466621696949005,
0.1386314481496811,
0.22781182825565338,
0.5182868838310242,
-0.2734377086162567,
-0.056116677820682526,
0.22615014016628265,
0.37547871470451355,
0.12400563061237335,
0.5647351145744324,
-0.29133492708206177,
-0.03623355180025101,
0.266944944858551,
0.1290055513381958,
-0.10145455598831177,
-0.31400567293167114,
0.04915764555335045,
0.08946295082569122,
0.42194435000419617,
-0.1494389921426773,
-0.0807788297533989,
-0.14366267621517181,
-0.14397884905338287,
-0.1273804008960724,
0.040591731667518616,
0.28032049536705017,
-0.07184044271707535,
-0.18723881244659424,
-0.5392423868179321,
0.3052913546562195,
-0.1486240178346634,
0.21315890550613403,
-0.28052353858947754,
-0.00341961532831192,
-0.1381634622812271,
0.29280975461006165,
-0.047119006514549255,
-0.1127130463719368,
0.193081334233284,
-0.1234150230884552,
0.13007473945617676,
-0.009825581684708595,
-0.14363226294517517,
-0.05349101126194,
-0.38960033655166626,
-0.3150123357772827,
-0.20014815032482147,
-0.16026559472084045,
0.16648422181606293,
0.13927561044692993,
-0.11639533191919327,
0.12807147204875946,
0.1826331913471222,
0.26803410053253174,
0.10578341782093048,
0.3207029104232788,
-0.08589301258325577,
-0.2895815074443817,
-0.04691976681351662,
0.08773334324359894,
-0.29622700810432434,
-0.43575266003608704,
0.15453515946865082,
0.325297087430954,
0.24522194266319275,
0.06874252110719681,
0.1298559010028839,
-0.323941171169281,
-0.1089225485920906,
-0.009587236680090427,
0.07522497326135635,
0.2850382924079895,
-0.11867944151163101,
0.2439039945602417,
0.4804830253124237,
0.3972030580043793,
-0.15381820499897003,
0.06956276297569275,
0.025072438642382622,
0.031521398574113846,
-0.4404948055744171,
-0.28569871187210083,
0.15340910851955414,
-0.11777321249246597,
0.10007045418024063,
0.03743145242333412,
0.04641531780362129,
0.10069561749696732,
0.07349712401628494,
-0.18587076663970947,
0.624629020690918,
0.14764760434627533,
-0.1944737732410431,
0.2767927348613739,
0.27090680599212646,
0.5297790765762329,
-0.3042984902858734,
0.25653210282325745,
-0.5095705986022949,
0.06525290012359619,
-0.023092517629265785,
-0.01454417034983635,
0.21865519881248474,
-0.020721379667520523,
-0.212163507938385,
0.015828415751457214,
0.5923123359680176,
-0.08367788791656494,
0.27348753809928894,
-0.5791618227958679,
0.0949634462594986,
-0.19133517146110535,
0.034152254462242126,
0.06366843730211258,
-0.20471493899822235,
-0.05235865339636803,
0.38634437322616577,
0.09194900840520859,
0.3154592216014862,
0.16028200089931488,
0.05108356848359108,
0.0798705592751503,
-0.22535325586795807,
-0.2350505143404007,
0.33632397651672363,
-0.3768565356731415,
0.09203927218914032,
-0.017693262547254562,
0.09388009458780289,
-0.06380412727594376,
0.11201874911785126,
0.3361783027648926,
0.032600611448287964,
-0.12800158560276031,
0.02944803424179554,
0.1963144689798355,
-0.16618186235427856,
0.14028693735599518,
0.07735977321863174,
0.191302090883255,
0.19337399303913116,
0.035006530582904816,
-0.015683665871620178,
0.20765356719493866,
-0.22167105972766876,
0.17757576704025269,
-0.05428007245063782,
-0.07471297681331635,
0.07117706537246704,
0.04037829488515854,
-0.36989060044288635,
-0.012196503579616547,
-0.04746989905834198,
0.18646599352359772,
-0.23310047388076782,
-0.04872153326869011,
0.023633727803826332,
0.0822167620062828,
0.05827893689274788,
0.04792506992816925,
0.004977794364094734,
-0.19195637106895447,
-0.18220625817775726,
-0.13902683556079865,
-0.003242077771574259,
0.09221076220273972,
-0.2094762921333313,
-0.2617236077785492,
-0.05234289541840553,
-0.12324877083301544,
0.17830325663089752,
0.05883768945932388,
-0.35903725028038025,
0.05102585256099701,
0.019273217767477036,
-0.36533084511756897,
-0.20136012136936188,
0.17339138686656952,
0.2676694989204407,
-0.09962080419063568,
-0.042235422879457474,
0.19160348176956177,
0.06328949332237244,
0.1146327331662178,
-0.5482736825942993,
0.08346544206142426,
0.17784206569194794,
-0.24697065353393555,
0.20439080893993378,
0.2162802666425705,
0.14853428304195404,
-0.2755032479763031,
-0.19603464007377625,
0.4387865960597992,
0.16040943562984467,
0.315912663936615,
-0.330026239156723,
0.1161012351512909,
-0.07264634966850281,
-0.03940199315547943,
-0.190633624792099,
-0.040807757526636124,
-0.2772822380065918,
0.07302431017160416,
-0.1318601816892624,
0.012982583604753017,
-0.45691853761672974,
-0.04493805393576622,
0.2962622046470642,
0.08876386284828186,
0.17587202787399292,
-0.0012165154330432415,
-0.39984655380249023,
0.2133127748966217,
0.17712648212909698,
-0.6013534069061279,
0.29783862829208374,
-0.004362158942967653,
0.18920691311359406,
-0.10501903295516968,
0.095583975315094,
-0.16254277527332306,
0.2484450340270996,
0.114042729139328,
0.09074881672859192,
-0.19946494698524475,
0.14185264706611633,
-0.10792634636163712,
0.02684619091451168,
0.02637050859630108,
-0.1406290978193283,
-0.23369313776493073,
-0.3589506447315216,
0.2713833451271057,
-0.16618283092975616,
-0.1345188319683075,
-0.40185487270355225,
-0.26218584179878235,
0.0360567644238472,
-0.07400472462177277,
-0.08233476430177689,
0.15075814723968506,
0.18556828796863556,
0.19043514132499695,
0.2634184956550598,
-0.18189533054828644,
0.37431660294532776,
-0.4130289554595947,
-0.035354580730199814,
-0.07500956952571869,
-0.2867961525917053,
-0.09916506707668304,
0.08965617418289185,
-0.5234104990959167,
0.0914849191904068,
-0.22899025678634644,
-0.09319118410348892,
-0.250176340341568,
0.01354741770774126,
0.14182190597057343,
-0.2678496539592743,
-0.2850019037723541,
0.30859076976776123,
0.1939285397529602,
-0.14248299598693848,
0.0406617745757103,
0.266352117061615,
0.01030689850449562,
0.0469016432762146,
0.1537831574678421,
-0.08962060511112213,
0.11655968427658081,
-0.06329794228076935,
-0.17674095928668976,
-0.09661899507045746,
-0.0750613883137703,
-0.0704168975353241,
-0.02175893634557724,
0.06337761878967285,
0.34625765681266785,
0.3721839189529419,
-0.08989089727401733,
-0.05204273387789726,
0.03560885041952133,
0.06296458095312119,
-0.39768847823143005,
0.522503137588501,
-0.22615385055541992,
-0.3608255684375763,
0.1192026361823082,
0.02385600470006466,
0.06514681875705719,
0.4862675368785858,
0.06052308529615402,
0.04973135143518448,
0.011782038025557995,
-0.07894453406333923,
0.252593070268631,
0.22119753062725067,
0.35101956129074097,
-0.09112474322319031,
0.019166184589266777,
-0.16470706462860107,
0.015416686423122883,
-0.10187150537967682,
-0.06325522065162659,
0.6088864803314209,
0.1850852370262146,
0.23994265496730804,
0.09925788640975952,
0.6996644139289856,
-0.0611368790268898,
-0.7380953431129456,
0.21680711209774017,
-0.2425093650817871,
0.1921667605638504,
-0.1181219145655632,
-0.3539586067199707,
0.3988560140132904,
-0.20941965281963348,
0.06437405943870544,
-0.08596731722354889,
-0.024907300248742104,
-0.2391580194234848,
-0.09022410213947296,
0.3573613464832306,
-0.3172072470188141,
-0.15857382118701935,
0.4044298827648163,
-0.14470174908638,
0.27637261152267456,
-0.2313428670167923,
0.32458868622779846,
-0.26092591881752014,
-0.21379251778125763,
0.06005644053220749,
0.4487727880477905,
0.13851283490657806,
0.04172501713037491,
-0.3342851400375366,
-0.21669772267341614,
-0.14322695136070251,
0.3568277955055237,
0.11957772076129913,
0.5672698616981506,
-0.09803582727909088,
-0.07446420937776566,
0.10155694931745529,
0.2413697987794876,
0.8307591676712036,
0.04555749520659447,
-0.09045996516942978,
0.15144257247447968,
-0.3478345572948456,
-0.45497843623161316,
-0.1022297739982605,
-0.05141737684607506,
0.0906815379858017,
0.1716911345720291,
0.120386503636837,
-0.09105350077152252,
-0.1833338737487793,
-0.005832722410559654,
0.19555459916591644,
-0.05512532591819763,
0.03471822291612625,
-0.2269120067358017,
0.05875823274254799,
-0.12965017557144165,
-0.15528295934200287,
0.2211824208498001,
0.029675675556063652,
0.005161960609257221,
-0.3081284463405609,
-0.32623085379600525,
-0.12669925391674042,
0.18248170614242554,
-0.13301241397857666,
0.41106799244880676,
0.09925045818090439,
-0.17808569967746735,
0.07690616697072983,
0.5561061501502991,
0.41840389370918274,
-0.038939449936151505,
-0.1187736913561821,
0.08064316213130951,
0.29311075806617737,
0.1064324676990509,
0.3002043068408966,
0.3208223879337311,
-0.06187339872121811,
-0.4396645724773407,
-0.22684842348098755,
-0.1938147097826004,
-0.3305322825908661,
0.3972935676574707,
0.4080634117126465,
0.0989358127117157,
-0.49535518884658813,
-0.4921706020832062,
0.38619035482406616,
0.29371973872184753,
0.19583012163639069,
0.20459096133708954,
-0.5417592525482178,
-0.40096795558929443,
0.07817897200584412,
0.46624186635017395,
0.8556221723556519,
-0.03707917407155037,
0.3702821433544159,
0.03156490623950958,
0.010806628502905369,
0.17210309207439423,
-0.0018883941229432821,
0.4117940664291382,
-0.35428154468536377,
0.1392892599105835,
-0.1648537665605545,
-0.3125496804714203,
0.25252386927604675,
-0.060203149914741516,
-0.24397021532058716,
0.0425368957221508,
-0.34947165846824646,
0.19361911714076996,
-0.12569408118724823,
-0.08285272121429443,
-0.04982588440179825,
-0.4714173376560211,
0.18787355720996857,
0.015451944433152676,
-0.08251404762268066,
0.2617388367652893,
0.1111610159277916,
-0.16362012922763824,
-0.3798595070838928,
0.06169590353965759,
-0.07622290402650833,
-0.015012153424322605,
-0.24596934020519257,
-0.16324220597743988,
-0.024310031905770302,
-0.7298651337623596,
0.05867947265505791,
0.49615857005119324,
0.33455440402030945,
-0.16056616604328156,
-0.04783592000603676,
0.13964177668094635,
0.44384774565696716,
0.1628999412059784,
-0.09901812672615051,
-0.34018367528915405,
0.2853395342826843,
0.09737548977136612,
0.18433162569999695,
0.10863793641328812,
0.06814868003129959,
0.21052005887031555,
-0.5777892470359802,
0.03725156560540199,
0.306029736995697,
-0.34495052695274353,
-0.32298538088798523,
-0.19845089316368103,
0.04918496683239937,
0.038163524121046066,
0.028618529438972473,
0.1244889497756958,
-0.03890340402722359,
0.20724399387836456,
-0.04151169955730438,
-0.22646178305149078,
0.13289012014865875,
0.4523313045501709,
0.1129847913980484,
-0.35004591941833496,
0.3907565176486969,
0.3549588918685913,
-0.04477759078145027,
-0.0437440387904644,
0.4166942536830902,
0.6353183388710022,
-0.3456965386867523,
0.09949697554111481,
-0.10271568596363068,
-0.1569867581129074,
-0.011073986068367958,
0.5430944561958313,
-0.23431730270385742,
-0.13097745180130005,
-0.23895679414272308,
-0.04081777483224869,
-0.4308936297893524,
0.010813296772539616,
-0.31629839539527893,
0.45663103461265564,
-0.04322148859500885,
0.36270955204963684,
0.21050532162189484,
-0.18734773993492126,
-0.14413577318191528,
-0.2586488127708435,
0.17234940826892853,
0.36793309450149536,
-0.24718208611011505,
0.21876199543476105,
-0.12695848941802979,
-0.12202277034521103,
-0.03625253215432167,
0.026030853390693665,
-0.24973903596401215,
-0.03339084982872009,
-0.057677797973155975,
0.17730605602264404,
0.06661400943994522,
-0.11354026198387146,
-0.0735473707318306,
-0.1736702024936676,
-0.13858070969581604,
-0.2681717276573181,
-0.03771835193037987,
0.11092091351747513,
-0.11599960178136826,
0.35316169261932373,
-0.1783653348684311,
0.23122534155845642,
0.3186754882335663,
-0.2699998617172241,
-0.10262306034564972,
0.03587070479989052,
0.22296245396137238,
0.06005034223198891,
0.004532386548817158,
-0.06155698746442795,
-0.27723708748817444,
0.11259099841117859,
0.16520337760448456,
0.25497496128082275,
0.204617440700531,
-0.09999638050794601,
0.10917830467224121,
-0.043806593865156174,
0.2041834443807602,
0.10125498473644257,
-0.1718701869249344,
-0.05082887038588524,
0.060372959822416306,
-0.007623572368174791,
0.1006215363740921,
0.14499858021736145,
0.0388689860701561,
0.12528176605701447,
-0.08346445858478546,
0.2755776643753052,
0.066558837890625,
0.3113951086997986,
-0.37050771713256836,
0.04514264315366745,
0.41785672307014465,
-0.24107347428798676,
0.23508600890636444,
0.4640142619609833,
0.014800028875470161,
0.19304944574832916,
0.2907048463821411,
0.10934361070394516,
-0.11870168149471283,
0.32269686460494995,
0.3945169150829315,
0.8204306960105896,
0.5895959734916687,
0.08376991748809814,
0.27460289001464844,
0.09925739467144012,
-0.15360744297504425,
-0.2072506844997406,
0.2358231246471405,
0.39196810126304626,
0.01886700838804245,
0.18569335341453552,
-0.24079890549182892,
-0.48712414503097534,
0.2258816957473755,
0.12177547812461853,
-0.1946176141500473,
-0.0822240486741066,
-0.6648061871528625,
0.011875501833856106,
0.1358264982700348,
-0.18665948510169983,
-0.17971482872962952,
-0.050137199461460114,
0.2205909788608551,
0.25975432991981506,
-0.10322102159261703,
-0.16091208159923553,
-0.17247481644153595,
0.0691017135977745,
0.0375286303460598,
-0.00732995243743062,
0.16975809633731842,
-0.13684530556201935,
0.16176103055477142,
0.24482403695583344,
0.1969076693058014,
0.2849538326263428,
0.4870804250240326,
-0.16817134618759155,
-0.1598939746618271,
-0.01055342610925436,
-0.19236592948436737,
0.08990199863910675,
0.06671139597892761,
0.03153395652770996,
-0.1532081961631775,
-0.014956638216972351,
0.008462493307888508,
0.038628142327070236,
0.03146027401089668,
-0.09408091753721237,
-0.21825915575027466,
0.1676250845193863,
0.30557534098625183,
-0.36377817392349243,
-0.1490931510925293,
-0.09989839047193527,
-0.24665571749210358,
-0.3483101725578308,
-0.26553383469581604,
0.532738447189331,
0.027895571663975716,
0.128010094165802,
0.14216819405555725,
-0.042159657925367355,
0.04878508672118187,
0.15741172432899475,
-0.12155678123235703,
0.07757643610239029,
-0.15409401059150696,
0.1359660029411316,
-0.08580464869737625,
0.03191022947430611,
0.11847498267889023,
-0.3834477365016937,
-0.01884886994957924,
-0.03916456550359726,
0.24254119396209717,
0.0646747574210167,
0.20209071040153503,
-0.09834738820791245,
0.49874529242515564,
0.6146568655967712,
-0.1336161345243454,
-0.1414812207221985,
-0.13041949272155762,
0.37065133452415466,
0.07330799847841263,
-0.07746578752994537,
0.021921372041106224,
0.10242687165737152,
0.006506701465696096,
-0.3420656621456146,
-0.25549033284187317,
-0.01998201757669449,
0.3041451573371887,
0.35128214955329895,
0.09328848868608475,
0.3203136622905731,
-0.01922053098678589,
0.04841059818863869,
-0.24113258719444275,
0.05041498318314552,
-0.1276015043258667,
0.00967057328671217,
-0.022802552208304405,
0.5810174345970154,
-0.22440259158611298,
-0.059341490268707275,
-0.41364961862564087,
0.4290265738964081,
0.09053075313568115,
-0.3388557434082031,
-0.08051913231611252,
0.3583991527557373,
-0.3173205554485321,
-0.20108820497989655,
0.22619524598121643,
0.4100225567817688,
0.1513604074716568,
0.19435736536979675,
-0.5254402160644531,
-0.40691110491752625,
0.44720226526260376,
-0.44170674681663513,
-0.5069129467010498,
0.02907400205731392,
-0.313393771648407,
0.06790363043546677,
0.49642351269721985,
-0.47104936838150024,
-0.14913403987884521,
0.0015055699041113257,
-0.08082757890224457,
-0.09160425513982773,
-0.09819342195987701,
0.2610405683517456,
0.015111553482711315,
-0.25184622406959534,
0.17900702357292175,
0.1764499396085739,
-0.0228157639503479,
-0.42041638493537903,
-0.27535977959632874
] |
https://github.com/huggingface/datasets/issues/2005
|
Setting to torch format not working with torchvision and MNIST
|
I understand that `map` needs to know what kind of output tensors are expected, and thus converting the raw dataset to `torch` format is necessary. Closing the issue since it is resolved.
|
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
| 32
|
Setting to torch format not working with torchvision and MNIST
Hi
I am trying to use `torchvision.transforms` to handle the transformation of the image data in the `mnist` dataset. Assume I have a `transform` variable which contains the `torchvision.transforms` object.
A snippet of what I am trying to do:
```python
def prepare_features(examples):
images = []
labels = []
for example_idx, example in enumerate(examples["image"]):
if transform is not None:
images.append(transform(
np.array(examples["image"][example_idx], dtype=np.uint8)
))
else:
images.append(torch.tensor(np.array(examples["image"][example_idx], dtype=np.uint8)))
labels.append(torch.tensor(examples["label"][example_idx]))
output = {"label":labels, "image":images}
return output
raw_dataset = load_dataset('mnist')
train_dataset = raw_dataset.map(prepare_features, batched=True, batch_size=10000)
train_dataset.set_format("torch",columns=["image","label"])
```
After this, I check the type of the following:
```python
print(type(train_dataset["train"]["label"]))
print(type(train_dataset["train"]["image"][0]))
```
This leads to the following output:
```python
<class 'torch.Tensor'>
<class 'list'>
```
I use `torch.utils.DataLoader` for batches, the type of `batch["train"]["image"]` is also `<class 'list'>`.
I don't understand why only the `label` is converted to a torch tensor, why does the image not get converted? How can I fix this issue?
Thanks,
Gunjan
EDIT:
I just checked the shapes, and the types, `batch[image]` is a actually a list of list of tensors. Shape is (1,28,2,28), where `batch_size` is 2. I don't understand why this is happening. Ideally it should be a tensor of shape (2,1,28,28).
EDIT 2:
Inside `prepare_train_features`, the shape of `images[0]` is `torch.Size([1,28,28])`, the conversion is working. However, the output of the `map` is a list of list of list of list.
I understand that `map` needs to know what kind of output tensors are expected, and thus converting the raw dataset to `torch` format is necessary. Closing the issue since it is resolved.
|
[
-0.12737570703029633,
-0.35116511583328247,
-0.017932923510670662,
0.35361000895500183,
0.47600212693214417,
0.08871375024318695,
0.7330290675163269,
0.38043445348739624,
0.0655258372426033,
-0.03804275766015053,
-0.11115400493144989,
0.3819511830806732,
-0.232968270778656,
-0.33393388986587524,
0.0351090282201767,
-0.5614945292472839,
0.22258029878139496,
-0.09982749819755554,
-0.28079864382743835,
-0.061347298324108124,
-0.2431342899799347,
0.03548954799771309,
-0.21849703788757324,
-0.1084955632686615,
-0.5479358434677124,
0.04409617930650711,
-0.01955590769648552,
-0.07656845450401306,
-0.06229906901717186,
-0.13918034732341766,
0.12234674394130707,
-0.17449605464935303,
0.4444536864757538,
0.7012933492660522,
-0.00012770107423420995,
0.07030169665813446,
0.364272803068161,
-0.17377816140651703,
0.050000473856925964,
-0.16101454198360443,
0.04004686325788498,
-0.2573828101158142,
0.07277651876211166,
-0.09468385577201843,
-0.22349463403224945,
-0.17084583640098572,
0.09591015428304672,
-0.17902974784374237,
-0.028141988441348076,
0.4191688597202301,
0.07713013887405396,
0.27901145815849304,
0.2466621696949005,
0.1386314481496811,
0.22781182825565338,
0.5182868838310242,
-0.2734377086162567,
-0.056116677820682526,
0.22615014016628265,
0.37547871470451355,
0.12400563061237335,
0.5647351145744324,
-0.29133492708206177,
-0.03623355180025101,
0.266944944858551,
0.1290055513381958,
-0.10145455598831177,
-0.31400567293167114,
0.04915764555335045,
0.08946295082569122,
0.42194435000419617,
-0.1494389921426773,
-0.0807788297533989,
-0.14366267621517181,
-0.14397884905338287,
-0.1273804008960724,
0.040591731667518616,
0.28032049536705017,
-0.07184044271707535,
-0.18723881244659424,
-0.5392423868179321,
0.3052913546562195,
-0.1486240178346634,
0.21315890550613403,
-0.28052353858947754,
-0.00341961532831192,
-0.1381634622812271,
0.29280975461006165,
-0.047119006514549255,
-0.1127130463719368,
0.193081334233284,
-0.1234150230884552,
0.13007473945617676,
-0.009825581684708595,
-0.14363226294517517,
-0.05349101126194,
-0.38960033655166626,
-0.3150123357772827,
-0.20014815032482147,
-0.16026559472084045,
0.16648422181606293,
0.13927561044692993,
-0.11639533191919327,
0.12807147204875946,
0.1826331913471222,
0.26803410053253174,
0.10578341782093048,
0.3207029104232788,
-0.08589301258325577,
-0.2895815074443817,
-0.04691976681351662,
0.08773334324359894,
-0.29622700810432434,
-0.43575266003608704,
0.15453515946865082,
0.325297087430954,
0.24522194266319275,
0.06874252110719681,
0.1298559010028839,
-0.323941171169281,
-0.1089225485920906,
-0.009587236680090427,
0.07522497326135635,
0.2850382924079895,
-0.11867944151163101,
0.2439039945602417,
0.4804830253124237,
0.3972030580043793,
-0.15381820499897003,
0.06956276297569275,
0.025072438642382622,
0.031521398574113846,
-0.4404948055744171,
-0.28569871187210083,
0.15340910851955414,
-0.11777321249246597,
0.10007045418024063,
0.03743145242333412,
0.04641531780362129,
0.10069561749696732,
0.07349712401628494,
-0.18587076663970947,
0.624629020690918,
0.14764760434627533,
-0.1944737732410431,
0.2767927348613739,
0.27090680599212646,
0.5297790765762329,
-0.3042984902858734,
0.25653210282325745,
-0.5095705986022949,
0.06525290012359619,
-0.023092517629265785,
-0.01454417034983635,
0.21865519881248474,
-0.020721379667520523,
-0.212163507938385,
0.015828415751457214,
0.5923123359680176,
-0.08367788791656494,
0.27348753809928894,
-0.5791618227958679,
0.0949634462594986,
-0.19133517146110535,
0.034152254462242126,
0.06366843730211258,
-0.20471493899822235,
-0.05235865339636803,
0.38634437322616577,
0.09194900840520859,
0.3154592216014862,
0.16028200089931488,
0.05108356848359108,
0.0798705592751503,
-0.22535325586795807,
-0.2350505143404007,
0.33632397651672363,
-0.3768565356731415,
0.09203927218914032,
-0.017693262547254562,
0.09388009458780289,
-0.06380412727594376,
0.11201874911785126,
0.3361783027648926,
0.032600611448287964,
-0.12800158560276031,
0.02944803424179554,
0.1963144689798355,
-0.16618186235427856,
0.14028693735599518,
0.07735977321863174,
0.191302090883255,
0.19337399303913116,
0.035006530582904816,
-0.015683665871620178,
0.20765356719493866,
-0.22167105972766876,
0.17757576704025269,
-0.05428007245063782,
-0.07471297681331635,
0.07117706537246704,
0.04037829488515854,
-0.36989060044288635,
-0.012196503579616547,
-0.04746989905834198,
0.18646599352359772,
-0.23310047388076782,
-0.04872153326869011,
0.023633727803826332,
0.0822167620062828,
0.05827893689274788,
0.04792506992816925,
0.004977794364094734,
-0.19195637106895447,
-0.18220625817775726,
-0.13902683556079865,
-0.003242077771574259,
0.09221076220273972,
-0.2094762921333313,
-0.2617236077785492,
-0.05234289541840553,
-0.12324877083301544,
0.17830325663089752,
0.05883768945932388,
-0.35903725028038025,
0.05102585256099701,
0.019273217767477036,
-0.36533084511756897,
-0.20136012136936188,
0.17339138686656952,
0.2676694989204407,
-0.09962080419063568,
-0.042235422879457474,
0.19160348176956177,
0.06328949332237244,
0.1146327331662178,
-0.5482736825942993,
0.08346544206142426,
0.17784206569194794,
-0.24697065353393555,
0.20439080893993378,
0.2162802666425705,
0.14853428304195404,
-0.2755032479763031,
-0.19603464007377625,
0.4387865960597992,
0.16040943562984467,
0.315912663936615,
-0.330026239156723,
0.1161012351512909,
-0.07264634966850281,
-0.03940199315547943,
-0.190633624792099,
-0.040807757526636124,
-0.2772822380065918,
0.07302431017160416,
-0.1318601816892624,
0.012982583604753017,
-0.45691853761672974,
-0.04493805393576622,
0.2962622046470642,
0.08876386284828186,
0.17587202787399292,
-0.0012165154330432415,
-0.39984655380249023,
0.2133127748966217,
0.17712648212909698,
-0.6013534069061279,
0.29783862829208374,
-0.004362158942967653,
0.18920691311359406,
-0.10501903295516968,
0.095583975315094,
-0.16254277527332306,
0.2484450340270996,
0.114042729139328,
0.09074881672859192,
-0.19946494698524475,
0.14185264706611633,
-0.10792634636163712,
0.02684619091451168,
0.02637050859630108,
-0.1406290978193283,
-0.23369313776493073,
-0.3589506447315216,
0.2713833451271057,
-0.16618283092975616,
-0.1345188319683075,
-0.40185487270355225,
-0.26218584179878235,
0.0360567644238472,
-0.07400472462177277,
-0.08233476430177689,
0.15075814723968506,
0.18556828796863556,
0.19043514132499695,
0.2634184956550598,
-0.18189533054828644,
0.37431660294532776,
-0.4130289554595947,
-0.035354580730199814,
-0.07500956952571869,
-0.2867961525917053,
-0.09916506707668304,
0.08965617418289185,
-0.5234104990959167,
0.0914849191904068,
-0.22899025678634644,
-0.09319118410348892,
-0.250176340341568,
0.01354741770774126,
0.14182190597057343,
-0.2678496539592743,
-0.2850019037723541,
0.30859076976776123,
0.1939285397529602,
-0.14248299598693848,
0.0406617745757103,
0.266352117061615,
0.01030689850449562,
0.0469016432762146,
0.1537831574678421,
-0.08962060511112213,
0.11655968427658081,
-0.06329794228076935,
-0.17674095928668976,
-0.09661899507045746,
-0.0750613883137703,
-0.0704168975353241,
-0.02175893634557724,
0.06337761878967285,
0.34625765681266785,
0.3721839189529419,
-0.08989089727401733,
-0.05204273387789726,
0.03560885041952133,
0.06296458095312119,
-0.39768847823143005,
0.522503137588501,
-0.22615385055541992,
-0.3608255684375763,
0.1192026361823082,
0.02385600470006466,
0.06514681875705719,
0.4862675368785858,
0.06052308529615402,
0.04973135143518448,
0.011782038025557995,
-0.07894453406333923,
0.252593070268631,
0.22119753062725067,
0.35101956129074097,
-0.09112474322319031,
0.019166184589266777,
-0.16470706462860107,
0.015416686423122883,
-0.10187150537967682,
-0.06325522065162659,
0.6088864803314209,
0.1850852370262146,
0.23994265496730804,
0.09925788640975952,
0.6996644139289856,
-0.0611368790268898,
-0.7380953431129456,
0.21680711209774017,
-0.2425093650817871,
0.1921667605638504,
-0.1181219145655632,
-0.3539586067199707,
0.3988560140132904,
-0.20941965281963348,
0.06437405943870544,
-0.08596731722354889,
-0.024907300248742104,
-0.2391580194234848,
-0.09022410213947296,
0.3573613464832306,
-0.3172072470188141,
-0.15857382118701935,
0.4044298827648163,
-0.14470174908638,
0.27637261152267456,
-0.2313428670167923,
0.32458868622779846,
-0.26092591881752014,
-0.21379251778125763,
0.06005644053220749,
0.4487727880477905,
0.13851283490657806,
0.04172501713037491,
-0.3342851400375366,
-0.21669772267341614,
-0.14322695136070251,
0.3568277955055237,
0.11957772076129913,
0.5672698616981506,
-0.09803582727909088,
-0.07446420937776566,
0.10155694931745529,
0.2413697987794876,
0.8307591676712036,
0.04555749520659447,
-0.09045996516942978,
0.15144257247447968,
-0.3478345572948456,
-0.45497843623161316,
-0.1022297739982605,
-0.05141737684607506,
0.0906815379858017,
0.1716911345720291,
0.120386503636837,
-0.09105350077152252,
-0.1833338737487793,
-0.005832722410559654,
0.19555459916591644,
-0.05512532591819763,
0.03471822291612625,
-0.2269120067358017,
0.05875823274254799,
-0.12965017557144165,
-0.15528295934200287,
0.2211824208498001,
0.029675675556063652,
0.005161960609257221,
-0.3081284463405609,
-0.32623085379600525,
-0.12669925391674042,
0.18248170614242554,
-0.13301241397857666,
0.41106799244880676,
0.09925045818090439,
-0.17808569967746735,
0.07690616697072983,
0.5561061501502991,
0.41840389370918274,
-0.038939449936151505,
-0.1187736913561821,
0.08064316213130951,
0.29311075806617737,
0.1064324676990509,
0.3002043068408966,
0.3208223879337311,
-0.06187339872121811,
-0.4396645724773407,
-0.22684842348098755,
-0.1938147097826004,
-0.3305322825908661,
0.3972935676574707,
0.4080634117126465,
0.0989358127117157,
-0.49535518884658813,
-0.4921706020832062,
0.38619035482406616,
0.29371973872184753,
0.19583012163639069,
0.20459096133708954,
-0.5417592525482178,
-0.40096795558929443,
0.07817897200584412,
0.46624186635017395,
0.8556221723556519,
-0.03707917407155037,
0.3702821433544159,
0.03156490623950958,
0.010806628502905369,
0.17210309207439423,
-0.0018883941229432821,
0.4117940664291382,
-0.35428154468536377,
0.1392892599105835,
-0.1648537665605545,
-0.3125496804714203,
0.25252386927604675,
-0.060203149914741516,
-0.24397021532058716,
0.0425368957221508,
-0.34947165846824646,
0.19361911714076996,
-0.12569408118724823,
-0.08285272121429443,
-0.04982588440179825,
-0.4714173376560211,
0.18787355720996857,
0.015451944433152676,
-0.08251404762268066,
0.2617388367652893,
0.1111610159277916,
-0.16362012922763824,
-0.3798595070838928,
0.06169590353965759,
-0.07622290402650833,
-0.015012153424322605,
-0.24596934020519257,
-0.16324220597743988,
-0.024310031905770302,
-0.7298651337623596,
0.05867947265505791,
0.49615857005119324,
0.33455440402030945,
-0.16056616604328156,
-0.04783592000603676,
0.13964177668094635,
0.44384774565696716,
0.1628999412059784,
-0.09901812672615051,
-0.34018367528915405,
0.2853395342826843,
0.09737548977136612,
0.18433162569999695,
0.10863793641328812,
0.06814868003129959,
0.21052005887031555,
-0.5777892470359802,
0.03725156560540199,
0.306029736995697,
-0.34495052695274353,
-0.32298538088798523,
-0.19845089316368103,
0.04918496683239937,
0.038163524121046066,
0.028618529438972473,
0.1244889497756958,
-0.03890340402722359,
0.20724399387836456,
-0.04151169955730438,
-0.22646178305149078,
0.13289012014865875,
0.4523313045501709,
0.1129847913980484,
-0.35004591941833496,
0.3907565176486969,
0.3549588918685913,
-0.04477759078145027,
-0.0437440387904644,
0.4166942536830902,
0.6353183388710022,
-0.3456965386867523,
0.09949697554111481,
-0.10271568596363068,
-0.1569867581129074,
-0.011073986068367958,
0.5430944561958313,
-0.23431730270385742,
-0.13097745180130005,
-0.23895679414272308,
-0.04081777483224869,
-0.4308936297893524,
0.010813296772539616,
-0.31629839539527893,
0.45663103461265564,
-0.04322148859500885,
0.36270955204963684,
0.21050532162189484,
-0.18734773993492126,
-0.14413577318191528,
-0.2586488127708435,
0.17234940826892853,
0.36793309450149536,
-0.24718208611011505,
0.21876199543476105,
-0.12695848941802979,
-0.12202277034521103,
-0.03625253215432167,
0.026030853390693665,
-0.24973903596401215,
-0.03339084982872009,
-0.057677797973155975,
0.17730605602264404,
0.06661400943994522,
-0.11354026198387146,
-0.0735473707318306,
-0.1736702024936676,
-0.13858070969581604,
-0.2681717276573181,
-0.03771835193037987,
0.11092091351747513,
-0.11599960178136826,
0.35316169261932373,
-0.1783653348684311,
0.23122534155845642,
0.3186754882335663,
-0.2699998617172241,
-0.10262306034564972,
0.03587070479989052,
0.22296245396137238,
0.06005034223198891,
0.004532386548817158,
-0.06155698746442795,
-0.27723708748817444,
0.11259099841117859,
0.16520337760448456,
0.25497496128082275,
0.204617440700531,
-0.09999638050794601,
0.10917830467224121,
-0.043806593865156174,
0.2041834443807602,
0.10125498473644257,
-0.1718701869249344,
-0.05082887038588524,
0.060372959822416306,
-0.007623572368174791,
0.1006215363740921,
0.14499858021736145,
0.0388689860701561,
0.12528176605701447,
-0.08346445858478546,
0.2755776643753052,
0.066558837890625,
0.3113951086997986,
-0.37050771713256836,
0.04514264315366745,
0.41785672307014465,
-0.24107347428798676,
0.23508600890636444,
0.4640142619609833,
0.014800028875470161,
0.19304944574832916,
0.2907048463821411,
0.10934361070394516,
-0.11870168149471283,
0.32269686460494995,
0.3945169150829315,
0.8204306960105896,
0.5895959734916687,
0.08376991748809814,
0.27460289001464844,
0.09925739467144012,
-0.15360744297504425,
-0.2072506844997406,
0.2358231246471405,
0.39196810126304626,
0.01886700838804245,
0.18569335341453552,
-0.24079890549182892,
-0.48712414503097534,
0.2258816957473755,
0.12177547812461853,
-0.1946176141500473,
-0.0822240486741066,
-0.6648061871528625,
0.011875501833856106,
0.1358264982700348,
-0.18665948510169983,
-0.17971482872962952,
-0.050137199461460114,
0.2205909788608551,
0.25975432991981506,
-0.10322102159261703,
-0.16091208159923553,
-0.17247481644153595,
0.0691017135977745,
0.0375286303460598,
-0.00732995243743062,
0.16975809633731842,
-0.13684530556201935,
0.16176103055477142,
0.24482403695583344,
0.1969076693058014,
0.2849538326263428,
0.4870804250240326,
-0.16817134618759155,
-0.1598939746618271,
-0.01055342610925436,
-0.19236592948436737,
0.08990199863910675,
0.06671139597892761,
0.03153395652770996,
-0.1532081961631775,
-0.014956638216972351,
0.008462493307888508,
0.038628142327070236,
0.03146027401089668,
-0.09408091753721237,
-0.21825915575027466,
0.1676250845193863,
0.30557534098625183,
-0.36377817392349243,
-0.1490931510925293,
-0.09989839047193527,
-0.24665571749210358,
-0.3483101725578308,
-0.26553383469581604,
0.532738447189331,
0.027895571663975716,
0.128010094165802,
0.14216819405555725,
-0.042159657925367355,
0.04878508672118187,
0.15741172432899475,
-0.12155678123235703,
0.07757643610239029,
-0.15409401059150696,
0.1359660029411316,
-0.08580464869737625,
0.03191022947430611,
0.11847498267889023,
-0.3834477365016937,
-0.01884886994957924,
-0.03916456550359726,
0.24254119396209717,
0.0646747574210167,
0.20209071040153503,
-0.09834738820791245,
0.49874529242515564,
0.6146568655967712,
-0.1336161345243454,
-0.1414812207221985,
-0.13041949272155762,
0.37065133452415466,
0.07330799847841263,
-0.07746578752994537,
0.021921372041106224,
0.10242687165737152,
0.006506701465696096,
-0.3420656621456146,
-0.25549033284187317,
-0.01998201757669449,
0.3041451573371887,
0.35128214955329895,
0.09328848868608475,
0.3203136622905731,
-0.01922053098678589,
0.04841059818863869,
-0.24113258719444275,
0.05041498318314552,
-0.1276015043258667,
0.00967057328671217,
-0.022802552208304405,
0.5810174345970154,
-0.22440259158611298,
-0.059341490268707275,
-0.41364961862564087,
0.4290265738964081,
0.09053075313568115,
-0.3388557434082031,
-0.08051913231611252,
0.3583991527557373,
-0.3173205554485321,
-0.20108820497989655,
0.22619524598121643,
0.4100225567817688,
0.1513604074716568,
0.19435736536979675,
-0.5254402160644531,
-0.40691110491752625,
0.44720226526260376,
-0.44170674681663513,
-0.5069129467010498,
0.02907400205731392,
-0.313393771648407,
0.06790363043546677,
0.49642351269721985,
-0.47104936838150024,
-0.14913403987884521,
0.0015055699041113257,
-0.08082757890224457,
-0.09160425513982773,
-0.09819342195987701,
0.2610405683517456,
0.015111553482711315,
-0.25184622406959534,
0.17900702357292175,
0.1764499396085739,
-0.0228157639503479,
-0.42041638493537903,
-0.27535977959632874
] |
https://github.com/huggingface/datasets/issues/2003
|
Messages are being printed to the `stdout`
|
This is expected to show this message to the user via stdout.
This way the users see it directly and can cancel the downloading if they want to.
Could you elaborate why it would be better to have it in stderr instead of stdout ?
|
In this code segment, we can see some messages are being printed to the `stdout`.
https://github.com/huggingface/datasets/blob/7e60bb509b595e8edc60a87f32b2bacfc065d607/src/datasets/builder.py#L545-L554
According to the comment, it is done intentionally, but I don't really understand why don't we log it with a higher level or print it directly to the `stderr`.
In my opinion, this kind of messages should never printed to the stdout. At least some configuration/flag should make it possible to provide in order to explicitly prevent the package to contaminate the stdout.
| 45
|
Messages are being printed to the `stdout`
In this code segment, we can see some messages are being printed to the `stdout`.
https://github.com/huggingface/datasets/blob/7e60bb509b595e8edc60a87f32b2bacfc065d607/src/datasets/builder.py#L545-L554
According to the comment, it is done intentionally, but I don't really understand why don't we log it with a higher level or print it directly to the `stderr`.
In my opinion, this kind of messages should never printed to the stdout. At least some configuration/flag should make it possible to provide in order to explicitly prevent the package to contaminate the stdout.
This is expected to show this message to the user via stdout.
This way the users see it directly and can cancel the downloading if they want to.
Could you elaborate why it would be better to have it in stderr instead of stdout ?
|
[
-0.0470961257815361,
-0.370927631855011,
-0.03963582217693329,
0.2706126868724823,
0.23185154795646667,
-0.05729630962014198,
0.24660830199718475,
0.11494987457990646,
-0.041781917214393616,
0.19841821491718292,
0.1732611060142517,
0.16427063941955566,
-0.11991787701845169,
0.3688820004463196,
0.18070060014724731,
0.1382274627685547,
-0.0852121114730835,
-0.12966538965702057,
-0.39724302291870117,
0.2983497977256775,
0.13171131908893585,
0.16946476697921753,
0.37293410301208496,
0.48607566952705383,
-0.5674245953559875,
-0.027583984658122063,
0.24089959263801575,
-0.08200597018003464,
-0.23197562992572784,
-0.5787139534950256,
0.07414575666189194,
0.1343483179807663,
0.18376827239990234,
0.1799415796995163,
-0.0001180599065264687,
0.1449528932571411,
0.4684004485607147,
0.20608216524124146,
-0.681962788105011,
-0.08562396466732025,
-0.16586315631866455,
-0.12799029052257538,
0.32081347703933716,
-0.0690780058503151,
0.1317872256040573,
-0.29938068985939026,
0.2840437591075897,
-0.32418888807296753,
0.1400139480829239,
0.4661124348640442,
0.17689333856105804,
0.22324854135513306,
0.03552811220288277,
0.2963497042655945,
0.22461967170238495,
0.3057042956352234,
-0.06427440792322159,
0.022517239674925804,
0.2490633726119995,
0.5164740085601807,
-0.046682748943567276,
0.3044883906841278,
-0.1097133457660675,
-0.34610363841056824,
0.15129436552524567,
0.1833878457546234,
0.19945530593395233,
-0.2152296006679535,
0.13400650024414062,
0.013458548113703728,
0.55971759557724,
-0.43764445185661316,
-0.16013865172863007,
-0.2399800419807434,
-0.13393354415893555,
-0.14320355653762817,
0.22944092750549316,
0.12060631066560745,
-0.2808727025985718,
0.49994009733200073,
-0.35625001788139343,
-0.318274587392807,
-0.26853954792022705,
-0.07081817090511322,
-0.010249912738800049,
-0.1528872698545456,
-0.25060704350471497,
0.16574563086032867,
-0.18275763094425201,
0.21578000485897064,
-0.08323526382446289,
-0.2934996485710144,
-0.06984847784042358,
-0.17877532541751862,
0.0691009908914566,
-0.09062487632036209,
-0.005033664405345917,
-0.14601381123065948,
-0.09501003473997116,
-0.028815630823373795,
-0.0023851371370255947,
-0.01004287600517273,
0.34534063935279846,
0.07665132731199265,
0.463783323764801,
0.07261352241039276,
0.3933345675468445,
0.17095670104026794,
-0.024700522422790527,
0.12677901983261108,
0.33168742060661316,
-0.3063758611679077,
0.3164302408695221,
0.24137121438980103,
0.16708117723464966,
-0.3005853295326233,
0.12962548434734344,
-0.3068222105503082,
-0.072934590280056,
0.09004466980695724,
-0.018239986151456833,
0.09324128925800323,
0.0036984742619097233,
0.16885848343372345,
0.13657498359680176,
-0.08519583195447922,
0.1672450602054596,
0.027933942154049873,
0.21860560774803162,
0.06391523033380508,
-0.1007552370429039,
0.0687321126461029,
-0.19207008183002472,
-0.020260507240891457,
-0.024491585791110992,
-0.1460314691066742,
0.11555301398038864,
0.0659438818693161,
0.20694784820079803,
-0.1051701232790947,
-0.15312540531158447,
-0.052386410534381866,
0.16006003320217133,
0.517122745513916,
-0.4261568784713745,
0.2639126777648926,
0.05718095228075981,
-0.07984914630651474,
-0.1211642250418663,
0.3827720284461975,
-0.013048653490841389,
-0.41934022307395935,
0.14403492212295532,
0.07972045242786407,
-0.19256502389907837,
0.12103667110204697,
-0.3839593529701233,
-0.18304704129695892,
0.022853076457977295,
-0.17182235419750214,
0.2358081191778183,
-0.24287831783294678,
0.010125461965799332,
-0.22724609076976776,
-0.045786302536726,
0.16082488000392914,
-0.19476863741874695,
-0.10694536566734314,
-0.148947075009346,
-0.4786732494831085,
0.7286794185638428,
-0.12854260206222534,
0.04949943348765373,
0.4333667755126953,
-0.21604986488819122,
-0.3962884843349457,
0.42473405599594116,
-0.27467596530914307,
-0.2605839669704437,
0.3615228235721588,
-0.49560481309890747,
0.46331897377967834,
0.32455891370773315,
0.1980675756931305,
0.08936288207769394,
-0.029774188995361328,
0.12013203650712967,
-0.30021852254867554,
0.22003726661205292,
0.2071026712656021,
-0.23946480453014374,
-0.19029466807842255,
-0.08403576910495758,
0.12568917870521545,
-0.09781966358423233,
0.05463564023375511,
-0.00027774833142757416,
0.04391719773411751,
0.3048696219921112,
0.15351207554340363,
0.02840157225728035,
-0.21911755204200745,
0.13611344993114471,
0.23741988837718964,
-0.19281694293022156,
-0.09508519619703293,
-0.1431475728750229,
-0.03273646906018257,
-0.2658732533454895,
-0.0368487611413002,
-0.4485415816307068,
-0.2092805653810501,
0.05028965696692467,
0.21112750470638275,
0.025606753304600716,
-0.2873527407646179,
0.0026615264359861612,
0.2300603836774826,
0.14674383401870728,
0.289328008890152,
-0.2135191559791565,
0.43157386779785156,
-0.4924367666244507,
0.16444861888885498,
0.13828733563423157,
-0.17062602937221527,
0.16566941142082214,
-0.024536648765206337,
-0.042452435940504074,
0.038051582872867584,
-0.2710111439228058,
0.16867932677268982,
-0.03600476309657097,
0.28867805004119873,
-0.026956282556056976,
0.1526562124490738,
-0.24258241057395935,
0.2272121012210846,
0.07270745187997818,
0.0035587630700320005,
-0.009656485170125961,
0.1620011329650879,
-0.09828118234872818,
0.12193380296230316,
0.010063556022942066,
-0.06822086125612259,
0.06121595948934555,
0.12398769706487656,
-0.0029776005540043116,
-0.0025338197592645884,
-0.24584263563156128,
0.3253140449523926,
-0.2929028272628784,
-0.20202665030956268,
-0.09938359260559082,
-0.2407429963350296,
0.168009415268898,
0.23975196480751038,
-0.2445981651544571,
0.19811397790908813,
0.5945560336112976,
-0.11429448425769806,
-0.06739908456802368,
0.3340905010700226,
0.11194050312042236,
-0.07845302671194077,
0.13709701597690582,
0.09033400565385818,
0.10730631649494171,
0.16419526934623718,
0.1526736468076706,
0.017345188185572624,
0.12431036680936813,
-0.006975180935114622,
0.24605432152748108,
0.11793269217014313,
-0.32681670784950256,
0.006792515050619841,
-0.22915561497211456,
-0.16774997115135193,
-0.13059836626052856,
0.12329017370939255,
-0.49324285984039307,
-0.02162245288491249,
-0.3262925148010254,
0.03183475881814957,
-0.23638921976089478,
-0.34829986095428467,
-0.605405867099762,
-0.0629226565361023,
-0.12076571583747864,
-0.39332902431488037,
0.28394749760627747,
0.0013736297842115164,
-0.2738998234272003,
-0.1414477676153183,
0.16268669068813324,
0.39858290553092957,
-0.024409160017967224,
0.18131409585475922,
-0.5563159584999084,
0.3898976445198059,
-0.39407017827033997,
0.05587206408381462,
-0.10741749405860901,
0.16374540328979492,
0.32108598947525024,
-0.35895487666130066,
-0.06865383684635162,
-0.2984563708305359,
-0.0329044833779335,
0.15030282735824585,
-0.12438473105430603,
0.3846016526222229,
0.1836296170949936,
0.14463703334331512,
0.19302789866924286,
-0.16981160640716553,
-0.11400008201599121,
-0.20721285045146942,
-0.0516146719455719,
-0.2044171839952469,
0.23381875455379486,
0.16449619829654694,
-0.344499409198761,
-0.31775760650634766,
-0.28110408782958984,
-0.28520530462265015,
0.13959790766239166,
-0.22663038969039917,
0.3257318139076233,
-0.3604019582271576,
-0.025816641747951508,
0.24548226594924927,
-0.351559579372406,
0.5465463399887085,
0.1042623221874237,
-0.7475805282592773,
-0.21749937534332275,
0.03029537759721279,
-0.05975908786058426,
-0.25512123107910156,
0.4536774754524231,
-0.26077523827552795,
-0.07673731446266174,
-0.7462233304977417,
0.06605720520019531,
-0.2379441261291504,
-0.1159113198518753,
0.3059660494327545,
-0.05383693054318428,
0.14639663696289062,
0.19313684105873108,
-0.06125175207853317,
0.05396554246544838,
0.12448438256978989,
0.027982354164123535,
-0.40992820262908936,
0.30651116371154785,
0.29656586050987244,
0.18939177691936493,
0.0822209045290947,
0.24651604890823364,
0.2810044288635254,
0.08522041887044907,
-0.23781946301460266,
-0.08673620969057083,
0.7142136096954346,
-0.34174299240112305,
-0.17895178496837616,
0.12404531240463257,
0.0556168407201767,
-0.37761422991752625,
0.1220378428697586,
-0.10018136352300644,
0.3989620506763458,
0.16367937624454498,
0.14447294175624847,
0.049114204943180084,
-0.3692813813686371,
0.05471015349030495,
0.09965406358242035,
-0.020087016746401787,
-0.06517379730939865,
0.05062157288193703,
0.23218776285648346,
0.07438654452562332,
0.07260869443416595,
0.6089348196983337,
0.2598017454147339,
0.35924437642097473,
-0.387089341878891,
-0.35522064566612244,
-0.5714659094810486,
-0.10873840004205704,
0.16925448179244995,
0.04363587126135826,
-0.42368823289871216,
-0.07805538922548294,
0.3002100884914398,
0.045775458216667175,
0.42296066880226135,
0.10642288625240326,
-0.06761124730110168,
-0.20873214304447174,
0.0002407922293059528,
0.1899525672197342,
0.08412227779626846,
-0.2580258846282959,
0.21304602921009064,
0.4400646984577179,
-0.23850731551647186,
-0.3429695665836334,
-0.23654085397720337,
0.3087864816188812,
-0.22442704439163208,
-0.08917360007762909,
-0.29342222213745117,
-0.36902013421058655,
-0.07882899791002274,
-0.2005903422832489,
-0.008790592662990093,
0.17154569923877716,
0.11334040760993958,
-0.5838222503662109,
-0.33571672439575195,
0.38126298785209656,
0.35731765627861023,
0.034692347049713135,
-0.2963629961013794,
0.07732425630092621,
-0.254717081785202,
-0.2744426727294922,
0.15039895474910736,
0.6171963810920715,
0.44917038083076477,
0.2272644340991974,
0.3225548267364502,
-0.03420253098011017,
0.012865486554801464,
-0.21137753129005432,
0.21601641178131104,
0.2802967131137848,
-0.26346665620803833,
0.01054217666387558,
-0.04660822078585625,
0.26328045129776,
-0.17853984236717224,
0.12417306005954742,
0.4459400773048401,
0.18686768412590027,
-0.23183946311473846,
-0.3095211088657379,
0.0230622086673975,
0.07844215631484985,
0.026897074654698372,
0.36049920320510864,
0.14836379885673523,
-0.1881168633699417,
-0.046206507831811905,
0.0034326999448239803,
1.1015580892562866,
-0.1373366117477417,
0.26098987460136414,
0.2877703905105591,
-0.3302657902240753,
0.35109734535217285,
0.12818267941474915,
0.01367244217544794,
-0.13115353882312775,
-0.035451874136924744,
0.06439948827028275,
-0.28902724385261536,
0.18843881785869598,
-0.04902796447277069,
-0.12707699835300446,
-0.042886801064014435,
0.021584948524832726,
-0.04151095077395439,
0.08006139099597931,
0.10239104181528091,
-0.21604445576667786,
0.10608445107936859,
-0.2881343364715576,
0.01920723356306553,
-0.026541419327259064,
-0.013920619152486324,
-0.11744611710309982,
0.036135680973529816,
0.15228787064552307,
-0.32082927227020264,
-0.16449443995952606,
-0.3527449071407318,
0.5632606744766235,
-0.1109793558716774,
0.026470093056559563,
0.12260642647743225,
-0.05278734862804413,
0.3851521909236908,
0.02186405658721924,
0.2955084443092346,
0.09290279448032379,
-0.40849801898002625,
-0.0887891873717308,
0.10002503544092178,
0.13085556030273438,
0.01529455091804266,
0.17414291203022003,
-0.08003953099250793,
-0.3821750581264496,
0.1858171820640564,
-0.029614677652716637,
-0.3801407516002655,
0.25918641686439514,
-0.2220323383808136,
0.1948300302028656,
-0.3954450190067291,
0.047775544226169586,
0.0720037892460823,
-0.17367129027843475,
0.050877027213573456,
0.09756901860237122,
0.3021848201751709,
-0.2064765840768814,
0.2860214114189148,
-0.3368220627307892,
-0.6666284203529358,
-0.2260286509990692,
0.1795525997877121,
0.1741960197687149,
-0.050671376287937164,
0.22912608087062836,
-0.001555715687572956,
-0.43764954805374146,
-0.10270297527313232,
0.17209990322589874,
-0.0048597767017781734,
-0.11718764156103134,
0.1323741227388382,
0.23864398896694183,
-0.05813135951757431,
-0.3001347482204437,
0.324601411819458,
-0.06271332502365112,
0.02109985239803791,
-0.48572298884391785,
-0.03629658371210098,
-0.4227111041545868,
0.2273528128862381,
-0.15134687721729279,
0.4059913456439972,
0.11914419382810593,
-0.032221902161836624,
0.03612695634365082,
-0.29737550020217896,
-0.2570326328277588,
-0.34704503417015076,
-0.29687875509262085,
-0.013698939234018326,
0.19119147956371307,
0.07638818770647049,
0.34034550189971924,
0.16969376802444458,
0.02623613551259041,
0.037167858332395554,
-0.21742571890354156,
-0.10591335594654083,
0.15651647746562958,
0.17494522035121918,
-0.11610855907201767,
0.31474679708480835,
-0.07863625138998032,
-0.05770747736096382,
0.12121542543172836,
0.178086519241333,
0.6493927836418152,
0.3984891176223755,
0.05859392508864403,
0.05074269324541092,
0.13232186436653137,
0.14962096512317657,
-0.05321687087416649,
0.19168581068515778,
0.005091189406812191,
0.09182915836572647,
-0.10485292971134186,
-0.03152842074632645,
-0.3787105083465576,
-0.1021006628870964,
0.4027526378631592,
0.2205820530653,
0.311481773853302,
0.431188702583313,
0.4334309697151184,
-0.05587558448314667,
0.08689059317111969,
-0.0006719717057421803,
0.21638287603855133,
0.1681899130344391,
-0.0863659679889679,
-0.3955232501029968,
-0.14281772077083588,
0.08187530934810638,
0.22499269247055054,
0.010132286697626114,
-0.34407469630241394,
-0.26735633611679077,
-0.20521409809589386,
0.3394455313682556,
-0.08005578070878983,
-0.06609760224819183,
0.5081408619880676,
0.06180296093225479,
0.25501471757888794,
-0.1932755559682846,
-0.19699949026107788,
0.08771108835935593,
-0.3469739854335785,
0.24660417437553406,
0.3824843764305115,
0.2974497973918915,
-0.15636788308620453,
-0.10224541276693344,
-0.06365592032670975,
0.12384915351867676,
0.1860051453113556,
-0.036298640072345734,
-0.13814568519592285,
0.08023758232593536,
0.034901343286037445,
0.41413649916648865,
-0.162323996424675,
-0.06295724958181381,
0.1144629716873169,
-0.248287633061409,
-0.0862407311797142,
0.1089327484369278,
0.07797764241695404,
-0.14258021116256714,
-0.2707245349884033,
0.16971565783023834,
-0.14908535778522491,
-0.010632343590259552,
-0.09391037374734879,
-0.019294286146759987,
0.030403122305870056,
0.04674084857106209,
-0.15838700532913208,
-0.0355544351041317,
0.07075392454862595,
-0.23468996584415436,
-0.2739596366882324,
-0.20871399343013763,
0.09979955106973648,
-0.08737386018037796,
-0.013681668788194656,
-0.04037223011255264,
0.41386812925338745,
0.4520375728607178,
0.3165353238582611,
0.46769848465919495,
0.24508346617221832,
0.5179721713066101,
0.02205657958984375,
-0.13658541440963745,
0.028026578947901726,
-0.24763111770153046,
0.4332350194454193,
-0.02080458402633667,
-0.10890959948301315,
0.31408655643463135,
0.09205535799264908,
-0.03607521578669548,
0.11274506896734238,
-0.05554722249507904,
0.21304132044315338,
-0.32427096366882324,
0.7055280208587646,
0.028297727927565575,
-0.2022135704755783,
-0.2135058492422104,
0.017481813207268715,
-0.518684446811676,
-0.02052842266857624,
0.17429298162460327,
-0.13701222836971283,
0.033315081149339676,
-0.40206217765808105,
0.07291537523269653,
0.14469707012176514,
0.48933538794517517,
0.6453385949134827,
0.3660602867603302,
-0.15328779816627502,
-0.09840840846300125,
-0.19295576214790344,
0.26290571689605713,
0.15719477832317352,
0.04018624871969223,
-0.0300214234739542,
-0.18382896482944489,
-0.00414653355255723,
0.3262840807437897,
0.1542157530784607,
-0.2445581704378128,
-0.5066187977790833,
-0.04456256702542305,
0.010672139935195446,
0.06876908242702484,
0.39766430854797363,
0.2572368383407593,
-0.16429710388183594,
-0.0032923792023211718,
0.5116845369338989,
-0.26118943095207214,
-0.015458319336175919,
0.11912049353122711,
0.3817164897918701,
-0.14671997725963593,
-0.2076234221458435,
0.012718809768557549,
0.20665960013866425,
-0.06408119946718216,
0.024760635569691658,
-0.38282540440559387,
-0.03049885295331478,
0.03287624940276146,
-0.13187313079833984,
-0.002138119423761964,
-0.26048117876052856,
0.4260804057121277,
-0.019415903836488724,
-0.09707393497228622,
-0.3136410713195801,
0.14242148399353027,
0.1574992835521698,
0.17517541348934174,
0.23021772503852844,
-0.18713216483592987,
-0.2503662109375,
-0.03902405872941017,
0.27345144748687744,
0.2703128159046173,
0.35041099786758423,
-0.05745222792029381,
-0.13967382907867432,
-0.1904391050338745,
0.359577476978302,
-0.15502549707889557,
-0.21103931963443756,
-0.11846364289522171,
0.28662899136543274,
0.16838790476322174,
-0.19353513419628143,
-0.5391812920570374,
-0.029688766226172447,
0.219997376203537,
-0.23673658072948456,
0.1419854462146759,
0.08748359233140945,
-0.3980548083782196,
0.28259795904159546,
-0.019119160249829292,
0.4385914206504822,
-0.20421375334262848,
0.3405652344226837,
-0.12988868355751038,
-0.5378352999687195
] |
https://github.com/huggingface/datasets/issues/2003
|
Messages are being printed to the `stdout`
|
@lhoestq, sorry for the late reply
I completely understand why you decided to output a message that is always shown. The only problem is that the message is printed to the `stdout`. For example, if the user runs `python run_glue.py > log_file`, it will redirect `stdout` to the file named `log_file`, and the message will not be shown to the user.
Instead, we should print this message to `stderr`. Even in the case of `python run_glue.py > log_file` only `stdout` is being redirected and so the message is always shown.
|
In this code segment, we can see some messages are being printed to the `stdout`.
https://github.com/huggingface/datasets/blob/7e60bb509b595e8edc60a87f32b2bacfc065d607/src/datasets/builder.py#L545-L554
According to the comment, it is done intentionally, but I don't really understand why don't we log it with a higher level or print it directly to the `stderr`.
In my opinion, this kind of messages should never printed to the stdout. At least some configuration/flag should make it possible to provide in order to explicitly prevent the package to contaminate the stdout.
| 90
|
Messages are being printed to the `stdout`
In this code segment, we can see some messages are being printed to the `stdout`.
https://github.com/huggingface/datasets/blob/7e60bb509b595e8edc60a87f32b2bacfc065d607/src/datasets/builder.py#L545-L554
According to the comment, it is done intentionally, but I don't really understand why don't we log it with a higher level or print it directly to the `stderr`.
In my opinion, this kind of messages should never printed to the stdout. At least some configuration/flag should make it possible to provide in order to explicitly prevent the package to contaminate the stdout.
@lhoestq, sorry for the late reply
I completely understand why you decided to output a message that is always shown. The only problem is that the message is printed to the `stdout`. For example, if the user runs `python run_glue.py > log_file`, it will redirect `stdout` to the file named `log_file`, and the message will not be shown to the user.
Instead, we should print this message to `stderr`. Even in the case of `python run_glue.py > log_file` only `stdout` is being redirected and so the message is always shown.
|
[
0.05412493273615837,
-0.428303062915802,
-0.017841123044490814,
0.18632042407989502,
0.17762857675552368,
-0.15478098392486572,
0.38389626145362854,
0.1616000086069107,
0.06724242120981216,
0.24442532658576965,
0.1907820701599121,
0.30530622601509094,
-0.14255906641483307,
0.28497543931007385,
0.2610241174697876,
0.14178882539272308,
-0.07240665704011917,
0.022882383316755295,
-0.4255489408969879,
0.10764102637767792,
-0.008999659679830074,
0.11102595925331116,
0.19963911175727844,
0.4757940471172333,
-0.6451066732406616,
-0.09693297743797302,
0.2199249118566513,
0.06825507432222366,
-0.15046651661396027,
-0.5180291533470154,
-0.003875939641147852,
0.19596892595291138,
-0.07114795595407486,
0.21872557699680328,
-0.00011078464740421623,
0.11144504696130753,
0.5583909153938293,
0.1802080273628235,
-0.5341897010803223,
-0.14948934316635132,
-0.06871974468231201,
-0.24119500815868378,
0.3232269585132599,
-0.13856400549411774,
-0.1318155974149704,
-0.2632316052913666,
0.2714942693710327,
-0.34198909997940063,
0.3885955214500427,
0.2979874610900879,
0.21856583654880524,
0.23838859796524048,
0.01073422934859991,
0.24307551980018616,
0.12540677189826965,
0.2416493445634842,
0.03767663240432739,
-0.04286796972155571,
-0.04291129484772682,
0.308066725730896,
-0.20364318788051605,
0.42865419387817383,
-0.08262309432029724,
-0.2804137170314789,
0.026290716603398323,
0.14172524213790894,
0.16272620856761932,
-0.34875303506851196,
0.0097642308101058,
0.09935720264911652,
0.2654750347137451,
-0.4483453333377838,
-0.10971492528915405,
-0.3162617087364197,
-0.09637509286403656,
-0.11715836077928543,
0.18483999371528625,
0.14460419118404388,
-0.1712838113307953,
0.38092195987701416,
-0.19024567306041718,
-0.2524473965167999,
-0.2295151799917221,
-0.07340969890356064,
-0.12478120625019073,
0.019962113350629807,
-0.3208540678024292,
0.2482612431049347,
-0.22182174026966095,
0.21604688465595245,
-0.18572966754436493,
-0.21653145551681519,
-0.12456634640693665,
-0.0516970232129097,
-0.06147754564881325,
0.005703331902623177,
0.11515440791845322,
-0.09116487950086594,
-0.011602872982621193,
-0.12483632564544678,
-0.20138008892536163,
0.06203581020236015,
0.22327378392219543,
0.1918918341398239,
0.4884244203567505,
0.0879189521074295,
0.5125949382781982,
0.28145551681518555,
0.190799742937088,
-0.04213185980916023,
0.09053052216768265,
-0.20219290256500244,
0.3088914752006531,
0.17086400091648102,
0.2888867259025574,
-0.23289355635643005,
0.2866511046886444,
-0.09002309292554855,
-0.06496843695640564,
0.1431061029434204,
-0.0611838698387146,
0.07108872383832932,
-0.023484716191887856,
0.2419443577528,
0.015369975008070469,
-0.11411231756210327,
0.37815234065055847,
-0.0502079501748085,
0.06269354373216629,
-0.007013756316155195,
-0.1976069062948227,
0.026109835132956505,
-0.33173105120658875,
0.03551361709833145,
-0.10246526449918747,
-0.04999031871557236,
0.06742030382156372,
0.09769140183925629,
0.15358866751194,
-0.10751496255397797,
-0.12621144950389862,
-0.057667333632707596,
0.4185280501842499,
0.4810258746147156,
-0.2644612491130829,
0.2954939007759094,
0.19435441493988037,
-0.257878839969635,
-0.13231150805950165,
0.195291668176651,
0.0771404281258583,
-0.2959943413734436,
0.1112995371222496,
0.18303567171096802,
-0.3067573308944702,
0.32343411445617676,
-0.21313759684562683,
0.026549629867076874,
-0.001250423607416451,
-0.11951082944869995,
0.23571883141994476,
-0.16988444328308105,
-0.017431439831852913,
-0.2179446667432785,
0.1805119514465332,
0.36437779664993286,
-0.2229030579328537,
-0.10527543723583221,
-0.0771980807185173,
-0.4211510121822357,
0.3274557292461395,
-0.23250052332878113,
0.1644018292427063,
0.3366910219192505,
-0.3936915099620819,
-0.3250599503517151,
0.45736122131347656,
-0.333756685256958,
-0.17088790237903595,
0.2364998310804367,
-0.40482065081596375,
0.4652930796146393,
0.20766963064670563,
0.0043005747720599174,
-0.005994886159896851,
0.03763486444950104,
0.17420165240764618,
-0.1800454705953598,
0.3051742613315582,
0.13022327423095703,
-0.22910088300704956,
-0.04510144516825676,
-0.15151645243167877,
-0.0034162637311965227,
-0.09589061141014099,
-0.025933504104614258,
-0.016993502154946327,
-0.11716236919164658,
0.42997506260871887,
0.2623743414878845,
0.07724796235561371,
-0.23616674542427063,
0.24081730842590332,
0.26138341426849365,
-0.06856460124254227,
-0.04811929911375046,
-0.06348194181919098,
0.006226654164493084,
-0.1658308357000351,
0.05443929135799408,
-0.3115939497947693,
-0.22199858725070953,
0.1507134735584259,
0.1317087560892105,
-0.16920261085033417,
-0.3026212155818939,
0.16070280969142914,
0.23809814453125,
0.11330032348632812,
0.3026776909828186,
-0.11984596401453018,
0.5206783413887024,
-0.3534444570541382,
0.08849439769983292,
-0.1319674402475357,
-0.06219463795423508,
0.2574373483657837,
-0.12813854217529297,
-0.0756496787071228,
0.20815585553646088,
-0.09341022372245789,
0.1671343892812729,
0.03816649690270424,
0.4232924282550812,
-0.004345085937529802,
0.11832108348608017,
-0.3124951124191284,
0.05007082596421242,
0.009798898361623287,
-0.0047040884383022785,
0.08957138657569885,
0.14204436540603638,
-0.14656680822372437,
0.14718008041381836,
0.03844914957880974,
-0.08872523158788681,
0.1721261590719223,
0.15069632232189178,
-0.04385551065206528,
0.048843830823898315,
-0.12275122851133347,
0.198838472366333,
-0.4711333215236664,
-0.3036494255065918,
-0.2785588502883911,
-0.17136448621749878,
0.303311288356781,
0.11840815842151642,
-0.3035776615142822,
0.2379678636789322,
0.7682512998580933,
-0.03013729490339756,
0.020550057291984558,
0.06579107791185379,
-0.2529126703739166,
0.01815677434206009,
0.11027298867702484,
0.20936310291290283,
0.17606273293495178,
0.2615455389022827,
0.20013298094272614,
0.05080651119351387,
0.006275653373450041,
0.01269044540822506,
0.22415420413017273,
0.06510896235704422,
-0.2292536348104477,
0.08695018291473389,
-0.08512771129608154,
-0.22623766958713531,
-0.23316530883312225,
0.27964064478874207,
-0.5140916109085083,
-0.19451917707920074,
-0.39190948009490967,
0.0182175450026989,
-0.23537418246269226,
-0.4033132493495941,
-0.5682982206344604,
-0.09719467908143997,
-0.09389974176883698,
-0.39500662684440613,
0.35449379682540894,
-0.0493449829518795,
-0.25135505199432373,
0.0566960908472538,
0.3190598785877228,
0.2767195403575897,
0.02841656282544136,
0.1718176156282425,
-0.45148754119873047,
0.2630801796913147,
-0.4042057693004608,
0.054278887808322906,
-0.2848893404006958,
0.12470446527004242,
0.36212190985679626,
-0.211623415350914,
-0.0718005821108818,
-0.27854952216148376,
-0.05870930850505829,
0.22191473841667175,
-0.2349591702222824,
0.560147225856781,
0.30410051345825195,
0.04969732090830803,
0.24474914371967316,
-0.10819476842880249,
0.09881216287612915,
-0.3349267244338989,
-0.042232297360897064,
-0.23069489002227783,
0.1663368195295334,
0.18852080404758453,
-0.30573737621307373,
-0.24927985668182373,
-0.35926568508148193,
-0.33991843461990356,
0.25995105504989624,
-0.21321777999401093,
0.2335214614868164,
-0.1511964648962021,
-0.11237559467554092,
0.13762712478637695,
-0.39359423518180847,
0.49728530645370483,
-0.0881853997707367,
-0.6302135586738586,
-0.15511441230773926,
-0.12440469115972519,
-0.0908232033252716,
-0.16545845568180084,
0.11361748725175858,
-0.23277540504932404,
-0.22507642209529877,
-0.5604442954063416,
-0.2937106192111969,
-0.22115717828273773,
-0.1356343775987625,
0.2647370994091034,
0.3401818871498108,
0.1737585961818695,
0.11551987379789352,
-0.12176237255334854,
-0.07755346596240997,
-0.09467621147632599,
0.08919720351696014,
-0.3017311096191406,
0.20184029638767242,
0.23144620656967163,
0.15251636505126953,
0.030849529430270195,
0.131617471575737,
0.3769792914390564,
0.12318287044763565,
-0.2599908411502838,
-0.1977275162935257,
0.9344837665557861,
-0.30767980217933655,
-0.13847610354423523,
-0.014909046702086926,
0.12179622054100037,
-0.3135748505592346,
0.1371774524450302,
-0.02957146428525448,
0.42887696623802185,
0.17466364800930023,
0.013523532077670097,
-0.14032714068889618,
-0.47023478150367737,
-0.08770845085382462,
0.007917492650449276,
-0.10618371516466141,
-0.038294874131679535,
0.024189848452806473,
0.22700850665569305,
0.1013316735625267,
-0.00780882965773344,
0.4862000048160553,
0.3321853578090668,
0.32552027702331543,
-0.2572871446609497,
-0.37902313470840454,
-0.44886156916618347,
-0.10846015065908432,
-0.115163654088974,
-0.01706060767173767,
-0.2848506271839142,
-0.3079060912132263,
0.30155104398727417,
0.1109931543469429,
0.48755112290382385,
-0.07997294515371323,
0.07365482300519943,
-0.047708068042993546,
0.039941247552633286,
-0.059490326792001724,
-0.004463099874556065,
-0.23068340122699738,
0.22399555146694183,
0.38983625173568726,
-0.06655881553888321,
-0.2347535789012909,
-0.2896493971347809,
0.33233514428138733,
-0.16473627090454102,
-0.2118757963180542,
-0.3469480574131012,
-0.4939076006412506,
0.055459052324295044,
-0.07080087810754776,
0.16331222653388977,
0.19895368814468384,
-0.029853345826268196,
-0.48654991388320923,
-0.4637317359447479,
0.28019091486930847,
0.1129298061132431,
0.03387800604104996,
-0.07506104558706284,
0.21294613182544708,
-0.2921408712863922,
-0.21566922962665558,
0.31725040078163147,
0.5881596207618713,
0.06885623931884766,
0.20732098817825317,
0.07943971455097198,
0.08810942620038986,
0.020972415804862976,
-0.27854079008102417,
0.36189377307891846,
0.27274954319000244,
-0.2944975793361664,
0.025618698447942734,
-0.20366732776165009,
0.26322275400161743,
-0.22909003496170044,
0.04293541610240936,
0.34449857473373413,
0.21179170906543732,
-0.1790151596069336,
-0.3018653690814972,
0.0961393341422081,
-0.041125357151031494,
-0.12968681752681732,
0.3108428120613098,
0.20021364092826843,
-0.3194752633571625,
0.045675504952669144,
-0.137515589594841,
0.9276252388954163,
-0.04919752478599548,
0.22193560004234314,
0.22381669282913208,
-0.2233254760503769,
0.39597582817077637,
0.04470337927341461,
0.1350613236427307,
-0.2658407390117645,
-0.1578323096036911,
0.10124282538890839,
-0.23733022809028625,
-0.009509370662271976,
0.03419306129217148,
-0.1483631581068039,
0.03928845748305321,
0.014529627747833729,
-0.04741651564836502,
-0.08733336627483368,
0.18599408864974976,
-0.15578296780586243,
0.047882840037345886,
-0.4868292808532715,
0.08105998486280441,
0.16701626777648926,
-0.05334698408842087,
-0.04476505145430565,
0.03768887370824814,
0.4169236719608307,
-0.3255189061164856,
-0.033693261444568634,
-0.21970920264720917,
0.2313959300518036,
-0.17181752622127533,
0.13135989010334015,
0.023282751441001892,
-0.19013844430446625,
0.22004061937332153,
-0.009853554889559746,
0.5313001275062561,
0.22729910910129547,
-0.30400359630584717,
0.24541927874088287,
0.14607970416545868,
-0.06698966771364212,
0.109239362180233,
0.3509553074836731,
0.08251503109931946,
-0.4282560348510742,
0.2340434342622757,
-0.046178653836250305,
-0.28307101130485535,
0.07510597258806229,
-0.05556555464863777,
0.1881590634584427,
-0.30634263157844543,
0.1682010143995285,
0.10038197785615921,
-0.047390300780534744,
0.046548910439014435,
0.14587311446666718,
0.37366461753845215,
-0.35566815733909607,
0.3597009778022766,
-0.24779441952705383,
-0.6420059204101562,
-0.07257552444934845,
-0.0022321124561131,
0.14102348685264587,
0.13218045234680176,
0.12114754319190979,
0.053102895617485046,
-0.303824245929718,
-0.18326888978481293,
0.08491919189691544,
0.24308069050312042,
0.0785035640001297,
0.13086740672588348,
0.369480162858963,
-0.023278677836060524,
-0.0923413410782814,
0.10555175691843033,
-0.11751498281955719,
-0.043842874467372894,
-0.5810173153877258,
-0.1720307171344757,
-0.2917287349700928,
0.23438026010990143,
-0.17262068390846252,
0.3928423523902893,
0.3371571898460388,
-0.06971390545368195,
0.10003091394901276,
-0.048571519553661346,
-0.36651694774627686,
-0.37366241216659546,
-0.17960263788700104,
0.11793195456266403,
0.28224068880081177,
0.06902895867824554,
0.36853572726249695,
0.01983785815536976,
0.13144059479236603,
-0.0938628688454628,
-0.23406656086444855,
-0.21576891839504242,
0.11629457771778107,
0.11492780596017838,
-0.15050619840621948,
0.3382866680622101,
-0.11926933377981186,
-0.1658315807580948,
0.2831531763076782,
0.010791000910103321,
0.8302781581878662,
0.380509614944458,
-0.05035634711384773,
0.07972343266010284,
0.036544069647789,
0.0940258800983429,
-0.014363806694746017,
0.12919852137565613,
0.03947729244828224,
-0.11257916688919067,
-0.0027951234951615334,
-0.07288102060556412,
-0.4296865165233612,
-0.061837173998355865,
0.44535183906555176,
0.20219142735004425,
0.17393217980861664,
0.5326746106147766,
0.19151543080806732,
-0.054660163819789886,
-0.12564891576766968,
-0.23789960145950317,
0.40469151735305786,
0.0986340343952179,
-0.07698957622051239,
-0.4025775194168091,
-0.11531519144773483,
0.19525562226772308,
0.06094180420041084,
0.08513067662715912,
-0.10675384849309921,
-0.34989234805107117,
0.0727885439991951,
0.39255720376968384,
0.01886698603630066,
-0.07153302431106567,
0.4490734338760376,
0.14056532084941864,
0.18308819830417633,
-0.3522501289844513,
-0.12748600542545319,
0.06028064712882042,
-0.35313111543655396,
0.15837214887142181,
0.4669981598854065,
0.18106204271316528,
-0.12161588668823242,
0.025040199980139732,
0.17498478293418884,
0.19757649302482605,
0.23225614428520203,
-0.11985346674919128,
-0.03343119099736214,
0.10307404398918152,
0.09932021796703339,
0.2516613304615021,
-0.2458595335483551,
-0.06709523499011993,
-0.037726011127233505,
0.033049874007701874,
-0.23899945616722107,
0.13590635359287262,
0.012885117903351784,
-0.17122380435466766,
-0.18697628378868103,
0.10096926987171173,
0.006851474288851023,
0.01859639771282673,
-0.14148841798305511,
-0.1694045066833496,
0.20642432570457458,
-0.07986727356910706,
-0.05935683846473694,
-0.03376959264278412,
0.10822182148694992,
-0.16757522523403168,
-0.26680588722229004,
-0.17477266490459442,
0.07263690233230591,
-0.016556428745388985,
0.14556632936000824,
-0.11150035262107849,
0.45081931352615356,
0.35212185978889465,
0.2865583598613739,
0.30997392535209656,
0.18528033792972565,
0.3356398642063141,
0.013409247621893883,
-0.12033769488334656,
-0.07648328691720963,
-0.3353624641895294,
0.3160897195339203,
-0.012913060374557972,
-0.24479717016220093,
0.19271621108055115,
0.23309776186943054,
-0.1097831055521965,
0.07183646410703659,
-0.023925725370645523,
0.08178465068340302,
-0.22763372957706451,
0.6042560338973999,
0.15798678994178772,
-0.21048928797245026,
-0.2526171803474426,
-0.02163364365696907,
-0.6160026788711548,
-0.11306460946798325,
0.48171254992485046,
-0.08999322354793549,
-0.028803516179323196,
-0.537742018699646,
0.13226202130317688,
0.11687863618135452,
0.2316974401473999,
0.45349591970443726,
0.3030889332294464,
0.022323014214634895,
0.005322602577507496,
-0.26705360412597656,
0.339733749628067,
0.09744826704263687,
-0.12412960082292557,
-0.15888211131095886,
-0.1152593195438385,
0.020044520497322083,
0.13323426246643066,
0.21418407559394836,
-0.07673094421625137,
-0.4619896411895752,
-0.20512692630290985,
-0.04483107104897499,
0.03678656369447708,
0.357684463262558,
0.15594476461410522,
-0.022284308448433876,
-0.0010504331439733505,
0.22694534063339233,
-0.23665906488895416,
0.0921262800693512,
0.3040309250354767,
0.364193320274353,
-0.029160570353269577,
-0.18730953335762024,
0.2222917079925537,
0.2810077965259552,
0.060316696763038635,
-0.0935690775513649,
-0.19791197776794434,
-0.15836386382579803,
0.0454438142478466,
-0.3171052932739258,
0.028159335255622864,
-0.12404672056436539,
0.4336733818054199,
-0.02267141453921795,
-0.26689741015434265,
-0.2442459762096405,
0.04074086248874664,
0.22290705144405365,
0.04358789324760437,
0.3966628313064575,
-0.04393871873617172,
-0.1420145183801651,
-0.008475346490740776,
0.15399375557899475,
0.3463272452354431,
0.25882968306541443,
-0.0758061632514,
-0.04595329612493515,
-0.21838589012622833,
0.2991538643836975,
-0.3736024498939514,
-0.3177955448627472,
-0.18937931954860687,
0.38146328926086426,
0.09584987163543701,
-0.1871168613433838,
-0.5491605997085571,
-0.10380865633487701,
0.24569232761859894,
-0.18859317898750305,
0.13009941577911377,
0.14239190518856049,
-0.3548873960971832,
0.2615864872932434,
-0.040936946868896484,
0.2532685399055481,
-0.05653054639697075,
0.20772969722747803,
-0.0719631239771843,
-0.5686920285224915
] |
https://github.com/huggingface/datasets/issues/2000
|
Windows Permission Error (most recent version of datasets)
|
Hi @itsLuisa !
Could you give us more information about the error you're getting, please?
A copy-paste of the Traceback would be nice to get a better understanding of what is wrong :)
|
Hi everyone,
Can anyone help me with why the dataset loading script below raises a Windows Permission Error? I stuck quite closely to https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py , only I want to load the data from three local three-column tsv-files (id\ttokens\tpos_tags\n). I am using the most recent version of datasets. Thank you in advance!
Luisa
My script:
```
import datasets
import csv
logger = datasets.logging.get_logger(__name__)
class SampleConfig(datasets.BuilderConfig):
def __init__(self, **kwargs):
super(SampleConfig, self).__init__(**kwargs)
class Sample(datasets.GeneratorBasedBuilder):
BUILDER_CONFIGS = [
SampleConfig(name="conll2003", version=datasets.Version("1.0.0"), description="Conll2003 dataset"),
]
def _info(self):
return datasets.DatasetInfo(
description="Dataset with words and their POS-Tags",
features=datasets.Features(
{
"id": datasets.Value("string"),
"tokens": datasets.Sequence(datasets.Value("string")),
"pos_tags": datasets.Sequence(
datasets.features.ClassLabel(
names=[
"''",
",",
"-LRB-",
"-RRB-",
".",
":",
"CC",
"CD",
"DT",
"EX",
"FW",
"HYPH",
"IN",
"JJ",
"JJR",
"JJS",
"MD",
"NN",
"NNP",
"NNPS",
"NNS",
"PDT",
"POS",
"PRP",
"PRP$",
"RB",
"RBR",
"RBS",
"RP",
"TO",
"UH",
"VB",
"VBD",
"VBG",
"VBN",
"VBP",
"VBZ",
"WDT",
"WP",
"WRB",
"``"
]
)
),
}
),
supervised_keys=None,
homepage="https://catalog.ldc.upenn.edu/LDC2011T03",
citation="Weischedel, Ralph, et al. OntoNotes Release 4.0 LDC2011T03. Web Download. Philadelphia: Linguistic Data Consortium, 2011.",
)
def _split_generators(self, dl_manager):
loaded_files = dl_manager.download_and_extract(self.config.data_files)
return [
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": loaded_files["train"]}),
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": loaded_files["test"]}),
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": loaded_files["val"]})
]
def _generate_examples(self, filepath):
logger.info("generating examples from = %s", filepath)
with open(filepath, encoding="cp1252") as f:
data = csv.reader(f, delimiter="\t")
ids = list()
tokens = list()
pos_tags = list()
for id_, line in enumerate(data):
#print(line)
if len(line) == 1:
if tokens:
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
ids = list()
tokens = list()
pos_tags = list()
else:
ids.append(line[0])
tokens.append(line[1])
pos_tags.append(line[2])
# last example
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
def main():
dataset = datasets.load_dataset(
"data_loading.py", data_files={
"train": "train.tsv",
"test": "test.tsv",
"val": "val.tsv"
}
)
#print(dataset)
if __name__=="__main__":
main()
```
| 33
|
Windows Permission Error (most recent version of datasets)
Hi everyone,
Can anyone help me with why the dataset loading script below raises a Windows Permission Error? I stuck quite closely to https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py , only I want to load the data from three local three-column tsv-files (id\ttokens\tpos_tags\n). I am using the most recent version of datasets. Thank you in advance!
Luisa
My script:
```
import datasets
import csv
logger = datasets.logging.get_logger(__name__)
class SampleConfig(datasets.BuilderConfig):
def __init__(self, **kwargs):
super(SampleConfig, self).__init__(**kwargs)
class Sample(datasets.GeneratorBasedBuilder):
BUILDER_CONFIGS = [
SampleConfig(name="conll2003", version=datasets.Version("1.0.0"), description="Conll2003 dataset"),
]
def _info(self):
return datasets.DatasetInfo(
description="Dataset with words and their POS-Tags",
features=datasets.Features(
{
"id": datasets.Value("string"),
"tokens": datasets.Sequence(datasets.Value("string")),
"pos_tags": datasets.Sequence(
datasets.features.ClassLabel(
names=[
"''",
",",
"-LRB-",
"-RRB-",
".",
":",
"CC",
"CD",
"DT",
"EX",
"FW",
"HYPH",
"IN",
"JJ",
"JJR",
"JJS",
"MD",
"NN",
"NNP",
"NNPS",
"NNS",
"PDT",
"POS",
"PRP",
"PRP$",
"RB",
"RBR",
"RBS",
"RP",
"TO",
"UH",
"VB",
"VBD",
"VBG",
"VBN",
"VBP",
"VBZ",
"WDT",
"WP",
"WRB",
"``"
]
)
),
}
),
supervised_keys=None,
homepage="https://catalog.ldc.upenn.edu/LDC2011T03",
citation="Weischedel, Ralph, et al. OntoNotes Release 4.0 LDC2011T03. Web Download. Philadelphia: Linguistic Data Consortium, 2011.",
)
def _split_generators(self, dl_manager):
loaded_files = dl_manager.download_and_extract(self.config.data_files)
return [
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": loaded_files["train"]}),
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": loaded_files["test"]}),
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": loaded_files["val"]})
]
def _generate_examples(self, filepath):
logger.info("generating examples from = %s", filepath)
with open(filepath, encoding="cp1252") as f:
data = csv.reader(f, delimiter="\t")
ids = list()
tokens = list()
pos_tags = list()
for id_, line in enumerate(data):
#print(line)
if len(line) == 1:
if tokens:
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
ids = list()
tokens = list()
pos_tags = list()
else:
ids.append(line[0])
tokens.append(line[1])
pos_tags.append(line[2])
# last example
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
def main():
dataset = datasets.load_dataset(
"data_loading.py", data_files={
"train": "train.tsv",
"test": "test.tsv",
"val": "val.tsv"
}
)
#print(dataset)
if __name__=="__main__":
main()
```
Hi @itsLuisa !
Could you give us more information about the error you're getting, please?
A copy-paste of the Traceback would be nice to get a better understanding of what is wrong :)
|
[
-0.18255728483200073,
0.18238498270511627,
-0.0400310643017292,
0.2590488791465759,
0.08137813955545425,
0.13363763689994812,
0.45803380012512207,
0.012254608795046806,
0.18646298348903656,
0.07412843406200409,
-0.06345640122890472,
-0.011226520873606205,
-0.10879573225975037,
0.15729326009750366,
-0.032361824065446854,
-0.02825121581554413,
0.14535114169120789,
0.04806838557124138,
0.03199785575270653,
0.13964608311653137,
-0.4052307903766632,
-0.00712077971547842,
-0.23793594539165497,
0.10736668109893799,
-0.22316233813762665,
0.278344064950943,
-0.015726497396826744,
0.3908284306526184,
-0.03380320966243744,
-0.23501864075660706,
0.21016629040241241,
0.3624860644340515,
0.6620944142341614,
0.24535220861434937,
-0.00011262848420301452,
-0.0484500527381897,
0.042043182998895645,
-0.02013157121837139,
0.20681972801685333,
0.2423868477344513,
0.13413813710212708,
-0.04518745467066765,
0.004124745726585388,
-0.10666926205158234,
-0.16983790695667267,
0.20000217854976654,
-0.06542991101741791,
-0.3538346588611603,
0.11399795114994049,
0.4263342320919037,
0.1871960163116455,
0.2474631369113922,
-0.18068742752075195,
-0.010653833858668804,
0.5910395979881287,
0.04759855940937996,
-0.12615925073623657,
0.19279402494430542,
0.29002442955970764,
-0.442804217338562,
0.2141415774822235,
0.1609823852777481,
-0.22685876488685608,
0.0855398178100586,
0.3818266689777374,
-0.16326360404491425,
-0.1299564093351364,
-0.2830391228199005,
0.15840600430965424,
0.000053223735449137166,
0.7270629405975342,
-0.16924339532852173,
-0.3009922504425049,
-0.03410366177558899,
0.13930870592594147,
-0.26716965436935425,
0.22750525176525116,
0.336599200963974,
-0.05052685737609863,
0.075358547270298,
-0.23469969630241394,
-0.16715113818645477,
-0.4434010088443756,
0.13589583337306976,
0.17750561237335205,
-0.2292965203523636,
-0.08493347465991974,
0.22970888018608093,
0.09066371619701385,
-0.13017186522483826,
0.35443270206451416,
0.1294436752796173,
0.041961319744586945,
0.25176024436950684,
-0.46714743971824646,
0.3360511362552643,
0.20927397906780243,
0.29802170395851135,
-0.032026972621679306,
0.2779497504234314,
-0.13617223501205444,
-0.21062755584716797,
0.201899453997612,
0.12502066791057587,
0.1772739440202713,
-0.0542738102376461,
0.15196089446544647,
0.24112750589847565,
0.13750945031642914,
-0.022510958835482597,
0.040242984890937805,
-0.11744074523448944,
-0.4900486171245575,
-0.6061118841171265,
0.11520924419164658,
0.24548190832138062,
0.30733656883239746,
-0.08926699310541153,
-0.36133578419685364,
0.11647645384073257,
0.11813537776470184,
0.0680985227227211,
0.20681899785995483,
0.40973299741744995,
0.26633962988853455,
0.011944019235670567,
0.37393254041671753,
0.271499902009964,
-0.06286425143480301,
-0.025799212977290154,
-0.08621250838041306,
0.004246355500072241,
-0.24589797854423523,
-0.04984551668167114,
0.4257865846157074,
-0.344259649515152,
-0.11349886655807495,
0.11736336350440979,
0.03534337878227234,
-0.12135010212659836,
0.049454204738140106,
-0.018772443756461143,
0.116459421813488,
0.4388580918312073,
0.25841814279556274,
0.034997135400772095,
0.14504289627075195,
-0.1851188838481903,
-0.028277751058340073,
0.23644199967384338,
-0.1324140727519989,
-0.3404772877693176,
-0.18835799396038055,
0.10112982243299484,
0.01707432232797146,
0.04991450160741806,
-0.2183060646057129,
-0.13303709030151367,
0.12284991145133972,
-0.018460536375641823,
0.14428777992725372,
-0.10070186853408813,
-0.2660655081272125,
-0.33979469537734985,
-0.10151316970586777,
0.8314385414123535,
-0.5272628664970398,
0.14024002850055695,
-0.11474411934614182,
-0.30476781725883484,
0.10725029557943344,
0.3311966061592102,
-0.07650008052587509,
0.11135675758123398,
-0.21448317170143127,
0.15164528787136078,
-0.13571123778820038,
-0.3680852949619293,
-0.17889727652072906,
0.37800613045692444,
-0.0177533570677042,
-0.10368013381958008,
0.24373456835746765,
-0.039007727056741714,
0.04448583349585533,
-0.2033560425043106,
-0.08980175852775574,
0.13412858545780182,
0.138462096452713,
0.26056230068206787,
0.22497466206550598,
0.007567876949906349,
0.23220911622047424,
0.31242334842681885,
0.055345095694065094,
-0.06275063753128052,
0.29186728596687317,
-0.21869973838329315,
0.1895528882741928,
-0.3010880649089813,
0.22454553842544556,
0.41666823625564575,
0.1158202514052391,
0.30919763445854187,
0.0332210510969162,
-0.23222334682941437,
-0.44557398557662964,
0.265201598405838,
0.30548110604286194,
-0.12395836412906647,
0.04690229147672653,
-0.2565837502479553,
-0.15023930370807648,
0.21092697978019714,
-0.38839977979660034,
0.11677061021327972,
0.08991163223981857,
0.29797062277793884,
-0.17740100622177124,
-0.32089763879776,
0.03454190492630005,
0.056344375014305115,
-0.24442963302135468,
-0.11113439500331879,
-0.15343262255191803,
0.038459133356809616,
-0.30667123198509216,
0.01804235577583313,
0.2049437165260315,
-0.014822510071098804,
0.41576969623565674,
-0.07438044250011444,
0.002641684375703335,
0.359132319688797,
0.28032493591308594,
-0.0367782898247242,
0.03679615259170532,
0.09830871969461441,
-0.2261275202035904,
0.0771443247795105,
0.12725771963596344,
-0.009581999853253365,
0.09168605506420135,
-0.1025225818157196,
-0.02555355429649353,
0.1265101283788681,
-0.22594991326332092,
0.004111957736313343,
-0.28790801763534546,
0.1314646601676941,
-0.009617738425731659,
0.024884117767214775,
-0.024606041610240936,
-0.21992605924606323,
0.3593803644180298,
0.5096367001533508,
-0.328534871339798,
-0.045358043164014816,
-0.10262960195541382,
-0.05150877311825752,
0.27939367294311523,
-0.15055973827838898,
-0.1328611969947815,
0.06870722025632858,
0.09919058531522751,
0.2852434813976288,
0.197903573513031,
0.22638247907161713,
0.4385735094547272,
0.06445926427841187,
-0.16530245542526245,
0.05295098200440407,
0.20327642560005188,
-0.05280633643269539,
0.1483866274356842,
-0.3353100121021271,
0.07930517941713333,
0.26033520698547363,
-0.29920992255210876,
0.12752626836299896,
-0.3775518834590912,
-0.1403329074382782,
0.14408649504184723,
0.33695265650749207,
-0.5138473510742188,
-0.13262951374053955,
-0.014959330670535564,
-0.13346052169799805,
0.11050829291343689,
-0.3155808448791504,
-0.28314825892448425,
0.013027721084654331,
-0.20135435461997986,
0.16264154016971588,
-0.2732623517513275,
-0.12563997507095337,
-0.40158653259277344,
0.057358890771865845,
0.2376944124698639,
-0.0031731808558106422,
-0.021724814549088478,
0.08656153082847595,
-0.023845402523875237,
0.01460161805152893,
0.4932959973812103,
-0.2829740643501282,
0.43707337975502014,
-0.1266711950302124,
0.3814789056777954,
-0.28983092308044434,
0.10609005391597748,
-0.24759365618228912,
-0.33447325229644775,
0.32037556171417236,
0.2462342083454132,
0.09838887304067612,
-0.026244746521115303,
-0.20588155090808868,
0.11958713084459305,
-0.12245795875787735,
-0.0811639353632927,
0.17551051080226898,
0.30421558022499084,
-0.591818630695343,
-0.2506389319896698,
-0.1534152328968048,
-0.2042931467294693,
-0.3533950448036194,
0.22098980844020844,
0.13553519546985626,
0.3110547363758087,
0.20728586614131927,
-0.12186024338006973,
0.05302548035979271,
0.0434555746614933,
0.3111535310745239,
-0.31979528069496155,
-0.0964624360203743,
0.01373170968145132,
-0.15026600658893585,
-0.5285488367080688,
0.22050660848617554,
0.3835148215293884,
-0.12172157317399979,
0.10918369889259338,
-0.11583942174911499,
0.12510937452316284,
-0.2140980362892151,
0.25467148423194885,
-0.22828759253025055,
0.16625851392745972,
0.19286544620990753,
0.07349220663309097,
0.08055712282657623,
-0.16946540772914886,
-0.09909383952617645,
-0.3450901210308075,
-0.2438758909702301,
-0.26460981369018555,
0.15429100394248962,
0.3330397605895996,
-0.13151419162750244,
0.21499374508857727,
0.3426211178302765,
0.22642594575881958,
0.4461941123008728,
-0.12768428027629852,
0.43167656660079956,
0.28185200691223145,
-0.6437917947769165,
0.15215784311294556,
-0.186130091547966,
-0.05307244136929512,
0.36015939712524414,
-0.07771145552396774,
0.029472269117832184,
-0.1574554443359375,
0.05830525979399681,
-0.3378959000110626,
-0.21079273521900177,
-0.007262388709932566,
-0.25675514340400696,
0.2782016694545746,
-0.14798973500728607,
0.007296436466276646,
-0.28088411688804626,
-0.0628950223326683,
0.005471916403621435,
0.5689319372177124,
0.11677399277687073,
-0.061600808054208755,
-0.37606316804885864,
0.007869995199143887,
-0.4856029152870178,
0.26964640617370605,
0.06245235353708267,
0.6091938018798828,
-0.15552622079849243,
0.03150393068790436,
0.14377842843532562,
0.10852552950382233,
0.9010455012321472,
-0.43910178542137146,
0.2763890027999878,
0.24810035526752472,
0.11669433116912842,
-0.2631772458553314,
-0.21154174208641052,
-0.26822173595428467,
0.06743523478507996,
-0.013136257417500019,
0.30300775170326233,
0.011895906180143356,
-0.3937041163444519,
0.033997442573308945,
-0.15305210649967194,
-0.07940879464149475,
-0.4198119342327118,
-0.25355252623558044,
-0.18152381479740143,
-0.3771495521068573,
-0.10418076813220978,
0.2397937774658203,
0.1634436547756195,
-0.2563316524028778,
0.2497168332338333,
-0.022410357370972633,
0.28822219371795654,
0.11481095850467682,
-0.04067476466298103,
0.10160758346319199,
0.30721279978752136,
0.07862664759159088,
-0.08094628155231476,
0.12363327294588089,
0.21233391761779785,
0.5588170886039734,
-0.02612418681383133,
-0.364798903465271,
-0.1107676550745964,
-0.02700781635940075,
0.4848950505256653,
0.0845976173877716,
-0.1533041149377823,
0.10140584409236908,
-0.22111019492149353,
-0.058644481003284454,
-0.34801554679870605,
0.07395292073488235,
0.2731061577796936,
-0.05154228210449219,
0.059536006301641464,
-0.21576136350631714,
0.3164074122905731,
0.17232674360275269,
-0.19433748722076416,
-0.0005699679022654891,
0.14229874312877655,
-0.29477542638778687,
-0.09350638836622238,
0.051076147705316544,
0.5023055076599121,
-0.2940059006214142,
0.2797781527042389,
0.19559988379478455,
-0.16591061651706696,
-0.07114239782094955,
0.21357257664203644,
-0.08469656109809875,
-0.4017244577407837,
-0.3005032539367676,
-0.013429934158921242,
-0.10526703298091888,
-0.005474044010043144,
0.15854032337665558,
0.08495438098907471,
0.04002369940280914,
-0.0924145057797432,
0.38359642028808594,
0.03176041319966316,
0.059693217277526855,
-0.20207564532756805,
-0.24410469830036163,
0.10191024094820023,
0.15196862816810608,
-0.13610051572322845,
-0.02357208915054798,
-0.13115912675857544,
0.013543456792831421,
0.1534251719713211,
0.023918576538562775,
-0.39787137508392334,
0.2855558693408966,
-0.32799622416496277,
0.010730406269431114,
-0.13602310419082642,
0.09474027156829834,
0.5240967869758606,
0.4402708411216736,
-0.006493174005299807,
0.14545507729053497,
-0.25311627984046936,
-0.26665693521499634,
0.1540939062833786,
-0.29178404808044434,
-0.2915801703929901,
-0.023664187639951706,
0.2547367513179779,
0.02128058858215809,
-0.3019721210002899,
-0.19220426678657532,
-0.033177562057971954,
-0.24326898157596588,
-0.06305935233831406,
0.4675455689430237,
0.1187869980931282,
-0.5070374608039856,
-0.1682945191860199,
-0.23205053806304932,
-0.058400530368089676,
0.0715501457452774,
0.10308683663606644,
0.152861550450325,
-0.10854431241750717,
0.06198284402489662,
-0.274518758058548,
-0.26996463537216187,
0.0699826329946518,
0.472002774477005,
-0.2750074565410614,
0.10218454152345657,
0.5445805788040161,
0.4029550552368164,
-0.16026081144809723,
-0.24238741397857666,
0.08464716374874115,
0.08002882450819016,
-0.21358852088451385,
0.0007550351438112557,
0.31202054023742676,
0.045267459005117416,
0.4206765592098236,
0.06798303127288818,
0.22286130487918854,
-0.40208518505096436,
0.1897781640291214,
-0.46255186200141907,
-0.11029959470033646,
-0.08787940442562103,
-0.18582414090633392,
0.31209537386894226,
0.09340929985046387,
-0.14425793290138245,
0.03031242825090885,
-0.23342224955558777,
-0.293274849653244,
0.11278604716062546,
-0.002599534345790744,
0.11875752359628677,
0.45224547386169434,
-0.2297084629535675,
-0.0856509879231453,
-0.02195783145725727,
0.06365703046321869,
-0.14817772805690765,
-0.17814213037490845,
-0.2058388888835907,
0.003954718820750713,
0.1113949567079544,
0.18786503374576569,
-0.33875054121017456,
0.08584117144346237,
-0.5403541922569275,
-0.21826103329658508,
-0.16202275454998016,
0.20662888884544373,
0.2949579656124115,
-0.11388079822063446,
0.47383737564086914,
0.006451069843024015,
-0.014876645058393478,
0.021233273670077324,
0.1910271942615509,
-0.19151008129119873,
0.08594629168510437,
-0.37891513109207153,
0.41324976086616516,
0.025893036276102066,
-0.08544862270355225,
-0.30491939187049866,
0.2492905557155609,
0.24214093387126923,
0.17750518023967743,
0.13646845519542694,
-0.2938653826713562,
0.04528385400772095,
0.12577512860298157,
0.5298547148704529,
0.0940529853105545,
-0.3113819360733032,
0.030527949333190918,
0.14044617116451263,
0.20375467836856842,
-0.32571229338645935,
-0.1571357250213623,
-0.2650839388370514,
-0.11846121400594711,
-0.06244710460305214,
0.1154160350561142,
0.011267896741628647,
-0.3411971926689148,
-0.08927757292985916,
-0.11548899859189987,
0.29705992341041565,
0.2271777093410492,
-0.09396509826183319,
0.5441298484802246,
0.0009059286094270647,
-0.029702335596084595,
0.37088191509246826,
0.5498605370521545,
0.05003677308559418,
0.4243813157081604,
0.1949295550584793,
-0.10301105678081512,
-0.17300496995449066,
0.02651960216462612,
-0.005095100495964289,
-0.7224720120429993,
0.19037531316280365,
-0.08952481299638748,
-0.01532827503979206,
0.007097972556948662,
-0.18461985886096954,
0.49622905254364014,
-0.11423066258430481,
-0.01753128506243229,
-0.3881722390651703,
0.1512211114168167,
-0.20288148522377014,
-0.16554102301597595,
-0.42386218905448914,
0.09894782304763794,
-0.08774816244840622,
-0.020538393408060074,
-0.12521634995937347,
-0.2460021823644638,
0.0037855415139347315,
0.22845807671546936,
-0.032579656690359116,
-0.2135644555091858,
0.3492712378501892,
0.2529515027999878,
-0.13782250881195068,
-0.38743647933006287,
-0.07804598659276962,
-0.0577864833176136,
0.12036692351102829,
0.13293196260929108,
0.022234173491597176,
0.6245731711387634,
0.33184829354286194,
-0.055894043296575546,
-0.012674139812588692,
0.012963082641363144,
-0.03145955875515938,
-0.035633385181427,
0.38662639260292053,
-0.2138802409172058,
0.3700488805770874,
0.3404136896133423,
0.09749650210142136,
-0.05886462330818176,
-0.061385251581668854,
0.03973497822880745,
-0.10482742637395859,
-0.08498823642730713,
-0.03841375932097435,
-0.3763245642185211,
-0.2585609257221222,
-0.16248594224452972,
0.10234710574150085,
-0.08691569417715073,
-0.022328948602080345,
0.690010666847229,
0.1503070741891861,
0.3419891893863678,
-0.3378279209136963,
0.06619613617658615,
0.029575029388070107,
0.4036605954170227,
0.47015848755836487,
0.07601214200258255,
-0.40377697348594666,
-0.0799945741891861,
-0.49687421321868896,
0.06213966757059097,
0.12118019908666611,
-0.1317162662744522,
0.1792277693748474,
-0.13615627586841583,
-0.013324035331606865,
-0.19852232933044434,
-0.057343490421772,
0.029725806787610054,
0.024239283055067062,
0.32170721888542175,
-0.00868397019803524,
-0.1077243983745575,
0.26555824279785156,
-0.0672236755490303,
0.14263014495372772,
-0.5638707280158997,
0.0671393945813179,
-0.22150260210037231,
0.05756637826561928,
-0.4719409644603729,
0.08982021361589432,
0.12385371327400208,
0.13968484103679657,
0.24312786757946014,
0.015565999783575535,
0.3771504759788513,
-0.004346323199570179,
0.19138024747371674,
-0.5739646553993225,
0.06780866533517838,
-0.1726517677307129,
0.14340612292289734,
-0.13532526791095734,
-0.025136303156614304,
-0.2696665823459625,
0.0728011280298233,
-0.09839747846126556,
0.11882541328668594,
-0.046887949109077454,
0.15276075899600983,
-0.05127256363630295,
0.1282423883676529,
-0.18334300816059113,
-0.04164760932326317,
0.22163604199886322,
-0.14370957016944885,
-0.18954472243785858,
0.3802645206451416,
-0.3233785033226013,
-0.37237489223480225,
0.4683173596858978,
-0.2650410532951355,
-0.2512880861759186,
0.013104552403092384,
0.35664722323417664,
-0.12010859698057175,
-0.1665666103363037,
-0.1439182609319687,
0.36254212260246277,
0.17249199748039246,
-0.004815354011952877,
-0.3380492329597473,
0.4713965356349945,
-0.20368421077728271,
-0.18481327593326569,
0.03641417250037193,
0.4234890639781952,
-0.008436215110123158,
-0.20798005163669586,
0.03416308015584946,
-0.11512693762779236
] |
https://github.com/huggingface/datasets/issues/2000
|
Windows Permission Error (most recent version of datasets)
|
Hello @SBrandeis , this is it:
```
Traceback (most recent call last):
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 537, in incomplete_dir
yield tmp_dir
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 578, in download_and_prepare
self._download_and_prepare(
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 656, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 982, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\arrow_writer.py", line 297, in finalize
self.write_on_file()
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\arrow_writer.py", line 230, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow\array.pxi", line 222, in pyarrow.lib.array
File "pyarrow\array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\arrow_writer.py", line 97, in __arrow_array__
out = pa.array(self.data, type=type)
File "pyarrow\array.pxi", line 305, in pyarrow.lib.array
File "pyarrow\array.pxi", line 39, in pyarrow.lib._sequence_to_array
File "pyarrow\error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow\error.pxi", line 107, in pyarrow.lib.check_status
pyarrow.lib.ArrowTypeError: Expected bytes, got a 'list' object
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Luisa/Documents/Uni/WS 2020,21/Neural Networks/Final_Project/NN_Project/data_loading.py", line 122, in <module>
main()
File "C:/Users/Luisa/Documents/Uni/WS 2020,21/Neural Networks/Final_Project/NN_Project/data_loading.py", line 111, in main
dataset = datasets.load_dataset(
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 586, in download_and_prepare
self._save_info()
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 543, in incomplete_dir
shutil.rmtree(tmp_dir)
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 740, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 618, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 616, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird: 'C:\\Users\\Luisa\\.cache\\huggingface\\datasets\\sample\\default-20ee7d51a6a9454f\\0.0.0\\5fc4c3a355ea77ab446bd31fca5082437600b8364d29b2b95264048bd1f398b1.incomplete\\sample-train.arrow'
Process finished with exit code 1
```
|
Hi everyone,
Can anyone help me with why the dataset loading script below raises a Windows Permission Error? I stuck quite closely to https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py , only I want to load the data from three local three-column tsv-files (id\ttokens\tpos_tags\n). I am using the most recent version of datasets. Thank you in advance!
Luisa
My script:
```
import datasets
import csv
logger = datasets.logging.get_logger(__name__)
class SampleConfig(datasets.BuilderConfig):
def __init__(self, **kwargs):
super(SampleConfig, self).__init__(**kwargs)
class Sample(datasets.GeneratorBasedBuilder):
BUILDER_CONFIGS = [
SampleConfig(name="conll2003", version=datasets.Version("1.0.0"), description="Conll2003 dataset"),
]
def _info(self):
return datasets.DatasetInfo(
description="Dataset with words and their POS-Tags",
features=datasets.Features(
{
"id": datasets.Value("string"),
"tokens": datasets.Sequence(datasets.Value("string")),
"pos_tags": datasets.Sequence(
datasets.features.ClassLabel(
names=[
"''",
",",
"-LRB-",
"-RRB-",
".",
":",
"CC",
"CD",
"DT",
"EX",
"FW",
"HYPH",
"IN",
"JJ",
"JJR",
"JJS",
"MD",
"NN",
"NNP",
"NNPS",
"NNS",
"PDT",
"POS",
"PRP",
"PRP$",
"RB",
"RBR",
"RBS",
"RP",
"TO",
"UH",
"VB",
"VBD",
"VBG",
"VBN",
"VBP",
"VBZ",
"WDT",
"WP",
"WRB",
"``"
]
)
),
}
),
supervised_keys=None,
homepage="https://catalog.ldc.upenn.edu/LDC2011T03",
citation="Weischedel, Ralph, et al. OntoNotes Release 4.0 LDC2011T03. Web Download. Philadelphia: Linguistic Data Consortium, 2011.",
)
def _split_generators(self, dl_manager):
loaded_files = dl_manager.download_and_extract(self.config.data_files)
return [
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": loaded_files["train"]}),
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": loaded_files["test"]}),
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": loaded_files["val"]})
]
def _generate_examples(self, filepath):
logger.info("generating examples from = %s", filepath)
with open(filepath, encoding="cp1252") as f:
data = csv.reader(f, delimiter="\t")
ids = list()
tokens = list()
pos_tags = list()
for id_, line in enumerate(data):
#print(line)
if len(line) == 1:
if tokens:
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
ids = list()
tokens = list()
pos_tags = list()
else:
ids.append(line[0])
tokens.append(line[1])
pos_tags.append(line[2])
# last example
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
def main():
dataset = datasets.load_dataset(
"data_loading.py", data_files={
"train": "train.tsv",
"test": "test.tsv",
"val": "val.tsv"
}
)
#print(dataset)
if __name__=="__main__":
main()
```
| 230
|
Windows Permission Error (most recent version of datasets)
Hi everyone,
Can anyone help me with why the dataset loading script below raises a Windows Permission Error? I stuck quite closely to https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py , only I want to load the data from three local three-column tsv-files (id\ttokens\tpos_tags\n). I am using the most recent version of datasets. Thank you in advance!
Luisa
My script:
```
import datasets
import csv
logger = datasets.logging.get_logger(__name__)
class SampleConfig(datasets.BuilderConfig):
def __init__(self, **kwargs):
super(SampleConfig, self).__init__(**kwargs)
class Sample(datasets.GeneratorBasedBuilder):
BUILDER_CONFIGS = [
SampleConfig(name="conll2003", version=datasets.Version("1.0.0"), description="Conll2003 dataset"),
]
def _info(self):
return datasets.DatasetInfo(
description="Dataset with words and their POS-Tags",
features=datasets.Features(
{
"id": datasets.Value("string"),
"tokens": datasets.Sequence(datasets.Value("string")),
"pos_tags": datasets.Sequence(
datasets.features.ClassLabel(
names=[
"''",
",",
"-LRB-",
"-RRB-",
".",
":",
"CC",
"CD",
"DT",
"EX",
"FW",
"HYPH",
"IN",
"JJ",
"JJR",
"JJS",
"MD",
"NN",
"NNP",
"NNPS",
"NNS",
"PDT",
"POS",
"PRP",
"PRP$",
"RB",
"RBR",
"RBS",
"RP",
"TO",
"UH",
"VB",
"VBD",
"VBG",
"VBN",
"VBP",
"VBZ",
"WDT",
"WP",
"WRB",
"``"
]
)
),
}
),
supervised_keys=None,
homepage="https://catalog.ldc.upenn.edu/LDC2011T03",
citation="Weischedel, Ralph, et al. OntoNotes Release 4.0 LDC2011T03. Web Download. Philadelphia: Linguistic Data Consortium, 2011.",
)
def _split_generators(self, dl_manager):
loaded_files = dl_manager.download_and_extract(self.config.data_files)
return [
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": loaded_files["train"]}),
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": loaded_files["test"]}),
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": loaded_files["val"]})
]
def _generate_examples(self, filepath):
logger.info("generating examples from = %s", filepath)
with open(filepath, encoding="cp1252") as f:
data = csv.reader(f, delimiter="\t")
ids = list()
tokens = list()
pos_tags = list()
for id_, line in enumerate(data):
#print(line)
if len(line) == 1:
if tokens:
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
ids = list()
tokens = list()
pos_tags = list()
else:
ids.append(line[0])
tokens.append(line[1])
pos_tags.append(line[2])
# last example
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
def main():
dataset = datasets.load_dataset(
"data_loading.py", data_files={
"train": "train.tsv",
"test": "test.tsv",
"val": "val.tsv"
}
)
#print(dataset)
if __name__=="__main__":
main()
```
Hello @SBrandeis , this is it:
```
Traceback (most recent call last):
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 537, in incomplete_dir
yield tmp_dir
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 578, in download_and_prepare
self._download_and_prepare(
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 656, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 982, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\arrow_writer.py", line 297, in finalize
self.write_on_file()
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\arrow_writer.py", line 230, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow\array.pxi", line 222, in pyarrow.lib.array
File "pyarrow\array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\arrow_writer.py", line 97, in __arrow_array__
out = pa.array(self.data, type=type)
File "pyarrow\array.pxi", line 305, in pyarrow.lib.array
File "pyarrow\array.pxi", line 39, in pyarrow.lib._sequence_to_array
File "pyarrow\error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow\error.pxi", line 107, in pyarrow.lib.check_status
pyarrow.lib.ArrowTypeError: Expected bytes, got a 'list' object
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Luisa/Documents/Uni/WS 2020,21/Neural Networks/Final_Project/NN_Project/data_loading.py", line 122, in <module>
main()
File "C:/Users/Luisa/Documents/Uni/WS 2020,21/Neural Networks/Final_Project/NN_Project/data_loading.py", line 111, in main
dataset = datasets.load_dataset(
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 586, in download_and_prepare
self._save_info()
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\site-packages\datasets\builder.py", line 543, in incomplete_dir
shutil.rmtree(tmp_dir)
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 740, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 618, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\Luisa\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 616, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird: 'C:\\Users\\Luisa\\.cache\\huggingface\\datasets\\sample\\default-20ee7d51a6a9454f\\0.0.0\\5fc4c3a355ea77ab446bd31fca5082437600b8364d29b2b95264048bd1f398b1.incomplete\\sample-train.arrow'
Process finished with exit code 1
```
|
[
-0.18255728483200073,
0.18238498270511627,
-0.0400310643017292,
0.2590488791465759,
0.08137813955545425,
0.13363763689994812,
0.45803380012512207,
0.012254608795046806,
0.18646298348903656,
0.07412843406200409,
-0.06345640122890472,
-0.011226520873606205,
-0.10879573225975037,
0.15729326009750366,
-0.032361824065446854,
-0.02825121581554413,
0.14535114169120789,
0.04806838557124138,
0.03199785575270653,
0.13964608311653137,
-0.4052307903766632,
-0.00712077971547842,
-0.23793594539165497,
0.10736668109893799,
-0.22316233813762665,
0.278344064950943,
-0.015726497396826744,
0.3908284306526184,
-0.03380320966243744,
-0.23501864075660706,
0.21016629040241241,
0.3624860644340515,
0.6620944142341614,
0.24535220861434937,
-0.00011262848420301452,
-0.0484500527381897,
0.042043182998895645,
-0.02013157121837139,
0.20681972801685333,
0.2423868477344513,
0.13413813710212708,
-0.04518745467066765,
0.004124745726585388,
-0.10666926205158234,
-0.16983790695667267,
0.20000217854976654,
-0.06542991101741791,
-0.3538346588611603,
0.11399795114994049,
0.4263342320919037,
0.1871960163116455,
0.2474631369113922,
-0.18068742752075195,
-0.010653833858668804,
0.5910395979881287,
0.04759855940937996,
-0.12615925073623657,
0.19279402494430542,
0.29002442955970764,
-0.442804217338562,
0.2141415774822235,
0.1609823852777481,
-0.22685876488685608,
0.0855398178100586,
0.3818266689777374,
-0.16326360404491425,
-0.1299564093351364,
-0.2830391228199005,
0.15840600430965424,
0.000053223735449137166,
0.7270629405975342,
-0.16924339532852173,
-0.3009922504425049,
-0.03410366177558899,
0.13930870592594147,
-0.26716965436935425,
0.22750525176525116,
0.336599200963974,
-0.05052685737609863,
0.075358547270298,
-0.23469969630241394,
-0.16715113818645477,
-0.4434010088443756,
0.13589583337306976,
0.17750561237335205,
-0.2292965203523636,
-0.08493347465991974,
0.22970888018608093,
0.09066371619701385,
-0.13017186522483826,
0.35443270206451416,
0.1294436752796173,
0.041961319744586945,
0.25176024436950684,
-0.46714743971824646,
0.3360511362552643,
0.20927397906780243,
0.29802170395851135,
-0.032026972621679306,
0.2779497504234314,
-0.13617223501205444,
-0.21062755584716797,
0.201899453997612,
0.12502066791057587,
0.1772739440202713,
-0.0542738102376461,
0.15196089446544647,
0.24112750589847565,
0.13750945031642914,
-0.022510958835482597,
0.040242984890937805,
-0.11744074523448944,
-0.4900486171245575,
-0.6061118841171265,
0.11520924419164658,
0.24548190832138062,
0.30733656883239746,
-0.08926699310541153,
-0.36133578419685364,
0.11647645384073257,
0.11813537776470184,
0.0680985227227211,
0.20681899785995483,
0.40973299741744995,
0.26633962988853455,
0.011944019235670567,
0.37393254041671753,
0.271499902009964,
-0.06286425143480301,
-0.025799212977290154,
-0.08621250838041306,
0.004246355500072241,
-0.24589797854423523,
-0.04984551668167114,
0.4257865846157074,
-0.344259649515152,
-0.11349886655807495,
0.11736336350440979,
0.03534337878227234,
-0.12135010212659836,
0.049454204738140106,
-0.018772443756461143,
0.116459421813488,
0.4388580918312073,
0.25841814279556274,
0.034997135400772095,
0.14504289627075195,
-0.1851188838481903,
-0.028277751058340073,
0.23644199967384338,
-0.1324140727519989,
-0.3404772877693176,
-0.18835799396038055,
0.10112982243299484,
0.01707432232797146,
0.04991450160741806,
-0.2183060646057129,
-0.13303709030151367,
0.12284991145133972,
-0.018460536375641823,
0.14428777992725372,
-0.10070186853408813,
-0.2660655081272125,
-0.33979469537734985,
-0.10151316970586777,
0.8314385414123535,
-0.5272628664970398,
0.14024002850055695,
-0.11474411934614182,
-0.30476781725883484,
0.10725029557943344,
0.3311966061592102,
-0.07650008052587509,
0.11135675758123398,
-0.21448317170143127,
0.15164528787136078,
-0.13571123778820038,
-0.3680852949619293,
-0.17889727652072906,
0.37800613045692444,
-0.0177533570677042,
-0.10368013381958008,
0.24373456835746765,
-0.039007727056741714,
0.04448583349585533,
-0.2033560425043106,
-0.08980175852775574,
0.13412858545780182,
0.138462096452713,
0.26056230068206787,
0.22497466206550598,
0.007567876949906349,
0.23220911622047424,
0.31242334842681885,
0.055345095694065094,
-0.06275063753128052,
0.29186728596687317,
-0.21869973838329315,
0.1895528882741928,
-0.3010880649089813,
0.22454553842544556,
0.41666823625564575,
0.1158202514052391,
0.30919763445854187,
0.0332210510969162,
-0.23222334682941437,
-0.44557398557662964,
0.265201598405838,
0.30548110604286194,
-0.12395836412906647,
0.04690229147672653,
-0.2565837502479553,
-0.15023930370807648,
0.21092697978019714,
-0.38839977979660034,
0.11677061021327972,
0.08991163223981857,
0.29797062277793884,
-0.17740100622177124,
-0.32089763879776,
0.03454190492630005,
0.056344375014305115,
-0.24442963302135468,
-0.11113439500331879,
-0.15343262255191803,
0.038459133356809616,
-0.30667123198509216,
0.01804235577583313,
0.2049437165260315,
-0.014822510071098804,
0.41576969623565674,
-0.07438044250011444,
0.002641684375703335,
0.359132319688797,
0.28032493591308594,
-0.0367782898247242,
0.03679615259170532,
0.09830871969461441,
-0.2261275202035904,
0.0771443247795105,
0.12725771963596344,
-0.009581999853253365,
0.09168605506420135,
-0.1025225818157196,
-0.02555355429649353,
0.1265101283788681,
-0.22594991326332092,
0.004111957736313343,
-0.28790801763534546,
0.1314646601676941,
-0.009617738425731659,
0.024884117767214775,
-0.024606041610240936,
-0.21992605924606323,
0.3593803644180298,
0.5096367001533508,
-0.328534871339798,
-0.045358043164014816,
-0.10262960195541382,
-0.05150877311825752,
0.27939367294311523,
-0.15055973827838898,
-0.1328611969947815,
0.06870722025632858,
0.09919058531522751,
0.2852434813976288,
0.197903573513031,
0.22638247907161713,
0.4385735094547272,
0.06445926427841187,
-0.16530245542526245,
0.05295098200440407,
0.20327642560005188,
-0.05280633643269539,
0.1483866274356842,
-0.3353100121021271,
0.07930517941713333,
0.26033520698547363,
-0.29920992255210876,
0.12752626836299896,
-0.3775518834590912,
-0.1403329074382782,
0.14408649504184723,
0.33695265650749207,
-0.5138473510742188,
-0.13262951374053955,
-0.014959330670535564,
-0.13346052169799805,
0.11050829291343689,
-0.3155808448791504,
-0.28314825892448425,
0.013027721084654331,
-0.20135435461997986,
0.16264154016971588,
-0.2732623517513275,
-0.12563997507095337,
-0.40158653259277344,
0.057358890771865845,
0.2376944124698639,
-0.0031731808558106422,
-0.021724814549088478,
0.08656153082847595,
-0.023845402523875237,
0.01460161805152893,
0.4932959973812103,
-0.2829740643501282,
0.43707337975502014,
-0.1266711950302124,
0.3814789056777954,
-0.28983092308044434,
0.10609005391597748,
-0.24759365618228912,
-0.33447325229644775,
0.32037556171417236,
0.2462342083454132,
0.09838887304067612,
-0.026244746521115303,
-0.20588155090808868,
0.11958713084459305,
-0.12245795875787735,
-0.0811639353632927,
0.17551051080226898,
0.30421558022499084,
-0.591818630695343,
-0.2506389319896698,
-0.1534152328968048,
-0.2042931467294693,
-0.3533950448036194,
0.22098980844020844,
0.13553519546985626,
0.3110547363758087,
0.20728586614131927,
-0.12186024338006973,
0.05302548035979271,
0.0434555746614933,
0.3111535310745239,
-0.31979528069496155,
-0.0964624360203743,
0.01373170968145132,
-0.15026600658893585,
-0.5285488367080688,
0.22050660848617554,
0.3835148215293884,
-0.12172157317399979,
0.10918369889259338,
-0.11583942174911499,
0.12510937452316284,
-0.2140980362892151,
0.25467148423194885,
-0.22828759253025055,
0.16625851392745972,
0.19286544620990753,
0.07349220663309097,
0.08055712282657623,
-0.16946540772914886,
-0.09909383952617645,
-0.3450901210308075,
-0.2438758909702301,
-0.26460981369018555,
0.15429100394248962,
0.3330397605895996,
-0.13151419162750244,
0.21499374508857727,
0.3426211178302765,
0.22642594575881958,
0.4461941123008728,
-0.12768428027629852,
0.43167656660079956,
0.28185200691223145,
-0.6437917947769165,
0.15215784311294556,
-0.186130091547966,
-0.05307244136929512,
0.36015939712524414,
-0.07771145552396774,
0.029472269117832184,
-0.1574554443359375,
0.05830525979399681,
-0.3378959000110626,
-0.21079273521900177,
-0.007262388709932566,
-0.25675514340400696,
0.2782016694545746,
-0.14798973500728607,
0.007296436466276646,
-0.28088411688804626,
-0.0628950223326683,
0.005471916403621435,
0.5689319372177124,
0.11677399277687073,
-0.061600808054208755,
-0.37606316804885864,
0.007869995199143887,
-0.4856029152870178,
0.26964640617370605,
0.06245235353708267,
0.6091938018798828,
-0.15552622079849243,
0.03150393068790436,
0.14377842843532562,
0.10852552950382233,
0.9010455012321472,
-0.43910178542137146,
0.2763890027999878,
0.24810035526752472,
0.11669433116912842,
-0.2631772458553314,
-0.21154174208641052,
-0.26822173595428467,
0.06743523478507996,
-0.013136257417500019,
0.30300775170326233,
0.011895906180143356,
-0.3937041163444519,
0.033997442573308945,
-0.15305210649967194,
-0.07940879464149475,
-0.4198119342327118,
-0.25355252623558044,
-0.18152381479740143,
-0.3771495521068573,
-0.10418076813220978,
0.2397937774658203,
0.1634436547756195,
-0.2563316524028778,
0.2497168332338333,
-0.022410357370972633,
0.28822219371795654,
0.11481095850467682,
-0.04067476466298103,
0.10160758346319199,
0.30721279978752136,
0.07862664759159088,
-0.08094628155231476,
0.12363327294588089,
0.21233391761779785,
0.5588170886039734,
-0.02612418681383133,
-0.364798903465271,
-0.1107676550745964,
-0.02700781635940075,
0.4848950505256653,
0.0845976173877716,
-0.1533041149377823,
0.10140584409236908,
-0.22111019492149353,
-0.058644481003284454,
-0.34801554679870605,
0.07395292073488235,
0.2731061577796936,
-0.05154228210449219,
0.059536006301641464,
-0.21576136350631714,
0.3164074122905731,
0.17232674360275269,
-0.19433748722076416,
-0.0005699679022654891,
0.14229874312877655,
-0.29477542638778687,
-0.09350638836622238,
0.051076147705316544,
0.5023055076599121,
-0.2940059006214142,
0.2797781527042389,
0.19559988379478455,
-0.16591061651706696,
-0.07114239782094955,
0.21357257664203644,
-0.08469656109809875,
-0.4017244577407837,
-0.3005032539367676,
-0.013429934158921242,
-0.10526703298091888,
-0.005474044010043144,
0.15854032337665558,
0.08495438098907471,
0.04002369940280914,
-0.0924145057797432,
0.38359642028808594,
0.03176041319966316,
0.059693217277526855,
-0.20207564532756805,
-0.24410469830036163,
0.10191024094820023,
0.15196862816810608,
-0.13610051572322845,
-0.02357208915054798,
-0.13115912675857544,
0.013543456792831421,
0.1534251719713211,
0.023918576538562775,
-0.39787137508392334,
0.2855558693408966,
-0.32799622416496277,
0.010730406269431114,
-0.13602310419082642,
0.09474027156829834,
0.5240967869758606,
0.4402708411216736,
-0.006493174005299807,
0.14545507729053497,
-0.25311627984046936,
-0.26665693521499634,
0.1540939062833786,
-0.29178404808044434,
-0.2915801703929901,
-0.023664187639951706,
0.2547367513179779,
0.02128058858215809,
-0.3019721210002899,
-0.19220426678657532,
-0.033177562057971954,
-0.24326898157596588,
-0.06305935233831406,
0.4675455689430237,
0.1187869980931282,
-0.5070374608039856,
-0.1682945191860199,
-0.23205053806304932,
-0.058400530368089676,
0.0715501457452774,
0.10308683663606644,
0.152861550450325,
-0.10854431241750717,
0.06198284402489662,
-0.274518758058548,
-0.26996463537216187,
0.0699826329946518,
0.472002774477005,
-0.2750074565410614,
0.10218454152345657,
0.5445805788040161,
0.4029550552368164,
-0.16026081144809723,
-0.24238741397857666,
0.08464716374874115,
0.08002882450819016,
-0.21358852088451385,
0.0007550351438112557,
0.31202054023742676,
0.045267459005117416,
0.4206765592098236,
0.06798303127288818,
0.22286130487918854,
-0.40208518505096436,
0.1897781640291214,
-0.46255186200141907,
-0.11029959470033646,
-0.08787940442562103,
-0.18582414090633392,
0.31209537386894226,
0.09340929985046387,
-0.14425793290138245,
0.03031242825090885,
-0.23342224955558777,
-0.293274849653244,
0.11278604716062546,
-0.002599534345790744,
0.11875752359628677,
0.45224547386169434,
-0.2297084629535675,
-0.0856509879231453,
-0.02195783145725727,
0.06365703046321869,
-0.14817772805690765,
-0.17814213037490845,
-0.2058388888835907,
0.003954718820750713,
0.1113949567079544,
0.18786503374576569,
-0.33875054121017456,
0.08584117144346237,
-0.5403541922569275,
-0.21826103329658508,
-0.16202275454998016,
0.20662888884544373,
0.2949579656124115,
-0.11388079822063446,
0.47383737564086914,
0.006451069843024015,
-0.014876645058393478,
0.021233273670077324,
0.1910271942615509,
-0.19151008129119873,
0.08594629168510437,
-0.37891513109207153,
0.41324976086616516,
0.025893036276102066,
-0.08544862270355225,
-0.30491939187049866,
0.2492905557155609,
0.24214093387126923,
0.17750518023967743,
0.13646845519542694,
-0.2938653826713562,
0.04528385400772095,
0.12577512860298157,
0.5298547148704529,
0.0940529853105545,
-0.3113819360733032,
0.030527949333190918,
0.14044617116451263,
0.20375467836856842,
-0.32571229338645935,
-0.1571357250213623,
-0.2650839388370514,
-0.11846121400594711,
-0.06244710460305214,
0.1154160350561142,
0.011267896741628647,
-0.3411971926689148,
-0.08927757292985916,
-0.11548899859189987,
0.29705992341041565,
0.2271777093410492,
-0.09396509826183319,
0.5441298484802246,
0.0009059286094270647,
-0.029702335596084595,
0.37088191509246826,
0.5498605370521545,
0.05003677308559418,
0.4243813157081604,
0.1949295550584793,
-0.10301105678081512,
-0.17300496995449066,
0.02651960216462612,
-0.005095100495964289,
-0.7224720120429993,
0.19037531316280365,
-0.08952481299638748,
-0.01532827503979206,
0.007097972556948662,
-0.18461985886096954,
0.49622905254364014,
-0.11423066258430481,
-0.01753128506243229,
-0.3881722390651703,
0.1512211114168167,
-0.20288148522377014,
-0.16554102301597595,
-0.42386218905448914,
0.09894782304763794,
-0.08774816244840622,
-0.020538393408060074,
-0.12521634995937347,
-0.2460021823644638,
0.0037855415139347315,
0.22845807671546936,
-0.032579656690359116,
-0.2135644555091858,
0.3492712378501892,
0.2529515027999878,
-0.13782250881195068,
-0.38743647933006287,
-0.07804598659276962,
-0.0577864833176136,
0.12036692351102829,
0.13293196260929108,
0.022234173491597176,
0.6245731711387634,
0.33184829354286194,
-0.055894043296575546,
-0.012674139812588692,
0.012963082641363144,
-0.03145955875515938,
-0.035633385181427,
0.38662639260292053,
-0.2138802409172058,
0.3700488805770874,
0.3404136896133423,
0.09749650210142136,
-0.05886462330818176,
-0.061385251581668854,
0.03973497822880745,
-0.10482742637395859,
-0.08498823642730713,
-0.03841375932097435,
-0.3763245642185211,
-0.2585609257221222,
-0.16248594224452972,
0.10234710574150085,
-0.08691569417715073,
-0.022328948602080345,
0.690010666847229,
0.1503070741891861,
0.3419891893863678,
-0.3378279209136963,
0.06619613617658615,
0.029575029388070107,
0.4036605954170227,
0.47015848755836487,
0.07601214200258255,
-0.40377697348594666,
-0.0799945741891861,
-0.49687421321868896,
0.06213966757059097,
0.12118019908666611,
-0.1317162662744522,
0.1792277693748474,
-0.13615627586841583,
-0.013324035331606865,
-0.19852232933044434,
-0.057343490421772,
0.029725806787610054,
0.024239283055067062,
0.32170721888542175,
-0.00868397019803524,
-0.1077243983745575,
0.26555824279785156,
-0.0672236755490303,
0.14263014495372772,
-0.5638707280158997,
0.0671393945813179,
-0.22150260210037231,
0.05756637826561928,
-0.4719409644603729,
0.08982021361589432,
0.12385371327400208,
0.13968484103679657,
0.24312786757946014,
0.015565999783575535,
0.3771504759788513,
-0.004346323199570179,
0.19138024747371674,
-0.5739646553993225,
0.06780866533517838,
-0.1726517677307129,
0.14340612292289734,
-0.13532526791095734,
-0.025136303156614304,
-0.2696665823459625,
0.0728011280298233,
-0.09839747846126556,
0.11882541328668594,
-0.046887949109077454,
0.15276075899600983,
-0.05127256363630295,
0.1282423883676529,
-0.18334300816059113,
-0.04164760932326317,
0.22163604199886322,
-0.14370957016944885,
-0.18954472243785858,
0.3802645206451416,
-0.3233785033226013,
-0.37237489223480225,
0.4683173596858978,
-0.2650410532951355,
-0.2512880861759186,
0.013104552403092384,
0.35664722323417664,
-0.12010859698057175,
-0.1665666103363037,
-0.1439182609319687,
0.36254212260246277,
0.17249199748039246,
-0.004815354011952877,
-0.3380492329597473,
0.4713965356349945,
-0.20368421077728271,
-0.18481327593326569,
0.03641417250037193,
0.4234890639781952,
-0.008436215110123158,
-0.20798005163669586,
0.03416308015584946,
-0.11512693762779236
] |
https://github.com/huggingface/datasets/issues/2000
|
Windows Permission Error (most recent version of datasets)
|
Hi @itsLuisa, thanks for sharing the Traceback.
You are defining the "id" field as a `string` feature:
```python
class Sample(datasets.GeneratorBasedBuilder):
...
def _info(self):
return datasets.DatasetInfo(
features=datasets.Features(
{
"id": datasets.Value("string"),
# ^^ here
"tokens": datasets.Sequence(datasets.Value("string")),
"pos_tags": datasets.Sequence(datasets.features.ClassLabel(names=[...])),
[...]
```
But in the `_generate_examples`, the "id" field is a list:
```python
ids = list()
```
Changing:
```python
"id": datasets.Value("string"),
```
Into:
```python
"id": datasets.Sequence(datasets.Value("string")),
```
Should fix your issue.
Let me know if this helps!
|
Hi everyone,
Can anyone help me with why the dataset loading script below raises a Windows Permission Error? I stuck quite closely to https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py , only I want to load the data from three local three-column tsv-files (id\ttokens\tpos_tags\n). I am using the most recent version of datasets. Thank you in advance!
Luisa
My script:
```
import datasets
import csv
logger = datasets.logging.get_logger(__name__)
class SampleConfig(datasets.BuilderConfig):
def __init__(self, **kwargs):
super(SampleConfig, self).__init__(**kwargs)
class Sample(datasets.GeneratorBasedBuilder):
BUILDER_CONFIGS = [
SampleConfig(name="conll2003", version=datasets.Version("1.0.0"), description="Conll2003 dataset"),
]
def _info(self):
return datasets.DatasetInfo(
description="Dataset with words and their POS-Tags",
features=datasets.Features(
{
"id": datasets.Value("string"),
"tokens": datasets.Sequence(datasets.Value("string")),
"pos_tags": datasets.Sequence(
datasets.features.ClassLabel(
names=[
"''",
",",
"-LRB-",
"-RRB-",
".",
":",
"CC",
"CD",
"DT",
"EX",
"FW",
"HYPH",
"IN",
"JJ",
"JJR",
"JJS",
"MD",
"NN",
"NNP",
"NNPS",
"NNS",
"PDT",
"POS",
"PRP",
"PRP$",
"RB",
"RBR",
"RBS",
"RP",
"TO",
"UH",
"VB",
"VBD",
"VBG",
"VBN",
"VBP",
"VBZ",
"WDT",
"WP",
"WRB",
"``"
]
)
),
}
),
supervised_keys=None,
homepage="https://catalog.ldc.upenn.edu/LDC2011T03",
citation="Weischedel, Ralph, et al. OntoNotes Release 4.0 LDC2011T03. Web Download. Philadelphia: Linguistic Data Consortium, 2011.",
)
def _split_generators(self, dl_manager):
loaded_files = dl_manager.download_and_extract(self.config.data_files)
return [
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": loaded_files["train"]}),
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": loaded_files["test"]}),
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": loaded_files["val"]})
]
def _generate_examples(self, filepath):
logger.info("generating examples from = %s", filepath)
with open(filepath, encoding="cp1252") as f:
data = csv.reader(f, delimiter="\t")
ids = list()
tokens = list()
pos_tags = list()
for id_, line in enumerate(data):
#print(line)
if len(line) == 1:
if tokens:
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
ids = list()
tokens = list()
pos_tags = list()
else:
ids.append(line[0])
tokens.append(line[1])
pos_tags.append(line[2])
# last example
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
def main():
dataset = datasets.load_dataset(
"data_loading.py", data_files={
"train": "train.tsv",
"test": "test.tsv",
"val": "val.tsv"
}
)
#print(dataset)
if __name__=="__main__":
main()
```
| 73
|
Windows Permission Error (most recent version of datasets)
Hi everyone,
Can anyone help me with why the dataset loading script below raises a Windows Permission Error? I stuck quite closely to https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py , only I want to load the data from three local three-column tsv-files (id\ttokens\tpos_tags\n). I am using the most recent version of datasets. Thank you in advance!
Luisa
My script:
```
import datasets
import csv
logger = datasets.logging.get_logger(__name__)
class SampleConfig(datasets.BuilderConfig):
def __init__(self, **kwargs):
super(SampleConfig, self).__init__(**kwargs)
class Sample(datasets.GeneratorBasedBuilder):
BUILDER_CONFIGS = [
SampleConfig(name="conll2003", version=datasets.Version("1.0.0"), description="Conll2003 dataset"),
]
def _info(self):
return datasets.DatasetInfo(
description="Dataset with words and their POS-Tags",
features=datasets.Features(
{
"id": datasets.Value("string"),
"tokens": datasets.Sequence(datasets.Value("string")),
"pos_tags": datasets.Sequence(
datasets.features.ClassLabel(
names=[
"''",
",",
"-LRB-",
"-RRB-",
".",
":",
"CC",
"CD",
"DT",
"EX",
"FW",
"HYPH",
"IN",
"JJ",
"JJR",
"JJS",
"MD",
"NN",
"NNP",
"NNPS",
"NNS",
"PDT",
"POS",
"PRP",
"PRP$",
"RB",
"RBR",
"RBS",
"RP",
"TO",
"UH",
"VB",
"VBD",
"VBG",
"VBN",
"VBP",
"VBZ",
"WDT",
"WP",
"WRB",
"``"
]
)
),
}
),
supervised_keys=None,
homepage="https://catalog.ldc.upenn.edu/LDC2011T03",
citation="Weischedel, Ralph, et al. OntoNotes Release 4.0 LDC2011T03. Web Download. Philadelphia: Linguistic Data Consortium, 2011.",
)
def _split_generators(self, dl_manager):
loaded_files = dl_manager.download_and_extract(self.config.data_files)
return [
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": loaded_files["train"]}),
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": loaded_files["test"]}),
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": loaded_files["val"]})
]
def _generate_examples(self, filepath):
logger.info("generating examples from = %s", filepath)
with open(filepath, encoding="cp1252") as f:
data = csv.reader(f, delimiter="\t")
ids = list()
tokens = list()
pos_tags = list()
for id_, line in enumerate(data):
#print(line)
if len(line) == 1:
if tokens:
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
ids = list()
tokens = list()
pos_tags = list()
else:
ids.append(line[0])
tokens.append(line[1])
pos_tags.append(line[2])
# last example
yield id_, {"id": ids, "tokens": tokens, "pos_tags": pos_tags}
def main():
dataset = datasets.load_dataset(
"data_loading.py", data_files={
"train": "train.tsv",
"test": "test.tsv",
"val": "val.tsv"
}
)
#print(dataset)
if __name__=="__main__":
main()
```
Hi @itsLuisa, thanks for sharing the Traceback.
You are defining the "id" field as a `string` feature:
```python
class Sample(datasets.GeneratorBasedBuilder):
...
def _info(self):
return datasets.DatasetInfo(
features=datasets.Features(
{
"id": datasets.Value("string"),
# ^^ here
"tokens": datasets.Sequence(datasets.Value("string")),
"pos_tags": datasets.Sequence(datasets.features.ClassLabel(names=[...])),
[...]
```
But in the `_generate_examples`, the "id" field is a list:
```python
ids = list()
```
Changing:
```python
"id": datasets.Value("string"),
```
Into:
```python
"id": datasets.Sequence(datasets.Value("string")),
```
Should fix your issue.
Let me know if this helps!
|
[
-0.18255728483200073,
0.18238498270511627,
-0.0400310643017292,
0.2590488791465759,
0.08137813955545425,
0.13363763689994812,
0.45803380012512207,
0.012254608795046806,
0.18646298348903656,
0.07412843406200409,
-0.06345640122890472,
-0.011226520873606205,
-0.10879573225975037,
0.15729326009750366,
-0.032361824065446854,
-0.02825121581554413,
0.14535114169120789,
0.04806838557124138,
0.03199785575270653,
0.13964608311653137,
-0.4052307903766632,
-0.00712077971547842,
-0.23793594539165497,
0.10736668109893799,
-0.22316233813762665,
0.278344064950943,
-0.015726497396826744,
0.3908284306526184,
-0.03380320966243744,
-0.23501864075660706,
0.21016629040241241,
0.3624860644340515,
0.6620944142341614,
0.24535220861434937,
-0.00011262848420301452,
-0.0484500527381897,
0.042043182998895645,
-0.02013157121837139,
0.20681972801685333,
0.2423868477344513,
0.13413813710212708,
-0.04518745467066765,
0.004124745726585388,
-0.10666926205158234,
-0.16983790695667267,
0.20000217854976654,
-0.06542991101741791,
-0.3538346588611603,
0.11399795114994049,
0.4263342320919037,
0.1871960163116455,
0.2474631369113922,
-0.18068742752075195,
-0.010653833858668804,
0.5910395979881287,
0.04759855940937996,
-0.12615925073623657,
0.19279402494430542,
0.29002442955970764,
-0.442804217338562,
0.2141415774822235,
0.1609823852777481,
-0.22685876488685608,
0.0855398178100586,
0.3818266689777374,
-0.16326360404491425,
-0.1299564093351364,
-0.2830391228199005,
0.15840600430965424,
0.000053223735449137166,
0.7270629405975342,
-0.16924339532852173,
-0.3009922504425049,
-0.03410366177558899,
0.13930870592594147,
-0.26716965436935425,
0.22750525176525116,
0.336599200963974,
-0.05052685737609863,
0.075358547270298,
-0.23469969630241394,
-0.16715113818645477,
-0.4434010088443756,
0.13589583337306976,
0.17750561237335205,
-0.2292965203523636,
-0.08493347465991974,
0.22970888018608093,
0.09066371619701385,
-0.13017186522483826,
0.35443270206451416,
0.1294436752796173,
0.041961319744586945,
0.25176024436950684,
-0.46714743971824646,
0.3360511362552643,
0.20927397906780243,
0.29802170395851135,
-0.032026972621679306,
0.2779497504234314,
-0.13617223501205444,
-0.21062755584716797,
0.201899453997612,
0.12502066791057587,
0.1772739440202713,
-0.0542738102376461,
0.15196089446544647,
0.24112750589847565,
0.13750945031642914,
-0.022510958835482597,
0.040242984890937805,
-0.11744074523448944,
-0.4900486171245575,
-0.6061118841171265,
0.11520924419164658,
0.24548190832138062,
0.30733656883239746,
-0.08926699310541153,
-0.36133578419685364,
0.11647645384073257,
0.11813537776470184,
0.0680985227227211,
0.20681899785995483,
0.40973299741744995,
0.26633962988853455,
0.011944019235670567,
0.37393254041671753,
0.271499902009964,
-0.06286425143480301,
-0.025799212977290154,
-0.08621250838041306,
0.004246355500072241,
-0.24589797854423523,
-0.04984551668167114,
0.4257865846157074,
-0.344259649515152,
-0.11349886655807495,
0.11736336350440979,
0.03534337878227234,
-0.12135010212659836,
0.049454204738140106,
-0.018772443756461143,
0.116459421813488,
0.4388580918312073,
0.25841814279556274,
0.034997135400772095,
0.14504289627075195,
-0.1851188838481903,
-0.028277751058340073,
0.23644199967384338,
-0.1324140727519989,
-0.3404772877693176,
-0.18835799396038055,
0.10112982243299484,
0.01707432232797146,
0.04991450160741806,
-0.2183060646057129,
-0.13303709030151367,
0.12284991145133972,
-0.018460536375641823,
0.14428777992725372,
-0.10070186853408813,
-0.2660655081272125,
-0.33979469537734985,
-0.10151316970586777,
0.8314385414123535,
-0.5272628664970398,
0.14024002850055695,
-0.11474411934614182,
-0.30476781725883484,
0.10725029557943344,
0.3311966061592102,
-0.07650008052587509,
0.11135675758123398,
-0.21448317170143127,
0.15164528787136078,
-0.13571123778820038,
-0.3680852949619293,
-0.17889727652072906,
0.37800613045692444,
-0.0177533570677042,
-0.10368013381958008,
0.24373456835746765,
-0.039007727056741714,
0.04448583349585533,
-0.2033560425043106,
-0.08980175852775574,
0.13412858545780182,
0.138462096452713,
0.26056230068206787,
0.22497466206550598,
0.007567876949906349,
0.23220911622047424,
0.31242334842681885,
0.055345095694065094,
-0.06275063753128052,
0.29186728596687317,
-0.21869973838329315,
0.1895528882741928,
-0.3010880649089813,
0.22454553842544556,
0.41666823625564575,
0.1158202514052391,
0.30919763445854187,
0.0332210510969162,
-0.23222334682941437,
-0.44557398557662964,
0.265201598405838,
0.30548110604286194,
-0.12395836412906647,
0.04690229147672653,
-0.2565837502479553,
-0.15023930370807648,
0.21092697978019714,
-0.38839977979660034,
0.11677061021327972,
0.08991163223981857,
0.29797062277793884,
-0.17740100622177124,
-0.32089763879776,
0.03454190492630005,
0.056344375014305115,
-0.24442963302135468,
-0.11113439500331879,
-0.15343262255191803,
0.038459133356809616,
-0.30667123198509216,
0.01804235577583313,
0.2049437165260315,
-0.014822510071098804,
0.41576969623565674,
-0.07438044250011444,
0.002641684375703335,
0.359132319688797,
0.28032493591308594,
-0.0367782898247242,
0.03679615259170532,
0.09830871969461441,
-0.2261275202035904,
0.0771443247795105,
0.12725771963596344,
-0.009581999853253365,
0.09168605506420135,
-0.1025225818157196,
-0.02555355429649353,
0.1265101283788681,
-0.22594991326332092,
0.004111957736313343,
-0.28790801763534546,
0.1314646601676941,
-0.009617738425731659,
0.024884117767214775,
-0.024606041610240936,
-0.21992605924606323,
0.3593803644180298,
0.5096367001533508,
-0.328534871339798,
-0.045358043164014816,
-0.10262960195541382,
-0.05150877311825752,
0.27939367294311523,
-0.15055973827838898,
-0.1328611969947815,
0.06870722025632858,
0.09919058531522751,
0.2852434813976288,
0.197903573513031,
0.22638247907161713,
0.4385735094547272,
0.06445926427841187,
-0.16530245542526245,
0.05295098200440407,
0.20327642560005188,
-0.05280633643269539,
0.1483866274356842,
-0.3353100121021271,
0.07930517941713333,
0.26033520698547363,
-0.29920992255210876,
0.12752626836299896,
-0.3775518834590912,
-0.1403329074382782,
0.14408649504184723,
0.33695265650749207,
-0.5138473510742188,
-0.13262951374053955,
-0.014959330670535564,
-0.13346052169799805,
0.11050829291343689,
-0.3155808448791504,
-0.28314825892448425,
0.013027721084654331,
-0.20135435461997986,
0.16264154016971588,
-0.2732623517513275,
-0.12563997507095337,
-0.40158653259277344,
0.057358890771865845,
0.2376944124698639,
-0.0031731808558106422,
-0.021724814549088478,
0.08656153082847595,
-0.023845402523875237,
0.01460161805152893,
0.4932959973812103,
-0.2829740643501282,
0.43707337975502014,
-0.1266711950302124,
0.3814789056777954,
-0.28983092308044434,
0.10609005391597748,
-0.24759365618228912,
-0.33447325229644775,
0.32037556171417236,
0.2462342083454132,
0.09838887304067612,
-0.026244746521115303,
-0.20588155090808868,
0.11958713084459305,
-0.12245795875787735,
-0.0811639353632927,
0.17551051080226898,
0.30421558022499084,
-0.591818630695343,
-0.2506389319896698,
-0.1534152328968048,
-0.2042931467294693,
-0.3533950448036194,
0.22098980844020844,
0.13553519546985626,
0.3110547363758087,
0.20728586614131927,
-0.12186024338006973,
0.05302548035979271,
0.0434555746614933,
0.3111535310745239,
-0.31979528069496155,
-0.0964624360203743,
0.01373170968145132,
-0.15026600658893585,
-0.5285488367080688,
0.22050660848617554,
0.3835148215293884,
-0.12172157317399979,
0.10918369889259338,
-0.11583942174911499,
0.12510937452316284,
-0.2140980362892151,
0.25467148423194885,
-0.22828759253025055,
0.16625851392745972,
0.19286544620990753,
0.07349220663309097,
0.08055712282657623,
-0.16946540772914886,
-0.09909383952617645,
-0.3450901210308075,
-0.2438758909702301,
-0.26460981369018555,
0.15429100394248962,
0.3330397605895996,
-0.13151419162750244,
0.21499374508857727,
0.3426211178302765,
0.22642594575881958,
0.4461941123008728,
-0.12768428027629852,
0.43167656660079956,
0.28185200691223145,
-0.6437917947769165,
0.15215784311294556,
-0.186130091547966,
-0.05307244136929512,
0.36015939712524414,
-0.07771145552396774,
0.029472269117832184,
-0.1574554443359375,
0.05830525979399681,
-0.3378959000110626,
-0.21079273521900177,
-0.007262388709932566,
-0.25675514340400696,
0.2782016694545746,
-0.14798973500728607,
0.007296436466276646,
-0.28088411688804626,
-0.0628950223326683,
0.005471916403621435,
0.5689319372177124,
0.11677399277687073,
-0.061600808054208755,
-0.37606316804885864,
0.007869995199143887,
-0.4856029152870178,
0.26964640617370605,
0.06245235353708267,
0.6091938018798828,
-0.15552622079849243,
0.03150393068790436,
0.14377842843532562,
0.10852552950382233,
0.9010455012321472,
-0.43910178542137146,
0.2763890027999878,
0.24810035526752472,
0.11669433116912842,
-0.2631772458553314,
-0.21154174208641052,
-0.26822173595428467,
0.06743523478507996,
-0.013136257417500019,
0.30300775170326233,
0.011895906180143356,
-0.3937041163444519,
0.033997442573308945,
-0.15305210649967194,
-0.07940879464149475,
-0.4198119342327118,
-0.25355252623558044,
-0.18152381479740143,
-0.3771495521068573,
-0.10418076813220978,
0.2397937774658203,
0.1634436547756195,
-0.2563316524028778,
0.2497168332338333,
-0.022410357370972633,
0.28822219371795654,
0.11481095850467682,
-0.04067476466298103,
0.10160758346319199,
0.30721279978752136,
0.07862664759159088,
-0.08094628155231476,
0.12363327294588089,
0.21233391761779785,
0.5588170886039734,
-0.02612418681383133,
-0.364798903465271,
-0.1107676550745964,
-0.02700781635940075,
0.4848950505256653,
0.0845976173877716,
-0.1533041149377823,
0.10140584409236908,
-0.22111019492149353,
-0.058644481003284454,
-0.34801554679870605,
0.07395292073488235,
0.2731061577796936,
-0.05154228210449219,
0.059536006301641464,
-0.21576136350631714,
0.3164074122905731,
0.17232674360275269,
-0.19433748722076416,
-0.0005699679022654891,
0.14229874312877655,
-0.29477542638778687,
-0.09350638836622238,
0.051076147705316544,
0.5023055076599121,
-0.2940059006214142,
0.2797781527042389,
0.19559988379478455,
-0.16591061651706696,
-0.07114239782094955,
0.21357257664203644,
-0.08469656109809875,
-0.4017244577407837,
-0.3005032539367676,
-0.013429934158921242,
-0.10526703298091888,
-0.005474044010043144,
0.15854032337665558,
0.08495438098907471,
0.04002369940280914,
-0.0924145057797432,
0.38359642028808594,
0.03176041319966316,
0.059693217277526855,
-0.20207564532756805,
-0.24410469830036163,
0.10191024094820023,
0.15196862816810608,
-0.13610051572322845,
-0.02357208915054798,
-0.13115912675857544,
0.013543456792831421,
0.1534251719713211,
0.023918576538562775,
-0.39787137508392334,
0.2855558693408966,
-0.32799622416496277,
0.010730406269431114,
-0.13602310419082642,
0.09474027156829834,
0.5240967869758606,
0.4402708411216736,
-0.006493174005299807,
0.14545507729053497,
-0.25311627984046936,
-0.26665693521499634,
0.1540939062833786,
-0.29178404808044434,
-0.2915801703929901,
-0.023664187639951706,
0.2547367513179779,
0.02128058858215809,
-0.3019721210002899,
-0.19220426678657532,
-0.033177562057971954,
-0.24326898157596588,
-0.06305935233831406,
0.4675455689430237,
0.1187869980931282,
-0.5070374608039856,
-0.1682945191860199,
-0.23205053806304932,
-0.058400530368089676,
0.0715501457452774,
0.10308683663606644,
0.152861550450325,
-0.10854431241750717,
0.06198284402489662,
-0.274518758058548,
-0.26996463537216187,
0.0699826329946518,
0.472002774477005,
-0.2750074565410614,
0.10218454152345657,
0.5445805788040161,
0.4029550552368164,
-0.16026081144809723,
-0.24238741397857666,
0.08464716374874115,
0.08002882450819016,
-0.21358852088451385,
0.0007550351438112557,
0.31202054023742676,
0.045267459005117416,
0.4206765592098236,
0.06798303127288818,
0.22286130487918854,
-0.40208518505096436,
0.1897781640291214,
-0.46255186200141907,
-0.11029959470033646,
-0.08787940442562103,
-0.18582414090633392,
0.31209537386894226,
0.09340929985046387,
-0.14425793290138245,
0.03031242825090885,
-0.23342224955558777,
-0.293274849653244,
0.11278604716062546,
-0.002599534345790744,
0.11875752359628677,
0.45224547386169434,
-0.2297084629535675,
-0.0856509879231453,
-0.02195783145725727,
0.06365703046321869,
-0.14817772805690765,
-0.17814213037490845,
-0.2058388888835907,
0.003954718820750713,
0.1113949567079544,
0.18786503374576569,
-0.33875054121017456,
0.08584117144346237,
-0.5403541922569275,
-0.21826103329658508,
-0.16202275454998016,
0.20662888884544373,
0.2949579656124115,
-0.11388079822063446,
0.47383737564086914,
0.006451069843024015,
-0.014876645058393478,
0.021233273670077324,
0.1910271942615509,
-0.19151008129119873,
0.08594629168510437,
-0.37891513109207153,
0.41324976086616516,
0.025893036276102066,
-0.08544862270355225,
-0.30491939187049866,
0.2492905557155609,
0.24214093387126923,
0.17750518023967743,
0.13646845519542694,
-0.2938653826713562,
0.04528385400772095,
0.12577512860298157,
0.5298547148704529,
0.0940529853105545,
-0.3113819360733032,
0.030527949333190918,
0.14044617116451263,
0.20375467836856842,
-0.32571229338645935,
-0.1571357250213623,
-0.2650839388370514,
-0.11846121400594711,
-0.06244710460305214,
0.1154160350561142,
0.011267896741628647,
-0.3411971926689148,
-0.08927757292985916,
-0.11548899859189987,
0.29705992341041565,
0.2271777093410492,
-0.09396509826183319,
0.5441298484802246,
0.0009059286094270647,
-0.029702335596084595,
0.37088191509246826,
0.5498605370521545,
0.05003677308559418,
0.4243813157081604,
0.1949295550584793,
-0.10301105678081512,
-0.17300496995449066,
0.02651960216462612,
-0.005095100495964289,
-0.7224720120429993,
0.19037531316280365,
-0.08952481299638748,
-0.01532827503979206,
0.007097972556948662,
-0.18461985886096954,
0.49622905254364014,
-0.11423066258430481,
-0.01753128506243229,
-0.3881722390651703,
0.1512211114168167,
-0.20288148522377014,
-0.16554102301597595,
-0.42386218905448914,
0.09894782304763794,
-0.08774816244840622,
-0.020538393408060074,
-0.12521634995937347,
-0.2460021823644638,
0.0037855415139347315,
0.22845807671546936,
-0.032579656690359116,
-0.2135644555091858,
0.3492712378501892,
0.2529515027999878,
-0.13782250881195068,
-0.38743647933006287,
-0.07804598659276962,
-0.0577864833176136,
0.12036692351102829,
0.13293196260929108,
0.022234173491597176,
0.6245731711387634,
0.33184829354286194,
-0.055894043296575546,
-0.012674139812588692,
0.012963082641363144,
-0.03145955875515938,
-0.035633385181427,
0.38662639260292053,
-0.2138802409172058,
0.3700488805770874,
0.3404136896133423,
0.09749650210142136,
-0.05886462330818176,
-0.061385251581668854,
0.03973497822880745,
-0.10482742637395859,
-0.08498823642730713,
-0.03841375932097435,
-0.3763245642185211,
-0.2585609257221222,
-0.16248594224452972,
0.10234710574150085,
-0.08691569417715073,
-0.022328948602080345,
0.690010666847229,
0.1503070741891861,
0.3419891893863678,
-0.3378279209136963,
0.06619613617658615,
0.029575029388070107,
0.4036605954170227,
0.47015848755836487,
0.07601214200258255,
-0.40377697348594666,
-0.0799945741891861,
-0.49687421321868896,
0.06213966757059097,
0.12118019908666611,
-0.1317162662744522,
0.1792277693748474,
-0.13615627586841583,
-0.013324035331606865,
-0.19852232933044434,
-0.057343490421772,
0.029725806787610054,
0.024239283055067062,
0.32170721888542175,
-0.00868397019803524,
-0.1077243983745575,
0.26555824279785156,
-0.0672236755490303,
0.14263014495372772,
-0.5638707280158997,
0.0671393945813179,
-0.22150260210037231,
0.05756637826561928,
-0.4719409644603729,
0.08982021361589432,
0.12385371327400208,
0.13968484103679657,
0.24312786757946014,
0.015565999783575535,
0.3771504759788513,
-0.004346323199570179,
0.19138024747371674,
-0.5739646553993225,
0.06780866533517838,
-0.1726517677307129,
0.14340612292289734,
-0.13532526791095734,
-0.025136303156614304,
-0.2696665823459625,
0.0728011280298233,
-0.09839747846126556,
0.11882541328668594,
-0.046887949109077454,
0.15276075899600983,
-0.05127256363630295,
0.1282423883676529,
-0.18334300816059113,
-0.04164760932326317,
0.22163604199886322,
-0.14370957016944885,
-0.18954472243785858,
0.3802645206451416,
-0.3233785033226013,
-0.37237489223480225,
0.4683173596858978,
-0.2650410532951355,
-0.2512880861759186,
0.013104552403092384,
0.35664722323417664,
-0.12010859698057175,
-0.1665666103363037,
-0.1439182609319687,
0.36254212260246277,
0.17249199748039246,
-0.004815354011952877,
-0.3380492329597473,
0.4713965356349945,
-0.20368421077728271,
-0.18481327593326569,
0.03641417250037193,
0.4234890639781952,
-0.008436215110123158,
-0.20798005163669586,
0.03416308015584946,
-0.11512693762779236
] |
https://github.com/huggingface/datasets/issues/1996
|
Error when exploring `arabic_speech_corpus`
|
Actually soundfile is not a dependency of this dataset.
The error comes from a bug that was fixed in this commit: https://github.com/huggingface/datasets/pull/1767/commits/c304e63629f4453367de2fd42883a78768055532
Basically the library used to consider the `import soundfile` in the docstring as a dependency, while it's just here as a code example.
Updating the viewer to the latest version of `datasets` should fix this issue
|
Navigate to https://huggingface.co/datasets/viewer/?dataset=arabic_speech_corpus
Error:
```
ImportError: To be able to use this dataset, you need to install the following dependencies['soundfile'] using 'pip install soundfile' for instance'
Traceback:
File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script
exec(code, module.__dict__)
File "/home/sasha/nlp-viewer/run.py", line 233, in <module>
configs = get_confs(option)
File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 604, in wrapped_func
return get_or_create_cached_value()
File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 588, in get_or_create_cached_value
return_value = func(*args, **kwargs)
File "/home/sasha/nlp-viewer/run.py", line 145, in get_confs
module_path = nlp.load.prepare_module(path, dataset=True
File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/datasets/load.py", line 342, in prepare_module
f"To be able to use this {module_type}, you need to install the following dependencies"
```
| 58
|
Error when exploring `arabic_speech_corpus`
Navigate to https://huggingface.co/datasets/viewer/?dataset=arabic_speech_corpus
Error:
```
ImportError: To be able to use this dataset, you need to install the following dependencies['soundfile'] using 'pip install soundfile' for instance'
Traceback:
File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script
exec(code, module.__dict__)
File "/home/sasha/nlp-viewer/run.py", line 233, in <module>
configs = get_confs(option)
File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 604, in wrapped_func
return get_or_create_cached_value()
File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 588, in get_or_create_cached_value
return_value = func(*args, **kwargs)
File "/home/sasha/nlp-viewer/run.py", line 145, in get_confs
module_path = nlp.load.prepare_module(path, dataset=True
File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/datasets/load.py", line 342, in prepare_module
f"To be able to use this {module_type}, you need to install the following dependencies"
```
Actually soundfile is not a dependency of this dataset.
The error comes from a bug that was fixed in this commit: https://github.com/huggingface/datasets/pull/1767/commits/c304e63629f4453367de2fd42883a78768055532
Basically the library used to consider the `import soundfile` in the docstring as a dependency, while it's just here as a code example.
Updating the viewer to the latest version of `datasets` should fix this issue
|
[
-0.2591249644756317,
-0.11358939111232758,
-0.036389146000146866,
0.22282341122627258,
0.04178972914814949,
0.041484225541353226,
0.05358152836561203,
0.31405583024024963,
-0.17314349114894867,
0.050459250807762146,
-0.2981739342212677,
0.0969090610742569,
-0.11128266155719757,
-0.04064416140317917,
0.10654033720493317,
-0.3713719844818115,
0.06335986405611038,
0.20324169099330902,
0.005491240415722132,
-0.013290824368596077,
-0.06974613666534424,
0.454239159822464,
-0.3286399841308594,
-0.01390615850687027,
-0.0968819111585617,
-0.2608731687068939,
-0.0601528026163578,
-0.11549405008554459,
-0.29186418652534485,
-0.4660022258758545,
0.14719335734844208,
-0.07642365992069244,
0.09291394799947739,
0.38957679271698,
-0.00011437087960075587,
-0.08653506636619568,
0.36810484528541565,
-0.13962972164154053,
-0.2088984251022339,
-0.431863933801651,
0.15410524606704712,
-0.13698863983154297,
-0.09956362843513489,
-0.1122175008058548,
-0.06622440367937088,
-0.19790785014629364,
0.03988247364759445,
-0.30984312295913696,
0.29151347279548645,
0.318662166595459,
0.2341218739748001,
0.18703246116638184,
0.23477743566036224,
-0.041815683245658875,
0.20497538149356842,
-0.0016589255537837744,
-0.1434953808784485,
0.20946519076824188,
0.18502934277057648,
0.07412727922201157,
-0.1772948056459427,
0.5136587619781494,
-0.3165775537490845,
-0.08392217010259628,
0.09197549521923065,
-0.15538190305233002,
-0.03132690489292145,
-0.4021740257740021,
0.17989924550056458,
-0.061310842633247375,
0.4357353448867798,
-0.3616392910480499,
-0.24223117530345917,
-0.27174341678619385,
0.15271589159965515,
-0.23318389058113098,
0.26473018527030945,
0.31081509590148926,
-0.2944636046886444,
0.13162098824977875,
0.09264295548200607,
-0.2117515355348587,
-0.014171075075864792,
0.16551890969276428,
0.0573531799018383,
0.2916792929172516,
-0.2994028925895691,
-0.14608535170555115,
0.35021278262138367,
-0.19670778512954712,
-0.24856245517730713,
0.047421492636203766,
-0.08520326018333435,
0.24255512654781342,
-0.06517788022756577,
-0.022183556109666824,
0.16320659220218658,
0.15800738334655762,
-0.03876989334821701,
0.016518939286470413,
-0.11958573758602142,
0.22612014412879944,
-0.17951440811157227,
0.22162611782550812,
-0.014148619957268238,
0.178992360830307,
0.24173635244369507,
-0.020095547661185265,
0.22457575798034668,
0.4123167097568512,
0.012038106098771095,
0.00003364496660651639,
-0.07607118785381317,
-0.19488412141799927,
-0.41488876938819885,
-0.05483710765838623,
0.5135276317596436,
-0.27397119998931885,
-0.15554901957511902,
0.05543077364563942,
-0.07868164777755737,
-0.22093001008033752,
0.09622178226709366,
0.41372162103652954,
-0.12466596812009811,
-0.01058029755949974,
0.12739881873130798,
0.3244035243988037,
-0.22933325171470642,
-0.20256011188030243,
0.011584850028157234,
0.21795472502708435,
-0.04691295698285103,
0.14438553154468536,
0.2509661614894867,
-0.4630833566188812,
0.5074712038040161,
0.004960082937031984,
0.17022721469402313,
0.19168680906295776,
-0.0764000415802002,
-0.09053707867860794,
-0.09383990615606308,
0.3047248423099518,
-0.0437418669462204,
0.15940187871456146,
0.21300852298736572,
-0.03781569376587868,
-0.25436878204345703,
0.011781265959143639,
0.03112557716667652,
-0.21736082434654236,
-0.06825145334005356,
0.18231765925884247,
-0.31909769773483276,
-0.05543958395719528,
-0.19163677096366882,
0.2330002337694168,
0.17910955846309662,
-0.4966382086277008,
-0.045691072940826416,
0.03392694890499115,
-0.5319356918334961,
-0.013549130409955978,
0.05971939116716385,
0.4067554771900177,
-0.07273343950510025,
-0.2927672863006592,
-0.08419211208820343,
0.025301577523350716,
0.15555599331855774,
0.11645528674125671,
-0.0388878658413887,
0.02915012091398239,
-0.27821090817451477,
0.32769787311553955,
0.3454301953315735,
-0.5265827178955078,
-0.4309079051017761,
0.13371753692626953,
0.11854102462530136,
0.26250123977661133,
0.33125314116477966,
-0.23310421407222748,
0.24696969985961914,
-0.20047304034233093,
0.1713254153728485,
0.3000825345516205,
0.19032397866249084,
-0.10057292133569717,
-0.1891237050294876,
-0.14640948176383972,
-0.03143991902470589,
0.09461072087287903,
-0.14088322222232819,
0.16751274466514587,
-0.0015277588972821832,
-0.0004481681389734149,
0.19748398661613464,
0.07622669637203217,
0.0679526999592781,
0.2516244053840637,
0.2334306389093399,
0.055891189724206924,
0.056504350155591965,
-0.40984582901000977,
0.08384692668914795,
0.03775358945131302,
-0.3253635764122009,
0.4253617227077484,
-0.41721808910369873,
-0.13598930835723877,
-0.2352316677570343,
-0.09957978129386902,
-0.24117796123027802,
-0.1433670073747635,
0.15815302729606628,
0.2674134373664856,
0.17963539063930511,
0.3149421513080597,
-0.24506156146526337,
-0.0018460778519511223,
0.17783279716968536,
-0.02701304294168949,
-0.6278397440910339,
0.08613083511590958,
-0.21380773186683655,
-0.11137538403272629,
0.3707224428653717,
0.27908217906951904,
0.15637092292308807,
-0.11812157928943634,
-0.08054394274950027,
0.2213093787431717,
-0.06357842683792114,
0.33696505427360535,
-0.4050092399120331,
0.11842802166938782,
0.12250272929668427,
-0.3153546154499054,
0.3848434388637543,
0.15099076926708221,
0.12453461438417435,
-0.05512464791536331,
0.3454691171646118,
0.19091911613941193,
0.21360547840595245,
0.14525118470191956,
0.17015576362609863,
0.08414643257856369,
0.4480593800544739,
0.12956196069717407,
-0.2246253490447998,
-0.31095579266548157,
0.40796327590942383,
-0.2685546278953552,
0.5072842836380005,
0.020766330882906914,
-0.3180296719074249,
0.007369068916887045,
0.520995020866394,
-0.0545135922729969,
0.1844329684972763,
0.12430819869041443,
-0.32227444648742676,
-0.16832099854946136,
0.2562192380428314,
0.14196322858333588,
0.44718289375305176,
0.1286044716835022,
0.07792245596647263,
0.19606606662273407,
0.06277299672365189,
-0.3435523211956024,
0.2704864740371704,
0.030534790828824043,
0.07069526612758636,
0.27703529596328735,
0.09566125273704529,
0.04864509031176567,
-0.5301127433776855,
-0.03271418437361717,
-0.1379942148923874,
0.1653430014848709,
-0.12182670831680298,
0.016171718016266823,
-0.309975802898407,
-0.5472105741500854,
-0.1764034479856491,
-0.2263452708721161,
-0.3613770604133606,
-0.1843629628419876,
0.07602771371603012,
0.25840553641319275,
0.0806574672460556,
0.3466969132423401,
0.1766176074743271,
0.0651228278875351,
-0.15502789616584778,
-0.18369761109352112,
-0.26333537697792053,
-0.025707291439175606,
-0.1293586790561676,
0.07394266873598099,
0.3326382339000702,
0.23199503123760223,
0.21944457292556763,
-0.1248030886054039,
-0.03895128145813942,
-0.25868210196495056,
-0.1783265471458435,
0.21452851593494415,
-0.20758439600467682,
0.17263492941856384,
0.14714409410953522,
0.14034639298915863,
-0.025121578946709633,
-0.3683170676231384,
0.21502114832401276,
0.005519168451428413,
-0.0820424035191536,
0.17850656807422638,
-0.10321738570928574,
0.016597971320152283,
-0.1582729071378708,
-0.2487451434135437,
-0.234204962849617,
-0.5632392764091492,
0.023703351616859436,
0.03599359095096588,
0.15429650247097015,
0.6405218243598938,
-0.023309199139475822,
0.22337977588176727,
-0.18661895394325256,
0.4464225769042969,
-0.18980886042118073,
-0.2654585540294647,
0.3701421022415161,
-0.313311368227005,
-0.3851185441017151,
0.0832386314868927,
0.0741170346736908,
0.542316734790802,
-0.16418099403381348,
-0.47791558504104614,
-0.04790123924612999,
-0.2519605755805969,
-0.09080063551664352,
-0.027399396523833275,
0.12352270632982254,
0.3727436065673828,
0.12442073971033096,
-0.055863525718450546,
-0.15446345508098602,
-0.11275534331798553,
-0.21203875541687012,
0.03036305494606495,
0.11034393310546875,
0.11734019964933395,
0.3938215970993042,
0.03643304482102394,
0.5581880807876587,
0.1893640160560608,
0.07860909402370453,
0.5083717703819275,
0.20568083226680756,
0.4620285928249359,
-0.17617881298065186,
-0.5006489157676697,
-0.0645546019077301,
-0.010614270344376564,
0.07822367548942566,
0.3012274503707886,
0.05825435742735863,
-0.22257405519485474,
-0.4180659055709839,
-0.3451651334762573,
-0.13734440505504608,
-0.21261711418628693,
-0.026440614834427834,
-0.20758874714374542,
0.3192276954650879,
0.16266749799251556,
0.04134347662329674,
0.05739107355475426,
-0.017887355759739876,
0.20427344739437103,
0.0971611961722374,
0.07311870157718658,
-0.006308645009994507,
-0.34823790192604065,
-0.21480007469654083,
-0.6190564632415771,
0.3982364237308502,
0.059107549488544464,
0.2502114176750183,
-0.11258789896965027,
0.02648298256099224,
0.0450301319360733,
-0.009493487887084484,
0.3792358934879303,
-0.08854272961616516,
0.029673097655177116,
0.27199867367744446,
0.04430201277136803,
-0.43528202176094055,
0.05192910507321358,
-0.24492502212524414,
0.11435814946889877,
-0.06595949828624725,
0.20737424492835999,
-0.19988976418972015,
-0.05381494387984276,
0.1953684538602829,
0.2936966121196747,
0.1380232870578766,
-0.0931459441781044,
-0.4292466342449188,
-0.4469643533229828,
-0.4218349754810333,
-0.0641520768404007,
0.09730695188045502,
0.250542014837265,
0.29452961683273315,
0.2912119925022125,
0.2619183361530304,
-0.029074495658278465,
0.1567678302526474,
-0.0027868945617228746,
0.026826707646250725,
0.24934695661067963,
0.015803350135684013,
0.19504249095916748,
-0.005199819337576628,
-0.1470487266778946,
0.5904427170753479,
0.0382191427052021,
-0.31900209188461304,
-0.12213025242090225,
0.1556508094072342,
0.09097703546285629,
0.35107430815696716,
-0.16183757781982422,
0.23598098754882812,
0.1832563430070877,
-0.08828612416982651,
-0.12493068724870682,
-0.12215689569711685,
0.35414209961891174,
0.20380346477031708,
-0.15670770406723022,
-0.46497559547424316,
0.22406405210494995,
-0.0867282971739769,
0.014409790746867657,
0.20861993730068207,
0.14586864411830902,
-0.21548870205879211,
0.5865083932876587,
-0.33596205711364746,
0.9864438772201538,
0.1900937855243683,
0.15099231898784637,
0.5796768069267273,
0.2852425277233124,
0.2736799716949463,
-0.02534831129014492,
0.27040037512779236,
0.12706106901168823,
-0.23836033046245575,
-0.06375837326049805,
-0.05243971571326256,
0.44394728541374207,
-0.16282014548778534,
-0.4471866190433502,
0.19753530621528625,
0.13809050619602203,
-0.19307388365268707,
-0.08882201462984085,
0.1502462923526764,
-0.3072447180747986,
-0.3726423382759094,
-0.7613890171051025,
0.16294169425964355,
-0.08925538510084152,
0.43591976165771484,
-0.03293626010417938,
-0.0648273304104805,
0.010707801207900047,
-0.4352571964263916,
-0.35131311416625977,
0.19514811038970947,
-0.22145532071590424,
0.08132610470056534,
-0.20432648062705994,
0.04010360687971115,
0.365939199924469,
0.2889269292354584,
0.14609681069850922,
0.2889968752861023,
-0.23872603476047516,
0.1064588651061058,
-0.1322712004184723,
-0.38241732120513916,
0.1719476729631424,
0.14193223416805267,
0.2849140763282776,
-0.29900476336479187,
-0.16119632124900818,
0.20494186878204346,
-0.05691513791680336,
0.015095883049070835,
0.044152211397886276,
0.006154920905828476,
-0.030719539150595665,
-0.11245787888765335,
-0.5855564475059509,
0.0706821084022522,
-0.055305518209934235,
-0.1381876915693283,
0.13583965599536896,
0.02430848963558674,
-0.432553231716156,
0.02526625618338585,
-0.16992300748825073,
-0.10662982612848282,
-0.07931844145059586,
0.5607013702392578,
0.18800272047519684,
-0.16987019777297974,
0.39743077754974365,
0.31623953580856323,
-0.2394101470708847,
-0.17716482281684875,
-0.09588783234357834,
-0.3306097984313965,
-0.40937355160713196,
-0.042702339589595795,
0.3858557641506195,
-0.1172356903553009,
-0.25258129835128784,
0.30716025829315186,
-0.06190640479326248,
-0.009677725844085217,
-0.08388921618461609,
-0.2928615212440491,
-0.1446085423231125,
0.4782172441482544,
0.009145484305918217,
-0.1794576495885849,
0.1440703272819519,
-0.06868861615657806,
0.0756363645195961,
0.21577367186546326,
-0.32668983936309814,
0.1565900295972824,
-0.07235465198755264,
0.20357646048069,
0.31058192253112793,
0.0021460142452269793,
0.23906417191028595,
0.05024302750825882,
0.14709314703941345,
0.16374333202838898,
-0.22156982123851776,
-0.20320160686969757,
0.022394007071852684,
0.10067075490951538,
0.10467498004436493,
-0.016841551288962364,
0.19039446115493774,
-0.08430272340774536,
-0.2097073644399643,
-0.14619582891464233,
-0.007435268722474575,
0.3898075520992279,
-0.008741450496017933,
0.035073377192020416,
-0.17861023545265198,
0.0307347122579813,
0.17901866137981415,
0.00015555064601358026,
-0.17178116738796234,
-0.14069542288780212,
0.13622842729091644,
0.017986617982387543,
-0.11187639832496643,
-0.08561280369758606,
-0.039743274450302124,
0.10528872907161713,
0.003210337832570076,
-0.03330080211162567,
0.24143904447555542,
-0.14798657596111298,
0.11532536894083023,
0.22411920130252838,
0.2735118865966797,
0.2041800171136856,
-0.17302969098091125,
-0.025972837582230568,
0.37894877791404724,
0.13464196026325226,
-0.5750604867935181,
-0.12943685054779053,
0.22369448840618134,
-0.163456529378891,
0.16945691406726837,
0.18123692274093628,
0.24792547523975372,
0.005000345874577761,
0.2487308233976364,
0.07014689594507217,
0.43695303797721863,
-0.098214291036129,
0.3608633279800415,
0.055012404918670654,
0.17382022738456726,
-0.08352088183164597,
0.10916588455438614,
0.1809801459312439,
0.2475743293762207,
0.3581100404262543,
-0.5064564943313599,
0.23998107016086578,
0.12215683609247208,
-0.031216934323310852,
0.13071241974830627,
-0.29546859860420227,
0.11784512549638748,
0.5222583413124084,
0.09294314682483673,
0.08331835269927979,
-0.13043871521949768,
0.2733754813671112,
-0.19376438856124878,
-0.07021849602460861,
0.06822064518928528,
0.24201993644237518,
0.012638257816433907,
0.12432783842086792,
0.08297201991081238,
-0.1413494497537613,
-0.08922626078128815,
-0.160589337348938,
0.11493229120969772,
-0.11064266413450241,
0.017836889252066612,
-0.09270261973142624,
-0.13889281451702118,
-0.12947188317775726,
0.007709748577326536,
-0.003695169696584344,
0.007039230316877365,
-0.13627199828624725,
0.38197222352027893,
0.040279991924762726,
0.013499166816473007,
0.05457090586423874,
0.5288994908332825,
0.6157764792442322,
0.2225271463394165,
0.15397801995277405,
0.22918374836444855,
-0.34547144174575806,
-0.040724754333496094,
-0.02217266522347927,
0.24957014620304108,
0.2581286132335663,
0.31745702028274536,
0.19134970009326935,
0.10217349976301193,
-0.19083274900913239,
-0.12477900832891464,
0.32267704606056213,
0.11486354470252991,
-0.26928800344467163,
0.1078663021326065,
-0.6182485222816467,
-0.019206833094358444,
-0.25062069296836853,
0.021314039826393127,
-0.7599899768829346,
0.08910120278596878,
0.4706352949142456,
-0.08878389745950699,
0.0327543281018734,
-0.22527074813842773,
0.08188869804143906,
-0.04470847547054291,
0.34348732233047485,
0.3529568016529083,
0.21423691511154175,
0.018144432455301285,
-0.32781586050987244,
-0.7539104223251343,
0.13262774050235748,
0.09544585645198822,
0.10851387679576874,
-0.18165528774261475,
-0.07984472066164017,
0.3282204270362854,
0.3236331641674042,
-0.1485581398010254,
0.05366550758481026,
-0.22191041707992554,
-0.30841827392578125,
-0.1348043531179428,
0.015472237952053547,
-0.07750441133975983,
0.21508564054965973,
-0.1514211744070053,
-0.3206726014614105,
-0.1670657843351364,
-0.3572379946708679,
0.08481916040182114,
-0.05128619074821472,
-0.029792316257953644,
-0.33330681920051575,
-0.0977579802274704,
0.08510006964206696,
0.20585216581821442,
0.31443703174591064,
-0.25523054599761963,
-0.15018725395202637,
-0.16131360828876495,
-0.2632247805595398,
-0.08876766264438629,
0.30321091413497925,
0.03553413227200508,
0.5683218240737915,
-0.2828618586063385,
0.06549566984176636,
-0.3003051280975342,
0.5356613993644714,
0.09828474372625351,
0.004089190158993006,
-0.22741015255451202,
0.3459274172782898,
-0.16441844403743744,
0.18819478154182434,
-0.006711295805871487,
0.031845491379499435,
-0.06167369335889816,
0.11456997692584991,
-0.4813283383846283,
-0.3261032700538635,
0.684734046459198,
-0.5025777816772461,
-0.2505759298801422,
0.12680143117904663,
0.32531020045280457,
0.1369987279176712,
-0.37092137336730957,
-0.6134660243988037,
0.12574654817581177,
0.16148430109024048,
0.15859676897525787,
-0.10426514595746994,
0.19002841413021088,
-0.37132003903388977,
-0.2188592404127121,
-0.07576510310173035,
0.2658390402793884,
0.29605966806411743,
-0.19479510188102722,
0.20116250216960907,
-0.2912438213825226
] |
https://github.com/huggingface/datasets/issues/1994
|
not being able to get wikipedia es language
|
@lhoestq I really appreciate if you could help me providiing processed datasets, I do not really have access to enough resources to run the apache-beam and need to run the codes on these datasets. Only en/de/fr currently works, but I need all the languages more or less. thanks
|
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
| 48
|
not being able to get wikipedia es language
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
@lhoestq I really appreciate if you could help me providiing processed datasets, I do not really have access to enough resources to run the apache-beam and need to run the codes on these datasets. Only en/de/fr currently works, but I need all the languages more or less. thanks
|
[
-0.3421078324317932,
0.04719298332929611,
-0.10626477003097534,
0.06201732158660889,
0.20045480132102966,
0.17774426937103271,
0.17687499523162842,
0.34019631147384644,
0.13733309507369995,
0.0921180248260498,
0.41052311658859253,
0.33469316363334656,
0.016000792384147644,
0.30764591693878174,
0.11132048070430756,
-0.33708715438842773,
0.05565028265118599,
0.07522149384021759,
-0.1947193443775177,
-0.20017623901367188,
-0.13208411633968353,
0.10374307632446289,
-0.272518128156662,
-0.0701146200299263,
-0.14883527159690857,
0.10703807324171066,
0.12277764827013016,
-0.019669627770781517,
-0.19260172545909882,
-0.18620166182518005,
0.0680224820971489,
-0.03621345013380051,
0.22803393006324768,
0.10794322192668915,
-0.00010841459152288735,
0.08063174784183502,
0.5717446804046631,
-0.15838073194026947,
-0.45902180671691895,
-0.1303223818540573,
-0.0813634917140007,
-0.3462579846382141,
0.2564505338668823,
-0.3715756833553314,
-0.33478420972824097,
-0.025640562176704407,
0.31875452399253845,
-0.5857158899307251,
0.24128857254981995,
0.1479620337486267,
0.21826864778995514,
-0.07421045750379562,
0.3515351116657257,
-0.00488451449200511,
0.41059690713882446,
0.21860715746879578,
-0.03604930266737938,
-0.12430713325738907,
0.010663212276995182,
0.024965615943074226,
0.060617584735155106,
0.46184754371643066,
0.047285668551921844,
-0.11424703150987625,
0.30397289991378784,
-0.30949077010154724,
0.26568493247032166,
-0.37311577796936035,
0.42296865582466125,
0.25413089990615845,
1.0161634683609009,
-0.11970144510269165,
0.09952134639024734,
0.10506755858659744,
0.0040753912180662155,
0.12878157198429108,
0.24283616244792938,
0.20053640007972717,
-0.36427295207977295,
-0.0796794444322586,
0.11349359154701233,
-0.28304389119148254,
-0.335679292678833,
0.34555771946907043,
-0.10172826051712036,
0.5368958711624146,
0.10903763771057129,
0.14164365828037262,
-0.15097571909427643,
-0.18528833985328674,
0.07730194926261902,
-0.07077974826097488,
0.10307736694812775,
0.3541416823863983,
-0.09304514527320862,
0.13513508439064026,
0.24577893316745758,
0.1751321405172348,
0.04433978721499443,
-0.09479641169309616,
-0.27976489067077637,
0.19170106947422028,
0.36852073669433594,
0.046187154948711395,
0.022065309807658195,
0.03235389292240143,
0.3556637167930603,
-0.1849306970834732,
0.20503869652748108,
-0.030573051422834396,
0.007939324714243412,
0.06664763391017914,
-0.05862192437052727,
-0.33657580614089966,
-0.6453822255134583,
0.23251719772815704,
-0.0009587555541656911,
-0.13675111532211304,
0.1923419088125229,
0.1587262600660324,
-0.3540840446949005,
-0.2998669445514679,
-0.005748707335442305,
0.20172543823719025,
0.1522034853696823,
0.20511768758296967,
0.2833251357078552,
-0.0867256447672844,
-0.3417098820209503,
-0.3844313323497772,
-0.046640794724226,
0.28296369314193726,
-0.4593481719493866,
0.07805246859788895,
0.20936210453510284,
0.10678564757108688,
0.37506967782974243,
-0.035515718162059784,
-0.043999992311000824,
0.042526837438344955,
0.13077178597450256,
0.0788348987698555,
-0.13859976828098297,
0.15947602689266205,
0.1490192711353302,
0.24700047075748444,
0.19990430772304535,
-0.22246770560741425,
-0.0522187203168869,
0.0016838106093928218,
-0.09037464112043381,
-0.19051942229270935,
-0.18565542995929718,
0.17176082730293274,
0.12278037518262863,
0.10188641399145126,
0.04582488536834717,
0.3413788974285126,
0.17139941453933716,
-0.2258874475955963,
0.14366410672664642,
-0.00750997057184577,
-0.13457545638084412,
-0.09188759326934814,
0.3624598979949951,
0.3725726008415222,
-0.6563612222671509,
0.10404717922210693,
-0.04956433176994324,
0.18776701390743256,
0.14369991421699524,
-0.27950069308280945,
-0.28138816356658936,
0.4237997531890869,
-0.09352050721645355,
-0.10077238827943802,
0.3089188039302826,
-0.2708933353424072,
0.08159120380878448,
0.19684253633022308,
0.0673350989818573,
-0.28226202726364136,
0.23710165917873383,
-0.11235322058200836,
0.04229583963751793,
0.16245496273040771,
0.11410839110612869,
0.16634473204612732,
0.11646075546741486,
-0.0702253133058548,
-0.21967510879039764,
-0.12229474633932114,
-0.04315485805273056,
0.11727110296487808,
0.266544371843338,
-0.11957978457212448,
0.12490258365869522,
0.5266053676605225,
0.3261626362800598,
-0.2632543742656708,
0.07642466574907303,
0.5432159304618835,
-0.3122917115688324,
0.08065870404243469,
0.1918921172618866,
-0.055475279688835144,
-0.04989950731396675,
0.18091364204883575,
-0.23919570446014404,
0.40391120314598083,
0.07905687391757965,
-0.005385706201195717,
-0.2668082118034363,
-0.053028181195259094,
-0.23602977395057678,
-0.42836418747901917,
0.21149270236492157,
0.0466558039188385,
-0.035518828779459,
0.2530866265296936,
0.052935536950826645,
-0.09003455936908722,
-0.2782233655452728,
-0.13893696665763855,
-0.8122120499610901,
0.2934665381908417,
-0.28607645630836487,
-0.080081045627594,
-0.0875597819685936,
0.02025469020009041,
0.0639520063996315,
-0.12363416701555252,
-0.2867794334888458,
0.10091570764780045,
0.18732792139053345,
0.03720070794224739,
-0.011949371546506882,
0.1644933968782425,
0.12202993780374527,
-0.2648279070854187,
0.3166707158088684,
0.30542314052581787,
0.11994064599275589,
0.017968744039535522,
-0.2019144892692566,
0.11080726981163025,
0.04773256182670593,
0.3355245888233185,
0.07278717309236526,
0.268589049577713,
0.18518298864364624,
0.1680481880903244,
-0.15628185868263245,
-0.159163698554039,
0.3021559417247772,
0.4226677715778351,
0.18189804255962372,
-0.1457035094499588,
0.03703934699296951,
0.07721482217311859,
0.4515743851661682,
0.104843370616436,
-0.09222353249788284,
-0.12637142837047577,
-0.30541104078292847,
-0.05947883427143097,
0.4833451509475708,
-0.17912422120571136,
-0.01602180488407612,
0.27910545468330383,
-0.016197603195905685,
0.0771193876862526,
-0.15118470788002014,
-0.11755307018756866,
0.44462260603904724,
0.07232657074928284,
0.5178593397140503,
-0.025720220059156418,
-0.12441618740558624,
-0.18681888282299042,
-0.19084171950817108,
-0.2879425585269928,
-0.12341467291116714,
0.2847411632537842,
-0.31246840953826904,
0.2768913507461548,
-0.4178836941719055,
-0.5642529129981995,
-0.20843029022216797,
0.4299703538417816,
-0.3480244576931,
-0.3430693745613098,
-0.06800902634859085,
0.07788634300231934,
-0.02291020378470421,
0.2500196695327759,
0.10721097886562347,
-0.03554370626807213,
0.23204532265663147,
0.007473080884665251,
-0.22167707979679108,
-0.5956379175186157,
-0.43564069271087646,
0.032663337886333466,
0.28232595324516296,
0.03737654909491539,
0.12723003327846527,
-0.15690569579601288,
-0.06724125891923904,
-0.14529554545879364,
-0.40219566226005554,
0.3414440155029297,
-0.08698386698961258,
-0.008463106118142605,
0.11665339022874832,
0.42721834778785706,
-0.19598135352134705,
-0.09505852311849594,
0.3098015785217285,
0.11520124971866608,
-0.14764967560768127,
-0.06926612555980682,
-0.084672711789608,
-0.06236201524734497,
-0.030823122709989548,
-0.43830224871635437,
-0.15058587491512299,
-0.3273385763168335,
-0.1820002794265747,
0.16898339986801147,
0.13323597609996796,
0.35230642557144165,
0.2645769715309143,
0.2091483473777771,
0.3283594250679016,
0.09546112269163132,
-0.09655710309743881,
-0.15933692455291748,
0.21701869368553162,
-0.3185729384422302,
-0.3167467415332794,
0.10404214262962341,
-0.14131318032741547,
0.23050709068775177,
0.11353979259729385,
-0.14633017778396606,
0.06803134083747864,
0.11597270518541336,
0.02005460299551487,
-0.10132098197937012,
0.32571718096733093,
0.7469015717506409,
-0.012623910792171955,
-0.0016660453984513879,
-0.09881129860877991,
0.047826457768678665,
0.03073797933757305,
-0.4368046224117279,
0.34731799364089966,
0.1777922809123993,
0.5277689695358276,
-0.07014810293912888,
0.7515990138053894,
0.11483553797006607,
0.11667937785387039,
0.1321658194065094,
-0.07526150345802307,
0.06618568301200867,
-0.27247294783592224,
-0.18846014142036438,
0.29278069734573364,
0.04032675176858902,
-0.3030898869037628,
0.3898434638977051,
-0.1277020126581192,
-0.259891152381897,
-0.43877750635147095,
0.07504691183567047,
0.0015997649170458317,
-0.24473899602890015,
-0.0376066118478775,
-0.37500426173210144,
0.383912056684494,
-0.09530312567949295,
0.3992140293121338,
-0.08024558424949646,
-0.07314207404851913,
0.05920083448290825,
0.2196865677833557,
-0.0982464998960495,
0.13422450423240662,
-0.17309798300266266,
-0.2497503161430359,
-0.39932578802108765,
0.2461433708667755,
0.0012105636997148395,
0.14361701905727386,
-0.29275277256965637,
0.007917716167867184,
0.28317421674728394,
0.008745018392801285,
0.5200986266136169,
-0.6470431089401245,
-0.0973823070526123,
0.33533909916877747,
0.19218088686466217,
-0.6571789383888245,
-0.14138785004615784,
-0.18767713010311127,
0.2771165668964386,
0.32850176095962524,
-0.047846969217061996,
-0.33222001791000366,
-0.1513580083847046,
0.2680891156196594,
0.04856918752193451,
-0.09909957647323608,
0.05151959881186485,
-0.2417593151330948,
-0.1433180272579193,
-0.33531591296195984,
-0.06578189134597778,
-0.09969448298215866,
0.13510790467262268,
0.10023964196443558,
0.21499595046043396,
0.08130296319723129,
0.02621845342218876,
-0.1448788344860077,
0.20501364767551422,
0.12260513007640839,
0.1383640021085739,
-0.2560672461986542,
0.10371154546737671,
0.48064786195755005,
-0.026589175686240196,
-0.10802411288022995,
0.18511314690113068,
-0.20795366168022156,
0.17263789474964142,
-0.21509230136871338,
0.14550882577896118,
0.16040974855422974,
-0.12064620852470398,
-0.23936393857002258,
0.03647935017943382,
-0.2542997896671295,
-0.04646565392613411,
0.05284343287348747,
0.20871615409851074,
0.08100172877311707,
-0.12740002572536469,
-0.45757803320884705,
0.5609194040298462,
0.18852916359901428,
-0.07297052443027496,
0.2990112602710724,
-0.01566607505083084,
-0.4306361675262451,
0.405288964509964,
0.432944118976593,
0.8635654449462891,
0.02991594187915325,
0.013998446986079216,
0.17142035067081451,
0.16713599860668182,
0.6254858374595642,
-0.5466775894165039,
0.209164097905159,
-0.2812899351119995,
0.31988710165023804,
-0.09525495022535324,
0.06537692993879318,
0.39573410153388977,
0.14318527281284332,
-0.22216999530792236,
0.35360684990882874,
-0.01738503947854042,
0.07415813952684402,
0.05659619718790054,
0.37671759724617004,
0.12653326988220215,
-0.30785268545150757,
-0.11752994358539581,
0.1213967576622963,
-0.18236272037029266,
0.2824692726135254,
-0.24982164800167084,
-0.012538416311144829,
-0.014506855048239231,
-0.24492387473583221,
-0.41069939732551575,
0.09119254350662231,
-0.22418341040611267,
0.46085646748542786,
-0.342303603887558,
-0.4593048691749573,
0.2506963014602661,
0.22680921852588654,
0.23546139895915985,
0.3696662187576294,
-0.3735496699810028,
0.2001676708459854,
0.015004470013082027,
-0.2361069768667221,
-0.07618890702724457,
0.041097577661275864,
0.3866560161113739,
-0.19228112697601318,
-0.3922683000564575,
0.21181191504001617,
-0.1738397777080536,
-0.09788365662097931,
-0.29128584265708923,
-0.31771931052207947,
0.31883278489112854,
0.25020185112953186,
0.12403402477502823,
0.1725907027721405,
-0.08605587482452393,
-0.13386200368404388,
0.11980458348989487,
-0.28414207696914673,
0.010103470645844936,
0.008689327165484428,
0.08827563375234604,
-0.08681789040565491,
0.0309087336063385,
0.257151335477829,
0.18761812150478363,
0.01726139523088932,
0.5952089428901672,
0.3785049021244049,
-0.21947410702705383,
-0.2659061551094055,
0.17860892415046692,
-0.22924327850341797,
-0.060689885169267654,
-0.2634166181087494,
0.15080633759498596,
0.092317596077919,
-0.057126615196466446,
0.1029210165143013,
-0.015744367614388466,
-0.14090988039970398,
-0.0071756960824131966,
-0.2680378556251526,
-0.02095889113843441,
0.02229992486536503,
-0.16380932927131653,
-0.001558042480610311,
0.1883055418729782,
0.1332460343837738,
0.28536418080329895,
-0.23602212965488434,
-0.279116690158844,
-0.23883521556854248,
-0.022319765761494637,
0.04532048478722572,
0.41371288895606995,
-0.016639666631817818,
-0.23604744672775269,
-0.03873738646507263,
0.14523173868656158,
-0.23010562360286713,
-0.2452724575996399,
-0.17255043983459473,
-0.04683474078774452,
0.12900730967521667,
-0.03978543356060982,
-0.18745683133602142,
0.13585445284843445,
-0.34036070108413696,
-0.29250553250312805,
-0.20412884652614594,
-0.13163794577121735,
-0.12930701673030853,
-0.024286020547151566,
0.2222883105278015,
-0.10420877486467361,
0.34498995542526245,
-0.28780093789100647,
0.08798287808895111,
0.0348752997815609,
0.2938302755355835,
0.051171258091926575,
0.24954818189144135,
0.4168609082698822,
-0.17646756768226624,
-0.5602079033851624,
0.18304453790187836,
-0.22114601731300354,
0.1743837296962738,
0.16332216560840607,
-0.0828019380569458,
-0.04801162704825401,
0.029964936897158623,
-0.021473752334713936,
0.026400933042168617,
-0.08198835700750351,
-0.03023359552025795,
0.13558794558048248,
0.20455136895179749,
-0.28272297978401184,
0.12395669519901276,
0.42209771275520325,
-0.033097364008426666,
0.09618926048278809,
0.026278669014573097,
0.2615511417388916,
-0.0534207858145237,
0.17466245591640472,
0.04105694591999054,
0.016864243894815445,
-0.04344846308231354,
0.2639884054660797,
0.09460699558258057,
0.08114752918481827,
0.11606074124574661,
-0.12007065117359161,
0.04641939699649811,
0.13107267022132874,
0.37461331486701965,
0.10712598264217377,
0.06603636592626572,
0.10081680864095688,
0.21656906604766846,
-0.2253754884004593,
-0.1409861445426941,
0.3062989413738251,
-0.102775439620018,
-0.02090821973979473,
0.02287697233259678,
-0.06457333266735077,
0.07485668361186981,
0.14801688492298126,
-0.0637497752904892,
-0.3180233836174011,
0.13867323100566864,
-0.07772649079561234,
-0.18301387131214142,
-0.6274290084838867,
-0.23228102922439575,
0.05465099960565567,
-0.017658982425928116,
0.08908950537443161,
-0.0836968719959259,
-0.10924681276082993,
0.20269767940044403,
-0.035025905817747116,
-0.23063597083091736,
0.6797713041305542,
-0.06164822727441788,
0.04469691216945648,
-0.0551760196685791,
0.2520875334739685,
-0.21323366463184357,
-0.07124578207731247,
-0.1705527901649475,
-0.0018401573179289699,
0.1578255295753479,
0.2109287828207016,
-0.47010332345962524,
-0.14399264752864838,
-0.0009011016809381545,
0.018943987786769867,
-0.059177469462156296,
0.0006441868026740849,
0.06300180405378342,
-0.037797171622514725,
0.29405099153518677,
0.10967087000608444,
-0.08980157971382141,
-0.1984422653913498,
0.21691618859767914,
-0.007181836292147636,
-0.020038271322846413,
-0.24845373630523682,
0.004518008325248957,
0.10421203076839447,
-0.10660920292139053,
0.11462518572807312,
-0.5152727365493774,
0.04132748395204544,
0.2593999207019806,
0.38845986127853394,
-0.10852847993373871,
-0.22299636900424957,
0.0836436077952385,
-0.32754483819007874,
0.5394181609153748,
0.08417349308729172,
0.19058305025100708,
-0.118047334253788,
-0.2930145859718323,
-0.2950972616672516,
0.005453429184854031,
-0.16959351301193237,
-0.36802420020103455,
-0.12039460241794586,
0.30591779947280884,
0.3928033113479614,
0.24459435045719147,
0.11688076704740524,
-0.25355294346809387,
-0.12980464100837708,
0.2650587558746338,
-0.14386354386806488,
-0.15893062949180603,
-0.0732821449637413,
0.04924171045422554,
-0.22518867254257202,
-0.1773684024810791,
0.08320578187704086,
-0.019432324916124344,
0.07522563636302948,
-0.22762125730514526,
-0.14735786616802216,
0.3186533749103546,
-0.43477800488471985,
0.259577214717865,
0.025894859805703163,
0.5472239255905151,
0.029132409021258354,
-0.04227191582322121,
-0.16555611789226532,
0.2228381633758545,
-0.045000120997428894,
0.4914209246635437,
0.06162133067846298,
0.2285093516111374,
-0.21550017595291138,
-0.3188492953777313,
-0.34525811672210693,
0.6317014098167419,
0.03209638595581055,
-0.05510024353861809,
-0.24908003211021423,
-0.05867017060518265,
-0.22949935495853424,
0.29232847690582275,
-0.11924499273300171,
0.06629249453544617,
-0.036651838570833206,
0.18673349916934967,
-0.35817015171051025,
-0.23673127591609955,
0.3384189307689667,
-0.42113202810287476,
-0.3356802463531494,
-0.189715176820755,
0.06820890307426453,
-0.14943398535251617,
0.2929893136024475,
-0.10573438555002213,
-0.015353714115917683,
0.26347067952156067,
-0.13522662222385406,
-0.01672343537211418,
0.0001438934268662706,
0.059857141226530075,
0.15739844739437103,
-0.24589890241622925,
-0.40447208285331726,
-0.19432991743087769,
-0.06032519042491913,
-0.37993162870407104,
-0.24929244816303253
] |
https://github.com/huggingface/datasets/issues/1994
|
not being able to get wikipedia es language
|
Hi @dorost1234, I think I can help you a little. I’ve processed some Wikipedia datasets (Spanish inclusive) using the HF/datasets library during recent research.
@lhoestq Could you help me to upload these preprocessed datasets to Huggingface's repositories? To be more precise, I've built datasets from the following languages using the 20201201 dumps: Spanish, Portuguese, Russian, French, Japanese, Chinese, and Turkish. Process these datasets have high costs that most of the community can't afford. I think these preprocessed datasets I have could be helpful for someone without access to high-resource machines to process Wikipedia's dumps like @dorost1234
|
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
| 96
|
not being able to get wikipedia es language
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
Hi @dorost1234, I think I can help you a little. I’ve processed some Wikipedia datasets (Spanish inclusive) using the HF/datasets library during recent research.
@lhoestq Could you help me to upload these preprocessed datasets to Huggingface's repositories? To be more precise, I've built datasets from the following languages using the 20201201 dumps: Spanish, Portuguese, Russian, French, Japanese, Chinese, and Turkish. Process these datasets have high costs that most of the community can't afford. I think these preprocessed datasets I have could be helpful for someone without access to high-resource machines to process Wikipedia's dumps like @dorost1234
|
[
-0.3421078324317932,
0.04719298332929611,
-0.10626477003097534,
0.06201732158660889,
0.20045480132102966,
0.17774426937103271,
0.17687499523162842,
0.34019631147384644,
0.13733309507369995,
0.0921180248260498,
0.41052311658859253,
0.33469316363334656,
0.016000792384147644,
0.30764591693878174,
0.11132048070430756,
-0.33708715438842773,
0.05565028265118599,
0.07522149384021759,
-0.1947193443775177,
-0.20017623901367188,
-0.13208411633968353,
0.10374307632446289,
-0.272518128156662,
-0.0701146200299263,
-0.14883527159690857,
0.10703807324171066,
0.12277764827013016,
-0.019669627770781517,
-0.19260172545909882,
-0.18620166182518005,
0.0680224820971489,
-0.03621345013380051,
0.22803393006324768,
0.10794322192668915,
-0.00010841459152288735,
0.08063174784183502,
0.5717446804046631,
-0.15838073194026947,
-0.45902180671691895,
-0.1303223818540573,
-0.0813634917140007,
-0.3462579846382141,
0.2564505338668823,
-0.3715756833553314,
-0.33478420972824097,
-0.025640562176704407,
0.31875452399253845,
-0.5857158899307251,
0.24128857254981995,
0.1479620337486267,
0.21826864778995514,
-0.07421045750379562,
0.3515351116657257,
-0.00488451449200511,
0.41059690713882446,
0.21860715746879578,
-0.03604930266737938,
-0.12430713325738907,
0.010663212276995182,
0.024965615943074226,
0.060617584735155106,
0.46184754371643066,
0.047285668551921844,
-0.11424703150987625,
0.30397289991378784,
-0.30949077010154724,
0.26568493247032166,
-0.37311577796936035,
0.42296865582466125,
0.25413089990615845,
1.0161634683609009,
-0.11970144510269165,
0.09952134639024734,
0.10506755858659744,
0.0040753912180662155,
0.12878157198429108,
0.24283616244792938,
0.20053640007972717,
-0.36427295207977295,
-0.0796794444322586,
0.11349359154701233,
-0.28304389119148254,
-0.335679292678833,
0.34555771946907043,
-0.10172826051712036,
0.5368958711624146,
0.10903763771057129,
0.14164365828037262,
-0.15097571909427643,
-0.18528833985328674,
0.07730194926261902,
-0.07077974826097488,
0.10307736694812775,
0.3541416823863983,
-0.09304514527320862,
0.13513508439064026,
0.24577893316745758,
0.1751321405172348,
0.04433978721499443,
-0.09479641169309616,
-0.27976489067077637,
0.19170106947422028,
0.36852073669433594,
0.046187154948711395,
0.022065309807658195,
0.03235389292240143,
0.3556637167930603,
-0.1849306970834732,
0.20503869652748108,
-0.030573051422834396,
0.007939324714243412,
0.06664763391017914,
-0.05862192437052727,
-0.33657580614089966,
-0.6453822255134583,
0.23251719772815704,
-0.0009587555541656911,
-0.13675111532211304,
0.1923419088125229,
0.1587262600660324,
-0.3540840446949005,
-0.2998669445514679,
-0.005748707335442305,
0.20172543823719025,
0.1522034853696823,
0.20511768758296967,
0.2833251357078552,
-0.0867256447672844,
-0.3417098820209503,
-0.3844313323497772,
-0.046640794724226,
0.28296369314193726,
-0.4593481719493866,
0.07805246859788895,
0.20936210453510284,
0.10678564757108688,
0.37506967782974243,
-0.035515718162059784,
-0.043999992311000824,
0.042526837438344955,
0.13077178597450256,
0.0788348987698555,
-0.13859976828098297,
0.15947602689266205,
0.1490192711353302,
0.24700047075748444,
0.19990430772304535,
-0.22246770560741425,
-0.0522187203168869,
0.0016838106093928218,
-0.09037464112043381,
-0.19051942229270935,
-0.18565542995929718,
0.17176082730293274,
0.12278037518262863,
0.10188641399145126,
0.04582488536834717,
0.3413788974285126,
0.17139941453933716,
-0.2258874475955963,
0.14366410672664642,
-0.00750997057184577,
-0.13457545638084412,
-0.09188759326934814,
0.3624598979949951,
0.3725726008415222,
-0.6563612222671509,
0.10404717922210693,
-0.04956433176994324,
0.18776701390743256,
0.14369991421699524,
-0.27950069308280945,
-0.28138816356658936,
0.4237997531890869,
-0.09352050721645355,
-0.10077238827943802,
0.3089188039302826,
-0.2708933353424072,
0.08159120380878448,
0.19684253633022308,
0.0673350989818573,
-0.28226202726364136,
0.23710165917873383,
-0.11235322058200836,
0.04229583963751793,
0.16245496273040771,
0.11410839110612869,
0.16634473204612732,
0.11646075546741486,
-0.0702253133058548,
-0.21967510879039764,
-0.12229474633932114,
-0.04315485805273056,
0.11727110296487808,
0.266544371843338,
-0.11957978457212448,
0.12490258365869522,
0.5266053676605225,
0.3261626362800598,
-0.2632543742656708,
0.07642466574907303,
0.5432159304618835,
-0.3122917115688324,
0.08065870404243469,
0.1918921172618866,
-0.055475279688835144,
-0.04989950731396675,
0.18091364204883575,
-0.23919570446014404,
0.40391120314598083,
0.07905687391757965,
-0.005385706201195717,
-0.2668082118034363,
-0.053028181195259094,
-0.23602977395057678,
-0.42836418747901917,
0.21149270236492157,
0.0466558039188385,
-0.035518828779459,
0.2530866265296936,
0.052935536950826645,
-0.09003455936908722,
-0.2782233655452728,
-0.13893696665763855,
-0.8122120499610901,
0.2934665381908417,
-0.28607645630836487,
-0.080081045627594,
-0.0875597819685936,
0.02025469020009041,
0.0639520063996315,
-0.12363416701555252,
-0.2867794334888458,
0.10091570764780045,
0.18732792139053345,
0.03720070794224739,
-0.011949371546506882,
0.1644933968782425,
0.12202993780374527,
-0.2648279070854187,
0.3166707158088684,
0.30542314052581787,
0.11994064599275589,
0.017968744039535522,
-0.2019144892692566,
0.11080726981163025,
0.04773256182670593,
0.3355245888233185,
0.07278717309236526,
0.268589049577713,
0.18518298864364624,
0.1680481880903244,
-0.15628185868263245,
-0.159163698554039,
0.3021559417247772,
0.4226677715778351,
0.18189804255962372,
-0.1457035094499588,
0.03703934699296951,
0.07721482217311859,
0.4515743851661682,
0.104843370616436,
-0.09222353249788284,
-0.12637142837047577,
-0.30541104078292847,
-0.05947883427143097,
0.4833451509475708,
-0.17912422120571136,
-0.01602180488407612,
0.27910545468330383,
-0.016197603195905685,
0.0771193876862526,
-0.15118470788002014,
-0.11755307018756866,
0.44462260603904724,
0.07232657074928284,
0.5178593397140503,
-0.025720220059156418,
-0.12441618740558624,
-0.18681888282299042,
-0.19084171950817108,
-0.2879425585269928,
-0.12341467291116714,
0.2847411632537842,
-0.31246840953826904,
0.2768913507461548,
-0.4178836941719055,
-0.5642529129981995,
-0.20843029022216797,
0.4299703538417816,
-0.3480244576931,
-0.3430693745613098,
-0.06800902634859085,
0.07788634300231934,
-0.02291020378470421,
0.2500196695327759,
0.10721097886562347,
-0.03554370626807213,
0.23204532265663147,
0.007473080884665251,
-0.22167707979679108,
-0.5956379175186157,
-0.43564069271087646,
0.032663337886333466,
0.28232595324516296,
0.03737654909491539,
0.12723003327846527,
-0.15690569579601288,
-0.06724125891923904,
-0.14529554545879364,
-0.40219566226005554,
0.3414440155029297,
-0.08698386698961258,
-0.008463106118142605,
0.11665339022874832,
0.42721834778785706,
-0.19598135352134705,
-0.09505852311849594,
0.3098015785217285,
0.11520124971866608,
-0.14764967560768127,
-0.06926612555980682,
-0.084672711789608,
-0.06236201524734497,
-0.030823122709989548,
-0.43830224871635437,
-0.15058587491512299,
-0.3273385763168335,
-0.1820002794265747,
0.16898339986801147,
0.13323597609996796,
0.35230642557144165,
0.2645769715309143,
0.2091483473777771,
0.3283594250679016,
0.09546112269163132,
-0.09655710309743881,
-0.15933692455291748,
0.21701869368553162,
-0.3185729384422302,
-0.3167467415332794,
0.10404214262962341,
-0.14131318032741547,
0.23050709068775177,
0.11353979259729385,
-0.14633017778396606,
0.06803134083747864,
0.11597270518541336,
0.02005460299551487,
-0.10132098197937012,
0.32571718096733093,
0.7469015717506409,
-0.012623910792171955,
-0.0016660453984513879,
-0.09881129860877991,
0.047826457768678665,
0.03073797933757305,
-0.4368046224117279,
0.34731799364089966,
0.1777922809123993,
0.5277689695358276,
-0.07014810293912888,
0.7515990138053894,
0.11483553797006607,
0.11667937785387039,
0.1321658194065094,
-0.07526150345802307,
0.06618568301200867,
-0.27247294783592224,
-0.18846014142036438,
0.29278069734573364,
0.04032675176858902,
-0.3030898869037628,
0.3898434638977051,
-0.1277020126581192,
-0.259891152381897,
-0.43877750635147095,
0.07504691183567047,
0.0015997649170458317,
-0.24473899602890015,
-0.0376066118478775,
-0.37500426173210144,
0.383912056684494,
-0.09530312567949295,
0.3992140293121338,
-0.08024558424949646,
-0.07314207404851913,
0.05920083448290825,
0.2196865677833557,
-0.0982464998960495,
0.13422450423240662,
-0.17309798300266266,
-0.2497503161430359,
-0.39932578802108765,
0.2461433708667755,
0.0012105636997148395,
0.14361701905727386,
-0.29275277256965637,
0.007917716167867184,
0.28317421674728394,
0.008745018392801285,
0.5200986266136169,
-0.6470431089401245,
-0.0973823070526123,
0.33533909916877747,
0.19218088686466217,
-0.6571789383888245,
-0.14138785004615784,
-0.18767713010311127,
0.2771165668964386,
0.32850176095962524,
-0.047846969217061996,
-0.33222001791000366,
-0.1513580083847046,
0.2680891156196594,
0.04856918752193451,
-0.09909957647323608,
0.05151959881186485,
-0.2417593151330948,
-0.1433180272579193,
-0.33531591296195984,
-0.06578189134597778,
-0.09969448298215866,
0.13510790467262268,
0.10023964196443558,
0.21499595046043396,
0.08130296319723129,
0.02621845342218876,
-0.1448788344860077,
0.20501364767551422,
0.12260513007640839,
0.1383640021085739,
-0.2560672461986542,
0.10371154546737671,
0.48064786195755005,
-0.026589175686240196,
-0.10802411288022995,
0.18511314690113068,
-0.20795366168022156,
0.17263789474964142,
-0.21509230136871338,
0.14550882577896118,
0.16040974855422974,
-0.12064620852470398,
-0.23936393857002258,
0.03647935017943382,
-0.2542997896671295,
-0.04646565392613411,
0.05284343287348747,
0.20871615409851074,
0.08100172877311707,
-0.12740002572536469,
-0.45757803320884705,
0.5609194040298462,
0.18852916359901428,
-0.07297052443027496,
0.2990112602710724,
-0.01566607505083084,
-0.4306361675262451,
0.405288964509964,
0.432944118976593,
0.8635654449462891,
0.02991594187915325,
0.013998446986079216,
0.17142035067081451,
0.16713599860668182,
0.6254858374595642,
-0.5466775894165039,
0.209164097905159,
-0.2812899351119995,
0.31988710165023804,
-0.09525495022535324,
0.06537692993879318,
0.39573410153388977,
0.14318527281284332,
-0.22216999530792236,
0.35360684990882874,
-0.01738503947854042,
0.07415813952684402,
0.05659619718790054,
0.37671759724617004,
0.12653326988220215,
-0.30785268545150757,
-0.11752994358539581,
0.1213967576622963,
-0.18236272037029266,
0.2824692726135254,
-0.24982164800167084,
-0.012538416311144829,
-0.014506855048239231,
-0.24492387473583221,
-0.41069939732551575,
0.09119254350662231,
-0.22418341040611267,
0.46085646748542786,
-0.342303603887558,
-0.4593048691749573,
0.2506963014602661,
0.22680921852588654,
0.23546139895915985,
0.3696662187576294,
-0.3735496699810028,
0.2001676708459854,
0.015004470013082027,
-0.2361069768667221,
-0.07618890702724457,
0.041097577661275864,
0.3866560161113739,
-0.19228112697601318,
-0.3922683000564575,
0.21181191504001617,
-0.1738397777080536,
-0.09788365662097931,
-0.29128584265708923,
-0.31771931052207947,
0.31883278489112854,
0.25020185112953186,
0.12403402477502823,
0.1725907027721405,
-0.08605587482452393,
-0.13386200368404388,
0.11980458348989487,
-0.28414207696914673,
0.010103470645844936,
0.008689327165484428,
0.08827563375234604,
-0.08681789040565491,
0.0309087336063385,
0.257151335477829,
0.18761812150478363,
0.01726139523088932,
0.5952089428901672,
0.3785049021244049,
-0.21947410702705383,
-0.2659061551094055,
0.17860892415046692,
-0.22924327850341797,
-0.060689885169267654,
-0.2634166181087494,
0.15080633759498596,
0.092317596077919,
-0.057126615196466446,
0.1029210165143013,
-0.015744367614388466,
-0.14090988039970398,
-0.0071756960824131966,
-0.2680378556251526,
-0.02095889113843441,
0.02229992486536503,
-0.16380932927131653,
-0.001558042480610311,
0.1883055418729782,
0.1332460343837738,
0.28536418080329895,
-0.23602212965488434,
-0.279116690158844,
-0.23883521556854248,
-0.022319765761494637,
0.04532048478722572,
0.41371288895606995,
-0.016639666631817818,
-0.23604744672775269,
-0.03873738646507263,
0.14523173868656158,
-0.23010562360286713,
-0.2452724575996399,
-0.17255043983459473,
-0.04683474078774452,
0.12900730967521667,
-0.03978543356060982,
-0.18745683133602142,
0.13585445284843445,
-0.34036070108413696,
-0.29250553250312805,
-0.20412884652614594,
-0.13163794577121735,
-0.12930701673030853,
-0.024286020547151566,
0.2222883105278015,
-0.10420877486467361,
0.34498995542526245,
-0.28780093789100647,
0.08798287808895111,
0.0348752997815609,
0.2938302755355835,
0.051171258091926575,
0.24954818189144135,
0.4168609082698822,
-0.17646756768226624,
-0.5602079033851624,
0.18304453790187836,
-0.22114601731300354,
0.1743837296962738,
0.16332216560840607,
-0.0828019380569458,
-0.04801162704825401,
0.029964936897158623,
-0.021473752334713936,
0.026400933042168617,
-0.08198835700750351,
-0.03023359552025795,
0.13558794558048248,
0.20455136895179749,
-0.28272297978401184,
0.12395669519901276,
0.42209771275520325,
-0.033097364008426666,
0.09618926048278809,
0.026278669014573097,
0.2615511417388916,
-0.0534207858145237,
0.17466245591640472,
0.04105694591999054,
0.016864243894815445,
-0.04344846308231354,
0.2639884054660797,
0.09460699558258057,
0.08114752918481827,
0.11606074124574661,
-0.12007065117359161,
0.04641939699649811,
0.13107267022132874,
0.37461331486701965,
0.10712598264217377,
0.06603636592626572,
0.10081680864095688,
0.21656906604766846,
-0.2253754884004593,
-0.1409861445426941,
0.3062989413738251,
-0.102775439620018,
-0.02090821973979473,
0.02287697233259678,
-0.06457333266735077,
0.07485668361186981,
0.14801688492298126,
-0.0637497752904892,
-0.3180233836174011,
0.13867323100566864,
-0.07772649079561234,
-0.18301387131214142,
-0.6274290084838867,
-0.23228102922439575,
0.05465099960565567,
-0.017658982425928116,
0.08908950537443161,
-0.0836968719959259,
-0.10924681276082993,
0.20269767940044403,
-0.035025905817747116,
-0.23063597083091736,
0.6797713041305542,
-0.06164822727441788,
0.04469691216945648,
-0.0551760196685791,
0.2520875334739685,
-0.21323366463184357,
-0.07124578207731247,
-0.1705527901649475,
-0.0018401573179289699,
0.1578255295753479,
0.2109287828207016,
-0.47010332345962524,
-0.14399264752864838,
-0.0009011016809381545,
0.018943987786769867,
-0.059177469462156296,
0.0006441868026740849,
0.06300180405378342,
-0.037797171622514725,
0.29405099153518677,
0.10967087000608444,
-0.08980157971382141,
-0.1984422653913498,
0.21691618859767914,
-0.007181836292147636,
-0.020038271322846413,
-0.24845373630523682,
0.004518008325248957,
0.10421203076839447,
-0.10660920292139053,
0.11462518572807312,
-0.5152727365493774,
0.04132748395204544,
0.2593999207019806,
0.38845986127853394,
-0.10852847993373871,
-0.22299636900424957,
0.0836436077952385,
-0.32754483819007874,
0.5394181609153748,
0.08417349308729172,
0.19058305025100708,
-0.118047334253788,
-0.2930145859718323,
-0.2950972616672516,
0.005453429184854031,
-0.16959351301193237,
-0.36802420020103455,
-0.12039460241794586,
0.30591779947280884,
0.3928033113479614,
0.24459435045719147,
0.11688076704740524,
-0.25355294346809387,
-0.12980464100837708,
0.2650587558746338,
-0.14386354386806488,
-0.15893062949180603,
-0.0732821449637413,
0.04924171045422554,
-0.22518867254257202,
-0.1773684024810791,
0.08320578187704086,
-0.019432324916124344,
0.07522563636302948,
-0.22762125730514526,
-0.14735786616802216,
0.3186533749103546,
-0.43477800488471985,
0.259577214717865,
0.025894859805703163,
0.5472239255905151,
0.029132409021258354,
-0.04227191582322121,
-0.16555611789226532,
0.2228381633758545,
-0.045000120997428894,
0.4914209246635437,
0.06162133067846298,
0.2285093516111374,
-0.21550017595291138,
-0.3188492953777313,
-0.34525811672210693,
0.6317014098167419,
0.03209638595581055,
-0.05510024353861809,
-0.24908003211021423,
-0.05867017060518265,
-0.22949935495853424,
0.29232847690582275,
-0.11924499273300171,
0.06629249453544617,
-0.036651838570833206,
0.18673349916934967,
-0.35817015171051025,
-0.23673127591609955,
0.3384189307689667,
-0.42113202810287476,
-0.3356802463531494,
-0.189715176820755,
0.06820890307426453,
-0.14943398535251617,
0.2929893136024475,
-0.10573438555002213,
-0.015353714115917683,
0.26347067952156067,
-0.13522662222385406,
-0.01672343537211418,
0.0001438934268662706,
0.059857141226530075,
0.15739844739437103,
-0.24589890241622925,
-0.40447208285331726,
-0.19432991743087769,
-0.06032519042491913,
-0.37993162870407104,
-0.24929244816303253
] |
https://github.com/huggingface/datasets/issues/1994
|
not being able to get wikipedia es language
|
Thank you so much @jonatasgrosman , I greatly appreciate your help with them.
Yes, I unfortunately does not have access to a good resource and need it for my
research. I greatly appreciate @lhoestq your help with uploading the processed datasets in huggingface datasets. This would be really helpful for some users like me with not access to high-memory GPU resources.
thank you both so much again.
On Sat, Mar 6, 2021 at 12:55 AM Jonatas Grosman <notifications@github.com>
wrote:
> Hi @dorost1234 <https://github.com/dorost1234>, I think I can help you a
> little. I’ve processed some Wikipedia datasets (Spanish inclusive) using
> the HF/datasets library during recent research.
>
> @lhoestq <https://github.com/lhoestq> Could you help me to upload these
> preprocessed datasets to Huggingface's repositories? To be more precise,
> I've built datasets from the following languages using the 20201201 dumps:
> Spanish, Portuguese, Russian, French, Japanese, Chinese, and Turkish.
> Process these datasets have high costs that most of the community can't
> afford. I think these preprocessed datasets I have could be helpful for
> someone without access to high-resource machines to process Wikipedia's
> dumps like @dorost1234 <https://github.com/dorost1234>
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/1994#issuecomment-791798195>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMWMK5GFJFU3ACCJFUDTCFVNZANCNFSM4YUZIF4A>
> .
>
|
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
| 222
|
not being able to get wikipedia es language
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
Thank you so much @jonatasgrosman , I greatly appreciate your help with them.
Yes, I unfortunately does not have access to a good resource and need it for my
research. I greatly appreciate @lhoestq your help with uploading the processed datasets in huggingface datasets. This would be really helpful for some users like me with not access to high-memory GPU resources.
thank you both so much again.
On Sat, Mar 6, 2021 at 12:55 AM Jonatas Grosman <notifications@github.com>
wrote:
> Hi @dorost1234 <https://github.com/dorost1234>, I think I can help you a
> little. I’ve processed some Wikipedia datasets (Spanish inclusive) using
> the HF/datasets library during recent research.
>
> @lhoestq <https://github.com/lhoestq> Could you help me to upload these
> preprocessed datasets to Huggingface's repositories? To be more precise,
> I've built datasets from the following languages using the 20201201 dumps:
> Spanish, Portuguese, Russian, French, Japanese, Chinese, and Turkish.
> Process these datasets have high costs that most of the community can't
> afford. I think these preprocessed datasets I have could be helpful for
> someone without access to high-resource machines to process Wikipedia's
> dumps like @dorost1234 <https://github.com/dorost1234>
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/1994#issuecomment-791798195>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMWMK5GFJFU3ACCJFUDTCFVNZANCNFSM4YUZIF4A>
> .
>
|
[
-0.3421078324317932,
0.04719298332929611,
-0.10626477003097534,
0.06201732158660889,
0.20045480132102966,
0.17774426937103271,
0.17687499523162842,
0.34019631147384644,
0.13733309507369995,
0.0921180248260498,
0.41052311658859253,
0.33469316363334656,
0.016000792384147644,
0.30764591693878174,
0.11132048070430756,
-0.33708715438842773,
0.05565028265118599,
0.07522149384021759,
-0.1947193443775177,
-0.20017623901367188,
-0.13208411633968353,
0.10374307632446289,
-0.272518128156662,
-0.0701146200299263,
-0.14883527159690857,
0.10703807324171066,
0.12277764827013016,
-0.019669627770781517,
-0.19260172545909882,
-0.18620166182518005,
0.0680224820971489,
-0.03621345013380051,
0.22803393006324768,
0.10794322192668915,
-0.00010841459152288735,
0.08063174784183502,
0.5717446804046631,
-0.15838073194026947,
-0.45902180671691895,
-0.1303223818540573,
-0.0813634917140007,
-0.3462579846382141,
0.2564505338668823,
-0.3715756833553314,
-0.33478420972824097,
-0.025640562176704407,
0.31875452399253845,
-0.5857158899307251,
0.24128857254981995,
0.1479620337486267,
0.21826864778995514,
-0.07421045750379562,
0.3515351116657257,
-0.00488451449200511,
0.41059690713882446,
0.21860715746879578,
-0.03604930266737938,
-0.12430713325738907,
0.010663212276995182,
0.024965615943074226,
0.060617584735155106,
0.46184754371643066,
0.047285668551921844,
-0.11424703150987625,
0.30397289991378784,
-0.30949077010154724,
0.26568493247032166,
-0.37311577796936035,
0.42296865582466125,
0.25413089990615845,
1.0161634683609009,
-0.11970144510269165,
0.09952134639024734,
0.10506755858659744,
0.0040753912180662155,
0.12878157198429108,
0.24283616244792938,
0.20053640007972717,
-0.36427295207977295,
-0.0796794444322586,
0.11349359154701233,
-0.28304389119148254,
-0.335679292678833,
0.34555771946907043,
-0.10172826051712036,
0.5368958711624146,
0.10903763771057129,
0.14164365828037262,
-0.15097571909427643,
-0.18528833985328674,
0.07730194926261902,
-0.07077974826097488,
0.10307736694812775,
0.3541416823863983,
-0.09304514527320862,
0.13513508439064026,
0.24577893316745758,
0.1751321405172348,
0.04433978721499443,
-0.09479641169309616,
-0.27976489067077637,
0.19170106947422028,
0.36852073669433594,
0.046187154948711395,
0.022065309807658195,
0.03235389292240143,
0.3556637167930603,
-0.1849306970834732,
0.20503869652748108,
-0.030573051422834396,
0.007939324714243412,
0.06664763391017914,
-0.05862192437052727,
-0.33657580614089966,
-0.6453822255134583,
0.23251719772815704,
-0.0009587555541656911,
-0.13675111532211304,
0.1923419088125229,
0.1587262600660324,
-0.3540840446949005,
-0.2998669445514679,
-0.005748707335442305,
0.20172543823719025,
0.1522034853696823,
0.20511768758296967,
0.2833251357078552,
-0.0867256447672844,
-0.3417098820209503,
-0.3844313323497772,
-0.046640794724226,
0.28296369314193726,
-0.4593481719493866,
0.07805246859788895,
0.20936210453510284,
0.10678564757108688,
0.37506967782974243,
-0.035515718162059784,
-0.043999992311000824,
0.042526837438344955,
0.13077178597450256,
0.0788348987698555,
-0.13859976828098297,
0.15947602689266205,
0.1490192711353302,
0.24700047075748444,
0.19990430772304535,
-0.22246770560741425,
-0.0522187203168869,
0.0016838106093928218,
-0.09037464112043381,
-0.19051942229270935,
-0.18565542995929718,
0.17176082730293274,
0.12278037518262863,
0.10188641399145126,
0.04582488536834717,
0.3413788974285126,
0.17139941453933716,
-0.2258874475955963,
0.14366410672664642,
-0.00750997057184577,
-0.13457545638084412,
-0.09188759326934814,
0.3624598979949951,
0.3725726008415222,
-0.6563612222671509,
0.10404717922210693,
-0.04956433176994324,
0.18776701390743256,
0.14369991421699524,
-0.27950069308280945,
-0.28138816356658936,
0.4237997531890869,
-0.09352050721645355,
-0.10077238827943802,
0.3089188039302826,
-0.2708933353424072,
0.08159120380878448,
0.19684253633022308,
0.0673350989818573,
-0.28226202726364136,
0.23710165917873383,
-0.11235322058200836,
0.04229583963751793,
0.16245496273040771,
0.11410839110612869,
0.16634473204612732,
0.11646075546741486,
-0.0702253133058548,
-0.21967510879039764,
-0.12229474633932114,
-0.04315485805273056,
0.11727110296487808,
0.266544371843338,
-0.11957978457212448,
0.12490258365869522,
0.5266053676605225,
0.3261626362800598,
-0.2632543742656708,
0.07642466574907303,
0.5432159304618835,
-0.3122917115688324,
0.08065870404243469,
0.1918921172618866,
-0.055475279688835144,
-0.04989950731396675,
0.18091364204883575,
-0.23919570446014404,
0.40391120314598083,
0.07905687391757965,
-0.005385706201195717,
-0.2668082118034363,
-0.053028181195259094,
-0.23602977395057678,
-0.42836418747901917,
0.21149270236492157,
0.0466558039188385,
-0.035518828779459,
0.2530866265296936,
0.052935536950826645,
-0.09003455936908722,
-0.2782233655452728,
-0.13893696665763855,
-0.8122120499610901,
0.2934665381908417,
-0.28607645630836487,
-0.080081045627594,
-0.0875597819685936,
0.02025469020009041,
0.0639520063996315,
-0.12363416701555252,
-0.2867794334888458,
0.10091570764780045,
0.18732792139053345,
0.03720070794224739,
-0.011949371546506882,
0.1644933968782425,
0.12202993780374527,
-0.2648279070854187,
0.3166707158088684,
0.30542314052581787,
0.11994064599275589,
0.017968744039535522,
-0.2019144892692566,
0.11080726981163025,
0.04773256182670593,
0.3355245888233185,
0.07278717309236526,
0.268589049577713,
0.18518298864364624,
0.1680481880903244,
-0.15628185868263245,
-0.159163698554039,
0.3021559417247772,
0.4226677715778351,
0.18189804255962372,
-0.1457035094499588,
0.03703934699296951,
0.07721482217311859,
0.4515743851661682,
0.104843370616436,
-0.09222353249788284,
-0.12637142837047577,
-0.30541104078292847,
-0.05947883427143097,
0.4833451509475708,
-0.17912422120571136,
-0.01602180488407612,
0.27910545468330383,
-0.016197603195905685,
0.0771193876862526,
-0.15118470788002014,
-0.11755307018756866,
0.44462260603904724,
0.07232657074928284,
0.5178593397140503,
-0.025720220059156418,
-0.12441618740558624,
-0.18681888282299042,
-0.19084171950817108,
-0.2879425585269928,
-0.12341467291116714,
0.2847411632537842,
-0.31246840953826904,
0.2768913507461548,
-0.4178836941719055,
-0.5642529129981995,
-0.20843029022216797,
0.4299703538417816,
-0.3480244576931,
-0.3430693745613098,
-0.06800902634859085,
0.07788634300231934,
-0.02291020378470421,
0.2500196695327759,
0.10721097886562347,
-0.03554370626807213,
0.23204532265663147,
0.007473080884665251,
-0.22167707979679108,
-0.5956379175186157,
-0.43564069271087646,
0.032663337886333466,
0.28232595324516296,
0.03737654909491539,
0.12723003327846527,
-0.15690569579601288,
-0.06724125891923904,
-0.14529554545879364,
-0.40219566226005554,
0.3414440155029297,
-0.08698386698961258,
-0.008463106118142605,
0.11665339022874832,
0.42721834778785706,
-0.19598135352134705,
-0.09505852311849594,
0.3098015785217285,
0.11520124971866608,
-0.14764967560768127,
-0.06926612555980682,
-0.084672711789608,
-0.06236201524734497,
-0.030823122709989548,
-0.43830224871635437,
-0.15058587491512299,
-0.3273385763168335,
-0.1820002794265747,
0.16898339986801147,
0.13323597609996796,
0.35230642557144165,
0.2645769715309143,
0.2091483473777771,
0.3283594250679016,
0.09546112269163132,
-0.09655710309743881,
-0.15933692455291748,
0.21701869368553162,
-0.3185729384422302,
-0.3167467415332794,
0.10404214262962341,
-0.14131318032741547,
0.23050709068775177,
0.11353979259729385,
-0.14633017778396606,
0.06803134083747864,
0.11597270518541336,
0.02005460299551487,
-0.10132098197937012,
0.32571718096733093,
0.7469015717506409,
-0.012623910792171955,
-0.0016660453984513879,
-0.09881129860877991,
0.047826457768678665,
0.03073797933757305,
-0.4368046224117279,
0.34731799364089966,
0.1777922809123993,
0.5277689695358276,
-0.07014810293912888,
0.7515990138053894,
0.11483553797006607,
0.11667937785387039,
0.1321658194065094,
-0.07526150345802307,
0.06618568301200867,
-0.27247294783592224,
-0.18846014142036438,
0.29278069734573364,
0.04032675176858902,
-0.3030898869037628,
0.3898434638977051,
-0.1277020126581192,
-0.259891152381897,
-0.43877750635147095,
0.07504691183567047,
0.0015997649170458317,
-0.24473899602890015,
-0.0376066118478775,
-0.37500426173210144,
0.383912056684494,
-0.09530312567949295,
0.3992140293121338,
-0.08024558424949646,
-0.07314207404851913,
0.05920083448290825,
0.2196865677833557,
-0.0982464998960495,
0.13422450423240662,
-0.17309798300266266,
-0.2497503161430359,
-0.39932578802108765,
0.2461433708667755,
0.0012105636997148395,
0.14361701905727386,
-0.29275277256965637,
0.007917716167867184,
0.28317421674728394,
0.008745018392801285,
0.5200986266136169,
-0.6470431089401245,
-0.0973823070526123,
0.33533909916877747,
0.19218088686466217,
-0.6571789383888245,
-0.14138785004615784,
-0.18767713010311127,
0.2771165668964386,
0.32850176095962524,
-0.047846969217061996,
-0.33222001791000366,
-0.1513580083847046,
0.2680891156196594,
0.04856918752193451,
-0.09909957647323608,
0.05151959881186485,
-0.2417593151330948,
-0.1433180272579193,
-0.33531591296195984,
-0.06578189134597778,
-0.09969448298215866,
0.13510790467262268,
0.10023964196443558,
0.21499595046043396,
0.08130296319723129,
0.02621845342218876,
-0.1448788344860077,
0.20501364767551422,
0.12260513007640839,
0.1383640021085739,
-0.2560672461986542,
0.10371154546737671,
0.48064786195755005,
-0.026589175686240196,
-0.10802411288022995,
0.18511314690113068,
-0.20795366168022156,
0.17263789474964142,
-0.21509230136871338,
0.14550882577896118,
0.16040974855422974,
-0.12064620852470398,
-0.23936393857002258,
0.03647935017943382,
-0.2542997896671295,
-0.04646565392613411,
0.05284343287348747,
0.20871615409851074,
0.08100172877311707,
-0.12740002572536469,
-0.45757803320884705,
0.5609194040298462,
0.18852916359901428,
-0.07297052443027496,
0.2990112602710724,
-0.01566607505083084,
-0.4306361675262451,
0.405288964509964,
0.432944118976593,
0.8635654449462891,
0.02991594187915325,
0.013998446986079216,
0.17142035067081451,
0.16713599860668182,
0.6254858374595642,
-0.5466775894165039,
0.209164097905159,
-0.2812899351119995,
0.31988710165023804,
-0.09525495022535324,
0.06537692993879318,
0.39573410153388977,
0.14318527281284332,
-0.22216999530792236,
0.35360684990882874,
-0.01738503947854042,
0.07415813952684402,
0.05659619718790054,
0.37671759724617004,
0.12653326988220215,
-0.30785268545150757,
-0.11752994358539581,
0.1213967576622963,
-0.18236272037029266,
0.2824692726135254,
-0.24982164800167084,
-0.012538416311144829,
-0.014506855048239231,
-0.24492387473583221,
-0.41069939732551575,
0.09119254350662231,
-0.22418341040611267,
0.46085646748542786,
-0.342303603887558,
-0.4593048691749573,
0.2506963014602661,
0.22680921852588654,
0.23546139895915985,
0.3696662187576294,
-0.3735496699810028,
0.2001676708459854,
0.015004470013082027,
-0.2361069768667221,
-0.07618890702724457,
0.041097577661275864,
0.3866560161113739,
-0.19228112697601318,
-0.3922683000564575,
0.21181191504001617,
-0.1738397777080536,
-0.09788365662097931,
-0.29128584265708923,
-0.31771931052207947,
0.31883278489112854,
0.25020185112953186,
0.12403402477502823,
0.1725907027721405,
-0.08605587482452393,
-0.13386200368404388,
0.11980458348989487,
-0.28414207696914673,
0.010103470645844936,
0.008689327165484428,
0.08827563375234604,
-0.08681789040565491,
0.0309087336063385,
0.257151335477829,
0.18761812150478363,
0.01726139523088932,
0.5952089428901672,
0.3785049021244049,
-0.21947410702705383,
-0.2659061551094055,
0.17860892415046692,
-0.22924327850341797,
-0.060689885169267654,
-0.2634166181087494,
0.15080633759498596,
0.092317596077919,
-0.057126615196466446,
0.1029210165143013,
-0.015744367614388466,
-0.14090988039970398,
-0.0071756960824131966,
-0.2680378556251526,
-0.02095889113843441,
0.02229992486536503,
-0.16380932927131653,
-0.001558042480610311,
0.1883055418729782,
0.1332460343837738,
0.28536418080329895,
-0.23602212965488434,
-0.279116690158844,
-0.23883521556854248,
-0.022319765761494637,
0.04532048478722572,
0.41371288895606995,
-0.016639666631817818,
-0.23604744672775269,
-0.03873738646507263,
0.14523173868656158,
-0.23010562360286713,
-0.2452724575996399,
-0.17255043983459473,
-0.04683474078774452,
0.12900730967521667,
-0.03978543356060982,
-0.18745683133602142,
0.13585445284843445,
-0.34036070108413696,
-0.29250553250312805,
-0.20412884652614594,
-0.13163794577121735,
-0.12930701673030853,
-0.024286020547151566,
0.2222883105278015,
-0.10420877486467361,
0.34498995542526245,
-0.28780093789100647,
0.08798287808895111,
0.0348752997815609,
0.2938302755355835,
0.051171258091926575,
0.24954818189144135,
0.4168609082698822,
-0.17646756768226624,
-0.5602079033851624,
0.18304453790187836,
-0.22114601731300354,
0.1743837296962738,
0.16332216560840607,
-0.0828019380569458,
-0.04801162704825401,
0.029964936897158623,
-0.021473752334713936,
0.026400933042168617,
-0.08198835700750351,
-0.03023359552025795,
0.13558794558048248,
0.20455136895179749,
-0.28272297978401184,
0.12395669519901276,
0.42209771275520325,
-0.033097364008426666,
0.09618926048278809,
0.026278669014573097,
0.2615511417388916,
-0.0534207858145237,
0.17466245591640472,
0.04105694591999054,
0.016864243894815445,
-0.04344846308231354,
0.2639884054660797,
0.09460699558258057,
0.08114752918481827,
0.11606074124574661,
-0.12007065117359161,
0.04641939699649811,
0.13107267022132874,
0.37461331486701965,
0.10712598264217377,
0.06603636592626572,
0.10081680864095688,
0.21656906604766846,
-0.2253754884004593,
-0.1409861445426941,
0.3062989413738251,
-0.102775439620018,
-0.02090821973979473,
0.02287697233259678,
-0.06457333266735077,
0.07485668361186981,
0.14801688492298126,
-0.0637497752904892,
-0.3180233836174011,
0.13867323100566864,
-0.07772649079561234,
-0.18301387131214142,
-0.6274290084838867,
-0.23228102922439575,
0.05465099960565567,
-0.017658982425928116,
0.08908950537443161,
-0.0836968719959259,
-0.10924681276082993,
0.20269767940044403,
-0.035025905817747116,
-0.23063597083091736,
0.6797713041305542,
-0.06164822727441788,
0.04469691216945648,
-0.0551760196685791,
0.2520875334739685,
-0.21323366463184357,
-0.07124578207731247,
-0.1705527901649475,
-0.0018401573179289699,
0.1578255295753479,
0.2109287828207016,
-0.47010332345962524,
-0.14399264752864838,
-0.0009011016809381545,
0.018943987786769867,
-0.059177469462156296,
0.0006441868026740849,
0.06300180405378342,
-0.037797171622514725,
0.29405099153518677,
0.10967087000608444,
-0.08980157971382141,
-0.1984422653913498,
0.21691618859767914,
-0.007181836292147636,
-0.020038271322846413,
-0.24845373630523682,
0.004518008325248957,
0.10421203076839447,
-0.10660920292139053,
0.11462518572807312,
-0.5152727365493774,
0.04132748395204544,
0.2593999207019806,
0.38845986127853394,
-0.10852847993373871,
-0.22299636900424957,
0.0836436077952385,
-0.32754483819007874,
0.5394181609153748,
0.08417349308729172,
0.19058305025100708,
-0.118047334253788,
-0.2930145859718323,
-0.2950972616672516,
0.005453429184854031,
-0.16959351301193237,
-0.36802420020103455,
-0.12039460241794586,
0.30591779947280884,
0.3928033113479614,
0.24459435045719147,
0.11688076704740524,
-0.25355294346809387,
-0.12980464100837708,
0.2650587558746338,
-0.14386354386806488,
-0.15893062949180603,
-0.0732821449637413,
0.04924171045422554,
-0.22518867254257202,
-0.1773684024810791,
0.08320578187704086,
-0.019432324916124344,
0.07522563636302948,
-0.22762125730514526,
-0.14735786616802216,
0.3186533749103546,
-0.43477800488471985,
0.259577214717865,
0.025894859805703163,
0.5472239255905151,
0.029132409021258354,
-0.04227191582322121,
-0.16555611789226532,
0.2228381633758545,
-0.045000120997428894,
0.4914209246635437,
0.06162133067846298,
0.2285093516111374,
-0.21550017595291138,
-0.3188492953777313,
-0.34525811672210693,
0.6317014098167419,
0.03209638595581055,
-0.05510024353861809,
-0.24908003211021423,
-0.05867017060518265,
-0.22949935495853424,
0.29232847690582275,
-0.11924499273300171,
0.06629249453544617,
-0.036651838570833206,
0.18673349916934967,
-0.35817015171051025,
-0.23673127591609955,
0.3384189307689667,
-0.42113202810287476,
-0.3356802463531494,
-0.189715176820755,
0.06820890307426453,
-0.14943398535251617,
0.2929893136024475,
-0.10573438555002213,
-0.015353714115917683,
0.26347067952156067,
-0.13522662222385406,
-0.01672343537211418,
0.0001438934268662706,
0.059857141226530075,
0.15739844739437103,
-0.24589890241622925,
-0.40447208285331726,
-0.19432991743087769,
-0.06032519042491913,
-0.37993162870407104,
-0.24929244816303253
] |
https://github.com/huggingface/datasets/issues/1994
|
not being able to get wikipedia es language
|
Hi @dorost1234, so sorry, but looking at my files here, I figure out that I've preprocessed files using the HF/datasets for all the languages previously listed by me (Portuguese, Russian, French, Japanese, Chinese, and Turkish) except the Spanish (on my tests I've used the [wikicorpus](https://www.cs.upc.edu/~nlp/wikicorpus/) instead).
Only with the Spanish Wikipedia's dump, I had the same `KeyError: '000nbsp'` problem already reported here https://github.com/huggingface/datasets/issues/577
So nowadays, even with access to a high resource machine, you couldn't be able to get Wikipedia's Spanish data using the HF/datasets :(
|
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
| 86
|
not being able to get wikipedia es language
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
Hi @dorost1234, so sorry, but looking at my files here, I figure out that I've preprocessed files using the HF/datasets for all the languages previously listed by me (Portuguese, Russian, French, Japanese, Chinese, and Turkish) except the Spanish (on my tests I've used the [wikicorpus](https://www.cs.upc.edu/~nlp/wikicorpus/) instead).
Only with the Spanish Wikipedia's dump, I had the same `KeyError: '000nbsp'` problem already reported here https://github.com/huggingface/datasets/issues/577
So nowadays, even with access to a high resource machine, you couldn't be able to get Wikipedia's Spanish data using the HF/datasets :(
|
[
-0.3421078324317932,
0.04719298332929611,
-0.10626477003097534,
0.06201732158660889,
0.20045480132102966,
0.17774426937103271,
0.17687499523162842,
0.34019631147384644,
0.13733309507369995,
0.0921180248260498,
0.41052311658859253,
0.33469316363334656,
0.016000792384147644,
0.30764591693878174,
0.11132048070430756,
-0.33708715438842773,
0.05565028265118599,
0.07522149384021759,
-0.1947193443775177,
-0.20017623901367188,
-0.13208411633968353,
0.10374307632446289,
-0.272518128156662,
-0.0701146200299263,
-0.14883527159690857,
0.10703807324171066,
0.12277764827013016,
-0.019669627770781517,
-0.19260172545909882,
-0.18620166182518005,
0.0680224820971489,
-0.03621345013380051,
0.22803393006324768,
0.10794322192668915,
-0.00010841459152288735,
0.08063174784183502,
0.5717446804046631,
-0.15838073194026947,
-0.45902180671691895,
-0.1303223818540573,
-0.0813634917140007,
-0.3462579846382141,
0.2564505338668823,
-0.3715756833553314,
-0.33478420972824097,
-0.025640562176704407,
0.31875452399253845,
-0.5857158899307251,
0.24128857254981995,
0.1479620337486267,
0.21826864778995514,
-0.07421045750379562,
0.3515351116657257,
-0.00488451449200511,
0.41059690713882446,
0.21860715746879578,
-0.03604930266737938,
-0.12430713325738907,
0.010663212276995182,
0.024965615943074226,
0.060617584735155106,
0.46184754371643066,
0.047285668551921844,
-0.11424703150987625,
0.30397289991378784,
-0.30949077010154724,
0.26568493247032166,
-0.37311577796936035,
0.42296865582466125,
0.25413089990615845,
1.0161634683609009,
-0.11970144510269165,
0.09952134639024734,
0.10506755858659744,
0.0040753912180662155,
0.12878157198429108,
0.24283616244792938,
0.20053640007972717,
-0.36427295207977295,
-0.0796794444322586,
0.11349359154701233,
-0.28304389119148254,
-0.335679292678833,
0.34555771946907043,
-0.10172826051712036,
0.5368958711624146,
0.10903763771057129,
0.14164365828037262,
-0.15097571909427643,
-0.18528833985328674,
0.07730194926261902,
-0.07077974826097488,
0.10307736694812775,
0.3541416823863983,
-0.09304514527320862,
0.13513508439064026,
0.24577893316745758,
0.1751321405172348,
0.04433978721499443,
-0.09479641169309616,
-0.27976489067077637,
0.19170106947422028,
0.36852073669433594,
0.046187154948711395,
0.022065309807658195,
0.03235389292240143,
0.3556637167930603,
-0.1849306970834732,
0.20503869652748108,
-0.030573051422834396,
0.007939324714243412,
0.06664763391017914,
-0.05862192437052727,
-0.33657580614089966,
-0.6453822255134583,
0.23251719772815704,
-0.0009587555541656911,
-0.13675111532211304,
0.1923419088125229,
0.1587262600660324,
-0.3540840446949005,
-0.2998669445514679,
-0.005748707335442305,
0.20172543823719025,
0.1522034853696823,
0.20511768758296967,
0.2833251357078552,
-0.0867256447672844,
-0.3417098820209503,
-0.3844313323497772,
-0.046640794724226,
0.28296369314193726,
-0.4593481719493866,
0.07805246859788895,
0.20936210453510284,
0.10678564757108688,
0.37506967782974243,
-0.035515718162059784,
-0.043999992311000824,
0.042526837438344955,
0.13077178597450256,
0.0788348987698555,
-0.13859976828098297,
0.15947602689266205,
0.1490192711353302,
0.24700047075748444,
0.19990430772304535,
-0.22246770560741425,
-0.0522187203168869,
0.0016838106093928218,
-0.09037464112043381,
-0.19051942229270935,
-0.18565542995929718,
0.17176082730293274,
0.12278037518262863,
0.10188641399145126,
0.04582488536834717,
0.3413788974285126,
0.17139941453933716,
-0.2258874475955963,
0.14366410672664642,
-0.00750997057184577,
-0.13457545638084412,
-0.09188759326934814,
0.3624598979949951,
0.3725726008415222,
-0.6563612222671509,
0.10404717922210693,
-0.04956433176994324,
0.18776701390743256,
0.14369991421699524,
-0.27950069308280945,
-0.28138816356658936,
0.4237997531890869,
-0.09352050721645355,
-0.10077238827943802,
0.3089188039302826,
-0.2708933353424072,
0.08159120380878448,
0.19684253633022308,
0.0673350989818573,
-0.28226202726364136,
0.23710165917873383,
-0.11235322058200836,
0.04229583963751793,
0.16245496273040771,
0.11410839110612869,
0.16634473204612732,
0.11646075546741486,
-0.0702253133058548,
-0.21967510879039764,
-0.12229474633932114,
-0.04315485805273056,
0.11727110296487808,
0.266544371843338,
-0.11957978457212448,
0.12490258365869522,
0.5266053676605225,
0.3261626362800598,
-0.2632543742656708,
0.07642466574907303,
0.5432159304618835,
-0.3122917115688324,
0.08065870404243469,
0.1918921172618866,
-0.055475279688835144,
-0.04989950731396675,
0.18091364204883575,
-0.23919570446014404,
0.40391120314598083,
0.07905687391757965,
-0.005385706201195717,
-0.2668082118034363,
-0.053028181195259094,
-0.23602977395057678,
-0.42836418747901917,
0.21149270236492157,
0.0466558039188385,
-0.035518828779459,
0.2530866265296936,
0.052935536950826645,
-0.09003455936908722,
-0.2782233655452728,
-0.13893696665763855,
-0.8122120499610901,
0.2934665381908417,
-0.28607645630836487,
-0.080081045627594,
-0.0875597819685936,
0.02025469020009041,
0.0639520063996315,
-0.12363416701555252,
-0.2867794334888458,
0.10091570764780045,
0.18732792139053345,
0.03720070794224739,
-0.011949371546506882,
0.1644933968782425,
0.12202993780374527,
-0.2648279070854187,
0.3166707158088684,
0.30542314052581787,
0.11994064599275589,
0.017968744039535522,
-0.2019144892692566,
0.11080726981163025,
0.04773256182670593,
0.3355245888233185,
0.07278717309236526,
0.268589049577713,
0.18518298864364624,
0.1680481880903244,
-0.15628185868263245,
-0.159163698554039,
0.3021559417247772,
0.4226677715778351,
0.18189804255962372,
-0.1457035094499588,
0.03703934699296951,
0.07721482217311859,
0.4515743851661682,
0.104843370616436,
-0.09222353249788284,
-0.12637142837047577,
-0.30541104078292847,
-0.05947883427143097,
0.4833451509475708,
-0.17912422120571136,
-0.01602180488407612,
0.27910545468330383,
-0.016197603195905685,
0.0771193876862526,
-0.15118470788002014,
-0.11755307018756866,
0.44462260603904724,
0.07232657074928284,
0.5178593397140503,
-0.025720220059156418,
-0.12441618740558624,
-0.18681888282299042,
-0.19084171950817108,
-0.2879425585269928,
-0.12341467291116714,
0.2847411632537842,
-0.31246840953826904,
0.2768913507461548,
-0.4178836941719055,
-0.5642529129981995,
-0.20843029022216797,
0.4299703538417816,
-0.3480244576931,
-0.3430693745613098,
-0.06800902634859085,
0.07788634300231934,
-0.02291020378470421,
0.2500196695327759,
0.10721097886562347,
-0.03554370626807213,
0.23204532265663147,
0.007473080884665251,
-0.22167707979679108,
-0.5956379175186157,
-0.43564069271087646,
0.032663337886333466,
0.28232595324516296,
0.03737654909491539,
0.12723003327846527,
-0.15690569579601288,
-0.06724125891923904,
-0.14529554545879364,
-0.40219566226005554,
0.3414440155029297,
-0.08698386698961258,
-0.008463106118142605,
0.11665339022874832,
0.42721834778785706,
-0.19598135352134705,
-0.09505852311849594,
0.3098015785217285,
0.11520124971866608,
-0.14764967560768127,
-0.06926612555980682,
-0.084672711789608,
-0.06236201524734497,
-0.030823122709989548,
-0.43830224871635437,
-0.15058587491512299,
-0.3273385763168335,
-0.1820002794265747,
0.16898339986801147,
0.13323597609996796,
0.35230642557144165,
0.2645769715309143,
0.2091483473777771,
0.3283594250679016,
0.09546112269163132,
-0.09655710309743881,
-0.15933692455291748,
0.21701869368553162,
-0.3185729384422302,
-0.3167467415332794,
0.10404214262962341,
-0.14131318032741547,
0.23050709068775177,
0.11353979259729385,
-0.14633017778396606,
0.06803134083747864,
0.11597270518541336,
0.02005460299551487,
-0.10132098197937012,
0.32571718096733093,
0.7469015717506409,
-0.012623910792171955,
-0.0016660453984513879,
-0.09881129860877991,
0.047826457768678665,
0.03073797933757305,
-0.4368046224117279,
0.34731799364089966,
0.1777922809123993,
0.5277689695358276,
-0.07014810293912888,
0.7515990138053894,
0.11483553797006607,
0.11667937785387039,
0.1321658194065094,
-0.07526150345802307,
0.06618568301200867,
-0.27247294783592224,
-0.18846014142036438,
0.29278069734573364,
0.04032675176858902,
-0.3030898869037628,
0.3898434638977051,
-0.1277020126581192,
-0.259891152381897,
-0.43877750635147095,
0.07504691183567047,
0.0015997649170458317,
-0.24473899602890015,
-0.0376066118478775,
-0.37500426173210144,
0.383912056684494,
-0.09530312567949295,
0.3992140293121338,
-0.08024558424949646,
-0.07314207404851913,
0.05920083448290825,
0.2196865677833557,
-0.0982464998960495,
0.13422450423240662,
-0.17309798300266266,
-0.2497503161430359,
-0.39932578802108765,
0.2461433708667755,
0.0012105636997148395,
0.14361701905727386,
-0.29275277256965637,
0.007917716167867184,
0.28317421674728394,
0.008745018392801285,
0.5200986266136169,
-0.6470431089401245,
-0.0973823070526123,
0.33533909916877747,
0.19218088686466217,
-0.6571789383888245,
-0.14138785004615784,
-0.18767713010311127,
0.2771165668964386,
0.32850176095962524,
-0.047846969217061996,
-0.33222001791000366,
-0.1513580083847046,
0.2680891156196594,
0.04856918752193451,
-0.09909957647323608,
0.05151959881186485,
-0.2417593151330948,
-0.1433180272579193,
-0.33531591296195984,
-0.06578189134597778,
-0.09969448298215866,
0.13510790467262268,
0.10023964196443558,
0.21499595046043396,
0.08130296319723129,
0.02621845342218876,
-0.1448788344860077,
0.20501364767551422,
0.12260513007640839,
0.1383640021085739,
-0.2560672461986542,
0.10371154546737671,
0.48064786195755005,
-0.026589175686240196,
-0.10802411288022995,
0.18511314690113068,
-0.20795366168022156,
0.17263789474964142,
-0.21509230136871338,
0.14550882577896118,
0.16040974855422974,
-0.12064620852470398,
-0.23936393857002258,
0.03647935017943382,
-0.2542997896671295,
-0.04646565392613411,
0.05284343287348747,
0.20871615409851074,
0.08100172877311707,
-0.12740002572536469,
-0.45757803320884705,
0.5609194040298462,
0.18852916359901428,
-0.07297052443027496,
0.2990112602710724,
-0.01566607505083084,
-0.4306361675262451,
0.405288964509964,
0.432944118976593,
0.8635654449462891,
0.02991594187915325,
0.013998446986079216,
0.17142035067081451,
0.16713599860668182,
0.6254858374595642,
-0.5466775894165039,
0.209164097905159,
-0.2812899351119995,
0.31988710165023804,
-0.09525495022535324,
0.06537692993879318,
0.39573410153388977,
0.14318527281284332,
-0.22216999530792236,
0.35360684990882874,
-0.01738503947854042,
0.07415813952684402,
0.05659619718790054,
0.37671759724617004,
0.12653326988220215,
-0.30785268545150757,
-0.11752994358539581,
0.1213967576622963,
-0.18236272037029266,
0.2824692726135254,
-0.24982164800167084,
-0.012538416311144829,
-0.014506855048239231,
-0.24492387473583221,
-0.41069939732551575,
0.09119254350662231,
-0.22418341040611267,
0.46085646748542786,
-0.342303603887558,
-0.4593048691749573,
0.2506963014602661,
0.22680921852588654,
0.23546139895915985,
0.3696662187576294,
-0.3735496699810028,
0.2001676708459854,
0.015004470013082027,
-0.2361069768667221,
-0.07618890702724457,
0.041097577661275864,
0.3866560161113739,
-0.19228112697601318,
-0.3922683000564575,
0.21181191504001617,
-0.1738397777080536,
-0.09788365662097931,
-0.29128584265708923,
-0.31771931052207947,
0.31883278489112854,
0.25020185112953186,
0.12403402477502823,
0.1725907027721405,
-0.08605587482452393,
-0.13386200368404388,
0.11980458348989487,
-0.28414207696914673,
0.010103470645844936,
0.008689327165484428,
0.08827563375234604,
-0.08681789040565491,
0.0309087336063385,
0.257151335477829,
0.18761812150478363,
0.01726139523088932,
0.5952089428901672,
0.3785049021244049,
-0.21947410702705383,
-0.2659061551094055,
0.17860892415046692,
-0.22924327850341797,
-0.060689885169267654,
-0.2634166181087494,
0.15080633759498596,
0.092317596077919,
-0.057126615196466446,
0.1029210165143013,
-0.015744367614388466,
-0.14090988039970398,
-0.0071756960824131966,
-0.2680378556251526,
-0.02095889113843441,
0.02229992486536503,
-0.16380932927131653,
-0.001558042480610311,
0.1883055418729782,
0.1332460343837738,
0.28536418080329895,
-0.23602212965488434,
-0.279116690158844,
-0.23883521556854248,
-0.022319765761494637,
0.04532048478722572,
0.41371288895606995,
-0.016639666631817818,
-0.23604744672775269,
-0.03873738646507263,
0.14523173868656158,
-0.23010562360286713,
-0.2452724575996399,
-0.17255043983459473,
-0.04683474078774452,
0.12900730967521667,
-0.03978543356060982,
-0.18745683133602142,
0.13585445284843445,
-0.34036070108413696,
-0.29250553250312805,
-0.20412884652614594,
-0.13163794577121735,
-0.12930701673030853,
-0.024286020547151566,
0.2222883105278015,
-0.10420877486467361,
0.34498995542526245,
-0.28780093789100647,
0.08798287808895111,
0.0348752997815609,
0.2938302755355835,
0.051171258091926575,
0.24954818189144135,
0.4168609082698822,
-0.17646756768226624,
-0.5602079033851624,
0.18304453790187836,
-0.22114601731300354,
0.1743837296962738,
0.16332216560840607,
-0.0828019380569458,
-0.04801162704825401,
0.029964936897158623,
-0.021473752334713936,
0.026400933042168617,
-0.08198835700750351,
-0.03023359552025795,
0.13558794558048248,
0.20455136895179749,
-0.28272297978401184,
0.12395669519901276,
0.42209771275520325,
-0.033097364008426666,
0.09618926048278809,
0.026278669014573097,
0.2615511417388916,
-0.0534207858145237,
0.17466245591640472,
0.04105694591999054,
0.016864243894815445,
-0.04344846308231354,
0.2639884054660797,
0.09460699558258057,
0.08114752918481827,
0.11606074124574661,
-0.12007065117359161,
0.04641939699649811,
0.13107267022132874,
0.37461331486701965,
0.10712598264217377,
0.06603636592626572,
0.10081680864095688,
0.21656906604766846,
-0.2253754884004593,
-0.1409861445426941,
0.3062989413738251,
-0.102775439620018,
-0.02090821973979473,
0.02287697233259678,
-0.06457333266735077,
0.07485668361186981,
0.14801688492298126,
-0.0637497752904892,
-0.3180233836174011,
0.13867323100566864,
-0.07772649079561234,
-0.18301387131214142,
-0.6274290084838867,
-0.23228102922439575,
0.05465099960565567,
-0.017658982425928116,
0.08908950537443161,
-0.0836968719959259,
-0.10924681276082993,
0.20269767940044403,
-0.035025905817747116,
-0.23063597083091736,
0.6797713041305542,
-0.06164822727441788,
0.04469691216945648,
-0.0551760196685791,
0.2520875334739685,
-0.21323366463184357,
-0.07124578207731247,
-0.1705527901649475,
-0.0018401573179289699,
0.1578255295753479,
0.2109287828207016,
-0.47010332345962524,
-0.14399264752864838,
-0.0009011016809381545,
0.018943987786769867,
-0.059177469462156296,
0.0006441868026740849,
0.06300180405378342,
-0.037797171622514725,
0.29405099153518677,
0.10967087000608444,
-0.08980157971382141,
-0.1984422653913498,
0.21691618859767914,
-0.007181836292147636,
-0.020038271322846413,
-0.24845373630523682,
0.004518008325248957,
0.10421203076839447,
-0.10660920292139053,
0.11462518572807312,
-0.5152727365493774,
0.04132748395204544,
0.2593999207019806,
0.38845986127853394,
-0.10852847993373871,
-0.22299636900424957,
0.0836436077952385,
-0.32754483819007874,
0.5394181609153748,
0.08417349308729172,
0.19058305025100708,
-0.118047334253788,
-0.2930145859718323,
-0.2950972616672516,
0.005453429184854031,
-0.16959351301193237,
-0.36802420020103455,
-0.12039460241794586,
0.30591779947280884,
0.3928033113479614,
0.24459435045719147,
0.11688076704740524,
-0.25355294346809387,
-0.12980464100837708,
0.2650587558746338,
-0.14386354386806488,
-0.15893062949180603,
-0.0732821449637413,
0.04924171045422554,
-0.22518867254257202,
-0.1773684024810791,
0.08320578187704086,
-0.019432324916124344,
0.07522563636302948,
-0.22762125730514526,
-0.14735786616802216,
0.3186533749103546,
-0.43477800488471985,
0.259577214717865,
0.025894859805703163,
0.5472239255905151,
0.029132409021258354,
-0.04227191582322121,
-0.16555611789226532,
0.2228381633758545,
-0.045000120997428894,
0.4914209246635437,
0.06162133067846298,
0.2285093516111374,
-0.21550017595291138,
-0.3188492953777313,
-0.34525811672210693,
0.6317014098167419,
0.03209638595581055,
-0.05510024353861809,
-0.24908003211021423,
-0.05867017060518265,
-0.22949935495853424,
0.29232847690582275,
-0.11924499273300171,
0.06629249453544617,
-0.036651838570833206,
0.18673349916934967,
-0.35817015171051025,
-0.23673127591609955,
0.3384189307689667,
-0.42113202810287476,
-0.3356802463531494,
-0.189715176820755,
0.06820890307426453,
-0.14943398535251617,
0.2929893136024475,
-0.10573438555002213,
-0.015353714115917683,
0.26347067952156067,
-0.13522662222385406,
-0.01672343537211418,
0.0001438934268662706,
0.059857141226530075,
0.15739844739437103,
-0.24589890241622925,
-0.40447208285331726,
-0.19432991743087769,
-0.06032519042491913,
-0.37993162870407104,
-0.24929244816303253
] |
https://github.com/huggingface/datasets/issues/1994
|
not being able to get wikipedia es language
|
Thanks a lot for the information and help. This would be great to have
these datasets.
@lhoestq <https://github.com/lhoestq> Do you know a way I could get
smaller amount of these data like 1 GBtype of each language to deal with
computatioanl requirements? thanks
On Sat, Mar 6, 2021 at 5:36 PM Jonatas Grosman <notifications@github.com>
wrote:
> Hi @dorost1234 <https://github.com/dorost1234>, so sorry, but looking at
> my files here, I figure out that I've preprocessed files using the
> HF/datasets for all the languages previously listed by me (Portuguese,
> Russian, French, Japanese, Chinese, and Turkish) except the Spanish (on my
> tests I've used the wikicorpus <https://www.cs.upc.edu/~nlp/wikicorpus/>
> instead).
>
> Only with the Spanish Wikipedia's dump, I had the same KeyError: '000nbsp'
> problem already reported here #577
> <https://github.com/huggingface/datasets/issues/577>
>
> So nowadays, even with access to a high resource machine, you couldn't be
> able to get Wikipedia's Spanish data using the HF/datasets :(
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/1994#issuecomment-791985546>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMWMO7WOHWLOROPD6Q3TCJKXPANCNFSM4YUZIF4A>
> .
>
|
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
| 189
|
not being able to get wikipedia es language
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
Thanks a lot for the information and help. This would be great to have
these datasets.
@lhoestq <https://github.com/lhoestq> Do you know a way I could get
smaller amount of these data like 1 GBtype of each language to deal with
computatioanl requirements? thanks
On Sat, Mar 6, 2021 at 5:36 PM Jonatas Grosman <notifications@github.com>
wrote:
> Hi @dorost1234 <https://github.com/dorost1234>, so sorry, but looking at
> my files here, I figure out that I've preprocessed files using the
> HF/datasets for all the languages previously listed by me (Portuguese,
> Russian, French, Japanese, Chinese, and Turkish) except the Spanish (on my
> tests I've used the wikicorpus <https://www.cs.upc.edu/~nlp/wikicorpus/>
> instead).
>
> Only with the Spanish Wikipedia's dump, I had the same KeyError: '000nbsp'
> problem already reported here #577
> <https://github.com/huggingface/datasets/issues/577>
>
> So nowadays, even with access to a high resource machine, you couldn't be
> able to get Wikipedia's Spanish data using the HF/datasets :(
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/1994#issuecomment-791985546>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMWMO7WOHWLOROPD6Q3TCJKXPANCNFSM4YUZIF4A>
> .
>
|
[
-0.3421078324317932,
0.04719298332929611,
-0.10626477003097534,
0.06201732158660889,
0.20045480132102966,
0.17774426937103271,
0.17687499523162842,
0.34019631147384644,
0.13733309507369995,
0.0921180248260498,
0.41052311658859253,
0.33469316363334656,
0.016000792384147644,
0.30764591693878174,
0.11132048070430756,
-0.33708715438842773,
0.05565028265118599,
0.07522149384021759,
-0.1947193443775177,
-0.20017623901367188,
-0.13208411633968353,
0.10374307632446289,
-0.272518128156662,
-0.0701146200299263,
-0.14883527159690857,
0.10703807324171066,
0.12277764827013016,
-0.019669627770781517,
-0.19260172545909882,
-0.18620166182518005,
0.0680224820971489,
-0.03621345013380051,
0.22803393006324768,
0.10794322192668915,
-0.00010841459152288735,
0.08063174784183502,
0.5717446804046631,
-0.15838073194026947,
-0.45902180671691895,
-0.1303223818540573,
-0.0813634917140007,
-0.3462579846382141,
0.2564505338668823,
-0.3715756833553314,
-0.33478420972824097,
-0.025640562176704407,
0.31875452399253845,
-0.5857158899307251,
0.24128857254981995,
0.1479620337486267,
0.21826864778995514,
-0.07421045750379562,
0.3515351116657257,
-0.00488451449200511,
0.41059690713882446,
0.21860715746879578,
-0.03604930266737938,
-0.12430713325738907,
0.010663212276995182,
0.024965615943074226,
0.060617584735155106,
0.46184754371643066,
0.047285668551921844,
-0.11424703150987625,
0.30397289991378784,
-0.30949077010154724,
0.26568493247032166,
-0.37311577796936035,
0.42296865582466125,
0.25413089990615845,
1.0161634683609009,
-0.11970144510269165,
0.09952134639024734,
0.10506755858659744,
0.0040753912180662155,
0.12878157198429108,
0.24283616244792938,
0.20053640007972717,
-0.36427295207977295,
-0.0796794444322586,
0.11349359154701233,
-0.28304389119148254,
-0.335679292678833,
0.34555771946907043,
-0.10172826051712036,
0.5368958711624146,
0.10903763771057129,
0.14164365828037262,
-0.15097571909427643,
-0.18528833985328674,
0.07730194926261902,
-0.07077974826097488,
0.10307736694812775,
0.3541416823863983,
-0.09304514527320862,
0.13513508439064026,
0.24577893316745758,
0.1751321405172348,
0.04433978721499443,
-0.09479641169309616,
-0.27976489067077637,
0.19170106947422028,
0.36852073669433594,
0.046187154948711395,
0.022065309807658195,
0.03235389292240143,
0.3556637167930603,
-0.1849306970834732,
0.20503869652748108,
-0.030573051422834396,
0.007939324714243412,
0.06664763391017914,
-0.05862192437052727,
-0.33657580614089966,
-0.6453822255134583,
0.23251719772815704,
-0.0009587555541656911,
-0.13675111532211304,
0.1923419088125229,
0.1587262600660324,
-0.3540840446949005,
-0.2998669445514679,
-0.005748707335442305,
0.20172543823719025,
0.1522034853696823,
0.20511768758296967,
0.2833251357078552,
-0.0867256447672844,
-0.3417098820209503,
-0.3844313323497772,
-0.046640794724226,
0.28296369314193726,
-0.4593481719493866,
0.07805246859788895,
0.20936210453510284,
0.10678564757108688,
0.37506967782974243,
-0.035515718162059784,
-0.043999992311000824,
0.042526837438344955,
0.13077178597450256,
0.0788348987698555,
-0.13859976828098297,
0.15947602689266205,
0.1490192711353302,
0.24700047075748444,
0.19990430772304535,
-0.22246770560741425,
-0.0522187203168869,
0.0016838106093928218,
-0.09037464112043381,
-0.19051942229270935,
-0.18565542995929718,
0.17176082730293274,
0.12278037518262863,
0.10188641399145126,
0.04582488536834717,
0.3413788974285126,
0.17139941453933716,
-0.2258874475955963,
0.14366410672664642,
-0.00750997057184577,
-0.13457545638084412,
-0.09188759326934814,
0.3624598979949951,
0.3725726008415222,
-0.6563612222671509,
0.10404717922210693,
-0.04956433176994324,
0.18776701390743256,
0.14369991421699524,
-0.27950069308280945,
-0.28138816356658936,
0.4237997531890869,
-0.09352050721645355,
-0.10077238827943802,
0.3089188039302826,
-0.2708933353424072,
0.08159120380878448,
0.19684253633022308,
0.0673350989818573,
-0.28226202726364136,
0.23710165917873383,
-0.11235322058200836,
0.04229583963751793,
0.16245496273040771,
0.11410839110612869,
0.16634473204612732,
0.11646075546741486,
-0.0702253133058548,
-0.21967510879039764,
-0.12229474633932114,
-0.04315485805273056,
0.11727110296487808,
0.266544371843338,
-0.11957978457212448,
0.12490258365869522,
0.5266053676605225,
0.3261626362800598,
-0.2632543742656708,
0.07642466574907303,
0.5432159304618835,
-0.3122917115688324,
0.08065870404243469,
0.1918921172618866,
-0.055475279688835144,
-0.04989950731396675,
0.18091364204883575,
-0.23919570446014404,
0.40391120314598083,
0.07905687391757965,
-0.005385706201195717,
-0.2668082118034363,
-0.053028181195259094,
-0.23602977395057678,
-0.42836418747901917,
0.21149270236492157,
0.0466558039188385,
-0.035518828779459,
0.2530866265296936,
0.052935536950826645,
-0.09003455936908722,
-0.2782233655452728,
-0.13893696665763855,
-0.8122120499610901,
0.2934665381908417,
-0.28607645630836487,
-0.080081045627594,
-0.0875597819685936,
0.02025469020009041,
0.0639520063996315,
-0.12363416701555252,
-0.2867794334888458,
0.10091570764780045,
0.18732792139053345,
0.03720070794224739,
-0.011949371546506882,
0.1644933968782425,
0.12202993780374527,
-0.2648279070854187,
0.3166707158088684,
0.30542314052581787,
0.11994064599275589,
0.017968744039535522,
-0.2019144892692566,
0.11080726981163025,
0.04773256182670593,
0.3355245888233185,
0.07278717309236526,
0.268589049577713,
0.18518298864364624,
0.1680481880903244,
-0.15628185868263245,
-0.159163698554039,
0.3021559417247772,
0.4226677715778351,
0.18189804255962372,
-0.1457035094499588,
0.03703934699296951,
0.07721482217311859,
0.4515743851661682,
0.104843370616436,
-0.09222353249788284,
-0.12637142837047577,
-0.30541104078292847,
-0.05947883427143097,
0.4833451509475708,
-0.17912422120571136,
-0.01602180488407612,
0.27910545468330383,
-0.016197603195905685,
0.0771193876862526,
-0.15118470788002014,
-0.11755307018756866,
0.44462260603904724,
0.07232657074928284,
0.5178593397140503,
-0.025720220059156418,
-0.12441618740558624,
-0.18681888282299042,
-0.19084171950817108,
-0.2879425585269928,
-0.12341467291116714,
0.2847411632537842,
-0.31246840953826904,
0.2768913507461548,
-0.4178836941719055,
-0.5642529129981995,
-0.20843029022216797,
0.4299703538417816,
-0.3480244576931,
-0.3430693745613098,
-0.06800902634859085,
0.07788634300231934,
-0.02291020378470421,
0.2500196695327759,
0.10721097886562347,
-0.03554370626807213,
0.23204532265663147,
0.007473080884665251,
-0.22167707979679108,
-0.5956379175186157,
-0.43564069271087646,
0.032663337886333466,
0.28232595324516296,
0.03737654909491539,
0.12723003327846527,
-0.15690569579601288,
-0.06724125891923904,
-0.14529554545879364,
-0.40219566226005554,
0.3414440155029297,
-0.08698386698961258,
-0.008463106118142605,
0.11665339022874832,
0.42721834778785706,
-0.19598135352134705,
-0.09505852311849594,
0.3098015785217285,
0.11520124971866608,
-0.14764967560768127,
-0.06926612555980682,
-0.084672711789608,
-0.06236201524734497,
-0.030823122709989548,
-0.43830224871635437,
-0.15058587491512299,
-0.3273385763168335,
-0.1820002794265747,
0.16898339986801147,
0.13323597609996796,
0.35230642557144165,
0.2645769715309143,
0.2091483473777771,
0.3283594250679016,
0.09546112269163132,
-0.09655710309743881,
-0.15933692455291748,
0.21701869368553162,
-0.3185729384422302,
-0.3167467415332794,
0.10404214262962341,
-0.14131318032741547,
0.23050709068775177,
0.11353979259729385,
-0.14633017778396606,
0.06803134083747864,
0.11597270518541336,
0.02005460299551487,
-0.10132098197937012,
0.32571718096733093,
0.7469015717506409,
-0.012623910792171955,
-0.0016660453984513879,
-0.09881129860877991,
0.047826457768678665,
0.03073797933757305,
-0.4368046224117279,
0.34731799364089966,
0.1777922809123993,
0.5277689695358276,
-0.07014810293912888,
0.7515990138053894,
0.11483553797006607,
0.11667937785387039,
0.1321658194065094,
-0.07526150345802307,
0.06618568301200867,
-0.27247294783592224,
-0.18846014142036438,
0.29278069734573364,
0.04032675176858902,
-0.3030898869037628,
0.3898434638977051,
-0.1277020126581192,
-0.259891152381897,
-0.43877750635147095,
0.07504691183567047,
0.0015997649170458317,
-0.24473899602890015,
-0.0376066118478775,
-0.37500426173210144,
0.383912056684494,
-0.09530312567949295,
0.3992140293121338,
-0.08024558424949646,
-0.07314207404851913,
0.05920083448290825,
0.2196865677833557,
-0.0982464998960495,
0.13422450423240662,
-0.17309798300266266,
-0.2497503161430359,
-0.39932578802108765,
0.2461433708667755,
0.0012105636997148395,
0.14361701905727386,
-0.29275277256965637,
0.007917716167867184,
0.28317421674728394,
0.008745018392801285,
0.5200986266136169,
-0.6470431089401245,
-0.0973823070526123,
0.33533909916877747,
0.19218088686466217,
-0.6571789383888245,
-0.14138785004615784,
-0.18767713010311127,
0.2771165668964386,
0.32850176095962524,
-0.047846969217061996,
-0.33222001791000366,
-0.1513580083847046,
0.2680891156196594,
0.04856918752193451,
-0.09909957647323608,
0.05151959881186485,
-0.2417593151330948,
-0.1433180272579193,
-0.33531591296195984,
-0.06578189134597778,
-0.09969448298215866,
0.13510790467262268,
0.10023964196443558,
0.21499595046043396,
0.08130296319723129,
0.02621845342218876,
-0.1448788344860077,
0.20501364767551422,
0.12260513007640839,
0.1383640021085739,
-0.2560672461986542,
0.10371154546737671,
0.48064786195755005,
-0.026589175686240196,
-0.10802411288022995,
0.18511314690113068,
-0.20795366168022156,
0.17263789474964142,
-0.21509230136871338,
0.14550882577896118,
0.16040974855422974,
-0.12064620852470398,
-0.23936393857002258,
0.03647935017943382,
-0.2542997896671295,
-0.04646565392613411,
0.05284343287348747,
0.20871615409851074,
0.08100172877311707,
-0.12740002572536469,
-0.45757803320884705,
0.5609194040298462,
0.18852916359901428,
-0.07297052443027496,
0.2990112602710724,
-0.01566607505083084,
-0.4306361675262451,
0.405288964509964,
0.432944118976593,
0.8635654449462891,
0.02991594187915325,
0.013998446986079216,
0.17142035067081451,
0.16713599860668182,
0.6254858374595642,
-0.5466775894165039,
0.209164097905159,
-0.2812899351119995,
0.31988710165023804,
-0.09525495022535324,
0.06537692993879318,
0.39573410153388977,
0.14318527281284332,
-0.22216999530792236,
0.35360684990882874,
-0.01738503947854042,
0.07415813952684402,
0.05659619718790054,
0.37671759724617004,
0.12653326988220215,
-0.30785268545150757,
-0.11752994358539581,
0.1213967576622963,
-0.18236272037029266,
0.2824692726135254,
-0.24982164800167084,
-0.012538416311144829,
-0.014506855048239231,
-0.24492387473583221,
-0.41069939732551575,
0.09119254350662231,
-0.22418341040611267,
0.46085646748542786,
-0.342303603887558,
-0.4593048691749573,
0.2506963014602661,
0.22680921852588654,
0.23546139895915985,
0.3696662187576294,
-0.3735496699810028,
0.2001676708459854,
0.015004470013082027,
-0.2361069768667221,
-0.07618890702724457,
0.041097577661275864,
0.3866560161113739,
-0.19228112697601318,
-0.3922683000564575,
0.21181191504001617,
-0.1738397777080536,
-0.09788365662097931,
-0.29128584265708923,
-0.31771931052207947,
0.31883278489112854,
0.25020185112953186,
0.12403402477502823,
0.1725907027721405,
-0.08605587482452393,
-0.13386200368404388,
0.11980458348989487,
-0.28414207696914673,
0.010103470645844936,
0.008689327165484428,
0.08827563375234604,
-0.08681789040565491,
0.0309087336063385,
0.257151335477829,
0.18761812150478363,
0.01726139523088932,
0.5952089428901672,
0.3785049021244049,
-0.21947410702705383,
-0.2659061551094055,
0.17860892415046692,
-0.22924327850341797,
-0.060689885169267654,
-0.2634166181087494,
0.15080633759498596,
0.092317596077919,
-0.057126615196466446,
0.1029210165143013,
-0.015744367614388466,
-0.14090988039970398,
-0.0071756960824131966,
-0.2680378556251526,
-0.02095889113843441,
0.02229992486536503,
-0.16380932927131653,
-0.001558042480610311,
0.1883055418729782,
0.1332460343837738,
0.28536418080329895,
-0.23602212965488434,
-0.279116690158844,
-0.23883521556854248,
-0.022319765761494637,
0.04532048478722572,
0.41371288895606995,
-0.016639666631817818,
-0.23604744672775269,
-0.03873738646507263,
0.14523173868656158,
-0.23010562360286713,
-0.2452724575996399,
-0.17255043983459473,
-0.04683474078774452,
0.12900730967521667,
-0.03978543356060982,
-0.18745683133602142,
0.13585445284843445,
-0.34036070108413696,
-0.29250553250312805,
-0.20412884652614594,
-0.13163794577121735,
-0.12930701673030853,
-0.024286020547151566,
0.2222883105278015,
-0.10420877486467361,
0.34498995542526245,
-0.28780093789100647,
0.08798287808895111,
0.0348752997815609,
0.2938302755355835,
0.051171258091926575,
0.24954818189144135,
0.4168609082698822,
-0.17646756768226624,
-0.5602079033851624,
0.18304453790187836,
-0.22114601731300354,
0.1743837296962738,
0.16332216560840607,
-0.0828019380569458,
-0.04801162704825401,
0.029964936897158623,
-0.021473752334713936,
0.026400933042168617,
-0.08198835700750351,
-0.03023359552025795,
0.13558794558048248,
0.20455136895179749,
-0.28272297978401184,
0.12395669519901276,
0.42209771275520325,
-0.033097364008426666,
0.09618926048278809,
0.026278669014573097,
0.2615511417388916,
-0.0534207858145237,
0.17466245591640472,
0.04105694591999054,
0.016864243894815445,
-0.04344846308231354,
0.2639884054660797,
0.09460699558258057,
0.08114752918481827,
0.11606074124574661,
-0.12007065117359161,
0.04641939699649811,
0.13107267022132874,
0.37461331486701965,
0.10712598264217377,
0.06603636592626572,
0.10081680864095688,
0.21656906604766846,
-0.2253754884004593,
-0.1409861445426941,
0.3062989413738251,
-0.102775439620018,
-0.02090821973979473,
0.02287697233259678,
-0.06457333266735077,
0.07485668361186981,
0.14801688492298126,
-0.0637497752904892,
-0.3180233836174011,
0.13867323100566864,
-0.07772649079561234,
-0.18301387131214142,
-0.6274290084838867,
-0.23228102922439575,
0.05465099960565567,
-0.017658982425928116,
0.08908950537443161,
-0.0836968719959259,
-0.10924681276082993,
0.20269767940044403,
-0.035025905817747116,
-0.23063597083091736,
0.6797713041305542,
-0.06164822727441788,
0.04469691216945648,
-0.0551760196685791,
0.2520875334739685,
-0.21323366463184357,
-0.07124578207731247,
-0.1705527901649475,
-0.0018401573179289699,
0.1578255295753479,
0.2109287828207016,
-0.47010332345962524,
-0.14399264752864838,
-0.0009011016809381545,
0.018943987786769867,
-0.059177469462156296,
0.0006441868026740849,
0.06300180405378342,
-0.037797171622514725,
0.29405099153518677,
0.10967087000608444,
-0.08980157971382141,
-0.1984422653913498,
0.21691618859767914,
-0.007181836292147636,
-0.020038271322846413,
-0.24845373630523682,
0.004518008325248957,
0.10421203076839447,
-0.10660920292139053,
0.11462518572807312,
-0.5152727365493774,
0.04132748395204544,
0.2593999207019806,
0.38845986127853394,
-0.10852847993373871,
-0.22299636900424957,
0.0836436077952385,
-0.32754483819007874,
0.5394181609153748,
0.08417349308729172,
0.19058305025100708,
-0.118047334253788,
-0.2930145859718323,
-0.2950972616672516,
0.005453429184854031,
-0.16959351301193237,
-0.36802420020103455,
-0.12039460241794586,
0.30591779947280884,
0.3928033113479614,
0.24459435045719147,
0.11688076704740524,
-0.25355294346809387,
-0.12980464100837708,
0.2650587558746338,
-0.14386354386806488,
-0.15893062949180603,
-0.0732821449637413,
0.04924171045422554,
-0.22518867254257202,
-0.1773684024810791,
0.08320578187704086,
-0.019432324916124344,
0.07522563636302948,
-0.22762125730514526,
-0.14735786616802216,
0.3186533749103546,
-0.43477800488471985,
0.259577214717865,
0.025894859805703163,
0.5472239255905151,
0.029132409021258354,
-0.04227191582322121,
-0.16555611789226532,
0.2228381633758545,
-0.045000120997428894,
0.4914209246635437,
0.06162133067846298,
0.2285093516111374,
-0.21550017595291138,
-0.3188492953777313,
-0.34525811672210693,
0.6317014098167419,
0.03209638595581055,
-0.05510024353861809,
-0.24908003211021423,
-0.05867017060518265,
-0.22949935495853424,
0.29232847690582275,
-0.11924499273300171,
0.06629249453544617,
-0.036651838570833206,
0.18673349916934967,
-0.35817015171051025,
-0.23673127591609955,
0.3384189307689667,
-0.42113202810287476,
-0.3356802463531494,
-0.189715176820755,
0.06820890307426453,
-0.14943398535251617,
0.2929893136024475,
-0.10573438555002213,
-0.015353714115917683,
0.26347067952156067,
-0.13522662222385406,
-0.01672343537211418,
0.0001438934268662706,
0.059857141226530075,
0.15739844739437103,
-0.24589890241622925,
-0.40447208285331726,
-0.19432991743087769,
-0.06032519042491913,
-0.37993162870407104,
-0.24929244816303253
] |
https://github.com/huggingface/datasets/issues/1994
|
not being able to get wikipedia es language
|
Hi ! As mentioned above the Spanish configuration have parsing issues from `mwparserfromhell`. I haven't tested with the latest `mwparserfromhell` >=0.6 though. Which version of `mwparserfromhell` are you using ?
> @lhoestq Could you help me to upload these preprocessed datasets to Huggingface's repositories? To be more precise, I've built datasets from the following languages using the 20201201 dumps: Spanish, Portuguese, Russian, French, Japanese, Chinese, and Turkish. Process these datasets have high costs that most of the community can't afford. I think these preprocessed datasets I have could be helpful for someone without access to high-resource machines to process Wikipedia's dumps like @dorost1234
That would be awesome ! Feel free to ping me on slack so we can put the processed wikipedia files on google storage with the other ones we've already preprocessed.
> Do you know a way I could get smaller amount of these data like 1 GBtype of each language to deal with computatioanl requirements? thanks
I'd suggest to copy the [wikipedia.py](https://github.com/huggingface/datasets/blob/master/datasets/wikipedia/wikipedia.py) to a new script `custom_wikipedia.py` and modify it to only download and process only a subset of the raw data files.
You can for example replace [this line](https://github.com/huggingface/datasets/blob/64e59fc45ca2134218b3e42e83fddddbe840ff74/datasets/wikipedia/wikipedia.py#L446) by:
```python
if total_bytes >= (1 << 30): # stop if the total amount of data is >= 1GB
break
else:
xml_urls.append(_base_url(lang) + fname)
```
Then you can load your custom wikipedia dataset with
```python
load_dataset("path/to/my/custom_wikipedia.py", f"{date}.{language}")
```
|
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
| 231
|
not being able to get wikipedia es language
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
Hi ! As mentioned above the Spanish configuration have parsing issues from `mwparserfromhell`. I haven't tested with the latest `mwparserfromhell` >=0.6 though. Which version of `mwparserfromhell` are you using ?
> @lhoestq Could you help me to upload these preprocessed datasets to Huggingface's repositories? To be more precise, I've built datasets from the following languages using the 20201201 dumps: Spanish, Portuguese, Russian, French, Japanese, Chinese, and Turkish. Process these datasets have high costs that most of the community can't afford. I think these preprocessed datasets I have could be helpful for someone without access to high-resource machines to process Wikipedia's dumps like @dorost1234
That would be awesome ! Feel free to ping me on slack so we can put the processed wikipedia files on google storage with the other ones we've already preprocessed.
> Do you know a way I could get smaller amount of these data like 1 GBtype of each language to deal with computatioanl requirements? thanks
I'd suggest to copy the [wikipedia.py](https://github.com/huggingface/datasets/blob/master/datasets/wikipedia/wikipedia.py) to a new script `custom_wikipedia.py` and modify it to only download and process only a subset of the raw data files.
You can for example replace [this line](https://github.com/huggingface/datasets/blob/64e59fc45ca2134218b3e42e83fddddbe840ff74/datasets/wikipedia/wikipedia.py#L446) by:
```python
if total_bytes >= (1 << 30): # stop if the total amount of data is >= 1GB
break
else:
xml_urls.append(_base_url(lang) + fname)
```
Then you can load your custom wikipedia dataset with
```python
load_dataset("path/to/my/custom_wikipedia.py", f"{date}.{language}")
```
|
[
-0.3421078324317932,
0.04719298332929611,
-0.10626477003097534,
0.06201732158660889,
0.20045480132102966,
0.17774426937103271,
0.17687499523162842,
0.34019631147384644,
0.13733309507369995,
0.0921180248260498,
0.41052311658859253,
0.33469316363334656,
0.016000792384147644,
0.30764591693878174,
0.11132048070430756,
-0.33708715438842773,
0.05565028265118599,
0.07522149384021759,
-0.1947193443775177,
-0.20017623901367188,
-0.13208411633968353,
0.10374307632446289,
-0.272518128156662,
-0.0701146200299263,
-0.14883527159690857,
0.10703807324171066,
0.12277764827013016,
-0.019669627770781517,
-0.19260172545909882,
-0.18620166182518005,
0.0680224820971489,
-0.03621345013380051,
0.22803393006324768,
0.10794322192668915,
-0.00010841459152288735,
0.08063174784183502,
0.5717446804046631,
-0.15838073194026947,
-0.45902180671691895,
-0.1303223818540573,
-0.0813634917140007,
-0.3462579846382141,
0.2564505338668823,
-0.3715756833553314,
-0.33478420972824097,
-0.025640562176704407,
0.31875452399253845,
-0.5857158899307251,
0.24128857254981995,
0.1479620337486267,
0.21826864778995514,
-0.07421045750379562,
0.3515351116657257,
-0.00488451449200511,
0.41059690713882446,
0.21860715746879578,
-0.03604930266737938,
-0.12430713325738907,
0.010663212276995182,
0.024965615943074226,
0.060617584735155106,
0.46184754371643066,
0.047285668551921844,
-0.11424703150987625,
0.30397289991378784,
-0.30949077010154724,
0.26568493247032166,
-0.37311577796936035,
0.42296865582466125,
0.25413089990615845,
1.0161634683609009,
-0.11970144510269165,
0.09952134639024734,
0.10506755858659744,
0.0040753912180662155,
0.12878157198429108,
0.24283616244792938,
0.20053640007972717,
-0.36427295207977295,
-0.0796794444322586,
0.11349359154701233,
-0.28304389119148254,
-0.335679292678833,
0.34555771946907043,
-0.10172826051712036,
0.5368958711624146,
0.10903763771057129,
0.14164365828037262,
-0.15097571909427643,
-0.18528833985328674,
0.07730194926261902,
-0.07077974826097488,
0.10307736694812775,
0.3541416823863983,
-0.09304514527320862,
0.13513508439064026,
0.24577893316745758,
0.1751321405172348,
0.04433978721499443,
-0.09479641169309616,
-0.27976489067077637,
0.19170106947422028,
0.36852073669433594,
0.046187154948711395,
0.022065309807658195,
0.03235389292240143,
0.3556637167930603,
-0.1849306970834732,
0.20503869652748108,
-0.030573051422834396,
0.007939324714243412,
0.06664763391017914,
-0.05862192437052727,
-0.33657580614089966,
-0.6453822255134583,
0.23251719772815704,
-0.0009587555541656911,
-0.13675111532211304,
0.1923419088125229,
0.1587262600660324,
-0.3540840446949005,
-0.2998669445514679,
-0.005748707335442305,
0.20172543823719025,
0.1522034853696823,
0.20511768758296967,
0.2833251357078552,
-0.0867256447672844,
-0.3417098820209503,
-0.3844313323497772,
-0.046640794724226,
0.28296369314193726,
-0.4593481719493866,
0.07805246859788895,
0.20936210453510284,
0.10678564757108688,
0.37506967782974243,
-0.035515718162059784,
-0.043999992311000824,
0.042526837438344955,
0.13077178597450256,
0.0788348987698555,
-0.13859976828098297,
0.15947602689266205,
0.1490192711353302,
0.24700047075748444,
0.19990430772304535,
-0.22246770560741425,
-0.0522187203168869,
0.0016838106093928218,
-0.09037464112043381,
-0.19051942229270935,
-0.18565542995929718,
0.17176082730293274,
0.12278037518262863,
0.10188641399145126,
0.04582488536834717,
0.3413788974285126,
0.17139941453933716,
-0.2258874475955963,
0.14366410672664642,
-0.00750997057184577,
-0.13457545638084412,
-0.09188759326934814,
0.3624598979949951,
0.3725726008415222,
-0.6563612222671509,
0.10404717922210693,
-0.04956433176994324,
0.18776701390743256,
0.14369991421699524,
-0.27950069308280945,
-0.28138816356658936,
0.4237997531890869,
-0.09352050721645355,
-0.10077238827943802,
0.3089188039302826,
-0.2708933353424072,
0.08159120380878448,
0.19684253633022308,
0.0673350989818573,
-0.28226202726364136,
0.23710165917873383,
-0.11235322058200836,
0.04229583963751793,
0.16245496273040771,
0.11410839110612869,
0.16634473204612732,
0.11646075546741486,
-0.0702253133058548,
-0.21967510879039764,
-0.12229474633932114,
-0.04315485805273056,
0.11727110296487808,
0.266544371843338,
-0.11957978457212448,
0.12490258365869522,
0.5266053676605225,
0.3261626362800598,
-0.2632543742656708,
0.07642466574907303,
0.5432159304618835,
-0.3122917115688324,
0.08065870404243469,
0.1918921172618866,
-0.055475279688835144,
-0.04989950731396675,
0.18091364204883575,
-0.23919570446014404,
0.40391120314598083,
0.07905687391757965,
-0.005385706201195717,
-0.2668082118034363,
-0.053028181195259094,
-0.23602977395057678,
-0.42836418747901917,
0.21149270236492157,
0.0466558039188385,
-0.035518828779459,
0.2530866265296936,
0.052935536950826645,
-0.09003455936908722,
-0.2782233655452728,
-0.13893696665763855,
-0.8122120499610901,
0.2934665381908417,
-0.28607645630836487,
-0.080081045627594,
-0.0875597819685936,
0.02025469020009041,
0.0639520063996315,
-0.12363416701555252,
-0.2867794334888458,
0.10091570764780045,
0.18732792139053345,
0.03720070794224739,
-0.011949371546506882,
0.1644933968782425,
0.12202993780374527,
-0.2648279070854187,
0.3166707158088684,
0.30542314052581787,
0.11994064599275589,
0.017968744039535522,
-0.2019144892692566,
0.11080726981163025,
0.04773256182670593,
0.3355245888233185,
0.07278717309236526,
0.268589049577713,
0.18518298864364624,
0.1680481880903244,
-0.15628185868263245,
-0.159163698554039,
0.3021559417247772,
0.4226677715778351,
0.18189804255962372,
-0.1457035094499588,
0.03703934699296951,
0.07721482217311859,
0.4515743851661682,
0.104843370616436,
-0.09222353249788284,
-0.12637142837047577,
-0.30541104078292847,
-0.05947883427143097,
0.4833451509475708,
-0.17912422120571136,
-0.01602180488407612,
0.27910545468330383,
-0.016197603195905685,
0.0771193876862526,
-0.15118470788002014,
-0.11755307018756866,
0.44462260603904724,
0.07232657074928284,
0.5178593397140503,
-0.025720220059156418,
-0.12441618740558624,
-0.18681888282299042,
-0.19084171950817108,
-0.2879425585269928,
-0.12341467291116714,
0.2847411632537842,
-0.31246840953826904,
0.2768913507461548,
-0.4178836941719055,
-0.5642529129981995,
-0.20843029022216797,
0.4299703538417816,
-0.3480244576931,
-0.3430693745613098,
-0.06800902634859085,
0.07788634300231934,
-0.02291020378470421,
0.2500196695327759,
0.10721097886562347,
-0.03554370626807213,
0.23204532265663147,
0.007473080884665251,
-0.22167707979679108,
-0.5956379175186157,
-0.43564069271087646,
0.032663337886333466,
0.28232595324516296,
0.03737654909491539,
0.12723003327846527,
-0.15690569579601288,
-0.06724125891923904,
-0.14529554545879364,
-0.40219566226005554,
0.3414440155029297,
-0.08698386698961258,
-0.008463106118142605,
0.11665339022874832,
0.42721834778785706,
-0.19598135352134705,
-0.09505852311849594,
0.3098015785217285,
0.11520124971866608,
-0.14764967560768127,
-0.06926612555980682,
-0.084672711789608,
-0.06236201524734497,
-0.030823122709989548,
-0.43830224871635437,
-0.15058587491512299,
-0.3273385763168335,
-0.1820002794265747,
0.16898339986801147,
0.13323597609996796,
0.35230642557144165,
0.2645769715309143,
0.2091483473777771,
0.3283594250679016,
0.09546112269163132,
-0.09655710309743881,
-0.15933692455291748,
0.21701869368553162,
-0.3185729384422302,
-0.3167467415332794,
0.10404214262962341,
-0.14131318032741547,
0.23050709068775177,
0.11353979259729385,
-0.14633017778396606,
0.06803134083747864,
0.11597270518541336,
0.02005460299551487,
-0.10132098197937012,
0.32571718096733093,
0.7469015717506409,
-0.012623910792171955,
-0.0016660453984513879,
-0.09881129860877991,
0.047826457768678665,
0.03073797933757305,
-0.4368046224117279,
0.34731799364089966,
0.1777922809123993,
0.5277689695358276,
-0.07014810293912888,
0.7515990138053894,
0.11483553797006607,
0.11667937785387039,
0.1321658194065094,
-0.07526150345802307,
0.06618568301200867,
-0.27247294783592224,
-0.18846014142036438,
0.29278069734573364,
0.04032675176858902,
-0.3030898869037628,
0.3898434638977051,
-0.1277020126581192,
-0.259891152381897,
-0.43877750635147095,
0.07504691183567047,
0.0015997649170458317,
-0.24473899602890015,
-0.0376066118478775,
-0.37500426173210144,
0.383912056684494,
-0.09530312567949295,
0.3992140293121338,
-0.08024558424949646,
-0.07314207404851913,
0.05920083448290825,
0.2196865677833557,
-0.0982464998960495,
0.13422450423240662,
-0.17309798300266266,
-0.2497503161430359,
-0.39932578802108765,
0.2461433708667755,
0.0012105636997148395,
0.14361701905727386,
-0.29275277256965637,
0.007917716167867184,
0.28317421674728394,
0.008745018392801285,
0.5200986266136169,
-0.6470431089401245,
-0.0973823070526123,
0.33533909916877747,
0.19218088686466217,
-0.6571789383888245,
-0.14138785004615784,
-0.18767713010311127,
0.2771165668964386,
0.32850176095962524,
-0.047846969217061996,
-0.33222001791000366,
-0.1513580083847046,
0.2680891156196594,
0.04856918752193451,
-0.09909957647323608,
0.05151959881186485,
-0.2417593151330948,
-0.1433180272579193,
-0.33531591296195984,
-0.06578189134597778,
-0.09969448298215866,
0.13510790467262268,
0.10023964196443558,
0.21499595046043396,
0.08130296319723129,
0.02621845342218876,
-0.1448788344860077,
0.20501364767551422,
0.12260513007640839,
0.1383640021085739,
-0.2560672461986542,
0.10371154546737671,
0.48064786195755005,
-0.026589175686240196,
-0.10802411288022995,
0.18511314690113068,
-0.20795366168022156,
0.17263789474964142,
-0.21509230136871338,
0.14550882577896118,
0.16040974855422974,
-0.12064620852470398,
-0.23936393857002258,
0.03647935017943382,
-0.2542997896671295,
-0.04646565392613411,
0.05284343287348747,
0.20871615409851074,
0.08100172877311707,
-0.12740002572536469,
-0.45757803320884705,
0.5609194040298462,
0.18852916359901428,
-0.07297052443027496,
0.2990112602710724,
-0.01566607505083084,
-0.4306361675262451,
0.405288964509964,
0.432944118976593,
0.8635654449462891,
0.02991594187915325,
0.013998446986079216,
0.17142035067081451,
0.16713599860668182,
0.6254858374595642,
-0.5466775894165039,
0.209164097905159,
-0.2812899351119995,
0.31988710165023804,
-0.09525495022535324,
0.06537692993879318,
0.39573410153388977,
0.14318527281284332,
-0.22216999530792236,
0.35360684990882874,
-0.01738503947854042,
0.07415813952684402,
0.05659619718790054,
0.37671759724617004,
0.12653326988220215,
-0.30785268545150757,
-0.11752994358539581,
0.1213967576622963,
-0.18236272037029266,
0.2824692726135254,
-0.24982164800167084,
-0.012538416311144829,
-0.014506855048239231,
-0.24492387473583221,
-0.41069939732551575,
0.09119254350662231,
-0.22418341040611267,
0.46085646748542786,
-0.342303603887558,
-0.4593048691749573,
0.2506963014602661,
0.22680921852588654,
0.23546139895915985,
0.3696662187576294,
-0.3735496699810028,
0.2001676708459854,
0.015004470013082027,
-0.2361069768667221,
-0.07618890702724457,
0.041097577661275864,
0.3866560161113739,
-0.19228112697601318,
-0.3922683000564575,
0.21181191504001617,
-0.1738397777080536,
-0.09788365662097931,
-0.29128584265708923,
-0.31771931052207947,
0.31883278489112854,
0.25020185112953186,
0.12403402477502823,
0.1725907027721405,
-0.08605587482452393,
-0.13386200368404388,
0.11980458348989487,
-0.28414207696914673,
0.010103470645844936,
0.008689327165484428,
0.08827563375234604,
-0.08681789040565491,
0.0309087336063385,
0.257151335477829,
0.18761812150478363,
0.01726139523088932,
0.5952089428901672,
0.3785049021244049,
-0.21947410702705383,
-0.2659061551094055,
0.17860892415046692,
-0.22924327850341797,
-0.060689885169267654,
-0.2634166181087494,
0.15080633759498596,
0.092317596077919,
-0.057126615196466446,
0.1029210165143013,
-0.015744367614388466,
-0.14090988039970398,
-0.0071756960824131966,
-0.2680378556251526,
-0.02095889113843441,
0.02229992486536503,
-0.16380932927131653,
-0.001558042480610311,
0.1883055418729782,
0.1332460343837738,
0.28536418080329895,
-0.23602212965488434,
-0.279116690158844,
-0.23883521556854248,
-0.022319765761494637,
0.04532048478722572,
0.41371288895606995,
-0.016639666631817818,
-0.23604744672775269,
-0.03873738646507263,
0.14523173868656158,
-0.23010562360286713,
-0.2452724575996399,
-0.17255043983459473,
-0.04683474078774452,
0.12900730967521667,
-0.03978543356060982,
-0.18745683133602142,
0.13585445284843445,
-0.34036070108413696,
-0.29250553250312805,
-0.20412884652614594,
-0.13163794577121735,
-0.12930701673030853,
-0.024286020547151566,
0.2222883105278015,
-0.10420877486467361,
0.34498995542526245,
-0.28780093789100647,
0.08798287808895111,
0.0348752997815609,
0.2938302755355835,
0.051171258091926575,
0.24954818189144135,
0.4168609082698822,
-0.17646756768226624,
-0.5602079033851624,
0.18304453790187836,
-0.22114601731300354,
0.1743837296962738,
0.16332216560840607,
-0.0828019380569458,
-0.04801162704825401,
0.029964936897158623,
-0.021473752334713936,
0.026400933042168617,
-0.08198835700750351,
-0.03023359552025795,
0.13558794558048248,
0.20455136895179749,
-0.28272297978401184,
0.12395669519901276,
0.42209771275520325,
-0.033097364008426666,
0.09618926048278809,
0.026278669014573097,
0.2615511417388916,
-0.0534207858145237,
0.17466245591640472,
0.04105694591999054,
0.016864243894815445,
-0.04344846308231354,
0.2639884054660797,
0.09460699558258057,
0.08114752918481827,
0.11606074124574661,
-0.12007065117359161,
0.04641939699649811,
0.13107267022132874,
0.37461331486701965,
0.10712598264217377,
0.06603636592626572,
0.10081680864095688,
0.21656906604766846,
-0.2253754884004593,
-0.1409861445426941,
0.3062989413738251,
-0.102775439620018,
-0.02090821973979473,
0.02287697233259678,
-0.06457333266735077,
0.07485668361186981,
0.14801688492298126,
-0.0637497752904892,
-0.3180233836174011,
0.13867323100566864,
-0.07772649079561234,
-0.18301387131214142,
-0.6274290084838867,
-0.23228102922439575,
0.05465099960565567,
-0.017658982425928116,
0.08908950537443161,
-0.0836968719959259,
-0.10924681276082993,
0.20269767940044403,
-0.035025905817747116,
-0.23063597083091736,
0.6797713041305542,
-0.06164822727441788,
0.04469691216945648,
-0.0551760196685791,
0.2520875334739685,
-0.21323366463184357,
-0.07124578207731247,
-0.1705527901649475,
-0.0018401573179289699,
0.1578255295753479,
0.2109287828207016,
-0.47010332345962524,
-0.14399264752864838,
-0.0009011016809381545,
0.018943987786769867,
-0.059177469462156296,
0.0006441868026740849,
0.06300180405378342,
-0.037797171622514725,
0.29405099153518677,
0.10967087000608444,
-0.08980157971382141,
-0.1984422653913498,
0.21691618859767914,
-0.007181836292147636,
-0.020038271322846413,
-0.24845373630523682,
0.004518008325248957,
0.10421203076839447,
-0.10660920292139053,
0.11462518572807312,
-0.5152727365493774,
0.04132748395204544,
0.2593999207019806,
0.38845986127853394,
-0.10852847993373871,
-0.22299636900424957,
0.0836436077952385,
-0.32754483819007874,
0.5394181609153748,
0.08417349308729172,
0.19058305025100708,
-0.118047334253788,
-0.2930145859718323,
-0.2950972616672516,
0.005453429184854031,
-0.16959351301193237,
-0.36802420020103455,
-0.12039460241794586,
0.30591779947280884,
0.3928033113479614,
0.24459435045719147,
0.11688076704740524,
-0.25355294346809387,
-0.12980464100837708,
0.2650587558746338,
-0.14386354386806488,
-0.15893062949180603,
-0.0732821449637413,
0.04924171045422554,
-0.22518867254257202,
-0.1773684024810791,
0.08320578187704086,
-0.019432324916124344,
0.07522563636302948,
-0.22762125730514526,
-0.14735786616802216,
0.3186533749103546,
-0.43477800488471985,
0.259577214717865,
0.025894859805703163,
0.5472239255905151,
0.029132409021258354,
-0.04227191582322121,
-0.16555611789226532,
0.2228381633758545,
-0.045000120997428894,
0.4914209246635437,
0.06162133067846298,
0.2285093516111374,
-0.21550017595291138,
-0.3188492953777313,
-0.34525811672210693,
0.6317014098167419,
0.03209638595581055,
-0.05510024353861809,
-0.24908003211021423,
-0.05867017060518265,
-0.22949935495853424,
0.29232847690582275,
-0.11924499273300171,
0.06629249453544617,
-0.036651838570833206,
0.18673349916934967,
-0.35817015171051025,
-0.23673127591609955,
0.3384189307689667,
-0.42113202810287476,
-0.3356802463531494,
-0.189715176820755,
0.06820890307426453,
-0.14943398535251617,
0.2929893136024475,
-0.10573438555002213,
-0.015353714115917683,
0.26347067952156067,
-0.13522662222385406,
-0.01672343537211418,
0.0001438934268662706,
0.059857141226530075,
0.15739844739437103,
-0.24589890241622925,
-0.40447208285331726,
-0.19432991743087769,
-0.06032519042491913,
-0.37993162870407104,
-0.24929244816303253
] |
https://github.com/huggingface/datasets/issues/1994
|
not being able to get wikipedia es language
|
Hi @lhoestq!
> Hi ! As mentioned above the Spanish configuration have parsing issues from mwparserfromhell. I haven't tested with the latest mwparserfromhell >=0.6 though. Which version of mwparserfromhell are you using ?
I'm using the latest mwparserfromhell version (0.6)
> That would be awesome ! Feel free to ping me on slack so we can put the processed wikipedia files on google storage with the other ones we've already preprocessed.
I'll ping you there 👍
|
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
| 76
|
not being able to get wikipedia es language
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
Hi @lhoestq!
> Hi ! As mentioned above the Spanish configuration have parsing issues from mwparserfromhell. I haven't tested with the latest mwparserfromhell >=0.6 though. Which version of mwparserfromhell are you using ?
I'm using the latest mwparserfromhell version (0.6)
> That would be awesome ! Feel free to ping me on slack so we can put the processed wikipedia files on google storage with the other ones we've already preprocessed.
I'll ping you there 👍
|
[
-0.3421078324317932,
0.04719298332929611,
-0.10626477003097534,
0.06201732158660889,
0.20045480132102966,
0.17774426937103271,
0.17687499523162842,
0.34019631147384644,
0.13733309507369995,
0.0921180248260498,
0.41052311658859253,
0.33469316363334656,
0.016000792384147644,
0.30764591693878174,
0.11132048070430756,
-0.33708715438842773,
0.05565028265118599,
0.07522149384021759,
-0.1947193443775177,
-0.20017623901367188,
-0.13208411633968353,
0.10374307632446289,
-0.272518128156662,
-0.0701146200299263,
-0.14883527159690857,
0.10703807324171066,
0.12277764827013016,
-0.019669627770781517,
-0.19260172545909882,
-0.18620166182518005,
0.0680224820971489,
-0.03621345013380051,
0.22803393006324768,
0.10794322192668915,
-0.00010841459152288735,
0.08063174784183502,
0.5717446804046631,
-0.15838073194026947,
-0.45902180671691895,
-0.1303223818540573,
-0.0813634917140007,
-0.3462579846382141,
0.2564505338668823,
-0.3715756833553314,
-0.33478420972824097,
-0.025640562176704407,
0.31875452399253845,
-0.5857158899307251,
0.24128857254981995,
0.1479620337486267,
0.21826864778995514,
-0.07421045750379562,
0.3515351116657257,
-0.00488451449200511,
0.41059690713882446,
0.21860715746879578,
-0.03604930266737938,
-0.12430713325738907,
0.010663212276995182,
0.024965615943074226,
0.060617584735155106,
0.46184754371643066,
0.047285668551921844,
-0.11424703150987625,
0.30397289991378784,
-0.30949077010154724,
0.26568493247032166,
-0.37311577796936035,
0.42296865582466125,
0.25413089990615845,
1.0161634683609009,
-0.11970144510269165,
0.09952134639024734,
0.10506755858659744,
0.0040753912180662155,
0.12878157198429108,
0.24283616244792938,
0.20053640007972717,
-0.36427295207977295,
-0.0796794444322586,
0.11349359154701233,
-0.28304389119148254,
-0.335679292678833,
0.34555771946907043,
-0.10172826051712036,
0.5368958711624146,
0.10903763771057129,
0.14164365828037262,
-0.15097571909427643,
-0.18528833985328674,
0.07730194926261902,
-0.07077974826097488,
0.10307736694812775,
0.3541416823863983,
-0.09304514527320862,
0.13513508439064026,
0.24577893316745758,
0.1751321405172348,
0.04433978721499443,
-0.09479641169309616,
-0.27976489067077637,
0.19170106947422028,
0.36852073669433594,
0.046187154948711395,
0.022065309807658195,
0.03235389292240143,
0.3556637167930603,
-0.1849306970834732,
0.20503869652748108,
-0.030573051422834396,
0.007939324714243412,
0.06664763391017914,
-0.05862192437052727,
-0.33657580614089966,
-0.6453822255134583,
0.23251719772815704,
-0.0009587555541656911,
-0.13675111532211304,
0.1923419088125229,
0.1587262600660324,
-0.3540840446949005,
-0.2998669445514679,
-0.005748707335442305,
0.20172543823719025,
0.1522034853696823,
0.20511768758296967,
0.2833251357078552,
-0.0867256447672844,
-0.3417098820209503,
-0.3844313323497772,
-0.046640794724226,
0.28296369314193726,
-0.4593481719493866,
0.07805246859788895,
0.20936210453510284,
0.10678564757108688,
0.37506967782974243,
-0.035515718162059784,
-0.043999992311000824,
0.042526837438344955,
0.13077178597450256,
0.0788348987698555,
-0.13859976828098297,
0.15947602689266205,
0.1490192711353302,
0.24700047075748444,
0.19990430772304535,
-0.22246770560741425,
-0.0522187203168869,
0.0016838106093928218,
-0.09037464112043381,
-0.19051942229270935,
-0.18565542995929718,
0.17176082730293274,
0.12278037518262863,
0.10188641399145126,
0.04582488536834717,
0.3413788974285126,
0.17139941453933716,
-0.2258874475955963,
0.14366410672664642,
-0.00750997057184577,
-0.13457545638084412,
-0.09188759326934814,
0.3624598979949951,
0.3725726008415222,
-0.6563612222671509,
0.10404717922210693,
-0.04956433176994324,
0.18776701390743256,
0.14369991421699524,
-0.27950069308280945,
-0.28138816356658936,
0.4237997531890869,
-0.09352050721645355,
-0.10077238827943802,
0.3089188039302826,
-0.2708933353424072,
0.08159120380878448,
0.19684253633022308,
0.0673350989818573,
-0.28226202726364136,
0.23710165917873383,
-0.11235322058200836,
0.04229583963751793,
0.16245496273040771,
0.11410839110612869,
0.16634473204612732,
0.11646075546741486,
-0.0702253133058548,
-0.21967510879039764,
-0.12229474633932114,
-0.04315485805273056,
0.11727110296487808,
0.266544371843338,
-0.11957978457212448,
0.12490258365869522,
0.5266053676605225,
0.3261626362800598,
-0.2632543742656708,
0.07642466574907303,
0.5432159304618835,
-0.3122917115688324,
0.08065870404243469,
0.1918921172618866,
-0.055475279688835144,
-0.04989950731396675,
0.18091364204883575,
-0.23919570446014404,
0.40391120314598083,
0.07905687391757965,
-0.005385706201195717,
-0.2668082118034363,
-0.053028181195259094,
-0.23602977395057678,
-0.42836418747901917,
0.21149270236492157,
0.0466558039188385,
-0.035518828779459,
0.2530866265296936,
0.052935536950826645,
-0.09003455936908722,
-0.2782233655452728,
-0.13893696665763855,
-0.8122120499610901,
0.2934665381908417,
-0.28607645630836487,
-0.080081045627594,
-0.0875597819685936,
0.02025469020009041,
0.0639520063996315,
-0.12363416701555252,
-0.2867794334888458,
0.10091570764780045,
0.18732792139053345,
0.03720070794224739,
-0.011949371546506882,
0.1644933968782425,
0.12202993780374527,
-0.2648279070854187,
0.3166707158088684,
0.30542314052581787,
0.11994064599275589,
0.017968744039535522,
-0.2019144892692566,
0.11080726981163025,
0.04773256182670593,
0.3355245888233185,
0.07278717309236526,
0.268589049577713,
0.18518298864364624,
0.1680481880903244,
-0.15628185868263245,
-0.159163698554039,
0.3021559417247772,
0.4226677715778351,
0.18189804255962372,
-0.1457035094499588,
0.03703934699296951,
0.07721482217311859,
0.4515743851661682,
0.104843370616436,
-0.09222353249788284,
-0.12637142837047577,
-0.30541104078292847,
-0.05947883427143097,
0.4833451509475708,
-0.17912422120571136,
-0.01602180488407612,
0.27910545468330383,
-0.016197603195905685,
0.0771193876862526,
-0.15118470788002014,
-0.11755307018756866,
0.44462260603904724,
0.07232657074928284,
0.5178593397140503,
-0.025720220059156418,
-0.12441618740558624,
-0.18681888282299042,
-0.19084171950817108,
-0.2879425585269928,
-0.12341467291116714,
0.2847411632537842,
-0.31246840953826904,
0.2768913507461548,
-0.4178836941719055,
-0.5642529129981995,
-0.20843029022216797,
0.4299703538417816,
-0.3480244576931,
-0.3430693745613098,
-0.06800902634859085,
0.07788634300231934,
-0.02291020378470421,
0.2500196695327759,
0.10721097886562347,
-0.03554370626807213,
0.23204532265663147,
0.007473080884665251,
-0.22167707979679108,
-0.5956379175186157,
-0.43564069271087646,
0.032663337886333466,
0.28232595324516296,
0.03737654909491539,
0.12723003327846527,
-0.15690569579601288,
-0.06724125891923904,
-0.14529554545879364,
-0.40219566226005554,
0.3414440155029297,
-0.08698386698961258,
-0.008463106118142605,
0.11665339022874832,
0.42721834778785706,
-0.19598135352134705,
-0.09505852311849594,
0.3098015785217285,
0.11520124971866608,
-0.14764967560768127,
-0.06926612555980682,
-0.084672711789608,
-0.06236201524734497,
-0.030823122709989548,
-0.43830224871635437,
-0.15058587491512299,
-0.3273385763168335,
-0.1820002794265747,
0.16898339986801147,
0.13323597609996796,
0.35230642557144165,
0.2645769715309143,
0.2091483473777771,
0.3283594250679016,
0.09546112269163132,
-0.09655710309743881,
-0.15933692455291748,
0.21701869368553162,
-0.3185729384422302,
-0.3167467415332794,
0.10404214262962341,
-0.14131318032741547,
0.23050709068775177,
0.11353979259729385,
-0.14633017778396606,
0.06803134083747864,
0.11597270518541336,
0.02005460299551487,
-0.10132098197937012,
0.32571718096733093,
0.7469015717506409,
-0.012623910792171955,
-0.0016660453984513879,
-0.09881129860877991,
0.047826457768678665,
0.03073797933757305,
-0.4368046224117279,
0.34731799364089966,
0.1777922809123993,
0.5277689695358276,
-0.07014810293912888,
0.7515990138053894,
0.11483553797006607,
0.11667937785387039,
0.1321658194065094,
-0.07526150345802307,
0.06618568301200867,
-0.27247294783592224,
-0.18846014142036438,
0.29278069734573364,
0.04032675176858902,
-0.3030898869037628,
0.3898434638977051,
-0.1277020126581192,
-0.259891152381897,
-0.43877750635147095,
0.07504691183567047,
0.0015997649170458317,
-0.24473899602890015,
-0.0376066118478775,
-0.37500426173210144,
0.383912056684494,
-0.09530312567949295,
0.3992140293121338,
-0.08024558424949646,
-0.07314207404851913,
0.05920083448290825,
0.2196865677833557,
-0.0982464998960495,
0.13422450423240662,
-0.17309798300266266,
-0.2497503161430359,
-0.39932578802108765,
0.2461433708667755,
0.0012105636997148395,
0.14361701905727386,
-0.29275277256965637,
0.007917716167867184,
0.28317421674728394,
0.008745018392801285,
0.5200986266136169,
-0.6470431089401245,
-0.0973823070526123,
0.33533909916877747,
0.19218088686466217,
-0.6571789383888245,
-0.14138785004615784,
-0.18767713010311127,
0.2771165668964386,
0.32850176095962524,
-0.047846969217061996,
-0.33222001791000366,
-0.1513580083847046,
0.2680891156196594,
0.04856918752193451,
-0.09909957647323608,
0.05151959881186485,
-0.2417593151330948,
-0.1433180272579193,
-0.33531591296195984,
-0.06578189134597778,
-0.09969448298215866,
0.13510790467262268,
0.10023964196443558,
0.21499595046043396,
0.08130296319723129,
0.02621845342218876,
-0.1448788344860077,
0.20501364767551422,
0.12260513007640839,
0.1383640021085739,
-0.2560672461986542,
0.10371154546737671,
0.48064786195755005,
-0.026589175686240196,
-0.10802411288022995,
0.18511314690113068,
-0.20795366168022156,
0.17263789474964142,
-0.21509230136871338,
0.14550882577896118,
0.16040974855422974,
-0.12064620852470398,
-0.23936393857002258,
0.03647935017943382,
-0.2542997896671295,
-0.04646565392613411,
0.05284343287348747,
0.20871615409851074,
0.08100172877311707,
-0.12740002572536469,
-0.45757803320884705,
0.5609194040298462,
0.18852916359901428,
-0.07297052443027496,
0.2990112602710724,
-0.01566607505083084,
-0.4306361675262451,
0.405288964509964,
0.432944118976593,
0.8635654449462891,
0.02991594187915325,
0.013998446986079216,
0.17142035067081451,
0.16713599860668182,
0.6254858374595642,
-0.5466775894165039,
0.209164097905159,
-0.2812899351119995,
0.31988710165023804,
-0.09525495022535324,
0.06537692993879318,
0.39573410153388977,
0.14318527281284332,
-0.22216999530792236,
0.35360684990882874,
-0.01738503947854042,
0.07415813952684402,
0.05659619718790054,
0.37671759724617004,
0.12653326988220215,
-0.30785268545150757,
-0.11752994358539581,
0.1213967576622963,
-0.18236272037029266,
0.2824692726135254,
-0.24982164800167084,
-0.012538416311144829,
-0.014506855048239231,
-0.24492387473583221,
-0.41069939732551575,
0.09119254350662231,
-0.22418341040611267,
0.46085646748542786,
-0.342303603887558,
-0.4593048691749573,
0.2506963014602661,
0.22680921852588654,
0.23546139895915985,
0.3696662187576294,
-0.3735496699810028,
0.2001676708459854,
0.015004470013082027,
-0.2361069768667221,
-0.07618890702724457,
0.041097577661275864,
0.3866560161113739,
-0.19228112697601318,
-0.3922683000564575,
0.21181191504001617,
-0.1738397777080536,
-0.09788365662097931,
-0.29128584265708923,
-0.31771931052207947,
0.31883278489112854,
0.25020185112953186,
0.12403402477502823,
0.1725907027721405,
-0.08605587482452393,
-0.13386200368404388,
0.11980458348989487,
-0.28414207696914673,
0.010103470645844936,
0.008689327165484428,
0.08827563375234604,
-0.08681789040565491,
0.0309087336063385,
0.257151335477829,
0.18761812150478363,
0.01726139523088932,
0.5952089428901672,
0.3785049021244049,
-0.21947410702705383,
-0.2659061551094055,
0.17860892415046692,
-0.22924327850341797,
-0.060689885169267654,
-0.2634166181087494,
0.15080633759498596,
0.092317596077919,
-0.057126615196466446,
0.1029210165143013,
-0.015744367614388466,
-0.14090988039970398,
-0.0071756960824131966,
-0.2680378556251526,
-0.02095889113843441,
0.02229992486536503,
-0.16380932927131653,
-0.001558042480610311,
0.1883055418729782,
0.1332460343837738,
0.28536418080329895,
-0.23602212965488434,
-0.279116690158844,
-0.23883521556854248,
-0.022319765761494637,
0.04532048478722572,
0.41371288895606995,
-0.016639666631817818,
-0.23604744672775269,
-0.03873738646507263,
0.14523173868656158,
-0.23010562360286713,
-0.2452724575996399,
-0.17255043983459473,
-0.04683474078774452,
0.12900730967521667,
-0.03978543356060982,
-0.18745683133602142,
0.13585445284843445,
-0.34036070108413696,
-0.29250553250312805,
-0.20412884652614594,
-0.13163794577121735,
-0.12930701673030853,
-0.024286020547151566,
0.2222883105278015,
-0.10420877486467361,
0.34498995542526245,
-0.28780093789100647,
0.08798287808895111,
0.0348752997815609,
0.2938302755355835,
0.051171258091926575,
0.24954818189144135,
0.4168609082698822,
-0.17646756768226624,
-0.5602079033851624,
0.18304453790187836,
-0.22114601731300354,
0.1743837296962738,
0.16332216560840607,
-0.0828019380569458,
-0.04801162704825401,
0.029964936897158623,
-0.021473752334713936,
0.026400933042168617,
-0.08198835700750351,
-0.03023359552025795,
0.13558794558048248,
0.20455136895179749,
-0.28272297978401184,
0.12395669519901276,
0.42209771275520325,
-0.033097364008426666,
0.09618926048278809,
0.026278669014573097,
0.2615511417388916,
-0.0534207858145237,
0.17466245591640472,
0.04105694591999054,
0.016864243894815445,
-0.04344846308231354,
0.2639884054660797,
0.09460699558258057,
0.08114752918481827,
0.11606074124574661,
-0.12007065117359161,
0.04641939699649811,
0.13107267022132874,
0.37461331486701965,
0.10712598264217377,
0.06603636592626572,
0.10081680864095688,
0.21656906604766846,
-0.2253754884004593,
-0.1409861445426941,
0.3062989413738251,
-0.102775439620018,
-0.02090821973979473,
0.02287697233259678,
-0.06457333266735077,
0.07485668361186981,
0.14801688492298126,
-0.0637497752904892,
-0.3180233836174011,
0.13867323100566864,
-0.07772649079561234,
-0.18301387131214142,
-0.6274290084838867,
-0.23228102922439575,
0.05465099960565567,
-0.017658982425928116,
0.08908950537443161,
-0.0836968719959259,
-0.10924681276082993,
0.20269767940044403,
-0.035025905817747116,
-0.23063597083091736,
0.6797713041305542,
-0.06164822727441788,
0.04469691216945648,
-0.0551760196685791,
0.2520875334739685,
-0.21323366463184357,
-0.07124578207731247,
-0.1705527901649475,
-0.0018401573179289699,
0.1578255295753479,
0.2109287828207016,
-0.47010332345962524,
-0.14399264752864838,
-0.0009011016809381545,
0.018943987786769867,
-0.059177469462156296,
0.0006441868026740849,
0.06300180405378342,
-0.037797171622514725,
0.29405099153518677,
0.10967087000608444,
-0.08980157971382141,
-0.1984422653913498,
0.21691618859767914,
-0.007181836292147636,
-0.020038271322846413,
-0.24845373630523682,
0.004518008325248957,
0.10421203076839447,
-0.10660920292139053,
0.11462518572807312,
-0.5152727365493774,
0.04132748395204544,
0.2593999207019806,
0.38845986127853394,
-0.10852847993373871,
-0.22299636900424957,
0.0836436077952385,
-0.32754483819007874,
0.5394181609153748,
0.08417349308729172,
0.19058305025100708,
-0.118047334253788,
-0.2930145859718323,
-0.2950972616672516,
0.005453429184854031,
-0.16959351301193237,
-0.36802420020103455,
-0.12039460241794586,
0.30591779947280884,
0.3928033113479614,
0.24459435045719147,
0.11688076704740524,
-0.25355294346809387,
-0.12980464100837708,
0.2650587558746338,
-0.14386354386806488,
-0.15893062949180603,
-0.0732821449637413,
0.04924171045422554,
-0.22518867254257202,
-0.1773684024810791,
0.08320578187704086,
-0.019432324916124344,
0.07522563636302948,
-0.22762125730514526,
-0.14735786616802216,
0.3186533749103546,
-0.43477800488471985,
0.259577214717865,
0.025894859805703163,
0.5472239255905151,
0.029132409021258354,
-0.04227191582322121,
-0.16555611789226532,
0.2228381633758545,
-0.045000120997428894,
0.4914209246635437,
0.06162133067846298,
0.2285093516111374,
-0.21550017595291138,
-0.3188492953777313,
-0.34525811672210693,
0.6317014098167419,
0.03209638595581055,
-0.05510024353861809,
-0.24908003211021423,
-0.05867017060518265,
-0.22949935495853424,
0.29232847690582275,
-0.11924499273300171,
0.06629249453544617,
-0.036651838570833206,
0.18673349916934967,
-0.35817015171051025,
-0.23673127591609955,
0.3384189307689667,
-0.42113202810287476,
-0.3356802463531494,
-0.189715176820755,
0.06820890307426453,
-0.14943398535251617,
0.2929893136024475,
-0.10573438555002213,
-0.015353714115917683,
0.26347067952156067,
-0.13522662222385406,
-0.01672343537211418,
0.0001438934268662706,
0.059857141226530075,
0.15739844739437103,
-0.24589890241622925,
-0.40447208285331726,
-0.19432991743087769,
-0.06032519042491913,
-0.37993162870407104,
-0.24929244816303253
] |
https://github.com/huggingface/datasets/issues/1994
|
not being able to get wikipedia es language
|
Thank you so much @jonatasgrosman and @lhoestq this would be a great help. I am really thankful to you both and to wonderful Huggingface dataset library allowing us to train models at scale.
|
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
| 33
|
not being able to get wikipedia es language
Hi
I am trying to run a code with wikipedia of config 20200501.es, getting:
Traceback (most recent call last):
File "run_mlm_t5.py", line 608, in <module>
main()
File "run_mlm_t5.py", line 359, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name)
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/dara/libs/anaconda3/envs/success432/lib/python3.7/site-packages/datasets-1.2.1-py3.7.egg/datasets/builder.py", line 1050, in _download_and_prepare
"\n\t`{}`".format(usage_example)
datasets.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.es', beam_runner='DirectRunner')`
thanks @lhoestq for any suggestion/help
Thank you so much @jonatasgrosman and @lhoestq this would be a great help. I am really thankful to you both and to wonderful Huggingface dataset library allowing us to train models at scale.
|
[
-0.3421078324317932,
0.04719298332929611,
-0.10626477003097534,
0.06201732158660889,
0.20045480132102966,
0.17774426937103271,
0.17687499523162842,
0.34019631147384644,
0.13733309507369995,
0.0921180248260498,
0.41052311658859253,
0.33469316363334656,
0.016000792384147644,
0.30764591693878174,
0.11132048070430756,
-0.33708715438842773,
0.05565028265118599,
0.07522149384021759,
-0.1947193443775177,
-0.20017623901367188,
-0.13208411633968353,
0.10374307632446289,
-0.272518128156662,
-0.0701146200299263,
-0.14883527159690857,
0.10703807324171066,
0.12277764827013016,
-0.019669627770781517,
-0.19260172545909882,
-0.18620166182518005,
0.0680224820971489,
-0.03621345013380051,
0.22803393006324768,
0.10794322192668915,
-0.00010841459152288735,
0.08063174784183502,
0.5717446804046631,
-0.15838073194026947,
-0.45902180671691895,
-0.1303223818540573,
-0.0813634917140007,
-0.3462579846382141,
0.2564505338668823,
-0.3715756833553314,
-0.33478420972824097,
-0.025640562176704407,
0.31875452399253845,
-0.5857158899307251,
0.24128857254981995,
0.1479620337486267,
0.21826864778995514,
-0.07421045750379562,
0.3515351116657257,
-0.00488451449200511,
0.41059690713882446,
0.21860715746879578,
-0.03604930266737938,
-0.12430713325738907,
0.010663212276995182,
0.024965615943074226,
0.060617584735155106,
0.46184754371643066,
0.047285668551921844,
-0.11424703150987625,
0.30397289991378784,
-0.30949077010154724,
0.26568493247032166,
-0.37311577796936035,
0.42296865582466125,
0.25413089990615845,
1.0161634683609009,
-0.11970144510269165,
0.09952134639024734,
0.10506755858659744,
0.0040753912180662155,
0.12878157198429108,
0.24283616244792938,
0.20053640007972717,
-0.36427295207977295,
-0.0796794444322586,
0.11349359154701233,
-0.28304389119148254,
-0.335679292678833,
0.34555771946907043,
-0.10172826051712036,
0.5368958711624146,
0.10903763771057129,
0.14164365828037262,
-0.15097571909427643,
-0.18528833985328674,
0.07730194926261902,
-0.07077974826097488,
0.10307736694812775,
0.3541416823863983,
-0.09304514527320862,
0.13513508439064026,
0.24577893316745758,
0.1751321405172348,
0.04433978721499443,
-0.09479641169309616,
-0.27976489067077637,
0.19170106947422028,
0.36852073669433594,
0.046187154948711395,
0.022065309807658195,
0.03235389292240143,
0.3556637167930603,
-0.1849306970834732,
0.20503869652748108,
-0.030573051422834396,
0.007939324714243412,
0.06664763391017914,
-0.05862192437052727,
-0.33657580614089966,
-0.6453822255134583,
0.23251719772815704,
-0.0009587555541656911,
-0.13675111532211304,
0.1923419088125229,
0.1587262600660324,
-0.3540840446949005,
-0.2998669445514679,
-0.005748707335442305,
0.20172543823719025,
0.1522034853696823,
0.20511768758296967,
0.2833251357078552,
-0.0867256447672844,
-0.3417098820209503,
-0.3844313323497772,
-0.046640794724226,
0.28296369314193726,
-0.4593481719493866,
0.07805246859788895,
0.20936210453510284,
0.10678564757108688,
0.37506967782974243,
-0.035515718162059784,
-0.043999992311000824,
0.042526837438344955,
0.13077178597450256,
0.0788348987698555,
-0.13859976828098297,
0.15947602689266205,
0.1490192711353302,
0.24700047075748444,
0.19990430772304535,
-0.22246770560741425,
-0.0522187203168869,
0.0016838106093928218,
-0.09037464112043381,
-0.19051942229270935,
-0.18565542995929718,
0.17176082730293274,
0.12278037518262863,
0.10188641399145126,
0.04582488536834717,
0.3413788974285126,
0.17139941453933716,
-0.2258874475955963,
0.14366410672664642,
-0.00750997057184577,
-0.13457545638084412,
-0.09188759326934814,
0.3624598979949951,
0.3725726008415222,
-0.6563612222671509,
0.10404717922210693,
-0.04956433176994324,
0.18776701390743256,
0.14369991421699524,
-0.27950069308280945,
-0.28138816356658936,
0.4237997531890869,
-0.09352050721645355,
-0.10077238827943802,
0.3089188039302826,
-0.2708933353424072,
0.08159120380878448,
0.19684253633022308,
0.0673350989818573,
-0.28226202726364136,
0.23710165917873383,
-0.11235322058200836,
0.04229583963751793,
0.16245496273040771,
0.11410839110612869,
0.16634473204612732,
0.11646075546741486,
-0.0702253133058548,
-0.21967510879039764,
-0.12229474633932114,
-0.04315485805273056,
0.11727110296487808,
0.266544371843338,
-0.11957978457212448,
0.12490258365869522,
0.5266053676605225,
0.3261626362800598,
-0.2632543742656708,
0.07642466574907303,
0.5432159304618835,
-0.3122917115688324,
0.08065870404243469,
0.1918921172618866,
-0.055475279688835144,
-0.04989950731396675,
0.18091364204883575,
-0.23919570446014404,
0.40391120314598083,
0.07905687391757965,
-0.005385706201195717,
-0.2668082118034363,
-0.053028181195259094,
-0.23602977395057678,
-0.42836418747901917,
0.21149270236492157,
0.0466558039188385,
-0.035518828779459,
0.2530866265296936,
0.052935536950826645,
-0.09003455936908722,
-0.2782233655452728,
-0.13893696665763855,
-0.8122120499610901,
0.2934665381908417,
-0.28607645630836487,
-0.080081045627594,
-0.0875597819685936,
0.02025469020009041,
0.0639520063996315,
-0.12363416701555252,
-0.2867794334888458,
0.10091570764780045,
0.18732792139053345,
0.03720070794224739,
-0.011949371546506882,
0.1644933968782425,
0.12202993780374527,
-0.2648279070854187,
0.3166707158088684,
0.30542314052581787,
0.11994064599275589,
0.017968744039535522,
-0.2019144892692566,
0.11080726981163025,
0.04773256182670593,
0.3355245888233185,
0.07278717309236526,
0.268589049577713,
0.18518298864364624,
0.1680481880903244,
-0.15628185868263245,
-0.159163698554039,
0.3021559417247772,
0.4226677715778351,
0.18189804255962372,
-0.1457035094499588,
0.03703934699296951,
0.07721482217311859,
0.4515743851661682,
0.104843370616436,
-0.09222353249788284,
-0.12637142837047577,
-0.30541104078292847,
-0.05947883427143097,
0.4833451509475708,
-0.17912422120571136,
-0.01602180488407612,
0.27910545468330383,
-0.016197603195905685,
0.0771193876862526,
-0.15118470788002014,
-0.11755307018756866,
0.44462260603904724,
0.07232657074928284,
0.5178593397140503,
-0.025720220059156418,
-0.12441618740558624,
-0.18681888282299042,
-0.19084171950817108,
-0.2879425585269928,
-0.12341467291116714,
0.2847411632537842,
-0.31246840953826904,
0.2768913507461548,
-0.4178836941719055,
-0.5642529129981995,
-0.20843029022216797,
0.4299703538417816,
-0.3480244576931,
-0.3430693745613098,
-0.06800902634859085,
0.07788634300231934,
-0.02291020378470421,
0.2500196695327759,
0.10721097886562347,
-0.03554370626807213,
0.23204532265663147,
0.007473080884665251,
-0.22167707979679108,
-0.5956379175186157,
-0.43564069271087646,
0.032663337886333466,
0.28232595324516296,
0.03737654909491539,
0.12723003327846527,
-0.15690569579601288,
-0.06724125891923904,
-0.14529554545879364,
-0.40219566226005554,
0.3414440155029297,
-0.08698386698961258,
-0.008463106118142605,
0.11665339022874832,
0.42721834778785706,
-0.19598135352134705,
-0.09505852311849594,
0.3098015785217285,
0.11520124971866608,
-0.14764967560768127,
-0.06926612555980682,
-0.084672711789608,
-0.06236201524734497,
-0.030823122709989548,
-0.43830224871635437,
-0.15058587491512299,
-0.3273385763168335,
-0.1820002794265747,
0.16898339986801147,
0.13323597609996796,
0.35230642557144165,
0.2645769715309143,
0.2091483473777771,
0.3283594250679016,
0.09546112269163132,
-0.09655710309743881,
-0.15933692455291748,
0.21701869368553162,
-0.3185729384422302,
-0.3167467415332794,
0.10404214262962341,
-0.14131318032741547,
0.23050709068775177,
0.11353979259729385,
-0.14633017778396606,
0.06803134083747864,
0.11597270518541336,
0.02005460299551487,
-0.10132098197937012,
0.32571718096733093,
0.7469015717506409,
-0.012623910792171955,
-0.0016660453984513879,
-0.09881129860877991,
0.047826457768678665,
0.03073797933757305,
-0.4368046224117279,
0.34731799364089966,
0.1777922809123993,
0.5277689695358276,
-0.07014810293912888,
0.7515990138053894,
0.11483553797006607,
0.11667937785387039,
0.1321658194065094,
-0.07526150345802307,
0.06618568301200867,
-0.27247294783592224,
-0.18846014142036438,
0.29278069734573364,
0.04032675176858902,
-0.3030898869037628,
0.3898434638977051,
-0.1277020126581192,
-0.259891152381897,
-0.43877750635147095,
0.07504691183567047,
0.0015997649170458317,
-0.24473899602890015,
-0.0376066118478775,
-0.37500426173210144,
0.383912056684494,
-0.09530312567949295,
0.3992140293121338,
-0.08024558424949646,
-0.07314207404851913,
0.05920083448290825,
0.2196865677833557,
-0.0982464998960495,
0.13422450423240662,
-0.17309798300266266,
-0.2497503161430359,
-0.39932578802108765,
0.2461433708667755,
0.0012105636997148395,
0.14361701905727386,
-0.29275277256965637,
0.007917716167867184,
0.28317421674728394,
0.008745018392801285,
0.5200986266136169,
-0.6470431089401245,
-0.0973823070526123,
0.33533909916877747,
0.19218088686466217,
-0.6571789383888245,
-0.14138785004615784,
-0.18767713010311127,
0.2771165668964386,
0.32850176095962524,
-0.047846969217061996,
-0.33222001791000366,
-0.1513580083847046,
0.2680891156196594,
0.04856918752193451,
-0.09909957647323608,
0.05151959881186485,
-0.2417593151330948,
-0.1433180272579193,
-0.33531591296195984,
-0.06578189134597778,
-0.09969448298215866,
0.13510790467262268,
0.10023964196443558,
0.21499595046043396,
0.08130296319723129,
0.02621845342218876,
-0.1448788344860077,
0.20501364767551422,
0.12260513007640839,
0.1383640021085739,
-0.2560672461986542,
0.10371154546737671,
0.48064786195755005,
-0.026589175686240196,
-0.10802411288022995,
0.18511314690113068,
-0.20795366168022156,
0.17263789474964142,
-0.21509230136871338,
0.14550882577896118,
0.16040974855422974,
-0.12064620852470398,
-0.23936393857002258,
0.03647935017943382,
-0.2542997896671295,
-0.04646565392613411,
0.05284343287348747,
0.20871615409851074,
0.08100172877311707,
-0.12740002572536469,
-0.45757803320884705,
0.5609194040298462,
0.18852916359901428,
-0.07297052443027496,
0.2990112602710724,
-0.01566607505083084,
-0.4306361675262451,
0.405288964509964,
0.432944118976593,
0.8635654449462891,
0.02991594187915325,
0.013998446986079216,
0.17142035067081451,
0.16713599860668182,
0.6254858374595642,
-0.5466775894165039,
0.209164097905159,
-0.2812899351119995,
0.31988710165023804,
-0.09525495022535324,
0.06537692993879318,
0.39573410153388977,
0.14318527281284332,
-0.22216999530792236,
0.35360684990882874,
-0.01738503947854042,
0.07415813952684402,
0.05659619718790054,
0.37671759724617004,
0.12653326988220215,
-0.30785268545150757,
-0.11752994358539581,
0.1213967576622963,
-0.18236272037029266,
0.2824692726135254,
-0.24982164800167084,
-0.012538416311144829,
-0.014506855048239231,
-0.24492387473583221,
-0.41069939732551575,
0.09119254350662231,
-0.22418341040611267,
0.46085646748542786,
-0.342303603887558,
-0.4593048691749573,
0.2506963014602661,
0.22680921852588654,
0.23546139895915985,
0.3696662187576294,
-0.3735496699810028,
0.2001676708459854,
0.015004470013082027,
-0.2361069768667221,
-0.07618890702724457,
0.041097577661275864,
0.3866560161113739,
-0.19228112697601318,
-0.3922683000564575,
0.21181191504001617,
-0.1738397777080536,
-0.09788365662097931,
-0.29128584265708923,
-0.31771931052207947,
0.31883278489112854,
0.25020185112953186,
0.12403402477502823,
0.1725907027721405,
-0.08605587482452393,
-0.13386200368404388,
0.11980458348989487,
-0.28414207696914673,
0.010103470645844936,
0.008689327165484428,
0.08827563375234604,
-0.08681789040565491,
0.0309087336063385,
0.257151335477829,
0.18761812150478363,
0.01726139523088932,
0.5952089428901672,
0.3785049021244049,
-0.21947410702705383,
-0.2659061551094055,
0.17860892415046692,
-0.22924327850341797,
-0.060689885169267654,
-0.2634166181087494,
0.15080633759498596,
0.092317596077919,
-0.057126615196466446,
0.1029210165143013,
-0.015744367614388466,
-0.14090988039970398,
-0.0071756960824131966,
-0.2680378556251526,
-0.02095889113843441,
0.02229992486536503,
-0.16380932927131653,
-0.001558042480610311,
0.1883055418729782,
0.1332460343837738,
0.28536418080329895,
-0.23602212965488434,
-0.279116690158844,
-0.23883521556854248,
-0.022319765761494637,
0.04532048478722572,
0.41371288895606995,
-0.016639666631817818,
-0.23604744672775269,
-0.03873738646507263,
0.14523173868656158,
-0.23010562360286713,
-0.2452724575996399,
-0.17255043983459473,
-0.04683474078774452,
0.12900730967521667,
-0.03978543356060982,
-0.18745683133602142,
0.13585445284843445,
-0.34036070108413696,
-0.29250553250312805,
-0.20412884652614594,
-0.13163794577121735,
-0.12930701673030853,
-0.024286020547151566,
0.2222883105278015,
-0.10420877486467361,
0.34498995542526245,
-0.28780093789100647,
0.08798287808895111,
0.0348752997815609,
0.2938302755355835,
0.051171258091926575,
0.24954818189144135,
0.4168609082698822,
-0.17646756768226624,
-0.5602079033851624,
0.18304453790187836,
-0.22114601731300354,
0.1743837296962738,
0.16332216560840607,
-0.0828019380569458,
-0.04801162704825401,
0.029964936897158623,
-0.021473752334713936,
0.026400933042168617,
-0.08198835700750351,
-0.03023359552025795,
0.13558794558048248,
0.20455136895179749,
-0.28272297978401184,
0.12395669519901276,
0.42209771275520325,
-0.033097364008426666,
0.09618926048278809,
0.026278669014573097,
0.2615511417388916,
-0.0534207858145237,
0.17466245591640472,
0.04105694591999054,
0.016864243894815445,
-0.04344846308231354,
0.2639884054660797,
0.09460699558258057,
0.08114752918481827,
0.11606074124574661,
-0.12007065117359161,
0.04641939699649811,
0.13107267022132874,
0.37461331486701965,
0.10712598264217377,
0.06603636592626572,
0.10081680864095688,
0.21656906604766846,
-0.2253754884004593,
-0.1409861445426941,
0.3062989413738251,
-0.102775439620018,
-0.02090821973979473,
0.02287697233259678,
-0.06457333266735077,
0.07485668361186981,
0.14801688492298126,
-0.0637497752904892,
-0.3180233836174011,
0.13867323100566864,
-0.07772649079561234,
-0.18301387131214142,
-0.6274290084838867,
-0.23228102922439575,
0.05465099960565567,
-0.017658982425928116,
0.08908950537443161,
-0.0836968719959259,
-0.10924681276082993,
0.20269767940044403,
-0.035025905817747116,
-0.23063597083091736,
0.6797713041305542,
-0.06164822727441788,
0.04469691216945648,
-0.0551760196685791,
0.2520875334739685,
-0.21323366463184357,
-0.07124578207731247,
-0.1705527901649475,
-0.0018401573179289699,
0.1578255295753479,
0.2109287828207016,
-0.47010332345962524,
-0.14399264752864838,
-0.0009011016809381545,
0.018943987786769867,
-0.059177469462156296,
0.0006441868026740849,
0.06300180405378342,
-0.037797171622514725,
0.29405099153518677,
0.10967087000608444,
-0.08980157971382141,
-0.1984422653913498,
0.21691618859767914,
-0.007181836292147636,
-0.020038271322846413,
-0.24845373630523682,
0.004518008325248957,
0.10421203076839447,
-0.10660920292139053,
0.11462518572807312,
-0.5152727365493774,
0.04132748395204544,
0.2593999207019806,
0.38845986127853394,
-0.10852847993373871,
-0.22299636900424957,
0.0836436077952385,
-0.32754483819007874,
0.5394181609153748,
0.08417349308729172,
0.19058305025100708,
-0.118047334253788,
-0.2930145859718323,
-0.2950972616672516,
0.005453429184854031,
-0.16959351301193237,
-0.36802420020103455,
-0.12039460241794586,
0.30591779947280884,
0.3928033113479614,
0.24459435045719147,
0.11688076704740524,
-0.25355294346809387,
-0.12980464100837708,
0.2650587558746338,
-0.14386354386806488,
-0.15893062949180603,
-0.0732821449637413,
0.04924171045422554,
-0.22518867254257202,
-0.1773684024810791,
0.08320578187704086,
-0.019432324916124344,
0.07522563636302948,
-0.22762125730514526,
-0.14735786616802216,
0.3186533749103546,
-0.43477800488471985,
0.259577214717865,
0.025894859805703163,
0.5472239255905151,
0.029132409021258354,
-0.04227191582322121,
-0.16555611789226532,
0.2228381633758545,
-0.045000120997428894,
0.4914209246635437,
0.06162133067846298,
0.2285093516111374,
-0.21550017595291138,
-0.3188492953777313,
-0.34525811672210693,
0.6317014098167419,
0.03209638595581055,
-0.05510024353861809,
-0.24908003211021423,
-0.05867017060518265,
-0.22949935495853424,
0.29232847690582275,
-0.11924499273300171,
0.06629249453544617,
-0.036651838570833206,
0.18673349916934967,
-0.35817015171051025,
-0.23673127591609955,
0.3384189307689667,
-0.42113202810287476,
-0.3356802463531494,
-0.189715176820755,
0.06820890307426453,
-0.14943398535251617,
0.2929893136024475,
-0.10573438555002213,
-0.015353714115917683,
0.26347067952156067,
-0.13522662222385406,
-0.01672343537211418,
0.0001438934268662706,
0.059857141226530075,
0.15739844739437103,
-0.24589890241622925,
-0.40447208285331726,
-0.19432991743087769,
-0.06032519042491913,
-0.37993162870407104,
-0.24929244816303253
] |
https://github.com/huggingface/datasets/issues/1993
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
|
Hi ! That looks like a bug, can you provide some code so that we can reproduce ?
It's not supposed to update the original dataset
|
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
| 26
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
Hi ! That looks like a bug, can you provide some code so that we can reproduce ?
It's not supposed to update the original dataset
|
[
-0.277360200881958,
-0.1424063891172409,
-0.009712811559438705,
0.2224394977092743,
0.2347681224346161,
0.12864649295806885,
-0.03142731264233589,
-0.08363258838653564,
-0.044526997953653336,
0.04259490966796875,
0.07567649334669113,
0.35082730650901794,
0.06566634029150009,
0.2150924652814865,
0.18949663639068604,
0.27550992369651794,
0.3028120696544647,
0.2871474623680115,
-0.33956724405288696,
-0.11875336617231369,
-0.22478051483631134,
-0.12712284922599792,
0.0034543422516435385,
-0.2915346324443817,
-0.18111306428909302,
-0.2847262918949127,
-0.10517945140600204,
0.011286339722573757,
0.11921103298664093,
0.12824933230876923,
0.14725331962108612,
0.11708971858024597,
0.25989362597465515,
0.32083258032798767,
-0.00012003982556052506,
0.006558972876518965,
-0.2820393443107605,
-0.09815545380115509,
-0.3171292841434479,
-0.14831146597862244,
0.00406917929649353,
-0.16865013539791107,
0.012579025700688362,
-0.31871068477630615,
0.016711050644516945,
-0.05775777995586395,
-0.15321168303489685,
-0.20478826761245728,
0.5439521074295044,
-0.261932909488678,
0.10759469121694565,
-0.07455626875162125,
-0.18759368360042572,
0.053586557507514954,
-0.26373690366744995,
0.3224843144416809,
0.16352500021457672,
0.04922783374786377,
-0.01661517098546028,
0.35775184631347656,
0.007664563599973917,
0.26261085271835327,
-0.21546287834644318,
-0.25762781500816345,
0.37566640973091125,
-0.011946653015911579,
0.1762688010931015,
-0.353251576423645,
0.15661346912384033,
-0.06553085148334503,
0.7306796312332153,
-0.4183011054992676,
-0.2183699607849121,
-0.2186252474784851,
0.14460250735282898,
-0.1294233649969101,
0.14989446103572845,
0.25005653500556946,
-0.009654870256781578,
0.1328629106283188,
-0.5013386011123657,
-0.7865977883338928,
-0.09614773094654083,
0.09071995317935944,
0.05138063803315163,
-0.5484743118286133,
0.00748671917244792,
0.13161872327327728,
0.16696876287460327,
0.30844825506210327,
0.4444076418876648,
-0.2608914077281952,
-0.24271588027477264,
0.10328299552202225,
-0.2903403043746948,
-0.30801987648010254,
-0.32479286193847656,
0.18504174053668976,
-0.041348010301589966,
0.2232465147972107,
0.08513984829187393,
-0.08969516307115555,
-0.2581588327884674,
0.1403546780347824,
0.19319331645965576,
0.2976647615432739,
0.1033940464258194,
0.20719477534294128,
0.06409777700901031,
0.08677345514297485,
-0.2276681661605835,
-0.05554673448204994,
0.2099660336971283,
0.1116868332028389,
0.632205605506897,
-0.30620357394218445,
0.26053357124328613,
0.018100783228874207,
0.057566914707422256,
0.11730983108282089,
0.13012434542179108,
-0.0381414033472538,
-0.1821732223033905,
0.3218332529067993,
0.10125099122524261,
0.10706408321857452,
0.18987959623336792,
0.24064873158931732,
-0.055998295545578,
-0.13122986257076263,
-0.1708797961473465,
-0.07950203120708466,
-0.30208420753479004,
0.3862598240375519,
0.07387420535087585,
0.00537422951310873,
0.11036978662014008,
0.48390257358551025,
-0.45218518376350403,
-0.1569836437702179,
0.009346871636807919,
-0.182361900806427,
0.3648667335510254,
0.1807546317577362,
0.13290001451969147,
0.19297567009925842,
-0.07670086622238159,
-0.0259797852486372,
-0.05062113329768181,
0.7035816311836243,
-0.3622860610485077,
-0.11673816293478012,
0.031743090599775314,
0.12887567281723022,
-0.09978118538856506,
0.11891954392194748,
-0.6574717164039612,
0.1957004815340042,
0.10903887450695038,
-0.2294830083847046,
0.23262454569339752,
0.0644703283905983,
-0.39337635040283203,
-0.19553513824939728,
-0.060074660927057266,
0.24466972053050995,
-0.35171037912368774,
-0.13309581577777863,
0.16714739799499512,
-0.21640008687973022,
-0.0562935397028923,
0.1603802889585495,
-0.2772345244884491,
0.2107776403427124,
-0.34160852432250977,
-0.3182985782623291,
0.5734582543373108,
0.12379025667905807,
-0.4386882781982422,
0.1376533806324005,
-0.047317985445261,
-0.08549875020980835,
-0.0338461734354496,
0.5759633183479309,
0.08870643377304077,
-0.12185109406709671,
-0.4468074142932892,
0.28359007835388184,
0.09143111109733582,
0.09933316707611084,
-0.00009441408474231139,
-0.17192260921001434,
0.24466396868228912,
-0.313880056142807,
-0.10988251119852066,
0.4869315028190613,
0.29135140776634216,
0.4426918923854828,
0.33464673161506653,
0.05464707314968109,
0.12267645448446274,
0.42058610916137695,
-0.14442679286003113,
0.036345213651657104,
-0.18893378973007202,
0.16043993830680847,
-0.60502690076828,
-0.028306081891059875,
0.15154121816158295,
-0.5714523196220398,
0.4265672266483307,
-0.09662821888923645,
-0.05945831909775734,
-0.20614175498485565,
-0.08250641077756882,
0.05658429488539696,
-0.07425941526889801,
0.0540463887155056,
-0.07023124396800995,
-0.16912011802196503,
-0.23334342241287231,
0.45659223198890686,
-0.07458165287971497,
0.10198011994361877,
-0.6434775590896606,
0.41207313537597656,
0.14481329917907715,
-0.18760712444782257,
-0.28970324993133545,
-0.07700514048337936,
0.20228184759616852,
0.015842363238334656,
-0.16047325730323792,
0.3794606328010559,
0.1969829946756363,
0.36936572194099426,
-0.07243607193231583,
0.19691462814807892,
0.027586640790104866,
-0.036629971116781235,
0.001510838745161891,
-0.13201981782913208,
0.17837345600128174,
-0.08495858311653137,
-0.13141028583049774,
-0.02517019212245941,
-0.17624130845069885,
0.056723929941654205,
0.06934570521116257,
-0.19008184969425201,
0.006540210917592049,
-0.3226760923862457,
-0.012901661917567253,
-0.2311118096113205,
-0.22056880593299866,
0.19445134699344635,
0.3617493212223053,
0.10749275237321854,
-0.19668245315551758,
-0.1728551834821701,
0.28079140186309814,
-0.2587941586971283,
-0.04645451158285141,
0.04439353570342064,
-0.27435070276260376,
0.009504350833594799,
-0.12609419226646423,
0.5707712769508362,
0.1891014724969864,
0.10612060874700546,
0.07778450846672058,
0.1742018759250641,
0.13649216294288635,
-0.023219546303153038,
0.024552637711167336,
0.03539474681019783,
0.5409007668495178,
0.2572122812271118,
-0.006434297654777765,
0.0857304036617279,
-0.15938830375671387,
0.4665904939174652,
0.10989594459533691,
-0.12078659981489182,
-0.3045048117637634,
0.1523127257823944,
-0.13947325944900513,
0.09345471113920212,
-0.49075254797935486,
-0.08585508912801743,
-0.23074154555797577,
0.16295543313026428,
-0.25301146507263184,
0.755164384841919,
0.2067699283361435,
0.194750115275383,
0.15208005905151367,
0.023358378559350967,
-0.08850543946027756,
-0.437772661447525,
-0.08935318142175674,
0.12714174389839172,
-0.0993078351020813,
-0.06163937225937843,
0.0731259435415268,
-0.06764426827430725,
0.3914984464645386,
-0.08245670795440674,
-0.05444999411702156,
-0.4722402095794678,
0.06781450659036636,
-0.047155093401670456,
0.0970701277256012,
0.1179436445236206,
-0.17211195826530457,
0.16208414733409882,
-0.4026907980442047,
-0.015498197637498379,
-0.113009013235569,
-0.4427282214164734,
-0.2376415729522705,
0.04697568342089653,
0.1358090043067932,
0.28566887974739075,
-0.02071736380457878,
-0.1760309338569641,
0.031320374459028244,
-0.02403350919485092,
-0.16447760164737701,
-0.17987890541553497,
0.038125790655612946,
0.0707302838563919,
0.17854845523834229,
-0.24931290745735168,
0.22521109879016876,
0.03661113604903221,
-0.2901351749897003,
-0.5891335010528564,
0.3810372054576874,
0.1769791692495346,
-0.2777748107910156,
0.2593783438205719,
-0.18305440247058868,
-0.03858022764325142,
0.33595454692840576,
-0.610811173915863,
-0.08909452706575394,
0.04730634763836861,
0.07121695578098297,
-0.4067153334617615,
0.3266799747943878,
0.32339173555374146,
-0.11059432476758957,
0.009024989791214466,
-0.10590547323226929,
-0.259261816740036,
0.0587804801762104,
0.0994877740740776,
0.42001038789749146,
-0.20230844616889954,
0.22214868664741516,
-0.08145946264266968,
0.25427350401878357,
-0.007059871684759855,
-0.11690861731767654,
0.3640683889389038,
0.11346155405044556,
0.513302743434906,
-0.2445790320634842,
-0.14100678265094757,
-0.5643540620803833,
-0.17712591588497162,
-0.2818337678909302,
-0.011447629891335964,
-0.022735610604286194,
-0.04424436017870903,
-0.14664626121520996,
-0.2983012795448303,
-0.2498425394296646,
-0.15601257979869843,
-0.00041613465873524547,
-0.273683100938797,
0.3052913546562195,
0.10216227918863297,
0.22628535330295563,
0.18910488486289978,
-0.2032572627067566,
-0.0671016201376915,
0.200999915599823,
0.3148531913757324,
0.04719286784529686,
-0.32266971468925476,
-0.03061380796134472,
-0.14018084108829498,
0.1583726853132248,
-0.20893937349319458,
-0.004810146987438202,
0.16129657626152039,
-0.06423860043287277,
0.09787777066230774,
0.20930573344230652,
0.8259215354919434,
0.22820864617824554,
0.1617143452167511,
0.06672300398349762,
-0.3872626721858978,
-0.28557389974594116,
-0.005082251504063606,
0.019830575212836266,
-0.2780987620353699,
-0.08809210360050201,
0.6831377744674683,
0.178752601146698,
-0.05078951641917229,
-0.29579368233680725,
0.4659900665283203,
-0.33180341124534607,
-0.33470138907432556,
-0.2603488862514496,
-0.19917507469654083,
-0.5212275981903076,
-0.1314108967781067,
-0.2619127929210663,
-0.028471818193793297,
-0.17739862203598022,
0.11378821730613708,
-0.18715082108974457,
-0.07589323073625565,
0.051374565809965134,
-0.1798715442419052,
0.33519601821899414,
0.3329254686832428,
0.05405181646347046,
0.08239416778087616,
0.18735285103321075,
0.171730175614357,
0.3534216284751892,
-0.09962328523397446,
-0.09590573608875275,
-0.04830443486571312,
0.068113774061203,
0.14130432903766632,
0.08038715273141861,
0.052279386669397354,
0.005039901472628117,
-0.02571871131658554,
-0.215492382645607,
-0.3657269775867462,
-0.08521430939435959,
-0.0878765732049942,
-0.1379944235086441,
-0.2146560698747635,
-0.45650437474250793,
0.5085777044296265,
-0.08647090941667557,
-0.08469516783952713,
-0.06166280806064606,
-0.09775416553020477,
-0.27061882615089417,
0.10744576156139374,
0.11821188777685165,
0.8301045298576355,
0.16625408828258514,
0.2188902348279953,
0.18120339512825012,
-0.24685893952846527,
0.03670867532491684,
0.028986813500523567,
-0.048084523528814316,
-0.39117956161499023,
-0.34594663977622986,
-0.1515958607196808,
-0.17169678211212158,
0.008691288530826569,
0.3013528287410736,
-0.3460038900375366,
0.30652064085006714,
-0.27865517139434814,
-0.054279129952192307,
-0.1268519014120102,
-0.023212390020489693,
-0.16166621446609497,
-0.1308976411819458,
-0.16279765963554382,
0.0030434441287070513,
-0.018613338470458984,
0.06880916655063629,
-0.07297433912754059,
0.043328411877155304,
0.17787165939807892,
-0.10238870978355408,
0.30788516998291016,
0.13814303278923035,
-0.02809903956949711,
0.2491627335548401,
-0.12033955752849579,
-0.45065733790397644,
-0.05061011761426926,
0.5732137560844421,
0.43365129828453064,
0.053011391311883926,
0.06874921917915344,
-0.09891654551029205,
-0.014194054529070854,
0.39029932022094727,
-0.1978021115064621,
-0.15491263568401337,
0.4320680499076843,
0.12532703578472137,
-0.07732390612363815,
0.06692395359277725,
-0.05341731011867523,
-0.16151757538318634,
-0.07302939891815186,
-0.012171673588454723,
0.06101837009191513,
-0.3188634216785431,
0.02154170535504818,
0.2385415881872177,
0.33574220538139343,
-0.10635300725698471,
0.0380115807056427,
0.004773165564984083,
-0.005509506911039352,
0.26779577136039734,
0.0356963686645031,
-0.2979893684387207,
0.013407421298325062,
0.5746383666992188,
0.2181519865989685,
-0.020174123346805573,
0.4256412386894226,
-0.3335486948490143,
0.1248631402850151,
-0.227094829082489,
0.5075293779373169,
0.1834753453731537,
-0.20383895933628082,
0.204584002494812,
0.03836755454540253,
0.47414523363113403,
-0.0272543802857399,
-0.016722416505217552,
0.0738130509853363,
-0.007936548441648483,
0.15436989068984985,
-0.04866008833050728,
-0.3517211079597473,
0.0910365879535675,
0.22863337397575378,
0.35155510902404785,
0.34589606523513794,
-0.13896960020065308,
0.024869093671441078,
0.3707382082939148,
-0.20325158536434174,
0.17898790538311005,
0.270465612411499,
0.22274579107761383,
0.21634365618228912,
0.2249106466770172,
-0.3069206774234772,
-0.3214671015739441,
-0.03530590981245041,
-0.19339467585086823,
-0.26136279106140137,
-0.14776477217674255,
-0.06892147660255432,
0.14213845133781433,
-0.0735851526260376,
0.2744115889072418,
-0.2740538716316223,
-0.428693026304245,
0.19849060475826263,
-0.1260862499475479,
0.10449757426977158,
0.18987850844860077,
0.21517373621463776,
0.21362176537513733,
0.13811621069908142,
0.46343475580215454,
-0.27140000462532043,
-0.13523274660110474,
-0.20969867706298828,
0.1733735203742981,
-0.02206462435424328,
-0.006473970133811235,
0.1258610486984253,
-0.11786938458681107,
-0.6242126226425171,
-0.06739575415849686,
0.5685312151908875,
0.11676207184791565,
-0.042634833604097366,
-0.228072851896286,
0.05508299171924591,
0.1555529534816742,
0.2226056605577469,
0.11807526648044586,
-0.4023563861846924,
-0.33652034401893616,
0.3168424665927887,
0.15491263568401337,
-0.07925689220428467,
-0.19125664234161377,
0.2755456864833832,
-0.17168401181697845,
-0.3012569546699524,
0.18502402305603027,
0.14117829501628876,
-0.052625276148319244,
-0.33937540650367737,
0.0854598805308342,
0.202449768781662,
-0.14827577769756317,
0.40229183435440063,
0.6510437726974487,
-0.27489620447158813,
0.02343912236392498,
0.14741627871990204,
0.3377688527107239,
-0.14833301305770874,
0.43050616979599,
-0.0011161091970279813,
0.4770659804344177,
-0.005231824703514576,
0.08087697625160217,
-0.10373957455158234,
-0.4036499857902527,
0.07697337120771408,
0.13804024457931519,
-0.2588018476963043,
0.04053501412272453,
-0.03008626401424408,
-0.15368559956550598,
0.18863046169281006,
-0.34799689054489136,
-0.14804251492023468,
0.3714604377746582,
-0.24119052290916443,
0.10740018635988235,
-0.013434719294309616,
-0.1359693557024002,
0.2627216875553131,
0.24553795158863068,
-0.009992227889597416,
-0.24096280336380005,
0.37959709763526917,
0.08551450818777084,
-0.18178950250148773,
0.14682526886463165,
0.08944815397262573,
0.20304329693317413,
-0.1944682002067566,
-0.16171906888484955,
0.06935707479715347,
-0.12374679744243622,
0.08710712939500809,
0.0874502956867218,
0.03893410041928291,
-0.18455109000205994,
0.11380726099014282,
0.24773761630058289,
0.20417052507400513,
0.274082750082016,
-0.037313271313905716,
0.12912137806415558,
0.1125141978263855,
-0.0035209483467042446,
0.00931554939597845,
0.20518670976161957,
-0.0007486904505640268,
0.003896950278431177,
0.304861843585968,
0.09476733952760696,
0.3823271095752716,
-0.4848353862762451,
0.2595473527908325,
0.29372721910476685,
-0.07465147227048874,
-0.24958445131778717,
0.04230155795812607,
0.16892150044441223,
0.015546370297670364,
0.552826464176178,
-0.2686411738395691,
0.005601882003247738,
0.050806693732738495,
0.03817509114742279,
0.05144304409623146,
0.43671393394470215,
0.2386617362499237,
-0.44961220026016235,
-0.2709542214870453,
-0.2319020926952362,
-0.5596632957458496,
0.01842537522315979,
0.3477914333343506,
0.3131188154220581,
-0.24933980405330658,
0.10257092863321304,
0.07638641446828842,
0.16521628201007843,
0.04820294305682182,
-0.17678800225257874,
0.07443366199731827,
0.34125402569770813,
0.17679321765899658,
-0.2534860670566559,
-0.023443831130862236,
0.2920180857181549,
-0.1093696728348732,
-0.2514943480491638,
0.1846386194229126,
0.07253073900938034,
-0.007318878546357155,
0.17855194211006165,
0.17028436064720154,
-0.22358152270317078,
0.4020432233810425,
0.633893609046936,
0.08536998927593231,
0.02355014905333519,
-0.19988031685352325,
0.24535182118415833,
0.32068324089050293,
-0.04037566855549812,
-0.19774751365184784,
-0.0849016085267067,
0.08710689842700958,
0.18331214785575867,
-0.3971986770629883,
0.3609263002872467,
-0.2117161899805069,
-0.11294596642255783,
0.12772831320762634,
0.06514489650726318,
-0.5358830690383911,
0.049110207706689835,
0.0694134309887886,
0.17668886482715607,
0.13684026896953583,
0.3822602331638336,
0.012054149992763996,
0.34513822197914124,
-0.1944080889225006,
-0.12887312471866608,
0.3826499581336975,
-0.18387004733085632,
-0.312028706073761,
-0.18203550577163696,
0.3298676609992981,
-0.05158010497689247,
-0.10722154378890991,
-0.3974067270755768,
0.11220578104257584,
0.4550143778324127,
-0.2239275723695755,
0.012750503607094288,
0.5110883712768555,
-0.20354172587394714,
0.1770406812429428,
0.13639183342456818,
0.5885227918624878,
0.1271749883890152,
-0.3351361155509949,
-0.004046009853482246,
-0.30075299739837646
] |
https://github.com/huggingface/datasets/issues/1993
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
|
Hi, I experimented with RAG.
Actually, you can run the [use_own_knowldge_dataset.py](https://github.com/shamanez/transformers/blob/rag-end-to-end-retrieval/examples/research_projects/rag/use_own_knowledge_dataset.py#L80). In the 80 you can save the dataset object to the disk with save_to_disk. Then in order to compute the embeddings in this use **load_from_disk**.
Then finally save it. You can see the original dataset object (CSV after splitting also will be changed)
One more thing- when I save the dataset object with **save_to_disk** it name the arrow file with cache.... rather than using dataset. arrow. Can you add a variable that we can feed a name to save_to_disk function?
|
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
| 91
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
Hi, I experimented with RAG.
Actually, you can run the [use_own_knowldge_dataset.py](https://github.com/shamanez/transformers/blob/rag-end-to-end-retrieval/examples/research_projects/rag/use_own_knowledge_dataset.py#L80). In the 80 you can save the dataset object to the disk with save_to_disk. Then in order to compute the embeddings in this use **load_from_disk**.
Then finally save it. You can see the original dataset object (CSV after splitting also will be changed)
One more thing- when I save the dataset object with **save_to_disk** it name the arrow file with cache.... rather than using dataset. arrow. Can you add a variable that we can feed a name to save_to_disk function?
|
[
-0.29817405343055725,
-0.08286581933498383,
0.026727518066763878,
0.14940015971660614,
0.3067891597747803,
0.1228000596165657,
-0.05620715394616127,
-0.061476580798625946,
0.04452816769480705,
0.05419410765171051,
-0.06526199728250504,
0.37382468581199646,
0.021563466638326645,
0.10119786858558655,
0.14740122854709625,
0.2532069683074951,
0.1987999528646469,
0.2516978085041046,
-0.26881980895996094,
-0.09719415754079819,
-0.219724640250206,
-0.2309301793575287,
0.05293353274464607,
-0.3456067144870758,
-0.21621206402778625,
-0.26786455512046814,
-0.17009751498699188,
0.0145701440051198,
0.10322407633066177,
-0.039821773767471313,
0.16396020352840424,
0.13002468645572662,
0.3564487397670746,
0.27651503682136536,
-0.00012225650425534695,
0.04494712874293327,
-0.32678619027137756,
-0.16619664430618286,
-0.39741411805152893,
-0.1439911276102066,
0.1779918372631073,
-0.2638610601425171,
0.06470725685358047,
-0.3373185396194458,
-0.044643256813287735,
-0.1765093356370926,
-0.10760533064603806,
-0.2636469602584839,
0.6995686888694763,
-0.3083573281764984,
0.06561897695064545,
-0.05405174195766449,
-0.24225929379463196,
0.0614367350935936,
-0.07604087889194489,
0.2449968159198761,
0.11913652718067169,
0.15196853876113892,
-0.048497386276721954,
0.22260376811027527,
-0.14047428965568542,
0.2548883855342865,
-0.20618534088134766,
-0.1893686205148697,
0.39679279923439026,
-0.0019804397597908974,
0.07554019242525101,
-0.3313624858856201,
0.07828713953495026,
-0.00028131392900832,
0.787636935710907,
-0.4693838655948639,
-0.332303911447525,
-0.23040242493152618,
0.220109760761261,
-0.07076099514961243,
0.04334115982055664,
0.2069176286458969,
0.013548430055379868,
0.22217978537082672,
-0.44723933935165405,
-0.8105937838554382,
-0.13997630774974823,
0.14884664118289948,
0.08192195743322372,
-0.49451541900634766,
0.023887837305665016,
0.14838458597660065,
0.20776215195655823,
0.28974494338035583,
0.37283065915107727,
-0.25498220324516296,
-0.1742679923772812,
0.10398511588573456,
-0.30444100499153137,
-0.24418599903583527,
-0.2922521233558655,
0.05695188045501709,
-0.05470502749085426,
0.3812347948551178,
0.13492850959300995,
-0.03296423330903053,
-0.2412484884262085,
0.17376884818077087,
0.17379367351531982,
0.289712518453598,
0.11092570424079895,
0.17060424387454987,
0.13796144723892212,
0.0049736942164599895,
-0.21062494814395905,
-0.10551638156175613,
0.11871804296970367,
0.13158239424228668,
0.5387066602706909,
-0.2161186933517456,
0.21053571999073029,
0.045655522495508194,
0.12340015172958374,
0.012618066743016243,
0.05493326112627983,
-0.04813056439161301,
-0.17759256064891815,
0.3871256411075592,
0.08201777935028076,
0.1812807321548462,
0.15064921975135803,
0.23661036789417267,
0.02287634089589119,
-0.1150491014122963,
-0.12618303298950195,
-0.03480963036417961,
-0.29006466269493103,
0.3913135230541229,
0.2009623944759369,
-0.09959911555051804,
0.1868818700313568,
0.40649303793907166,
-0.4346122443675995,
-0.15990692377090454,
0.014104793779551983,
-0.23744334280490875,
0.5390252470970154,
0.17504285275936127,
0.052203692495822906,
0.20256154239177704,
0.005105582997202873,
-0.04552100598812103,
-0.16679958999156952,
0.5195534229278564,
-0.27199867367744446,
-0.18111446499824524,
0.10250954329967499,
0.09023226797580719,
-0.1660819798707962,
0.21139490604400635,
-0.43405288457870483,
0.1076636090874672,
0.057343292981386185,
-0.12934747338294983,
0.16638481616973877,
0.03110223077237606,
-0.3366870582103729,
-0.27857309579849243,
0.06284616142511368,
0.30723607540130615,
-0.4218386709690094,
-0.16415782272815704,
0.06189187988638878,
-0.09403958171606064,
-0.20570538938045502,
0.2003055065870285,
-0.28435903787612915,
0.29752597212791443,
-0.2760418653488159,
-0.2422114759683609,
0.5749616026878357,
-0.028733795508742332,
-0.4812779128551483,
0.15325625240802765,
0.02535930648446083,
0.005696077365428209,
0.001656777341850102,
0.6175722479820251,
0.31914135813713074,
-0.13990013301372528,
-0.4540529251098633,
0.3999418616294861,
0.15783514082431793,
0.10492616891860962,
0.021871019154787064,
-0.295714795589447,
0.21839386224746704,
-0.28689661622047424,
-0.1871245801448822,
0.3673585057258606,
0.2825944423675537,
0.26465505361557007,
0.36159226298332214,
0.02343379147350788,
0.15545479953289032,
0.3602965176105499,
0.02204848825931549,
0.034086402505636215,
-0.10741904377937317,
0.05277242138981819,
-0.6752660870552063,
-0.0008340944186784327,
0.15547612309455872,
-0.5374921560287476,
0.1736091673374176,
-0.19348570704460144,
-0.0924270823597908,
-0.16534608602523804,
-0.08859280496835709,
-0.013569248840212822,
-0.08976833522319794,
-0.030893107876181602,
-0.044163525104522705,
-0.2119160145521164,
-0.2746402323246002,
0.4201807379722595,
-0.03764274716377258,
0.17623256146907806,
-0.6207959651947021,
0.4170430898666382,
0.19731462001800537,
-0.21418806910514832,
-0.16175435483455658,
-0.08378916233778,
0.22957918047904968,
0.018592996522784233,
-0.051257017999887466,
0.3639729619026184,
0.16893409192562103,
0.37207597494125366,
0.05819984897971153,
0.12339424341917038,
0.028112798929214478,
-0.1681799441576004,
0.2201290726661682,
-0.043515074998140335,
0.16424483060836792,
-0.12329445779323578,
-0.25302159786224365,
0.08864092826843262,
-0.1890539675951004,
0.1372634917497635,
0.08674997836351395,
-0.1663258671760559,
-0.011845753528177738,
-0.3778165578842163,
-0.08425335586071014,
-0.2564432919025421,
-0.2976902425289154,
0.18484070897102356,
0.44589757919311523,
0.06325370818376541,
0.024988211691379547,
-0.1737440526485443,
0.31633204221725464,
-0.17564710974693298,
0.011917756870388985,
0.015270109288394451,
-0.39196425676345825,
-0.06950144469738007,
-0.1718241572380066,
0.4888995885848999,
0.10107839107513428,
0.08916036784648895,
0.06313957273960114,
0.106102854013443,
0.12016256898641586,
0.040463581681251526,
0.03418410196900368,
0.018937844783067703,
0.5688114762306213,
0.32381197810173035,
0.026262911036610603,
0.03925562649965286,
-0.15863507986068726,
0.4841209948062897,
0.1311216801404953,
-0.15808655321598053,
-0.20299917459487915,
0.060250915586948395,
-0.12024784833192825,
0.2065156251192093,
-0.48766499757766724,
-0.18659277260303497,
-0.33270782232284546,
0.10924708098173141,
-0.25651422142982483,
0.6586430072784424,
0.21084517240524292,
0.27177906036376953,
0.15876872837543488,
0.04561617970466614,
-0.12482946366071701,
-0.42189574241638184,
-0.0536406971514225,
-0.03125471994280815,
0.03746001794934273,
-0.09090139716863632,
-0.01816626451909542,
0.03502611443400383,
0.47154924273490906,
0.11380165815353394,
-0.030669279396533966,
-0.5500059127807617,
0.09202879667282104,
-0.07754867523908615,
0.2022339105606079,
0.08275789767503738,
-0.18597540259361267,
0.1372917890548706,
-0.23666010797023773,
-0.07456483691930771,
-0.11089527606964111,
-0.45801323652267456,
-0.1761934608221054,
-0.00464443676173687,
0.06758377701044083,
0.3397306203842163,
0.03211982920765877,
-0.30952081084251404,
-0.06574418395757675,
-0.07723850756883621,
-0.11416622996330261,
-0.18192431330680847,
-0.01222609356045723,
-0.053161073476076126,
0.16598288714885712,
-0.2359539270401001,
0.23220451176166534,
0.005328015424311161,
-0.20060263574123383,
-0.46616217494010925,
0.441253662109375,
0.12451702356338501,
-0.12371837347745895,
0.26411429047584534,
-0.28157269954681396,
-0.16563479602336884,
0.4785479009151459,
-0.5246484279632568,
-0.1548045426607132,
0.05580004304647446,
0.1381169557571411,
-0.34035274386405945,
0.4552120268344879,
0.30212128162384033,
0.04765728488564491,
0.014021474868059158,
-0.07247690111398697,
-0.2228306531906128,
0.0957024097442627,
0.04299961030483246,
0.4033214747905731,
-0.1240110993385315,
0.18965131044387817,
-0.05261021479964256,
0.4766652584075928,
0.04825324937701225,
-0.13042303919792175,
0.28029292821884155,
0.19504399597644806,
0.4728262722492218,
-0.13714945316314697,
-0.12039549648761749,
-0.4867360293865204,
-0.2577694356441498,
-0.2264500856399536,
-0.01976552978157997,
0.0007059512427076697,
0.05172856152057648,
-0.09430041909217834,
-0.2863282561302185,
-0.1904699206352234,
-0.20414191484451294,
0.07615835964679718,
-0.21137355268001556,
0.3135751783847809,
0.057279955595731735,
0.18358339369297028,
0.12215280532836914,
-0.17768967151641846,
0.09917005151510239,
0.1698625236749649,
0.40226680040359497,
0.015011418610811234,
-0.3136453628540039,
0.008282529190182686,
-0.15071752667427063,
0.14578381180763245,
-0.20087087154388428,
-0.10887440294027328,
0.2638165056705475,
-0.09607873111963272,
0.08261306583881378,
0.23463568091392517,
0.8441629409790039,
0.0945909321308136,
0.09366843104362488,
0.04526321217417717,
-0.29115763306617737,
-0.28527572751045227,
0.05575334653258324,
0.013880585320293903,
-0.23699001967906952,
-0.14522479474544525,
0.6316406726837158,
0.002897482831031084,
-0.05835190415382385,
-0.16309618949890137,
0.5997645258903503,
-0.4410640299320221,
-0.37100592255592346,
-0.1498333364725113,
-0.14239877462387085,
-0.5282946825027466,
-0.22749833762645721,
-0.27837368845939636,
-0.16511419415473938,
-0.16571642458438873,
0.12169237434864044,
-0.3377400040626526,
-0.07975105196237564,
0.11862242221832275,
-0.13861286640167236,
0.3896145224571228,
0.23845060169696808,
0.0550583079457283,
0.18101538717746735,
0.31517380475997925,
0.21134142577648163,
0.47704407572746277,
-0.21939627826213837,
-0.3072482943534851,
-0.19563929736614227,
0.1561984121799469,
0.19013527035713196,
0.10894619673490524,
0.05556632950901985,
0.04378071427345276,
-0.0478341244161129,
-0.1942569613456726,
-0.4450426995754242,
-0.13473694026470184,
-0.16567105054855347,
-0.09903951734304428,
-0.19163887202739716,
-0.46908605098724365,
0.6322373151779175,
-0.17398962378501892,
-0.13161994516849518,
-0.12352092564105988,
-0.06653022766113281,
-0.2540268003940582,
0.3347472846508026,
0.1608256697654724,
0.9694910049438477,
0.04729413986206055,
0.15498086810112,
0.1151883453130722,
-0.3309186100959778,
0.11469805240631104,
-0.09529750049114227,
-0.055606815963983536,
-0.4986635446548462,
-0.23652558028697968,
-0.15014052391052246,
-0.14996226131916046,
0.036953553557395935,
0.4310844838619232,
-0.37882938981056213,
0.3566516637802124,
-0.320109099149704,
-0.029679158702492714,
-0.15644359588623047,
0.17677490413188934,
-0.14080265164375305,
-0.2388235181570053,
-0.11668701469898224,
-0.01697603054344654,
0.009541366249322891,
0.11326426267623901,
0.03705315664410591,
0.026938926428556442,
0.18994243443012238,
-0.01980075053870678,
0.25040608644485474,
0.16207203269004822,
-0.08534111827611923,
0.3151881694793701,
-0.16686993837356567,
-0.5314212441444397,
-0.01075787004083395,
0.5266745686531067,
0.5019896626472473,
0.0503394640982151,
0.0927923247218132,
-0.012975955381989479,
0.02958672121167183,
0.279066264629364,
-0.14641712605953217,
-0.1045440211892128,
0.47247111797332764,
0.17529502511024475,
-0.2453802227973938,
0.20790837705135345,
-0.09597029536962509,
-0.10675370693206787,
0.07702228426933289,
-0.04533270373940468,
0.2414695918560028,
-0.3650994896888733,
0.04468267410993576,
0.26737016439437866,
0.27660316228866577,
-0.0850389152765274,
-0.010688387788832188,
0.035598862916231155,
0.0274102371186018,
0.296217143535614,
0.021651217713952065,
-0.2268112748861313,
0.0739024356007576,
0.45795267820358276,
0.22981023788452148,
0.0274659413844347,
0.45297905802726746,
-0.3027491569519043,
0.0437542088329792,
-0.23488985002040863,
0.3578222990036011,
0.15582430362701416,
-0.2728918194770813,
0.16409344971179962,
0.14993105828762054,
0.35210132598876953,
-0.07665516436100006,
-0.18729162216186523,
0.09608271718025208,
0.009518672712147236,
-0.03171118348836899,
-0.09279251098632812,
-0.3228537142276764,
0.15019193291664124,
0.31223657727241516,
0.38560667634010315,
0.2359107881784439,
-0.2864783704280853,
-0.04252461716532707,
0.48291224241256714,
-0.20216578245162964,
0.22362691164016724,
0.28586843609809875,
0.2984408140182495,
0.015572531148791313,
0.12224024534225464,
-0.26307156682014465,
-0.3910292983055115,
-0.043940041214227676,
-0.2537713050842285,
-0.29284292459487915,
-0.11671418696641922,
-0.09365017712116241,
0.16134341061115265,
-0.1719067096710205,
0.2861398756504059,
-0.37945491075515747,
-0.44281890988349915,
0.2977701425552368,
-0.23305247724056244,
0.17791931331157684,
0.26347818970680237,
0.2481665462255478,
0.2294876128435135,
0.19043046236038208,
0.3597930073738098,
-0.3228967487812042,
-0.03726192191243172,
-0.20045685768127441,
0.17675058543682098,
0.019368411973118782,
0.043783970177173615,
-0.00809332076460123,
-0.10492680221796036,
-0.5006388425827026,
-0.06236397475004196,
0.5708613991737366,
0.037783652544021606,
0.07529135048389435,
-0.11215824633836746,
-0.07330816984176636,
0.07649408280849457,
0.25858017802238464,
0.14246690273284912,
-0.31663960218429565,
-0.31156036257743835,
0.3152829110622406,
0.10834696143865585,
-0.16606155037879944,
-0.145503431558609,
0.2591187059879303,
-0.3066042959690094,
-0.22802908718585968,
0.1627313494682312,
0.040792495012283325,
0.003028110833838582,
-0.3377051055431366,
0.01882387325167656,
0.3602539002895355,
-0.15658614039421082,
0.30479899048805237,
0.4423646330833435,
-0.09671491384506226,
-0.06778623163700104,
0.10520613938570023,
0.34286901354789734,
0.058396585285663605,
0.24083653092384338,
-0.06066353991627693,
0.3778838813304901,
-0.01587304100394249,
0.06116248294711113,
-0.03119426965713501,
-0.4003713130950928,
0.06756014376878738,
0.22075416147708893,
-0.23215055465698242,
0.024522574618458748,
0.009770331904292107,
0.014513987116515636,
0.2708440124988556,
-0.35103899240493774,
-0.15195447206497192,
0.38623711466789246,
-0.06748075038194656,
0.06490679830312729,
0.05013478919863701,
-0.10280032455921173,
0.2203303575515747,
0.26041939854621887,
-0.005928005091845989,
-0.37651482224464417,
0.3823733925819397,
0.15470029413700104,
-0.03719212859869003,
0.14263717830181122,
0.09615427255630493,
0.1613834649324417,
-0.05675668641924858,
-0.2217998206615448,
-0.069908007979393,
0.015248613432049751,
0.16016854345798492,
0.045415423810482025,
-0.0462479405105114,
-0.11481714993715286,
0.05294042453169823,
0.11007694900035858,
0.33444657921791077,
0.30771300196647644,
-0.0333203561604023,
0.08864579349756241,
-0.014723091386258602,
-0.10163338482379913,
0.010187231935560703,
0.20183737576007843,
0.0004490231513045728,
0.018006516620516777,
0.11056481301784515,
0.018414584919810295,
0.33748525381088257,
-0.3615120053291321,
0.2868886888027191,
0.36281222105026245,
-0.1820765733718872,
-0.16692201793193817,
0.03225959092378616,
0.1311509907245636,
-0.02885981649160385,
0.6571773290634155,
-0.31290051341056824,
-0.001436168560758233,
0.11267159879207611,
0.02959437668323517,
-0.1300792396068573,
0.29193365573883057,
0.38862353563308716,
-0.4222641587257385,
-0.26381877064704895,
-0.1415782868862152,
-0.5935497879981995,
-0.07036622613668442,
0.2431904822587967,
0.12785764038562775,
-0.23381666839122772,
0.13241048157215118,
0.20796756446361542,
0.250552773475647,
-0.04677268862724304,
-0.23026661574840546,
0.1695551872253418,
0.3301641047000885,
0.08325306326150894,
-0.23906682431697845,
-0.0924554094672203,
0.40593722462654114,
-0.07990194857120514,
-0.3620834946632385,
0.04150756075978279,
0.18964925408363342,
-0.05733909085392952,
0.24552211165428162,
0.191970556974411,
0.00945595558732748,
0.30012890696525574,
0.6162527799606323,
-0.019049638882279396,
-0.002050861017778516,
-0.20478962361812592,
0.2092386931180954,
0.4031704366207123,
0.022274725139141083,
-0.14015981554985046,
-0.09945105761289597,
0.12383324652910233,
0.2696540355682373,
-0.43714022636413574,
0.3272203207015991,
-0.2485329657793045,
-0.1709989458322525,
0.06427494436502457,
0.08513954281806946,
-0.43158575892448425,
0.05096472054719925,
0.1431974470615387,
0.2185954451560974,
0.18202245235443115,
0.37845534086227417,
-0.06858571618795395,
0.3610670864582062,
-0.1881100833415985,
-0.10090392082929611,
0.475373238325119,
-0.15663361549377441,
-0.20169539749622345,
-0.0870276391506195,
0.42870447039604187,
-0.08216584473848343,
0.02847822569310665,
-0.5293524861335754,
0.09171753376722336,
0.460917204618454,
-0.23072689771652222,
-0.05105411261320114,
0.4078029990196228,
-0.0736478790640831,
0.1740238219499588,
0.047764889895915985,
0.4229540228843689,
0.10436447709798813,
-0.32735463976860046,
-0.17451095581054688,
-0.3433348536491394
] |
https://github.com/huggingface/datasets/issues/1993
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
|
@lhoestq I also found that cache in tmp directory gets updated after transformations. This is really problematic when using datasets interactively. Let's say we use the shards function to a dataset loaded with csv, atm when we do transformations to shards and combine them it updates the original csv cache.
|
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
| 50
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
@lhoestq I also found that cache in tmp directory gets updated after transformations. This is really problematic when using datasets interactively. Let's say we use the shards function to a dataset loaded with csv, atm when we do transformations to shards and combine them it updates the original csv cache.
|
[
-0.37754201889038086,
-0.1095244511961937,
0.0013312350492924452,
0.2857872545719147,
0.2583913803100586,
0.1318967342376709,
-0.07237003743648529,
-0.09192640334367752,
-0.041413526982069016,
-0.07030775398015976,
-0.0545121431350708,
0.2699585556983948,
0.02323598973453045,
0.07323327660560608,
0.19652168452739716,
0.24763022363185883,
0.26209545135498047,
0.21151697635650635,
-0.4262392222881317,
-0.05111543834209442,
-0.2185802161693573,
-0.14059147238731384,
-0.004783918149769306,
-0.2865775227546692,
-0.22525981068611145,
-0.35676392912864685,
-0.09278801828622818,
0.07167575508356094,
0.2163684368133545,
0.08951298892498016,
0.19704489409923553,
0.13676121830940247,
0.21895958483219147,
0.39624863862991333,
-0.0001211941271321848,
0.04042859375476837,
-0.3316936492919922,
-0.11564692109823227,
-0.3154451847076416,
-0.05379784479737282,
0.00012840885028708726,
-0.2120247483253479,
0.052578605711460114,
-0.2816855013370514,
-0.04688850790262222,
0.006446297746151686,
-0.10754092782735825,
-0.3362380862236023,
0.5601174831390381,
-0.29090791940689087,
0.06847035139799118,
-0.12584355473518372,
-0.34357398748397827,
0.14752064645290375,
-0.27728554606437683,
0.3350464403629303,
0.13800974190235138,
-0.10395509004592896,
-0.0801338329911232,
0.34436094760894775,
0.015506432391703129,
0.2434512972831726,
-0.2749493420124054,
-0.1867033988237381,
0.3630909025669098,
-0.039934542030096054,
0.05853515490889549,
-0.25517839193344116,
0.21353629231452942,
-0.050243180245161057,
0.7311304807662964,
-0.43200984597206116,
-0.2579137086868286,
-0.2524370551109314,
0.06725958734750748,
-0.06089822202920914,
0.18811936676502228,
0.26485463976860046,
0.10209660232067108,
0.17737488448619843,
-0.6674372553825378,
-0.7337231636047363,
-0.025395408272743225,
0.13377311825752258,
-0.016303056851029396,
-0.5745195746421814,
0.0006100009777583182,
0.14879129827022552,
0.06244325265288353,
0.2391049861907959,
0.48661673069000244,
-0.23711203038692474,
-0.30872777104377747,
0.1965995877981186,
-0.3022066354751587,
-0.18647053837776184,
-0.22561544179916382,
0.23952186107635498,
-0.10681088268756866,
0.1615787148475647,
0.07342284917831421,
-0.04339039325714111,
-0.3852357566356659,
0.12986765801906586,
0.14770875871181488,
0.32104796171188354,
0.15081192553043365,
0.21132540702819824,
0.10894572734832764,
-0.1171291247010231,
-0.22138278186321259,
-0.07700586318969727,
0.25590091943740845,
0.07555545121431351,
0.623958945274353,
-0.2735370099544525,
0.17770527303218842,
0.022185740992426872,
0.17906099557876587,
0.016073718667030334,
0.14828833937644958,
-0.038849689066410065,
-0.1566101312637329,
0.34015777707099915,
0.04541899636387825,
0.1725085824728012,
0.1815042495727539,
0.1542685478925705,
-0.06000810116529465,
-0.14816837012767792,
-0.17221195995807648,
-0.14594481885433197,
-0.29521769285202026,
0.4529229700565338,
0.16972264647483826,
-0.007034763228148222,
0.08875501900911331,
0.4451128840446472,
-0.4322243630886078,
-0.12009064853191376,
-0.0233444906771183,
-0.15216785669326782,
0.4138377606868744,
0.23239679634571075,
0.13514742255210876,
0.21690978109836578,
-0.030757959932088852,
0.02873309887945652,
-0.08697932213544846,
0.6420639753341675,
-0.3159516453742981,
-0.15361671149730682,
0.21987777948379517,
0.08554688096046448,
-0.20152612030506134,
0.13202831149101257,
-0.6194597482681274,
0.17275820672512054,
0.27166125178337097,
-0.1368691772222519,
0.15670540928840637,
0.04619218409061432,
-0.381090372800827,
-0.2422448843717575,
-0.09710920602083206,
0.340614914894104,
-0.42462867498397827,
-0.21635156869888306,
0.2547139525413513,
-0.12895037233829498,
-0.22419142723083496,
0.2647132873535156,
-0.2679205536842346,
0.2254055142402649,
-0.2347068041563034,
-0.34675219655036926,
0.5462711453437805,
0.055227529257535934,
-0.3988834619522095,
0.08374479413032532,
0.05449485778808594,
-0.04536319896578789,
-0.0010168576845899224,
0.5464829802513123,
0.1674201637506485,
-0.1307806670665741,
-0.5164815187454224,
0.397306352853775,
0.11928842961788177,
0.176274374127388,
0.03911158815026283,
-0.1514863222837448,
0.2610327899456024,
-0.2685464918613434,
-0.08253385126590729,
0.4303964376449585,
0.29137933254241943,
0.2922707498073578,
0.21428710222244263,
0.022637926042079926,
0.18943291902542114,
0.3739199936389923,
-0.18425437808036804,
0.1289745420217514,
-0.12209340929985046,
0.1327107697725296,
-0.6422817707061768,
0.00011561451538000256,
0.16691075265407562,
-0.6285813450813293,
0.23269861936569214,
-0.08321276307106018,
0.024500222876667976,
-0.1535639464855194,
-0.024238960817456245,
0.06090497598052025,
-0.10612968355417252,
0.019947364926338196,
-0.0505506657063961,
-0.22838973999023438,
-0.24817302823066711,
0.6387434601783752,
-0.02998112142086029,
0.108173668384552,
-0.6304486989974976,
0.3527705669403076,
0.2514098882675171,
-0.24752868711948395,
-0.38311854004859924,
-0.12129192054271698,
0.20036815106868744,
-0.09780378639698029,
-0.21136458218097687,
0.4761023223400116,
0.22510401904582977,
0.39980268478393555,
0.006494587287306786,
0.25754669308662415,
0.05051395669579506,
0.044482775032520294,
0.210492804646492,
-0.1847691684961319,
0.08736138790845871,
-0.09541509300470352,
-0.17553699016571045,
0.019160274416208267,
-0.20413728058338165,
0.078202024102211,
0.10501439869403839,
-0.2045372575521469,
0.10932034254074097,
-0.29500091075897217,
0.01160437148064375,
-0.23389841616153717,
-0.30991578102111816,
0.14548414945602417,
0.30097696185112,
0.11183444410562515,
-0.08312611281871796,
-0.1830667108297348,
0.23582157492637634,
-0.23094293475151062,
-0.027027931064367294,
0.001254522823728621,
-0.33786100149154663,
-0.052565380930900574,
-0.13863614201545715,
0.5303158164024353,
0.19115428626537323,
0.06689362972974777,
-0.0152237918227911,
0.12227078527212143,
0.13134101033210754,
-0.036239124834537506,
-0.008472458459436893,
0.007146415300667286,
0.41043516993522644,
0.2127818912267685,
-0.060965824872255325,
0.10459833592176437,
-0.1168995350599289,
0.4943220913410187,
0.14551857113838196,
-0.1304634064435959,
-0.3501492142677307,
0.10025571286678314,
-0.1553591936826706,
0.007296728901565075,
-0.3188314735889435,
-0.09770850837230682,
-0.20956294238567352,
0.10841037333011627,
-0.2698788642883301,
0.7121253609657288,
0.26778075098991394,
0.21807825565338135,
0.1329811066389084,
0.10297714173793793,
-0.0710621327161789,
-0.4081368148326874,
-0.09470325708389282,
-0.07534328103065491,
-0.041188884526491165,
-0.08888237923383713,
0.03538164868950844,
-0.030643586069345474,
0.38857975602149963,
-0.11652307212352753,
0.10273949056863785,
-0.45806601643562317,
0.07158264517784119,
-0.08045660704374313,
0.10026460886001587,
0.12043308466672897,
-0.2551063895225525,
0.24486784636974335,
-0.4125901162624359,
0.032543838024139404,
-0.10878798365592957,
-0.4531973600387573,
-0.1931728571653366,
0.04594028368592262,
0.05402280390262604,
0.1399482786655426,
0.033858925104141235,
-0.17221085727214813,
-0.01544275227934122,
-0.037510279566049576,
-0.16209028661251068,
-0.16273172199726105,
0.05639657378196716,
0.16281002759933472,
0.07242826372385025,
-0.3136127293109894,
0.16135674715042114,
0.13591763377189636,
-0.31480857729911804,
-0.6189991235733032,
0.3667173385620117,
0.12393726408481598,
-0.1368626356124878,
0.24166207015514374,
-0.11942148208618164,
-0.05199248716235161,
0.5253453254699707,
-0.66105055809021,
-0.05363089591264725,
0.02783813700079918,
0.14800313115119934,
-0.34200596809387207,
0.36857056617736816,
0.36708569526672363,
0.05876939371228218,
0.017557865008711815,
-0.07956700026988983,
-0.21936725080013275,
0.035543154925107956,
0.1981675773859024,
0.341622918844223,
-0.14888976514339447,
0.16826796531677246,
-0.012552004307508469,
0.35556328296661377,
-0.005212282761931419,
-0.18766891956329346,
0.34963464736938477,
0.27601855993270874,
0.5141158103942871,
-0.18929719924926758,
-0.10552235692739487,
-0.574479877948761,
-0.17700685560703278,
-0.1977817416191101,
0.030764197930693626,
0.10370448231697083,
-0.04549767076969147,
-0.1361052393913269,
-0.1728494018316269,
-0.319650262594223,
-0.16770653426647186,
0.02158685028553009,
-0.38026395440101624,
0.37668028473854065,
0.12586800754070282,
0.22621981799602509,
0.046590086072683334,
-0.19719798862934113,
-0.0069379378110170364,
0.22071996331214905,
0.3263585567474365,
0.07621380686759949,
-0.1963416039943695,
0.056026261299848557,
0.03417758643627167,
0.2427739053964615,
-0.15561801195144653,
-0.029405899345874786,
0.14116883277893066,
-0.10309704393148422,
0.03892674669623375,
0.3316906690597534,
0.7368648052215576,
0.09185372292995453,
0.09344962239265442,
0.0727233737707138,
-0.3702733814716339,
-0.29729199409484863,
-0.018584173172712326,
0.05174897611141205,
-0.2108953595161438,
-0.1065090000629425,
0.6030529737472534,
0.189717635512352,
-0.09302817285060883,
-0.3880619406700134,
0.4908542037010193,
-0.35211074352264404,
-0.42437949776649475,
-0.11214329302310944,
-0.0784946009516716,
-0.4928722083568573,
-0.19604432582855225,
-0.3165833055973053,
-0.1781638115644455,
-0.11995693296194077,
0.01841309480369091,
-0.3197627663612366,
-0.11780067533254623,
0.03561066836118698,
-0.1558903008699417,
0.3335534930229187,
0.3068915605545044,
0.08242502063512802,
0.10433993488550186,
0.18597005307674408,
0.05674285069108009,
0.3127235174179077,
-0.15553225576877594,
-0.05306030064821243,
-0.17019528150558472,
0.20262691378593445,
0.06485507637262344,
0.0702824518084526,
-0.005835038609802723,
-0.030765483155846596,
-0.13826152682304382,
-0.21538329124450684,
-0.261283814907074,
-0.010474784299731255,
-0.22100397944450378,
-0.022709650918841362,
-0.1755320280790329,
-0.4874751567840576,
0.4563179016113281,
-0.10107377916574478,
-0.18836696445941925,
-0.14760075509548187,
-0.07018619030714035,
-0.30304792523384094,
0.16354817152023315,
0.13517867028713226,
0.8293333649635315,
-0.008126931264996529,
0.1564798653125763,
0.0635271817445755,
-0.10721894353628159,
0.02561567910015583,
-0.13223117589950562,
-0.06669889390468597,
-0.3328033685684204,
-0.29062724113464355,
-0.18256738781929016,
-0.1834266185760498,
-0.018611762672662735,
0.3404773473739624,
-0.3613789677619934,
0.36384615302085876,
-0.25236162543296814,
-0.012918712571263313,
-0.06844062358140945,
-0.006190198939293623,
-0.08278845995664597,
-0.23925530910491943,
-0.12049992382526398,
0.01781528815627098,
-0.1263618916273117,
0.020652085542678833,
-0.01705741509795189,
0.1329825222492218,
0.1653866469860077,
0.0883447527885437,
0.3602740168571472,
0.08598441630601883,
-0.06145292520523071,
0.3906398117542267,
-0.16731388866901398,
-0.401643842458725,
-0.10591518133878708,
0.6008503437042236,
0.4341290593147278,
0.051047783344984055,
0.09762190282344818,
-0.034992944449186325,
0.049086835235357285,
0.29968711733818054,
-0.16710971295833588,
-0.02981424517929554,
0.4338349997997284,
0.2377779185771942,
-0.008646867237985134,
0.011345947161316872,
-0.10013952851295471,
-0.13905298709869385,
-0.01756739430129528,
-0.06503667682409286,
0.04465724527835846,
-0.3660847842693329,
0.04717035964131355,
0.2655336260795593,
0.34601378440856934,
0.03434750437736511,
0.007505325600504875,
0.07994569092988968,
0.09046363830566406,
0.39250448346138,
0.03614896535873413,
-0.32907962799072266,
0.05187216028571129,
0.508625864982605,
0.18465909361839294,
-0.09788370132446289,
0.28652095794677734,
-0.2758654057979584,
0.024217823520302773,
-0.18409468233585358,
0.4132823050022125,
0.03703721985220909,
-0.2001434862613678,
0.15993766486644745,
0.0937240794301033,
0.4383998513221741,
0.014928431250154972,
-0.13484251499176025,
0.04533647745847702,
0.002242733258754015,
0.012986816465854645,
-0.057301320135593414,
-0.3163823187351227,
0.11817879974842072,
0.24677030742168427,
0.35346800088882446,
0.3582068979740143,
-0.23772986233234406,
-0.009120840579271317,
0.470521479845047,
-0.18575191497802734,
0.13024471700191498,
0.3519052267074585,
0.32944661378860474,
0.28432855010032654,
0.12919512391090393,
-0.29156219959259033,
-0.3496345281600952,
-0.062204521149396896,
-0.22978605329990387,
-0.3173736035823822,
-0.1254490464925766,
0.005991097539663315,
0.17603066563606262,
-0.053444501012563705,
0.15711767971515656,
-0.3403254449367523,
-0.4503936171531677,
0.27656102180480957,
-0.25103962421417236,
0.13607214391231537,
0.17085865139961243,
0.08420482277870178,
0.1272510141134262,
0.19555823504924774,
0.4348475933074951,
-0.2793300151824951,
-0.020502524450421333,
-0.20999321341514587,
0.08227672427892685,
-0.13716840744018555,
-0.0476505421102047,
0.06809426844120026,
-0.11273159831762314,
-0.5614910125732422,
0.00717691145837307,
0.7099941968917847,
0.14698971807956696,
0.08457348495721817,
-0.226166769862175,
0.03066183067858219,
0.1549825817346573,
0.24252042174339294,
0.02659512497484684,
-0.26304101943969727,
-0.32620787620544434,
0.3222833275794983,
0.10722340643405914,
0.0007807019865140319,
-0.11873777210712433,
0.2667149603366852,
-0.10833285003900528,
-0.29156211018562317,
0.16601185500621796,
0.11827276647090912,
0.04919988289475441,
-0.18925327062606812,
0.08280611783266068,
0.41469696164131165,
-0.21380211412906647,
0.32868126034736633,
0.509899377822876,
-0.2169274091720581,
0.05001326650381088,
0.1384071260690689,
0.34383314847946167,
-0.18013404309749603,
0.43856701254844666,
0.0227653905749321,
0.48022499680519104,
-0.004278277046978474,
0.09633266925811768,
-0.04118004068732262,
-0.4797658324241638,
0.08668485283851624,
0.06853540986776352,
-0.26143333315849304,
0.09010966867208481,
0.03875058516860008,
0.004292953293770552,
0.17114697396755219,
-0.3964395821094513,
-0.17469778656959534,
0.48005110025405884,
-0.15264752507209778,
0.0949186384677887,
0.10180787742137909,
-0.11124619841575623,
0.2824837267398834,
0.21118271350860596,
-0.05955074727535248,
-0.27540111541748047,
0.42765969038009644,
0.1697072833776474,
-0.04299251362681389,
0.06445920467376709,
0.09705602377653122,
0.11542414128780365,
-0.11765803396701813,
-0.16955144703388214,
0.0883059874176979,
-0.10255053639411926,
0.08091938495635986,
0.026896411553025246,
-0.00968978088349104,
-0.2110140025615692,
0.0987919494509697,
0.08454588055610657,
0.3834228217601776,
0.30577361583709717,
-0.02336127869784832,
0.166069895029068,
0.16435693204402924,
-0.15702348947525024,
-0.0190255306661129,
0.1402451992034912,
-0.0021696658805012703,
0.04489760100841522,
0.21790547668933868,
-0.030038410797715187,
0.440035343170166,
-0.37978076934814453,
0.2381945103406906,
0.3017781376838684,
-0.10426787286996841,
-0.1633945107460022,
0.057911623269319534,
0.1083802655339241,
0.033422742038965225,
0.5928030014038086,
-0.36716213822364807,
-0.024095499888062477,
0.0383855439722538,
0.03055310994386673,
0.06659084558486938,
0.4713377356529236,
0.2755858302116394,
-0.3269460201263428,
-0.2479609251022339,
-0.14929373562335968,
-0.5072791576385498,
-0.05646586790680885,
0.34513381123542786,
0.3302532434463501,
-0.34884965419769287,
0.09018353372812271,
0.09226860851049423,
0.22554828226566315,
-0.005446135066449642,
-0.16825982928276062,
0.17589731514453888,
0.32265499234199524,
0.04734142869710922,
-0.23220932483673096,
-0.022588277235627174,
0.293155699968338,
-0.11412553489208221,
-0.18152038753032684,
0.11771140247583389,
0.14786873757839203,
-0.017084861174225807,
0.17777366936206818,
0.14910878241062164,
-0.06927002966403961,
0.3727109432220459,
0.5638622641563416,
0.012229349464178085,
0.08368854969739914,
-0.10309848189353943,
0.3902330994606018,
0.316150426864624,
-0.14954888820648193,
-0.05360890179872513,
-0.14879363775253296,
0.06823062151670456,
0.1575765609741211,
-0.507230281829834,
0.25093787908554077,
-0.16798023879528046,
-0.20849932730197906,
0.09727474302053452,
0.1540713906288147,
-0.4413483738899231,
-0.08456628769636154,
0.01008809357881546,
0.19329604506492615,
0.05996214598417282,
0.35462450981140137,
0.03193303942680359,
0.4073846936225891,
-0.16564060747623444,
-0.1417233794927597,
0.3911105990409851,
-0.19098198413848877,
-0.29342859983444214,
-0.10841815918684006,
0.2496727555990219,
-0.12436976283788681,
-0.13439612090587616,
-0.34101372957229614,
0.10879876464605331,
0.4196590185165405,
-0.2753852605819702,
-0.012733780778944492,
0.43818801641464233,
-0.14234492182731628,
0.13404662907123566,
0.006905286572873592,
0.5526455640792847,
0.10680484771728516,
-0.2677081525325775,
-0.08256281167268753,
-0.21690146625041962
] |
https://github.com/huggingface/datasets/issues/1993
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
|
I plan to update the save_to_disk method in #2025 so I can make sure the new save_to_disk doesn't corrupt your cache files.
But from your last message it looks like save_to_disk isn't the root cause right ?
|
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
| 37
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
I plan to update the save_to_disk method in #2025 so I can make sure the new save_to_disk doesn't corrupt your cache files.
But from your last message it looks like save_to_disk isn't the root cause right ?
|
[
-0.31050875782966614,
-0.06806273013353348,
0.00468834862112999,
0.2137429565191269,
0.30936917662620544,
0.09057603031396866,
-0.035427551716566086,
0.052788931876420975,
-0.07327644526958466,
0.006162917707115412,
0.022279178723692894,
0.32425040006637573,
0.08983751386404037,
0.10398826003074646,
0.17676082253456116,
0.25470852851867676,
0.2500336468219757,
0.19376283884048462,
-0.3340511620044708,
-0.026814615353941917,
-0.22936414182186127,
-0.1129303127527237,
0.10871095955371857,
-0.28355714678764343,
-0.3304685652256012,
-0.35022276639938354,
-0.061736371368169785,
0.06746318191289902,
0.10107487440109253,
0.0025959210470318794,
0.16506338119506836,
0.16041560471057892,
0.2431454360485077,
0.2890101373195648,
-0.00011890222958754748,
0.003665231866762042,
-0.2793882191181183,
-0.09141132235527039,
-0.318210631608963,
-0.06279081851243973,
0.023771366104483604,
-0.16877588629722595,
0.06436195969581604,
-0.2784355580806732,
-0.026873616501688957,
0.04224399849772453,
-0.13028401136398315,
-0.204180508852005,
0.6294937133789062,
-0.20928595960140228,
0.12258796393871307,
-0.14593608677387238,
-0.18162299692630768,
0.026854220777750015,
-0.2328365445137024,
0.2694653868675232,
0.05544212833046913,
0.039374224841594696,
0.03925228863954544,
0.3304758071899414,
-0.08966777473688126,
0.22549909353256226,
-0.30031996965408325,
-0.23343545198440552,
0.4113830626010895,
-0.06182350590825081,
0.1770336925983429,
-0.3527986407279968,
0.1796049326658249,
-0.04075324162840843,
0.804243266582489,
-0.39454907178878784,
-0.22021561861038208,
-0.27045735716819763,
0.07716537266969681,
-0.12691166996955872,
0.18843317031860352,
0.09272720664739609,
0.07419540733098984,
0.13566069304943085,
-0.5429514050483704,
-0.8058215379714966,
-0.0792827233672142,
0.0439736545085907,
0.08492007106542587,
-0.5327275991439819,
-0.028630966320633888,
0.11436017602682114,
0.2698804438114166,
0.28035470843315125,
0.51173335313797,
-0.18186989426612854,
-0.25727856159210205,
0.11778626590967178,
-0.29568496346473694,
-0.29796168208122253,
-0.21018685400485992,
0.20073796808719635,
-0.037049051374197006,
0.23968026041984558,
0.13172942399978638,
-0.044123951345682144,
-0.28627005219459534,
0.07306385040283203,
0.1336900293827057,
0.33492302894592285,
0.07645787298679352,
0.11151359975337982,
0.09284236282110214,
0.08283105492591858,
-0.19143261015415192,
-0.08878760784864426,
0.30119821429252625,
-0.025359373539686203,
0.6220222115516663,
-0.24965249001979828,
0.30283039808273315,
-0.08097348362207413,
0.13197632133960724,
0.01980220153927803,
0.16692258417606354,
-0.030759191140532494,
-0.1410049945116043,
0.23880714178085327,
0.12607578933238983,
0.23848429322242737,
0.1625218540430069,
0.22771503031253815,
-0.08907635509967804,
-0.09524949640035629,
-0.1974940299987793,
-0.042026203125715256,
-0.2991288900375366,
0.44887736439704895,
0.17971108853816986,
-0.05503561720252037,
0.062302786856889725,
0.4448395073413849,
-0.4268715977668762,
-0.13617201149463654,
-0.05580988526344299,
-0.20858073234558105,
0.3360283374786377,
0.2015109360218048,
0.10506236553192139,
0.20187141001224518,
-0.020576268434524536,
-0.0619843415915966,
-0.08048869669437408,
0.6188941597938538,
-0.4360113739967346,
-0.2547794282436371,
0.0720275342464447,
0.1330968588590622,
-0.12926290929317474,
0.1620914340019226,
-0.6500715613365173,
0.1481626182794571,
0.18233869969844818,
-0.1603374481201172,
0.22861647605895996,
0.07850577682256699,
-0.3790603578090668,
-0.2501142919063568,
-0.07686194777488708,
0.2681683301925659,
-0.37760382890701294,
-0.09197402745485306,
0.14218313992023468,
-0.19087378680706024,
-0.07864236831665039,
0.2338196188211441,
-0.3230118155479431,
0.25654980540275574,
-0.272848904132843,
-0.29511505365371704,
0.5308732986450195,
0.10956902801990509,
-0.41933536529541016,
0.16070914268493652,
-0.04158089682459831,
-0.06763411313295364,
0.01878475956618786,
0.507046639919281,
0.12845414876937866,
-0.21252286434173584,
-0.3108479380607605,
0.2478175163269043,
0.10980703681707382,
0.05588528886437416,
-0.09571216255426407,
-0.17687450349330902,
0.23560450971126556,
-0.29864630103111267,
-0.06147320568561554,
0.45171409845352173,
0.2861814796924591,
0.4201847314834595,
0.2112659364938736,
0.009220777079463005,
0.09904098510742188,
0.3704633116722107,
-0.07463957369327545,
-0.052176982164382935,
-0.22539560496807098,
0.20607683062553406,
-0.6755849123001099,
0.04093017056584358,
0.17923800647258759,
-0.6058943271636963,
0.34950101375579834,
-0.1251087486743927,
-0.010067133232951164,
-0.2055470049381256,
-0.0684828907251358,
0.02865561842918396,
-0.04679477959871292,
0.0033021694980561733,
-0.03532066196203232,
-0.16372248530387878,
-0.27106773853302,
0.533338189125061,
-0.08458209782838821,
0.0758439302444458,
-0.6207578182220459,
0.34598496556282043,
0.13164587318897247,
-0.1627105325460434,
-0.3209211826324463,
-0.07084789127111435,
0.2944800853729248,
0.022220555692911148,
-0.13682474195957184,
0.3887174725532532,
0.196194589138031,
0.43010181188583374,
0.0012599064502865076,
0.25527504086494446,
0.09395252913236618,
-0.04226459190249443,
0.09797491878271103,
-0.19940802454948425,
0.11120721697807312,
-0.13044005632400513,
-0.12597252428531647,
-0.05688190832734108,
-0.22362984716892242,
0.06193563714623451,
0.04391767084598541,
-0.2145473212003708,
0.04352163150906563,
-0.34178850054740906,
0.02636686898767948,
-0.20485852658748627,
-0.215852290391922,
0.18394719064235687,
0.3429166376590729,
0.1599929928779602,
-0.16570723056793213,
-0.10385346412658691,
0.22462943196296692,
-0.2585541903972626,
-0.08392775803804398,
0.06092771887779236,
-0.14971403777599335,
-0.09677399694919586,
-0.15955980122089386,
0.56983882188797,
0.17994369566440582,
0.07228971272706985,
0.0952892154455185,
0.13224570453166962,
0.0780085027217865,
-0.0756995752453804,
0.006311790551990271,
-0.00983827468007803,
0.5663111209869385,
0.2622886598110199,
-0.0351024754345417,
0.11737039685249329,
-0.15125751495361328,
0.4364989399909973,
0.15876668691635132,
-0.03202812373638153,
-0.3339214324951172,
0.09730341285467148,
-0.12079828977584839,
0.04361477494239807,
-0.3793652653694153,
-0.11524315923452377,
-0.25341808795928955,
0.061788998544216156,
-0.1707235723733902,
0.7472004294395447,
0.24281546473503113,
0.14776477217674255,
0.010201441124081612,
0.1077866330742836,
-0.12988857924938202,
-0.3767109513282776,
-0.15864335000514984,
0.1013631820678711,
-0.01913851872086525,
-0.051520805805921555,
0.12565885484218597,
-0.08107156306505203,
0.38478589057922363,
-0.044968120753765106,
-0.018450457602739334,
-0.5178281664848328,
0.07051032036542892,
-0.06712758541107178,
0.07220574468374252,
0.09668432921171188,
-0.19594141840934753,
0.18189765512943268,
-0.3614751398563385,
-0.06634005904197693,
-0.1263330727815628,
-0.4590778350830078,
-0.1805952787399292,
0.056386981159448624,
0.0017033179756253958,
0.26456621289253235,
-0.06022241339087486,
-0.23893433809280396,
0.019703585654497147,
-0.06042715534567833,
-0.18623410165309906,
-0.21047338843345642,
0.06634823977947235,
0.062429577112197876,
0.13084529340267181,
-0.22011429071426392,
0.285762757062912,
0.0032424929086118937,
-0.3236315846443176,
-0.6576066613197327,
0.42790254950523376,
0.17794504761695862,
-0.2001413106918335,
0.31220728158950806,
-0.11042656749486923,
-0.026973405852913857,
0.4068777561187744,
-0.5890814065933228,
-0.19383682310581207,
0.0083888228982687,
0.10470878332853317,
-0.4142179489135742,
0.22154143452644348,
0.3652360737323761,
-0.020524155348539352,
-0.04214254394173622,
-0.037371113896369934,
-0.25526660680770874,
0.09538741409778595,
0.15433987975120544,
0.47722676396369934,
-0.2085593193769455,
0.23220498859882355,
0.03582609444856644,
0.3859616816043854,
-0.05119558051228523,
-0.04701809212565422,
0.38214537501335144,
0.2632105350494385,
0.574700117111206,
-0.25824376940727234,
-0.13345618546009064,
-0.50629723072052,
-0.25195592641830444,
-0.30961909890174866,
-0.03411514684557915,
-0.04070059582591057,
-0.06765472888946533,
-0.12603464722633362,
-0.24268653988838196,
-0.21787983179092407,
-0.19505856931209564,
0.07970502972602844,
-0.2889825105667114,
0.32724571228027344,
0.003828758839517832,
0.19084855914115906,
0.1868162751197815,
-0.20612895488739014,
-0.013895940035581589,
0.21371817588806152,
0.3998010456562042,
0.08000761270523071,
-0.32756346464157104,
0.014027679339051247,
-0.286904901266098,
0.20754584670066833,
-0.20995913445949554,
0.003059243317693472,
0.05322917923331261,
-0.013840977102518082,
0.08948200196027756,
0.20361003279685974,
0.7742388248443604,
0.1549132764339447,
0.14211764931678772,
0.16299480199813843,
-0.4092792272567749,
-0.21156999468803406,
0.00281661213375628,
0.0995185375213623,
-0.23128516972064972,
-0.1408335119485855,
0.6834017634391785,
0.13785524666309357,
-0.11648253351449966,
-0.40729156136512756,
0.4617180824279785,
-0.28991633653640747,
-0.24828150868415833,
-0.16480427980422974,
-0.26424169540405273,
-0.4946286380290985,
-0.14943845570087433,
-0.2242555469274521,
-0.10948392003774643,
-0.19167466461658478,
0.12369953095912933,
-0.19405660033226013,
-0.10666585713624954,
0.05622679367661476,
-0.18359993398189545,
0.32570838928222656,
0.306413859128952,
0.027938222512602806,
0.1640264093875885,
0.18483315408229828,
0.13145741820335388,
0.3027794361114502,
-0.11241047829389572,
-0.037294771522283554,
-0.07904142141342163,
0.1409599632024765,
0.07190513610839844,
0.1694454550743103,
0.0061103785410523415,
0.017625033855438232,
-0.01191793940961361,
-0.174677774310112,
-0.2852494418621063,
-0.07221299409866333,
-0.14549344778060913,
-0.17139069736003876,
-0.2936673164367676,
-0.4344516396522522,
0.5158484578132629,
-0.0422947034239769,
-0.1093987300992012,
-0.11007939279079437,
-0.10759872943162918,
-0.29394271969795227,
0.12976022064685822,
0.2262260615825653,
0.924339771270752,
0.0883866548538208,
0.18149912357330322,
0.08760886639356613,
-0.17217473685741425,
0.016708752140402794,
-0.04237229749560356,
-0.0463220439851284,
-0.3026055097579956,
-0.365732342004776,
-0.17605891823768616,
-0.1443958729505539,
0.047770317643880844,
0.2639944851398468,
-0.31155115365982056,
0.3357236981391907,
-0.29093700647354126,
-0.10348159074783325,
-0.10468939691781998,
-0.007560827303677797,
-0.21224820613861084,
-0.24587316811084747,
-0.2050822228193283,
0.03132457286119461,
-0.15154890716075897,
-0.02738373354077339,
-0.03181111812591553,
-0.004562328569591045,
0.26498889923095703,
-0.0017583920853212476,
0.35586056113243103,
0.15692614018917084,
-0.08030732721090317,
0.2989891767501831,
-0.16922833025455475,
-0.4347156882286072,
-0.053097713738679886,
0.5133100748062134,
0.4914639890193939,
0.011237320490181446,
0.009453347884118557,
-0.05532252416014671,
-0.023514458909630775,
0.3598999083042145,
-0.18109117448329926,
-0.19407127797603607,
0.4862317144870758,
0.08695356547832489,
-0.059041839092969894,
0.04978177323937416,
-0.042002204805612564,
-0.2919210195541382,
-0.04743005335330963,
-0.12876757979393005,
0.1325777769088745,
-0.27954360842704773,
-0.04591310769319534,
0.28948429226875305,
0.2738037407398224,
-0.07426350563764572,
0.05402543395757675,
0.08345396816730499,
0.009031910449266434,
0.32218948006629944,
-0.04526495188474655,
-0.3151640295982361,
0.05431555211544037,
0.5431885719299316,
0.18040631711483002,
-0.046471334993839264,
0.3360176384449005,
-0.3092154562473297,
0.05230037868022919,
-0.20455993711948395,
0.3989340364933014,
0.17328982055187225,
-0.14321018755435944,
0.13800717890262604,
0.020451512187719345,
0.44395723938941956,
-0.031135397031903267,
-0.024285031482577324,
0.09927072376012802,
-0.008415676653385162,
0.1196400597691536,
-0.04809603840112686,
-0.3914591372013092,
0.13006937503814697,
0.24585184454917908,
0.3818083703517914,
0.32046687602996826,
-0.17630526423454285,
0.0028130749706178904,
0.38040509819984436,
-0.2188311219215393,
0.1583356410264969,
0.2809135317802429,
0.20719952881336212,
0.22060352563858032,
0.11623841524124146,
-0.2657071650028229,
-0.32801756262779236,
-0.05145552009344101,
-0.15947580337524414,
-0.3051243722438812,
-0.16521507501602173,
-0.03029303252696991,
0.13644348084926605,
-0.037577494978904724,
0.18995507061481476,
-0.2565509080886841,
-0.4506434202194214,
0.26777973771095276,
-0.12954570353031158,
0.1429373025894165,
0.24733011424541473,
0.2051234096288681,
0.15214578807353973,
0.06534693390130997,
0.4487789273262024,
-0.23289702832698822,
-0.11850528419017792,
-0.21050968766212463,
0.12331799417734146,
-0.02070930227637291,
-0.0022416722495108843,
0.058032531291246414,
-0.14826150238513947,
-0.5246193408966064,
-0.06721939146518707,
0.5569462776184082,
0.14249424636363983,
-0.0765218436717987,
-0.20131050050258636,
0.006891072262078524,
0.21397006511688232,
0.21155191957950592,
0.05104975029826164,
-0.3432701826095581,
-0.2787160575389862,
0.34320464730262756,
0.14426618814468384,
-0.016044991090893745,
-0.22548121213912964,
0.24616439640522003,
-0.1806962937116623,
-0.3061956763267517,
0.14422470331192017,
0.17676368355751038,
-0.05856819078326225,
-0.27548593282699585,
0.15890398621559143,
0.2719595432281494,
-0.3255970776081085,
0.3828686773777008,
0.5380003452301025,
-0.259124755859375,
0.009626120328903198,
0.22572217881679535,
0.2819717526435852,
-0.1335769146680832,
0.4269309937953949,
0.009850647300481796,
0.5303930044174194,
-0.039582327008247375,
0.1332310140132904,
-0.06337355822324753,
-0.41517847776412964,
0.07029518485069275,
0.16498908400535583,
-0.2766594886779785,
0.06005540490150452,
0.024320699274539948,
-0.09797969460487366,
0.14325954020023346,
-0.4174818992614746,
-0.15071213245391846,
0.41921427845954895,
-0.24841900169849396,
0.107425257563591,
0.05797490477561951,
-0.112039715051651,
0.28260260820388794,
0.27442124485969543,
-0.053619541227817535,
-0.22684085369110107,
0.44271624088287354,
0.12553952634334564,
-0.19133247435092926,
0.20443852245807648,
0.1249774917960167,
0.1588975340127945,
-0.0993134155869484,
-0.11698342859745026,
0.1147720143198967,
-0.0848853811621666,
-0.0037673532497137785,
0.029173782095313072,
0.02987891063094139,
-0.18094338476657867,
0.11180318892002106,
0.16769719123840332,
0.2783719003200531,
0.30594730377197266,
-0.022886551916599274,
0.16799262166023254,
0.0827445462346077,
-0.0256150234490633,
-0.03377075120806694,
0.21223238110542297,
0.013703855685889721,
0.01402678806334734,
0.3118380606174469,
-0.03626144304871559,
0.4630793333053589,
-0.3419650197029114,
0.20628920197486877,
0.4129405915737152,
-0.10740037262439728,
-0.14851999282836914,
0.09045728296041489,
0.12784039974212646,
-0.03781060129404068,
0.5705615282058716,
-0.29571333527565,
-0.016077322885394096,
0.012492215260863304,
0.03952547162771225,
0.12304964661598206,
0.4332267940044403,
0.21280314028263092,
-0.4697762429714203,
-0.2823478877544403,
-0.16648979485034943,
-0.6273464560508728,
-0.0508999265730381,
0.32536581158638,
0.37018057703971863,
-0.22585679590702057,
0.111843042075634,
0.07073567062616348,
0.20985394716262817,
0.03691684827208519,
-0.23511071503162384,
0.15032601356506348,
0.29996031522750854,
0.12349160015583038,
-0.15950222313404083,
0.05034574121236801,
0.2770727276802063,
-0.1349768042564392,
-0.23884011805057526,
0.1724773496389389,
0.19705402851104736,
-0.014319284819066525,
0.21372699737548828,
0.13892118632793427,
-0.15568217635154724,
0.4832543134689331,
0.539031445980072,
0.13823212683200836,
0.05344248190522194,
-0.1822291612625122,
0.33232733607292175,
0.2797124981880188,
-0.05815237760543823,
-0.16947264969348907,
-0.17954620718955994,
0.07464150339365005,
0.1931530088186264,
-0.3903321921825409,
0.3852841854095459,
-0.26981619000434875,
-0.008045430295169353,
0.07300536334514618,
0.12109574675559998,
-0.5197293758392334,
0.020904380828142166,
0.13112559914588928,
0.1718316227197647,
0.17206229269504547,
0.417631596326828,
0.04504389688372612,
0.35358914732933044,
-0.26747599244117737,
-0.15314877033233643,
0.4640332758426666,
-0.15866702795028687,
-0.3031260073184967,
-0.15872162580490112,
0.30974653363227844,
0.02694610506296158,
-0.06417236477136612,
-0.36602798104286194,
0.021054258570075035,
0.3587176501750946,
-0.2671589255332947,
-0.026952922344207764,
0.5555729866027832,
-0.2037760466337204,
0.15760451555252075,
0.08783382177352905,
0.5945922136306763,
0.09697476029396057,
-0.30531877279281616,
-0.0882798507809639,
-0.32908767461776733
] |
https://github.com/huggingface/datasets/issues/1993
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
|
ok, one more thing. When we use save_to_disk there are two files other than .arrow. dataset_info.json and state.json. Sometimes most of the fields in the dataset_infor.json are null, especially when saving dataset objects. Anyways I think load_from_disk uses the arrow files mentioned in state.json right?
|
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
| 45
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
ok, one more thing. When we use save_to_disk there are two files other than .arrow. dataset_info.json and state.json. Sometimes most of the fields in the dataset_infor.json are null, especially when saving dataset objects. Anyways I think load_from_disk uses the arrow files mentioned in state.json right?
|
[
-0.30072247982025146,
-0.06920677423477173,
-0.0054888357408344746,
0.2683248817920685,
0.18687519431114197,
0.0893002524971962,
-0.09074242413043976,
-0.05021605268120766,
-0.0936109721660614,
-0.029689563438296318,
0.08453036099672318,
0.39229485392570496,
0.09210692346096039,
0.20100480318069458,
0.19155628979206085,
0.21762529015541077,
0.27557888627052307,
0.2541550099849701,
-0.2981155216693878,
-0.08494502305984497,
-0.18265865743160248,
-0.2011491060256958,
0.035145845264196396,
-0.24502980709075928,
-0.2057037204504013,
-0.3581502139568329,
-0.06777191162109375,
0.015393293462693691,
0.1225501224398613,
0.0245487280189991,
0.13400773704051971,
0.08922386914491653,
0.25281497836112976,
0.2696574330329895,
-0.00012167602108092979,
0.047567617148160934,
-0.3047073185443878,
-0.10010556131601334,
-0.35261836647987366,
-0.14128878712654114,
-0.06972036510705948,
-0.22124159336090088,
0.07195150852203369,
-0.30706703662872314,
0.05899592861533165,
-0.2824426293373108,
-0.1260731816291809,
-0.2450781911611557,
0.6672534942626953,
-0.2722008228302002,
0.06997473537921906,
-0.12845978140830994,
-0.1617942452430725,
0.09769731760025024,
-0.28881290555000305,
0.39286768436431885,
0.18045926094055176,
0.08343490213155746,
-0.024898001924157143,
0.3822453022003174,
-0.02196953445672989,
0.1612483561038971,
-0.20002029836177826,
-0.25275805592536926,
0.38334107398986816,
-0.0076433089561760426,
0.2212195098400116,
-0.2953316569328308,
0.14677760004997253,
0.013578709214925766,
0.8064625859260559,
-0.4050229489803314,
-0.25748756527900696,
-0.288235068321228,
0.1536286324262619,
-0.05805898830294609,
0.14963063597679138,
0.21570079028606415,
0.02188781462609768,
0.14021018147468567,
-0.513680636882782,
-0.8684424757957458,
-0.12668456137180328,
0.12649399042129517,
0.12872378528118134,
-0.5532681345939636,
-0.022965237498283386,
0.16374629735946655,
0.20248959958553314,
0.21852459013462067,
0.4860471785068512,
-0.3468032479286194,
-0.2665131688117981,
0.10810035467147827,
-0.24160391092300415,
-0.2579507827758789,
-0.3543601930141449,
0.10117929428815842,
-0.011410895735025406,
0.28941142559051514,
0.14066539704799652,
-0.08367763459682465,
-0.35676321387290955,
0.16038572788238525,
0.24140557646751404,
0.28090450167655945,
0.2183111160993576,
0.16930623352527618,
0.07399681955575943,
-0.06319071352481842,
-0.18618322908878326,
-0.09705092757940292,
0.1862158477306366,
0.04151933267712593,
0.560059666633606,
-0.31115105748176575,
0.2295672744512558,
-0.012257177382707596,
0.15028759837150574,
0.02282099798321724,
0.08954682946205139,
-0.11794575303792953,
-0.14258436858654022,
0.26709431409835815,
0.1297619342803955,
0.21942749619483948,
0.1593547761440277,
0.2407316267490387,
0.04234778881072998,
-0.03760594129562378,
-0.14106491208076477,
-0.09188328683376312,
-0.2097053825855255,
0.4661520719528198,
0.09375090897083282,
-0.03884132578969002,
0.1977851539850235,
0.4313403069972992,
-0.49696850776672363,
-0.10859370231628418,
0.0501847118139267,
-0.19309067726135254,
0.32745200395584106,
0.1736690253019333,
0.14541086554527283,
0.24892449378967285,
-0.08799193054437637,
-0.09363922476768494,
-0.11913251131772995,
0.5767204761505127,
-0.3575342893600464,
-0.1520610898733139,
0.07011687010526657,
0.10437089204788208,
-0.1598285436630249,
0.09835445880889893,
-0.8150242567062378,
0.1427520513534546,
0.02475372888147831,
-0.12316852062940598,
0.17289748787879944,
0.05343467742204666,
-0.25636938214302063,
-0.23022893071174622,
-0.051264870911836624,
0.19309310615062714,
-0.41201719641685486,
-0.1680331826210022,
0.1258457452058792,
-0.25499871373176575,
-0.17994119226932526,
0.21087047457695007,
-0.3636849522590637,
0.2950890362262726,
-0.258722722530365,
-0.30232107639312744,
0.6723543405532837,
0.020460044965147972,
-0.33874624967575073,
0.17606456577777863,
-0.0282905250787735,
-0.11844475567340851,
0.014704140834510326,
0.5250898599624634,
0.1372102051973343,
-0.09531211853027344,
-0.4145098030567169,
0.2945403754711151,
0.140781432390213,
0.08684258908033371,
0.07955220341682434,
-0.20476622879505157,
0.1286367028951645,
-0.28698495030403137,
-0.2456304132938385,
0.38593989610671997,
0.2542549669742584,
0.3583349287509918,
0.31058937311172485,
0.015029500238597393,
0.141046941280365,
0.4581475853919983,
-0.11642741411924362,
0.03853784501552582,
-0.21276751160621643,
0.17843681573867798,
-0.7484526634216309,
-0.0065718479454517365,
0.23380430042743683,
-0.6842119693756104,
0.334531307220459,
-0.12032562494277954,
-0.027777064591646194,
-0.16870282590389252,
-0.06641969829797745,
0.1298462450504303,
-0.07622642070055008,
0.04240313172340393,
-0.05291519686579704,
-0.1547597050666809,
-0.2675631642341614,
0.3820062279701233,
-0.052381861954927444,
0.12272246927022934,
-0.6055697798728943,
0.3677001893520355,
0.21118028461933136,
-0.20024839043617249,
-0.23974260687828064,
-0.19313444197177887,
0.2055203765630722,
0.009297993965446949,
-0.08935319632291794,
0.37867799401283264,
0.18095597624778748,
0.455172061920166,
0.09184380620718002,
0.2322867512702942,
0.053429409861564636,
-0.04601474106311798,
0.14472629129886627,
-0.1604725569486618,
0.14525558054447174,
-0.12218601256608963,
-0.26380041241645813,
0.04421867057681084,
-0.20154139399528503,
0.17875917255878448,
0.1345493346452713,
-0.19267836213111877,
0.023334940895438194,
-0.2902030646800995,
-0.018092334270477295,
-0.22206728160381317,
-0.2539130747318268,
0.18535290658473969,
0.39772263169288635,
0.126713827252388,
-0.17217248678207397,
-0.12543563544750214,
0.29593202471733093,
-0.2575973570346832,
-0.021460508927702904,
-0.010239100083708763,
-0.3651695251464844,
0.008292228914797306,
-0.09410838782787323,
0.6046714782714844,
0.16111475229263306,
0.0820365697145462,
0.08663979172706604,
0.0911182388663292,
0.15119238197803497,
-0.04543571546673775,
0.04423374682664871,
-0.010149446316063404,
0.5799141526222229,
0.24431630969047546,
-0.03831558674573898,
-0.03656180948019028,
-0.11492513865232468,
0.35360512137413025,
0.16524332761764526,
-0.0946870669722557,
-0.2773088812828064,
0.11802450567483902,
-0.2011261135339737,
0.07135001569986343,
-0.4884612560272217,
-0.12731269001960754,
-0.2521907389163971,
0.15127511322498322,
-0.27149447798728943,
0.7723134160041809,
0.2325679361820221,
0.1263028085231781,
0.12190858274698257,
0.01543103065341711,
-0.1470237523317337,
-0.438896119594574,
-0.09669370204210281,
-0.019564159214496613,
-0.010302753187716007,
-0.06224319711327553,
0.11544770747423172,
0.04939407855272293,
0.3781048059463501,
-0.08105801790952682,
-0.013159231282770634,
-0.4396043121814728,
0.18912364542484283,
-0.06567990034818649,
0.1645989716053009,
0.06599140167236328,
-0.22156573832035065,
0.27954670786857605,
-0.3811887800693512,
-0.03841998055577278,
-0.05943344160914421,
-0.36072906851768494,
-0.2850472629070282,
-0.006529643665999174,
0.013489755801856518,
0.28965944051742554,
0.01722964458167553,
-0.1902126669883728,
0.03355282172560692,
-0.04029805585741997,
0.017352275550365448,
-0.1225782260298729,
0.05574978142976761,
-0.014036424458026886,
0.24445390701293945,
-0.11309217661619186,
0.18043260276317596,
0.07642672210931778,
-0.21141669154167175,
-0.5961005091667175,
0.41280487179756165,
0.1633279025554657,
-0.1741422563791275,
0.31080782413482666,
-0.17417268455028534,
-0.02104632370173931,
0.31018516421318054,
-0.6087193489074707,
-0.11419186741113663,
0.06006113439798355,
0.10374784469604492,
-0.39194589853286743,
0.3361908793449402,
0.30627068877220154,
-0.02784830890595913,
0.014445118606090546,
-0.03347116336226463,
-0.2389523684978485,
0.07844104617834091,
0.14377763867378235,
0.42445051670074463,
-0.16125379502773285,
0.22614862024784088,
-0.09661983698606491,
0.3579065799713135,
0.03173145651817322,
-0.15033423900604248,
0.2577556371688843,
0.15348921716213226,
0.43872103095054626,
-0.17507889866828918,
-0.052277613431215286,
-0.5761281251907349,
-0.16181962192058563,
-0.22177322208881378,
-0.11482535302639008,
-0.005771167576313019,
0.032395973801612854,
-0.10759349912405014,
-0.24965859949588776,
-0.2805708348751068,
-0.19337773323059082,
0.08453565835952759,
-0.24934883415699005,
0.2655930519104004,
0.019237395375967026,
0.17591248452663422,
0.1493869572877884,
-0.1331043243408203,
-0.03717382624745369,
0.2424825131893158,
0.3567489981651306,
0.034055039286613464,
-0.42264145612716675,
-0.08304159343242645,
-0.0818445235490799,
0.17175115644931793,
-0.2144637256860733,
-0.08840931951999664,
0.1600840985774994,
0.0011429379228502512,
0.06771352887153625,
0.19654111564159393,
0.7361788153648376,
0.18743516504764557,
0.06369998306035995,
0.09269451349973679,
-0.3455905616283417,
-0.38814762234687805,
0.08432791382074356,
0.050613921135663986,
-0.2877059876918793,
-0.11748699843883514,
0.7245603203773499,
0.08039893954992294,
-0.12068266421556473,
-0.3576759397983551,
0.5562204122543335,
-0.3704288899898529,
-0.29550689458847046,
-0.14579550921916962,
-0.16646035015583038,
-0.5476552844047546,
-0.21335044503211975,
-0.30827629566192627,
-0.15823641419410706,
-0.13077639043331146,
0.06464090943336487,
-0.2534776031970978,
-0.09157025068998337,
0.022077390924096107,
-0.11822163313627243,
0.39187103509902954,
0.26667338609695435,
0.019366536289453506,
0.1644684225320816,
0.22197984158992767,
0.3284149169921875,
0.3666432201862335,
-0.0153746223077178,
-0.09742757678031921,
-0.1326037347316742,
0.08677980303764343,
0.1648634672164917,
0.09364331513643265,
0.06861519813537598,
0.047984249889850616,
0.026837551966309547,
-0.2086208313703537,
-0.3092779219150543,
-0.05600347742438316,
-0.13409365713596344,
-0.13672004640102386,
-0.14408375322818756,
-0.5415612459182739,
0.5702605247497559,
-0.06502250581979752,
-0.14081470668315887,
-0.08518780767917633,
-0.04595515504479408,
-0.2711402177810669,
0.1703905612230301,
0.14987915754318237,
0.8716298937797546,
0.10897283256053925,
0.1778830736875534,
0.11092327535152435,
-0.27020683884620667,
0.08746082335710526,
0.03358212113380432,
-0.12014568597078323,
-0.3685476779937744,
-0.18291810154914856,
-0.15664009749889374,
-0.2075349986553192,
0.04055476561188698,
0.41533881425857544,
-0.28012630343437195,
0.32619866728782654,
-0.2238123118877411,
-0.15059669315814972,
-0.19907528162002563,
0.09617326408624649,
-0.16576464474201202,
-0.1743447482585907,
-0.16817200183868408,
-0.011401231400668621,
-0.08819413930177689,
-0.030661247670650482,
0.005309946369379759,
0.04138901084661484,
0.05535057187080383,
-0.018718797713518143,
0.3721581697463989,
0.08462326973676682,
-0.062459710985422134,
0.27712422609329224,
-0.15779517590999603,
-0.4986288249492645,
-0.08261804282665253,
0.5926850438117981,
0.3960544168949127,
-0.03344770893454552,
0.052653584629297256,
-0.07231322675943375,
0.026887020096182823,
0.30636993050575256,
-0.24224358797073364,
-0.17192727327346802,
0.44816988706588745,
0.1376742273569107,
-0.0855194553732872,
0.14096644520759583,
-0.09451210498809814,
-0.1698206663131714,
-0.03768152743577957,
-0.08608066290616989,
0.055103808641433716,
-0.25500965118408203,
0.047465965151786804,
0.2712351977825165,
0.25303107500076294,
-0.021011419594287872,
0.009576749056577682,
0.15015211701393127,
0.05790338292717934,
0.29802045226097107,
0.03945472463965416,
-0.23744156956672668,
0.045956242829561234,
0.518803060054779,
0.20673397183418274,
0.021413931623101234,
0.43817272782325745,
-0.32759296894073486,
0.12107367813587189,
-0.24026650190353394,
0.5366319417953491,
0.20174294710159302,
-0.17463620007038116,
0.18690583109855652,
0.06941826641559601,
0.400788277387619,
-0.04734576866030693,
-0.02130216173827648,
0.08538521826267242,
0.011168097145855427,
0.14452217519283295,
-0.09580934047698975,
-0.4380572438240051,
0.2343151718378067,
0.2624763250350952,
0.3535428047180176,
0.2583896517753601,
-0.23243355751037598,
-0.06804965436458588,
0.35858818888664246,
-0.17444650828838348,
0.20541492104530334,
0.30052125453948975,
0.2823813557624817,
0.16841864585876465,
0.2044440358877182,
-0.20871834456920624,
-0.3440040946006775,
-0.043815113604068756,
-0.25555285811424255,
-0.2365289181470871,
-0.1251324862241745,
-0.05980713292956352,
0.15394915640354156,
-0.04369133710861206,
0.16778898239135742,
-0.3266105353832245,
-0.48477479815483093,
0.2891402244567871,
-0.13750483095645905,
0.08243948966264725,
0.08195291459560394,
0.2197141796350479,
0.18409326672554016,
0.09372957050800323,
0.44815030694007874,
-0.31844213604927063,
-0.11875578761100769,
-0.19210229814052582,
0.1783011108636856,
-0.03281141072511673,
0.012108621187508106,
0.0642227977514267,
-0.13168306648731232,
-0.6189089417457581,
-0.09907298535108566,
0.5383804440498352,
0.16359804570674896,
-0.022629614919424057,
-0.16756294667720795,
-0.029007138684391975,
0.1075519546866417,
0.2544221580028534,
0.2053816169500351,
-0.3422953486442566,
-0.22456470131874084,
0.3293198347091675,
0.12559784948825836,
0.02691069431602955,
-0.19253303110599518,
0.28809288144111633,
-0.19185228645801544,
-0.28732869029045105,
0.14658360183238983,
0.03198768571019173,
-0.05127893015742302,
-0.41226255893707275,
0.025471443310379982,
0.1751534342765808,
-0.15808795392513275,
0.31595295667648315,
0.5974048376083374,
-0.23314911127090454,
-0.07084386795759201,
0.14665810763835907,
0.3994496464729309,
-0.0056820642203092575,
0.3305525779724121,
-0.0007097671623341739,
0.37643781304359436,
0.024004392325878143,
0.09160955250263214,
-0.024088967591524124,
-0.36716896295547485,
0.008115693926811218,
0.13896340131759644,
-0.21951033174991608,
0.04970196634531021,
0.07517576962709427,
-0.08808652311563492,
0.20825868844985962,
-0.330956369638443,
-0.08359792083501816,
0.35109415650367737,
-0.16295649111270905,
0.08263304084539413,
-0.12985539436340332,
-0.14986330270767212,
0.30263665318489075,
0.2705848813056946,
-0.0788763090968132,
-0.3361334800720215,
0.32816082239151,
0.14230339229106903,
-0.09715796262025833,
0.10633040219545364,
0.1872471272945404,
0.18761976063251495,
-0.16550219058990479,
-0.15035858750343323,
0.012868412770330906,
-0.028930118307471275,
0.012515711598098278,
0.016595907509326935,
0.0012613971484825015,
-0.22744637727737427,
0.04194006323814392,
0.16575847566127777,
0.3165420889854431,
0.31962156295776367,
-0.0838945209980011,
0.14995931088924408,
0.01787383295595646,
-0.000800407025963068,
-0.07352998852729797,
0.21277642250061035,
0.015179261565208435,
0.029453516006469727,
0.2632458209991455,
0.004401892889291048,
0.3795755207538605,
-0.35713493824005127,
0.24797101318836212,
0.31067052483558655,
-0.14046312868595123,
-0.16658061742782593,
0.010372773744165897,
0.21032191812992096,
-0.10659754276275635,
0.5434306859970093,
-0.2923467755317688,
-0.0012198163894936442,
0.024124499410390854,
0.014269841834902763,
-0.041499726474285126,
0.4267643988132477,
0.23310025036334991,
-0.43111100792884827,
-0.1866675615310669,
-0.1895918846130371,
-0.5319388508796692,
-0.0989798903465271,
0.2813747525215149,
0.2668113708496094,
-0.24896866083145142,
0.18202726542949677,
0.13214674592018127,
0.22491265833377838,
0.05982917547225952,
-0.11674874275922775,
0.12656840682029724,
0.36708495020866394,
0.11884040385484695,
-0.23788467049598694,
0.05027879774570465,
0.33578595519065857,
-0.09746429324150085,
-0.21433159708976746,
0.19175951182842255,
0.13259364664554596,
-0.05126791074872017,
0.22148936986923218,
0.1896933913230896,
-0.13211607933044434,
0.44787564873695374,
0.6462353467941284,
0.018949182704091072,
0.03129037469625473,
-0.17740777134895325,
0.23626744747161865,
0.37441954016685486,
-0.02168230153620243,
-0.1565992534160614,
-0.01670004613697529,
0.09220436960458755,
0.2499137967824936,
-0.4566822052001953,
0.44487088918685913,
-0.20418836176395416,
-0.18681477010250092,
0.013795634731650352,
-0.04778993874788284,
-0.4581756889820099,
0.04637393727898598,
0.06515811383724213,
0.14308790862560272,
0.16218328475952148,
0.3478298783302307,
-0.018716199323534966,
0.3184927999973297,
-0.18996936082839966,
-0.02431425452232361,
0.414545476436615,
-0.07722610980272293,
-0.19070421159267426,
-0.042797137051820755,
0.28186702728271484,
0.05549481883645058,
0.005082336254417896,
-0.4016091525554657,
0.12248067557811737,
0.4839172959327698,
-0.2663435637950897,
-0.07878180593252182,
0.3923035264015198,
-0.15820927917957306,
0.12561585009098053,
0.067527636885643,
0.6033190488815308,
0.04220335930585861,
-0.3597436547279358,
-0.09212218970060349,
-0.2827446460723877
] |
https://github.com/huggingface/datasets/issues/1993
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
|
Perfect. For now, I am loading the dataset from CSV in my interactive process and will wait until you make the PR!
|
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
| 22
|
How to load a dataset with load_from disk and save it again after doing transformations without changing the original?
I am using the latest datasets library. In my work, I first use **load_from_disk** to load a data set that contains 3.8Gb information. Then during my training process, I update that dataset object and add new elements and save it in a different place.
When I save the dataset with **save_to_disk**, the original dataset which is already in the disk also gets updated. I do not want to update it. How to prevent from this?
Perfect. For now, I am loading the dataset from CSV in my interactive process and will wait until you make the PR!
|
[
-0.34355002641677856,
-0.18610088527202606,
-0.023776743561029434,
0.1979101300239563,
0.2351958453655243,
0.0903732106089592,
-0.07585516571998596,
-0.08912689238786697,
-0.0024475869722664356,
0.061352722346782684,
0.08186789602041245,
0.2888205349445343,
0.008917559869587421,
0.27421823143959045,
0.21101711690425873,
0.23116421699523926,
0.2571016252040863,
0.30344948172569275,
-0.3161807656288147,
-0.031089935451745987,
-0.19552479684352875,
-0.19055409729480743,
0.015779515728354454,
-0.2773291766643524,
-0.13354642689228058,
-0.3582563102245331,
-0.08404569327831268,
-0.009930270723998547,
0.07235050201416016,
0.06707701832056046,
0.12379106879234314,
0.14211958646774292,
0.3197949528694153,
0.30730587244033813,
-0.00011882343096658587,
0.011263730004429817,
-0.39356207847595215,
-0.11748538911342621,
-0.295212984085083,
-0.17522914707660675,
0.01987251453101635,
-0.19282324612140656,
0.04261251166462898,
-0.28232795000076294,
-0.035592760890722275,
-0.07892479002475739,
-0.13821928203105927,
-0.18424241244792938,
0.635566771030426,
-0.2757761776447296,
0.08822818100452423,
-0.101319320499897,
-0.2604750096797943,
0.10034123808145523,
-0.3609253466129303,
0.3109509348869324,
0.16976653039455414,
0.032726023346185684,
-0.023012133315205574,
0.35238561034202576,
-0.005922346841543913,
0.18340374529361725,
-0.22028246521949768,
-0.2364932745695114,
0.36850395798683167,
-0.055733297020196915,
0.19625696539878845,
-0.32661372423171997,
0.13660374283790588,
-0.050418753176927567,
0.757328987121582,
-0.39737242460250854,
-0.22244364023208618,
-0.22003036737442017,
0.2223115712404251,
-0.17800894379615784,
0.10282018780708313,
0.271053671836853,
-0.00041902888915501535,
0.13091081380844116,
-0.5915707349777222,
-0.8006385564804077,
-0.12654578685760498,
0.05992412567138672,
0.01747860759496689,
-0.6005353331565857,
-0.009879582561552525,
0.10617629438638687,
0.21777424216270447,
0.2815050780773163,
0.4598243236541748,
-0.23536188900470734,
-0.21617881953716278,
0.14229343831539154,
-0.2949937582015991,
-0.274567186832428,
-0.29437413811683655,
0.1907629370689392,
-0.05817963927984238,
0.19619661569595337,
0.07011019438505173,
-0.09236539900302887,
-0.2840203046798706,
0.14825278520584106,
0.15288269519805908,
0.316092848777771,
0.11482053995132446,
0.1808677315711975,
0.08324060589075089,
0.059058453887701035,
-0.2331295609474182,
-0.053645242005586624,
0.1533094346523285,
0.060393981635570526,
0.5767163038253784,
-0.2273494154214859,
0.17213603854179382,
0.023944713175296783,
0.07144990563392639,
0.07317504286766052,
0.1662711501121521,
-0.09022814780473709,
-0.11744284629821777,
0.34335124492645264,
0.1202494278550148,
0.20478032529354095,
0.18999123573303223,
0.2010243833065033,
-0.048903416842222214,
-0.11417477577924728,
-0.1551879197359085,
-0.059545520693063736,
-0.3120175302028656,
0.4196886420249939,
0.12533600628376007,
0.00806458480656147,
0.119912289083004,
0.5349010229110718,
-0.471551775932312,
-0.14504185318946838,
0.014429898001253605,
-0.19747702777385712,
0.3453063666820526,
0.183760404586792,
0.16478316485881805,
0.16721124947071075,
-0.07095134258270264,
-0.02989649400115013,
-0.10037556290626526,
0.6497289538383484,
-0.3161400854587555,
-0.10923991352319717,
0.1016731709241867,
0.12629079818725586,
-0.1379484385251999,
0.11074618250131607,
-0.7127203345298767,
0.19799135625362396,
0.019891798496246338,
-0.13777686655521393,
0.16049593687057495,
0.023833032697439194,
-0.3551618158817291,
-0.18282294273376465,
-0.053265877068042755,
0.1804090142250061,
-0.3858014643192291,
-0.16009436547756195,
0.19277283549308777,
-0.21991197764873505,
-0.1124548465013504,
0.22448478639125824,
-0.31412258744239807,
0.24187986552715302,
-0.2732776701450348,
-0.3577340245246887,
0.5291257500648499,
0.10013257712125778,
-0.3341229259967804,
0.16778527200222015,
-0.034818362444639206,
-0.07906188070774078,
0.02317374013364315,
0.5614811778068542,
0.1681264191865921,
-0.10927961766719818,
-0.4543692469596863,
0.3388878107070923,
0.09941986948251724,
0.13351358473300934,
0.06959567219018936,
-0.16952958703041077,
0.27105608582496643,
-0.31165096163749695,
-0.14273597300052643,
0.48077917098999023,
0.24605679512023926,
0.34177809953689575,
0.3239544630050659,
-0.024511756375432014,
0.09958049654960632,
0.4077053964138031,
-0.15120752155780792,
0.0790724977850914,
-0.20955875515937805,
0.1262250393629074,
-0.6138039827346802,
-0.03110981173813343,
0.19368848204612732,
-0.5951257348060608,
0.3615726828575134,
-0.1226511150598526,
-0.0642852708697319,
-0.20441845059394836,
-0.012775926850736141,
0.07492449134588242,
-0.0688733384013176,
-0.002293634694069624,
-0.11098779737949371,
-0.17763155698776245,
-0.2606803774833679,
0.48376843333244324,
-0.05908416211605072,
0.09318749606609344,
-0.6138254404067993,
0.33962196111679077,
0.17128513753414154,
-0.2045489400625229,
-0.24306033551692963,
-0.09670522809028625,
0.2103908509016037,
0.031945593655109406,
-0.09627214819192886,
0.33779191970825195,
0.19397786259651184,
0.40883228182792664,
0.012982266023755074,
0.19935919344425201,
0.0663035437464714,
-0.01327041257172823,
0.07339541614055634,
-0.23201337456703186,
0.13604143261909485,
-0.08118373900651932,
-0.17561888694763184,
0.061703648418188095,
-0.23636752367019653,
0.08926377445459366,
0.15813249349594116,
-0.2045094519853592,
0.05440790578722954,
-0.34168878197669983,
0.019034497439861298,
-0.20467500388622284,
-0.18586885929107666,
0.21923880279064178,
0.308855265378952,
0.13635405898094177,
-0.22683247923851013,
-0.2074446827173233,
0.23302020132541656,
-0.2737055718898773,
-0.09121764451265335,
0.035336095839738846,
-0.25955450534820557,
0.01688462309539318,
-0.1204075813293457,
0.5437593460083008,
0.11886679381132126,
0.1275320202112198,
0.005332481116056442,
0.11943576484918594,
0.1251205950975418,
0.012979893013834953,
0.03391614556312561,
-0.034391600638628006,
0.5523133873939514,
0.2647172808647156,
-0.05094284191727638,
0.07244445383548737,
-0.16240720450878143,
0.41986629366874695,
0.15044283866882324,
-0.11968535929918289,
-0.3011403977870941,
0.09947311878204346,
-0.16158825159072876,
0.0660833790898323,
-0.4680761694908142,
-0.08413790166378021,
-0.24724312126636505,
0.23663875460624695,
-0.29647400975227356,
0.7885238528251648,
0.25946563482284546,
0.16251452267169952,
0.11081884056329727,
0.0459681935608387,
-0.1312015950679779,
-0.4180256724357605,
-0.057359397411346436,
0.03743775933980942,
0.012536752037703991,
-0.04833447188138962,
0.07523678243160248,
-0.003702040994539857,
0.4305592477321625,
-0.02910611219704151,
-0.06656006723642349,
-0.426974892616272,
0.12784597277641296,
-0.08237301558256149,
0.10297491401433945,
0.11045215278863907,
-0.21205046772956848,
0.297418475151062,
-0.41683873534202576,
-0.05413324013352394,
-0.12440784275531769,
-0.4201672673225403,
-0.2594539225101471,
0.029452012851834297,
0.05469530448317528,
0.26150181889533997,
0.01078206580132246,
-0.20518887042999268,
-0.00947615597397089,
-0.008310653269290924,
-0.11737420409917831,
-0.17131376266479492,
0.04680078849196434,
0.020350145176053047,
0.15698251128196716,
-0.2946607768535614,
0.25398921966552734,
0.08229684084653854,
-0.23766881227493286,
-0.5970134735107422,
0.34178754687309265,
0.1599004715681076,
-0.18924349546432495,
0.28973284363746643,
-0.18017949163913727,
-0.055415891110897064,
0.38032543659210205,
-0.5858959555625916,
-0.09459637105464935,
0.04431351646780968,
0.14135552942752838,
-0.4069649875164032,
0.334725946187973,
0.3081915080547333,
-0.022507576271891594,
-0.0081291813403368,
-0.06779404729604721,
-0.24541598558425903,
0.05767706036567688,
0.13562092185020447,
0.39979317784309387,
-0.207235649228096,
0.22036905586719513,
-0.057336751371622086,
0.3448048532009125,
-0.024694735184311867,
-0.15138983726501465,
0.2897457778453827,
0.1356433480978012,
0.4245438873767853,
-0.1676989495754242,
-0.1270466297864914,
-0.5524547100067139,
-0.1735001504421234,
-0.23545631766319275,
-0.006049261428415775,
-0.037928856909275055,
0.00721551850438118,
-0.1281888782978058,
-0.2558848261833191,
-0.2843942642211914,
-0.13080553710460663,
0.05041869357228279,
-0.2452307641506195,
0.38225802779197693,
0.058705735951662064,
0.15765966475009918,
0.15273809432983398,
-0.198650062084198,
-0.06896411627531052,
0.2094501405954361,
0.3548828959465027,
0.027218125760555267,
-0.2600478529930115,
-0.034877583384513855,
-0.15328726172447205,
0.11025157570838928,
-0.2091601938009262,
-0.02767380140721798,
0.12216692417860031,
-0.0030592954717576504,
0.06094317138195038,
0.2545264959335327,
0.8182933330535889,
0.21565845608711243,
0.13744774460792542,
0.08896911889314651,
-0.42514532804489136,
-0.24784861505031586,
0.04569040611386299,
0.032248351722955704,
-0.307876855134964,
-0.09407509118318558,
0.6723992228507996,
0.1526481956243515,
-0.09020864963531494,
-0.3045019209384918,
0.5188002586364746,
-0.35637980699539185,
-0.37377363443374634,
-0.22661881148815155,
-0.16631637513637543,
-0.5012162327766418,
-0.12888765335083008,
-0.25982940196990967,
-0.04399929195642471,
-0.183284193277359,
0.10613179951906204,
-0.21961404383182526,
-0.06760383397340775,
0.10953734815120697,
-0.13100048899650574,
0.3300735652446747,
0.34216585755348206,
0.049644723534584045,
0.12424828857183456,
0.21767430007457733,
0.16693834960460663,
0.3173023760318756,
-0.1053369864821434,
-0.11263880878686905,
-0.12806649506092072,
0.12989193201065063,
0.17120692133903503,
0.07560637593269348,
0.05274210870265961,
0.07323925197124481,
-0.006858388427644968,
-0.1699385643005371,
-0.38294336199760437,
-0.04536648839712143,
-0.14902137219905853,
-0.07308924943208694,
-0.20390334725379944,
-0.4751249849796295,
0.4746284782886505,
-0.09257630258798599,
-0.12585893273353577,
-0.14722177386283875,
-0.10613962262868881,
-0.29210028052330017,
0.13995519280433655,
0.1306457817554474,
0.8632394075393677,
0.03267441689968109,
0.15255944430828094,
0.11987505108118057,
-0.17053289711475372,
0.016849609091877937,
-0.0012274491600692272,
-0.08392073214054108,
-0.4019964933395386,
-0.32794898748397827,
-0.17332272231578827,
-0.19347631931304932,
0.03782504424452782,
0.3253145217895508,
-0.3283308148384094,
0.35075101256370544,
-0.24877779185771942,
-0.10898881405591965,
-0.10781458020210266,
0.04434182494878769,
-0.11699280142784119,
-0.16496330499649048,
-0.18569009006023407,
-0.0061430796049535275,
-0.07985207438468933,
-0.004472780507057905,
-0.05435781925916672,
0.0740775316953659,
0.21157768368721008,
0.0019405593629926443,
0.32219207286834717,
0.1227274239063263,
-0.07071319222450256,
0.28050497174263,
-0.19622576236724854,
-0.46495163440704346,
-0.005114464554935694,
0.6101849675178528,
0.43407225608825684,
0.024893155321478844,
0.08137936145067215,
-0.07069700211286545,
-0.02665712498128414,
0.3314708173274994,
-0.21047858893871307,
-0.10344001650810242,
0.4504609704017639,
0.13666699826717377,
-0.1030488982796669,
0.09253324568271637,
-0.04743793606758118,
-0.1213076040148735,
0.01984374411404133,
-0.0646408200263977,
0.11354544013738632,
-0.35099512338638306,
0.03550615534186363,
0.24031776189804077,
0.36441466212272644,
-0.058699190616607666,
0.03146928548812866,
0.06251566857099533,
0.013052767142653465,
0.317158579826355,
0.0708598867058754,
-0.28087976574897766,
0.037620317190885544,
0.5294992327690125,
0.20248103141784668,
-0.04267744719982147,
0.3699870705604553,
-0.2707160413265228,
0.08999372273683548,
-0.26754456758499146,
0.4640231132507324,
0.11788583546876907,
-0.1746007353067398,
0.18568922579288483,
0.1257225126028061,
0.45071232318878174,
-0.015963450074195862,
-0.043913740664720535,
0.08839015662670135,
-0.06297916173934937,
0.16536466777324677,
-0.09405678510665894,
-0.3822164237499237,
0.1210726946592331,
0.2372947335243225,
0.36307284235954285,
0.3535119593143463,
-0.12283331155776978,
-0.03290105611085892,
0.3971123993396759,
-0.21049390733242035,
0.15994936227798462,
0.2804684340953827,
0.28492340445518494,
0.21431276202201843,
0.15449611842632294,
-0.32303041219711304,
-0.35993167757987976,
-0.00966674368828535,
-0.2506661117076874,
-0.2394522726535797,
-0.1587039977312088,
-0.05252251401543617,
0.1439284384250641,
-0.11399538815021515,
0.2321474403142929,
-0.28543829917907715,
-0.43824779987335205,
0.23569975793361664,
-0.14528559148311615,
0.0925414115190506,
0.17046001553535461,
0.2144285887479782,
0.2009415477514267,
0.07853594422340393,
0.4266558885574341,
-0.341549813747406,
-0.11250361800193787,
-0.21729518473148346,
0.18895237147808075,
-0.03229379281401634,
0.0051216487772762775,
0.07024560123682022,
-0.11696241796016693,
-0.6251558661460876,
-0.0948793813586235,
0.6250931024551392,
0.12121498584747314,
-0.007365172263234854,
-0.1670634150505066,
0.01002232264727354,
0.15344560146331787,
0.2903999984264374,
0.08415548503398895,
-0.377358615398407,
-0.24610117077827454,
0.3773590624332428,
0.15042181313037872,
-0.09562327712774277,
-0.1158764585852623,
0.28522756695747375,
-0.2092483639717102,
-0.28130224347114563,
0.18480484187602997,
0.10581066459417343,
-0.04548250883817673,
-0.3390646278858185,
0.03732135891914368,
0.25539788603782654,
-0.1684485822916031,
0.3619687855243683,
0.5913912653923035,
-0.2182147353887558,
-0.05627628415822983,
0.13966213166713715,
0.41501107811927795,
-0.1396210640668869,
0.3794616460800171,
-0.003684267168864608,
0.38189366459846497,
-0.057031791657209396,
0.1477707475423813,
-0.10903944820165634,
-0.42673954367637634,
0.10113776475191116,
0.16541019082069397,
-0.2610386610031128,
0.022598078474402428,
-0.0011136060347780585,
-0.10303214937448502,
0.18978531658649445,
-0.37662196159362793,
-0.11893190443515778,
0.467952698469162,
-0.2189384549856186,
0.15192775428295135,
-0.00488678365945816,
-0.12191499769687653,
0.2515876591205597,
0.30470049381256104,
-0.006079867482185364,
-0.2621263265609741,
0.33386194705963135,
0.16961286962032318,
-0.1097298264503479,
0.08383908867835999,
0.09739954769611359,
0.20913280546665192,
-0.17473819851875305,
-0.1729259341955185,
0.04247146099805832,
-0.05946372449398041,
0.08306140452623367,
0.05102923884987831,
0.006814183667302132,
-0.2014678716659546,
0.06833567470312119,
0.17138756811618805,
0.2928633689880371,
0.25087037682533264,
-0.025108903646469116,
0.12901686131954193,
0.03078377991914749,
-0.018298314884305,
0.09670597314834595,
0.19330348074436188,
0.006185564212501049,
0.025468118488788605,
0.26394131779670715,
0.046105243265628815,
0.33344870805740356,
-0.3797311782836914,
0.2068742960691452,
0.4354173243045807,
-0.09028247743844986,
-0.241911843419075,
0.028001422062516212,
0.21258412301540375,
0.015021341852843761,
0.5192956924438477,
-0.2999187409877777,
0.012651375494897366,
0.09539931267499924,
0.03013743832707405,
0.03295267000794411,
0.37832459807395935,
0.22531038522720337,
-0.3717057704925537,
-0.3008459508419037,
-0.21567590534687042,
-0.5639151334762573,
-0.08359426259994507,
0.3688942790031433,
0.24255302548408508,
-0.23833367228507996,
0.09796900302171707,
0.09441661089658737,
0.15860015153884888,
0.03316524252295494,
-0.1553771048784256,
0.12967592477798462,
0.38353776931762695,
0.17754289507865906,
-0.20484285056591034,
-0.0034466420765966177,
0.33539003133773804,
-0.15849696099758148,
-0.192084401845932,
0.1638849377632141,
0.09122760593891144,
-0.02659720741212368,
0.18003663420677185,
0.1969439536333084,
-0.19967296719551086,
0.4232627749443054,
0.5758477449417114,
0.03315754979848862,
0.09368059784173965,
-0.25773119926452637,
0.32647809386253357,
0.4559481143951416,
-0.039074305444955826,
-0.18054889142513275,
-0.10831818729639053,
0.14453157782554626,
0.1627398133277893,
-0.4258211553096771,
0.3830110430717468,
-0.22262318432331085,
-0.13338547945022583,
0.0844239816069603,
0.017223339527845383,
-0.529629647731781,
0.0026820790953934193,
0.123727947473526,
0.18533755838871002,
0.12318779528141022,
0.40718284249305725,
-0.02085542120039463,
0.33461472392082214,
-0.17359142005443573,
-0.10367564857006073,
0.3725515902042389,
-0.14484630525112152,
-0.25402525067329407,
-0.1261519342660904,
0.3549654185771942,
-0.06466729938983917,
-0.01908317767083645,
-0.39319080114364624,
0.1495354324579239,
0.4303220510482788,
-0.24429000914096832,
-0.04054441675543785,
0.5292308330535889,
-0.19518932700157166,
0.15328393876552582,
0.10005070269107819,
0.5462214946746826,
0.10794715583324432,
-0.3573220670223236,
-0.08707422763109207,
-0.28853774070739746
] |
https://github.com/huggingface/datasets/issues/1992
|
`datasets.map` multi processing much slower than single processing
|
Hi @hwijeen, you might want to look at issues #1796 and #1949. I think it could be something related to the I/O operations being performed.
|
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

| 25
|
`datasets.map` multi processing much slower than single processing
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

Hi @hwijeen, you might want to look at issues #1796 and #1949. I think it could be something related to the I/O operations being performed.
|
[
-0.4131573438644409,
-0.31920677423477173,
-0.08791683614253998,
0.35742202401161194,
-0.1027505174279213,
0.020393719896674156,
0.34240564703941345,
0.11579522490501404,
0.05792451277375221,
-0.004025444388389587,
0.06569809466600418,
0.4142300486564636,
0.18681783974170685,
0.21182182431221008,
-0.1675521433353424,
0.00805888045579195,
0.190509632229805,
-0.04558274522423744,
0.17405949532985687,
-0.00604452146217227,
-0.1642417460680008,
0.139272540807724,
-0.49813592433929443,
-0.0023556542582809925,
-0.4168534278869629,
-0.14932426810264587,
0.10352016240358353,
0.13567571341991425,
-0.1574590802192688,
-0.22853393852710724,
-0.26269322633743286,
0.15996265411376953,
-0.07593701779842377,
0.5732406377792358,
-0.00012281167437322438,
-0.19767826795578003,
0.012800905853509903,
0.26215222477912903,
0.07546910643577576,
0.06125963106751442,
-0.13255995512008667,
-0.2765823006629944,
-0.04944010451436043,
-0.10929640382528305,
0.1161128431558609,
0.20157696306705475,
-0.060761820524930954,
-0.4477422535419464,
0.025924276560544968,
0.08576264977455139,
0.05497924983501434,
0.36125051975250244,
-0.309978187084198,
0.03930986672639847,
-0.37768176198005676,
0.16872462630271912,
-0.15384355187416077,
0.05054836720228195,
0.27895480394363403,
-0.18095408380031586,
-0.10931924730539322,
0.3070889711380005,
-0.0712713897228241,
0.2966087758541107,
0.008204272016882896,
-0.08298203349113464,
0.05338769778609276,
-0.4509485065937042,
0.18975506722927094,
0.3490729033946991,
0.03533172234892845,
-0.06320329755544662,
-0.16470187902450562,
-0.23741565644741058,
-0.3268583416938782,
-0.13496902585029602,
0.20226497948169708,
0.14012634754180908,
0.18210747838020325,
-0.005169067531824112,
-0.5538253784179688,
0.1473829448223114,
0.34518083930015564,
-0.07219540327787399,
-0.11896834522485733,
0.011226071044802666,
0.12752749025821686,
0.32881346344947815,
0.3404776453971863,
0.12036222964525223,
-0.050015706568956375,
-0.22033964097499847,
0.3193724751472473,
0.2178269475698471,
-0.7854893207550049,
-0.035213932394981384,
0.21259716153144836,
-0.10208654403686523,
-0.08548938482999802,
-0.18599888682365417,
-0.10234902054071426,
0.34680891036987305,
-0.33053672313690186,
0.09549478441476822,
0.30706924200057983,
-0.0764189213514328,
0.007399031892418861,
0.11167751252651215,
-0.03472234681248665,
-0.17122924327850342,
-0.33147430419921875,
0.06315010040998459,
0.0929071232676506,
-0.32459214329719543,
-0.06481076776981354,
0.12928494811058044,
-0.3052825331687927,
-0.09038945287466049,
-0.15496611595153809,
0.029575981199741364,
-0.23782847821712494,
-0.10234276950359344,
0.13267835974693298,
0.07705231755971909,
-0.012905376963317394,
0.7939454913139343,
-0.25983113050460815,
0.11570365726947784,
-0.47238174080848694,
-0.5671404004096985,
-0.026356108486652374,
-0.13674680888652802,
-0.37211179733276367,
0.22387434542179108,
0.1279510259628296,
-0.022244080901145935,
0.14073242247104645,
0.32584041357040405,
0.050365328788757324,
-0.22435666620731354,
0.3272612690925598,
-0.5305348634719849,
0.19723902642726898,
0.08167784661054611,
0.1585826724767685,
0.5495988726615906,
-0.11440915614366531,
0.3264814615249634,
-0.12952567636966705,
0.24386100471019745,
-0.5274057388305664,
-0.24513556063175201,
0.18052297830581665,
-0.04368840530514717,
0.10316706448793411,
0.10641338676214218,
-0.4637290835380554,
0.49805665016174316,
0.3198492228984833,
-0.21841193735599518,
-0.16935868561267853,
-0.1991785764694214,
-0.6358718872070312,
-0.151677206158638,
-0.0613868422806263,
0.16733118891716003,
-0.33093419671058655,
0.23807094991207123,
-0.3223763406276703,
0.14681841433048248,
0.4350244700908661,
0.6122485995292664,
-0.18858028948307037,
0.38445422053337097,
0.0008835474727675319,
0.19841262698173523,
-0.006439859978854656,
-0.07650764286518097,
-0.37452250719070435,
0.5169084668159485,
-0.15922436118125916,
-0.0011454877676442266,
-0.19069398939609528,
0.15317919850349426,
0.24031876027584076,
-0.05474397912621498,
0.32514122128486633,
0.2936650514602661,
0.03049575909972191,
0.3874760866165161,
-0.2230067104101181,
-0.11075476557016373,
0.14605563879013062,
0.03928038477897644,
-0.08418253064155579,
-0.09125839173793793,
-0.013679677620530128,
-0.2940003573894501,
0.3163226544857025,
-0.012795697897672653,
0.025221308693289757,
0.43028050661087036,
-0.3920021653175354,
-0.15198065340518951,
-0.14723695814609528,
-0.2302914708852768,
-0.07329943031072617,
0.36632081866264343,
-0.02787451259791851,
0.05018649622797966,
0.43080899119377136,
0.035164035856723785,
0.19255226850509644,
0.1138252317905426,
-0.040516044944524765,
-0.06420744210481644,
-0.11188502609729767,
-0.08057786524295807,
-0.15432108938694,
-0.17896056175231934,
-0.009086715057492256,
0.4500136375427246,
0.18175451457500458,
-0.10417890548706055,
-0.031203163787722588,
-0.13255032896995544,
0.08126479387283325,
0.05628924071788788,
-0.1986997425556183,
-0.06962718069553375,
0.0854896754026413,
0.05026910454034805,
-0.07914633303880692,
0.26186421513557434,
0.4632994532585144,
-0.053905826061964035,
0.17097024619579315,
0.11557650566101074,
0.37286773324012756,
-0.05402611568570137,
0.048446640372276306,
-0.1458728313446045,
0.10215681791305542,
-0.23902350664138794,
-0.02390383742749691,
0.31207409501075745,
0.08390626311302185,
0.4422300457954407,
0.03163784742355347,
-0.13611620664596558,
-0.010146195068955421,
0.2965463101863861,
0.1542540341615677,
0.056874584406614304,
0.3458302915096283,
0.3308040499687195,
0.23016157746315002,
0.3350543677806854,
-0.13227160274982452,
0.32304608821868896,
0.6291486620903015,
0.048708416521549225,
-0.3480740487575531,
0.043714750558137894,
-0.18393124639987946,
-0.3695402145385742,
0.02265230379998684,
-0.14126797020435333,
0.5598793625831604,
0.020039547234773636,
0.23184622824192047,
-0.03621403127908707,
-0.10068067908287048,
-0.058703355491161346,
-0.023061081767082214,
0.10299184918403625,
0.22641341388225555,
-0.10509204864501953,
0.29592078924179077,
-0.01593506522476673,
-0.06011107563972473,
-0.24219192564487457,
0.3389699161052704,
0.2527019679546356,
-0.2600570321083069,
0.1031639501452446,
-0.29269352555274963,
0.15559643507003784,
0.1763414442539215,
-0.10034119337797165,
-0.2901909649372101,
-0.21284013986587524,
-0.155817911028862,
-0.0844460129737854,
0.22002702951431274,
-0.05492272973060608,
0.27708324790000916,
-0.13619428873062134,
-0.10554242134094238,
-0.047538626939058304,
0.0010071019642055035,
-0.13825666904449463,
-0.1498209536075592,
-0.010975203476846218,
0.2863367199897766,
0.2263481616973877,
0.041887421160936356,
-0.06779318302869797,
-0.2715706527233124,
-0.06478791683912277,
-0.20764856040477753,
-0.12365161627531052,
0.1410824954509735,
0.055592410266399384,
-0.1938764899969101,
-0.05738676339387894,
-0.22455909848213196,
0.15367677807807922,
0.18145626783370972,
-0.24901995062828064,
-0.18997102975845337,
0.05163303390145302,
-0.10662901401519775,
-0.23324234783649445,
0.045081399381160736,
-0.15574294328689575,
-0.08705941587686539,
-0.10771103948354721,
0.293589323759079,
-0.17219987511634827,
0.3419700562953949,
-0.22608321905136108,
0.06347790360450745,
-0.07978194952011108,
-0.10795768350362778,
0.015878047794103622,
-0.33310237526893616,
-0.36676251888275146,
-0.011990255676209927,
-0.01840493641793728,
-0.19211679697036743,
-0.13449300825595856,
0.08974254131317139,
0.15681222081184387,
0.1717802882194519,
-0.15996485948562622,
0.16991250216960907,
-0.39074113965034485,
0.11943347752094269,
0.07057283073663712,
0.06748098880052567,
0.46760061383247375,
0.027658583596348763,
0.06265623867511749,
0.015642421320080757,
-0.4355045557022095,
-0.06356140226125717,
0.31928277015686035,
0.03683655336499214,
0.01721850596368313,
0.34455791115760803,
0.03134578466415405,
0.6403140425682068,
0.49473875761032104,
-0.16458651423454285,
0.20208922028541565,
0.009663093835115433,
-0.17165036499500275,
-0.40271666646003723,
-0.21801172196865082,
0.12400678545236588,
-0.2614227533340454,
0.1684185415506363,
0.42691585421562195,
0.0036423704586923122,
-0.42947918176651,
-0.016689617186784744,
0.24397289752960205,
-0.24452777206897736,
-0.01410316489636898,
0.14810505509376526,
-0.12326768040657043,
0.19664497673511505,
0.24616731703281403,
-0.19769349694252014,
-0.35197317600250244,
-0.03533969447016716,
-0.06618984043598175,
-0.10603317618370056,
-0.09861601144075394,
-0.24210479855537415,
-0.4882800281047821,
-0.03389891982078552,
-0.3716013431549072,
0.26111751794815063,
0.04200677201151848,
0.29697516560554504,
-0.043937940150499344,
0.10577211529016495,
0.3316422402858734,
0.02959340065717697,
0.5544953942298889,
-0.41643238067626953,
-0.13656297326087952,
0.13101857900619507,
-0.3980674147605896,
-0.2873521149158478,
0.07072897255420685,
-0.17073000967502594,
0.28281423449516296,
0.58845454454422,
0.5143994092941284,
-0.056328024715185165,
-0.2053924947977066,
0.008656524121761322,
0.1212090402841568,
0.15537554025650024,
-0.266105979681015,
-0.3546754717826843,
0.134576678276062,
-0.12949630618095398,
0.12682487070560455,
-0.04238700121641159,
0.13200463354587555,
0.12328439205884933,
-0.14204764366149902,
0.01943683810532093,
0.11549444496631622,
0.23819829523563385,
0.17040160298347473,
0.12061526626348495,
0.09302520751953125,
0.3004207909107208,
0.26730644702911377,
-0.07237109541893005,
0.06223477050662041,
0.3293823301792145,
-0.12490645051002502,
-0.09985693544149399,
0.21324041485786438,
0.02411269024014473,
0.3280758857727051,
0.3196829855442047,
0.14985790848731995,
0.030650669708848,
0.15901920199394226,
0.27749618887901306,
-0.2244981825351715,
0.27217164635658264,
0.3960234224796295,
0.391681432723999,
-0.4936525821685791,
-0.5062211751937866,
-0.020566867664456367,
0.46491995453834534,
-0.14607901871204376,
0.2714824974536896,
-0.7679567933082581,
0.08006357401609421,
0.050308194011449814,
0.09993033111095428,
0.7852848768234253,
-0.47313249111175537,
0.037971291691064835,
-0.31195929646492004,
0.21543219685554504,
-0.04817523807287216,
-0.594862163066864,
0.13347700238227844,
-0.18472903966903687,
-0.34729865193367004,
0.027562998235225677,
-0.10907605290412903,
0.2031959742307663,
0.5102779269218445,
0.15832197666168213,
0.26614195108413696,
0.3404269516468048,
0.07846198976039886,
-0.0262443944811821,
0.35041818022727966,
0.5003807544708252,
-0.31871721148490906,
0.16458959877490997,
0.032754383981227875,
0.19393499195575714,
-0.20700854063034058,
0.02985936589539051,
0.0704520121216774,
-0.06114952266216278,
0.029334556311368942,
-0.3183438181877136,
-0.2279886156320572,
-0.3977982699871063,
0.19637151062488556,
-0.07641218602657318,
0.2826360762119293,
0.3900788426399231,
0.2677481174468994,
-0.07130707055330276,
0.09016084671020508,
0.008548341691493988,
0.05348898097872734,
0.2637941539287567,
0.23341968655586243,
0.3824097514152527,
-0.46397730708122253,
-0.0287045706063509,
-0.10095932334661484,
-0.2506057322025299,
-0.2602866590023041,
-0.15324242413043976,
-0.11850867420434952,
-0.12253795564174652,
0.44911906123161316,
0.1657288521528244,
0.15709760785102844,
-0.22645698487758636,
0.2328823208808899,
0.07904096692800522,
-0.10990738123655319,
-0.012514333240687847,
0.09148091822862625,
0.022348880767822266,
0.671122670173645,
-0.28348156809806824,
-0.5138159394264221,
-0.03429778292775154,
0.3942314684391022,
0.24996155500411987,
-0.09522745758295059,
0.04766540229320526,
0.21297064423561096,
-0.2575141489505768,
-0.13550248742103577,
0.153530552983284,
-0.10335887223482132,
-0.09918583184480667,
0.10592122375965118,
0.020850423723459244,
-0.22452513873577118,
0.2546938955783844,
-0.13488812744617462,
-0.15127961337566376,
-0.05323115736246109,
-0.19176743924617767,
-0.2759396433830261,
-0.25289860367774963,
-0.18008311092853546,
-0.35165485739707947,
-0.21634767949581146,
0.23138193786144257,
0.02472872845828533,
0.12974326312541962,
0.47298943996429443,
-0.1329037994146347,
0.05832010880112648,
0.09010960161685944,
0.21108655631542206,
-0.018965331837534904,
-0.25146615505218506,
0.07792278379201889,
-0.02582741156220436,
-0.06584294140338898,
0.07955838739871979,
-0.08679752051830292,
-0.14740197360515594,
-0.011754710227251053,
0.18517275154590607,
-0.022486453875899315,
-0.26316073536872864,
0.3296198546886444,
-0.14561471343040466,
-0.20430292189121246,
-0.43027403950691223,
-0.06225086376070976,
0.052158553153276443,
-0.02185397781431675,
-0.10425980389118195,
0.27910900115966797,
-0.2983775734901428,
-0.27128300070762634,
0.4427228271961212,
-0.2003643661737442,
-0.09690354019403458,
-0.0010564997792243958,
0.28708505630493164,
0.4510098695755005,
-0.0946669653058052,
-0.10054254531860352,
0.02907569520175457,
0.2644413709640503,
0.06920454651117325,
0.13745899498462677,
-0.09657911956310272,
0.18162423372268677,
0.26669225096702576,
0.3389306664466858,
0.12725017964839935,
0.13464587926864624,
-0.25316503643989563,
0.0023177089169621468,
0.0016433726996183395,
-0.24031172692775726,
-0.1764904260635376,
0.5670011639595032,
0.032862722873687744,
0.13805921375751495,
0.05161364749073982,
0.33619430661201477,
0.23635198175907135,
-0.009384860284626484,
-0.10602404177188873,
0.08108297735452652,
-0.2906016409397125,
0.061194293200969696,
0.15363821387290955,
0.258548766374588,
0.25910669565200806,
0.446649968624115,
0.11974812299013138,
-0.0015335597563534975,
0.44607046246528625,
0.27422645688056946,
0.2714110314846039,
0.4872283339500427,
0.2653110921382904,
-0.039557136595249176,
-0.3783230483531952,
0.20969991385936737,
0.5037139654159546,
-0.3329579532146454,
-0.057492345571517944,
-0.05780883878469467,
0.22342713177204132,
-0.24945542216300964,
-0.3842223584651947,
-0.26097777485847473,
0.38685470819473267,
-0.16557961702346802,
-0.25823527574539185,
0.22121037542819977,
-0.06877131015062332,
-0.0023639195133000612,
0.1776571422815323,
-0.22045981884002686,
0.14243973791599274,
0.7928739786148071,
0.13015377521514893,
0.044123172760009766,
-0.38913899660110474,
-0.3411389887332916,
-0.14998948574066162,
0.16975818574428558,
-0.13819868862628937,
0.18285328149795532,
-0.32030189037323,
-0.010065790265798569,
-0.0007455857703462243,
0.30083686113357544,
0.3764939606189728,
0.277264803647995,
-0.1428850144147873,
0.10062971711158752,
-0.02219010889530182,
0.16126076877117157,
0.0074007329531013966,
0.1828809231519699,
0.03228871896862984,
0.1748705804347992,
0.16541755199432373,
-0.10536818206310272,
-0.09015940874814987,
-0.4533832371234894,
0.030217690393328667,
0.3537493646144867,
-0.14939400553703308,
0.15781396627426147,
-0.3038742244243622,
-0.15540550649166107,
0.010965242981910706,
0.29412978887557983,
-0.2735167145729065,
-0.08983878791332245,
0.49535703659057617,
-0.49109476804733276,
0.0730639398097992,
-0.15138208866119385,
0.025312840938568115,
-0.07980047911405563,
0.5650867223739624,
0.33811357617378235,
0.010556922294199467,
-0.4115416705608368,
-0.11511452496051788,
-0.5973332524299622,
-0.0711953416466713,
-0.3206040859222412,
0.2698102295398712,
0.07329880446195602,
0.2909338176250458,
0.07440663874149323,
0.12126483768224716,
0.4038821756839752,
-0.0933898314833641,
-0.08354217559099197,
0.3543788492679596,
-0.3133428692817688,
0.4769580364227295,
-0.24344402551651,
-0.1946043074131012,
-0.08491010963916779,
-0.4186912178993225,
0.3781767785549164,
0.07535969465970993,
-0.14862334728240967,
-0.17376120388507843,
-0.0027931437361985445,
0.15443900227546692,
0.1478448361158371,
0.18850287795066833,
0.354804128408432,
0.36349764466285706,
0.041294146329164505,
0.007807932794094086,
-0.1190236285328865,
0.19369752705097198,
-0.04145532101392746,
0.3311103582382202,
-0.05833475664258003,
0.06890060752630234,
-0.3055814504623413,
0.16664642095565796,
0.11304142326116562,
-0.1093769520521164,
0.0038682501763105392,
-0.23709872364997864,
-0.3271936774253845,
-0.050509024411439896,
-0.03897599130868912,
0.3171595633029938,
0.09527406841516495,
0.403324156999588,
0.13998939096927643,
-0.09344564378261566,
-0.18509210646152496,
-0.08013825118541718,
-0.028804143890738487,
-0.26682499051094055,
-0.2905769348144531,
-0.43055713176727295,
0.22771824896335602,
-0.25289061665534973,
0.16132141649723053,
-0.23314796388149261,
-0.32374680042266846,
0.3040856122970581,
-0.024933695793151855,
-0.36816200613975525,
0.365468293428421,
-0.38706275820732117,
-0.08566838502883911,
-0.14730608463287354,
0.0290635135024786,
-0.09814492613077164,
-0.44488662481307983,
0.1913251131772995,
-0.11978085339069366
] |
https://github.com/huggingface/datasets/issues/1992
|
`datasets.map` multi processing much slower than single processing
|
I see that many people are experiencing the same issue. Is this problem considered an "official" bug that is worth a closer look? @lhoestq
|
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

| 24
|
`datasets.map` multi processing much slower than single processing
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

I see that many people are experiencing the same issue. Is this problem considered an "official" bug that is worth a closer look? @lhoestq
|
[
-0.38663381338119507,
-0.2725815176963806,
-0.07879350334405899,
0.34936946630477905,
-0.1060929149389267,
-0.0051661464385688305,
0.3705371618270874,
0.12684984505176544,
0.054780520498752594,
-0.01642601005733013,
0.07629144936800003,
0.43234530091285706,
0.16459399461746216,
0.17756368219852448,
-0.1425015777349472,
0.06904043257236481,
0.2205798327922821,
-0.06273344904184341,
0.19909316301345825,
-0.0131203792989254,
-0.16872435808181763,
0.1928427517414093,
-0.49638959765434265,
-0.0021655848249793053,
-0.41065505146980286,
-0.12482104450464249,
0.10404545813798904,
0.10486879199743271,
-0.1357274204492569,
-0.2046508640050888,
-0.21406742930412292,
0.1370123326778412,
-0.13556893169879913,
0.5738759636878967,
-0.00012297084322199225,
-0.19847343862056732,
0.05498776584863663,
0.2633066475391388,
0.07641689479351044,
0.0830865353345871,
-0.13295325636863708,
-0.26017525792121887,
-0.04241267219185829,
-0.08291523903608322,
0.12447240203619003,
0.21617409586906433,
-0.058563802391290665,
-0.46460413932800293,
-0.009662361815571785,
0.08433549106121063,
0.06314404308795929,
0.3764825165271759,
-0.28174343705177307,
0.014386347495019436,
-0.33460548520088196,
0.15811875462532043,
-0.17408904433250427,
0.050787560641765594,
0.28528645634651184,
-0.18645040690898895,
-0.117559053003788,
0.3048103451728821,
-0.04749941825866699,
0.3209555745124817,
0.0011848085559904575,
-0.032224129885435104,
0.027020437642931938,
-0.4442291557788849,
0.162076935172081,
0.37069234251976013,
0.005562376230955124,
-0.07273971289396286,
-0.18548795580863953,
-0.2690015733242035,
-0.31777599453926086,
-0.15615630149841309,
0.23118455708026886,
0.1288776695728302,
0.14930959045886993,
-0.01322519313544035,
-0.5340876579284668,
0.13745179772377014,
0.38665974140167236,
-0.07135072350502014,
-0.15233296155929565,
0.020112620666623116,
0.1103028953075409,
0.30946680903434753,
0.3142455518245697,
0.12283958494663239,
-0.0455450601875782,
-0.17150764167308807,
0.2885455787181854,
0.18295490741729736,
-0.7955281138420105,
-0.04171052575111389,
0.24892793595790863,
-0.11296024173498154,
-0.061552174389362335,
-0.1814655214548111,
-0.09859026968479156,
0.3503527045249939,
-0.33401215076446533,
0.10812167823314667,
0.3353146016597748,
-0.09714953601360321,
0.0022063162177801132,
0.08073623478412628,
0.01607026532292366,
-0.16441042721271515,
-0.30380985140800476,
0.10167264193296432,
0.1055104210972786,
-0.3424452841281891,
-0.07126130908727646,
0.10951648652553558,
-0.28245535492897034,
-0.08732786774635315,
-0.1478874534368515,
0.058993589133024216,
-0.21595942974090576,
-0.06327307969331741,
0.10974820703268051,
0.07937145978212357,
-0.019251834601163864,
0.8041558861732483,
-0.26902198791503906,
0.08701711893081665,
-0.4744414985179901,
-0.58208829164505,
-0.018574902787804604,
-0.14689643681049347,
-0.3591325879096985,
0.1967964470386505,
0.1042192280292511,
-0.02877786196768284,
0.10028916597366333,
0.3114524781703949,
0.08657150715589523,
-0.22788916528224945,
0.3016510307788849,
-0.4975849390029907,
0.2251562625169754,
0.11890897154808044,
0.1471593827009201,
0.5624078512191772,
-0.12077601999044418,
0.3020246922969818,
-0.1247040331363678,
0.24048985540866852,
-0.5386425852775574,
-0.2262619435787201,
0.13901042938232422,
-0.04697073623538017,
0.09063399583101273,
0.1150423213839531,
-0.458850622177124,
0.4970783293247223,
0.3395262658596039,
-0.24713188409805298,
-0.1647283136844635,
-0.19443842768669128,
-0.6674046516418457,
-0.15341822803020477,
-0.037628255784511566,
0.18412114679813385,
-0.3353402614593506,
0.2206210047006607,
-0.3466377556324005,
0.1560320407152176,
0.43490055203437805,
0.6155387163162231,
-0.18992984294891357,
0.35754793882369995,
-0.050650130957365036,
0.20215420424938202,
-0.01638452149927616,
-0.03977138549089432,
-0.3898434042930603,
0.5365144610404968,
-0.16957132518291473,
0.01126829069107771,
-0.22578762471675873,
0.16068975627422333,
0.21663899719715118,
-0.06081225350499153,
0.35973718762397766,
0.25206196308135986,
0.003724072827026248,
0.4067169427871704,
-0.2268608957529068,
-0.14847566187381744,
0.18060946464538574,
0.03565067797899246,
-0.050955839455127716,
-0.10924472659826279,
-0.020767664536833763,
-0.2912406027317047,
0.32733097672462463,
0.03461384028196335,
0.01905175857245922,
0.4201276898384094,
-0.37679025530815125,
-0.17811846733093262,
-0.14920873939990997,
-0.24709850549697876,
-0.06936460733413696,
0.34755024313926697,
-0.008295528590679169,
0.034535493701696396,
0.45308220386505127,
0.027628891170024872,
0.20795585215091705,
0.12411835789680481,
-0.041028380393981934,
-0.07881282269954681,
-0.11966793984174728,
-0.08743350952863693,
-0.19142894446849823,
-0.15839387476444244,
-0.04113825410604477,
0.45148739218711853,
0.20574845373630524,
-0.12299388647079468,
-0.05400485917925835,
-0.13028518855571747,
0.09773567318916321,
0.07682761549949646,
-0.19901618361473083,
-0.08228133618831635,
0.0642763301730156,
0.027987727895379066,
-0.08689773082733154,
0.26800966262817383,
0.4869924783706665,
-0.07008649408817291,
0.13508422672748566,
0.08798465877771378,
0.405062198638916,
-0.023111574351787567,
-0.017242999747395515,
-0.1115204468369484,
0.11518736183643341,
-0.24092745780944824,
-0.03333192318677902,
0.3163406550884247,
0.11588558554649353,
0.399556964635849,
0.03072933666408062,
-0.10514702647924423,
0.026766885071992874,
0.2851705849170685,
0.1078854575753212,
0.04600543528795242,
0.3108840584754944,
0.3136247396469116,
0.21517713367938995,
0.3205099403858185,
-0.10616930574178696,
0.3456159234046936,
0.6657003164291382,
0.08331520110368729,
-0.31049105525016785,
0.049639541655778885,
-0.15181933343410492,
-0.3581569492816925,
0.014145798981189728,
-0.12260803580284119,
0.5757825970649719,
0.002250300720334053,
0.24728752672672272,
-0.03825521841645241,
-0.11481311917304993,
-0.08098205178976059,
-0.014107965864241123,
0.10800965875387192,
0.2107912302017212,
-0.07103235274553299,
0.33244240283966064,
-0.0037921674083918333,
-0.1000334769487381,
-0.2148345410823822,
0.3497832715511322,
0.20769420266151428,
-0.283382385969162,
0.10747388005256653,
-0.3034692406654358,
0.20223593711853027,
0.1599307358264923,
-0.10360760241746902,
-0.30136388540267944,
-0.2368086576461792,
-0.12218426913022995,
-0.08861903846263885,
0.1853179931640625,
-0.014240944758057594,
0.2501142621040344,
-0.09630276262760162,
-0.11537638306617737,
-0.03657381609082222,
0.03501283749938011,
-0.1128339171409607,
-0.15602539479732513,
-0.011423010379076004,
0.28044864535331726,
0.19014713168144226,
0.07296636700630188,
-0.05632880702614784,
-0.27773964405059814,
-0.12467687577009201,
-0.24367573857307434,
-0.09375494718551636,
0.1492813527584076,
0.07661121338605881,
-0.16368964314460754,
-0.1074143797159195,
-0.20783311128616333,
0.16900956630706787,
0.1589680165052414,
-0.3020037114620209,
-0.20187851786613464,
0.046115633100271225,
-0.11854926496744156,
-0.2314857393503189,
-0.010622382164001465,
-0.158888041973114,
-0.0949644222855568,
-0.1099470779299736,
0.28793954849243164,
-0.1672472357749939,
0.31999269127845764,
-0.19329853355884552,
0.05272079259157181,
-0.08896800875663757,
-0.11601212620735168,
-0.042555294930934906,
-0.36046379804611206,
-0.345747709274292,
-0.007408237550407648,
-0.041945669800043106,
-0.22521641850471497,
-0.14059607684612274,
0.07718788832426071,
0.15461665391921997,
0.15815886855125427,
-0.18233558535575867,
0.17495493590831757,
-0.3803268074989319,
0.13970962166786194,
0.08690890669822693,
0.022016234695911407,
0.4934562146663666,
-0.003751344047486782,
0.0688600167632103,
0.007294099777936935,
-0.4403309226036072,
-0.06297337263822556,
0.2977601885795593,
0.023055367171764374,
0.019594315439462662,
0.35181453824043274,
0.05136381834745407,
0.6315262913703918,
0.48891010880470276,
-0.15075795352458954,
0.1987285315990448,
-0.047782886773347855,
-0.11157964169979095,
-0.3996536433696747,
-0.2119545191526413,
0.11171218007802963,
-0.28262248635292053,
0.12542825937271118,
0.4168575704097748,
-0.011739260517060757,
-0.4363330900669098,
-0.009313537739217281,
0.2886051535606384,
-0.22626589238643646,
-0.03353511169552803,
0.14073196053504944,
-0.13649767637252808,
0.1556614339351654,
0.2492785006761551,
-0.1519780158996582,
-0.33580487966537476,
-0.04430113360285759,
-0.06554809957742691,
-0.10168737173080444,
-0.10399450361728668,
-0.2754548490047455,
-0.4782894253730774,
-0.011620599776506424,
-0.3779996335506439,
0.23008567094802856,
0.047808676958084106,
0.3498314917087555,
-0.044224146753549576,
0.08695842325687408,
0.32123303413391113,
-0.01689918525516987,
0.5688458681106567,
-0.3910728096961975,
-0.108819380402565,
0.15168054401874542,
-0.3594421148300171,
-0.28833436965942383,
0.030687585473060608,
-0.1507096290588379,
0.28838106989860535,
0.6098187565803528,
0.5065742135047913,
-0.041691672056913376,
-0.15379659831523895,
0.0076693277806043625,
0.0976753905415535,
0.12818963825702667,
-0.25062474608421326,
-0.3729530870914459,
0.12175224721431732,
-0.09590697288513184,
0.13063369691371918,
0.014318597503006458,
0.1115725040435791,
0.12505987286567688,
-0.16160716116428375,
0.02313302643597126,
0.0852767676115036,
0.22212190926074982,
0.15447744727134705,
0.11857908964157104,
0.09780608117580414,
0.3397483825683594,
0.25318217277526855,
-0.09061171859502792,
0.021265657618641853,
0.3452202379703522,
-0.11882548034191132,
-0.10191092640161514,
0.2752821147441864,
0.014778360724449158,
0.3062784671783447,
0.3589969873428345,
0.11247957497835159,
0.028985803946852684,
0.18591974675655365,
0.2604258060455322,
-0.21582402288913727,
0.24470609426498413,
0.41376689076423645,
0.3523694574832916,
-0.47059473395347595,
-0.487019419670105,
-0.018029989674687386,
0.48103004693984985,
-0.14150354266166687,
0.3186236023902893,
-0.7869359254837036,
0.08054344356060028,
0.030883705243468285,
0.0685204342007637,
0.7341232895851135,
-0.42445164918899536,
0.08448808640241623,
-0.27325862646102905,
0.20423977077007294,
-0.045379314571619034,
-0.5877481698989868,
0.14249344170093536,
-0.19937272369861603,
-0.33856919407844543,
0.02654358558356762,
-0.10841801017522812,
0.17293432354927063,
0.48246079683303833,
0.19011439383029938,
0.2568007707595825,
0.3360636234283447,
0.15003381669521332,
-0.012717573903501034,
0.307515949010849,
0.4955805540084839,
-0.3149344027042389,
0.15518534183502197,
0.029792841523885727,
0.2141145020723343,
-0.19111599028110504,
0.034999821335077286,
0.0768582671880722,
-0.04520976543426514,
-0.005710480734705925,
-0.34798523783683777,
-0.1982787400484085,
-0.3737332224845886,
0.21662816405296326,
-0.015299350954592228,
0.2827977240085602,
0.3574748635292053,
0.24374480545520782,
-0.059812743216753006,
0.08771677315235138,
-0.026787640526890755,
0.08559609949588776,
0.2774116098880768,
0.2729419469833374,
0.3718228042125702,
-0.4484912157058716,
-0.03296881914138794,
-0.08183301240205765,
-0.1895807385444641,
-0.26627570390701294,
-0.16572153568267822,
-0.13838671147823334,
-0.13470867276191711,
0.5105382800102234,
0.1755467653274536,
0.18541021645069122,
-0.19831468164920807,
0.23829738795757294,
0.1368560642004013,
-0.1418382078409195,
-0.01546784583479166,
0.09106878936290741,
0.0367247648537159,
0.6409507989883423,
-0.3012271225452423,
-0.49837440252304077,
-0.04416198283433914,
0.455107718706131,
0.23641103506088257,
-0.08262082189321518,
0.037869859486818314,
0.22276383638381958,
-0.25936102867126465,
-0.12754985690116882,
0.17501628398895264,
-0.12043397128582001,
-0.13313397765159607,
0.14229002594947815,
-0.016994038596749306,
-0.242929607629776,
0.23972778022289276,
-0.12397458404302597,
-0.14859342575073242,
-0.06956063210964203,
-0.19819381833076477,
-0.27454304695129395,
-0.22849802672863007,
-0.19229982793331146,
-0.3533957004547119,
-0.2301909476518631,
0.2255149930715561,
0.027040742337703705,
0.13122019171714783,
0.41113150119781494,
-0.12426643818616867,
0.06341347843408585,
0.11516609787940979,
0.15110979974269867,
-0.047739408910274506,
-0.21922306716442108,
0.08489105850458145,
-0.04546666890382767,
-0.08864083886146545,
0.12409628182649612,
-0.08634886145591736,
-0.13493193686008453,
-0.03594886511564255,
0.19074954092502594,
-0.02935117669403553,
-0.2500728666782379,
0.3638288378715515,
-0.12293610721826553,
-0.24730609357357025,
-0.41244983673095703,
-0.0434979572892189,
0.07813997566699982,
-0.00846051424741745,
-0.1043870598077774,
0.2735494375228882,
-0.30384960770606995,
-0.23337826132774353,
0.45881038904190063,
-0.1831396073102951,
-0.04932910576462746,
-0.016484713181853294,
0.2902960479259491,
0.44136977195739746,
-0.06449132412672043,
-0.1011536493897438,
0.02763967029750347,
0.2080300748348236,
0.08459284156560898,
0.16115079820156097,
-0.13264977931976318,
0.1946243792772293,
0.2788698375225067,
0.34370771050453186,
0.16378158330917358,
0.0735674723982811,
-0.2542279362678528,
-0.0023197163827717304,
-0.00419407244771719,
-0.25748974084854126,
-0.20878393948078156,
0.5838802456855774,
0.09643522650003433,
0.1197778508067131,
0.041136812418699265,
0.36123570799827576,
0.18615059554576874,
-0.009372241795063019,
-0.07118213921785355,
0.08699581027030945,
-0.32795411348342896,
0.06981105357408524,
0.18045452237129211,
0.2434648722410202,
0.29932326078414917,
0.427968829870224,
0.09179116785526276,
0.00423102593049407,
0.4806721806526184,
0.2743299603462219,
0.2556978762149811,
0.5029745697975159,
0.24374619126319885,
-0.02483665943145752,
-0.3844446837902069,
0.2235187143087387,
0.4877792298793793,
-0.3467889726161957,
-0.03867056593298912,
-0.035630084574222565,
0.23982003331184387,
-0.2759619355201721,
-0.36806392669677734,
-0.31117045879364014,
0.36393988132476807,
-0.16866222023963928,
-0.25183382630348206,
0.25082138180732727,
-0.05366239324212074,
0.011009348556399345,
0.18838869035243988,
-0.2071022391319275,
0.1562434881925583,
0.8072527647018433,
0.12217000871896744,
0.007022151257842779,
-0.3940955698490143,
-0.31786683201789856,
-0.1933313012123108,
0.17798329889774323,
-0.16003218293190002,
0.18320690095424652,
-0.3481106162071228,
-0.013661609962582588,
-0.003710727673023939,
0.3205564022064209,
0.37187767028808594,
0.2885129749774933,
-0.13041697442531586,
0.04779667779803276,
-0.029958264902234077,
0.17833849787712097,
-0.026013264432549477,
0.21893389523029327,
0.028329316526651382,
0.1776457577943802,
0.14948317408561707,
-0.10872147977352142,
-0.08027660846710205,
-0.39596036076545715,
0.05107247829437256,
0.3922519087791443,
-0.18919770419597626,
0.17150655388832092,
-0.3878604769706726,
-0.14628508687019348,
0.0034627518616616726,
0.2993426024913788,
-0.25320500135421753,
-0.10179107636213303,
0.5167980790138245,
-0.48171764612197876,
0.08819373697042465,
-0.1758192479610443,
0.02606387995183468,
-0.07182350754737854,
0.563106894493103,
0.28154081106185913,
-0.01572314277291298,
-0.356928288936615,
-0.09537825733423233,
-0.6198183298110962,
-0.01954670250415802,
-0.32670876383781433,
0.3234165608882904,
0.06498521566390991,
0.3096288740634918,
0.05098320543766022,
0.11596831679344177,
0.3893100619316101,
-0.12461131811141968,
-0.09644335508346558,
0.32717639207839966,
-0.324698269367218,
0.44326797127723694,
-0.2233613133430481,
-0.19830819964408875,
-0.07271769642829895,
-0.44461262226104736,
0.3880733847618103,
0.05435614287853241,
-0.15465210378170013,
-0.1481703370809555,
-0.05976593494415283,
0.15541642904281616,
0.1724299192428589,
0.18925343453884125,
0.3503001630306244,
0.33318012952804565,
0.038078006356954575,
-0.02126704528927803,
-0.16546322405338287,
0.15533941984176636,
-0.042015980929136276,
0.3519100844860077,
-0.08520746231079102,
0.06823883950710297,
-0.2896389067173004,
0.17770367860794067,
0.09357228875160217,
-0.11462932825088501,
0.016365928575396538,
-0.20131410658359528,
-0.3573482930660248,
-0.027393179014325142,
-0.038927704095840454,
0.3227158784866333,
0.07990185171365738,
0.39047032594680786,
0.07981269806623459,
-0.0845014676451683,
-0.16204683482646942,
-0.11616936326026917,
-0.02291099913418293,
-0.32667475938796997,
-0.29921287298202515,
-0.44641557335853577,
0.2472551167011261,
-0.25715261697769165,
0.10948224365711212,
-0.234952911734581,
-0.33308491110801697,
0.3025570511817932,
0.0018807959277182817,
-0.363439679145813,
0.3403206467628479,
-0.4263150691986084,
-0.097677081823349,
-0.15674525499343872,
0.07318556308746338,
-0.08853694051504135,
-0.4450531005859375,
0.245416060090065,
-0.11635102331638336
] |
https://github.com/huggingface/datasets/issues/1992
|
`datasets.map` multi processing much slower than single processing
|
Yes this is an official bug. On my side I haven't managed to reproduce it but @theo-m has. We'll investigate this !
|
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

| 22
|
`datasets.map` multi processing much slower than single processing
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

Yes this is an official bug. On my side I haven't managed to reproduce it but @theo-m has. We'll investigate this !
|
[
-0.4096488952636719,
-0.3040948510169983,
-0.08470144867897034,
0.33989256620407104,
-0.08970088511705399,
0.012733536772429943,
0.352761447429657,
0.11814599484205246,
0.0582125224173069,
0.009482896886765957,
0.07270223647356033,
0.44546380639076233,
0.16307325661182404,
0.18932944536209106,
-0.14008446037769318,
0.030220739543437958,
0.2145637720823288,
-0.05549083650112152,
0.1930118203163147,
-0.009090309031307697,
-0.16257628798484802,
0.155602365732193,
-0.5023618936538696,
0.0061132884584367275,
-0.40964123606681824,
-0.12241552770137787,
0.11342624574899673,
0.11840278655290604,
-0.13675418496131897,
-0.22997981309890747,
-0.23569151759147644,
0.12764276564121246,
-0.0973549485206604,
0.5718791484832764,
-0.0001234950468642637,
-0.18870650231838226,
0.039246588945388794,
0.27531373500823975,
0.09357040375471115,
0.0743589699268341,
-0.13994444906711578,
-0.26754963397979736,
-0.048315297812223434,
-0.09679458290338516,
0.12211308628320694,
0.21305625140666962,
-0.06752083450555801,
-0.45812860131263733,
-0.003836131189018488,
0.08698730915784836,
0.05460000038146973,
0.3697364926338196,
-0.308115154504776,
0.028556659817695618,
-0.34776225686073303,
0.14823006093502045,
-0.1653357595205307,
0.048366229981184006,
0.2727543115615845,
-0.18068350851535797,
-0.11240027099847794,
0.3173137605190277,
-0.07486673444509506,
0.30366480350494385,
-0.01662280783057213,
-0.05666743218898773,
0.052834950387477875,
-0.4617331027984619,
0.18411430716514587,
0.34886640310287476,
0.004645875655114651,
-0.07339776307344437,
-0.14764323830604553,
-0.24006342887878418,
-0.33163538575172424,
-0.1445305496454239,
0.2060098946094513,
0.13935993611812592,
0.17079582810401917,
-0.0030373590998351574,
-0.5398428440093994,
0.14571061730384827,
0.3567880094051361,
-0.07277019321918488,
-0.13262981176376343,
0.015790384262800217,
0.12140961736440659,
0.32478368282318115,
0.3295474052429199,
0.12826697528362274,
-0.039320141077041626,
-0.18619772791862488,
0.3062695860862732,
0.21307049691677094,
-0.7936063408851624,
-0.048488374799489975,
0.2307204306125641,
-0.11614533513784409,
-0.0666973665356636,
-0.1693452149629593,
-0.10443808138370514,
0.34014731645584106,
-0.33806368708610535,
0.10364827513694763,
0.2965783476829529,
-0.09406381100416183,
0.011503757908940315,
0.10553206503391266,
-0.02197038009762764,
-0.1720060408115387,
-0.31387051939964294,
0.0885762944817543,
0.11084967851638794,
-0.3309878408908844,
-0.052016645669937134,
0.12647554278373718,
-0.29213210940361023,
-0.08321531862020493,
-0.13142289221286774,
0.04335545748472214,
-0.2141335904598236,
-0.06579276919364929,
0.1219371110200882,
0.08766036480665207,
-0.020529605448246002,
0.8091924786567688,
-0.2801376283168793,
0.1047491729259491,
-0.47913867235183716,
-0.5906727910041809,
-0.018312744796276093,
-0.13107232749462128,
-0.3497505784034729,
0.21596406400203705,
0.11775348335504532,
-0.03208870068192482,
0.13052229583263397,
0.33396148681640625,
0.04656017944216728,
-0.22662104666233063,
0.33578357100486755,
-0.5207986235618591,
0.208292156457901,
0.1060207262635231,
0.15331508219242096,
0.5560804605484009,
-0.11430680751800537,
0.31063538789749146,
-0.12156102061271667,
0.26459887623786926,
-0.5323993563652039,
-0.2379593402147293,
0.14489656686782837,
-0.05220940709114075,
0.10526401549577713,
0.1218642145395279,
-0.46930497884750366,
0.49627596139907837,
0.3239689767360687,
-0.24152082204818726,
-0.1572941243648529,
-0.19355034828186035,
-0.6807107925415039,
-0.15663544833660126,
-0.04826945438981056,
0.16444864869117737,
-0.3335195481777191,
0.22704191505908966,
-0.33178114891052246,
0.1459435373544693,
0.446378231048584,
0.5977523326873779,
-0.19457609951496124,
0.3576447069644928,
-0.023772215470671654,
0.19981122016906738,
-0.01218891330063343,
-0.05912436917424202,
-0.39438682794570923,
0.5213029384613037,
-0.18123124539852142,
-0.006930891424417496,
-0.21874406933784485,
0.16812600195407867,
0.23085364699363708,
-0.0585271418094635,
0.3284291625022888,
0.27403783798217773,
0.018240386620163918,
0.4006514251232147,
-0.2312323898077011,
-0.14047804474830627,
0.17452028393745422,
0.022059006616473198,
-0.06645690649747849,
-0.097370944917202,
-0.010621003806591034,
-0.28231778740882874,
0.3429301381111145,
0.016074104234576225,
0.019071176648139954,
0.4239676296710968,
-0.38394689559936523,
-0.1766147017478943,
-0.14084750413894653,
-0.2508004307746887,
-0.07712110877037048,
0.3548488914966583,
-0.016200894489884377,
0.03305268660187721,
0.4360341727733612,
0.029518818482756615,
0.1947898119688034,
0.1215815469622612,
-0.03416435793042183,
-0.08282405883073807,
-0.12454763054847717,
-0.09145725518465042,
-0.17770260572433472,
-0.16827791929244995,
-0.015416215173900127,
0.4407098889350891,
0.20545615255832672,
-0.1136581301689148,
-0.044865578413009644,
-0.1442037969827652,
0.09083737432956696,
0.09586862474679947,
-0.2234877645969391,
-0.09672650694847107,
0.0980234444141388,
0.03936459869146347,
-0.08587918430566788,
0.2614974081516266,
0.4735928475856781,
-0.06477100402116776,
0.1389819234609604,
0.08860382437705994,
0.38193511962890625,
-0.051806043833494186,
0.012503606267273426,
-0.12271431088447571,
0.1179010272026062,
-0.24454009532928467,
-0.01774498261511326,
0.30307137966156006,
0.10273415595293045,
0.4237639904022217,
0.009325634688138962,
-0.12454797327518463,
0.01805899478495121,
0.29127049446105957,
0.1467750072479248,
0.04393220692873001,
0.32559844851493835,
0.3314093351364136,
0.21449100971221924,
0.3231859803199768,
-0.12541542947292328,
0.3435000479221344,
0.6361767053604126,
0.06327623873949051,
-0.3252536356449127,
0.03185820206999779,
-0.17833293974399567,
-0.35825315117836,
0.027182405814528465,
-0.13578173518180847,
0.5621815919876099,
0.0008778726332820952,
0.23145131766796112,
-0.027559371665120125,
-0.10162800550460815,
-0.07707095146179199,
-0.027014566585421562,
0.11001212894916534,
0.22707505524158478,
-0.10556507110595703,
0.3235623240470886,
-0.012885748408734798,
-0.04542167857289314,
-0.23213770985603333,
0.33845481276512146,
0.22580111026763916,
-0.2655063271522522,
0.11652489751577377,
-0.31235215067863464,
0.19253695011138916,
0.16999328136444092,
-0.11069191992282867,
-0.2881990671157837,
-0.21542668342590332,
-0.13649868965148926,
-0.0801253393292427,
0.1979139745235443,
-0.02975407987833023,
0.25902536511421204,
-0.13934822380542755,
-0.11048103123903275,
-0.040014345198869705,
0.021155865862965584,
-0.12371843308210373,
-0.1452607661485672,
-0.01689215376973152,
0.2741614580154419,
0.2089090496301651,
0.03794596716761589,
-0.056780483573675156,
-0.2843346893787384,
-0.09295555204153061,
-0.2236783653497696,
-0.10366326570510864,
0.15999022126197815,
0.0655348002910614,
-0.1882639229297638,
-0.08692556619644165,
-0.2204575091600418,
0.18120841681957245,
0.15819762647151947,
-0.2650480270385742,
-0.18302300572395325,
0.06016531586647034,
-0.11906703561544418,
-0.212245374917984,
0.010241517797112465,
-0.15423794090747833,
-0.08834277838468552,
-0.09257838129997253,
0.28504422307014465,
-0.1693926602602005,
0.3432783782482147,
-0.2147858589887619,
0.06286060810089111,
-0.08641234040260315,
-0.10673723369836807,
-0.012177337892353535,
-0.34018203616142273,
-0.37412306666374207,
-0.00529073178768158,
-0.02063957042992115,
-0.21173523366451263,
-0.14386723935604095,
0.07442623376846313,
0.15316642820835114,
0.14762067794799805,
-0.17373231053352356,
0.1924845278263092,
-0.3921600878238678,
0.1361328661441803,
0.061337195336818695,
0.026609383523464203,
0.4794919490814209,
0.01839975081384182,
0.07409591972827911,
0.008716503158211708,
-0.43816041946411133,
-0.08410461992025375,
0.2906064987182617,
0.013412244617938995,
0.0183817557990551,
0.3479091227054596,
0.041398148983716965,
0.634726345539093,
0.4861660599708557,
-0.14311544597148895,
0.19215478003025055,
-0.024267133325338364,
-0.15445852279663086,
-0.3937438726425171,
-0.21610642969608307,
0.12255207449197769,
-0.2629092037677765,
0.1614929735660553,
0.41075465083122253,
-0.004305940121412277,
-0.4227924346923828,
-0.0008050193428061903,
0.23212386667728424,
-0.2147947996854782,
-0.015487740747630596,
0.14256565272808075,
-0.129098579287529,
0.15699699521064758,
0.25086483359336853,
-0.17388683557510376,
-0.347938597202301,
-0.04628865048289299,
-0.05968023091554642,
-0.107052743434906,
-0.10732802003622055,
-0.24660846590995789,
-0.4860396683216095,
-0.026289859786629677,
-0.37344151735305786,
0.24216154217720032,
0.049449220299720764,
0.32000666856765747,
-0.018206072971224785,
0.11256962269544601,
0.31936782598495483,
0.013595253229141235,
0.5667480826377869,
-0.382467657327652,
-0.10516536980867386,
0.1393253058195114,
-0.3690502643585205,
-0.29614391922950745,
0.04722841456532478,
-0.1584998220205307,
0.27400949597358704,
0.5899761915206909,
0.5148351788520813,
-0.009203210473060608,
-0.17444641888141632,
-0.00265412125736475,
0.12482943385839462,
0.13430987298488617,
-0.255806565284729,
-0.3702336847782135,
0.12248080223798752,
-0.1186223104596138,
0.1311185359954834,
-0.007325602229684591,
0.12884221971035004,
0.11309254169464111,
-0.14651836454868317,
0.025368839502334595,
0.09866267442703247,
0.205262690782547,
0.15492171049118042,
0.11516033858060837,
0.08339867740869522,
0.31082627177238464,
0.23290510475635529,
-0.08538667857646942,
0.029308950528502464,
0.3309381902217865,
-0.11404907703399658,
-0.09814372658729553,
0.24574609100818634,
0.029643330723047256,
0.31587982177734375,
0.3062426745891571,
0.11953824013471603,
0.05038239434361458,
0.1765030175447464,
0.2736964821815491,
-0.21659494936466217,
0.2651934027671814,
0.4047739505767822,
0.3798929452896118,
-0.47518086433410645,
-0.49968817830085754,
-0.0021376211661845446,
0.48126235604286194,
-0.14553995430469513,
0.2885543704032898,
-0.8008272647857666,
0.09418134391307831,
0.040460098534822464,
0.07505630701780319,
0.7513072490692139,
-0.4283931255340576,
0.05473322048783302,
-0.2906387150287628,
0.18642093241214752,
-0.040156979113817215,
-0.5946899056434631,
0.1480187475681305,
-0.19386953115463257,
-0.3592979311943054,
0.026050373911857605,
-0.1081055998802185,
0.18945100903511047,
0.4942722022533417,
0.17049822211265564,
0.2647934854030609,
0.317111074924469,
0.11560633778572083,
-0.011567773297429085,
0.3212326765060425,
0.5124132037162781,
-0.3162499964237213,
0.1704138219356537,
0.02456127479672432,
0.2073129266500473,
-0.21667346358299255,
0.033260494470596313,
0.09199227392673492,
-0.03949854522943497,
0.005111674778163433,
-0.3249230682849884,
-0.1912873238325119,
-0.383832722902298,
0.21793821454048157,
-0.050830353051424026,
0.29203224182128906,
0.3759084939956665,
0.26796120405197144,
-0.07150594890117645,
0.09682556241750717,
0.0025587466079741716,
0.061981528997421265,
0.29237470030784607,
0.26260414719581604,
0.38422226905822754,
-0.4712411165237427,
-0.027832044288516045,
-0.10483034700155258,
-0.24019478261470795,
-0.2531828284263611,
-0.15867793560028076,
-0.12032738327980042,
-0.13958419859409332,
0.49651315808296204,
0.17512516677379608,
0.19039645791053772,
-0.20850110054016113,
0.22189031541347504,
0.12424454838037491,
-0.13494667410850525,
-0.018465815111994743,
0.09991015493869781,
0.02676006220281124,
0.6535872220993042,
-0.31038549542427063,
-0.5013622641563416,
-0.03153138980269432,
0.42797398567199707,
0.2679153382778168,
-0.08829472213983536,
0.031193166971206665,
0.23014768958091736,
-0.2587219178676605,
-0.1286643147468567,
0.17158843576908112,
-0.12221834063529968,
-0.1143975481390953,
0.12231991440057755,
-0.009047449566423893,
-0.22853802144527435,
0.2377549409866333,
-0.14738692343235016,
-0.16428472101688385,
-0.05626607686281204,
-0.19550295174121857,
-0.27996984124183655,
-0.2492467314004898,
-0.19935862720012665,
-0.3673154413700104,
-0.24899958074092865,
0.24815866351127625,
0.035537656396627426,
0.11801892518997192,
0.4483634829521179,
-0.12032302469015121,
0.07115818560123444,
0.11351414769887924,
0.18022321164608002,
-0.05374681204557419,
-0.21468861401081085,
0.08267012238502502,
-0.033026546239852905,
-0.08394668996334076,
0.11858969181776047,
-0.0826946571469307,
-0.13705384731292725,
-0.03799520060420036,
0.19255001842975616,
-0.023291558027267456,
-0.24505408108234406,
0.34101638197898865,
-0.12115603685379028,
-0.21603937447071075,
-0.4086185395717621,
-0.04020707309246063,
0.07036522775888443,
0.001775736571289599,
-0.10672204941511154,
0.28224247694015503,
-0.3028363883495331,
-0.26394200325012207,
0.44807371497154236,
-0.1902105212211609,
-0.07750201970338821,
-0.01555790938436985,
0.2981880307197571,
0.45197823643684387,
-0.08093354105949402,
-0.09765306860208511,
0.019575610756874084,
0.23650600016117096,
0.08487420529127121,
0.1398586630821228,
-0.11997640132904053,
0.18271510303020477,
0.26269856095314026,
0.3164879381656647,
0.12392821162939072,
0.09855096787214279,
-0.2516513466835022,
0.002466716570779681,
-0.010800939984619617,
-0.2553521394729614,
-0.21392887830734253,
0.5657908916473389,
0.060655537992715836,
0.12688148021697998,
0.03754950314760208,
0.3244931399822235,
0.20574186742305756,
-0.015821993350982666,
-0.07791637629270554,
0.07256263494491577,
-0.31154513359069824,
0.06094375252723694,
0.1631498783826828,
0.24883662164211273,
0.27836874127388,
0.4251837134361267,
0.11010850220918655,
0.003040045965462923,
0.4774029552936554,
0.2828223705291748,
0.2613276243209839,
0.5220375061035156,
0.2338142693042755,
-0.025584451854228973,
-0.3653481602668762,
0.2001151293516159,
0.506909191608429,
-0.368328720331192,
-0.05682305619120598,
-0.04391549900174141,
0.23235061764717102,
-0.2388915866613388,
-0.3795408010482788,
-0.2639644742012024,
0.3889560103416443,
-0.16088202595710754,
-0.25684940814971924,
0.24350880086421967,
-0.04735570028424263,
0.0063973418436944485,
0.18461667001247406,
-0.2035256028175354,
0.15303555130958557,
0.8075748682022095,
0.12286539375782013,
-0.0009973563719540834,
-0.38298356533050537,
-0.3443286418914795,
-0.1443076729774475,
0.16345199942588806,
-0.14931796491146088,
0.1704658418893814,
-0.32393985986709595,
-0.027548449113965034,
-0.019241109490394592,
0.27925774455070496,
0.3590283989906311,
0.2796684205532074,
-0.12019511312246323,
0.07421538233757019,
-0.009750031866133213,
0.17169199883937836,
0.007583245635032654,
0.1788504421710968,
0.03959675505757332,
0.1739637702703476,
0.15110063552856445,
-0.11748611927032471,
-0.07794927060604095,
-0.43456003069877625,
0.0654476135969162,
0.3959387242794037,
-0.16495399177074432,
0.17454984784126282,
-0.3532513678073883,
-0.15340271592140198,
-0.005877162795513868,
0.2983115315437317,
-0.25236082077026367,
-0.09578816592693329,
0.5177609324455261,
-0.4819997549057007,
0.08499359339475632,
-0.17642244696617126,
0.020175065845251083,
-0.07533817738294601,
0.5530561208724976,
0.29127511382102966,
-0.013978525996208191,
-0.37760964035987854,
-0.10374720394611359,
-0.599349856376648,
-0.027002375572919846,
-0.32739871740341187,
0.29988113045692444,
0.0710291936993599,
0.29134517908096313,
0.05079622194170952,
0.11129257082939148,
0.40817874670028687,
-0.09454378485679626,
-0.06407783180475235,
0.3450731039047241,
-0.32135891914367676,
0.448504775762558,
-0.23885096609592438,
-0.19244615733623505,
-0.07288876920938492,
-0.4286521375179291,
0.3931485712528229,
0.06916186213493347,
-0.15048716962337494,
-0.16820216178894043,
-0.02821316197514534,
0.16364368796348572,
0.15252839028835297,
0.19525396823883057,
0.3520742952823639,
0.3359543979167938,
0.0250953808426857,
-0.0006469166255556047,
-0.12167331576347351,
0.20235072076320648,
-0.048846032470464706,
0.3206837773323059,
-0.05801113322377205,
0.055600378662347794,
-0.2994976341724396,
0.17744256556034088,
0.10826191306114197,
-0.11218813061714172,
0.008570087142288685,
-0.2228367179632187,
-0.33695951104164124,
-0.030914874747395515,
-0.04658568277955055,
0.3373241722583771,
0.06868061423301697,
0.3729419708251953,
0.10673824697732925,
-0.07175025343894958,
-0.15523697435855865,
-0.10693724453449249,
-0.022831182926893234,
-0.2881871163845062,
-0.30333685874938965,
-0.45137515664100647,
0.24823996424674988,
-0.26328244805336,
0.13368918001651764,
-0.22434033453464508,
-0.33404603600502014,
0.3018870949745178,
-0.002104430925101042,
-0.36224907636642456,
0.3494463860988617,
-0.404994934797287,
-0.0751618891954422,
-0.1555633246898651,
0.06648187339305878,
-0.07479732483625412,
-0.4459964334964752,
0.22672194242477417,
-0.13016512989997864
] |
https://github.com/huggingface/datasets/issues/1992
|
`datasets.map` multi processing much slower than single processing
|
Thank you for the reply! I would be happy to follow the discussions related to the issue.
If you do not mind, could you also give a little more explanation on my p.s.2? I am having a hard time figuring out why the single processing `map` uses all of my cores.
@lhoestq @theo-m
|
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

| 53
|
`datasets.map` multi processing much slower than single processing
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

Thank you for the reply! I would be happy to follow the discussions related to the issue.
If you do not mind, could you also give a little more explanation on my p.s.2? I am having a hard time figuring out why the single processing `map` uses all of my cores.
@lhoestq @theo-m
|
[
-0.3987976610660553,
-0.33985674381256104,
-0.09195348620414734,
0.3478138744831085,
-0.10693103075027466,
0.0302637480199337,
0.370673805475235,
0.10262544453144073,
0.0623084157705307,
0.01497403159737587,
0.09556767344474792,
0.4472287595272064,
0.17406781017780304,
0.19854353368282318,
-0.15032824873924255,
0.03246692195534706,
0.20791201293468475,
-0.013935231603682041,
0.20800697803497314,
-0.022497795522212982,
-0.14968059957027435,
0.16760168969631195,
-0.4635995924472809,
-0.0011211349628865719,
-0.4276065528392792,
-0.1505293995141983,
0.1084919348359108,
0.15836913883686066,
-0.15400734543800354,
-0.23104844987392426,
-0.2729555666446686,
0.15618568658828735,
-0.07722026109695435,
0.5987077355384827,
-0.0001209586116601713,
-0.17843225598335266,
-0.015478333458304405,
0.2657150328159332,
0.08263403922319412,
0.02261277474462986,
-0.14891739189624786,
-0.24391035735607147,
-0.05087706819176674,
-0.10651914775371552,
0.12415537983179092,
0.24920521676540375,
-0.08153342455625534,
-0.4744793176651001,
0.03486872464418411,
0.09184624254703522,
0.07008839398622513,
0.3698406219482422,
-0.35732734203338623,
0.005835510790348053,
-0.4008415937423706,
0.11535459011793137,
-0.1398286372423172,
0.04625769704580307,
0.3084884583950043,
-0.17060165107250214,
-0.1413278728723526,
0.3538629114627838,
-0.05107772722840309,
0.30192387104034424,
-0.0005350307328626513,
-0.09177054464817047,
0.05094234645366669,
-0.4716905355453491,
0.21425941586494446,
0.3441268503665924,
0.005003686528652906,
-0.04491593316197395,
-0.15340691804885864,
-0.23391713201999664,
-0.3566296100616455,
-0.1425352692604065,
0.19763238728046417,
0.1191568598151207,
0.1468939185142517,
0.023606695234775543,
-0.5594052076339722,
0.1424548476934433,
0.32382968068122864,
-0.06036023423075676,
-0.12074816972017288,
0.03404143080115318,
0.10241873562335968,
0.3249114155769348,
0.3525272607803345,
0.15888677537441254,
-0.0753311812877655,
-0.22132477164268494,
0.31509003043174744,
0.19271321594715118,
-0.7903571724891663,
-0.05467315390706062,
0.21718177199363708,
-0.09191343188285828,
-0.057015560567379,
-0.15115879476070404,
-0.11517705768346786,
0.34969452023506165,
-0.3474541902542114,
0.08734361827373505,
0.3179735243320465,
-0.06743278354406357,
0.033334843814373016,
0.07785653322935104,
-0.03983870521187782,
-0.16192235052585602,
-0.2981233298778534,
0.05924547091126442,
0.08211342245340347,
-0.30911052227020264,
-0.0677427127957344,
0.10367435216903687,
-0.3128347396850586,
-0.08419777452945709,
-0.17084456980228424,
0.006215337198227644,
-0.21756507456302643,
-0.08678652346134186,
0.14960633218288422,
0.09327968955039978,
-0.0010681243147701025,
0.8402984142303467,
-0.26444730162620544,
0.09337455779314041,
-0.4438735842704773,
-0.6254184246063232,
-0.02148793265223503,
-0.09772980958223343,
-0.37838971614837646,
0.228913351893425,
0.12024489790201187,
-0.052270352840423584,
0.12999391555786133,
0.32371771335601807,
0.04192783683538437,
-0.1985156089067459,
0.3197096586227417,
-0.5415109992027283,
0.18958288431167603,
0.06053165718913078,
0.14352229237556458,
0.5663229823112488,
-0.09632401913404465,
0.2923193573951721,
-0.12785124778747559,
0.2347627729177475,
-0.5155066847801208,
-0.24755650758743286,
0.17588961124420166,
-0.02238636091351509,
0.10438060760498047,
0.10098820179700851,
-0.4531762897968292,
0.5067194104194641,
0.29287615418434143,
-0.19593648612499237,
-0.15085312724113464,
-0.15621517598628998,
-0.6555339097976685,
-0.16082221269607544,
-0.07108398526906967,
0.1317814439535141,
-0.3583325147628784,
0.20573227107524872,
-0.3523499071598053,
0.14839264750480652,
0.40705564618110657,
0.6043969988822937,
-0.21384787559509277,
0.3782387375831604,
0.02456430345773697,
0.23475879430770874,
0.0038254207465797663,
-0.08660832047462463,
-0.38282233476638794,
0.5263625383377075,
-0.2283218502998352,
-0.0003075575514230877,
-0.1912577599287033,
0.17503879964351654,
0.23844505846500397,
-0.02725769579410553,
0.36573827266693115,
0.2632676959037781,
0.009417219087481499,
0.38356414437294006,
-0.22402165830135345,
-0.15330760180950165,
0.16316330432891846,
0.05227918177843094,
-0.08037318289279938,
-0.10238034278154373,
-0.04639919474720955,
-0.29130819439888,
0.32201051712036133,
-0.006335285026580095,
0.029031649231910706,
0.42831942439079285,
-0.3774927854537964,
-0.190832257270813,
-0.13737620413303375,
-0.24499815702438354,
-0.09539061784744263,
0.3824569880962372,
0.023902539163827896,
0.07063799351453781,
0.46347588300704956,
0.038680922240018845,
0.14959700405597687,
0.10425110906362534,
-0.017524048686027527,
-0.07937287539243698,
-0.09171618521213531,
-0.1016782596707344,
-0.1805582344532013,
-0.22269940376281738,
-0.06596987694501877,
0.44194936752319336,
0.22275778651237488,
-0.09889335930347443,
-0.039300087839365005,
-0.15863145887851715,
0.04305757209658623,
0.0839974582195282,
-0.21251384913921356,
-0.07890506088733673,
0.07000622898340225,
0.0641721710562706,
-0.07292827218770981,
0.2602722644805908,
0.42531317472457886,
-0.07394685596227646,
0.17464904487133026,
0.11281418055295944,
0.35527917742729187,
-0.04587535560131073,
0.020368238911032677,
-0.14133931696414948,
0.1449822634458542,
-0.25915297865867615,
-0.05212973803281784,
0.2841012179851532,
0.08382923901081085,
0.4506699740886688,
0.02356114238500595,
-0.14254873991012573,
-0.014093292877078056,
0.26437830924987793,
0.17081306874752045,
0.049269478768110275,
0.35556572675704956,
0.3383418023586273,
0.2349533587694168,
0.33603435754776,
-0.1631883978843689,
0.34453508257865906,
0.6126601696014404,
0.041752204298973083,
-0.32955679297447205,
0.02923048660159111,
-0.20064210891723633,
-0.3668961226940155,
0.08390667289495468,
-0.11446847021579742,
0.5725333094596863,
0.020445654168725014,
0.2464556097984314,
-0.04260128736495972,
-0.06171758472919464,
-0.07889201492071152,
-0.03211859241127968,
0.10358388721942902,
0.2068735510110855,
-0.13353419303894043,
0.29636338353157043,
-0.02335372008383274,
-0.046437956392765045,
-0.2598055601119995,
0.32001641392707825,
0.21674682199954987,
-0.2419920563697815,
0.13057111203670502,
-0.31966331601142883,
0.14522969722747803,
0.20405207574367523,
-0.11868805438280106,
-0.30315083265304565,
-0.20740126073360443,
-0.11621639877557755,
-0.06194593384861946,
0.2765522599220276,
-0.05911639332771301,
0.2854486405849457,
-0.09246156364679337,
-0.15196199715137482,
-0.017239466309547424,
-0.02020958438515663,
-0.16555064916610718,
-0.1726309359073639,
0.008545899763703346,
0.2644038498401642,
0.22060526907444,
0.047590792179107666,
-0.06418174505233765,
-0.2819518744945526,
-0.052487507462501526,
-0.1731327623128891,
-0.11061053723096848,
0.13793329894542694,
0.06425780802965164,
-0.17110560834407806,
0.003956812433898449,
-0.2347947508096695,
0.1894116848707199,
0.14708131551742554,
-0.25779661536216736,
-0.1638481467962265,
0.035585273057222366,
-0.12144442647695541,
-0.21226799488067627,
0.012888527475297451,
-0.165816992521286,
-0.0854586660861969,
-0.09553878009319305,
0.30601170659065247,
-0.1661304384469986,
0.32321038842201233,
-0.19444537162780762,
0.06420174241065979,
-0.03899489343166351,
-0.07176718860864639,
0.031210962682962418,
-0.3452690839767456,
-0.37136366963386536,
-0.021094955503940582,
0.02809719182550907,
-0.20076727867126465,
-0.1226668506860733,
0.0851425901055336,
0.20755842328071594,
0.11453228443861008,
-0.1510450392961502,
0.17483417689800262,
-0.3728010952472687,
0.13019061088562012,
0.058937814086675644,
0.07849009335041046,
0.446720153093338,
0.03605346009135246,
0.06170440465211868,
0.015099886804819107,
-0.41154417395591736,
-0.07897918671369553,
0.2864609956741333,
0.028867622837424278,
0.028508136048913002,
0.3272489309310913,
0.0790635496377945,
0.6817408204078674,
0.4720706343650818,
-0.18808762729167938,
0.19480212032794952,
0.004317675717175007,
-0.17797920107841492,
-0.3762977421283722,
-0.2214653640985489,
0.1091214194893837,
-0.2775554955005646,
0.1900651901960373,
0.4069158732891083,
0.002533453516662121,
-0.4038460850715637,
-0.029823437333106995,
0.2467462122440338,
-0.23898279666900635,
-0.005851062946021557,
0.14718692004680634,
-0.079592265188694,
0.12828576564788818,
0.2544079124927521,
-0.18981342017650604,
-0.34392887353897095,
-0.03389477729797363,
-0.05740867927670479,
-0.070703886449337,
-0.1244400218129158,
-0.2597436308860779,
-0.5114732980728149,
-0.0330209955573082,
-0.38134658336639404,
0.2475263625383377,
0.022880924865603447,
0.2694842219352722,
-0.03789006546139717,
0.12434197217226028,
0.3278184235095978,
-0.006478066556155682,
0.5314375162124634,
-0.3730386793613434,
-0.17245250940322876,
0.12348548322916031,
-0.41295602917671204,
-0.27001816034317017,
0.11266522109508514,
-0.18090148270130157,
0.28459495306015015,
0.5743822455406189,
0.5144301652908325,
-0.04554295912384987,
-0.22449512779712677,
-0.03747611120343208,
0.13091132044792175,
0.13298891484737396,
-0.27037549018859863,
-0.3282879590988159,
0.14307691156864166,
-0.1507311314344406,
0.100636787712574,
-0.02075926773250103,
0.13676734268665314,
0.12833745777606964,
-0.10235942900180817,
0.058042969554662704,
0.09145335853099823,
0.2539266049861908,
0.19802792370319366,
0.09630785882472992,
0.06021079793572426,
0.2583257853984833,
0.265717089176178,
-0.09805949777364731,
0.03828404098749161,
0.3328787386417389,
-0.15483461320400238,
-0.09225019812583923,
0.23302306234836578,
0.060370635241270065,
0.321739137172699,
0.34817224740982056,
0.12119153141975403,
0.06014208868145943,
0.18784727156162262,
0.24289080500602722,
-0.22551889717578888,
0.2873836159706116,
0.3583310842514038,
0.36877673864364624,
-0.44623303413391113,
-0.4971272349357605,
-0.012983464635908604,
0.4985200762748718,
-0.16834336519241333,
0.3029259443283081,
-0.776491641998291,
0.07372342050075531,
0.021533546969294548,
0.07447441667318344,
0.7982975840568542,
-0.43529272079467773,
0.062213264405727386,
-0.2951289713382721,
0.20999187231063843,
-0.056706905364990234,
-0.5967221260070801,
0.13448289036750793,
-0.19119834899902344,
-0.3782005310058594,
0.006917325779795647,
-0.1047016829252243,
0.1857604682445526,
0.5643191337585449,
0.1523868292570114,
0.2857622504234314,
0.336622953414917,
0.08056198805570602,
-0.00959148071706295,
0.3668854236602783,
0.5028191804885864,
-0.3357381820678711,
0.15403391420841217,
0.046315643936395645,
0.19374805688858032,
-0.19323354959487915,
0.0020392995793372393,
0.09964493662118912,
-0.07191663980484009,
-0.0027783880941569805,
-0.31431156396865845,
-0.2183898687362671,
-0.4510263204574585,
0.2037443369626999,
-0.06801220029592514,
0.31757014989852905,
0.3931640088558197,
0.27698251605033875,
-0.06704960018396378,
0.041129786521196365,
0.006571476813405752,
0.03567163273692131,
0.30105113983154297,
0.2570821940898895,
0.3631032109260559,
-0.4733557105064392,
-0.00570566114038229,
-0.11862939596176147,
-0.2454594522714615,
-0.21744103729724884,
-0.17005276679992676,
-0.05865958705544472,
-0.1510436087846756,
0.48761382699012756,
0.15785442292690277,
0.1609758585691452,
-0.19050240516662598,
0.24735267460346222,
0.1159873902797699,
-0.11486852169036865,
-0.0019465512596070766,
0.13739363849163055,
0.02470296435058117,
0.6386432647705078,
-0.2702280282974243,
-0.4856579601764679,
-0.034576114267110825,
0.38692742586135864,
0.24855773150920868,
-0.10725622624158859,
0.011695174500346184,
0.20254366099834442,
-0.2665698230266571,
-0.1496112197637558,
0.1637890785932541,
-0.08577784895896912,
-0.07299894094467163,
0.12736530601978302,
0.034830398857593536,
-0.249417245388031,
0.24809737503528595,
-0.10014794021844864,
-0.1314287781715393,
-0.0336114875972271,
-0.20421765744686127,
-0.26432472467422485,
-0.25447189807891846,
-0.17200884222984314,
-0.37506017088890076,
-0.20700927078723907,
0.242101788520813,
-0.0172366201877594,
0.12845101952552795,
0.4695546329021454,
-0.149786576628685,
0.06071271374821663,
0.10215435177087784,
0.19060878455638885,
-0.03849959000945091,
-0.26011380553245544,
0.09419772773981094,
-0.0170739758759737,
-0.06436081230640411,
0.0783967450261116,
-0.08534742891788483,
-0.16682057082653046,
-0.011581441387534142,
0.1847725510597229,
-0.013035368174314499,
-0.2575169503688812,
0.3359079658985138,
-0.1025238037109375,
-0.17392638325691223,
-0.39284029603004456,
-0.05017760396003723,
0.04684009402990341,
0.009702061302959919,
-0.10233105719089508,
0.31729936599731445,
-0.2931724488735199,
-0.30319374799728394,
0.4068659245967865,
-0.20919129252433777,
-0.06654570996761322,
-0.0005238784360699356,
0.26979830861091614,
0.45956170558929443,
-0.09184557944536209,
-0.12778139114379883,
0.029920563101768494,
0.2942765951156616,
0.06879987567663193,
0.11208571493625641,
-0.10152444988489151,
0.18292362987995148,
0.26990556716918945,
0.27813640236854553,
0.12019981443881989,
0.11410795152187347,
-0.20375694334506989,
0.005395629443228245,
0.024142825976014137,
-0.21305130422115326,
-0.17937637865543365,
0.5706428289413452,
0.013828868046402931,
0.1518813967704773,
0.06895603984594345,
0.32179129123687744,
0.2287779450416565,
-0.0012455538380891085,
-0.10710836946964264,
0.0849718451499939,
-0.3123008906841278,
0.068446584045887,
0.11100885272026062,
0.24587146937847137,
0.257317453622818,
0.436222642660141,
0.12562055885791779,
0.010120449587702751,
0.41738030314445496,
0.24228733777999878,
0.30940744280815125,
0.5200676321983337,
0.2401486486196518,
0.013599260710179806,
-0.36390528082847595,
0.19174209237098694,
0.4900939464569092,
-0.34419068694114685,
-0.06621105968952179,
-0.048706717789173126,
0.23945486545562744,
-0.26842594146728516,
-0.37090805172920227,
-0.2196553349494934,
0.39069458842277527,
-0.17245952785015106,
-0.24326854944229126,
0.2041933685541153,
-0.038143739104270935,
-0.045964594930410385,
0.16042448580265045,
-0.23662017285823822,
0.13132557272911072,
0.8348478078842163,
0.12337680160999298,
0.030946407467126846,
-0.3607611060142517,
-0.3917117416858673,
-0.13421767950057983,
0.14807960391044617,
-0.13457439839839935,
0.19029787182807922,
-0.31341928243637085,
-0.006878377869725227,
-0.013660414144396782,
0.27658167481422424,
0.35658594965934753,
0.277443528175354,
-0.11382251232862473,
0.09154669940471649,
-0.026879362761974335,
0.15397551655769348,
-0.01842799223959446,
0.15348662436008453,
0.006665095686912537,
0.1805165708065033,
0.15355493128299713,
-0.08646021783351898,
-0.09819900244474411,
-0.42847195267677307,
0.044732436537742615,
0.33989831805229187,
-0.16346929967403412,
0.13269291818141937,
-0.31013402342796326,
-0.1590605527162552,
-0.012058150954544544,
0.28581804037094116,
-0.24953943490982056,
-0.0862623006105423,
0.4984055757522583,
-0.4902805685997009,
0.07265093177556992,
-0.18412050604820251,
0.035618286579847336,
-0.04055875912308693,
0.5247304439544678,
0.28653639554977417,
-0.01298779621720314,
-0.41993170976638794,
-0.11387884616851807,
-0.5841235518455505,
-0.06558925658464432,
-0.32436513900756836,
0.26150116324424744,
0.04507503658533096,
0.2684958577156067,
0.06113608554005623,
0.14476853609085083,
0.4047614336013794,
-0.10118906944990158,
-0.08668243885040283,
0.3594864308834076,
-0.3306731879711151,
0.5003917217254639,
-0.21429434418678284,
-0.18564777076244354,
-0.05530784651637077,
-0.4004407227039337,
0.36680078506469727,
0.09689874202013016,
-0.12973487377166748,
-0.17157196998596191,
-0.016261061653494835,
0.17877531051635742,
0.14078201353549957,
0.1806521862745285,
0.33150067925453186,
0.32670387625694275,
0.026923393830657005,
-0.008939774706959724,
-0.10128182172775269,
0.2193169891834259,
-0.07923230528831482,
0.31453990936279297,
-0.03766636177897453,
0.05904901772737503,
-0.3016560673713684,
0.17764955759048462,
0.1021893173456192,
-0.1452140510082245,
0.0031908038072288036,
-0.2515277564525604,
-0.3215586543083191,
-0.03988867998123169,
-0.055103402584791183,
0.35576289892196655,
0.08974442631006241,
0.4125423729419708,
0.13876470923423767,
-0.08937911689281464,
-0.2004953771829605,
-0.09980474412441254,
-0.01849173568189144,
-0.2824781835079193,
-0.32317668199539185,
-0.4460322856903076,
0.2157081812620163,
-0.2852638363838196,
0.1410280019044876,
-0.2329757809638977,
-0.37403252720832825,
0.3034422993659973,
-0.022932400926947594,
-0.40841108560562134,
0.3051842749118805,
-0.34856584668159485,
-0.08239735662937164,
-0.15028725564479828,
0.04324943199753761,
-0.07814673334360123,
-0.4487416744232178,
0.20017558336257935,
-0.1336032897233963
] |
https://github.com/huggingface/datasets/issues/1992
|
`datasets.map` multi processing much slower than single processing
|
Regarding your ps2: It depends what function you pass to `map`.
For example, fast tokenizers from `transformers` in Rust tokenize texts and parallelize the tokenization over all the cores.
|
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

| 29
|
`datasets.map` multi processing much slower than single processing
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

Regarding your ps2: It depends what function you pass to `map`.
For example, fast tokenizers from `transformers` in Rust tokenize texts and parallelize the tokenization over all the cores.
|
[
-0.44395050406455994,
-0.27671870589256287,
-0.07882990688085556,
0.3751116991043091,
-0.09080378711223602,
-0.005079334601759911,
0.32117581367492676,
0.06434030085802078,
-0.045802440494298935,
-0.009251594543457031,
0.047764722257852554,
0.4086364507675171,
0.21794891357421875,
0.15244486927986145,
-0.14575164020061493,
-0.001973065547645092,
0.225488543510437,
-0.021347807720303535,
0.14677393436431885,
0.017389729619026184,
-0.22187940776348114,
0.10279804468154907,
-0.5076214075088501,
0.007018641103059053,
-0.43289637565612793,
-0.16309235990047455,
0.08521321415901184,
0.09208373725414276,
-0.1628725379705429,
-0.23092028498649597,
-0.2925644814968109,
0.2094140201807022,
-0.07405643165111542,
0.5870193839073181,
-0.00011809668649220839,
-0.168838769197464,
-0.010061911307275295,
0.2632310390472412,
0.10635694861412048,
0.001380894216708839,
-0.05806678161025047,
-0.29708361625671387,
-0.09592452645301819,
-0.09749198704957962,
0.10890426486730576,
0.1052417978644371,
-0.07693475484848022,
-0.42389965057373047,
0.1259809285402298,
0.013793033547699451,
0.10012847930192947,
0.381885290145874,
-0.2749173641204834,
-0.03493311628699303,
-0.35103824734687805,
0.15261943638324738,
-0.13741590082645416,
-0.02403664030134678,
0.24174420535564423,
-0.12406512349843979,
-0.12726594507694244,
0.3543687164783478,
-0.12851877510547638,
0.25875771045684814,
0.07895731925964355,
-0.04785129055380821,
0.05092201381921768,
-0.457181841135025,
0.17482103407382965,
0.4000488221645355,
0.01255466602742672,
-0.0977228432893753,
-0.16878382861614227,
-0.23095524311065674,
-0.2791661322116852,
-0.15732622146606445,
0.20208704471588135,
0.10408353060483932,
0.13395372033119202,
-0.007066570222377777,
-0.6016130447387695,
0.23995724320411682,
0.35420194268226624,
-0.1202210932970047,
-0.11609842628240585,
0.08904535323381424,
0.11987050622701645,
0.3441293239593506,
0.33677107095718384,
0.07702987641096115,
-0.08753161877393723,
-0.25671735405921936,
0.2177370935678482,
0.22796419262886047,
-0.8232141137123108,
-0.07567107677459717,
0.2212405502796173,
-0.16763189435005188,
-0.052167292684316635,
-0.1305062621831894,
-0.14654697477817535,
0.3569338619709015,
-0.3285418450832367,
0.11929973214864731,
0.2981939911842346,
-0.03457868471741676,
0.014053957536816597,
0.15811295807361603,
-0.01023593358695507,
-0.23398463428020477,
-0.3126998543739319,
0.05933837220072746,
0.03468078747391701,
-0.2625657021999359,
-0.035595182329416275,
0.0848609134554863,
-0.353297621011734,
-0.05752513185143471,
-0.21068407595157623,
0.05341947823762894,
-0.27902907133102417,
-0.06604775786399841,
0.16198748350143433,
0.14057008922100067,
0.010609153658151627,
0.7866411805152893,
-0.3018142879009247,
0.04867338016629219,
-0.3648943603038788,
-0.5528380274772644,
-0.042950134724378586,
-0.19306795299053192,
-0.3997555375099182,
0.26326805353164673,
0.10551159083843231,
0.04934760928153992,
0.1494632214307785,
0.282112717628479,
0.07659309357404709,
-0.14135706424713135,
0.3494642376899719,
-0.5429771542549133,
0.1496420055627823,
0.07261967658996582,
0.1545603722333908,
0.5177938938140869,
-0.13847491145133972,
0.31490200757980347,
-0.19714514911174774,
0.22030168771743774,
-0.4752674400806427,
-0.2318785935640335,
0.21513207256793976,
0.013538832776248455,
0.08857878297567368,
0.07967588305473328,
-0.5455659627914429,
0.5509291887283325,
0.29192811250686646,
-0.17266495525836945,
-0.1275850087404251,
-0.18536518514156342,
-0.610313355922699,
-0.1781904399394989,
-0.0018484221072867513,
0.12260045111179352,
-0.24177896976470947,
0.1732538640499115,
-0.27100130915641785,
0.12221559137105942,
0.44973474740982056,
0.6742506623268127,
-0.21962963044643402,
0.4246216416358948,
0.01584097370505333,
0.3035619258880615,
0.04491543024778366,
-0.11390792578458786,
-0.31098777055740356,
0.4910982847213745,
-0.1610899418592453,
-0.03469514474272728,
-0.18115553259849548,
0.14040213823318481,
0.31909677386283875,
-0.029023051261901855,
0.2742291986942291,
0.31473660469055176,
0.026519140228629112,
0.3793394863605499,
-0.15751750767230988,
-0.1305791735649109,
0.1962331086397171,
0.04519684985280037,
-0.11504345387220383,
-0.13561005890369415,
-0.05035224184393883,
-0.27501291036605835,
0.2248004674911499,
-0.030357519164681435,
0.04873046278953552,
0.391147643327713,
-0.3012827932834625,
-0.17582190036773682,
-0.1415565460920334,
-0.22773340344429016,
-0.059973880648612976,
0.3407978117465973,
0.043089356273412704,
0.06395258009433746,
0.46081453561782837,
0.001595695735886693,
0.2276870310306549,
0.13552989065647125,
-0.03809530660510063,
-0.1376340091228485,
-0.03134848549962044,
-0.049169935286045074,
-0.13466304540634155,
-0.2262030988931656,
-0.0678613930940628,
0.3672986924648285,
0.22380705177783966,
-0.06432634592056274,
0.08833079040050507,
-0.1257752627134323,
0.06707894802093506,
0.0064629907719790936,
-0.24240228533744812,
-0.03418290615081787,
0.06548856198787689,
0.10893011093139648,
-0.04548288881778717,
0.2792191505432129,
0.44929829239845276,
-0.03801591321825981,
0.11827223747968674,
0.16757331788539886,
0.3643091917037964,
-0.04217786714434624,
0.012464196421205997,
-0.12799273431301117,
0.08095546066761017,
-0.22929507493972778,
-0.0607793964445591,
0.2941323220729828,
0.10386259108781815,
0.4727625548839569,
0.004859492182731628,
-0.17620697617530823,
0.02054593712091446,
0.2855570614337921,
0.11215928196907043,
0.10429759323596954,
0.2605012059211731,
0.3831954300403595,
0.2929072380065918,
0.38074928522109985,
-0.16701993346214294,
0.2910582721233368,
0.5920897722244263,
-0.007292057853192091,
-0.35898274183273315,
0.08166782557964325,
-0.22336383163928986,
-0.4092293977737427,
0.07799877971410751,
-0.1123964712023735,
0.5411708354949951,
0.04661300405859947,
0.21338339149951935,
-0.0555458590388298,
-0.12741409242153168,
-0.05245663970708847,
-0.006476215552538633,
0.07260090857744217,
0.19732847809791565,
-0.08159356564283371,
0.270923912525177,
0.05631693825125694,
-0.06448966264724731,
-0.2889426052570343,
0.3361009955406189,
0.24157066643238068,
-0.20434154570102692,
0.07600187510251999,
-0.2641550302505493,
0.11246566474437714,
0.17097437381744385,
-0.060717783868312836,
-0.21242573857307434,
-0.19044212996959686,
-0.1214689090847969,
-0.12393955886363983,
0.16273677349090576,
-0.006701061502099037,
0.2737029492855072,
-0.07645677775144577,
-0.09273296594619751,
-0.027557794004678726,
-0.032387875020504,
-0.14452184736728668,
-0.179759219288826,
0.01042760070413351,
0.2918092906475067,
0.20764145255088806,
0.11699709296226501,
-0.07550593465566635,
-0.23248730599880219,
-0.06650492548942566,
-0.23157793283462524,
-0.05561386048793793,
0.07954222708940506,
0.013509606011211872,
-0.15377791225910187,
-0.07505994290113449,
-0.271627813577652,
0.046104177832603455,
0.19815990328788757,
-0.30559539794921875,
-0.24106642603874207,
0.04261272773146629,
-0.14349786937236786,
-0.25726786255836487,
0.04515651613473892,
-0.12291751801967621,
-0.08818656206130981,
-0.10831541568040848,
0.32685530185699463,
-0.1563328206539154,
0.2969713807106018,
-0.2059314101934433,
0.04237385466694832,
-0.03508392721414566,
-0.15363162755966187,
0.03894694894552231,
-0.3043983578681946,
-0.3341446816921234,
0.05110679566860199,
-0.04293511062860489,
-0.1612556427717209,
-0.1311006397008896,
0.11833175271749496,
0.17082229256629944,
0.14957195520401,
-0.13461175560951233,
0.1372232586145401,
-0.3764249384403229,
0.14450392127037048,
0.049495600163936615,
0.1159210130572319,
0.4347307085990906,
0.0688752755522728,
0.0020966005977243185,
0.06672607362270355,
-0.41926679015159607,
-0.06351591646671295,
0.28090423345565796,
0.05100296437740326,
0.01567029021680355,
0.39014512300491333,
0.060049060732126236,
0.6509928703308105,
0.5063648819923401,
-0.18626908957958221,
0.15788380801677704,
0.014895526692271233,
-0.11450701951980591,
-0.40587836503982544,
-0.1702895313501358,
0.10956364125013351,
-0.22045685350894928,
0.11818112432956696,
0.41015803813934326,
-0.005214296281337738,
-0.45264339447021484,
0.002045091474428773,
0.261364221572876,
-0.2650693953037262,
-0.018933486193418503,
0.17344282567501068,
-0.1055782362818718,
0.1956784725189209,
0.18907630443572998,
-0.14576636254787445,
-0.3188574016094208,
-0.05763128772377968,
-0.0498395673930645,
-0.13120220601558685,
-0.11421433091163635,
-0.2327934354543686,
-0.5820660591125488,
0.00010340919834561646,
-0.3677591383457184,
0.24394458532333374,
0.006336420774459839,
0.24928440153598785,
0.027138518169522285,
0.08906638622283936,
0.32738107442855835,
-0.011616473086178303,
0.44942039251327515,
-0.3170924484729767,
-0.19174408912658691,
0.10785327851772308,
-0.4520252048969269,
-0.21458037197589874,
0.07663266360759735,
-0.19981253147125244,
0.21885253489017487,
0.6070123314857483,
0.529097318649292,
-0.15939372777938843,
-0.24244950711727142,
-0.014531071297824383,
0.0675070732831955,
0.2063865065574646,
-0.24965034425258636,
-0.29068171977996826,
0.1218736320734024,
-0.14603368937969208,
0.16302692890167236,
-0.06442732363939285,
0.1508839875459671,
0.09837570786476135,
-0.1814580112695694,
0.03650105372071266,
0.05458180233836174,
0.2548561990261078,
0.24769924581050873,
0.14578303694725037,
0.0650620386004448,
0.31042131781578064,
0.3232923150062561,
-0.13386660814285278,
0.10377468168735504,
0.21789903938770294,
-0.09250961989164352,
-0.11324356496334076,
0.19099237024784088,
0.05205676704645157,
0.30458584427833557,
0.33853018283843994,
0.08565071225166321,
0.09821479767560959,
0.09432818740606308,
0.3066312074661255,
-0.23473861813545227,
0.3093492388725281,
0.4002857506275177,
0.40373170375823975,
-0.4667277932167053,
-0.5559278130531311,
-0.06902079284191132,
0.43304577469825745,
-0.18206675350666046,
0.2211436778306961,
-0.7285043001174927,
0.07736098021268845,
0.10971511900424957,
0.1712525635957718,
0.8330786824226379,
-0.4548243582248688,
0.08482103794813156,
-0.3236430883407593,
0.25373658537864685,
0.05808072164654732,
-0.7181647419929504,
0.09622292220592499,
-0.23736430704593658,
-0.2546759843826294,
0.024620188400149345,
-0.11006684601306915,
0.19803175330162048,
0.5148909687995911,
0.11548204720020294,
0.2528635263442993,
0.4243818521499634,
0.23727987706661224,
-0.09955686330795288,
0.36431002616882324,
0.4965116083621979,
-0.41832268238067627,
0.13331255316734314,
0.08025409281253815,
0.19762186706066132,
-0.23891206085681915,
0.027095185592770576,
0.08348973840475082,
-0.07956943660974503,
0.01844177022576332,
-0.3758704662322998,
-0.291544109582901,
-0.4238468408584595,
0.20387355983257294,
-0.0037286069709807634,
0.26877841353416443,
0.32886308431625366,
0.27975913882255554,
-0.06359551846981049,
0.1441979557275772,
-0.005917467642575502,
0.08635168522596359,
0.28421416878700256,
0.2989461123943329,
0.35094982385635376,
-0.5309542417526245,
-0.06712016463279724,
-0.07989862561225891,
-0.26352572441101074,
-0.185416117310524,
-0.14250043034553528,
-0.1600111722946167,
-0.1232452541589737,
0.3970690369606018,
0.1707148253917694,
0.16851572692394257,
-0.17101025581359863,
0.2841370701789856,
0.09731633961200714,
-0.11475427448749542,
0.030512476339936256,
0.10242707282304764,
-0.06325231492519379,
0.6600759029388428,
-0.22631767392158508,
-0.4700729548931122,
-0.06730777770280838,
0.3055170476436615,
0.20261918008327484,
-0.16215083003044128,
0.05144747719168663,
0.12358462810516357,
-0.2654484212398529,
-0.16573257744312286,
0.2679206430912018,
-0.033204466104507446,
-0.06326823681592941,
0.07773064821958542,
-0.018564578145742416,
-0.24772590398788452,
0.29143303632736206,
0.015790024772286415,
-0.08396151661872864,
-0.07069429755210876,
-0.17017735540866852,
-0.237214595079422,
-0.28011393547058105,
-0.14675286412239075,
-0.28205767273902893,
-0.15563014149665833,
0.22022493183612823,
0.07115133851766586,
0.0766146183013916,
0.49404972791671753,
-0.1891951709985733,
-0.01506321132183075,
-0.013008063659071922,
0.23621471226215363,
-0.051590822637081146,
-0.22143906354904175,
0.03744516149163246,
-0.02370961382985115,
-0.027768630534410477,
0.09909238666296005,
-0.11860179156064987,
-0.17668463289737701,
-0.03882312774658203,
0.17179489135742188,
-0.0014161848230287433,
-0.32169249653816223,
0.2939106523990631,
-0.13873571157455444,
-0.23626793920993805,
-0.45797204971313477,
-0.025330957025289536,
0.04404216632246971,
-0.045714814215898514,
-0.165232852101326,
0.3154084086418152,
-0.21616140007972717,
-0.2762584388256073,
0.4109305739402771,
-0.18306593596935272,
-0.07804983109235764,
0.018538635224103928,
0.28429871797561646,
0.4484974443912506,
-0.09582482278347015,
-0.022685624659061432,
0.07603509724140167,
0.37302687764167786,
0.0505041778087616,
0.14152134954929352,
-0.08448745310306549,
0.15993469953536987,
0.24279850721359253,
0.3568875193595886,
0.18919222056865692,
0.12934984266757965,
-0.28015121817588806,
0.09304135292768478,
0.057385459542274475,
-0.19893674552440643,
-0.12318955361843109,
0.49038055539131165,
0.01820491813123226,
0.14482547342777252,
0.09274259209632874,
0.36494550108909607,
0.3037872910499573,
0.016197210177779198,
-0.12734557688236237,
0.13380472362041473,
-0.2889983057975769,
0.0724489688873291,
0.08600267767906189,
0.18596617877483368,
0.2598796486854553,
0.42626672983169556,
0.06979061663150787,
0.036390289664268494,
0.45032402873039246,
0.2709548771381378,
0.33767470717430115,
0.4775073230266571,
0.33443838357925415,
-0.025535833090543747,
-0.3478294014930725,
0.24483557045459747,
0.4501993954181671,
-0.3315548896789551,
-0.13294175267219543,
-0.05537323281168938,
0.19378216564655304,
-0.23775692284107208,
-0.3416784703731537,
-0.27494755387306213,
0.44409123063087463,
-0.20803044736385345,
-0.3045462667942047,
0.17873099446296692,
-0.09950203448534012,
-0.039652079343795776,
0.19847853481769562,
-0.21733757853507996,
0.14240077137947083,
0.7284570336341858,
0.07342775166034698,
0.04886976629495621,
-0.39054012298583984,
-0.29222407937049866,
-0.1570201814174652,
0.11946329474449158,
-0.1403236985206604,
0.2661334276199341,
-0.29271093010902405,
0.044173985719680786,
0.03526090458035469,
0.3550228476524353,
0.3926253914833069,
0.3303478956222534,
-0.16170832514762878,
0.08416739851236343,
-0.0571863055229187,
0.15783709287643433,
-0.023402545601129532,
0.25171488523483276,
0.02194220945239067,
0.08560989052057266,
0.15108419954776764,
-0.06314350664615631,
-0.13253644108772278,
-0.5011913180351257,
-0.056990236043930054,
0.27826687693595886,
-0.14500002562999725,
0.20235732197761536,
-0.2890177369117737,
-0.12136633694171906,
0.0647265762090683,
0.3031775951385498,
-0.24439933896064758,
-0.05382191762328148,
0.45039495825767517,
-0.48472920060157776,
0.026895713061094284,
-0.1731548011302948,
0.06005772948265076,
-0.029980557039380074,
0.5599965453147888,
0.2798047661781311,
-0.025549696758389473,
-0.45373451709747314,
-0.16237439215183258,
-0.6362345218658447,
-0.06692060083150864,
-0.294535368680954,
0.2655960023403168,
0.015077970921993256,
0.29244962334632874,
0.08561977744102478,
0.22426378726959229,
0.3306146264076233,
0.005551811773329973,
-0.13176541030406952,
0.37577012181282043,
-0.23998773097991943,
0.5442319512367249,
-0.27486512064933777,
-0.1883135586977005,
-0.08547407388687134,
-0.42639949917793274,
0.3769560754299164,
0.11007092893123627,
-0.10970700532197952,
-0.2021092176437378,
0.01951211877167225,
0.2056238353252411,
0.14386458694934845,
0.21369154751300812,
0.3713986873626709,
0.3717588484287262,
0.04887429624795914,
0.0633169561624527,
-0.11343137174844742,
0.12783297896385193,
-0.09793900698423386,
0.25566646456718445,
-0.11054741591215134,
0.060319118201732635,
-0.2797139585018158,
0.11800190061330795,
0.059330739080905914,
-0.15549539029598236,
-0.00025984138483181596,
-0.28105002641677856,
-0.3650563359260559,
-0.050783671438694,
-0.12798111140727997,
0.2740592062473297,
0.04067165032029152,
0.35987287759780884,
0.17572930455207825,
-0.10031268745660782,
-0.23757992684841156,
-0.07976265996694565,
-0.02033374272286892,
-0.30131858587265015,
-0.26777365803718567,
-0.511120617389679,
0.10802639275789261,
-0.17187906801700592,
0.12768976390361786,
-0.2887657582759857,
-0.3083527386188507,
0.3282148540019989,
-0.01814785972237587,
-0.41007548570632935,
0.33286234736442566,
-0.37630748748779297,
-0.1390818953514099,
-0.17739829421043396,
0.02504424937069416,
-0.12611804902553558,
-0.44474557042121887,
0.14784318208694458,
-0.09666548669338226
] |
https://github.com/huggingface/datasets/issues/1992
|
`datasets.map` multi processing much slower than single processing
|
I am still experiencing this issue with datasets 1.9.0..
Has there been a further investigation?
<img width="442" alt="image" src="https://user-images.githubusercontent.com/29157715/126143387-8b5ddca2-a896-4e18-abf7-4fbf62a48b41.png">
|
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

| 19
|
`datasets.map` multi processing much slower than single processing
Hi, thank you for the great library.
I've been using datasets to pretrain language models, and it often involves datasets as large as ~70G.
My data preparation step is roughly two steps: `load_dataset` which splits corpora into a table of sentences, and `map` converts a sentence into a list of integers, using a tokenizer.
I noticed that `map` function with `num_proc=mp.cpu_count() //2` takes more than 20 hours to finish the job where as `num_proc=1` gets the job done in about 5 hours. The machine I used has 40 cores, with 126G of RAM. There were no other jobs when `map` function was running.
What could be the reason? I would be happy to provide information necessary to spot the reason.
p.s. I was experiencing the imbalance issue mentioned in [here](https://github.com/huggingface/datasets/issues/610#issuecomment-705177036) when I was using multi processing.
p.s.2 When I run `map` with `num_proc=1`, I see one tqdm bar but all the cores are working. When `num_proc=20`, only 20 cores work.

I am still experiencing this issue with datasets 1.9.0..
Has there been a further investigation?
<img width="442" alt="image" src="https://user-images.githubusercontent.com/29157715/126143387-8b5ddca2-a896-4e18-abf7-4fbf62a48b41.png">
|
[
-0.4408695101737976,
-0.25723370909690857,
-0.10014689713716507,
0.3424960672855377,
-0.11362038552761078,
0.025485999882221222,
0.3359660804271698,
0.13727423548698425,
0.023807570338249207,
-0.026604287326335907,
0.0728423148393631,
0.4267618954181671,
0.16495108604431152,
0.1844828575849533,
-0.1783975064754486,
0.07351770997047424,
0.19104671478271484,
-0.02373128943145275,
0.1997002363204956,
-0.017559364438056946,
-0.17212139070034027,
0.1267194300889969,
-0.486322283744812,
-0.025114430114626884,
-0.4187081754207611,
-0.15518933534622192,
0.11284855753183365,
0.10783521085977554,
-0.1613442599773407,
-0.24240368604660034,
-0.2254244089126587,
0.18126149475574493,
-0.09897954016923904,
0.5712869167327881,
-0.00012132777919759974,
-0.17576193809509277,
0.026249408721923828,
0.265577107667923,
0.05665832385420799,
0.06321808695793152,
-0.17497646808624268,
-0.2656291723251343,
-0.06031237542629242,
-0.10646264255046844,
0.13026537001132965,
0.19597145915031433,
-0.0412268228828907,
-0.4592745900154114,
0.027974633499979973,
0.09562088549137115,
0.06833570450544357,
0.36932173371315,
-0.3358556628227234,
0.019017418846488,
-0.3772294521331787,
0.1757359504699707,
-0.1743127554655075,
0.04393979534506798,
0.2703154683113098,
-0.18950003385543823,
-0.13274957239627838,
0.2942253351211548,
-0.059455595910549164,
0.2955106794834137,
-0.029310159385204315,
-0.08000780642032623,
0.04354196786880493,
-0.4581359028816223,
0.2109430432319641,
0.3413068652153015,
0.033622466027736664,
-0.0598059706389904,
-0.20147137343883514,
-0.2505902647972107,
-0.3135106563568115,
-0.09607534855604172,
0.18815067410469055,
0.15862421691417694,
0.14374226331710815,
0.0002750390558503568,
-0.5647347569465637,
0.12500423192977905,
0.3329136073589325,
-0.0845784991979599,
-0.16066843271255493,
0.0009780335240066051,
0.1214754581451416,
0.3006647229194641,
0.3285795748233795,
0.10265783220529556,
-0.02403397671878338,
-0.23417510092258453,
0.31866520643234253,
0.21445505321025848,
-0.7960003018379211,
-0.031389180570840836,
0.23215296864509583,
-0.11665836721658707,
-0.07023419439792633,
-0.2011481523513794,
-0.08243492990732193,
0.3807699680328369,
-0.3303590416908264,
0.09570211172103882,
0.3113446533679962,
-0.08169213682413101,
0.036880794912576675,
0.1326553076505661,
-0.02001260221004486,
-0.1649893969297409,
-0.3204193711280823,
0.08558326959609985,
0.03750506788492203,
-0.314513623714447,
-0.058868613094091415,
0.10909143835306168,
-0.2920224964618683,
-0.07769792526960373,
-0.15291965007781982,
0.05780000984668732,
-0.2044581025838852,
-0.07475541532039642,
0.1519748419523239,
0.0931532084941864,
-0.025101464241743088,
0.7979201674461365,
-0.2888888716697693,
0.06778661161661148,
-0.46472635865211487,
-0.5510895848274231,
-0.026688415557146072,
-0.14352761209011078,
-0.3716947138309479,
0.20598256587982178,
0.1467275768518448,
-0.04413248226046562,
0.13817423582077026,
0.29953691363334656,
0.0675618052482605,
-0.19425633549690247,
0.32984426617622375,
-0.5215246081352234,
0.19086657464504242,
0.08977014571428299,
0.15186482667922974,
0.5952267646789551,
-0.1308281272649765,
0.30863049626350403,
-0.1146124005317688,
0.2425246238708496,
-0.5119688510894775,
-0.22613289952278137,
0.18016166985034943,
-0.016473060473799706,
0.0661158487200737,
0.10857982188463211,
-0.45071130990982056,
0.4928020238876343,
0.31075727939605713,
-0.20052513480186462,
-0.19175627827644348,
-0.21916617453098297,
-0.6590136885643005,
-0.15495848655700684,
-0.03785024955868721,
0.17814645171165466,
-0.3581587076187134,
0.23576508462429047,
-0.32643577456474304,
0.14650245010852814,
0.43546372652053833,
0.588188886642456,
-0.19089464843273163,
0.37422773241996765,
-0.01675340346992016,
0.21686860918998718,
-0.00519277760758996,
-0.06124448403716087,
-0.4090888798236847,
0.5504708290100098,
-0.15738359093666077,
-0.007737527601420879,
-0.19969269633293152,
0.13225345313549042,
0.25207623839378357,
-0.06678539514541626,
0.28410235047340393,
0.29357674717903137,
0.009400749579071999,
0.3959372639656067,
-0.2198728621006012,
-0.12066318839788437,
0.1546420156955719,
0.07583286613225937,
-0.052066903561353683,
-0.11740898340940475,
-0.004019609652459621,
-0.2566078007221222,
0.31079185009002686,
0.0013409325620159507,
0.048563361167907715,
0.4202737808227539,
-0.37652724981307983,
-0.18144342303276062,
-0.14025717973709106,
-0.2091587334871292,
-0.08941508084535599,
0.3687587082386017,
-0.011206193827092648,
0.03691492974758148,
0.3978401720523834,
0.025036683306097984,
0.1763712763786316,
0.12760038673877716,
-0.05919590964913368,
-0.08343612402677536,
-0.09330981224775314,
-0.07049911469221115,
-0.18728519976139069,
-0.17432591319084167,
-0.022125953808426857,
0.4432823061943054,
0.21466515958309174,
-0.11095216125249863,
-0.016535647213459015,
-0.12749187648296356,
0.07512858510017395,
0.06958615779876709,
-0.18628713488578796,
-0.0800081193447113,
0.06834539771080017,
0.04427161067724228,
-0.07703705877065659,
0.25735726952552795,
0.4579806625843048,
-0.05753902718424797,
0.1573866605758667,
0.07835713773965836,
0.3972088098526001,
-0.03911586105823517,
0.02240288071334362,
-0.14334280788898468,
0.11754161864519119,
-0.24935446679592133,
-0.037315867841243744,
0.3127608597278595,
0.10988213121891022,
0.4193718135356903,
0.07046184688806534,
-0.14438828825950623,
0.007185713853687048,
0.3014128804206848,
0.1643485575914383,
0.01505640521645546,
0.32939136028289795,
0.3466159403324127,
0.25667816400527954,
0.3388873338699341,
-0.11545327305793762,
0.3463776111602783,
0.6238071322441101,
0.06780701130628586,
-0.3361591100692749,
0.02862311340868473,
-0.1701202243566513,
-0.3801422119140625,
0.039585232734680176,
-0.11314547806978226,
0.5269433259963989,
0.017089564353227615,
0.25774097442626953,
-0.025526192039251328,
-0.11627686023712158,
-0.07512630522251129,
-0.03876597806811333,
0.11482136696577072,
0.2368966042995453,
-0.07691781222820282,
0.31694719195365906,
-0.03543970733880997,
-0.06354336440563202,
-0.26479867100715637,
0.37546706199645996,
0.22004826366901398,
-0.23821808397769928,
0.09896224737167358,
-0.33655494451522827,
0.16430386900901794,
0.18566158413887024,
-0.12335580587387085,
-0.2650383412837982,
-0.24152728915214539,
-0.13819287717342377,
-0.09131959080696106,
0.21746830642223358,
-0.029551483690738678,
0.2439502477645874,
-0.13408271968364716,
-0.09430953115224838,
-0.026769813150167465,
0.010890248231589794,
-0.16640356183052063,
-0.1559700220823288,
0.0049404422752559185,
0.27044373750686646,
0.22643104195594788,
0.05720221996307373,
-0.05527130141854286,
-0.2538319230079651,
-0.07880984246730804,
-0.22050470113754272,
-0.09905284643173218,
0.15914881229400635,
0.05939004570245743,
-0.1872386932373047,
-0.07872113585472107,
-0.23356209695339203,
0.1749187707901001,
0.16987814009189606,
-0.2436436414718628,
-0.18293792009353638,
0.06688152998685837,
-0.1159515529870987,
-0.24669460952281952,
0.024495648220181465,
-0.149846613407135,
-0.09292847663164139,
-0.1155194416642189,
0.25800928473472595,
-0.17136482894420624,
0.32551485300064087,
-0.19325433671474457,
0.07854368537664413,
-0.04881301522254944,
-0.1118045449256897,
-0.017138389870524406,
-0.3181794285774231,
-0.35016611218452454,
0.026869164779782295,
-0.032022472470998764,
-0.2036222368478775,
-0.14498338103294373,
0.06731726974248886,
0.18034276366233826,
0.19533467292785645,
-0.15743020176887512,
0.1874532252550125,
-0.40016183257102966,
0.16392327845096588,
0.07312984764575958,
0.024860354140400887,
0.43352994322776794,
0.024383651092648506,
0.05988159403204918,
-0.0029190925415605307,
-0.4167120158672333,
-0.072428859770298,
0.27535170316696167,
0.000879606872331351,
-0.009609175845980644,
0.34092146158218384,
0.07012496143579483,
0.6287544369697571,
0.5038678646087646,
-0.19019818305969238,
0.1679055541753769,
-0.003184286877512932,
-0.1370072364807129,
-0.36703720688819885,
-0.22739803791046143,
0.13439279794692993,
-0.25231441855430603,
0.14938920736312866,
0.4214683175086975,
-0.00827635359019041,
-0.4179480969905853,
-0.015331106260418892,
0.2546672523021698,
-0.2011985033750534,
-0.01771707460284233,
0.13254034519195557,
-0.12000081688165665,
0.21483412384986877,
0.254666268825531,
-0.16450916230678558,
-0.3432216942310333,
-0.04560908302664757,
-0.08712974190711975,
-0.10864049941301346,
-0.10620800405740738,
-0.2582458257675171,
-0.4892943501472473,
-0.009442315436899662,
-0.396096408367157,
0.2227957397699356,
0.05283234640955925,
0.3650023937225342,
-0.030418522655963898,
0.12013189494609833,
0.3037043511867523,
0.0031178798526525497,
0.5263450145721436,
-0.416019082069397,
-0.11488331854343414,
0.14857739210128784,
-0.38208726048469543,
-0.32323166728019714,
0.05334930121898651,
-0.16240471601486206,
0.30271968245506287,
0.5608944892883301,
0.5175613760948181,
-0.03682452812790871,
-0.20092447102069855,
-0.014395453035831451,
0.12424361705780029,
0.1565520465373993,
-0.25523805618286133,
-0.32964983582496643,
0.11015398800373077,
-0.11324386298656464,
0.10829906165599823,
-0.018909933045506477,
0.12006182968616486,
0.12016552686691284,
-0.15730197727680206,
0.009452450089156628,
0.11044503003358841,
0.24382057785987854,
0.20519019663333893,
0.10924413800239563,
0.0710768848657608,
0.3489993214607239,
0.21891945600509644,
-0.1075209230184555,
0.0731959119439125,
0.3272766172885895,
-0.11457084864377975,
-0.11288319528102875,
0.2355370819568634,
0.017801377922296524,
0.30125707387924194,
0.2909521460533142,
0.1026964783668518,
0.03522035852074623,
0.14883509278297424,
0.2517145574092865,
-0.22046509385108948,
0.30659955739974976,
0.3736090362071991,
0.36549675464630127,
-0.4923383891582489,
-0.526840090751648,
-0.019487110897898674,
0.45966753363609314,
-0.14604423940181732,
0.2637668251991272,
-0.781015932559967,
0.09064699709415436,
0.049097344279289246,
0.083126500248909,
0.7045714259147644,
-0.4334186613559723,
0.031170113012194633,
-0.3011368215084076,
0.20618848502635956,
-0.0606672428548336,
-0.5662207007408142,
0.1323683112859726,
-0.18968063592910767,
-0.3490010201931,
0.03725413978099823,
-0.10875681787729263,
0.21653889119625092,
0.5372933149337769,
0.16535162925720215,
0.2765441834926605,
0.3553297817707062,
0.10849195718765259,
-0.014068959280848503,
0.36526748538017273,
0.5064211487770081,
-0.32913723587989807,
0.18285489082336426,
0.05333269387483597,
0.18206486105918884,
-0.24166426062583923,
0.03248128294944763,
0.09637685865163803,
-0.050662197172641754,
0.03373577073216438,
-0.3181338906288147,
-0.19360406696796417,
-0.41626793146133423,
0.23536677658557892,
-0.05434757098555565,
0.28070351481437683,
0.39809083938598633,
0.2447257786989212,
-0.080279141664505,
0.09834259748458862,
-0.007343800272792578,
0.07430710643529892,
0.26422441005706787,
0.2403716742992401,
0.38745248317718506,
-0.4567800760269165,
-0.008336272090673447,
-0.09591017663478851,
-0.22611956298351288,
-0.25819405913352966,
-0.1545785367488861,
-0.059479255229234695,
-0.10837855935096741,
0.4497852623462677,
0.14551755785942078,
0.163587287068367,
-0.19441932439804077,
0.2312682867050171,
0.09017010033130646,
-0.12444082647562027,
-0.0003968881501350552,
0.09002183377742767,
0.06216501072049141,
0.6624907851219177,
-0.26868095993995667,
-0.4959309995174408,
-0.024275874719023705,
0.41474685072898865,
0.2246551215648651,
-0.07707320898771286,
0.056966330856084824,
0.20686568319797516,
-0.2856074571609497,
-0.15423429012298584,
0.15757113695144653,
-0.1063692718744278,
-0.10540437698364258,
0.11028918623924255,
-0.028524039313197136,
-0.23330619931221008,
0.2675735652446747,
-0.1570519208908081,
-0.1613534837961197,
-0.0919727012515068,
-0.17743296921253204,
-0.28063151240348816,
-0.24133595824241638,
-0.19484849274158478,
-0.38124728202819824,
-0.20530205965042114,
0.21624456346035004,
0.01493667159229517,
0.12179765850305557,
0.45780447125434875,
-0.14455728232860565,
0.04786893352866173,
0.0947151631116867,
0.1962696611881256,
-0.04606788232922554,
-0.2353438287973404,
0.07930625975131989,
-0.03858895227313042,
-0.0526578314602375,
0.106353759765625,
-0.09019369632005692,
-0.15756802260875702,
-0.0040824562311172485,
0.17572742700576782,
-0.01314053125679493,
-0.2532692551612854,
0.3499312996864319,
-0.11798790842294693,
-0.2294914275407791,
-0.4110824465751648,
-0.030595578253269196,
0.06313130259513855,
-0.019553175196051598,
-0.08367488533258438,
0.26148802042007446,
-0.304857075214386,
-0.26293009519577026,
0.44845545291900635,
-0.17847490310668945,
-0.07069137692451477,
-0.0015814290381968021,
0.29663974046707153,
0.4717690348625183,
-0.09237464517354965,
-0.07663895934820175,
0.02008725516498089,
0.2456793487071991,
0.05151626467704773,
0.1467115879058838,
-0.1209755539894104,
0.208591490983963,
0.2829652726650238,
0.3256465196609497,
0.14229126274585724,
0.10228628665208817,
-0.2498801052570343,
0.011393170803785324,
0.01653609238564968,
-0.24107030034065247,
-0.19977152347564697,
0.5652070641517639,
0.04608946666121483,
0.17196112871170044,
0.049166541546583176,
0.3464100956916809,
0.19379988312721252,
-0.0170083437114954,
-0.07935220003128052,
0.09418907016515732,
-0.29035311937332153,
0.05940758436918259,
0.1839839518070221,
0.26288342475891113,
0.2688404619693756,
0.43619993329048157,
0.12504787743091583,
-0.008382968604564667,
0.48377588391304016,
0.2577884793281555,
0.31509217619895935,
0.5179550647735596,
0.24926964938640594,
-0.032647404819726944,
-0.37720969319343567,
0.1907108724117279,
0.4949616491794586,
-0.35344645380973816,
-0.046990346163511276,
-0.06487483531236649,
0.21013160049915314,
-0.2522907257080078,
-0.34711381793022156,
-0.25802162289619446,
0.34630197286605835,
-0.16364842653274536,
-0.25207987427711487,
0.2229750007390976,
-0.06839054822921753,
-0.02417888678610325,
0.17691758275032043,
-0.22954608500003815,
0.1455717384815216,
0.7704069018363953,
0.11659206449985504,
0.041026774793863297,
-0.3815881311893463,
-0.30965766310691833,
-0.16258546710014343,
0.15334048867225647,
-0.14305417239665985,
0.19574220478534698,
-0.33259281516075134,
-0.011943157762289047,
-0.024612028151750565,
0.3084978461265564,
0.3674664795398712,
0.3030284345149994,
-0.12775439023971558,
0.08283307403326035,
-0.011625416576862335,
0.1468794196844101,
-0.0056861150078475475,
0.1899852603673935,
-0.018783682957291603,
0.17536506056785583,
0.18286606669425964,
-0.09486474096775055,
-0.09230456501245499,
-0.4366375803947449,
0.052475228905677795,
0.34499865770339966,
-0.16489940881729126,
0.14213506877422333,
-0.3117675483226776,
-0.15283234417438507,
0.04074856638908386,
0.2989787757396698,
-0.25708696246147156,
-0.09710199385881424,
0.5395147204399109,
-0.49188777804374695,
0.07764408737421036,
-0.16724516451358795,
0.03598284348845482,
-0.09600462019443512,
0.5680379867553711,
0.30399101972579956,
-0.015154736116528511,
-0.3837941288948059,
-0.1259978860616684,
-0.6268154978752136,
-0.06055274233222008,
-0.3254479169845581,
0.25216129422187805,
0.06945434212684631,
0.2867884933948517,
0.049835845828056335,
0.12537333369255066,
0.3945258855819702,
-0.09546592086553574,
-0.0745212584733963,
0.33305349946022034,
-0.34593042731285095,
0.4537990093231201,
-0.23357735574245453,
-0.2067916840314865,
-0.0811024084687233,
-0.44429007172584534,
0.3849739730358124,
0.07307612150907516,
-0.12520954012870789,
-0.16558927297592163,
-0.026191409677267075,
0.17447571456432343,
0.1303192675113678,
0.19542831182479858,
0.33664050698280334,
0.34537291526794434,
0.039087772369384766,
0.01843920163810253,
-0.14589251577854156,
0.1976262629032135,
-0.038923099637031555,
0.32650959491729736,
-0.06322216987609863,
0.05479609966278076,
-0.2816336154937744,
0.17220187187194824,
0.1057349294424057,
-0.16681638360023499,
0.008409918285906315,
-0.20337224006652832,
-0.33034664392471313,
-0.0389224998652935,
-0.029435409232974052,
0.33693209290504456,
0.09369217604398727,
0.38583168387413025,
0.12029711902141571,
-0.09688335657119751,
-0.1704244166612625,
-0.12834902107715607,
-0.021535726264119148,
-0.2728491723537445,
-0.30363792181015015,
-0.43934470415115356,
0.2135731279850006,
-0.2672078013420105,
0.15297919511795044,
-0.22650836408138275,
-0.31919586658477783,
0.321167916059494,
-0.04620157554745674,
-0.36792343854904175,
0.3406701982021332,
-0.3830782473087311,
-0.07950619608163834,
-0.16346268355846405,
0.04333498701453209,
-0.08365942537784576,
-0.4640282988548279,
0.1866617202758789,
-0.10772813856601715
] |
https://github.com/huggingface/datasets/issues/1990
|
OSError: Memory mapping file failed: Cannot allocate memory
|
Do you think this is trying to bring the dataset into memory and if I can avoid it to save on memory so it only brings a batch into memory? @lhoestq thank you
|
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
| 33
|
OSError: Memory mapping file failed: Cannot allocate memory
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
Do you think this is trying to bring the dataset into memory and if I can avoid it to save on memory so it only brings a batch into memory? @lhoestq thank you
|
[
-0.2615426778793335,
-0.03726374730467796,
0.052039820700883865,
0.6045725345611572,
0.45383742451667786,
0.28340065479278564,
0.14564387500286102,
0.27246683835983276,
0.17855076491832733,
0.10566114634275436,
-0.058184556663036346,
0.22738687694072723,
-0.17711851000785828,
-0.14591611921787262,
-0.03709108754992485,
-0.1933322697877884,
0.08402097970247269,
0.013471064157783985,
-0.5429397821426392,
0.16046863794326782,
-0.35815510153770447,
0.11570677161216736,
-0.185632586479187,
-0.11715949326753616,
-0.2980373799800873,
-0.10351552069187164,
-0.0006046652561053634,
-0.09763103723526001,
0.01887798309326172,
-0.3274090886116028,
0.2548562288284302,
-0.1293889582157135,
0.08640079945325851,
0.550193727016449,
-0.00012316074571572244,
-0.013776227831840515,
0.2835688292980194,
-0.16720855236053467,
-0.2533990442752838,
-0.12841646373271942,
-0.041656285524368286,
-0.029798241332173347,
0.09849663823843002,
-0.22525101900100708,
-0.011924171820282936,
-0.05259295552968979,
0.23172998428344727,
-0.34451499581336975,
0.44297534227371216,
0.2243887037038803,
0.14049477875232697,
0.06996601819992065,
0.4524523913860321,
-0.0441126748919487,
0.17390714585781097,
0.33412232995033264,
0.0713806077837944,
0.33202388882637024,
-0.2908709943294525,
-0.43568575382232666,
-0.030412394553422928,
0.39305052161216736,
-0.0399404913187027,
0.005287534091621637,
0.5653285980224609,
-0.14458364248275757,
0.025353798642754555,
-0.3368176221847534,
0.11230865865945816,
-0.007249023299664259,
0.5341078639030457,
-0.4902596175670624,
-0.028372444212436676,
-0.01478649117052555,
-0.053383294492959976,
-0.09524015337228775,
0.29709768295288086,
0.26895296573638916,
-0.2722626030445099,
-0.14476081728935242,
-0.13041627407073975,
-0.3249987065792084,
-0.31970056891441345,
0.4428682327270508,
-0.09092123061418533,
0.19100183248519897,
-0.024715842679142952,
0.30378180742263794,
0.5653707981109619,
-0.20508962869644165,
-0.23406115174293518,
-0.07581175118684769,
0.13654354214668274,
0.3287965655326843,
-0.26772114634513855,
-0.16602861881256104,
-0.30294936895370483,
-0.2047097533941269,
0.35113656520843506,
-0.4987063407897949,
-0.38619357347488403,
-0.12600062787532806,
0.1516702026128769,
0.021239371970295906,
0.4036446809768677,
0.2817358374595642,
-0.29636484384536743,
0.32283663749694824,
0.3122963607311249,
0.17427168786525726,
-0.24953825771808624,
-0.15898962318897247,
0.07679407298564911,
-0.03737916797399521,
-0.11104985326528549,
-0.1914830356836319,
0.08377373218536377,
-0.0016539249336346984,
-0.01374629233032465,
-0.021803516894578934,
-0.21283213794231415,
-0.12320905178785324,
-0.05384961515665054,
0.5055232048034668,
-0.10408467799425125,
-0.08461913466453552,
0.37382766604423523,
0.14446023106575012,
-0.012684580869972706,
-0.008076634258031845,
-0.05637519806623459,
0.4104228913784027,
-0.3436276614665985,
0.2843067944049835,
0.0502626970410347,
-0.0011588296620175242,
0.3263411521911621,
-0.07270614057779312,
-0.0331280343234539,
-0.05668235570192337,
0.16204547882080078,
-0.3580232262611389,
0.00871006678789854,
0.18468783795833588,
0.1788567304611206,
0.24932809174060822,
0.25035130977630615,
-0.14798603951931,
-0.15268467366695404,
0.1969967931509018,
-0.16346804797649384,
-0.24330389499664307,
0.038735490292310715,
0.010929223150014877,
0.09801365435123444,
0.22774739563465118,
-0.27751424908638,
0.18281055986881256,
0.6528624296188354,
-0.0775148868560791,
-0.057265494018793106,
-0.0801965594291687,
-0.22966882586479187,
-0.16876854002475739,
0.2708789110183716,
0.5193133354187012,
-0.0646524652838707,
-0.10548367351293564,
-0.11697003245353699,
0.1677037626504898,
0.25101304054260254,
0.4413832724094391,
-0.16382254660129547,
0.2519162893295288,
-0.09722137451171875,
0.016798056662082672,
0.4141846299171448,
-0.3105097711086273,
-0.3419037163257599,
-0.005623596254736185,
-0.025229105725884438,
-0.13432230055332184,
0.023278776556253433,
0.13213060796260834,
0.07739918678998947,
0.11566591262817383,
0.11192595213651657,
0.31041839718818665,
0.05610385164618492,
0.280083566904068,
-0.3041982054710388,
-0.2975768446922302,
0.25286853313446045,
0.07474604994058609,
0.06539683789014816,
-0.20408296585083008,
-0.06084928289055824,
0.8107663989067078,
0.2972952127456665,
-0.2623122036457062,
0.155534029006958,
0.3147752285003662,
0.10613663494586945,
0.0064362939447164536,
0.08711898326873779,
-0.21991299092769623,
-0.251446932554245,
-0.07342478632926941,
-0.05670022964477539,
0.33059367537498474,
-0.1451888084411621,
-0.0414811410009861,
0.15372207760810852,
-0.11867023259401321,
-0.1722494512796402,
-0.3908627927303314,
0.06229529529809952,
0.013073492795228958,
0.1235828548669815,
0.09008520841598511,
0.08106079697608948,
0.05600894242525101,
-0.09397076815366745,
0.24789239466190338,
-0.5998016595840454,
0.1715034693479538,
-0.289608359336853,
-0.1076945960521698,
-0.021440330892801285,
-0.06249156594276428,
0.027414828538894653,
-0.04746605083346367,
-0.06855613738298416,
0.15199263393878937,
0.07713452726602554,
-0.16711537539958954,
-0.09068481624126434,
0.003419385524466634,
0.3101092576980591,
-0.32211339473724365,
0.1657051295042038,
0.24217157065868378,
0.19550393521785736,
-0.0940224677324295,
-0.197695791721344,
-0.15587788820266724,
0.10513376444578171,
0.3647216856479645,
0.07918791472911835,
0.16877508163452148,
0.026241416111588478,
0.08954793959856033,
0.17978523671627045,
-0.2070024609565735,
0.2181631624698639,
0.012354882434010506,
0.240883931517601,
0.09500694274902344,
-0.029394902288913727,
-0.3097335994243622,
0.4583247900009155,
0.26819732785224915,
0.27729955315589905,
0.2424822449684143,
-0.49372971057891846,
-0.07404212653636932,
-0.06565197557210922,
-0.0718546137213707,
0.3221578001976013,
0.0500783771276474,
-0.1195639818906784,
0.12015511095523834,
0.19633863866329193,
0.009703214280307293,
0.3097599446773529,
0.174388587474823,
0.49407824873924255,
-0.01870846375823021,
0.10572268813848495,
-0.080634705722332,
-0.09958760440349579,
-0.1468486785888672,
0.05004551634192467,
0.5077635049819946,
-0.17538003623485565,
-0.01578444428741932,
-0.1864272952079773,
-0.4006138741970062,
-0.2753985822200775,
0.16431380808353424,
-0.4642420709133148,
-0.13692674040794373,
-0.3849301040172577,
0.32475870847702026,
0.06956344842910767,
0.2584405243396759,
0.41607633233070374,
-0.0507146380841732,
0.35134270787239075,
-0.14067071676254272,
0.06877207010984421,
-0.2304120808839798,
-0.11907626688480377,
-0.06273728609085083,
0.44096195697784424,
-0.22047239542007446,
0.08683281391859055,
0.156727135181427,
-0.31955793499946594,
-0.21350911259651184,
-0.14571557939052582,
0.14698971807956696,
-0.08082082122564316,
0.12557458877563477,
0.059642113745212555,
0.5084343552589417,
-0.12339857965707779,
-0.2323770523071289,
0.17211030423641205,
0.08990706503391266,
-0.05887223407626152,
-0.037300825119018555,
0.023293759673833847,
0.15538480877876282,
0.054088983684778214,
-0.29311421513557434,
-0.179757758975029,
-0.5081846117973328,
0.40148022770881653,
-0.03389134258031845,
0.15136367082595825,
0.3279171288013458,
0.16176272928714752,
0.11561550945043564,
-0.12136641889810562,
0.08944849669933319,
-0.1621505171060562,
0.016019901260733604,
0.3207915723323822,
-0.14882619678974152,
-0.2114349752664566,
-0.029064247384667397,
0.06273781508207321,
0.3063044250011444,
0.23018430173397064,
-0.6157572865486145,
-0.020911145955324173,
-0.1136821061372757,
-0.010894960723817348,
-0.05885140597820282,
0.2863111197948456,
0.3913799226284027,
0.0789221003651619,
0.10780040919780731,
0.13758902251720428,
-0.1677570641040802,
0.09490688890218735,
-0.0409826785326004,
0.3248967230319977,
0.22007903456687927,
0.5234265923500061,
0.06372685730457306,
0.838448166847229,
0.34196406602859497,
0.18713976442813873,
0.22882619500160217,
-0.022066408768296242,
0.08356432616710663,
0.0049698250368237495,
-0.34818750619888306,
-0.008209161460399628,
-0.03689654543995857,
0.06200020760297775,
0.166143000125885,
0.008755125105381012,
-0.33744242787361145,
-0.16767236590385437,
-0.35052913427352905,
0.04599066823720932,
-0.3771667182445526,
0.26985347270965576,
0.17512446641921997,
0.3674233853816986,
-0.0838356614112854,
-0.08241386711597443,
0.02316163294017315,
-0.35157695412635803,
0.1945328563451767,
0.2135327160358429,
-0.01752937026321888,
0.0211244635283947,
-0.11370906978845596,
-0.3958893418312073,
-0.6405463814735413,
0.1182040348649025,
-0.15440179407596588,
0.06297977268695831,
-0.10384790599346161,
0.0933980792760849,
0.060053274035453796,
0.1583070605993271,
0.7553276419639587,
0.005924436263740063,
-0.30729344487190247,
-0.046126410365104675,
-0.26094162464141846,
-0.5063748955726624,
0.21378394961357117,
-0.18415656685829163,
0.34415748715400696,
0.14339010417461395,
0.5205540060997009,
-0.36160188913345337,
-0.09813430160284042,
0.3212875723838806,
0.37471428513526917,
-0.2170826494693756,
-0.20469264686107635,
-0.13433267176151276,
-0.2551265358924866,
-0.6043952703475952,
0.004103627521544695,
0.054569195955991745,
0.19344939291477203,
0.49645236134529114,
0.20445595681667328,
0.05266885086894035,
-0.05089685320854187,
0.13719314336776733,
-0.05337563157081604,
0.31059256196022034,
0.11065325886011124,
0.10085143893957138,
0.1345030516386032,
-0.1580674797296524,
0.37641942501068115,
0.2939082980155945,
0.07169032841920853,
-0.3797556459903717,
-0.09978565573692322,
0.05762110650539398,
0.25239667296409607,
-0.06275571137666702,
-0.013915007002651691,
0.0038343314081430435,
0.02689928375184536,
0.1780959963798523,
-0.09977463632822037,
0.13222050666809082,
0.18756899237632751,
0.08740811049938202,
-0.4511452317237854,
-0.4366306662559509,
0.34144166111946106,
0.1997046321630478,
0.1596938669681549,
0.3301559090614319,
-0.1424442082643509,
-0.556637167930603,
0.32534167170524597,
0.35895827412605286,
0.9608327150344849,
-0.3551475703716278,
0.39372795820236206,
0.09621859341859818,
0.21176396310329437,
0.6567659378051758,
-0.4751394987106323,
0.3529609143733978,
-0.3699403405189514,
-0.08157624304294586,
0.04317544400691986,
-0.1331000030040741,
0.13796263933181763,
-0.0172332264482975,
-0.43608707189559937,
0.28913208842277527,
0.09133213013410568,
-0.03982852026820183,
-0.1840583235025406,
0.3883708119392395,
0.11244708299636841,
-0.48119962215423584,
-0.18418671190738678,
0.03195086121559143,
-0.12698405981063843,
0.24396707117557526,
-0.04560301825404167,
-0.027440516278147697,
0.11567635834217072,
-0.11502748727798462,
-0.3924036920070648,
-0.037451621145009995,
-0.48363545536994934,
0.307691365480423,
-0.25178262591362,
0.0015953655820339918,
0.40474599599838257,
0.392807275056839,
0.010181809775531292,
0.3698486387729645,
-0.13404931128025055,
0.010526882484555244,
-0.3600800037384033,
-0.2767653167247772,
-0.18505646288394928,
0.0676637515425682,
0.2424035221338272,
-0.19374270737171173,
-0.10712806135416031,
0.0763595774769783,
-0.03994672745466232,
-0.1982407122850418,
-0.21035221219062805,
-0.03187697008252144,
-0.12981906533241272,
-0.20456506311893463,
-0.21239350736141205,
0.01328445877879858,
-0.35847532749176025,
-0.01862037181854248,
0.045863259583711624,
0.010846770368516445,
-0.3378375768661499,
0.3286835849285126,
0.14236271381378174,
-0.4008432626724243,
0.03074004501104355,
0.4164585769176483,
0.34854456782341003,
0.16058588027954102,
0.7200257182121277,
0.32326167821884155,
-0.24563825130462646,
-0.16185930371284485,
-0.08247323334217072,
-0.025336377322673798,
-0.3048343062400818,
0.2100924402475357,
0.0837557390332222,
0.10605296492576599,
-0.3066006600856781,
-0.00037729128962382674,
0.12854303419589996,
0.04523579031229019,
0.036389417946338654,
-0.30439838767051697,
-0.5601998567581177,
0.20824943482875824,
-0.010478181764483452,
0.03649923950433731,
0.23689481616020203,
0.02219078317284584,
0.029530955478549004,
0.24801631271839142,
-0.15663038194179535,
0.02005399949848652,
-0.1691429167985916,
0.2507913410663605,
0.24381858110427856,
-0.11168689280748367,
0.10324405878782272,
-0.012948621064424515,
-0.00433924188837409,
0.15931059420108795,
-0.015023553743958473,
-0.12695273756980896,
0.04548129066824913,
0.15326255559921265,
-0.026851246133446693,
-0.2777853310108185,
-0.0963575690984726,
-0.5430383682250977,
-0.015896866098046303,
-0.30399346351623535,
0.011127656325697899,
0.021279485896229744,
-0.13627047836780548,
0.1109771654009819,
0.20190253853797913,
-0.2731657922267914,
-0.06302589178085327,
0.2792612910270691,
-0.022164881229400635,
-0.050753045827150345,
0.16587083041667938,
0.20174944400787354,
0.09379895776510239,
-0.15707401931285858,
-0.5362296104431152,
0.05583411827683449,
-0.08433575928211212,
-0.02662808448076248,
0.10199379175901413,
-0.11428507417440414,
-0.39937663078308105,
0.3194211423397064,
0.09046681970357895,
0.15101343393325806,
-0.1423274129629135,
0.20684054493904114,
0.2004517912864685,
0.008969016373157501,
-0.19372761249542236,
-0.04185628145933151,
0.3301989436149597,
-0.29200848937034607,
-0.050598181784152985,
0.3277896046638489,
-0.13116705417633057,
0.0453462079167366,
-0.029958419501781464,
0.13115832209587097,
0.35880181193351746,
-0.07343048602342606,
0.3226175904273987,
0.006158021278679371,
-0.08348388969898224,
-0.016720294952392578,
0.193902388215065,
0.4057270586490631,
0.25870299339294434,
0.20438620448112488,
-0.1556379795074463,
0.03763989359140396,
-0.1058715283870697,
-0.25482264161109924,
0.037943679839372635,
-0.08367090672254562,
0.1414889097213745,
0.41897302865982056,
-0.17759177088737488,
0.15921926498413086,
-0.19391347467899323,
0.17801834642887115,
0.18459691107273102,
-0.274557888507843,
0.07877665758132935,
0.2984720468521118,
-0.21168749034404755,
0.046473804861307144,
0.1499887853860855,
-0.11578136682510376,
-0.06578817963600159,
0.14178483188152313,
0.07711458206176758,
-0.608738362789154,
0.4591955840587616,
0.14678648114204407,
-0.2206505537033081,
-0.14092643558979034,
0.27736374735832214,
0.45225393772125244,
0.07107789069414139,
-0.3053993582725525,
0.05759496986865997,
0.02698870562016964,
0.1365886926651001,
-0.33182793855667114,
0.30944591760635376,
0.4621623456478119,
0.2915849983692169,
-0.19562384486198425,
0.2535722255706787,
-0.15816397964954376,
-0.012618978507816792,
0.015425648540258408,
-0.0236887838691473,
0.1164659932255745,
0.21650558710098267,
0.11305516213178635,
-0.010932949371635914,
-0.058627624064683914,
-0.15109464526176453,
0.16302037239074707,
0.14252051711082458,
-0.22791601717472076,
-0.38114112615585327,
-0.09919245541095734,
-0.17108891904354095,
-0.01404008362442255,
-0.011570015922188759,
-0.5901709198951721,
0.28267037868499756,
0.528623104095459,
-0.13806697726249695,
0.08121014386415482,
0.02023271471261978,
0.013729548081755638,
-0.03196626529097557,
0.4846242368221283,
0.20302274823188782,
-0.033080581575632095,
-0.4814164340496063,
-0.31778112053871155,
-0.4150759279727936,
0.024108538404107094,
-0.32978108525276184,
0.004063502419739962,
-0.07540751248598099,
0.11538693308830261,
-0.04735598713159561,
0.04659353569149971,
0.04862799122929573,
-0.3642241954803467,
-0.043517861515283585,
0.17761385440826416,
-0.15607339143753052,
-0.2553374767303467,
-0.12739022076129913,
0.17875953018665314,
0.17938855290412903,
-0.19811445474624634,
0.26311174035072327,
0.008782656863331795,
-0.1398375928401947,
-0.3518664538860321,
0.13386772572994232,
0.05019700154662132,
0.17792092263698578,
0.15763571858406067,
0.06100555136799812,
0.3895048499107361,
0.004085507709532976,
-0.24227140843868256,
0.025816451758146286,
0.0002692122070584446,
-0.09981372207403183,
0.14134040474891663,
0.1294574737548828,
0.36912834644317627,
-0.4097660481929779,
-0.38277900218963623,
-0.432792991399765,
0.2897745668888092,
-0.06378446519374847,
-0.11976949125528336,
-0.03507985174655914,
-0.037601832300424576,
0.25265344977378845,
0.06882942467927933,
0.06360214203596115,
0.15866626799106598,
-0.06568865478038788,
-0.00033509545028209686,
-0.45090451836586,
-0.26157230138778687,
0.4598853588104248,
-0.45829999446868896,
-0.38560283184051514,
-0.08610069751739502,
-0.09503575414419174,
-0.14593566954135895,
-0.13941240310668945,
-0.7795307636260986,
0.09105987101793289,
0.294411301612854,
0.09553021192550659,
-0.42246925830841064,
0.03149578720331192,
-0.10581442713737488,
0.12016637623310089,
-0.12562569975852966,
0.33655011653900146,
-0.09009523689746857,
-0.43250608444213867,
0.16513052582740784,
-0.20777177810668945
] |
https://github.com/huggingface/datasets/issues/1990
|
OSError: Memory mapping file failed: Cannot allocate memory
|
It's not trying to bring the dataset into memory.
Actually, it's trying to memory map the dataset file, which is different. It allows to load large dataset files without filling up memory.
What dataset did you use to get this error ?
On what OS are you running ? What's your python and pyarrow version ?
|
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
| 56
|
OSError: Memory mapping file failed: Cannot allocate memory
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
It's not trying to bring the dataset into memory.
Actually, it's trying to memory map the dataset file, which is different. It allows to load large dataset files without filling up memory.
What dataset did you use to get this error ?
On what OS are you running ? What's your python and pyarrow version ?
|
[
-0.2615426778793335,
-0.03726374730467796,
0.052039820700883865,
0.6045725345611572,
0.45383742451667786,
0.28340065479278564,
0.14564387500286102,
0.27246683835983276,
0.17855076491832733,
0.10566114634275436,
-0.058184556663036346,
0.22738687694072723,
-0.17711851000785828,
-0.14591611921787262,
-0.03709108754992485,
-0.1933322697877884,
0.08402097970247269,
0.013471064157783985,
-0.5429397821426392,
0.16046863794326782,
-0.35815510153770447,
0.11570677161216736,
-0.185632586479187,
-0.11715949326753616,
-0.2980373799800873,
-0.10351552069187164,
-0.0006046652561053634,
-0.09763103723526001,
0.01887798309326172,
-0.3274090886116028,
0.2548562288284302,
-0.1293889582157135,
0.08640079945325851,
0.550193727016449,
-0.00012316074571572244,
-0.013776227831840515,
0.2835688292980194,
-0.16720855236053467,
-0.2533990442752838,
-0.12841646373271942,
-0.041656285524368286,
-0.029798241332173347,
0.09849663823843002,
-0.22525101900100708,
-0.011924171820282936,
-0.05259295552968979,
0.23172998428344727,
-0.34451499581336975,
0.44297534227371216,
0.2243887037038803,
0.14049477875232697,
0.06996601819992065,
0.4524523913860321,
-0.0441126748919487,
0.17390714585781097,
0.33412232995033264,
0.0713806077837944,
0.33202388882637024,
-0.2908709943294525,
-0.43568575382232666,
-0.030412394553422928,
0.39305052161216736,
-0.0399404913187027,
0.005287534091621637,
0.5653285980224609,
-0.14458364248275757,
0.025353798642754555,
-0.3368176221847534,
0.11230865865945816,
-0.007249023299664259,
0.5341078639030457,
-0.4902596175670624,
-0.028372444212436676,
-0.01478649117052555,
-0.053383294492959976,
-0.09524015337228775,
0.29709768295288086,
0.26895296573638916,
-0.2722626030445099,
-0.14476081728935242,
-0.13041627407073975,
-0.3249987065792084,
-0.31970056891441345,
0.4428682327270508,
-0.09092123061418533,
0.19100183248519897,
-0.024715842679142952,
0.30378180742263794,
0.5653707981109619,
-0.20508962869644165,
-0.23406115174293518,
-0.07581175118684769,
0.13654354214668274,
0.3287965655326843,
-0.26772114634513855,
-0.16602861881256104,
-0.30294936895370483,
-0.2047097533941269,
0.35113656520843506,
-0.4987063407897949,
-0.38619357347488403,
-0.12600062787532806,
0.1516702026128769,
0.021239371970295906,
0.4036446809768677,
0.2817358374595642,
-0.29636484384536743,
0.32283663749694824,
0.3122963607311249,
0.17427168786525726,
-0.24953825771808624,
-0.15898962318897247,
0.07679407298564911,
-0.03737916797399521,
-0.11104985326528549,
-0.1914830356836319,
0.08377373218536377,
-0.0016539249336346984,
-0.01374629233032465,
-0.021803516894578934,
-0.21283213794231415,
-0.12320905178785324,
-0.05384961515665054,
0.5055232048034668,
-0.10408467799425125,
-0.08461913466453552,
0.37382766604423523,
0.14446023106575012,
-0.012684580869972706,
-0.008076634258031845,
-0.05637519806623459,
0.4104228913784027,
-0.3436276614665985,
0.2843067944049835,
0.0502626970410347,
-0.0011588296620175242,
0.3263411521911621,
-0.07270614057779312,
-0.0331280343234539,
-0.05668235570192337,
0.16204547882080078,
-0.3580232262611389,
0.00871006678789854,
0.18468783795833588,
0.1788567304611206,
0.24932809174060822,
0.25035130977630615,
-0.14798603951931,
-0.15268467366695404,
0.1969967931509018,
-0.16346804797649384,
-0.24330389499664307,
0.038735490292310715,
0.010929223150014877,
0.09801365435123444,
0.22774739563465118,
-0.27751424908638,
0.18281055986881256,
0.6528624296188354,
-0.0775148868560791,
-0.057265494018793106,
-0.0801965594291687,
-0.22966882586479187,
-0.16876854002475739,
0.2708789110183716,
0.5193133354187012,
-0.0646524652838707,
-0.10548367351293564,
-0.11697003245353699,
0.1677037626504898,
0.25101304054260254,
0.4413832724094391,
-0.16382254660129547,
0.2519162893295288,
-0.09722137451171875,
0.016798056662082672,
0.4141846299171448,
-0.3105097711086273,
-0.3419037163257599,
-0.005623596254736185,
-0.025229105725884438,
-0.13432230055332184,
0.023278776556253433,
0.13213060796260834,
0.07739918678998947,
0.11566591262817383,
0.11192595213651657,
0.31041839718818665,
0.05610385164618492,
0.280083566904068,
-0.3041982054710388,
-0.2975768446922302,
0.25286853313446045,
0.07474604994058609,
0.06539683789014816,
-0.20408296585083008,
-0.06084928289055824,
0.8107663989067078,
0.2972952127456665,
-0.2623122036457062,
0.155534029006958,
0.3147752285003662,
0.10613663494586945,
0.0064362939447164536,
0.08711898326873779,
-0.21991299092769623,
-0.251446932554245,
-0.07342478632926941,
-0.05670022964477539,
0.33059367537498474,
-0.1451888084411621,
-0.0414811410009861,
0.15372207760810852,
-0.11867023259401321,
-0.1722494512796402,
-0.3908627927303314,
0.06229529529809952,
0.013073492795228958,
0.1235828548669815,
0.09008520841598511,
0.08106079697608948,
0.05600894242525101,
-0.09397076815366745,
0.24789239466190338,
-0.5998016595840454,
0.1715034693479538,
-0.289608359336853,
-0.1076945960521698,
-0.021440330892801285,
-0.06249156594276428,
0.027414828538894653,
-0.04746605083346367,
-0.06855613738298416,
0.15199263393878937,
0.07713452726602554,
-0.16711537539958954,
-0.09068481624126434,
0.003419385524466634,
0.3101092576980591,
-0.32211339473724365,
0.1657051295042038,
0.24217157065868378,
0.19550393521785736,
-0.0940224677324295,
-0.197695791721344,
-0.15587788820266724,
0.10513376444578171,
0.3647216856479645,
0.07918791472911835,
0.16877508163452148,
0.026241416111588478,
0.08954793959856033,
0.17978523671627045,
-0.2070024609565735,
0.2181631624698639,
0.012354882434010506,
0.240883931517601,
0.09500694274902344,
-0.029394902288913727,
-0.3097335994243622,
0.4583247900009155,
0.26819732785224915,
0.27729955315589905,
0.2424822449684143,
-0.49372971057891846,
-0.07404212653636932,
-0.06565197557210922,
-0.0718546137213707,
0.3221578001976013,
0.0500783771276474,
-0.1195639818906784,
0.12015511095523834,
0.19633863866329193,
0.009703214280307293,
0.3097599446773529,
0.174388587474823,
0.49407824873924255,
-0.01870846375823021,
0.10572268813848495,
-0.080634705722332,
-0.09958760440349579,
-0.1468486785888672,
0.05004551634192467,
0.5077635049819946,
-0.17538003623485565,
-0.01578444428741932,
-0.1864272952079773,
-0.4006138741970062,
-0.2753985822200775,
0.16431380808353424,
-0.4642420709133148,
-0.13692674040794373,
-0.3849301040172577,
0.32475870847702026,
0.06956344842910767,
0.2584405243396759,
0.41607633233070374,
-0.0507146380841732,
0.35134270787239075,
-0.14067071676254272,
0.06877207010984421,
-0.2304120808839798,
-0.11907626688480377,
-0.06273728609085083,
0.44096195697784424,
-0.22047239542007446,
0.08683281391859055,
0.156727135181427,
-0.31955793499946594,
-0.21350911259651184,
-0.14571557939052582,
0.14698971807956696,
-0.08082082122564316,
0.12557458877563477,
0.059642113745212555,
0.5084343552589417,
-0.12339857965707779,
-0.2323770523071289,
0.17211030423641205,
0.08990706503391266,
-0.05887223407626152,
-0.037300825119018555,
0.023293759673833847,
0.15538480877876282,
0.054088983684778214,
-0.29311421513557434,
-0.179757758975029,
-0.5081846117973328,
0.40148022770881653,
-0.03389134258031845,
0.15136367082595825,
0.3279171288013458,
0.16176272928714752,
0.11561550945043564,
-0.12136641889810562,
0.08944849669933319,
-0.1621505171060562,
0.016019901260733604,
0.3207915723323822,
-0.14882619678974152,
-0.2114349752664566,
-0.029064247384667397,
0.06273781508207321,
0.3063044250011444,
0.23018430173397064,
-0.6157572865486145,
-0.020911145955324173,
-0.1136821061372757,
-0.010894960723817348,
-0.05885140597820282,
0.2863111197948456,
0.3913799226284027,
0.0789221003651619,
0.10780040919780731,
0.13758902251720428,
-0.1677570641040802,
0.09490688890218735,
-0.0409826785326004,
0.3248967230319977,
0.22007903456687927,
0.5234265923500061,
0.06372685730457306,
0.838448166847229,
0.34196406602859497,
0.18713976442813873,
0.22882619500160217,
-0.022066408768296242,
0.08356432616710663,
0.0049698250368237495,
-0.34818750619888306,
-0.008209161460399628,
-0.03689654543995857,
0.06200020760297775,
0.166143000125885,
0.008755125105381012,
-0.33744242787361145,
-0.16767236590385437,
-0.35052913427352905,
0.04599066823720932,
-0.3771667182445526,
0.26985347270965576,
0.17512446641921997,
0.3674233853816986,
-0.0838356614112854,
-0.08241386711597443,
0.02316163294017315,
-0.35157695412635803,
0.1945328563451767,
0.2135327160358429,
-0.01752937026321888,
0.0211244635283947,
-0.11370906978845596,
-0.3958893418312073,
-0.6405463814735413,
0.1182040348649025,
-0.15440179407596588,
0.06297977268695831,
-0.10384790599346161,
0.0933980792760849,
0.060053274035453796,
0.1583070605993271,
0.7553276419639587,
0.005924436263740063,
-0.30729344487190247,
-0.046126410365104675,
-0.26094162464141846,
-0.5063748955726624,
0.21378394961357117,
-0.18415656685829163,
0.34415748715400696,
0.14339010417461395,
0.5205540060997009,
-0.36160188913345337,
-0.09813430160284042,
0.3212875723838806,
0.37471428513526917,
-0.2170826494693756,
-0.20469264686107635,
-0.13433267176151276,
-0.2551265358924866,
-0.6043952703475952,
0.004103627521544695,
0.054569195955991745,
0.19344939291477203,
0.49645236134529114,
0.20445595681667328,
0.05266885086894035,
-0.05089685320854187,
0.13719314336776733,
-0.05337563157081604,
0.31059256196022034,
0.11065325886011124,
0.10085143893957138,
0.1345030516386032,
-0.1580674797296524,
0.37641942501068115,
0.2939082980155945,
0.07169032841920853,
-0.3797556459903717,
-0.09978565573692322,
0.05762110650539398,
0.25239667296409607,
-0.06275571137666702,
-0.013915007002651691,
0.0038343314081430435,
0.02689928375184536,
0.1780959963798523,
-0.09977463632822037,
0.13222050666809082,
0.18756899237632751,
0.08740811049938202,
-0.4511452317237854,
-0.4366306662559509,
0.34144166111946106,
0.1997046321630478,
0.1596938669681549,
0.3301559090614319,
-0.1424442082643509,
-0.556637167930603,
0.32534167170524597,
0.35895827412605286,
0.9608327150344849,
-0.3551475703716278,
0.39372795820236206,
0.09621859341859818,
0.21176396310329437,
0.6567659378051758,
-0.4751394987106323,
0.3529609143733978,
-0.3699403405189514,
-0.08157624304294586,
0.04317544400691986,
-0.1331000030040741,
0.13796263933181763,
-0.0172332264482975,
-0.43608707189559937,
0.28913208842277527,
0.09133213013410568,
-0.03982852026820183,
-0.1840583235025406,
0.3883708119392395,
0.11244708299636841,
-0.48119962215423584,
-0.18418671190738678,
0.03195086121559143,
-0.12698405981063843,
0.24396707117557526,
-0.04560301825404167,
-0.027440516278147697,
0.11567635834217072,
-0.11502748727798462,
-0.3924036920070648,
-0.037451621145009995,
-0.48363545536994934,
0.307691365480423,
-0.25178262591362,
0.0015953655820339918,
0.40474599599838257,
0.392807275056839,
0.010181809775531292,
0.3698486387729645,
-0.13404931128025055,
0.010526882484555244,
-0.3600800037384033,
-0.2767653167247772,
-0.18505646288394928,
0.0676637515425682,
0.2424035221338272,
-0.19374270737171173,
-0.10712806135416031,
0.0763595774769783,
-0.03994672745466232,
-0.1982407122850418,
-0.21035221219062805,
-0.03187697008252144,
-0.12981906533241272,
-0.20456506311893463,
-0.21239350736141205,
0.01328445877879858,
-0.35847532749176025,
-0.01862037181854248,
0.045863259583711624,
0.010846770368516445,
-0.3378375768661499,
0.3286835849285126,
0.14236271381378174,
-0.4008432626724243,
0.03074004501104355,
0.4164585769176483,
0.34854456782341003,
0.16058588027954102,
0.7200257182121277,
0.32326167821884155,
-0.24563825130462646,
-0.16185930371284485,
-0.08247323334217072,
-0.025336377322673798,
-0.3048343062400818,
0.2100924402475357,
0.0837557390332222,
0.10605296492576599,
-0.3066006600856781,
-0.00037729128962382674,
0.12854303419589996,
0.04523579031229019,
0.036389417946338654,
-0.30439838767051697,
-0.5601998567581177,
0.20824943482875824,
-0.010478181764483452,
0.03649923950433731,
0.23689481616020203,
0.02219078317284584,
0.029530955478549004,
0.24801631271839142,
-0.15663038194179535,
0.02005399949848652,
-0.1691429167985916,
0.2507913410663605,
0.24381858110427856,
-0.11168689280748367,
0.10324405878782272,
-0.012948621064424515,
-0.00433924188837409,
0.15931059420108795,
-0.015023553743958473,
-0.12695273756980896,
0.04548129066824913,
0.15326255559921265,
-0.026851246133446693,
-0.2777853310108185,
-0.0963575690984726,
-0.5430383682250977,
-0.015896866098046303,
-0.30399346351623535,
0.011127656325697899,
0.021279485896229744,
-0.13627047836780548,
0.1109771654009819,
0.20190253853797913,
-0.2731657922267914,
-0.06302589178085327,
0.2792612910270691,
-0.022164881229400635,
-0.050753045827150345,
0.16587083041667938,
0.20174944400787354,
0.09379895776510239,
-0.15707401931285858,
-0.5362296104431152,
0.05583411827683449,
-0.08433575928211212,
-0.02662808448076248,
0.10199379175901413,
-0.11428507417440414,
-0.39937663078308105,
0.3194211423397064,
0.09046681970357895,
0.15101343393325806,
-0.1423274129629135,
0.20684054493904114,
0.2004517912864685,
0.008969016373157501,
-0.19372761249542236,
-0.04185628145933151,
0.3301989436149597,
-0.29200848937034607,
-0.050598181784152985,
0.3277896046638489,
-0.13116705417633057,
0.0453462079167366,
-0.029958419501781464,
0.13115832209587097,
0.35880181193351746,
-0.07343048602342606,
0.3226175904273987,
0.006158021278679371,
-0.08348388969898224,
-0.016720294952392578,
0.193902388215065,
0.4057270586490631,
0.25870299339294434,
0.20438620448112488,
-0.1556379795074463,
0.03763989359140396,
-0.1058715283870697,
-0.25482264161109924,
0.037943679839372635,
-0.08367090672254562,
0.1414889097213745,
0.41897302865982056,
-0.17759177088737488,
0.15921926498413086,
-0.19391347467899323,
0.17801834642887115,
0.18459691107273102,
-0.274557888507843,
0.07877665758132935,
0.2984720468521118,
-0.21168749034404755,
0.046473804861307144,
0.1499887853860855,
-0.11578136682510376,
-0.06578817963600159,
0.14178483188152313,
0.07711458206176758,
-0.608738362789154,
0.4591955840587616,
0.14678648114204407,
-0.2206505537033081,
-0.14092643558979034,
0.27736374735832214,
0.45225393772125244,
0.07107789069414139,
-0.3053993582725525,
0.05759496986865997,
0.02698870562016964,
0.1365886926651001,
-0.33182793855667114,
0.30944591760635376,
0.4621623456478119,
0.2915849983692169,
-0.19562384486198425,
0.2535722255706787,
-0.15816397964954376,
-0.012618978507816792,
0.015425648540258408,
-0.0236887838691473,
0.1164659932255745,
0.21650558710098267,
0.11305516213178635,
-0.010932949371635914,
-0.058627624064683914,
-0.15109464526176453,
0.16302037239074707,
0.14252051711082458,
-0.22791601717472076,
-0.38114112615585327,
-0.09919245541095734,
-0.17108891904354095,
-0.01404008362442255,
-0.011570015922188759,
-0.5901709198951721,
0.28267037868499756,
0.528623104095459,
-0.13806697726249695,
0.08121014386415482,
0.02023271471261978,
0.013729548081755638,
-0.03196626529097557,
0.4846242368221283,
0.20302274823188782,
-0.033080581575632095,
-0.4814164340496063,
-0.31778112053871155,
-0.4150759279727936,
0.024108538404107094,
-0.32978108525276184,
0.004063502419739962,
-0.07540751248598099,
0.11538693308830261,
-0.04735598713159561,
0.04659353569149971,
0.04862799122929573,
-0.3642241954803467,
-0.043517861515283585,
0.17761385440826416,
-0.15607339143753052,
-0.2553374767303467,
-0.12739022076129913,
0.17875953018665314,
0.17938855290412903,
-0.19811445474624634,
0.26311174035072327,
0.008782656863331795,
-0.1398375928401947,
-0.3518664538860321,
0.13386772572994232,
0.05019700154662132,
0.17792092263698578,
0.15763571858406067,
0.06100555136799812,
0.3895048499107361,
0.004085507709532976,
-0.24227140843868256,
0.025816451758146286,
0.0002692122070584446,
-0.09981372207403183,
0.14134040474891663,
0.1294574737548828,
0.36912834644317627,
-0.4097660481929779,
-0.38277900218963623,
-0.432792991399765,
0.2897745668888092,
-0.06378446519374847,
-0.11976949125528336,
-0.03507985174655914,
-0.037601832300424576,
0.25265344977378845,
0.06882942467927933,
0.06360214203596115,
0.15866626799106598,
-0.06568865478038788,
-0.00033509545028209686,
-0.45090451836586,
-0.26157230138778687,
0.4598853588104248,
-0.45829999446868896,
-0.38560283184051514,
-0.08610069751739502,
-0.09503575414419174,
-0.14593566954135895,
-0.13941240310668945,
-0.7795307636260986,
0.09105987101793289,
0.294411301612854,
0.09553021192550659,
-0.42246925830841064,
0.03149578720331192,
-0.10581442713737488,
0.12016637623310089,
-0.12562569975852966,
0.33655011653900146,
-0.09009523689746857,
-0.43250608444213867,
0.16513052582740784,
-0.20777177810668945
] |
https://github.com/huggingface/datasets/issues/1990
|
OSError: Memory mapping file failed: Cannot allocate memory
|
Dear @lhoestq
thank you so much for coming back to me. Please find info below:
1) Dataset name: I used wikipedia with config 20200501.en
2) I got these pyarrow in my environment:
pyarrow 2.0.0 <pip>
pyarrow 3.0.0 <pip>
3) python version 3.7.10
4) OS version
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Is there a way I could solve the memory issue and if I could run this model, I am using GeForce GTX 108,
thanks
|
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
| 88
|
OSError: Memory mapping file failed: Cannot allocate memory
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
Dear @lhoestq
thank you so much for coming back to me. Please find info below:
1) Dataset name: I used wikipedia with config 20200501.en
2) I got these pyarrow in my environment:
pyarrow 2.0.0 <pip>
pyarrow 3.0.0 <pip>
3) python version 3.7.10
4) OS version
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Is there a way I could solve the memory issue and if I could run this model, I am using GeForce GTX 108,
thanks
|
[
-0.2615426778793335,
-0.03726374730467796,
0.052039820700883865,
0.6045725345611572,
0.45383742451667786,
0.28340065479278564,
0.14564387500286102,
0.27246683835983276,
0.17855076491832733,
0.10566114634275436,
-0.058184556663036346,
0.22738687694072723,
-0.17711851000785828,
-0.14591611921787262,
-0.03709108754992485,
-0.1933322697877884,
0.08402097970247269,
0.013471064157783985,
-0.5429397821426392,
0.16046863794326782,
-0.35815510153770447,
0.11570677161216736,
-0.185632586479187,
-0.11715949326753616,
-0.2980373799800873,
-0.10351552069187164,
-0.0006046652561053634,
-0.09763103723526001,
0.01887798309326172,
-0.3274090886116028,
0.2548562288284302,
-0.1293889582157135,
0.08640079945325851,
0.550193727016449,
-0.00012316074571572244,
-0.013776227831840515,
0.2835688292980194,
-0.16720855236053467,
-0.2533990442752838,
-0.12841646373271942,
-0.041656285524368286,
-0.029798241332173347,
0.09849663823843002,
-0.22525101900100708,
-0.011924171820282936,
-0.05259295552968979,
0.23172998428344727,
-0.34451499581336975,
0.44297534227371216,
0.2243887037038803,
0.14049477875232697,
0.06996601819992065,
0.4524523913860321,
-0.0441126748919487,
0.17390714585781097,
0.33412232995033264,
0.0713806077837944,
0.33202388882637024,
-0.2908709943294525,
-0.43568575382232666,
-0.030412394553422928,
0.39305052161216736,
-0.0399404913187027,
0.005287534091621637,
0.5653285980224609,
-0.14458364248275757,
0.025353798642754555,
-0.3368176221847534,
0.11230865865945816,
-0.007249023299664259,
0.5341078639030457,
-0.4902596175670624,
-0.028372444212436676,
-0.01478649117052555,
-0.053383294492959976,
-0.09524015337228775,
0.29709768295288086,
0.26895296573638916,
-0.2722626030445099,
-0.14476081728935242,
-0.13041627407073975,
-0.3249987065792084,
-0.31970056891441345,
0.4428682327270508,
-0.09092123061418533,
0.19100183248519897,
-0.024715842679142952,
0.30378180742263794,
0.5653707981109619,
-0.20508962869644165,
-0.23406115174293518,
-0.07581175118684769,
0.13654354214668274,
0.3287965655326843,
-0.26772114634513855,
-0.16602861881256104,
-0.30294936895370483,
-0.2047097533941269,
0.35113656520843506,
-0.4987063407897949,
-0.38619357347488403,
-0.12600062787532806,
0.1516702026128769,
0.021239371970295906,
0.4036446809768677,
0.2817358374595642,
-0.29636484384536743,
0.32283663749694824,
0.3122963607311249,
0.17427168786525726,
-0.24953825771808624,
-0.15898962318897247,
0.07679407298564911,
-0.03737916797399521,
-0.11104985326528549,
-0.1914830356836319,
0.08377373218536377,
-0.0016539249336346984,
-0.01374629233032465,
-0.021803516894578934,
-0.21283213794231415,
-0.12320905178785324,
-0.05384961515665054,
0.5055232048034668,
-0.10408467799425125,
-0.08461913466453552,
0.37382766604423523,
0.14446023106575012,
-0.012684580869972706,
-0.008076634258031845,
-0.05637519806623459,
0.4104228913784027,
-0.3436276614665985,
0.2843067944049835,
0.0502626970410347,
-0.0011588296620175242,
0.3263411521911621,
-0.07270614057779312,
-0.0331280343234539,
-0.05668235570192337,
0.16204547882080078,
-0.3580232262611389,
0.00871006678789854,
0.18468783795833588,
0.1788567304611206,
0.24932809174060822,
0.25035130977630615,
-0.14798603951931,
-0.15268467366695404,
0.1969967931509018,
-0.16346804797649384,
-0.24330389499664307,
0.038735490292310715,
0.010929223150014877,
0.09801365435123444,
0.22774739563465118,
-0.27751424908638,
0.18281055986881256,
0.6528624296188354,
-0.0775148868560791,
-0.057265494018793106,
-0.0801965594291687,
-0.22966882586479187,
-0.16876854002475739,
0.2708789110183716,
0.5193133354187012,
-0.0646524652838707,
-0.10548367351293564,
-0.11697003245353699,
0.1677037626504898,
0.25101304054260254,
0.4413832724094391,
-0.16382254660129547,
0.2519162893295288,
-0.09722137451171875,
0.016798056662082672,
0.4141846299171448,
-0.3105097711086273,
-0.3419037163257599,
-0.005623596254736185,
-0.025229105725884438,
-0.13432230055332184,
0.023278776556253433,
0.13213060796260834,
0.07739918678998947,
0.11566591262817383,
0.11192595213651657,
0.31041839718818665,
0.05610385164618492,
0.280083566904068,
-0.3041982054710388,
-0.2975768446922302,
0.25286853313446045,
0.07474604994058609,
0.06539683789014816,
-0.20408296585083008,
-0.06084928289055824,
0.8107663989067078,
0.2972952127456665,
-0.2623122036457062,
0.155534029006958,
0.3147752285003662,
0.10613663494586945,
0.0064362939447164536,
0.08711898326873779,
-0.21991299092769623,
-0.251446932554245,
-0.07342478632926941,
-0.05670022964477539,
0.33059367537498474,
-0.1451888084411621,
-0.0414811410009861,
0.15372207760810852,
-0.11867023259401321,
-0.1722494512796402,
-0.3908627927303314,
0.06229529529809952,
0.013073492795228958,
0.1235828548669815,
0.09008520841598511,
0.08106079697608948,
0.05600894242525101,
-0.09397076815366745,
0.24789239466190338,
-0.5998016595840454,
0.1715034693479538,
-0.289608359336853,
-0.1076945960521698,
-0.021440330892801285,
-0.06249156594276428,
0.027414828538894653,
-0.04746605083346367,
-0.06855613738298416,
0.15199263393878937,
0.07713452726602554,
-0.16711537539958954,
-0.09068481624126434,
0.003419385524466634,
0.3101092576980591,
-0.32211339473724365,
0.1657051295042038,
0.24217157065868378,
0.19550393521785736,
-0.0940224677324295,
-0.197695791721344,
-0.15587788820266724,
0.10513376444578171,
0.3647216856479645,
0.07918791472911835,
0.16877508163452148,
0.026241416111588478,
0.08954793959856033,
0.17978523671627045,
-0.2070024609565735,
0.2181631624698639,
0.012354882434010506,
0.240883931517601,
0.09500694274902344,
-0.029394902288913727,
-0.3097335994243622,
0.4583247900009155,
0.26819732785224915,
0.27729955315589905,
0.2424822449684143,
-0.49372971057891846,
-0.07404212653636932,
-0.06565197557210922,
-0.0718546137213707,
0.3221578001976013,
0.0500783771276474,
-0.1195639818906784,
0.12015511095523834,
0.19633863866329193,
0.009703214280307293,
0.3097599446773529,
0.174388587474823,
0.49407824873924255,
-0.01870846375823021,
0.10572268813848495,
-0.080634705722332,
-0.09958760440349579,
-0.1468486785888672,
0.05004551634192467,
0.5077635049819946,
-0.17538003623485565,
-0.01578444428741932,
-0.1864272952079773,
-0.4006138741970062,
-0.2753985822200775,
0.16431380808353424,
-0.4642420709133148,
-0.13692674040794373,
-0.3849301040172577,
0.32475870847702026,
0.06956344842910767,
0.2584405243396759,
0.41607633233070374,
-0.0507146380841732,
0.35134270787239075,
-0.14067071676254272,
0.06877207010984421,
-0.2304120808839798,
-0.11907626688480377,
-0.06273728609085083,
0.44096195697784424,
-0.22047239542007446,
0.08683281391859055,
0.156727135181427,
-0.31955793499946594,
-0.21350911259651184,
-0.14571557939052582,
0.14698971807956696,
-0.08082082122564316,
0.12557458877563477,
0.059642113745212555,
0.5084343552589417,
-0.12339857965707779,
-0.2323770523071289,
0.17211030423641205,
0.08990706503391266,
-0.05887223407626152,
-0.037300825119018555,
0.023293759673833847,
0.15538480877876282,
0.054088983684778214,
-0.29311421513557434,
-0.179757758975029,
-0.5081846117973328,
0.40148022770881653,
-0.03389134258031845,
0.15136367082595825,
0.3279171288013458,
0.16176272928714752,
0.11561550945043564,
-0.12136641889810562,
0.08944849669933319,
-0.1621505171060562,
0.016019901260733604,
0.3207915723323822,
-0.14882619678974152,
-0.2114349752664566,
-0.029064247384667397,
0.06273781508207321,
0.3063044250011444,
0.23018430173397064,
-0.6157572865486145,
-0.020911145955324173,
-0.1136821061372757,
-0.010894960723817348,
-0.05885140597820282,
0.2863111197948456,
0.3913799226284027,
0.0789221003651619,
0.10780040919780731,
0.13758902251720428,
-0.1677570641040802,
0.09490688890218735,
-0.0409826785326004,
0.3248967230319977,
0.22007903456687927,
0.5234265923500061,
0.06372685730457306,
0.838448166847229,
0.34196406602859497,
0.18713976442813873,
0.22882619500160217,
-0.022066408768296242,
0.08356432616710663,
0.0049698250368237495,
-0.34818750619888306,
-0.008209161460399628,
-0.03689654543995857,
0.06200020760297775,
0.166143000125885,
0.008755125105381012,
-0.33744242787361145,
-0.16767236590385437,
-0.35052913427352905,
0.04599066823720932,
-0.3771667182445526,
0.26985347270965576,
0.17512446641921997,
0.3674233853816986,
-0.0838356614112854,
-0.08241386711597443,
0.02316163294017315,
-0.35157695412635803,
0.1945328563451767,
0.2135327160358429,
-0.01752937026321888,
0.0211244635283947,
-0.11370906978845596,
-0.3958893418312073,
-0.6405463814735413,
0.1182040348649025,
-0.15440179407596588,
0.06297977268695831,
-0.10384790599346161,
0.0933980792760849,
0.060053274035453796,
0.1583070605993271,
0.7553276419639587,
0.005924436263740063,
-0.30729344487190247,
-0.046126410365104675,
-0.26094162464141846,
-0.5063748955726624,
0.21378394961357117,
-0.18415656685829163,
0.34415748715400696,
0.14339010417461395,
0.5205540060997009,
-0.36160188913345337,
-0.09813430160284042,
0.3212875723838806,
0.37471428513526917,
-0.2170826494693756,
-0.20469264686107635,
-0.13433267176151276,
-0.2551265358924866,
-0.6043952703475952,
0.004103627521544695,
0.054569195955991745,
0.19344939291477203,
0.49645236134529114,
0.20445595681667328,
0.05266885086894035,
-0.05089685320854187,
0.13719314336776733,
-0.05337563157081604,
0.31059256196022034,
0.11065325886011124,
0.10085143893957138,
0.1345030516386032,
-0.1580674797296524,
0.37641942501068115,
0.2939082980155945,
0.07169032841920853,
-0.3797556459903717,
-0.09978565573692322,
0.05762110650539398,
0.25239667296409607,
-0.06275571137666702,
-0.013915007002651691,
0.0038343314081430435,
0.02689928375184536,
0.1780959963798523,
-0.09977463632822037,
0.13222050666809082,
0.18756899237632751,
0.08740811049938202,
-0.4511452317237854,
-0.4366306662559509,
0.34144166111946106,
0.1997046321630478,
0.1596938669681549,
0.3301559090614319,
-0.1424442082643509,
-0.556637167930603,
0.32534167170524597,
0.35895827412605286,
0.9608327150344849,
-0.3551475703716278,
0.39372795820236206,
0.09621859341859818,
0.21176396310329437,
0.6567659378051758,
-0.4751394987106323,
0.3529609143733978,
-0.3699403405189514,
-0.08157624304294586,
0.04317544400691986,
-0.1331000030040741,
0.13796263933181763,
-0.0172332264482975,
-0.43608707189559937,
0.28913208842277527,
0.09133213013410568,
-0.03982852026820183,
-0.1840583235025406,
0.3883708119392395,
0.11244708299636841,
-0.48119962215423584,
-0.18418671190738678,
0.03195086121559143,
-0.12698405981063843,
0.24396707117557526,
-0.04560301825404167,
-0.027440516278147697,
0.11567635834217072,
-0.11502748727798462,
-0.3924036920070648,
-0.037451621145009995,
-0.48363545536994934,
0.307691365480423,
-0.25178262591362,
0.0015953655820339918,
0.40474599599838257,
0.392807275056839,
0.010181809775531292,
0.3698486387729645,
-0.13404931128025055,
0.010526882484555244,
-0.3600800037384033,
-0.2767653167247772,
-0.18505646288394928,
0.0676637515425682,
0.2424035221338272,
-0.19374270737171173,
-0.10712806135416031,
0.0763595774769783,
-0.03994672745466232,
-0.1982407122850418,
-0.21035221219062805,
-0.03187697008252144,
-0.12981906533241272,
-0.20456506311893463,
-0.21239350736141205,
0.01328445877879858,
-0.35847532749176025,
-0.01862037181854248,
0.045863259583711624,
0.010846770368516445,
-0.3378375768661499,
0.3286835849285126,
0.14236271381378174,
-0.4008432626724243,
0.03074004501104355,
0.4164585769176483,
0.34854456782341003,
0.16058588027954102,
0.7200257182121277,
0.32326167821884155,
-0.24563825130462646,
-0.16185930371284485,
-0.08247323334217072,
-0.025336377322673798,
-0.3048343062400818,
0.2100924402475357,
0.0837557390332222,
0.10605296492576599,
-0.3066006600856781,
-0.00037729128962382674,
0.12854303419589996,
0.04523579031229019,
0.036389417946338654,
-0.30439838767051697,
-0.5601998567581177,
0.20824943482875824,
-0.010478181764483452,
0.03649923950433731,
0.23689481616020203,
0.02219078317284584,
0.029530955478549004,
0.24801631271839142,
-0.15663038194179535,
0.02005399949848652,
-0.1691429167985916,
0.2507913410663605,
0.24381858110427856,
-0.11168689280748367,
0.10324405878782272,
-0.012948621064424515,
-0.00433924188837409,
0.15931059420108795,
-0.015023553743958473,
-0.12695273756980896,
0.04548129066824913,
0.15326255559921265,
-0.026851246133446693,
-0.2777853310108185,
-0.0963575690984726,
-0.5430383682250977,
-0.015896866098046303,
-0.30399346351623535,
0.011127656325697899,
0.021279485896229744,
-0.13627047836780548,
0.1109771654009819,
0.20190253853797913,
-0.2731657922267914,
-0.06302589178085327,
0.2792612910270691,
-0.022164881229400635,
-0.050753045827150345,
0.16587083041667938,
0.20174944400787354,
0.09379895776510239,
-0.15707401931285858,
-0.5362296104431152,
0.05583411827683449,
-0.08433575928211212,
-0.02662808448076248,
0.10199379175901413,
-0.11428507417440414,
-0.39937663078308105,
0.3194211423397064,
0.09046681970357895,
0.15101343393325806,
-0.1423274129629135,
0.20684054493904114,
0.2004517912864685,
0.008969016373157501,
-0.19372761249542236,
-0.04185628145933151,
0.3301989436149597,
-0.29200848937034607,
-0.050598181784152985,
0.3277896046638489,
-0.13116705417633057,
0.0453462079167366,
-0.029958419501781464,
0.13115832209587097,
0.35880181193351746,
-0.07343048602342606,
0.3226175904273987,
0.006158021278679371,
-0.08348388969898224,
-0.016720294952392578,
0.193902388215065,
0.4057270586490631,
0.25870299339294434,
0.20438620448112488,
-0.1556379795074463,
0.03763989359140396,
-0.1058715283870697,
-0.25482264161109924,
0.037943679839372635,
-0.08367090672254562,
0.1414889097213745,
0.41897302865982056,
-0.17759177088737488,
0.15921926498413086,
-0.19391347467899323,
0.17801834642887115,
0.18459691107273102,
-0.274557888507843,
0.07877665758132935,
0.2984720468521118,
-0.21168749034404755,
0.046473804861307144,
0.1499887853860855,
-0.11578136682510376,
-0.06578817963600159,
0.14178483188152313,
0.07711458206176758,
-0.608738362789154,
0.4591955840587616,
0.14678648114204407,
-0.2206505537033081,
-0.14092643558979034,
0.27736374735832214,
0.45225393772125244,
0.07107789069414139,
-0.3053993582725525,
0.05759496986865997,
0.02698870562016964,
0.1365886926651001,
-0.33182793855667114,
0.30944591760635376,
0.4621623456478119,
0.2915849983692169,
-0.19562384486198425,
0.2535722255706787,
-0.15816397964954376,
-0.012618978507816792,
0.015425648540258408,
-0.0236887838691473,
0.1164659932255745,
0.21650558710098267,
0.11305516213178635,
-0.010932949371635914,
-0.058627624064683914,
-0.15109464526176453,
0.16302037239074707,
0.14252051711082458,
-0.22791601717472076,
-0.38114112615585327,
-0.09919245541095734,
-0.17108891904354095,
-0.01404008362442255,
-0.011570015922188759,
-0.5901709198951721,
0.28267037868499756,
0.528623104095459,
-0.13806697726249695,
0.08121014386415482,
0.02023271471261978,
0.013729548081755638,
-0.03196626529097557,
0.4846242368221283,
0.20302274823188782,
-0.033080581575632095,
-0.4814164340496063,
-0.31778112053871155,
-0.4150759279727936,
0.024108538404107094,
-0.32978108525276184,
0.004063502419739962,
-0.07540751248598099,
0.11538693308830261,
-0.04735598713159561,
0.04659353569149971,
0.04862799122929573,
-0.3642241954803467,
-0.043517861515283585,
0.17761385440826416,
-0.15607339143753052,
-0.2553374767303467,
-0.12739022076129913,
0.17875953018665314,
0.17938855290412903,
-0.19811445474624634,
0.26311174035072327,
0.008782656863331795,
-0.1398375928401947,
-0.3518664538860321,
0.13386772572994232,
0.05019700154662132,
0.17792092263698578,
0.15763571858406067,
0.06100555136799812,
0.3895048499107361,
0.004085507709532976,
-0.24227140843868256,
0.025816451758146286,
0.0002692122070584446,
-0.09981372207403183,
0.14134040474891663,
0.1294574737548828,
0.36912834644317627,
-0.4097660481929779,
-0.38277900218963623,
-0.432792991399765,
0.2897745668888092,
-0.06378446519374847,
-0.11976949125528336,
-0.03507985174655914,
-0.037601832300424576,
0.25265344977378845,
0.06882942467927933,
0.06360214203596115,
0.15866626799106598,
-0.06568865478038788,
-0.00033509545028209686,
-0.45090451836586,
-0.26157230138778687,
0.4598853588104248,
-0.45829999446868896,
-0.38560283184051514,
-0.08610069751739502,
-0.09503575414419174,
-0.14593566954135895,
-0.13941240310668945,
-0.7795307636260986,
0.09105987101793289,
0.294411301612854,
0.09553021192550659,
-0.42246925830841064,
0.03149578720331192,
-0.10581442713737488,
0.12016637623310089,
-0.12562569975852966,
0.33655011653900146,
-0.09009523689746857,
-0.43250608444213867,
0.16513052582740784,
-0.20777177810668945
] |
https://github.com/huggingface/datasets/issues/1990
|
OSError: Memory mapping file failed: Cannot allocate memory
|
I noticed that the error happens when loading the validation dataset.
What value of `data_args.validation_split_percentage` did you use ?
|
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
| 19
|
OSError: Memory mapping file failed: Cannot allocate memory
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
I noticed that the error happens when loading the validation dataset.
What value of `data_args.validation_split_percentage` did you use ?
|
[
-0.2615426778793335,
-0.03726374730467796,
0.052039820700883865,
0.6045725345611572,
0.45383742451667786,
0.28340065479278564,
0.14564387500286102,
0.27246683835983276,
0.17855076491832733,
0.10566114634275436,
-0.058184556663036346,
0.22738687694072723,
-0.17711851000785828,
-0.14591611921787262,
-0.03709108754992485,
-0.1933322697877884,
0.08402097970247269,
0.013471064157783985,
-0.5429397821426392,
0.16046863794326782,
-0.35815510153770447,
0.11570677161216736,
-0.185632586479187,
-0.11715949326753616,
-0.2980373799800873,
-0.10351552069187164,
-0.0006046652561053634,
-0.09763103723526001,
0.01887798309326172,
-0.3274090886116028,
0.2548562288284302,
-0.1293889582157135,
0.08640079945325851,
0.550193727016449,
-0.00012316074571572244,
-0.013776227831840515,
0.2835688292980194,
-0.16720855236053467,
-0.2533990442752838,
-0.12841646373271942,
-0.041656285524368286,
-0.029798241332173347,
0.09849663823843002,
-0.22525101900100708,
-0.011924171820282936,
-0.05259295552968979,
0.23172998428344727,
-0.34451499581336975,
0.44297534227371216,
0.2243887037038803,
0.14049477875232697,
0.06996601819992065,
0.4524523913860321,
-0.0441126748919487,
0.17390714585781097,
0.33412232995033264,
0.0713806077837944,
0.33202388882637024,
-0.2908709943294525,
-0.43568575382232666,
-0.030412394553422928,
0.39305052161216736,
-0.0399404913187027,
0.005287534091621637,
0.5653285980224609,
-0.14458364248275757,
0.025353798642754555,
-0.3368176221847534,
0.11230865865945816,
-0.007249023299664259,
0.5341078639030457,
-0.4902596175670624,
-0.028372444212436676,
-0.01478649117052555,
-0.053383294492959976,
-0.09524015337228775,
0.29709768295288086,
0.26895296573638916,
-0.2722626030445099,
-0.14476081728935242,
-0.13041627407073975,
-0.3249987065792084,
-0.31970056891441345,
0.4428682327270508,
-0.09092123061418533,
0.19100183248519897,
-0.024715842679142952,
0.30378180742263794,
0.5653707981109619,
-0.20508962869644165,
-0.23406115174293518,
-0.07581175118684769,
0.13654354214668274,
0.3287965655326843,
-0.26772114634513855,
-0.16602861881256104,
-0.30294936895370483,
-0.2047097533941269,
0.35113656520843506,
-0.4987063407897949,
-0.38619357347488403,
-0.12600062787532806,
0.1516702026128769,
0.021239371970295906,
0.4036446809768677,
0.2817358374595642,
-0.29636484384536743,
0.32283663749694824,
0.3122963607311249,
0.17427168786525726,
-0.24953825771808624,
-0.15898962318897247,
0.07679407298564911,
-0.03737916797399521,
-0.11104985326528549,
-0.1914830356836319,
0.08377373218536377,
-0.0016539249336346984,
-0.01374629233032465,
-0.021803516894578934,
-0.21283213794231415,
-0.12320905178785324,
-0.05384961515665054,
0.5055232048034668,
-0.10408467799425125,
-0.08461913466453552,
0.37382766604423523,
0.14446023106575012,
-0.012684580869972706,
-0.008076634258031845,
-0.05637519806623459,
0.4104228913784027,
-0.3436276614665985,
0.2843067944049835,
0.0502626970410347,
-0.0011588296620175242,
0.3263411521911621,
-0.07270614057779312,
-0.0331280343234539,
-0.05668235570192337,
0.16204547882080078,
-0.3580232262611389,
0.00871006678789854,
0.18468783795833588,
0.1788567304611206,
0.24932809174060822,
0.25035130977630615,
-0.14798603951931,
-0.15268467366695404,
0.1969967931509018,
-0.16346804797649384,
-0.24330389499664307,
0.038735490292310715,
0.010929223150014877,
0.09801365435123444,
0.22774739563465118,
-0.27751424908638,
0.18281055986881256,
0.6528624296188354,
-0.0775148868560791,
-0.057265494018793106,
-0.0801965594291687,
-0.22966882586479187,
-0.16876854002475739,
0.2708789110183716,
0.5193133354187012,
-0.0646524652838707,
-0.10548367351293564,
-0.11697003245353699,
0.1677037626504898,
0.25101304054260254,
0.4413832724094391,
-0.16382254660129547,
0.2519162893295288,
-0.09722137451171875,
0.016798056662082672,
0.4141846299171448,
-0.3105097711086273,
-0.3419037163257599,
-0.005623596254736185,
-0.025229105725884438,
-0.13432230055332184,
0.023278776556253433,
0.13213060796260834,
0.07739918678998947,
0.11566591262817383,
0.11192595213651657,
0.31041839718818665,
0.05610385164618492,
0.280083566904068,
-0.3041982054710388,
-0.2975768446922302,
0.25286853313446045,
0.07474604994058609,
0.06539683789014816,
-0.20408296585083008,
-0.06084928289055824,
0.8107663989067078,
0.2972952127456665,
-0.2623122036457062,
0.155534029006958,
0.3147752285003662,
0.10613663494586945,
0.0064362939447164536,
0.08711898326873779,
-0.21991299092769623,
-0.251446932554245,
-0.07342478632926941,
-0.05670022964477539,
0.33059367537498474,
-0.1451888084411621,
-0.0414811410009861,
0.15372207760810852,
-0.11867023259401321,
-0.1722494512796402,
-0.3908627927303314,
0.06229529529809952,
0.013073492795228958,
0.1235828548669815,
0.09008520841598511,
0.08106079697608948,
0.05600894242525101,
-0.09397076815366745,
0.24789239466190338,
-0.5998016595840454,
0.1715034693479538,
-0.289608359336853,
-0.1076945960521698,
-0.021440330892801285,
-0.06249156594276428,
0.027414828538894653,
-0.04746605083346367,
-0.06855613738298416,
0.15199263393878937,
0.07713452726602554,
-0.16711537539958954,
-0.09068481624126434,
0.003419385524466634,
0.3101092576980591,
-0.32211339473724365,
0.1657051295042038,
0.24217157065868378,
0.19550393521785736,
-0.0940224677324295,
-0.197695791721344,
-0.15587788820266724,
0.10513376444578171,
0.3647216856479645,
0.07918791472911835,
0.16877508163452148,
0.026241416111588478,
0.08954793959856033,
0.17978523671627045,
-0.2070024609565735,
0.2181631624698639,
0.012354882434010506,
0.240883931517601,
0.09500694274902344,
-0.029394902288913727,
-0.3097335994243622,
0.4583247900009155,
0.26819732785224915,
0.27729955315589905,
0.2424822449684143,
-0.49372971057891846,
-0.07404212653636932,
-0.06565197557210922,
-0.0718546137213707,
0.3221578001976013,
0.0500783771276474,
-0.1195639818906784,
0.12015511095523834,
0.19633863866329193,
0.009703214280307293,
0.3097599446773529,
0.174388587474823,
0.49407824873924255,
-0.01870846375823021,
0.10572268813848495,
-0.080634705722332,
-0.09958760440349579,
-0.1468486785888672,
0.05004551634192467,
0.5077635049819946,
-0.17538003623485565,
-0.01578444428741932,
-0.1864272952079773,
-0.4006138741970062,
-0.2753985822200775,
0.16431380808353424,
-0.4642420709133148,
-0.13692674040794373,
-0.3849301040172577,
0.32475870847702026,
0.06956344842910767,
0.2584405243396759,
0.41607633233070374,
-0.0507146380841732,
0.35134270787239075,
-0.14067071676254272,
0.06877207010984421,
-0.2304120808839798,
-0.11907626688480377,
-0.06273728609085083,
0.44096195697784424,
-0.22047239542007446,
0.08683281391859055,
0.156727135181427,
-0.31955793499946594,
-0.21350911259651184,
-0.14571557939052582,
0.14698971807956696,
-0.08082082122564316,
0.12557458877563477,
0.059642113745212555,
0.5084343552589417,
-0.12339857965707779,
-0.2323770523071289,
0.17211030423641205,
0.08990706503391266,
-0.05887223407626152,
-0.037300825119018555,
0.023293759673833847,
0.15538480877876282,
0.054088983684778214,
-0.29311421513557434,
-0.179757758975029,
-0.5081846117973328,
0.40148022770881653,
-0.03389134258031845,
0.15136367082595825,
0.3279171288013458,
0.16176272928714752,
0.11561550945043564,
-0.12136641889810562,
0.08944849669933319,
-0.1621505171060562,
0.016019901260733604,
0.3207915723323822,
-0.14882619678974152,
-0.2114349752664566,
-0.029064247384667397,
0.06273781508207321,
0.3063044250011444,
0.23018430173397064,
-0.6157572865486145,
-0.020911145955324173,
-0.1136821061372757,
-0.010894960723817348,
-0.05885140597820282,
0.2863111197948456,
0.3913799226284027,
0.0789221003651619,
0.10780040919780731,
0.13758902251720428,
-0.1677570641040802,
0.09490688890218735,
-0.0409826785326004,
0.3248967230319977,
0.22007903456687927,
0.5234265923500061,
0.06372685730457306,
0.838448166847229,
0.34196406602859497,
0.18713976442813873,
0.22882619500160217,
-0.022066408768296242,
0.08356432616710663,
0.0049698250368237495,
-0.34818750619888306,
-0.008209161460399628,
-0.03689654543995857,
0.06200020760297775,
0.166143000125885,
0.008755125105381012,
-0.33744242787361145,
-0.16767236590385437,
-0.35052913427352905,
0.04599066823720932,
-0.3771667182445526,
0.26985347270965576,
0.17512446641921997,
0.3674233853816986,
-0.0838356614112854,
-0.08241386711597443,
0.02316163294017315,
-0.35157695412635803,
0.1945328563451767,
0.2135327160358429,
-0.01752937026321888,
0.0211244635283947,
-0.11370906978845596,
-0.3958893418312073,
-0.6405463814735413,
0.1182040348649025,
-0.15440179407596588,
0.06297977268695831,
-0.10384790599346161,
0.0933980792760849,
0.060053274035453796,
0.1583070605993271,
0.7553276419639587,
0.005924436263740063,
-0.30729344487190247,
-0.046126410365104675,
-0.26094162464141846,
-0.5063748955726624,
0.21378394961357117,
-0.18415656685829163,
0.34415748715400696,
0.14339010417461395,
0.5205540060997009,
-0.36160188913345337,
-0.09813430160284042,
0.3212875723838806,
0.37471428513526917,
-0.2170826494693756,
-0.20469264686107635,
-0.13433267176151276,
-0.2551265358924866,
-0.6043952703475952,
0.004103627521544695,
0.054569195955991745,
0.19344939291477203,
0.49645236134529114,
0.20445595681667328,
0.05266885086894035,
-0.05089685320854187,
0.13719314336776733,
-0.05337563157081604,
0.31059256196022034,
0.11065325886011124,
0.10085143893957138,
0.1345030516386032,
-0.1580674797296524,
0.37641942501068115,
0.2939082980155945,
0.07169032841920853,
-0.3797556459903717,
-0.09978565573692322,
0.05762110650539398,
0.25239667296409607,
-0.06275571137666702,
-0.013915007002651691,
0.0038343314081430435,
0.02689928375184536,
0.1780959963798523,
-0.09977463632822037,
0.13222050666809082,
0.18756899237632751,
0.08740811049938202,
-0.4511452317237854,
-0.4366306662559509,
0.34144166111946106,
0.1997046321630478,
0.1596938669681549,
0.3301559090614319,
-0.1424442082643509,
-0.556637167930603,
0.32534167170524597,
0.35895827412605286,
0.9608327150344849,
-0.3551475703716278,
0.39372795820236206,
0.09621859341859818,
0.21176396310329437,
0.6567659378051758,
-0.4751394987106323,
0.3529609143733978,
-0.3699403405189514,
-0.08157624304294586,
0.04317544400691986,
-0.1331000030040741,
0.13796263933181763,
-0.0172332264482975,
-0.43608707189559937,
0.28913208842277527,
0.09133213013410568,
-0.03982852026820183,
-0.1840583235025406,
0.3883708119392395,
0.11244708299636841,
-0.48119962215423584,
-0.18418671190738678,
0.03195086121559143,
-0.12698405981063843,
0.24396707117557526,
-0.04560301825404167,
-0.027440516278147697,
0.11567635834217072,
-0.11502748727798462,
-0.3924036920070648,
-0.037451621145009995,
-0.48363545536994934,
0.307691365480423,
-0.25178262591362,
0.0015953655820339918,
0.40474599599838257,
0.392807275056839,
0.010181809775531292,
0.3698486387729645,
-0.13404931128025055,
0.010526882484555244,
-0.3600800037384033,
-0.2767653167247772,
-0.18505646288394928,
0.0676637515425682,
0.2424035221338272,
-0.19374270737171173,
-0.10712806135416031,
0.0763595774769783,
-0.03994672745466232,
-0.1982407122850418,
-0.21035221219062805,
-0.03187697008252144,
-0.12981906533241272,
-0.20456506311893463,
-0.21239350736141205,
0.01328445877879858,
-0.35847532749176025,
-0.01862037181854248,
0.045863259583711624,
0.010846770368516445,
-0.3378375768661499,
0.3286835849285126,
0.14236271381378174,
-0.4008432626724243,
0.03074004501104355,
0.4164585769176483,
0.34854456782341003,
0.16058588027954102,
0.7200257182121277,
0.32326167821884155,
-0.24563825130462646,
-0.16185930371284485,
-0.08247323334217072,
-0.025336377322673798,
-0.3048343062400818,
0.2100924402475357,
0.0837557390332222,
0.10605296492576599,
-0.3066006600856781,
-0.00037729128962382674,
0.12854303419589996,
0.04523579031229019,
0.036389417946338654,
-0.30439838767051697,
-0.5601998567581177,
0.20824943482875824,
-0.010478181764483452,
0.03649923950433731,
0.23689481616020203,
0.02219078317284584,
0.029530955478549004,
0.24801631271839142,
-0.15663038194179535,
0.02005399949848652,
-0.1691429167985916,
0.2507913410663605,
0.24381858110427856,
-0.11168689280748367,
0.10324405878782272,
-0.012948621064424515,
-0.00433924188837409,
0.15931059420108795,
-0.015023553743958473,
-0.12695273756980896,
0.04548129066824913,
0.15326255559921265,
-0.026851246133446693,
-0.2777853310108185,
-0.0963575690984726,
-0.5430383682250977,
-0.015896866098046303,
-0.30399346351623535,
0.011127656325697899,
0.021279485896229744,
-0.13627047836780548,
0.1109771654009819,
0.20190253853797913,
-0.2731657922267914,
-0.06302589178085327,
0.2792612910270691,
-0.022164881229400635,
-0.050753045827150345,
0.16587083041667938,
0.20174944400787354,
0.09379895776510239,
-0.15707401931285858,
-0.5362296104431152,
0.05583411827683449,
-0.08433575928211212,
-0.02662808448076248,
0.10199379175901413,
-0.11428507417440414,
-0.39937663078308105,
0.3194211423397064,
0.09046681970357895,
0.15101343393325806,
-0.1423274129629135,
0.20684054493904114,
0.2004517912864685,
0.008969016373157501,
-0.19372761249542236,
-0.04185628145933151,
0.3301989436149597,
-0.29200848937034607,
-0.050598181784152985,
0.3277896046638489,
-0.13116705417633057,
0.0453462079167366,
-0.029958419501781464,
0.13115832209587097,
0.35880181193351746,
-0.07343048602342606,
0.3226175904273987,
0.006158021278679371,
-0.08348388969898224,
-0.016720294952392578,
0.193902388215065,
0.4057270586490631,
0.25870299339294434,
0.20438620448112488,
-0.1556379795074463,
0.03763989359140396,
-0.1058715283870697,
-0.25482264161109924,
0.037943679839372635,
-0.08367090672254562,
0.1414889097213745,
0.41897302865982056,
-0.17759177088737488,
0.15921926498413086,
-0.19391347467899323,
0.17801834642887115,
0.18459691107273102,
-0.274557888507843,
0.07877665758132935,
0.2984720468521118,
-0.21168749034404755,
0.046473804861307144,
0.1499887853860855,
-0.11578136682510376,
-0.06578817963600159,
0.14178483188152313,
0.07711458206176758,
-0.608738362789154,
0.4591955840587616,
0.14678648114204407,
-0.2206505537033081,
-0.14092643558979034,
0.27736374735832214,
0.45225393772125244,
0.07107789069414139,
-0.3053993582725525,
0.05759496986865997,
0.02698870562016964,
0.1365886926651001,
-0.33182793855667114,
0.30944591760635376,
0.4621623456478119,
0.2915849983692169,
-0.19562384486198425,
0.2535722255706787,
-0.15816397964954376,
-0.012618978507816792,
0.015425648540258408,
-0.0236887838691473,
0.1164659932255745,
0.21650558710098267,
0.11305516213178635,
-0.010932949371635914,
-0.058627624064683914,
-0.15109464526176453,
0.16302037239074707,
0.14252051711082458,
-0.22791601717472076,
-0.38114112615585327,
-0.09919245541095734,
-0.17108891904354095,
-0.01404008362442255,
-0.011570015922188759,
-0.5901709198951721,
0.28267037868499756,
0.528623104095459,
-0.13806697726249695,
0.08121014386415482,
0.02023271471261978,
0.013729548081755638,
-0.03196626529097557,
0.4846242368221283,
0.20302274823188782,
-0.033080581575632095,
-0.4814164340496063,
-0.31778112053871155,
-0.4150759279727936,
0.024108538404107094,
-0.32978108525276184,
0.004063502419739962,
-0.07540751248598099,
0.11538693308830261,
-0.04735598713159561,
0.04659353569149971,
0.04862799122929573,
-0.3642241954803467,
-0.043517861515283585,
0.17761385440826416,
-0.15607339143753052,
-0.2553374767303467,
-0.12739022076129913,
0.17875953018665314,
0.17938855290412903,
-0.19811445474624634,
0.26311174035072327,
0.008782656863331795,
-0.1398375928401947,
-0.3518664538860321,
0.13386772572994232,
0.05019700154662132,
0.17792092263698578,
0.15763571858406067,
0.06100555136799812,
0.3895048499107361,
0.004085507709532976,
-0.24227140843868256,
0.025816451758146286,
0.0002692122070584446,
-0.09981372207403183,
0.14134040474891663,
0.1294574737548828,
0.36912834644317627,
-0.4097660481929779,
-0.38277900218963623,
-0.432792991399765,
0.2897745668888092,
-0.06378446519374847,
-0.11976949125528336,
-0.03507985174655914,
-0.037601832300424576,
0.25265344977378845,
0.06882942467927933,
0.06360214203596115,
0.15866626799106598,
-0.06568865478038788,
-0.00033509545028209686,
-0.45090451836586,
-0.26157230138778687,
0.4598853588104248,
-0.45829999446868896,
-0.38560283184051514,
-0.08610069751739502,
-0.09503575414419174,
-0.14593566954135895,
-0.13941240310668945,
-0.7795307636260986,
0.09105987101793289,
0.294411301612854,
0.09553021192550659,
-0.42246925830841064,
0.03149578720331192,
-0.10581442713737488,
0.12016637623310089,
-0.12562569975852966,
0.33655011653900146,
-0.09009523689746857,
-0.43250608444213867,
0.16513052582740784,
-0.20777177810668945
] |
https://github.com/huggingface/datasets/issues/1990
|
OSError: Memory mapping file failed: Cannot allocate memory
|
Dear @lhoestq
thank you very much for the very sharp observation, indeed, this happens there, I use the default value of 5, I basically plan to subsample a part of the large dataset and choose it as validation set. Do you think this is bringing the data into memory during subsampling? Is there a way I could avoid this?
Thank you very much for the great help.
On Mon, Mar 8, 2021 at 11:28 AM Quentin Lhoest ***@***.***>
wrote:
> I noticed that the error happens when loading the validation dataset.
> What value of data_args.validation_split_percentage did you use ?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/1990#issuecomment-792655644>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMS337ZUJ7HGGVVCCR3TCSREFANCNFSM4YTYAQ2A>
> .
>
|
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
| 133
|
OSError: Memory mapping file failed: Cannot allocate memory
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
Dear @lhoestq
thank you very much for the very sharp observation, indeed, this happens there, I use the default value of 5, I basically plan to subsample a part of the large dataset and choose it as validation set. Do you think this is bringing the data into memory during subsampling? Is there a way I could avoid this?
Thank you very much for the great help.
On Mon, Mar 8, 2021 at 11:28 AM Quentin Lhoest ***@***.***>
wrote:
> I noticed that the error happens when loading the validation dataset.
> What value of data_args.validation_split_percentage did you use ?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/1990#issuecomment-792655644>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMS337ZUJ7HGGVVCCR3TCSREFANCNFSM4YTYAQ2A>
> .
>
|
[
-0.2615426778793335,
-0.03726374730467796,
0.052039820700883865,
0.6045725345611572,
0.45383742451667786,
0.28340065479278564,
0.14564387500286102,
0.27246683835983276,
0.17855076491832733,
0.10566114634275436,
-0.058184556663036346,
0.22738687694072723,
-0.17711851000785828,
-0.14591611921787262,
-0.03709108754992485,
-0.1933322697877884,
0.08402097970247269,
0.013471064157783985,
-0.5429397821426392,
0.16046863794326782,
-0.35815510153770447,
0.11570677161216736,
-0.185632586479187,
-0.11715949326753616,
-0.2980373799800873,
-0.10351552069187164,
-0.0006046652561053634,
-0.09763103723526001,
0.01887798309326172,
-0.3274090886116028,
0.2548562288284302,
-0.1293889582157135,
0.08640079945325851,
0.550193727016449,
-0.00012316074571572244,
-0.013776227831840515,
0.2835688292980194,
-0.16720855236053467,
-0.2533990442752838,
-0.12841646373271942,
-0.041656285524368286,
-0.029798241332173347,
0.09849663823843002,
-0.22525101900100708,
-0.011924171820282936,
-0.05259295552968979,
0.23172998428344727,
-0.34451499581336975,
0.44297534227371216,
0.2243887037038803,
0.14049477875232697,
0.06996601819992065,
0.4524523913860321,
-0.0441126748919487,
0.17390714585781097,
0.33412232995033264,
0.0713806077837944,
0.33202388882637024,
-0.2908709943294525,
-0.43568575382232666,
-0.030412394553422928,
0.39305052161216736,
-0.0399404913187027,
0.005287534091621637,
0.5653285980224609,
-0.14458364248275757,
0.025353798642754555,
-0.3368176221847534,
0.11230865865945816,
-0.007249023299664259,
0.5341078639030457,
-0.4902596175670624,
-0.028372444212436676,
-0.01478649117052555,
-0.053383294492959976,
-0.09524015337228775,
0.29709768295288086,
0.26895296573638916,
-0.2722626030445099,
-0.14476081728935242,
-0.13041627407073975,
-0.3249987065792084,
-0.31970056891441345,
0.4428682327270508,
-0.09092123061418533,
0.19100183248519897,
-0.024715842679142952,
0.30378180742263794,
0.5653707981109619,
-0.20508962869644165,
-0.23406115174293518,
-0.07581175118684769,
0.13654354214668274,
0.3287965655326843,
-0.26772114634513855,
-0.16602861881256104,
-0.30294936895370483,
-0.2047097533941269,
0.35113656520843506,
-0.4987063407897949,
-0.38619357347488403,
-0.12600062787532806,
0.1516702026128769,
0.021239371970295906,
0.4036446809768677,
0.2817358374595642,
-0.29636484384536743,
0.32283663749694824,
0.3122963607311249,
0.17427168786525726,
-0.24953825771808624,
-0.15898962318897247,
0.07679407298564911,
-0.03737916797399521,
-0.11104985326528549,
-0.1914830356836319,
0.08377373218536377,
-0.0016539249336346984,
-0.01374629233032465,
-0.021803516894578934,
-0.21283213794231415,
-0.12320905178785324,
-0.05384961515665054,
0.5055232048034668,
-0.10408467799425125,
-0.08461913466453552,
0.37382766604423523,
0.14446023106575012,
-0.012684580869972706,
-0.008076634258031845,
-0.05637519806623459,
0.4104228913784027,
-0.3436276614665985,
0.2843067944049835,
0.0502626970410347,
-0.0011588296620175242,
0.3263411521911621,
-0.07270614057779312,
-0.0331280343234539,
-0.05668235570192337,
0.16204547882080078,
-0.3580232262611389,
0.00871006678789854,
0.18468783795833588,
0.1788567304611206,
0.24932809174060822,
0.25035130977630615,
-0.14798603951931,
-0.15268467366695404,
0.1969967931509018,
-0.16346804797649384,
-0.24330389499664307,
0.038735490292310715,
0.010929223150014877,
0.09801365435123444,
0.22774739563465118,
-0.27751424908638,
0.18281055986881256,
0.6528624296188354,
-0.0775148868560791,
-0.057265494018793106,
-0.0801965594291687,
-0.22966882586479187,
-0.16876854002475739,
0.2708789110183716,
0.5193133354187012,
-0.0646524652838707,
-0.10548367351293564,
-0.11697003245353699,
0.1677037626504898,
0.25101304054260254,
0.4413832724094391,
-0.16382254660129547,
0.2519162893295288,
-0.09722137451171875,
0.016798056662082672,
0.4141846299171448,
-0.3105097711086273,
-0.3419037163257599,
-0.005623596254736185,
-0.025229105725884438,
-0.13432230055332184,
0.023278776556253433,
0.13213060796260834,
0.07739918678998947,
0.11566591262817383,
0.11192595213651657,
0.31041839718818665,
0.05610385164618492,
0.280083566904068,
-0.3041982054710388,
-0.2975768446922302,
0.25286853313446045,
0.07474604994058609,
0.06539683789014816,
-0.20408296585083008,
-0.06084928289055824,
0.8107663989067078,
0.2972952127456665,
-0.2623122036457062,
0.155534029006958,
0.3147752285003662,
0.10613663494586945,
0.0064362939447164536,
0.08711898326873779,
-0.21991299092769623,
-0.251446932554245,
-0.07342478632926941,
-0.05670022964477539,
0.33059367537498474,
-0.1451888084411621,
-0.0414811410009861,
0.15372207760810852,
-0.11867023259401321,
-0.1722494512796402,
-0.3908627927303314,
0.06229529529809952,
0.013073492795228958,
0.1235828548669815,
0.09008520841598511,
0.08106079697608948,
0.05600894242525101,
-0.09397076815366745,
0.24789239466190338,
-0.5998016595840454,
0.1715034693479538,
-0.289608359336853,
-0.1076945960521698,
-0.021440330892801285,
-0.06249156594276428,
0.027414828538894653,
-0.04746605083346367,
-0.06855613738298416,
0.15199263393878937,
0.07713452726602554,
-0.16711537539958954,
-0.09068481624126434,
0.003419385524466634,
0.3101092576980591,
-0.32211339473724365,
0.1657051295042038,
0.24217157065868378,
0.19550393521785736,
-0.0940224677324295,
-0.197695791721344,
-0.15587788820266724,
0.10513376444578171,
0.3647216856479645,
0.07918791472911835,
0.16877508163452148,
0.026241416111588478,
0.08954793959856033,
0.17978523671627045,
-0.2070024609565735,
0.2181631624698639,
0.012354882434010506,
0.240883931517601,
0.09500694274902344,
-0.029394902288913727,
-0.3097335994243622,
0.4583247900009155,
0.26819732785224915,
0.27729955315589905,
0.2424822449684143,
-0.49372971057891846,
-0.07404212653636932,
-0.06565197557210922,
-0.0718546137213707,
0.3221578001976013,
0.0500783771276474,
-0.1195639818906784,
0.12015511095523834,
0.19633863866329193,
0.009703214280307293,
0.3097599446773529,
0.174388587474823,
0.49407824873924255,
-0.01870846375823021,
0.10572268813848495,
-0.080634705722332,
-0.09958760440349579,
-0.1468486785888672,
0.05004551634192467,
0.5077635049819946,
-0.17538003623485565,
-0.01578444428741932,
-0.1864272952079773,
-0.4006138741970062,
-0.2753985822200775,
0.16431380808353424,
-0.4642420709133148,
-0.13692674040794373,
-0.3849301040172577,
0.32475870847702026,
0.06956344842910767,
0.2584405243396759,
0.41607633233070374,
-0.0507146380841732,
0.35134270787239075,
-0.14067071676254272,
0.06877207010984421,
-0.2304120808839798,
-0.11907626688480377,
-0.06273728609085083,
0.44096195697784424,
-0.22047239542007446,
0.08683281391859055,
0.156727135181427,
-0.31955793499946594,
-0.21350911259651184,
-0.14571557939052582,
0.14698971807956696,
-0.08082082122564316,
0.12557458877563477,
0.059642113745212555,
0.5084343552589417,
-0.12339857965707779,
-0.2323770523071289,
0.17211030423641205,
0.08990706503391266,
-0.05887223407626152,
-0.037300825119018555,
0.023293759673833847,
0.15538480877876282,
0.054088983684778214,
-0.29311421513557434,
-0.179757758975029,
-0.5081846117973328,
0.40148022770881653,
-0.03389134258031845,
0.15136367082595825,
0.3279171288013458,
0.16176272928714752,
0.11561550945043564,
-0.12136641889810562,
0.08944849669933319,
-0.1621505171060562,
0.016019901260733604,
0.3207915723323822,
-0.14882619678974152,
-0.2114349752664566,
-0.029064247384667397,
0.06273781508207321,
0.3063044250011444,
0.23018430173397064,
-0.6157572865486145,
-0.020911145955324173,
-0.1136821061372757,
-0.010894960723817348,
-0.05885140597820282,
0.2863111197948456,
0.3913799226284027,
0.0789221003651619,
0.10780040919780731,
0.13758902251720428,
-0.1677570641040802,
0.09490688890218735,
-0.0409826785326004,
0.3248967230319977,
0.22007903456687927,
0.5234265923500061,
0.06372685730457306,
0.838448166847229,
0.34196406602859497,
0.18713976442813873,
0.22882619500160217,
-0.022066408768296242,
0.08356432616710663,
0.0049698250368237495,
-0.34818750619888306,
-0.008209161460399628,
-0.03689654543995857,
0.06200020760297775,
0.166143000125885,
0.008755125105381012,
-0.33744242787361145,
-0.16767236590385437,
-0.35052913427352905,
0.04599066823720932,
-0.3771667182445526,
0.26985347270965576,
0.17512446641921997,
0.3674233853816986,
-0.0838356614112854,
-0.08241386711597443,
0.02316163294017315,
-0.35157695412635803,
0.1945328563451767,
0.2135327160358429,
-0.01752937026321888,
0.0211244635283947,
-0.11370906978845596,
-0.3958893418312073,
-0.6405463814735413,
0.1182040348649025,
-0.15440179407596588,
0.06297977268695831,
-0.10384790599346161,
0.0933980792760849,
0.060053274035453796,
0.1583070605993271,
0.7553276419639587,
0.005924436263740063,
-0.30729344487190247,
-0.046126410365104675,
-0.26094162464141846,
-0.5063748955726624,
0.21378394961357117,
-0.18415656685829163,
0.34415748715400696,
0.14339010417461395,
0.5205540060997009,
-0.36160188913345337,
-0.09813430160284042,
0.3212875723838806,
0.37471428513526917,
-0.2170826494693756,
-0.20469264686107635,
-0.13433267176151276,
-0.2551265358924866,
-0.6043952703475952,
0.004103627521544695,
0.054569195955991745,
0.19344939291477203,
0.49645236134529114,
0.20445595681667328,
0.05266885086894035,
-0.05089685320854187,
0.13719314336776733,
-0.05337563157081604,
0.31059256196022034,
0.11065325886011124,
0.10085143893957138,
0.1345030516386032,
-0.1580674797296524,
0.37641942501068115,
0.2939082980155945,
0.07169032841920853,
-0.3797556459903717,
-0.09978565573692322,
0.05762110650539398,
0.25239667296409607,
-0.06275571137666702,
-0.013915007002651691,
0.0038343314081430435,
0.02689928375184536,
0.1780959963798523,
-0.09977463632822037,
0.13222050666809082,
0.18756899237632751,
0.08740811049938202,
-0.4511452317237854,
-0.4366306662559509,
0.34144166111946106,
0.1997046321630478,
0.1596938669681549,
0.3301559090614319,
-0.1424442082643509,
-0.556637167930603,
0.32534167170524597,
0.35895827412605286,
0.9608327150344849,
-0.3551475703716278,
0.39372795820236206,
0.09621859341859818,
0.21176396310329437,
0.6567659378051758,
-0.4751394987106323,
0.3529609143733978,
-0.3699403405189514,
-0.08157624304294586,
0.04317544400691986,
-0.1331000030040741,
0.13796263933181763,
-0.0172332264482975,
-0.43608707189559937,
0.28913208842277527,
0.09133213013410568,
-0.03982852026820183,
-0.1840583235025406,
0.3883708119392395,
0.11244708299636841,
-0.48119962215423584,
-0.18418671190738678,
0.03195086121559143,
-0.12698405981063843,
0.24396707117557526,
-0.04560301825404167,
-0.027440516278147697,
0.11567635834217072,
-0.11502748727798462,
-0.3924036920070648,
-0.037451621145009995,
-0.48363545536994934,
0.307691365480423,
-0.25178262591362,
0.0015953655820339918,
0.40474599599838257,
0.392807275056839,
0.010181809775531292,
0.3698486387729645,
-0.13404931128025055,
0.010526882484555244,
-0.3600800037384033,
-0.2767653167247772,
-0.18505646288394928,
0.0676637515425682,
0.2424035221338272,
-0.19374270737171173,
-0.10712806135416031,
0.0763595774769783,
-0.03994672745466232,
-0.1982407122850418,
-0.21035221219062805,
-0.03187697008252144,
-0.12981906533241272,
-0.20456506311893463,
-0.21239350736141205,
0.01328445877879858,
-0.35847532749176025,
-0.01862037181854248,
0.045863259583711624,
0.010846770368516445,
-0.3378375768661499,
0.3286835849285126,
0.14236271381378174,
-0.4008432626724243,
0.03074004501104355,
0.4164585769176483,
0.34854456782341003,
0.16058588027954102,
0.7200257182121277,
0.32326167821884155,
-0.24563825130462646,
-0.16185930371284485,
-0.08247323334217072,
-0.025336377322673798,
-0.3048343062400818,
0.2100924402475357,
0.0837557390332222,
0.10605296492576599,
-0.3066006600856781,
-0.00037729128962382674,
0.12854303419589996,
0.04523579031229019,
0.036389417946338654,
-0.30439838767051697,
-0.5601998567581177,
0.20824943482875824,
-0.010478181764483452,
0.03649923950433731,
0.23689481616020203,
0.02219078317284584,
0.029530955478549004,
0.24801631271839142,
-0.15663038194179535,
0.02005399949848652,
-0.1691429167985916,
0.2507913410663605,
0.24381858110427856,
-0.11168689280748367,
0.10324405878782272,
-0.012948621064424515,
-0.00433924188837409,
0.15931059420108795,
-0.015023553743958473,
-0.12695273756980896,
0.04548129066824913,
0.15326255559921265,
-0.026851246133446693,
-0.2777853310108185,
-0.0963575690984726,
-0.5430383682250977,
-0.015896866098046303,
-0.30399346351623535,
0.011127656325697899,
0.021279485896229744,
-0.13627047836780548,
0.1109771654009819,
0.20190253853797913,
-0.2731657922267914,
-0.06302589178085327,
0.2792612910270691,
-0.022164881229400635,
-0.050753045827150345,
0.16587083041667938,
0.20174944400787354,
0.09379895776510239,
-0.15707401931285858,
-0.5362296104431152,
0.05583411827683449,
-0.08433575928211212,
-0.02662808448076248,
0.10199379175901413,
-0.11428507417440414,
-0.39937663078308105,
0.3194211423397064,
0.09046681970357895,
0.15101343393325806,
-0.1423274129629135,
0.20684054493904114,
0.2004517912864685,
0.008969016373157501,
-0.19372761249542236,
-0.04185628145933151,
0.3301989436149597,
-0.29200848937034607,
-0.050598181784152985,
0.3277896046638489,
-0.13116705417633057,
0.0453462079167366,
-0.029958419501781464,
0.13115832209587097,
0.35880181193351746,
-0.07343048602342606,
0.3226175904273987,
0.006158021278679371,
-0.08348388969898224,
-0.016720294952392578,
0.193902388215065,
0.4057270586490631,
0.25870299339294434,
0.20438620448112488,
-0.1556379795074463,
0.03763989359140396,
-0.1058715283870697,
-0.25482264161109924,
0.037943679839372635,
-0.08367090672254562,
0.1414889097213745,
0.41897302865982056,
-0.17759177088737488,
0.15921926498413086,
-0.19391347467899323,
0.17801834642887115,
0.18459691107273102,
-0.274557888507843,
0.07877665758132935,
0.2984720468521118,
-0.21168749034404755,
0.046473804861307144,
0.1499887853860855,
-0.11578136682510376,
-0.06578817963600159,
0.14178483188152313,
0.07711458206176758,
-0.608738362789154,
0.4591955840587616,
0.14678648114204407,
-0.2206505537033081,
-0.14092643558979034,
0.27736374735832214,
0.45225393772125244,
0.07107789069414139,
-0.3053993582725525,
0.05759496986865997,
0.02698870562016964,
0.1365886926651001,
-0.33182793855667114,
0.30944591760635376,
0.4621623456478119,
0.2915849983692169,
-0.19562384486198425,
0.2535722255706787,
-0.15816397964954376,
-0.012618978507816792,
0.015425648540258408,
-0.0236887838691473,
0.1164659932255745,
0.21650558710098267,
0.11305516213178635,
-0.010932949371635914,
-0.058627624064683914,
-0.15109464526176453,
0.16302037239074707,
0.14252051711082458,
-0.22791601717472076,
-0.38114112615585327,
-0.09919245541095734,
-0.17108891904354095,
-0.01404008362442255,
-0.011570015922188759,
-0.5901709198951721,
0.28267037868499756,
0.528623104095459,
-0.13806697726249695,
0.08121014386415482,
0.02023271471261978,
0.013729548081755638,
-0.03196626529097557,
0.4846242368221283,
0.20302274823188782,
-0.033080581575632095,
-0.4814164340496063,
-0.31778112053871155,
-0.4150759279727936,
0.024108538404107094,
-0.32978108525276184,
0.004063502419739962,
-0.07540751248598099,
0.11538693308830261,
-0.04735598713159561,
0.04659353569149971,
0.04862799122929573,
-0.3642241954803467,
-0.043517861515283585,
0.17761385440826416,
-0.15607339143753052,
-0.2553374767303467,
-0.12739022076129913,
0.17875953018665314,
0.17938855290412903,
-0.19811445474624634,
0.26311174035072327,
0.008782656863331795,
-0.1398375928401947,
-0.3518664538860321,
0.13386772572994232,
0.05019700154662132,
0.17792092263698578,
0.15763571858406067,
0.06100555136799812,
0.3895048499107361,
0.004085507709532976,
-0.24227140843868256,
0.025816451758146286,
0.0002692122070584446,
-0.09981372207403183,
0.14134040474891663,
0.1294574737548828,
0.36912834644317627,
-0.4097660481929779,
-0.38277900218963623,
-0.432792991399765,
0.2897745668888092,
-0.06378446519374847,
-0.11976949125528336,
-0.03507985174655914,
-0.037601832300424576,
0.25265344977378845,
0.06882942467927933,
0.06360214203596115,
0.15866626799106598,
-0.06568865478038788,
-0.00033509545028209686,
-0.45090451836586,
-0.26157230138778687,
0.4598853588104248,
-0.45829999446868896,
-0.38560283184051514,
-0.08610069751739502,
-0.09503575414419174,
-0.14593566954135895,
-0.13941240310668945,
-0.7795307636260986,
0.09105987101793289,
0.294411301612854,
0.09553021192550659,
-0.42246925830841064,
0.03149578720331192,
-0.10581442713737488,
0.12016637623310089,
-0.12562569975852966,
0.33655011653900146,
-0.09009523689746857,
-0.43250608444213867,
0.16513052582740784,
-0.20777177810668945
] |
https://github.com/huggingface/datasets/issues/1990
|
OSError: Memory mapping file failed: Cannot allocate memory
|
Methods like `dataset.shard`, `dataset.train_test_split`, `dataset.select` etc. don't bring the dataset in memory.
The only time when samples are brought to memory is when you access elements via `dataset[0]`, `dataset[:10]`, `dataset["my_column_names"]`.
But it's possible that trying to use those methods to build your validation set doesn't fix the issue since, if I understand correctly, the error happens when when the dataset arrow file is opened (just before the 5% percentage is applied).
Did you try to reproduce this issue in a google colab ? This would be super helpful to investigate why this happened.
Also maybe you can try clearing your cache at `~/.cache/huggingface/datasets` and try again. If the arrow file was corrupted somehow, removing it and rebuilding may fix the issue.
|
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
| 121
|
OSError: Memory mapping file failed: Cannot allocate memory
Hi,
I am trying to run a code with a wikipedia dataset, here is the command to reproduce the error. You can find the codes for run_mlm.py in huggingface repo here: https://github.com/huggingface/transformers/blob/v4.3.2/examples/language-modeling/run_mlm.py
```
python run_mlm.py --model_name_or_path bert-base-multilingual-cased --dataset_name wikipedia --dataset_config_name 20200501.en --do_train --do_eval --output_dir /dara/test --max_seq_length 128
```
I am using transformer version: 4.3.2
But I got memory erorr using this dataset, is there a way I could save on memory with dataset library with wikipedia dataset?
Specially I need to train a model with multiple of wikipedia datasets concatenated. thank you very much @lhoestq for your help and suggestions:
```
File "run_mlm.py", line 441, in <module>
main()
File "run_mlm.py", line 233, in main
split=f"train[{data_args.validation_split_percentage}%:]",
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/load.py", line 750, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 740, in as_dataset
map_tuple=True,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/utils/py_utils.py", line 225, in map_nested
return function(data_struct)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 757, in _build_single_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/builder.py", line 829, in _as_dataset
in_memory=in_memory,
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 215, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 236, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 171, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 302, in _get_dataset_from_filename
pa_table = ArrowReader.read_table(filename, in_memory=in_memory)
File "/dara/libs/anaconda3/envs/code/lib/python3.7/site-packages/datasets-1.3.0-py3.7.egg/datasets/arrow_reader.py", line 322, in read_table
stream = stream_from(filename)
File "pyarrow/io.pxi", line 782, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 743, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
Methods like `dataset.shard`, `dataset.train_test_split`, `dataset.select` etc. don't bring the dataset in memory.
The only time when samples are brought to memory is when you access elements via `dataset[0]`, `dataset[:10]`, `dataset["my_column_names"]`.
But it's possible that trying to use those methods to build your validation set doesn't fix the issue since, if I understand correctly, the error happens when when the dataset arrow file is opened (just before the 5% percentage is applied).
Did you try to reproduce this issue in a google colab ? This would be super helpful to investigate why this happened.
Also maybe you can try clearing your cache at `~/.cache/huggingface/datasets` and try again. If the arrow file was corrupted somehow, removing it and rebuilding may fix the issue.
|
[
-0.2615426778793335,
-0.03726374730467796,
0.052039820700883865,
0.6045725345611572,
0.45383742451667786,
0.28340065479278564,
0.14564387500286102,
0.27246683835983276,
0.17855076491832733,
0.10566114634275436,
-0.058184556663036346,
0.22738687694072723,
-0.17711851000785828,
-0.14591611921787262,
-0.03709108754992485,
-0.1933322697877884,
0.08402097970247269,
0.013471064157783985,
-0.5429397821426392,
0.16046863794326782,
-0.35815510153770447,
0.11570677161216736,
-0.185632586479187,
-0.11715949326753616,
-0.2980373799800873,
-0.10351552069187164,
-0.0006046652561053634,
-0.09763103723526001,
0.01887798309326172,
-0.3274090886116028,
0.2548562288284302,
-0.1293889582157135,
0.08640079945325851,
0.550193727016449,
-0.00012316074571572244,
-0.013776227831840515,
0.2835688292980194,
-0.16720855236053467,
-0.2533990442752838,
-0.12841646373271942,
-0.041656285524368286,
-0.029798241332173347,
0.09849663823843002,
-0.22525101900100708,
-0.011924171820282936,
-0.05259295552968979,
0.23172998428344727,
-0.34451499581336975,
0.44297534227371216,
0.2243887037038803,
0.14049477875232697,
0.06996601819992065,
0.4524523913860321,
-0.0441126748919487,
0.17390714585781097,
0.33412232995033264,
0.0713806077837944,
0.33202388882637024,
-0.2908709943294525,
-0.43568575382232666,
-0.030412394553422928,
0.39305052161216736,
-0.0399404913187027,
0.005287534091621637,
0.5653285980224609,
-0.14458364248275757,
0.025353798642754555,
-0.3368176221847534,
0.11230865865945816,
-0.007249023299664259,
0.5341078639030457,
-0.4902596175670624,
-0.028372444212436676,
-0.01478649117052555,
-0.053383294492959976,
-0.09524015337228775,
0.29709768295288086,
0.26895296573638916,
-0.2722626030445099,
-0.14476081728935242,
-0.13041627407073975,
-0.3249987065792084,
-0.31970056891441345,
0.4428682327270508,
-0.09092123061418533,
0.19100183248519897,
-0.024715842679142952,
0.30378180742263794,
0.5653707981109619,
-0.20508962869644165,
-0.23406115174293518,
-0.07581175118684769,
0.13654354214668274,
0.3287965655326843,
-0.26772114634513855,
-0.16602861881256104,
-0.30294936895370483,
-0.2047097533941269,
0.35113656520843506,
-0.4987063407897949,
-0.38619357347488403,
-0.12600062787532806,
0.1516702026128769,
0.021239371970295906,
0.4036446809768677,
0.2817358374595642,
-0.29636484384536743,
0.32283663749694824,
0.3122963607311249,
0.17427168786525726,
-0.24953825771808624,
-0.15898962318897247,
0.07679407298564911,
-0.03737916797399521,
-0.11104985326528549,
-0.1914830356836319,
0.08377373218536377,
-0.0016539249336346984,
-0.01374629233032465,
-0.021803516894578934,
-0.21283213794231415,
-0.12320905178785324,
-0.05384961515665054,
0.5055232048034668,
-0.10408467799425125,
-0.08461913466453552,
0.37382766604423523,
0.14446023106575012,
-0.012684580869972706,
-0.008076634258031845,
-0.05637519806623459,
0.4104228913784027,
-0.3436276614665985,
0.2843067944049835,
0.0502626970410347,
-0.0011588296620175242,
0.3263411521911621,
-0.07270614057779312,
-0.0331280343234539,
-0.05668235570192337,
0.16204547882080078,
-0.3580232262611389,
0.00871006678789854,
0.18468783795833588,
0.1788567304611206,
0.24932809174060822,
0.25035130977630615,
-0.14798603951931,
-0.15268467366695404,
0.1969967931509018,
-0.16346804797649384,
-0.24330389499664307,
0.038735490292310715,
0.010929223150014877,
0.09801365435123444,
0.22774739563465118,
-0.27751424908638,
0.18281055986881256,
0.6528624296188354,
-0.0775148868560791,
-0.057265494018793106,
-0.0801965594291687,
-0.22966882586479187,
-0.16876854002475739,
0.2708789110183716,
0.5193133354187012,
-0.0646524652838707,
-0.10548367351293564,
-0.11697003245353699,
0.1677037626504898,
0.25101304054260254,
0.4413832724094391,
-0.16382254660129547,
0.2519162893295288,
-0.09722137451171875,
0.016798056662082672,
0.4141846299171448,
-0.3105097711086273,
-0.3419037163257599,
-0.005623596254736185,
-0.025229105725884438,
-0.13432230055332184,
0.023278776556253433,
0.13213060796260834,
0.07739918678998947,
0.11566591262817383,
0.11192595213651657,
0.31041839718818665,
0.05610385164618492,
0.280083566904068,
-0.3041982054710388,
-0.2975768446922302,
0.25286853313446045,
0.07474604994058609,
0.06539683789014816,
-0.20408296585083008,
-0.06084928289055824,
0.8107663989067078,
0.2972952127456665,
-0.2623122036457062,
0.155534029006958,
0.3147752285003662,
0.10613663494586945,
0.0064362939447164536,
0.08711898326873779,
-0.21991299092769623,
-0.251446932554245,
-0.07342478632926941,
-0.05670022964477539,
0.33059367537498474,
-0.1451888084411621,
-0.0414811410009861,
0.15372207760810852,
-0.11867023259401321,
-0.1722494512796402,
-0.3908627927303314,
0.06229529529809952,
0.013073492795228958,
0.1235828548669815,
0.09008520841598511,
0.08106079697608948,
0.05600894242525101,
-0.09397076815366745,
0.24789239466190338,
-0.5998016595840454,
0.1715034693479538,
-0.289608359336853,
-0.1076945960521698,
-0.021440330892801285,
-0.06249156594276428,
0.027414828538894653,
-0.04746605083346367,
-0.06855613738298416,
0.15199263393878937,
0.07713452726602554,
-0.16711537539958954,
-0.09068481624126434,
0.003419385524466634,
0.3101092576980591,
-0.32211339473724365,
0.1657051295042038,
0.24217157065868378,
0.19550393521785736,
-0.0940224677324295,
-0.197695791721344,
-0.15587788820266724,
0.10513376444578171,
0.3647216856479645,
0.07918791472911835,
0.16877508163452148,
0.026241416111588478,
0.08954793959856033,
0.17978523671627045,
-0.2070024609565735,
0.2181631624698639,
0.012354882434010506,
0.240883931517601,
0.09500694274902344,
-0.029394902288913727,
-0.3097335994243622,
0.4583247900009155,
0.26819732785224915,
0.27729955315589905,
0.2424822449684143,
-0.49372971057891846,
-0.07404212653636932,
-0.06565197557210922,
-0.0718546137213707,
0.3221578001976013,
0.0500783771276474,
-0.1195639818906784,
0.12015511095523834,
0.19633863866329193,
0.009703214280307293,
0.3097599446773529,
0.174388587474823,
0.49407824873924255,
-0.01870846375823021,
0.10572268813848495,
-0.080634705722332,
-0.09958760440349579,
-0.1468486785888672,
0.05004551634192467,
0.5077635049819946,
-0.17538003623485565,
-0.01578444428741932,
-0.1864272952079773,
-0.4006138741970062,
-0.2753985822200775,
0.16431380808353424,
-0.4642420709133148,
-0.13692674040794373,
-0.3849301040172577,
0.32475870847702026,
0.06956344842910767,
0.2584405243396759,
0.41607633233070374,
-0.0507146380841732,
0.35134270787239075,
-0.14067071676254272,
0.06877207010984421,
-0.2304120808839798,
-0.11907626688480377,
-0.06273728609085083,
0.44096195697784424,
-0.22047239542007446,
0.08683281391859055,
0.156727135181427,
-0.31955793499946594,
-0.21350911259651184,
-0.14571557939052582,
0.14698971807956696,
-0.08082082122564316,
0.12557458877563477,
0.059642113745212555,
0.5084343552589417,
-0.12339857965707779,
-0.2323770523071289,
0.17211030423641205,
0.08990706503391266,
-0.05887223407626152,
-0.037300825119018555,
0.023293759673833847,
0.15538480877876282,
0.054088983684778214,
-0.29311421513557434,
-0.179757758975029,
-0.5081846117973328,
0.40148022770881653,
-0.03389134258031845,
0.15136367082595825,
0.3279171288013458,
0.16176272928714752,
0.11561550945043564,
-0.12136641889810562,
0.08944849669933319,
-0.1621505171060562,
0.016019901260733604,
0.3207915723323822,
-0.14882619678974152,
-0.2114349752664566,
-0.029064247384667397,
0.06273781508207321,
0.3063044250011444,
0.23018430173397064,
-0.6157572865486145,
-0.020911145955324173,
-0.1136821061372757,
-0.010894960723817348,
-0.05885140597820282,
0.2863111197948456,
0.3913799226284027,
0.0789221003651619,
0.10780040919780731,
0.13758902251720428,
-0.1677570641040802,
0.09490688890218735,
-0.0409826785326004,
0.3248967230319977,
0.22007903456687927,
0.5234265923500061,
0.06372685730457306,
0.838448166847229,
0.34196406602859497,
0.18713976442813873,
0.22882619500160217,
-0.022066408768296242,
0.08356432616710663,
0.0049698250368237495,
-0.34818750619888306,
-0.008209161460399628,
-0.03689654543995857,
0.06200020760297775,
0.166143000125885,
0.008755125105381012,
-0.33744242787361145,
-0.16767236590385437,
-0.35052913427352905,
0.04599066823720932,
-0.3771667182445526,
0.26985347270965576,
0.17512446641921997,
0.3674233853816986,
-0.0838356614112854,
-0.08241386711597443,
0.02316163294017315,
-0.35157695412635803,
0.1945328563451767,
0.2135327160358429,
-0.01752937026321888,
0.0211244635283947,
-0.11370906978845596,
-0.3958893418312073,
-0.6405463814735413,
0.1182040348649025,
-0.15440179407596588,
0.06297977268695831,
-0.10384790599346161,
0.0933980792760849,
0.060053274035453796,
0.1583070605993271,
0.7553276419639587,
0.005924436263740063,
-0.30729344487190247,
-0.046126410365104675,
-0.26094162464141846,
-0.5063748955726624,
0.21378394961357117,
-0.18415656685829163,
0.34415748715400696,
0.14339010417461395,
0.5205540060997009,
-0.36160188913345337,
-0.09813430160284042,
0.3212875723838806,
0.37471428513526917,
-0.2170826494693756,
-0.20469264686107635,
-0.13433267176151276,
-0.2551265358924866,
-0.6043952703475952,
0.004103627521544695,
0.054569195955991745,
0.19344939291477203,
0.49645236134529114,
0.20445595681667328,
0.05266885086894035,
-0.05089685320854187,
0.13719314336776733,
-0.05337563157081604,
0.31059256196022034,
0.11065325886011124,
0.10085143893957138,
0.1345030516386032,
-0.1580674797296524,
0.37641942501068115,
0.2939082980155945,
0.07169032841920853,
-0.3797556459903717,
-0.09978565573692322,
0.05762110650539398,
0.25239667296409607,
-0.06275571137666702,
-0.013915007002651691,
0.0038343314081430435,
0.02689928375184536,
0.1780959963798523,
-0.09977463632822037,
0.13222050666809082,
0.18756899237632751,
0.08740811049938202,
-0.4511452317237854,
-0.4366306662559509,
0.34144166111946106,
0.1997046321630478,
0.1596938669681549,
0.3301559090614319,
-0.1424442082643509,
-0.556637167930603,
0.32534167170524597,
0.35895827412605286,
0.9608327150344849,
-0.3551475703716278,
0.39372795820236206,
0.09621859341859818,
0.21176396310329437,
0.6567659378051758,
-0.4751394987106323,
0.3529609143733978,
-0.3699403405189514,
-0.08157624304294586,
0.04317544400691986,
-0.1331000030040741,
0.13796263933181763,
-0.0172332264482975,
-0.43608707189559937,
0.28913208842277527,
0.09133213013410568,
-0.03982852026820183,
-0.1840583235025406,
0.3883708119392395,
0.11244708299636841,
-0.48119962215423584,
-0.18418671190738678,
0.03195086121559143,
-0.12698405981063843,
0.24396707117557526,
-0.04560301825404167,
-0.027440516278147697,
0.11567635834217072,
-0.11502748727798462,
-0.3924036920070648,
-0.037451621145009995,
-0.48363545536994934,
0.307691365480423,
-0.25178262591362,
0.0015953655820339918,
0.40474599599838257,
0.392807275056839,
0.010181809775531292,
0.3698486387729645,
-0.13404931128025055,
0.010526882484555244,
-0.3600800037384033,
-0.2767653167247772,
-0.18505646288394928,
0.0676637515425682,
0.2424035221338272,
-0.19374270737171173,
-0.10712806135416031,
0.0763595774769783,
-0.03994672745466232,
-0.1982407122850418,
-0.21035221219062805,
-0.03187697008252144,
-0.12981906533241272,
-0.20456506311893463,
-0.21239350736141205,
0.01328445877879858,
-0.35847532749176025,
-0.01862037181854248,
0.045863259583711624,
0.010846770368516445,
-0.3378375768661499,
0.3286835849285126,
0.14236271381378174,
-0.4008432626724243,
0.03074004501104355,
0.4164585769176483,
0.34854456782341003,
0.16058588027954102,
0.7200257182121277,
0.32326167821884155,
-0.24563825130462646,
-0.16185930371284485,
-0.08247323334217072,
-0.025336377322673798,
-0.3048343062400818,
0.2100924402475357,
0.0837557390332222,
0.10605296492576599,
-0.3066006600856781,
-0.00037729128962382674,
0.12854303419589996,
0.04523579031229019,
0.036389417946338654,
-0.30439838767051697,
-0.5601998567581177,
0.20824943482875824,
-0.010478181764483452,
0.03649923950433731,
0.23689481616020203,
0.02219078317284584,
0.029530955478549004,
0.24801631271839142,
-0.15663038194179535,
0.02005399949848652,
-0.1691429167985916,
0.2507913410663605,
0.24381858110427856,
-0.11168689280748367,
0.10324405878782272,
-0.012948621064424515,
-0.00433924188837409,
0.15931059420108795,
-0.015023553743958473,
-0.12695273756980896,
0.04548129066824913,
0.15326255559921265,
-0.026851246133446693,
-0.2777853310108185,
-0.0963575690984726,
-0.5430383682250977,
-0.015896866098046303,
-0.30399346351623535,
0.011127656325697899,
0.021279485896229744,
-0.13627047836780548,
0.1109771654009819,
0.20190253853797913,
-0.2731657922267914,
-0.06302589178085327,
0.2792612910270691,
-0.022164881229400635,
-0.050753045827150345,
0.16587083041667938,
0.20174944400787354,
0.09379895776510239,
-0.15707401931285858,
-0.5362296104431152,
0.05583411827683449,
-0.08433575928211212,
-0.02662808448076248,
0.10199379175901413,
-0.11428507417440414,
-0.39937663078308105,
0.3194211423397064,
0.09046681970357895,
0.15101343393325806,
-0.1423274129629135,
0.20684054493904114,
0.2004517912864685,
0.008969016373157501,
-0.19372761249542236,
-0.04185628145933151,
0.3301989436149597,
-0.29200848937034607,
-0.050598181784152985,
0.3277896046638489,
-0.13116705417633057,
0.0453462079167366,
-0.029958419501781464,
0.13115832209587097,
0.35880181193351746,
-0.07343048602342606,
0.3226175904273987,
0.006158021278679371,
-0.08348388969898224,
-0.016720294952392578,
0.193902388215065,
0.4057270586490631,
0.25870299339294434,
0.20438620448112488,
-0.1556379795074463,
0.03763989359140396,
-0.1058715283870697,
-0.25482264161109924,
0.037943679839372635,
-0.08367090672254562,
0.1414889097213745,
0.41897302865982056,
-0.17759177088737488,
0.15921926498413086,
-0.19391347467899323,
0.17801834642887115,
0.18459691107273102,
-0.274557888507843,
0.07877665758132935,
0.2984720468521118,
-0.21168749034404755,
0.046473804861307144,
0.1499887853860855,
-0.11578136682510376,
-0.06578817963600159,
0.14178483188152313,
0.07711458206176758,
-0.608738362789154,
0.4591955840587616,
0.14678648114204407,
-0.2206505537033081,
-0.14092643558979034,
0.27736374735832214,
0.45225393772125244,
0.07107789069414139,
-0.3053993582725525,
0.05759496986865997,
0.02698870562016964,
0.1365886926651001,
-0.33182793855667114,
0.30944591760635376,
0.4621623456478119,
0.2915849983692169,
-0.19562384486198425,
0.2535722255706787,
-0.15816397964954376,
-0.012618978507816792,
0.015425648540258408,
-0.0236887838691473,
0.1164659932255745,
0.21650558710098267,
0.11305516213178635,
-0.010932949371635914,
-0.058627624064683914,
-0.15109464526176453,
0.16302037239074707,
0.14252051711082458,
-0.22791601717472076,
-0.38114112615585327,
-0.09919245541095734,
-0.17108891904354095,
-0.01404008362442255,
-0.011570015922188759,
-0.5901709198951721,
0.28267037868499756,
0.528623104095459,
-0.13806697726249695,
0.08121014386415482,
0.02023271471261978,
0.013729548081755638,
-0.03196626529097557,
0.4846242368221283,
0.20302274823188782,
-0.033080581575632095,
-0.4814164340496063,
-0.31778112053871155,
-0.4150759279727936,
0.024108538404107094,
-0.32978108525276184,
0.004063502419739962,
-0.07540751248598099,
0.11538693308830261,
-0.04735598713159561,
0.04659353569149971,
0.04862799122929573,
-0.3642241954803467,
-0.043517861515283585,
0.17761385440826416,
-0.15607339143753052,
-0.2553374767303467,
-0.12739022076129913,
0.17875953018665314,
0.17938855290412903,
-0.19811445474624634,
0.26311174035072327,
0.008782656863331795,
-0.1398375928401947,
-0.3518664538860321,
0.13386772572994232,
0.05019700154662132,
0.17792092263698578,
0.15763571858406067,
0.06100555136799812,
0.3895048499107361,
0.004085507709532976,
-0.24227140843868256,
0.025816451758146286,
0.0002692122070584446,
-0.09981372207403183,
0.14134040474891663,
0.1294574737548828,
0.36912834644317627,
-0.4097660481929779,
-0.38277900218963623,
-0.432792991399765,
0.2897745668888092,
-0.06378446519374847,
-0.11976949125528336,
-0.03507985174655914,
-0.037601832300424576,
0.25265344977378845,
0.06882942467927933,
0.06360214203596115,
0.15866626799106598,
-0.06568865478038788,
-0.00033509545028209686,
-0.45090451836586,
-0.26157230138778687,
0.4598853588104248,
-0.45829999446868896,
-0.38560283184051514,
-0.08610069751739502,
-0.09503575414419174,
-0.14593566954135895,
-0.13941240310668945,
-0.7795307636260986,
0.09105987101793289,
0.294411301612854,
0.09553021192550659,
-0.42246925830841064,
0.03149578720331192,
-0.10581442713737488,
0.12016637623310089,
-0.12562569975852966,
0.33655011653900146,
-0.09009523689746857,
-0.43250608444213867,
0.16513052582740784,
-0.20777177810668945
] |
https://github.com/huggingface/datasets/issues/1989
|
Question/problem with dataset labels
|
It seems that I get parsing errors for various fields in my data. For example now I get this:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: https://www.netgalley.com/catalog/book/121872
```
|
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
| 128
|
Question/problem with dataset labels
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
It seems that I get parsing errors for various fields in my data. For example now I get this:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: https://www.netgalley.com/catalog/book/121872
```
|
[
0.17891347408294678,
-0.05732341110706329,
0.005179154220968485,
0.13436773419380188,
0.41135331988334656,
0.3502122461795807,
0.6419939398765564,
0.1637083739042282,
-0.16131801903247833,
0.07234936207532883,
0.17885370552539825,
0.06387592107057571,
-0.06077335402369499,
0.030525799840688705,
-0.13023114204406738,
-0.11937106400728226,
0.08908423036336899,
0.173479363322258,
0.18164248764514923,
-0.044466327875852585,
-0.2867426872253418,
-0.03982604295015335,
-0.15668001770973206,
0.36628860235214233,
-0.2972058057785034,
-0.3766840398311615,
0.21054299175739288,
-0.12052856385707855,
-0.11313280463218689,
-0.4633955657482147,
0.27180957794189453,
0.08612103015184402,
0.0026813640724867582,
0.40342751145362854,
-0.00010309632489224896,
0.05875691398978233,
0.29674792289733887,
0.15598881244659424,
-0.3984077572822571,
-0.4321288764476776,
-0.18936008214950562,
-0.02340724691748619,
0.034564148634672165,
-0.3044775724411011,
0.09798295050859451,
-0.28466835618019104,
-0.09054138511419296,
-0.27566608786582947,
0.10468693822622299,
0.4386066496372223,
0.32663995027542114,
0.23734048008918762,
-0.20649951696395874,
-0.2293027937412262,
0.2311529964208603,
0.12508909404277802,
-0.030508195981383324,
0.049476899206638336,
-0.1344391107559204,
-0.006456918548792601,
0.45157045125961304,
0.46091440320014954,
-0.2723958492279053,
0.264771431684494,
0.1353634148836136,
0.14636319875717163,
0.13772615790367126,
-0.391048789024353,
0.2763097286224365,
0.1961430460214615,
0.7452602386474609,
-0.29649990797042847,
-0.29439058899879456,
-0.1697036474943161,
0.1373763233423233,
-0.4167192876338959,
0.18133871257305145,
0.07008437067270279,
0.006375445984303951,
-0.047014687210321426,
-0.03316255286335945,
0.06102658808231354,
0.08074173331260681,
0.0881802961230278,
-0.05807413160800934,
0.03832928463816643,
-0.0986412912607193,
0.32881712913513184,
0.1125299260020256,
-0.07475035637617111,
0.2975311279296875,
-0.005993981380015612,
-0.08857189118862152,
0.041545283049345016,
-0.4325246512889862,
-0.029609162360429764,
-0.03688126802444458,
0.05167559161782265,
-0.11813832819461823,
-0.03874027729034424,
0.01838638447225094,
-0.37495556473731995,
-0.14743423461914062,
0.34034523367881775,
0.21513402462005615,
0.2662767469882965,
0.27069926261901855,
0.5616875886917114,
0.0911722481250763,
-0.07616250216960907,
0.03080311231315136,
-0.0558072105050087,
-0.0015746225835755467,
-0.46264347434043884,
0.2433207631111145,
0.09893110394477844,
0.29347071051597595,
-0.23985809087753296,
-0.5455209612846375,
0.19244229793548584,
-0.028102025389671326,
0.09409462660551071,
0.15411771833896637,
0.3049507737159729,
0.022121448069810867,
0.20651715993881226,
0.07934725284576416,
0.19360817968845367,
-0.00917017925530672,
-0.11720465868711472,
-0.20692431926727295,
0.09760840982198715,
-0.20027866959571838,
-0.15010692179203033,
0.05026973783969879,
-0.07205360382795334,
0.11245013773441315,
0.0640593096613884,
-0.0010052787838503718,
-0.07605742663145065,
-0.01630275882780552,
-0.3864647448062897,
-0.01274816133081913,
0.3588937819004059,
-0.10326281189918518,
0.420350581407547,
0.2520546317100525,
-0.41855016350746155,
0.05969962105154991,
0.18021129071712494,
-0.36885228753089905,
-0.033813633024692535,
-0.21215848624706268,
0.28621235489845276,
-0.10304412245750427,
-0.18798039853572845,
-0.12009236216545105,
0.046823322772979736,
0.4193205237388611,
-0.21455369889736176,
0.15758994221687317,
-0.3543834090232849,
-0.30932241678237915,
-0.27777037024497986,
-0.06630374491214752,
0.22143235802650452,
-0.672246515750885,
0.004389484412968159,
-0.14754599332809448,
-0.02911343239247799,
0.05280744656920433,
0.29601913690567017,
-0.08100432902574539,
0.2062923014163971,
-0.07059221714735031,
0.030349209904670715,
0.13955312967300415,
-0.3906913101673126,
-0.11046354472637177,
0.10354441404342651,
-0.14200283586978912,
-0.24426479637622833,
0.07048094272613525,
-0.040339983999729156,
0.09173159301280975,
-0.0916256308555603,
0.05823083594441414,
-0.1318773776292801,
-0.19963160157203674,
-0.09513296186923981,
-0.1437045931816101,
0.0538102351129055,
0.6539096832275391,
0.09273272007703781,
-0.016799816861748695,
0.07564713805913925,
-0.10022789984941483,
-0.3448372781276703,
-0.042531568557024,
-0.1009543389081955,
0.20621949434280396,
0.21479029953479767,
0.055640604346990585,
0.2983594834804535,
0.1459522396326065,
-0.06447069346904755,
-0.4424961805343628,
0.10170096158981323,
-0.04005378112196922,
0.13956496119499207,
-0.14514334499835968,
-0.19234369695186615,
-0.3297654986381531,
-0.05378612130880356,
-0.20797739923000336,
0.01832341030240059,
0.16331322491168976,
0.06836050748825073,
-0.22142063081264496,
-0.020482944324612617,
0.014084731228649616,
-0.07588552683591843,
-0.017213372513651848,
0.10933033376932144,
-0.10402482002973557,
0.26565271615982056,
-0.09511733055114746,
0.1168939396739006,
-0.026739396154880524,
0.25311946868896484,
0.43260639905929565,
0.24005112051963806,
-0.046622101217508316,
0.36702385544776917,
0.0848604291677475,
-0.3270232081413269,
0.007840029895305634,
-0.1726589947938919,
0.018129581585526466,
-0.08387529104948044,
-0.0163266621530056,
0.11452510952949524,
0.27684012055397034,
-0.10859706997871399,
-0.08471912145614624,
0.14118549227714539,
-0.17720016837120056,
0.2762838900089264,
-0.16197457909584045,
0.20046067237854004,
0.25996318459510803,
-0.10939249396324158,
0.1251230537891388,
-0.2127114236354828,
0.21588031947612762,
-0.12979799509048462,
0.23431450128555298,
0.0071422988548874855,
-0.2617172598838806,
0.06771795451641083,
0.4220546782016754,
0.0015312841860577464,
-0.0035242880694568157,
0.009774230420589447,
-0.15866822004318237,
0.16574595868587494,
-0.013017691671848297,
0.595718264579773,
0.35284286737442017,
0.205955371260643,
-0.16387644410133362,
-0.058268580585718155,
-0.26225870847702026,
-0.13698343932628632,
0.21246269345283508,
0.09510132670402527,
0.029852598905563354,
0.05729620158672333,
0.02610979974269867,
-0.06643904745578766,
-0.17657293379306793,
-0.2433391660451889,
0.20823147892951965,
0.34643009305000305,
-0.5103117227554321,
-0.002906450070440769,
-0.34527212381362915,
-0.23186378180980682,
-0.31859782338142395,
-0.09879127889871597,
-0.23515866696834564,
-0.45904380083084106,
0.09043732285499573,
-0.07749122381210327,
-0.19039256870746613,
0.14507734775543213,
-0.037563350051641464,
0.00791588518768549,
-0.09107247740030289,
0.15205179154872894,
-0.09758404642343521,
-0.4702501893043518,
-0.20457129180431366,
0.18111225962638855,
0.007480352185666561,
0.04695437476038933,
0.4813607335090637,
-0.143199160695076,
-0.12455568462610245,
-0.07857241481542587,
-0.2953171133995056,
0.004026900511234999,
-0.2730652093887329,
0.13660450279712677,
0.1816229671239853,
0.10386001318693161,
0.008461100049316883,
-0.14868579804897308,
0.29301661252975464,
-0.07151931524276733,
0.024639904499053955,
0.10695718973875046,
0.045232538133859634,
-0.29207393527030945,
-0.26646947860717773,
-0.4750193655490875,
-0.47453048825263977,
-0.17748217284679413,
0.06694815307855606,
-0.07590755075216293,
-0.03352787345647812,
0.5198022127151489,
0.06844227761030197,
0.06568092852830887,
0.09314426779747009,
0.023253191262483597,
-0.34674328565597534,
-0.09354142844676971,
0.24904774129390717,
-0.17909251153469086,
-0.2102450281381607,
0.19605785608291626,
0.109309121966362,
0.11752880364656448,
-0.20393434166908264,
-0.3139221668243408,
0.07286331057548523,
-0.05760190263390541,
0.05894489958882332,
0.08131010830402374,
0.1948966234922409,
0.2138824611902237,
0.26710304617881775,
-0.14800302684307098,
-0.32705044746398926,
-0.3317107558250427,
0.13817375898361206,
-0.07196798175573349,
0.1306353658437729,
-0.10625556856393814,
0.29408565163612366,
-0.15208472311496735,
0.3265087604522705,
0.021773260086774826,
-0.2126564383506775,
0.19188947975635529,
-0.04784756898880005,
0.5207315683364868,
0.06838033348321915,
-0.4193750321865082,
0.06588488817214966,
-0.1191064789891243,
0.02694679982960224,
0.1760430485010147,
-0.3196396827697754,
0.03795647993683815,
-0.1479686200618744,
0.39460328221321106,
-0.24780510365962982,
-0.09965687990188599,
-0.10064342617988586,
-0.15016905963420868,
0.04052730277180672,
0.1168999969959259,
-0.04097595810890198,
-0.2084076702594757,
-0.19158531725406647,
-0.2512800097465515,
0.05782434716820717,
-0.09546219557523727,
-0.08755096048116684,
-0.5335752367973328,
-0.23349951207637787,
-0.16499629616737366,
0.2940983772277832,
0.15745164453983307,
0.33466392755508423,
-0.17851665616035461,
0.24547207355499268,
0.04775957763195038,
0.24590007960796356,
0.6149808764457703,
-0.48323866724967957,
0.1547020524740219,
0.22637251019477844,
0.39312776923179626,
-0.17800158262252808,
-0.12725569307804108,
-0.16925759613513947,
0.29472672939300537,
-0.29577749967575073,
0.025988716632127762,
-0.1555343121290207,
-0.09107734262943268,
0.2631010115146637,
0.15540540218353271,
-0.12238091230392456,
-0.314981073141098,
-0.230952650308609,
-0.1793929636478424,
-0.1272861212491989,
-0.05339647829532623,
0.06357742100954056,
0.1866387128829956,
-0.3784876763820648,
0.09864716976881027,
0.14082340896129608,
0.07350759953260422,
0.2715039849281311,
0.11863487213850021,
0.22324363887310028,
0.030276885256171227,
0.19736140966415405,
0.3174017667770386,
0.2587261199951172,
0.5099822282791138,
0.5483976006507874,
-0.3618467152118683,
-0.5113286972045898,
-0.11947935074567795,
-0.11476977169513702,
0.20070751011371613,
0.06500016897916794,
-0.14221541583538055,
0.16609644889831543,
-0.05064032971858978,
0.18545973300933838,
0.09619837999343872,
0.02230874076485634,
0.4922947883605957,
0.16057683527469635,
-0.48984843492507935,
-0.5388927459716797,
0.2713586688041687,
0.03924121707677841,
-0.047840915620326996,
0.12815505266189575,
0.07973120361566544,
-0.34075772762298584,
0.2059531807899475,
-0.1559935361146927,
0.6908734440803528,
0.08379849791526794,
-0.051031067967414856,
-0.017031138762831688,
-0.2261737883090973,
0.7132229208946228,
-0.11871124804019928,
0.0007707070908509195,
-0.36142972111701965,
-0.30746591091156006,
-0.0622297003865242,
-0.022119013592600822,
0.023475833237171173,
0.450693279504776,
-0.3085799813270569,
0.37883761525154114,
-0.32851332426071167,
0.20468570291996002,
0.028749734163284302,
-0.07406040281057358,
0.2494400590658188,
-0.13231314718723297,
-0.08248622715473175,
0.2010338306427002,
-0.157619446516037,
-0.13437534868717194,
-0.16743460297584534,
0.04190531745553017,
-0.23184797167778015,
-0.2680612802505493,
-0.2262599915266037,
0.08226059377193451,
-0.25382542610168457,
0.14157956838607788,
-0.0856545940041542,
-0.016718991100788116,
0.21681223809719086,
0.2025105506181717,
0.48632127046585083,
0.0789249986410141,
-0.14828579127788544,
0.18389585614204407,
0.04215006157755852,
0.13702285289764404,
0.034348372370004654,
0.05374768748879433,
0.4150616228580475,
0.11604932695627213,
-0.26998209953308105,
0.12853087484836578,
-0.07956812530755997,
0.17594999074935913,
-0.08703093975782394,
0.08389480412006378,
-0.09839654713869095,
-0.36537453532218933,
0.032646797597408295,
-0.07703931629657745,
0.22870928049087524,
-0.25377342104911804,
0.17734603583812714,
0.051982734352350235,
-0.046680621802806854,
0.21207952499389648,
-0.2636912763118744,
-0.1465979814529419,
-0.045746877789497375,
0.18923379480838776,
0.025964440777897835,
0.19335640966892242,
0.24724486470222473,
0.025972969830036163,
-0.3513919413089752,
-0.25651127099990845,
0.038952261209487915,
0.023998193442821503,
-0.677836537361145,
0.24598251283168793,
0.2533552944660187,
0.07594631612300873,
-0.057189520448446274,
0.22326934337615967,
-0.01583010144531727,
0.0710860937833786,
0.06101401522755623,
-0.5274378061294556,
-0.2186506688594818,
-0.004670771304517984,
-0.18475456535816193,
0.11692994832992554,
0.2478654682636261,
0.4110053777694702,
0.13375762104988098,
0.07145128399133682,
-0.36415424942970276,
-0.020953631028532982,
-0.1723954677581787,
0.29801294207572937,
0.15251024067401886,
0.019961336627602577,
0.28203174471855164,
-0.17880624532699585,
0.21821677684783936,
0.0007436689338646829,
0.007750303018838167,
-0.24981854856014252,
-0.1872100830078125,
0.11241065710783005,
0.13520900905132294,
-0.19721661508083344,
-0.06341098994016647,
-0.16438139975070953,
0.057837244123220444,
-0.07198324799537659,
-0.017251547425985336,
0.31057360768318176,
0.0032079345546662807,
0.3735310733318329,
-0.1509210169315338,
0.2327837496995926,
-0.046331100165843964,
0.21827778220176697,
0.012716840021312237,
-0.11400211602449417,
0.0742448940873146,
0.172965869307518,
-0.11276409029960632,
0.01947760209441185,
-0.17507928609848022,
0.08479433506727219,
-0.11700432747602463,
-0.11793006956577301,
0.13429364562034607,
-0.5689805746078491,
0.29595574736595154,
0.19363825023174286,
0.4493623673915863,
0.2781369984149933,
-0.18682533502578735,
-0.07076655328273773,
0.38261017203330994,
0.3079267144203186,
-0.36567002534866333,
-0.16836042702198029,
0.1630018949508667,
0.1655603051185608,
0.00039057957474142313,
0.07560659199953079,
0.06072518229484558,
-0.031059913337230682,
0.04489267244935036,
0.008086458779871464,
0.45543810725212097,
-0.4376544952392578,
0.2349056452512741,
0.526982307434082,
-0.06197047978639603,
0.09998403489589691,
0.4967949390411377,
0.17317639291286469,
0.06353333592414856,
0.5881969332695007,
0.03464969992637634,
0.17732051014900208,
0.1874696910381317,
-0.13796021044254303,
-0.0754198282957077,
-0.17221663892269135,
0.18091802299022675,
0.09697161614894867,
0.01885591447353363,
-0.04283132776618004,
-0.09544814378023148,
0.30113545060157776,
-0.38394486904144287,
0.004111276473850012,
-0.005769312847405672,
0.11119753122329712,
-0.22550341486930847,
-0.10601639002561569,
-0.15626324713230133,
-0.09870889037847519,
-0.16644632816314697,
-0.19731619954109192,
0.014028764329850674,
-0.1700502634048462,
0.3556349277496338,
-0.07427991926670074,
-0.19596470892429352,
-0.4565809965133667,
-0.1867782175540924,
0.3054199516773224,
0.0650811493396759,
-0.24731001257896423,
0.016320951282978058,
0.24875697493553162,
-0.1455010026693344,
0.321377158164978,
0.08623901754617691,
0.6039392352104187,
0.17137522995471954,
0.08979114890098572,
-0.34109216928482056,
-0.0972946435213089,
-0.08858039230108261,
0.15166358649730682,
0.21556773781776428,
0.045920465141534805,
-0.0368347093462944,
0.3922654688358307,
0.20187810063362122,
-0.17074967920780182,
0.3085801601409912,
0.3357427418231964,
0.2227049469947815,
-0.17061901092529297,
-0.06306669861078262,
-0.13396593928337097,
-0.25735533237457275,
-0.326639860868454,
0.10131919384002686,
-0.2697952091693878,
0.11595847457647324,
0.4622557461261749,
-0.04151396453380585,
0.08408986032009125,
-0.2942304313182831,
0.1462799608707428,
0.13171051442623138,
0.3118909001350403,
0.2739439308643341,
-0.047624342143535614,
-0.3456515669822693,
0.1615709662437439,
-0.5773788690567017,
0.12946052849292755,
-0.11869868636131287,
-0.1146918311715126,
-0.033454060554504395,
-0.1582234650850296,
0.1593203991651535,
0.02061443030834198,
0.3829503357410431,
0.188819020986557,
-0.015939809381961823,
-0.10867707431316376,
-0.11951394379138947,
-0.19319775700569153,
-0.08259972184896469,
-0.12190037965774536,
0.2010166347026825,
-0.32269033789634705,
-0.0618353970348835,
-0.14577741920948029,
0.038975734263658524,
-0.3498097360134125,
0.09371393173933029,
0.10629752278327942,
-0.020190004259347916,
0.3603176176548004,
0.1459478884935379,
0.76997309923172,
0.04881463944911957,
0.11503157764673233,
-0.09138646721839905,
-0.3536492884159088,
-0.404243141412735,
0.3688684403896332,
0.32559195160865784,
0.2565366327762604,
-0.10637769103050232,
0.009763806127011776,
-0.16448292136192322,
0.09450692683458328,
-0.043546468019485474,
0.32114776968955994,
-0.25447577238082886,
0.214504212141037,
-0.02401093952357769,
0.017140327021479607,
0.09913210570812225,
-0.05562606453895569,
-0.002646812703460455,
0.34105435013771057,
-0.20675647258758545,
-0.604709804058075,
0.619809627532959,
-0.2129315733909607,
-0.23955516517162323,
0.15372981131076813,
0.1545255184173584,
0.22137881815433502,
-0.21874772012233734,
-0.510052502155304,
0.024750813841819763,
0.37738266587257385,
0.019003426656126976,
-0.4423443675041199,
-0.003706148359924555,
-0.19275695085525513,
0.05144556239247322,
0.11356013268232346,
0.30625367164611816,
0.11662862449884415,
-0.19328555464744568,
0.19910407066345215,
-0.25434643030166626
] |
https://github.com/huggingface/datasets/issues/1989
|
Question/problem with dataset labels
|
Not sure if this helps, this is how I load my files (as in the sample scripts on transformers):
```
if data_args.train_file.endswith(".csv"):
# Loading a dataset from local csv files
datasets = load_dataset("csv", data_files=data_files)
```
|
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
| 35
|
Question/problem with dataset labels
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
Not sure if this helps, this is how I load my files (as in the sample scripts on transformers):
```
if data_args.train_file.endswith(".csv"):
# Loading a dataset from local csv files
datasets = load_dataset("csv", data_files=data_files)
```
|
[
0.17891347408294678,
-0.05732341110706329,
0.005179154220968485,
0.13436773419380188,
0.41135331988334656,
0.3502122461795807,
0.6419939398765564,
0.1637083739042282,
-0.16131801903247833,
0.07234936207532883,
0.17885370552539825,
0.06387592107057571,
-0.06077335402369499,
0.030525799840688705,
-0.13023114204406738,
-0.11937106400728226,
0.08908423036336899,
0.173479363322258,
0.18164248764514923,
-0.044466327875852585,
-0.2867426872253418,
-0.03982604295015335,
-0.15668001770973206,
0.36628860235214233,
-0.2972058057785034,
-0.3766840398311615,
0.21054299175739288,
-0.12052856385707855,
-0.11313280463218689,
-0.4633955657482147,
0.27180957794189453,
0.08612103015184402,
0.0026813640724867582,
0.40342751145362854,
-0.00010309632489224896,
0.05875691398978233,
0.29674792289733887,
0.15598881244659424,
-0.3984077572822571,
-0.4321288764476776,
-0.18936008214950562,
-0.02340724691748619,
0.034564148634672165,
-0.3044775724411011,
0.09798295050859451,
-0.28466835618019104,
-0.09054138511419296,
-0.27566608786582947,
0.10468693822622299,
0.4386066496372223,
0.32663995027542114,
0.23734048008918762,
-0.20649951696395874,
-0.2293027937412262,
0.2311529964208603,
0.12508909404277802,
-0.030508195981383324,
0.049476899206638336,
-0.1344391107559204,
-0.006456918548792601,
0.45157045125961304,
0.46091440320014954,
-0.2723958492279053,
0.264771431684494,
0.1353634148836136,
0.14636319875717163,
0.13772615790367126,
-0.391048789024353,
0.2763097286224365,
0.1961430460214615,
0.7452602386474609,
-0.29649990797042847,
-0.29439058899879456,
-0.1697036474943161,
0.1373763233423233,
-0.4167192876338959,
0.18133871257305145,
0.07008437067270279,
0.006375445984303951,
-0.047014687210321426,
-0.03316255286335945,
0.06102658808231354,
0.08074173331260681,
0.0881802961230278,
-0.05807413160800934,
0.03832928463816643,
-0.0986412912607193,
0.32881712913513184,
0.1125299260020256,
-0.07475035637617111,
0.2975311279296875,
-0.005993981380015612,
-0.08857189118862152,
0.041545283049345016,
-0.4325246512889862,
-0.029609162360429764,
-0.03688126802444458,
0.05167559161782265,
-0.11813832819461823,
-0.03874027729034424,
0.01838638447225094,
-0.37495556473731995,
-0.14743423461914062,
0.34034523367881775,
0.21513402462005615,
0.2662767469882965,
0.27069926261901855,
0.5616875886917114,
0.0911722481250763,
-0.07616250216960907,
0.03080311231315136,
-0.0558072105050087,
-0.0015746225835755467,
-0.46264347434043884,
0.2433207631111145,
0.09893110394477844,
0.29347071051597595,
-0.23985809087753296,
-0.5455209612846375,
0.19244229793548584,
-0.028102025389671326,
0.09409462660551071,
0.15411771833896637,
0.3049507737159729,
0.022121448069810867,
0.20651715993881226,
0.07934725284576416,
0.19360817968845367,
-0.00917017925530672,
-0.11720465868711472,
-0.20692431926727295,
0.09760840982198715,
-0.20027866959571838,
-0.15010692179203033,
0.05026973783969879,
-0.07205360382795334,
0.11245013773441315,
0.0640593096613884,
-0.0010052787838503718,
-0.07605742663145065,
-0.01630275882780552,
-0.3864647448062897,
-0.01274816133081913,
0.3588937819004059,
-0.10326281189918518,
0.420350581407547,
0.2520546317100525,
-0.41855016350746155,
0.05969962105154991,
0.18021129071712494,
-0.36885228753089905,
-0.033813633024692535,
-0.21215848624706268,
0.28621235489845276,
-0.10304412245750427,
-0.18798039853572845,
-0.12009236216545105,
0.046823322772979736,
0.4193205237388611,
-0.21455369889736176,
0.15758994221687317,
-0.3543834090232849,
-0.30932241678237915,
-0.27777037024497986,
-0.06630374491214752,
0.22143235802650452,
-0.672246515750885,
0.004389484412968159,
-0.14754599332809448,
-0.02911343239247799,
0.05280744656920433,
0.29601913690567017,
-0.08100432902574539,
0.2062923014163971,
-0.07059221714735031,
0.030349209904670715,
0.13955312967300415,
-0.3906913101673126,
-0.11046354472637177,
0.10354441404342651,
-0.14200283586978912,
-0.24426479637622833,
0.07048094272613525,
-0.040339983999729156,
0.09173159301280975,
-0.0916256308555603,
0.05823083594441414,
-0.1318773776292801,
-0.19963160157203674,
-0.09513296186923981,
-0.1437045931816101,
0.0538102351129055,
0.6539096832275391,
0.09273272007703781,
-0.016799816861748695,
0.07564713805913925,
-0.10022789984941483,
-0.3448372781276703,
-0.042531568557024,
-0.1009543389081955,
0.20621949434280396,
0.21479029953479767,
0.055640604346990585,
0.2983594834804535,
0.1459522396326065,
-0.06447069346904755,
-0.4424961805343628,
0.10170096158981323,
-0.04005378112196922,
0.13956496119499207,
-0.14514334499835968,
-0.19234369695186615,
-0.3297654986381531,
-0.05378612130880356,
-0.20797739923000336,
0.01832341030240059,
0.16331322491168976,
0.06836050748825073,
-0.22142063081264496,
-0.020482944324612617,
0.014084731228649616,
-0.07588552683591843,
-0.017213372513651848,
0.10933033376932144,
-0.10402482002973557,
0.26565271615982056,
-0.09511733055114746,
0.1168939396739006,
-0.026739396154880524,
0.25311946868896484,
0.43260639905929565,
0.24005112051963806,
-0.046622101217508316,
0.36702385544776917,
0.0848604291677475,
-0.3270232081413269,
0.007840029895305634,
-0.1726589947938919,
0.018129581585526466,
-0.08387529104948044,
-0.0163266621530056,
0.11452510952949524,
0.27684012055397034,
-0.10859706997871399,
-0.08471912145614624,
0.14118549227714539,
-0.17720016837120056,
0.2762838900089264,
-0.16197457909584045,
0.20046067237854004,
0.25996318459510803,
-0.10939249396324158,
0.1251230537891388,
-0.2127114236354828,
0.21588031947612762,
-0.12979799509048462,
0.23431450128555298,
0.0071422988548874855,
-0.2617172598838806,
0.06771795451641083,
0.4220546782016754,
0.0015312841860577464,
-0.0035242880694568157,
0.009774230420589447,
-0.15866822004318237,
0.16574595868587494,
-0.013017691671848297,
0.595718264579773,
0.35284286737442017,
0.205955371260643,
-0.16387644410133362,
-0.058268580585718155,
-0.26225870847702026,
-0.13698343932628632,
0.21246269345283508,
0.09510132670402527,
0.029852598905563354,
0.05729620158672333,
0.02610979974269867,
-0.06643904745578766,
-0.17657293379306793,
-0.2433391660451889,
0.20823147892951965,
0.34643009305000305,
-0.5103117227554321,
-0.002906450070440769,
-0.34527212381362915,
-0.23186378180980682,
-0.31859782338142395,
-0.09879127889871597,
-0.23515866696834564,
-0.45904380083084106,
0.09043732285499573,
-0.07749122381210327,
-0.19039256870746613,
0.14507734775543213,
-0.037563350051641464,
0.00791588518768549,
-0.09107247740030289,
0.15205179154872894,
-0.09758404642343521,
-0.4702501893043518,
-0.20457129180431366,
0.18111225962638855,
0.007480352185666561,
0.04695437476038933,
0.4813607335090637,
-0.143199160695076,
-0.12455568462610245,
-0.07857241481542587,
-0.2953171133995056,
0.004026900511234999,
-0.2730652093887329,
0.13660450279712677,
0.1816229671239853,
0.10386001318693161,
0.008461100049316883,
-0.14868579804897308,
0.29301661252975464,
-0.07151931524276733,
0.024639904499053955,
0.10695718973875046,
0.045232538133859634,
-0.29207393527030945,
-0.26646947860717773,
-0.4750193655490875,
-0.47453048825263977,
-0.17748217284679413,
0.06694815307855606,
-0.07590755075216293,
-0.03352787345647812,
0.5198022127151489,
0.06844227761030197,
0.06568092852830887,
0.09314426779747009,
0.023253191262483597,
-0.34674328565597534,
-0.09354142844676971,
0.24904774129390717,
-0.17909251153469086,
-0.2102450281381607,
0.19605785608291626,
0.109309121966362,
0.11752880364656448,
-0.20393434166908264,
-0.3139221668243408,
0.07286331057548523,
-0.05760190263390541,
0.05894489958882332,
0.08131010830402374,
0.1948966234922409,
0.2138824611902237,
0.26710304617881775,
-0.14800302684307098,
-0.32705044746398926,
-0.3317107558250427,
0.13817375898361206,
-0.07196798175573349,
0.1306353658437729,
-0.10625556856393814,
0.29408565163612366,
-0.15208472311496735,
0.3265087604522705,
0.021773260086774826,
-0.2126564383506775,
0.19188947975635529,
-0.04784756898880005,
0.5207315683364868,
0.06838033348321915,
-0.4193750321865082,
0.06588488817214966,
-0.1191064789891243,
0.02694679982960224,
0.1760430485010147,
-0.3196396827697754,
0.03795647993683815,
-0.1479686200618744,
0.39460328221321106,
-0.24780510365962982,
-0.09965687990188599,
-0.10064342617988586,
-0.15016905963420868,
0.04052730277180672,
0.1168999969959259,
-0.04097595810890198,
-0.2084076702594757,
-0.19158531725406647,
-0.2512800097465515,
0.05782434716820717,
-0.09546219557523727,
-0.08755096048116684,
-0.5335752367973328,
-0.23349951207637787,
-0.16499629616737366,
0.2940983772277832,
0.15745164453983307,
0.33466392755508423,
-0.17851665616035461,
0.24547207355499268,
0.04775957763195038,
0.24590007960796356,
0.6149808764457703,
-0.48323866724967957,
0.1547020524740219,
0.22637251019477844,
0.39312776923179626,
-0.17800158262252808,
-0.12725569307804108,
-0.16925759613513947,
0.29472672939300537,
-0.29577749967575073,
0.025988716632127762,
-0.1555343121290207,
-0.09107734262943268,
0.2631010115146637,
0.15540540218353271,
-0.12238091230392456,
-0.314981073141098,
-0.230952650308609,
-0.1793929636478424,
-0.1272861212491989,
-0.05339647829532623,
0.06357742100954056,
0.1866387128829956,
-0.3784876763820648,
0.09864716976881027,
0.14082340896129608,
0.07350759953260422,
0.2715039849281311,
0.11863487213850021,
0.22324363887310028,
0.030276885256171227,
0.19736140966415405,
0.3174017667770386,
0.2587261199951172,
0.5099822282791138,
0.5483976006507874,
-0.3618467152118683,
-0.5113286972045898,
-0.11947935074567795,
-0.11476977169513702,
0.20070751011371613,
0.06500016897916794,
-0.14221541583538055,
0.16609644889831543,
-0.05064032971858978,
0.18545973300933838,
0.09619837999343872,
0.02230874076485634,
0.4922947883605957,
0.16057683527469635,
-0.48984843492507935,
-0.5388927459716797,
0.2713586688041687,
0.03924121707677841,
-0.047840915620326996,
0.12815505266189575,
0.07973120361566544,
-0.34075772762298584,
0.2059531807899475,
-0.1559935361146927,
0.6908734440803528,
0.08379849791526794,
-0.051031067967414856,
-0.017031138762831688,
-0.2261737883090973,
0.7132229208946228,
-0.11871124804019928,
0.0007707070908509195,
-0.36142972111701965,
-0.30746591091156006,
-0.0622297003865242,
-0.022119013592600822,
0.023475833237171173,
0.450693279504776,
-0.3085799813270569,
0.37883761525154114,
-0.32851332426071167,
0.20468570291996002,
0.028749734163284302,
-0.07406040281057358,
0.2494400590658188,
-0.13231314718723297,
-0.08248622715473175,
0.2010338306427002,
-0.157619446516037,
-0.13437534868717194,
-0.16743460297584534,
0.04190531745553017,
-0.23184797167778015,
-0.2680612802505493,
-0.2262599915266037,
0.08226059377193451,
-0.25382542610168457,
0.14157956838607788,
-0.0856545940041542,
-0.016718991100788116,
0.21681223809719086,
0.2025105506181717,
0.48632127046585083,
0.0789249986410141,
-0.14828579127788544,
0.18389585614204407,
0.04215006157755852,
0.13702285289764404,
0.034348372370004654,
0.05374768748879433,
0.4150616228580475,
0.11604932695627213,
-0.26998209953308105,
0.12853087484836578,
-0.07956812530755997,
0.17594999074935913,
-0.08703093975782394,
0.08389480412006378,
-0.09839654713869095,
-0.36537453532218933,
0.032646797597408295,
-0.07703931629657745,
0.22870928049087524,
-0.25377342104911804,
0.17734603583812714,
0.051982734352350235,
-0.046680621802806854,
0.21207952499389648,
-0.2636912763118744,
-0.1465979814529419,
-0.045746877789497375,
0.18923379480838776,
0.025964440777897835,
0.19335640966892242,
0.24724486470222473,
0.025972969830036163,
-0.3513919413089752,
-0.25651127099990845,
0.038952261209487915,
0.023998193442821503,
-0.677836537361145,
0.24598251283168793,
0.2533552944660187,
0.07594631612300873,
-0.057189520448446274,
0.22326934337615967,
-0.01583010144531727,
0.0710860937833786,
0.06101401522755623,
-0.5274378061294556,
-0.2186506688594818,
-0.004670771304517984,
-0.18475456535816193,
0.11692994832992554,
0.2478654682636261,
0.4110053777694702,
0.13375762104988098,
0.07145128399133682,
-0.36415424942970276,
-0.020953631028532982,
-0.1723954677581787,
0.29801294207572937,
0.15251024067401886,
0.019961336627602577,
0.28203174471855164,
-0.17880624532699585,
0.21821677684783936,
0.0007436689338646829,
0.007750303018838167,
-0.24981854856014252,
-0.1872100830078125,
0.11241065710783005,
0.13520900905132294,
-0.19721661508083344,
-0.06341098994016647,
-0.16438139975070953,
0.057837244123220444,
-0.07198324799537659,
-0.017251547425985336,
0.31057360768318176,
0.0032079345546662807,
0.3735310733318329,
-0.1509210169315338,
0.2327837496995926,
-0.046331100165843964,
0.21827778220176697,
0.012716840021312237,
-0.11400211602449417,
0.0742448940873146,
0.172965869307518,
-0.11276409029960632,
0.01947760209441185,
-0.17507928609848022,
0.08479433506727219,
-0.11700432747602463,
-0.11793006956577301,
0.13429364562034607,
-0.5689805746078491,
0.29595574736595154,
0.19363825023174286,
0.4493623673915863,
0.2781369984149933,
-0.18682533502578735,
-0.07076655328273773,
0.38261017203330994,
0.3079267144203186,
-0.36567002534866333,
-0.16836042702198029,
0.1630018949508667,
0.1655603051185608,
0.00039057957474142313,
0.07560659199953079,
0.06072518229484558,
-0.031059913337230682,
0.04489267244935036,
0.008086458779871464,
0.45543810725212097,
-0.4376544952392578,
0.2349056452512741,
0.526982307434082,
-0.06197047978639603,
0.09998403489589691,
0.4967949390411377,
0.17317639291286469,
0.06353333592414856,
0.5881969332695007,
0.03464969992637634,
0.17732051014900208,
0.1874696910381317,
-0.13796021044254303,
-0.0754198282957077,
-0.17221663892269135,
0.18091802299022675,
0.09697161614894867,
0.01885591447353363,
-0.04283132776618004,
-0.09544814378023148,
0.30113545060157776,
-0.38394486904144287,
0.004111276473850012,
-0.005769312847405672,
0.11119753122329712,
-0.22550341486930847,
-0.10601639002561569,
-0.15626324713230133,
-0.09870889037847519,
-0.16644632816314697,
-0.19731619954109192,
0.014028764329850674,
-0.1700502634048462,
0.3556349277496338,
-0.07427991926670074,
-0.19596470892429352,
-0.4565809965133667,
-0.1867782175540924,
0.3054199516773224,
0.0650811493396759,
-0.24731001257896423,
0.016320951282978058,
0.24875697493553162,
-0.1455010026693344,
0.321377158164978,
0.08623901754617691,
0.6039392352104187,
0.17137522995471954,
0.08979114890098572,
-0.34109216928482056,
-0.0972946435213089,
-0.08858039230108261,
0.15166358649730682,
0.21556773781776428,
0.045920465141534805,
-0.0368347093462944,
0.3922654688358307,
0.20187810063362122,
-0.17074967920780182,
0.3085801601409912,
0.3357427418231964,
0.2227049469947815,
-0.17061901092529297,
-0.06306669861078262,
-0.13396593928337097,
-0.25735533237457275,
-0.326639860868454,
0.10131919384002686,
-0.2697952091693878,
0.11595847457647324,
0.4622557461261749,
-0.04151396453380585,
0.08408986032009125,
-0.2942304313182831,
0.1462799608707428,
0.13171051442623138,
0.3118909001350403,
0.2739439308643341,
-0.047624342143535614,
-0.3456515669822693,
0.1615709662437439,
-0.5773788690567017,
0.12946052849292755,
-0.11869868636131287,
-0.1146918311715126,
-0.033454060554504395,
-0.1582234650850296,
0.1593203991651535,
0.02061443030834198,
0.3829503357410431,
0.188819020986557,
-0.015939809381961823,
-0.10867707431316376,
-0.11951394379138947,
-0.19319775700569153,
-0.08259972184896469,
-0.12190037965774536,
0.2010166347026825,
-0.32269033789634705,
-0.0618353970348835,
-0.14577741920948029,
0.038975734263658524,
-0.3498097360134125,
0.09371393173933029,
0.10629752278327942,
-0.020190004259347916,
0.3603176176548004,
0.1459478884935379,
0.76997309923172,
0.04881463944911957,
0.11503157764673233,
-0.09138646721839905,
-0.3536492884159088,
-0.404243141412735,
0.3688684403896332,
0.32559195160865784,
0.2565366327762604,
-0.10637769103050232,
0.009763806127011776,
-0.16448292136192322,
0.09450692683458328,
-0.043546468019485474,
0.32114776968955994,
-0.25447577238082886,
0.214504212141037,
-0.02401093952357769,
0.017140327021479607,
0.09913210570812225,
-0.05562606453895569,
-0.002646812703460455,
0.34105435013771057,
-0.20675647258758545,
-0.604709804058075,
0.619809627532959,
-0.2129315733909607,
-0.23955516517162323,
0.15372981131076813,
0.1545255184173584,
0.22137881815433502,
-0.21874772012233734,
-0.510052502155304,
0.024750813841819763,
0.37738266587257385,
0.019003426656126976,
-0.4423443675041199,
-0.003706148359924555,
-0.19275695085525513,
0.05144556239247322,
0.11356013268232346,
0.30625367164611816,
0.11662862449884415,
-0.19328555464744568,
0.19910407066345215,
-0.25434643030166626
] |
https://github.com/huggingface/datasets/issues/1989
|
Question/problem with dataset labels
|
Since this worked out of the box in a few examples before, I wonder if it's some quoting issue or something else.
|
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
| 22
|
Question/problem with dataset labels
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
Since this worked out of the box in a few examples before, I wonder if it's some quoting issue or something else.
|
[
0.17891347408294678,
-0.05732341110706329,
0.005179154220968485,
0.13436773419380188,
0.41135331988334656,
0.3502122461795807,
0.6419939398765564,
0.1637083739042282,
-0.16131801903247833,
0.07234936207532883,
0.17885370552539825,
0.06387592107057571,
-0.06077335402369499,
0.030525799840688705,
-0.13023114204406738,
-0.11937106400728226,
0.08908423036336899,
0.173479363322258,
0.18164248764514923,
-0.044466327875852585,
-0.2867426872253418,
-0.03982604295015335,
-0.15668001770973206,
0.36628860235214233,
-0.2972058057785034,
-0.3766840398311615,
0.21054299175739288,
-0.12052856385707855,
-0.11313280463218689,
-0.4633955657482147,
0.27180957794189453,
0.08612103015184402,
0.0026813640724867582,
0.40342751145362854,
-0.00010309632489224896,
0.05875691398978233,
0.29674792289733887,
0.15598881244659424,
-0.3984077572822571,
-0.4321288764476776,
-0.18936008214950562,
-0.02340724691748619,
0.034564148634672165,
-0.3044775724411011,
0.09798295050859451,
-0.28466835618019104,
-0.09054138511419296,
-0.27566608786582947,
0.10468693822622299,
0.4386066496372223,
0.32663995027542114,
0.23734048008918762,
-0.20649951696395874,
-0.2293027937412262,
0.2311529964208603,
0.12508909404277802,
-0.030508195981383324,
0.049476899206638336,
-0.1344391107559204,
-0.006456918548792601,
0.45157045125961304,
0.46091440320014954,
-0.2723958492279053,
0.264771431684494,
0.1353634148836136,
0.14636319875717163,
0.13772615790367126,
-0.391048789024353,
0.2763097286224365,
0.1961430460214615,
0.7452602386474609,
-0.29649990797042847,
-0.29439058899879456,
-0.1697036474943161,
0.1373763233423233,
-0.4167192876338959,
0.18133871257305145,
0.07008437067270279,
0.006375445984303951,
-0.047014687210321426,
-0.03316255286335945,
0.06102658808231354,
0.08074173331260681,
0.0881802961230278,
-0.05807413160800934,
0.03832928463816643,
-0.0986412912607193,
0.32881712913513184,
0.1125299260020256,
-0.07475035637617111,
0.2975311279296875,
-0.005993981380015612,
-0.08857189118862152,
0.041545283049345016,
-0.4325246512889862,
-0.029609162360429764,
-0.03688126802444458,
0.05167559161782265,
-0.11813832819461823,
-0.03874027729034424,
0.01838638447225094,
-0.37495556473731995,
-0.14743423461914062,
0.34034523367881775,
0.21513402462005615,
0.2662767469882965,
0.27069926261901855,
0.5616875886917114,
0.0911722481250763,
-0.07616250216960907,
0.03080311231315136,
-0.0558072105050087,
-0.0015746225835755467,
-0.46264347434043884,
0.2433207631111145,
0.09893110394477844,
0.29347071051597595,
-0.23985809087753296,
-0.5455209612846375,
0.19244229793548584,
-0.028102025389671326,
0.09409462660551071,
0.15411771833896637,
0.3049507737159729,
0.022121448069810867,
0.20651715993881226,
0.07934725284576416,
0.19360817968845367,
-0.00917017925530672,
-0.11720465868711472,
-0.20692431926727295,
0.09760840982198715,
-0.20027866959571838,
-0.15010692179203033,
0.05026973783969879,
-0.07205360382795334,
0.11245013773441315,
0.0640593096613884,
-0.0010052787838503718,
-0.07605742663145065,
-0.01630275882780552,
-0.3864647448062897,
-0.01274816133081913,
0.3588937819004059,
-0.10326281189918518,
0.420350581407547,
0.2520546317100525,
-0.41855016350746155,
0.05969962105154991,
0.18021129071712494,
-0.36885228753089905,
-0.033813633024692535,
-0.21215848624706268,
0.28621235489845276,
-0.10304412245750427,
-0.18798039853572845,
-0.12009236216545105,
0.046823322772979736,
0.4193205237388611,
-0.21455369889736176,
0.15758994221687317,
-0.3543834090232849,
-0.30932241678237915,
-0.27777037024497986,
-0.06630374491214752,
0.22143235802650452,
-0.672246515750885,
0.004389484412968159,
-0.14754599332809448,
-0.02911343239247799,
0.05280744656920433,
0.29601913690567017,
-0.08100432902574539,
0.2062923014163971,
-0.07059221714735031,
0.030349209904670715,
0.13955312967300415,
-0.3906913101673126,
-0.11046354472637177,
0.10354441404342651,
-0.14200283586978912,
-0.24426479637622833,
0.07048094272613525,
-0.040339983999729156,
0.09173159301280975,
-0.0916256308555603,
0.05823083594441414,
-0.1318773776292801,
-0.19963160157203674,
-0.09513296186923981,
-0.1437045931816101,
0.0538102351129055,
0.6539096832275391,
0.09273272007703781,
-0.016799816861748695,
0.07564713805913925,
-0.10022789984941483,
-0.3448372781276703,
-0.042531568557024,
-0.1009543389081955,
0.20621949434280396,
0.21479029953479767,
0.055640604346990585,
0.2983594834804535,
0.1459522396326065,
-0.06447069346904755,
-0.4424961805343628,
0.10170096158981323,
-0.04005378112196922,
0.13956496119499207,
-0.14514334499835968,
-0.19234369695186615,
-0.3297654986381531,
-0.05378612130880356,
-0.20797739923000336,
0.01832341030240059,
0.16331322491168976,
0.06836050748825073,
-0.22142063081264496,
-0.020482944324612617,
0.014084731228649616,
-0.07588552683591843,
-0.017213372513651848,
0.10933033376932144,
-0.10402482002973557,
0.26565271615982056,
-0.09511733055114746,
0.1168939396739006,
-0.026739396154880524,
0.25311946868896484,
0.43260639905929565,
0.24005112051963806,
-0.046622101217508316,
0.36702385544776917,
0.0848604291677475,
-0.3270232081413269,
0.007840029895305634,
-0.1726589947938919,
0.018129581585526466,
-0.08387529104948044,
-0.0163266621530056,
0.11452510952949524,
0.27684012055397034,
-0.10859706997871399,
-0.08471912145614624,
0.14118549227714539,
-0.17720016837120056,
0.2762838900089264,
-0.16197457909584045,
0.20046067237854004,
0.25996318459510803,
-0.10939249396324158,
0.1251230537891388,
-0.2127114236354828,
0.21588031947612762,
-0.12979799509048462,
0.23431450128555298,
0.0071422988548874855,
-0.2617172598838806,
0.06771795451641083,
0.4220546782016754,
0.0015312841860577464,
-0.0035242880694568157,
0.009774230420589447,
-0.15866822004318237,
0.16574595868587494,
-0.013017691671848297,
0.595718264579773,
0.35284286737442017,
0.205955371260643,
-0.16387644410133362,
-0.058268580585718155,
-0.26225870847702026,
-0.13698343932628632,
0.21246269345283508,
0.09510132670402527,
0.029852598905563354,
0.05729620158672333,
0.02610979974269867,
-0.06643904745578766,
-0.17657293379306793,
-0.2433391660451889,
0.20823147892951965,
0.34643009305000305,
-0.5103117227554321,
-0.002906450070440769,
-0.34527212381362915,
-0.23186378180980682,
-0.31859782338142395,
-0.09879127889871597,
-0.23515866696834564,
-0.45904380083084106,
0.09043732285499573,
-0.07749122381210327,
-0.19039256870746613,
0.14507734775543213,
-0.037563350051641464,
0.00791588518768549,
-0.09107247740030289,
0.15205179154872894,
-0.09758404642343521,
-0.4702501893043518,
-0.20457129180431366,
0.18111225962638855,
0.007480352185666561,
0.04695437476038933,
0.4813607335090637,
-0.143199160695076,
-0.12455568462610245,
-0.07857241481542587,
-0.2953171133995056,
0.004026900511234999,
-0.2730652093887329,
0.13660450279712677,
0.1816229671239853,
0.10386001318693161,
0.008461100049316883,
-0.14868579804897308,
0.29301661252975464,
-0.07151931524276733,
0.024639904499053955,
0.10695718973875046,
0.045232538133859634,
-0.29207393527030945,
-0.26646947860717773,
-0.4750193655490875,
-0.47453048825263977,
-0.17748217284679413,
0.06694815307855606,
-0.07590755075216293,
-0.03352787345647812,
0.5198022127151489,
0.06844227761030197,
0.06568092852830887,
0.09314426779747009,
0.023253191262483597,
-0.34674328565597534,
-0.09354142844676971,
0.24904774129390717,
-0.17909251153469086,
-0.2102450281381607,
0.19605785608291626,
0.109309121966362,
0.11752880364656448,
-0.20393434166908264,
-0.3139221668243408,
0.07286331057548523,
-0.05760190263390541,
0.05894489958882332,
0.08131010830402374,
0.1948966234922409,
0.2138824611902237,
0.26710304617881775,
-0.14800302684307098,
-0.32705044746398926,
-0.3317107558250427,
0.13817375898361206,
-0.07196798175573349,
0.1306353658437729,
-0.10625556856393814,
0.29408565163612366,
-0.15208472311496735,
0.3265087604522705,
0.021773260086774826,
-0.2126564383506775,
0.19188947975635529,
-0.04784756898880005,
0.5207315683364868,
0.06838033348321915,
-0.4193750321865082,
0.06588488817214966,
-0.1191064789891243,
0.02694679982960224,
0.1760430485010147,
-0.3196396827697754,
0.03795647993683815,
-0.1479686200618744,
0.39460328221321106,
-0.24780510365962982,
-0.09965687990188599,
-0.10064342617988586,
-0.15016905963420868,
0.04052730277180672,
0.1168999969959259,
-0.04097595810890198,
-0.2084076702594757,
-0.19158531725406647,
-0.2512800097465515,
0.05782434716820717,
-0.09546219557523727,
-0.08755096048116684,
-0.5335752367973328,
-0.23349951207637787,
-0.16499629616737366,
0.2940983772277832,
0.15745164453983307,
0.33466392755508423,
-0.17851665616035461,
0.24547207355499268,
0.04775957763195038,
0.24590007960796356,
0.6149808764457703,
-0.48323866724967957,
0.1547020524740219,
0.22637251019477844,
0.39312776923179626,
-0.17800158262252808,
-0.12725569307804108,
-0.16925759613513947,
0.29472672939300537,
-0.29577749967575073,
0.025988716632127762,
-0.1555343121290207,
-0.09107734262943268,
0.2631010115146637,
0.15540540218353271,
-0.12238091230392456,
-0.314981073141098,
-0.230952650308609,
-0.1793929636478424,
-0.1272861212491989,
-0.05339647829532623,
0.06357742100954056,
0.1866387128829956,
-0.3784876763820648,
0.09864716976881027,
0.14082340896129608,
0.07350759953260422,
0.2715039849281311,
0.11863487213850021,
0.22324363887310028,
0.030276885256171227,
0.19736140966415405,
0.3174017667770386,
0.2587261199951172,
0.5099822282791138,
0.5483976006507874,
-0.3618467152118683,
-0.5113286972045898,
-0.11947935074567795,
-0.11476977169513702,
0.20070751011371613,
0.06500016897916794,
-0.14221541583538055,
0.16609644889831543,
-0.05064032971858978,
0.18545973300933838,
0.09619837999343872,
0.02230874076485634,
0.4922947883605957,
0.16057683527469635,
-0.48984843492507935,
-0.5388927459716797,
0.2713586688041687,
0.03924121707677841,
-0.047840915620326996,
0.12815505266189575,
0.07973120361566544,
-0.34075772762298584,
0.2059531807899475,
-0.1559935361146927,
0.6908734440803528,
0.08379849791526794,
-0.051031067967414856,
-0.017031138762831688,
-0.2261737883090973,
0.7132229208946228,
-0.11871124804019928,
0.0007707070908509195,
-0.36142972111701965,
-0.30746591091156006,
-0.0622297003865242,
-0.022119013592600822,
0.023475833237171173,
0.450693279504776,
-0.3085799813270569,
0.37883761525154114,
-0.32851332426071167,
0.20468570291996002,
0.028749734163284302,
-0.07406040281057358,
0.2494400590658188,
-0.13231314718723297,
-0.08248622715473175,
0.2010338306427002,
-0.157619446516037,
-0.13437534868717194,
-0.16743460297584534,
0.04190531745553017,
-0.23184797167778015,
-0.2680612802505493,
-0.2262599915266037,
0.08226059377193451,
-0.25382542610168457,
0.14157956838607788,
-0.0856545940041542,
-0.016718991100788116,
0.21681223809719086,
0.2025105506181717,
0.48632127046585083,
0.0789249986410141,
-0.14828579127788544,
0.18389585614204407,
0.04215006157755852,
0.13702285289764404,
0.034348372370004654,
0.05374768748879433,
0.4150616228580475,
0.11604932695627213,
-0.26998209953308105,
0.12853087484836578,
-0.07956812530755997,
0.17594999074935913,
-0.08703093975782394,
0.08389480412006378,
-0.09839654713869095,
-0.36537453532218933,
0.032646797597408295,
-0.07703931629657745,
0.22870928049087524,
-0.25377342104911804,
0.17734603583812714,
0.051982734352350235,
-0.046680621802806854,
0.21207952499389648,
-0.2636912763118744,
-0.1465979814529419,
-0.045746877789497375,
0.18923379480838776,
0.025964440777897835,
0.19335640966892242,
0.24724486470222473,
0.025972969830036163,
-0.3513919413089752,
-0.25651127099990845,
0.038952261209487915,
0.023998193442821503,
-0.677836537361145,
0.24598251283168793,
0.2533552944660187,
0.07594631612300873,
-0.057189520448446274,
0.22326934337615967,
-0.01583010144531727,
0.0710860937833786,
0.06101401522755623,
-0.5274378061294556,
-0.2186506688594818,
-0.004670771304517984,
-0.18475456535816193,
0.11692994832992554,
0.2478654682636261,
0.4110053777694702,
0.13375762104988098,
0.07145128399133682,
-0.36415424942970276,
-0.020953631028532982,
-0.1723954677581787,
0.29801294207572937,
0.15251024067401886,
0.019961336627602577,
0.28203174471855164,
-0.17880624532699585,
0.21821677684783936,
0.0007436689338646829,
0.007750303018838167,
-0.24981854856014252,
-0.1872100830078125,
0.11241065710783005,
0.13520900905132294,
-0.19721661508083344,
-0.06341098994016647,
-0.16438139975070953,
0.057837244123220444,
-0.07198324799537659,
-0.017251547425985336,
0.31057360768318176,
0.0032079345546662807,
0.3735310733318329,
-0.1509210169315338,
0.2327837496995926,
-0.046331100165843964,
0.21827778220176697,
0.012716840021312237,
-0.11400211602449417,
0.0742448940873146,
0.172965869307518,
-0.11276409029960632,
0.01947760209441185,
-0.17507928609848022,
0.08479433506727219,
-0.11700432747602463,
-0.11793006956577301,
0.13429364562034607,
-0.5689805746078491,
0.29595574736595154,
0.19363825023174286,
0.4493623673915863,
0.2781369984149933,
-0.18682533502578735,
-0.07076655328273773,
0.38261017203330994,
0.3079267144203186,
-0.36567002534866333,
-0.16836042702198029,
0.1630018949508667,
0.1655603051185608,
0.00039057957474142313,
0.07560659199953079,
0.06072518229484558,
-0.031059913337230682,
0.04489267244935036,
0.008086458779871464,
0.45543810725212097,
-0.4376544952392578,
0.2349056452512741,
0.526982307434082,
-0.06197047978639603,
0.09998403489589691,
0.4967949390411377,
0.17317639291286469,
0.06353333592414856,
0.5881969332695007,
0.03464969992637634,
0.17732051014900208,
0.1874696910381317,
-0.13796021044254303,
-0.0754198282957077,
-0.17221663892269135,
0.18091802299022675,
0.09697161614894867,
0.01885591447353363,
-0.04283132776618004,
-0.09544814378023148,
0.30113545060157776,
-0.38394486904144287,
0.004111276473850012,
-0.005769312847405672,
0.11119753122329712,
-0.22550341486930847,
-0.10601639002561569,
-0.15626324713230133,
-0.09870889037847519,
-0.16644632816314697,
-0.19731619954109192,
0.014028764329850674,
-0.1700502634048462,
0.3556349277496338,
-0.07427991926670074,
-0.19596470892429352,
-0.4565809965133667,
-0.1867782175540924,
0.3054199516773224,
0.0650811493396759,
-0.24731001257896423,
0.016320951282978058,
0.24875697493553162,
-0.1455010026693344,
0.321377158164978,
0.08623901754617691,
0.6039392352104187,
0.17137522995471954,
0.08979114890098572,
-0.34109216928482056,
-0.0972946435213089,
-0.08858039230108261,
0.15166358649730682,
0.21556773781776428,
0.045920465141534805,
-0.0368347093462944,
0.3922654688358307,
0.20187810063362122,
-0.17074967920780182,
0.3085801601409912,
0.3357427418231964,
0.2227049469947815,
-0.17061901092529297,
-0.06306669861078262,
-0.13396593928337097,
-0.25735533237457275,
-0.326639860868454,
0.10131919384002686,
-0.2697952091693878,
0.11595847457647324,
0.4622557461261749,
-0.04151396453380585,
0.08408986032009125,
-0.2942304313182831,
0.1462799608707428,
0.13171051442623138,
0.3118909001350403,
0.2739439308643341,
-0.047624342143535614,
-0.3456515669822693,
0.1615709662437439,
-0.5773788690567017,
0.12946052849292755,
-0.11869868636131287,
-0.1146918311715126,
-0.033454060554504395,
-0.1582234650850296,
0.1593203991651535,
0.02061443030834198,
0.3829503357410431,
0.188819020986557,
-0.015939809381961823,
-0.10867707431316376,
-0.11951394379138947,
-0.19319775700569153,
-0.08259972184896469,
-0.12190037965774536,
0.2010166347026825,
-0.32269033789634705,
-0.0618353970348835,
-0.14577741920948029,
0.038975734263658524,
-0.3498097360134125,
0.09371393173933029,
0.10629752278327942,
-0.020190004259347916,
0.3603176176548004,
0.1459478884935379,
0.76997309923172,
0.04881463944911957,
0.11503157764673233,
-0.09138646721839905,
-0.3536492884159088,
-0.404243141412735,
0.3688684403896332,
0.32559195160865784,
0.2565366327762604,
-0.10637769103050232,
0.009763806127011776,
-0.16448292136192322,
0.09450692683458328,
-0.043546468019485474,
0.32114776968955994,
-0.25447577238082886,
0.214504212141037,
-0.02401093952357769,
0.017140327021479607,
0.09913210570812225,
-0.05562606453895569,
-0.002646812703460455,
0.34105435013771057,
-0.20675647258758545,
-0.604709804058075,
0.619809627532959,
-0.2129315733909607,
-0.23955516517162323,
0.15372981131076813,
0.1545255184173584,
0.22137881815433502,
-0.21874772012233734,
-0.510052502155304,
0.024750813841819763,
0.37738266587257385,
0.019003426656126976,
-0.4423443675041199,
-0.003706148359924555,
-0.19275695085525513,
0.05144556239247322,
0.11356013268232346,
0.30625367164611816,
0.11662862449884415,
-0.19328555464744568,
0.19910407066345215,
-0.25434643030166626
] |
https://github.com/huggingface/datasets/issues/1989
|
Question/problem with dataset labels
|
Hi @ioana-blue,
Can you share a sample from your .csv? A dummy where you get this error will also help.
I tried this csv:
```csv
feature,label
1.2,not nurse
1.3,nurse
1.5,surgeon
```
and the following snippet:
```python
from datasets import load_dataset
d = load_dataset("csv",data_files=['test.csv'])
print(d)
print(d['train']['label'])
```
and this works perfectly fine for me:
```sh
DatasetDict({
train: Dataset({
features: ['feature', 'label'],
num_rows: 3
})
})
['not nurse', 'nurse', 'surgeon']
```
I'm sure your csv is more complicated than this one. But it is hard to tell where the issue might be without looking at a sample.
|
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
| 95
|
Question/problem with dataset labels
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
Hi @ioana-blue,
Can you share a sample from your .csv? A dummy where you get this error will also help.
I tried this csv:
```csv
feature,label
1.2,not nurse
1.3,nurse
1.5,surgeon
```
and the following snippet:
```python
from datasets import load_dataset
d = load_dataset("csv",data_files=['test.csv'])
print(d)
print(d['train']['label'])
```
and this works perfectly fine for me:
```sh
DatasetDict({
train: Dataset({
features: ['feature', 'label'],
num_rows: 3
})
})
['not nurse', 'nurse', 'surgeon']
```
I'm sure your csv is more complicated than this one. But it is hard to tell where the issue might be without looking at a sample.
|
[
0.17891347408294678,
-0.05732341110706329,
0.005179154220968485,
0.13436773419380188,
0.41135331988334656,
0.3502122461795807,
0.6419939398765564,
0.1637083739042282,
-0.16131801903247833,
0.07234936207532883,
0.17885370552539825,
0.06387592107057571,
-0.06077335402369499,
0.030525799840688705,
-0.13023114204406738,
-0.11937106400728226,
0.08908423036336899,
0.173479363322258,
0.18164248764514923,
-0.044466327875852585,
-0.2867426872253418,
-0.03982604295015335,
-0.15668001770973206,
0.36628860235214233,
-0.2972058057785034,
-0.3766840398311615,
0.21054299175739288,
-0.12052856385707855,
-0.11313280463218689,
-0.4633955657482147,
0.27180957794189453,
0.08612103015184402,
0.0026813640724867582,
0.40342751145362854,
-0.00010309632489224896,
0.05875691398978233,
0.29674792289733887,
0.15598881244659424,
-0.3984077572822571,
-0.4321288764476776,
-0.18936008214950562,
-0.02340724691748619,
0.034564148634672165,
-0.3044775724411011,
0.09798295050859451,
-0.28466835618019104,
-0.09054138511419296,
-0.27566608786582947,
0.10468693822622299,
0.4386066496372223,
0.32663995027542114,
0.23734048008918762,
-0.20649951696395874,
-0.2293027937412262,
0.2311529964208603,
0.12508909404277802,
-0.030508195981383324,
0.049476899206638336,
-0.1344391107559204,
-0.006456918548792601,
0.45157045125961304,
0.46091440320014954,
-0.2723958492279053,
0.264771431684494,
0.1353634148836136,
0.14636319875717163,
0.13772615790367126,
-0.391048789024353,
0.2763097286224365,
0.1961430460214615,
0.7452602386474609,
-0.29649990797042847,
-0.29439058899879456,
-0.1697036474943161,
0.1373763233423233,
-0.4167192876338959,
0.18133871257305145,
0.07008437067270279,
0.006375445984303951,
-0.047014687210321426,
-0.03316255286335945,
0.06102658808231354,
0.08074173331260681,
0.0881802961230278,
-0.05807413160800934,
0.03832928463816643,
-0.0986412912607193,
0.32881712913513184,
0.1125299260020256,
-0.07475035637617111,
0.2975311279296875,
-0.005993981380015612,
-0.08857189118862152,
0.041545283049345016,
-0.4325246512889862,
-0.029609162360429764,
-0.03688126802444458,
0.05167559161782265,
-0.11813832819461823,
-0.03874027729034424,
0.01838638447225094,
-0.37495556473731995,
-0.14743423461914062,
0.34034523367881775,
0.21513402462005615,
0.2662767469882965,
0.27069926261901855,
0.5616875886917114,
0.0911722481250763,
-0.07616250216960907,
0.03080311231315136,
-0.0558072105050087,
-0.0015746225835755467,
-0.46264347434043884,
0.2433207631111145,
0.09893110394477844,
0.29347071051597595,
-0.23985809087753296,
-0.5455209612846375,
0.19244229793548584,
-0.028102025389671326,
0.09409462660551071,
0.15411771833896637,
0.3049507737159729,
0.022121448069810867,
0.20651715993881226,
0.07934725284576416,
0.19360817968845367,
-0.00917017925530672,
-0.11720465868711472,
-0.20692431926727295,
0.09760840982198715,
-0.20027866959571838,
-0.15010692179203033,
0.05026973783969879,
-0.07205360382795334,
0.11245013773441315,
0.0640593096613884,
-0.0010052787838503718,
-0.07605742663145065,
-0.01630275882780552,
-0.3864647448062897,
-0.01274816133081913,
0.3588937819004059,
-0.10326281189918518,
0.420350581407547,
0.2520546317100525,
-0.41855016350746155,
0.05969962105154991,
0.18021129071712494,
-0.36885228753089905,
-0.033813633024692535,
-0.21215848624706268,
0.28621235489845276,
-0.10304412245750427,
-0.18798039853572845,
-0.12009236216545105,
0.046823322772979736,
0.4193205237388611,
-0.21455369889736176,
0.15758994221687317,
-0.3543834090232849,
-0.30932241678237915,
-0.27777037024497986,
-0.06630374491214752,
0.22143235802650452,
-0.672246515750885,
0.004389484412968159,
-0.14754599332809448,
-0.02911343239247799,
0.05280744656920433,
0.29601913690567017,
-0.08100432902574539,
0.2062923014163971,
-0.07059221714735031,
0.030349209904670715,
0.13955312967300415,
-0.3906913101673126,
-0.11046354472637177,
0.10354441404342651,
-0.14200283586978912,
-0.24426479637622833,
0.07048094272613525,
-0.040339983999729156,
0.09173159301280975,
-0.0916256308555603,
0.05823083594441414,
-0.1318773776292801,
-0.19963160157203674,
-0.09513296186923981,
-0.1437045931816101,
0.0538102351129055,
0.6539096832275391,
0.09273272007703781,
-0.016799816861748695,
0.07564713805913925,
-0.10022789984941483,
-0.3448372781276703,
-0.042531568557024,
-0.1009543389081955,
0.20621949434280396,
0.21479029953479767,
0.055640604346990585,
0.2983594834804535,
0.1459522396326065,
-0.06447069346904755,
-0.4424961805343628,
0.10170096158981323,
-0.04005378112196922,
0.13956496119499207,
-0.14514334499835968,
-0.19234369695186615,
-0.3297654986381531,
-0.05378612130880356,
-0.20797739923000336,
0.01832341030240059,
0.16331322491168976,
0.06836050748825073,
-0.22142063081264496,
-0.020482944324612617,
0.014084731228649616,
-0.07588552683591843,
-0.017213372513651848,
0.10933033376932144,
-0.10402482002973557,
0.26565271615982056,
-0.09511733055114746,
0.1168939396739006,
-0.026739396154880524,
0.25311946868896484,
0.43260639905929565,
0.24005112051963806,
-0.046622101217508316,
0.36702385544776917,
0.0848604291677475,
-0.3270232081413269,
0.007840029895305634,
-0.1726589947938919,
0.018129581585526466,
-0.08387529104948044,
-0.0163266621530056,
0.11452510952949524,
0.27684012055397034,
-0.10859706997871399,
-0.08471912145614624,
0.14118549227714539,
-0.17720016837120056,
0.2762838900089264,
-0.16197457909584045,
0.20046067237854004,
0.25996318459510803,
-0.10939249396324158,
0.1251230537891388,
-0.2127114236354828,
0.21588031947612762,
-0.12979799509048462,
0.23431450128555298,
0.0071422988548874855,
-0.2617172598838806,
0.06771795451641083,
0.4220546782016754,
0.0015312841860577464,
-0.0035242880694568157,
0.009774230420589447,
-0.15866822004318237,
0.16574595868587494,
-0.013017691671848297,
0.595718264579773,
0.35284286737442017,
0.205955371260643,
-0.16387644410133362,
-0.058268580585718155,
-0.26225870847702026,
-0.13698343932628632,
0.21246269345283508,
0.09510132670402527,
0.029852598905563354,
0.05729620158672333,
0.02610979974269867,
-0.06643904745578766,
-0.17657293379306793,
-0.2433391660451889,
0.20823147892951965,
0.34643009305000305,
-0.5103117227554321,
-0.002906450070440769,
-0.34527212381362915,
-0.23186378180980682,
-0.31859782338142395,
-0.09879127889871597,
-0.23515866696834564,
-0.45904380083084106,
0.09043732285499573,
-0.07749122381210327,
-0.19039256870746613,
0.14507734775543213,
-0.037563350051641464,
0.00791588518768549,
-0.09107247740030289,
0.15205179154872894,
-0.09758404642343521,
-0.4702501893043518,
-0.20457129180431366,
0.18111225962638855,
0.007480352185666561,
0.04695437476038933,
0.4813607335090637,
-0.143199160695076,
-0.12455568462610245,
-0.07857241481542587,
-0.2953171133995056,
0.004026900511234999,
-0.2730652093887329,
0.13660450279712677,
0.1816229671239853,
0.10386001318693161,
0.008461100049316883,
-0.14868579804897308,
0.29301661252975464,
-0.07151931524276733,
0.024639904499053955,
0.10695718973875046,
0.045232538133859634,
-0.29207393527030945,
-0.26646947860717773,
-0.4750193655490875,
-0.47453048825263977,
-0.17748217284679413,
0.06694815307855606,
-0.07590755075216293,
-0.03352787345647812,
0.5198022127151489,
0.06844227761030197,
0.06568092852830887,
0.09314426779747009,
0.023253191262483597,
-0.34674328565597534,
-0.09354142844676971,
0.24904774129390717,
-0.17909251153469086,
-0.2102450281381607,
0.19605785608291626,
0.109309121966362,
0.11752880364656448,
-0.20393434166908264,
-0.3139221668243408,
0.07286331057548523,
-0.05760190263390541,
0.05894489958882332,
0.08131010830402374,
0.1948966234922409,
0.2138824611902237,
0.26710304617881775,
-0.14800302684307098,
-0.32705044746398926,
-0.3317107558250427,
0.13817375898361206,
-0.07196798175573349,
0.1306353658437729,
-0.10625556856393814,
0.29408565163612366,
-0.15208472311496735,
0.3265087604522705,
0.021773260086774826,
-0.2126564383506775,
0.19188947975635529,
-0.04784756898880005,
0.5207315683364868,
0.06838033348321915,
-0.4193750321865082,
0.06588488817214966,
-0.1191064789891243,
0.02694679982960224,
0.1760430485010147,
-0.3196396827697754,
0.03795647993683815,
-0.1479686200618744,
0.39460328221321106,
-0.24780510365962982,
-0.09965687990188599,
-0.10064342617988586,
-0.15016905963420868,
0.04052730277180672,
0.1168999969959259,
-0.04097595810890198,
-0.2084076702594757,
-0.19158531725406647,
-0.2512800097465515,
0.05782434716820717,
-0.09546219557523727,
-0.08755096048116684,
-0.5335752367973328,
-0.23349951207637787,
-0.16499629616737366,
0.2940983772277832,
0.15745164453983307,
0.33466392755508423,
-0.17851665616035461,
0.24547207355499268,
0.04775957763195038,
0.24590007960796356,
0.6149808764457703,
-0.48323866724967957,
0.1547020524740219,
0.22637251019477844,
0.39312776923179626,
-0.17800158262252808,
-0.12725569307804108,
-0.16925759613513947,
0.29472672939300537,
-0.29577749967575073,
0.025988716632127762,
-0.1555343121290207,
-0.09107734262943268,
0.2631010115146637,
0.15540540218353271,
-0.12238091230392456,
-0.314981073141098,
-0.230952650308609,
-0.1793929636478424,
-0.1272861212491989,
-0.05339647829532623,
0.06357742100954056,
0.1866387128829956,
-0.3784876763820648,
0.09864716976881027,
0.14082340896129608,
0.07350759953260422,
0.2715039849281311,
0.11863487213850021,
0.22324363887310028,
0.030276885256171227,
0.19736140966415405,
0.3174017667770386,
0.2587261199951172,
0.5099822282791138,
0.5483976006507874,
-0.3618467152118683,
-0.5113286972045898,
-0.11947935074567795,
-0.11476977169513702,
0.20070751011371613,
0.06500016897916794,
-0.14221541583538055,
0.16609644889831543,
-0.05064032971858978,
0.18545973300933838,
0.09619837999343872,
0.02230874076485634,
0.4922947883605957,
0.16057683527469635,
-0.48984843492507935,
-0.5388927459716797,
0.2713586688041687,
0.03924121707677841,
-0.047840915620326996,
0.12815505266189575,
0.07973120361566544,
-0.34075772762298584,
0.2059531807899475,
-0.1559935361146927,
0.6908734440803528,
0.08379849791526794,
-0.051031067967414856,
-0.017031138762831688,
-0.2261737883090973,
0.7132229208946228,
-0.11871124804019928,
0.0007707070908509195,
-0.36142972111701965,
-0.30746591091156006,
-0.0622297003865242,
-0.022119013592600822,
0.023475833237171173,
0.450693279504776,
-0.3085799813270569,
0.37883761525154114,
-0.32851332426071167,
0.20468570291996002,
0.028749734163284302,
-0.07406040281057358,
0.2494400590658188,
-0.13231314718723297,
-0.08248622715473175,
0.2010338306427002,
-0.157619446516037,
-0.13437534868717194,
-0.16743460297584534,
0.04190531745553017,
-0.23184797167778015,
-0.2680612802505493,
-0.2262599915266037,
0.08226059377193451,
-0.25382542610168457,
0.14157956838607788,
-0.0856545940041542,
-0.016718991100788116,
0.21681223809719086,
0.2025105506181717,
0.48632127046585083,
0.0789249986410141,
-0.14828579127788544,
0.18389585614204407,
0.04215006157755852,
0.13702285289764404,
0.034348372370004654,
0.05374768748879433,
0.4150616228580475,
0.11604932695627213,
-0.26998209953308105,
0.12853087484836578,
-0.07956812530755997,
0.17594999074935913,
-0.08703093975782394,
0.08389480412006378,
-0.09839654713869095,
-0.36537453532218933,
0.032646797597408295,
-0.07703931629657745,
0.22870928049087524,
-0.25377342104911804,
0.17734603583812714,
0.051982734352350235,
-0.046680621802806854,
0.21207952499389648,
-0.2636912763118744,
-0.1465979814529419,
-0.045746877789497375,
0.18923379480838776,
0.025964440777897835,
0.19335640966892242,
0.24724486470222473,
0.025972969830036163,
-0.3513919413089752,
-0.25651127099990845,
0.038952261209487915,
0.023998193442821503,
-0.677836537361145,
0.24598251283168793,
0.2533552944660187,
0.07594631612300873,
-0.057189520448446274,
0.22326934337615967,
-0.01583010144531727,
0.0710860937833786,
0.06101401522755623,
-0.5274378061294556,
-0.2186506688594818,
-0.004670771304517984,
-0.18475456535816193,
0.11692994832992554,
0.2478654682636261,
0.4110053777694702,
0.13375762104988098,
0.07145128399133682,
-0.36415424942970276,
-0.020953631028532982,
-0.1723954677581787,
0.29801294207572937,
0.15251024067401886,
0.019961336627602577,
0.28203174471855164,
-0.17880624532699585,
0.21821677684783936,
0.0007436689338646829,
0.007750303018838167,
-0.24981854856014252,
-0.1872100830078125,
0.11241065710783005,
0.13520900905132294,
-0.19721661508083344,
-0.06341098994016647,
-0.16438139975070953,
0.057837244123220444,
-0.07198324799537659,
-0.017251547425985336,
0.31057360768318176,
0.0032079345546662807,
0.3735310733318329,
-0.1509210169315338,
0.2327837496995926,
-0.046331100165843964,
0.21827778220176697,
0.012716840021312237,
-0.11400211602449417,
0.0742448940873146,
0.172965869307518,
-0.11276409029960632,
0.01947760209441185,
-0.17507928609848022,
0.08479433506727219,
-0.11700432747602463,
-0.11793006956577301,
0.13429364562034607,
-0.5689805746078491,
0.29595574736595154,
0.19363825023174286,
0.4493623673915863,
0.2781369984149933,
-0.18682533502578735,
-0.07076655328273773,
0.38261017203330994,
0.3079267144203186,
-0.36567002534866333,
-0.16836042702198029,
0.1630018949508667,
0.1655603051185608,
0.00039057957474142313,
0.07560659199953079,
0.06072518229484558,
-0.031059913337230682,
0.04489267244935036,
0.008086458779871464,
0.45543810725212097,
-0.4376544952392578,
0.2349056452512741,
0.526982307434082,
-0.06197047978639603,
0.09998403489589691,
0.4967949390411377,
0.17317639291286469,
0.06353333592414856,
0.5881969332695007,
0.03464969992637634,
0.17732051014900208,
0.1874696910381317,
-0.13796021044254303,
-0.0754198282957077,
-0.17221663892269135,
0.18091802299022675,
0.09697161614894867,
0.01885591447353363,
-0.04283132776618004,
-0.09544814378023148,
0.30113545060157776,
-0.38394486904144287,
0.004111276473850012,
-0.005769312847405672,
0.11119753122329712,
-0.22550341486930847,
-0.10601639002561569,
-0.15626324713230133,
-0.09870889037847519,
-0.16644632816314697,
-0.19731619954109192,
0.014028764329850674,
-0.1700502634048462,
0.3556349277496338,
-0.07427991926670074,
-0.19596470892429352,
-0.4565809965133667,
-0.1867782175540924,
0.3054199516773224,
0.0650811493396759,
-0.24731001257896423,
0.016320951282978058,
0.24875697493553162,
-0.1455010026693344,
0.321377158164978,
0.08623901754617691,
0.6039392352104187,
0.17137522995471954,
0.08979114890098572,
-0.34109216928482056,
-0.0972946435213089,
-0.08858039230108261,
0.15166358649730682,
0.21556773781776428,
0.045920465141534805,
-0.0368347093462944,
0.3922654688358307,
0.20187810063362122,
-0.17074967920780182,
0.3085801601409912,
0.3357427418231964,
0.2227049469947815,
-0.17061901092529297,
-0.06306669861078262,
-0.13396593928337097,
-0.25735533237457275,
-0.326639860868454,
0.10131919384002686,
-0.2697952091693878,
0.11595847457647324,
0.4622557461261749,
-0.04151396453380585,
0.08408986032009125,
-0.2942304313182831,
0.1462799608707428,
0.13171051442623138,
0.3118909001350403,
0.2739439308643341,
-0.047624342143535614,
-0.3456515669822693,
0.1615709662437439,
-0.5773788690567017,
0.12946052849292755,
-0.11869868636131287,
-0.1146918311715126,
-0.033454060554504395,
-0.1582234650850296,
0.1593203991651535,
0.02061443030834198,
0.3829503357410431,
0.188819020986557,
-0.015939809381961823,
-0.10867707431316376,
-0.11951394379138947,
-0.19319775700569153,
-0.08259972184896469,
-0.12190037965774536,
0.2010166347026825,
-0.32269033789634705,
-0.0618353970348835,
-0.14577741920948029,
0.038975734263658524,
-0.3498097360134125,
0.09371393173933029,
0.10629752278327942,
-0.020190004259347916,
0.3603176176548004,
0.1459478884935379,
0.76997309923172,
0.04881463944911957,
0.11503157764673233,
-0.09138646721839905,
-0.3536492884159088,
-0.404243141412735,
0.3688684403896332,
0.32559195160865784,
0.2565366327762604,
-0.10637769103050232,
0.009763806127011776,
-0.16448292136192322,
0.09450692683458328,
-0.043546468019485474,
0.32114776968955994,
-0.25447577238082886,
0.214504212141037,
-0.02401093952357769,
0.017140327021479607,
0.09913210570812225,
-0.05562606453895569,
-0.002646812703460455,
0.34105435013771057,
-0.20675647258758545,
-0.604709804058075,
0.619809627532959,
-0.2129315733909607,
-0.23955516517162323,
0.15372981131076813,
0.1545255184173584,
0.22137881815433502,
-0.21874772012233734,
-0.510052502155304,
0.024750813841819763,
0.37738266587257385,
0.019003426656126976,
-0.4423443675041199,
-0.003706148359924555,
-0.19275695085525513,
0.05144556239247322,
0.11356013268232346,
0.30625367164611816,
0.11662862449884415,
-0.19328555464744568,
0.19910407066345215,
-0.25434643030166626
] |
https://github.com/huggingface/datasets/issues/1989
|
Question/problem with dataset labels
|
I've had versions where it worked fain. For this dataset, I had all kind of parsing issues that I couldn't understand. What I ended up doing is strip all the columns that I didn't need and also make the label 0/1.
I think one line that may have caused a problem was the csv version of this:
```crawl-data/CC-MAIN-2017-47/segments/1510934806225.78/wet/CC-MAIN-20171120203833-20171120223833-00571.warc.wet.gz Rose Blakey is an aspiring journalist. She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead-end waitressing job. ^M ('Rose', '', 'Blakey') journalist F 38 journalist https://www.netgalley.com/catalog/book/121872 _ is desperate to escape the from the small Australian town in which _ lives. Rejection after rejection mean _ is stuck in what _ sees as a dead-end waitressing job. She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead-end waitressing job.```
The error I got in this case is this one: https://github.com/huggingface/datasets/issues/1989#issuecomment-790842771
Note, this line was part of a much larger file and until this line I guess it was working fine.
|
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
| 197
|
Question/problem with dataset labels
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
I've had versions where it worked fain. For this dataset, I had all kind of parsing issues that I couldn't understand. What I ended up doing is strip all the columns that I didn't need and also make the label 0/1.
I think one line that may have caused a problem was the csv version of this:
```crawl-data/CC-MAIN-2017-47/segments/1510934806225.78/wet/CC-MAIN-20171120203833-20171120223833-00571.warc.wet.gz Rose Blakey is an aspiring journalist. She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead-end waitressing job. ^M ('Rose', '', 'Blakey') journalist F 38 journalist https://www.netgalley.com/catalog/book/121872 _ is desperate to escape the from the small Australian town in which _ lives. Rejection after rejection mean _ is stuck in what _ sees as a dead-end waitressing job. She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead-end waitressing job.```
The error I got in this case is this one: https://github.com/huggingface/datasets/issues/1989#issuecomment-790842771
Note, this line was part of a much larger file and until this line I guess it was working fine.
|
[
0.17891347408294678,
-0.05732341110706329,
0.005179154220968485,
0.13436773419380188,
0.41135331988334656,
0.3502122461795807,
0.6419939398765564,
0.1637083739042282,
-0.16131801903247833,
0.07234936207532883,
0.17885370552539825,
0.06387592107057571,
-0.06077335402369499,
0.030525799840688705,
-0.13023114204406738,
-0.11937106400728226,
0.08908423036336899,
0.173479363322258,
0.18164248764514923,
-0.044466327875852585,
-0.2867426872253418,
-0.03982604295015335,
-0.15668001770973206,
0.36628860235214233,
-0.2972058057785034,
-0.3766840398311615,
0.21054299175739288,
-0.12052856385707855,
-0.11313280463218689,
-0.4633955657482147,
0.27180957794189453,
0.08612103015184402,
0.0026813640724867582,
0.40342751145362854,
-0.00010309632489224896,
0.05875691398978233,
0.29674792289733887,
0.15598881244659424,
-0.3984077572822571,
-0.4321288764476776,
-0.18936008214950562,
-0.02340724691748619,
0.034564148634672165,
-0.3044775724411011,
0.09798295050859451,
-0.28466835618019104,
-0.09054138511419296,
-0.27566608786582947,
0.10468693822622299,
0.4386066496372223,
0.32663995027542114,
0.23734048008918762,
-0.20649951696395874,
-0.2293027937412262,
0.2311529964208603,
0.12508909404277802,
-0.030508195981383324,
0.049476899206638336,
-0.1344391107559204,
-0.006456918548792601,
0.45157045125961304,
0.46091440320014954,
-0.2723958492279053,
0.264771431684494,
0.1353634148836136,
0.14636319875717163,
0.13772615790367126,
-0.391048789024353,
0.2763097286224365,
0.1961430460214615,
0.7452602386474609,
-0.29649990797042847,
-0.29439058899879456,
-0.1697036474943161,
0.1373763233423233,
-0.4167192876338959,
0.18133871257305145,
0.07008437067270279,
0.006375445984303951,
-0.047014687210321426,
-0.03316255286335945,
0.06102658808231354,
0.08074173331260681,
0.0881802961230278,
-0.05807413160800934,
0.03832928463816643,
-0.0986412912607193,
0.32881712913513184,
0.1125299260020256,
-0.07475035637617111,
0.2975311279296875,
-0.005993981380015612,
-0.08857189118862152,
0.041545283049345016,
-0.4325246512889862,
-0.029609162360429764,
-0.03688126802444458,
0.05167559161782265,
-0.11813832819461823,
-0.03874027729034424,
0.01838638447225094,
-0.37495556473731995,
-0.14743423461914062,
0.34034523367881775,
0.21513402462005615,
0.2662767469882965,
0.27069926261901855,
0.5616875886917114,
0.0911722481250763,
-0.07616250216960907,
0.03080311231315136,
-0.0558072105050087,
-0.0015746225835755467,
-0.46264347434043884,
0.2433207631111145,
0.09893110394477844,
0.29347071051597595,
-0.23985809087753296,
-0.5455209612846375,
0.19244229793548584,
-0.028102025389671326,
0.09409462660551071,
0.15411771833896637,
0.3049507737159729,
0.022121448069810867,
0.20651715993881226,
0.07934725284576416,
0.19360817968845367,
-0.00917017925530672,
-0.11720465868711472,
-0.20692431926727295,
0.09760840982198715,
-0.20027866959571838,
-0.15010692179203033,
0.05026973783969879,
-0.07205360382795334,
0.11245013773441315,
0.0640593096613884,
-0.0010052787838503718,
-0.07605742663145065,
-0.01630275882780552,
-0.3864647448062897,
-0.01274816133081913,
0.3588937819004059,
-0.10326281189918518,
0.420350581407547,
0.2520546317100525,
-0.41855016350746155,
0.05969962105154991,
0.18021129071712494,
-0.36885228753089905,
-0.033813633024692535,
-0.21215848624706268,
0.28621235489845276,
-0.10304412245750427,
-0.18798039853572845,
-0.12009236216545105,
0.046823322772979736,
0.4193205237388611,
-0.21455369889736176,
0.15758994221687317,
-0.3543834090232849,
-0.30932241678237915,
-0.27777037024497986,
-0.06630374491214752,
0.22143235802650452,
-0.672246515750885,
0.004389484412968159,
-0.14754599332809448,
-0.02911343239247799,
0.05280744656920433,
0.29601913690567017,
-0.08100432902574539,
0.2062923014163971,
-0.07059221714735031,
0.030349209904670715,
0.13955312967300415,
-0.3906913101673126,
-0.11046354472637177,
0.10354441404342651,
-0.14200283586978912,
-0.24426479637622833,
0.07048094272613525,
-0.040339983999729156,
0.09173159301280975,
-0.0916256308555603,
0.05823083594441414,
-0.1318773776292801,
-0.19963160157203674,
-0.09513296186923981,
-0.1437045931816101,
0.0538102351129055,
0.6539096832275391,
0.09273272007703781,
-0.016799816861748695,
0.07564713805913925,
-0.10022789984941483,
-0.3448372781276703,
-0.042531568557024,
-0.1009543389081955,
0.20621949434280396,
0.21479029953479767,
0.055640604346990585,
0.2983594834804535,
0.1459522396326065,
-0.06447069346904755,
-0.4424961805343628,
0.10170096158981323,
-0.04005378112196922,
0.13956496119499207,
-0.14514334499835968,
-0.19234369695186615,
-0.3297654986381531,
-0.05378612130880356,
-0.20797739923000336,
0.01832341030240059,
0.16331322491168976,
0.06836050748825073,
-0.22142063081264496,
-0.020482944324612617,
0.014084731228649616,
-0.07588552683591843,
-0.017213372513651848,
0.10933033376932144,
-0.10402482002973557,
0.26565271615982056,
-0.09511733055114746,
0.1168939396739006,
-0.026739396154880524,
0.25311946868896484,
0.43260639905929565,
0.24005112051963806,
-0.046622101217508316,
0.36702385544776917,
0.0848604291677475,
-0.3270232081413269,
0.007840029895305634,
-0.1726589947938919,
0.018129581585526466,
-0.08387529104948044,
-0.0163266621530056,
0.11452510952949524,
0.27684012055397034,
-0.10859706997871399,
-0.08471912145614624,
0.14118549227714539,
-0.17720016837120056,
0.2762838900089264,
-0.16197457909584045,
0.20046067237854004,
0.25996318459510803,
-0.10939249396324158,
0.1251230537891388,
-0.2127114236354828,
0.21588031947612762,
-0.12979799509048462,
0.23431450128555298,
0.0071422988548874855,
-0.2617172598838806,
0.06771795451641083,
0.4220546782016754,
0.0015312841860577464,
-0.0035242880694568157,
0.009774230420589447,
-0.15866822004318237,
0.16574595868587494,
-0.013017691671848297,
0.595718264579773,
0.35284286737442017,
0.205955371260643,
-0.16387644410133362,
-0.058268580585718155,
-0.26225870847702026,
-0.13698343932628632,
0.21246269345283508,
0.09510132670402527,
0.029852598905563354,
0.05729620158672333,
0.02610979974269867,
-0.06643904745578766,
-0.17657293379306793,
-0.2433391660451889,
0.20823147892951965,
0.34643009305000305,
-0.5103117227554321,
-0.002906450070440769,
-0.34527212381362915,
-0.23186378180980682,
-0.31859782338142395,
-0.09879127889871597,
-0.23515866696834564,
-0.45904380083084106,
0.09043732285499573,
-0.07749122381210327,
-0.19039256870746613,
0.14507734775543213,
-0.037563350051641464,
0.00791588518768549,
-0.09107247740030289,
0.15205179154872894,
-0.09758404642343521,
-0.4702501893043518,
-0.20457129180431366,
0.18111225962638855,
0.007480352185666561,
0.04695437476038933,
0.4813607335090637,
-0.143199160695076,
-0.12455568462610245,
-0.07857241481542587,
-0.2953171133995056,
0.004026900511234999,
-0.2730652093887329,
0.13660450279712677,
0.1816229671239853,
0.10386001318693161,
0.008461100049316883,
-0.14868579804897308,
0.29301661252975464,
-0.07151931524276733,
0.024639904499053955,
0.10695718973875046,
0.045232538133859634,
-0.29207393527030945,
-0.26646947860717773,
-0.4750193655490875,
-0.47453048825263977,
-0.17748217284679413,
0.06694815307855606,
-0.07590755075216293,
-0.03352787345647812,
0.5198022127151489,
0.06844227761030197,
0.06568092852830887,
0.09314426779747009,
0.023253191262483597,
-0.34674328565597534,
-0.09354142844676971,
0.24904774129390717,
-0.17909251153469086,
-0.2102450281381607,
0.19605785608291626,
0.109309121966362,
0.11752880364656448,
-0.20393434166908264,
-0.3139221668243408,
0.07286331057548523,
-0.05760190263390541,
0.05894489958882332,
0.08131010830402374,
0.1948966234922409,
0.2138824611902237,
0.26710304617881775,
-0.14800302684307098,
-0.32705044746398926,
-0.3317107558250427,
0.13817375898361206,
-0.07196798175573349,
0.1306353658437729,
-0.10625556856393814,
0.29408565163612366,
-0.15208472311496735,
0.3265087604522705,
0.021773260086774826,
-0.2126564383506775,
0.19188947975635529,
-0.04784756898880005,
0.5207315683364868,
0.06838033348321915,
-0.4193750321865082,
0.06588488817214966,
-0.1191064789891243,
0.02694679982960224,
0.1760430485010147,
-0.3196396827697754,
0.03795647993683815,
-0.1479686200618744,
0.39460328221321106,
-0.24780510365962982,
-0.09965687990188599,
-0.10064342617988586,
-0.15016905963420868,
0.04052730277180672,
0.1168999969959259,
-0.04097595810890198,
-0.2084076702594757,
-0.19158531725406647,
-0.2512800097465515,
0.05782434716820717,
-0.09546219557523727,
-0.08755096048116684,
-0.5335752367973328,
-0.23349951207637787,
-0.16499629616737366,
0.2940983772277832,
0.15745164453983307,
0.33466392755508423,
-0.17851665616035461,
0.24547207355499268,
0.04775957763195038,
0.24590007960796356,
0.6149808764457703,
-0.48323866724967957,
0.1547020524740219,
0.22637251019477844,
0.39312776923179626,
-0.17800158262252808,
-0.12725569307804108,
-0.16925759613513947,
0.29472672939300537,
-0.29577749967575073,
0.025988716632127762,
-0.1555343121290207,
-0.09107734262943268,
0.2631010115146637,
0.15540540218353271,
-0.12238091230392456,
-0.314981073141098,
-0.230952650308609,
-0.1793929636478424,
-0.1272861212491989,
-0.05339647829532623,
0.06357742100954056,
0.1866387128829956,
-0.3784876763820648,
0.09864716976881027,
0.14082340896129608,
0.07350759953260422,
0.2715039849281311,
0.11863487213850021,
0.22324363887310028,
0.030276885256171227,
0.19736140966415405,
0.3174017667770386,
0.2587261199951172,
0.5099822282791138,
0.5483976006507874,
-0.3618467152118683,
-0.5113286972045898,
-0.11947935074567795,
-0.11476977169513702,
0.20070751011371613,
0.06500016897916794,
-0.14221541583538055,
0.16609644889831543,
-0.05064032971858978,
0.18545973300933838,
0.09619837999343872,
0.02230874076485634,
0.4922947883605957,
0.16057683527469635,
-0.48984843492507935,
-0.5388927459716797,
0.2713586688041687,
0.03924121707677841,
-0.047840915620326996,
0.12815505266189575,
0.07973120361566544,
-0.34075772762298584,
0.2059531807899475,
-0.1559935361146927,
0.6908734440803528,
0.08379849791526794,
-0.051031067967414856,
-0.017031138762831688,
-0.2261737883090973,
0.7132229208946228,
-0.11871124804019928,
0.0007707070908509195,
-0.36142972111701965,
-0.30746591091156006,
-0.0622297003865242,
-0.022119013592600822,
0.023475833237171173,
0.450693279504776,
-0.3085799813270569,
0.37883761525154114,
-0.32851332426071167,
0.20468570291996002,
0.028749734163284302,
-0.07406040281057358,
0.2494400590658188,
-0.13231314718723297,
-0.08248622715473175,
0.2010338306427002,
-0.157619446516037,
-0.13437534868717194,
-0.16743460297584534,
0.04190531745553017,
-0.23184797167778015,
-0.2680612802505493,
-0.2262599915266037,
0.08226059377193451,
-0.25382542610168457,
0.14157956838607788,
-0.0856545940041542,
-0.016718991100788116,
0.21681223809719086,
0.2025105506181717,
0.48632127046585083,
0.0789249986410141,
-0.14828579127788544,
0.18389585614204407,
0.04215006157755852,
0.13702285289764404,
0.034348372370004654,
0.05374768748879433,
0.4150616228580475,
0.11604932695627213,
-0.26998209953308105,
0.12853087484836578,
-0.07956812530755997,
0.17594999074935913,
-0.08703093975782394,
0.08389480412006378,
-0.09839654713869095,
-0.36537453532218933,
0.032646797597408295,
-0.07703931629657745,
0.22870928049087524,
-0.25377342104911804,
0.17734603583812714,
0.051982734352350235,
-0.046680621802806854,
0.21207952499389648,
-0.2636912763118744,
-0.1465979814529419,
-0.045746877789497375,
0.18923379480838776,
0.025964440777897835,
0.19335640966892242,
0.24724486470222473,
0.025972969830036163,
-0.3513919413089752,
-0.25651127099990845,
0.038952261209487915,
0.023998193442821503,
-0.677836537361145,
0.24598251283168793,
0.2533552944660187,
0.07594631612300873,
-0.057189520448446274,
0.22326934337615967,
-0.01583010144531727,
0.0710860937833786,
0.06101401522755623,
-0.5274378061294556,
-0.2186506688594818,
-0.004670771304517984,
-0.18475456535816193,
0.11692994832992554,
0.2478654682636261,
0.4110053777694702,
0.13375762104988098,
0.07145128399133682,
-0.36415424942970276,
-0.020953631028532982,
-0.1723954677581787,
0.29801294207572937,
0.15251024067401886,
0.019961336627602577,
0.28203174471855164,
-0.17880624532699585,
0.21821677684783936,
0.0007436689338646829,
0.007750303018838167,
-0.24981854856014252,
-0.1872100830078125,
0.11241065710783005,
0.13520900905132294,
-0.19721661508083344,
-0.06341098994016647,
-0.16438139975070953,
0.057837244123220444,
-0.07198324799537659,
-0.017251547425985336,
0.31057360768318176,
0.0032079345546662807,
0.3735310733318329,
-0.1509210169315338,
0.2327837496995926,
-0.046331100165843964,
0.21827778220176697,
0.012716840021312237,
-0.11400211602449417,
0.0742448940873146,
0.172965869307518,
-0.11276409029960632,
0.01947760209441185,
-0.17507928609848022,
0.08479433506727219,
-0.11700432747602463,
-0.11793006956577301,
0.13429364562034607,
-0.5689805746078491,
0.29595574736595154,
0.19363825023174286,
0.4493623673915863,
0.2781369984149933,
-0.18682533502578735,
-0.07076655328273773,
0.38261017203330994,
0.3079267144203186,
-0.36567002534866333,
-0.16836042702198029,
0.1630018949508667,
0.1655603051185608,
0.00039057957474142313,
0.07560659199953079,
0.06072518229484558,
-0.031059913337230682,
0.04489267244935036,
0.008086458779871464,
0.45543810725212097,
-0.4376544952392578,
0.2349056452512741,
0.526982307434082,
-0.06197047978639603,
0.09998403489589691,
0.4967949390411377,
0.17317639291286469,
0.06353333592414856,
0.5881969332695007,
0.03464969992637634,
0.17732051014900208,
0.1874696910381317,
-0.13796021044254303,
-0.0754198282957077,
-0.17221663892269135,
0.18091802299022675,
0.09697161614894867,
0.01885591447353363,
-0.04283132776618004,
-0.09544814378023148,
0.30113545060157776,
-0.38394486904144287,
0.004111276473850012,
-0.005769312847405672,
0.11119753122329712,
-0.22550341486930847,
-0.10601639002561569,
-0.15626324713230133,
-0.09870889037847519,
-0.16644632816314697,
-0.19731619954109192,
0.014028764329850674,
-0.1700502634048462,
0.3556349277496338,
-0.07427991926670074,
-0.19596470892429352,
-0.4565809965133667,
-0.1867782175540924,
0.3054199516773224,
0.0650811493396759,
-0.24731001257896423,
0.016320951282978058,
0.24875697493553162,
-0.1455010026693344,
0.321377158164978,
0.08623901754617691,
0.6039392352104187,
0.17137522995471954,
0.08979114890098572,
-0.34109216928482056,
-0.0972946435213089,
-0.08858039230108261,
0.15166358649730682,
0.21556773781776428,
0.045920465141534805,
-0.0368347093462944,
0.3922654688358307,
0.20187810063362122,
-0.17074967920780182,
0.3085801601409912,
0.3357427418231964,
0.2227049469947815,
-0.17061901092529297,
-0.06306669861078262,
-0.13396593928337097,
-0.25735533237457275,
-0.326639860868454,
0.10131919384002686,
-0.2697952091693878,
0.11595847457647324,
0.4622557461261749,
-0.04151396453380585,
0.08408986032009125,
-0.2942304313182831,
0.1462799608707428,
0.13171051442623138,
0.3118909001350403,
0.2739439308643341,
-0.047624342143535614,
-0.3456515669822693,
0.1615709662437439,
-0.5773788690567017,
0.12946052849292755,
-0.11869868636131287,
-0.1146918311715126,
-0.033454060554504395,
-0.1582234650850296,
0.1593203991651535,
0.02061443030834198,
0.3829503357410431,
0.188819020986557,
-0.015939809381961823,
-0.10867707431316376,
-0.11951394379138947,
-0.19319775700569153,
-0.08259972184896469,
-0.12190037965774536,
0.2010166347026825,
-0.32269033789634705,
-0.0618353970348835,
-0.14577741920948029,
0.038975734263658524,
-0.3498097360134125,
0.09371393173933029,
0.10629752278327942,
-0.020190004259347916,
0.3603176176548004,
0.1459478884935379,
0.76997309923172,
0.04881463944911957,
0.11503157764673233,
-0.09138646721839905,
-0.3536492884159088,
-0.404243141412735,
0.3688684403896332,
0.32559195160865784,
0.2565366327762604,
-0.10637769103050232,
0.009763806127011776,
-0.16448292136192322,
0.09450692683458328,
-0.043546468019485474,
0.32114776968955994,
-0.25447577238082886,
0.214504212141037,
-0.02401093952357769,
0.017140327021479607,
0.09913210570812225,
-0.05562606453895569,
-0.002646812703460455,
0.34105435013771057,
-0.20675647258758545,
-0.604709804058075,
0.619809627532959,
-0.2129315733909607,
-0.23955516517162323,
0.15372981131076813,
0.1545255184173584,
0.22137881815433502,
-0.21874772012233734,
-0.510052502155304,
0.024750813841819763,
0.37738266587257385,
0.019003426656126976,
-0.4423443675041199,
-0.003706148359924555,
-0.19275695085525513,
0.05144556239247322,
0.11356013268232346,
0.30625367164611816,
0.11662862449884415,
-0.19328555464744568,
0.19910407066345215,
-0.25434643030166626
] |
https://github.com/huggingface/datasets/issues/1989
|
Question/problem with dataset labels
|
Hi @ioana-blue,
What is the separator you're using for the csv? I see there are only two commas in the given line, but they don't seem like appropriate points. Also, is this a string part of one line, or an entire line? There should also be a label, right?
|
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
| 49
|
Question/problem with dataset labels
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
Hi @ioana-blue,
What is the separator you're using for the csv? I see there are only two commas in the given line, but they don't seem like appropriate points. Also, is this a string part of one line, or an entire line? There should also be a label, right?
|
[
0.17891347408294678,
-0.05732341110706329,
0.005179154220968485,
0.13436773419380188,
0.41135331988334656,
0.3502122461795807,
0.6419939398765564,
0.1637083739042282,
-0.16131801903247833,
0.07234936207532883,
0.17885370552539825,
0.06387592107057571,
-0.06077335402369499,
0.030525799840688705,
-0.13023114204406738,
-0.11937106400728226,
0.08908423036336899,
0.173479363322258,
0.18164248764514923,
-0.044466327875852585,
-0.2867426872253418,
-0.03982604295015335,
-0.15668001770973206,
0.36628860235214233,
-0.2972058057785034,
-0.3766840398311615,
0.21054299175739288,
-0.12052856385707855,
-0.11313280463218689,
-0.4633955657482147,
0.27180957794189453,
0.08612103015184402,
0.0026813640724867582,
0.40342751145362854,
-0.00010309632489224896,
0.05875691398978233,
0.29674792289733887,
0.15598881244659424,
-0.3984077572822571,
-0.4321288764476776,
-0.18936008214950562,
-0.02340724691748619,
0.034564148634672165,
-0.3044775724411011,
0.09798295050859451,
-0.28466835618019104,
-0.09054138511419296,
-0.27566608786582947,
0.10468693822622299,
0.4386066496372223,
0.32663995027542114,
0.23734048008918762,
-0.20649951696395874,
-0.2293027937412262,
0.2311529964208603,
0.12508909404277802,
-0.030508195981383324,
0.049476899206638336,
-0.1344391107559204,
-0.006456918548792601,
0.45157045125961304,
0.46091440320014954,
-0.2723958492279053,
0.264771431684494,
0.1353634148836136,
0.14636319875717163,
0.13772615790367126,
-0.391048789024353,
0.2763097286224365,
0.1961430460214615,
0.7452602386474609,
-0.29649990797042847,
-0.29439058899879456,
-0.1697036474943161,
0.1373763233423233,
-0.4167192876338959,
0.18133871257305145,
0.07008437067270279,
0.006375445984303951,
-0.047014687210321426,
-0.03316255286335945,
0.06102658808231354,
0.08074173331260681,
0.0881802961230278,
-0.05807413160800934,
0.03832928463816643,
-0.0986412912607193,
0.32881712913513184,
0.1125299260020256,
-0.07475035637617111,
0.2975311279296875,
-0.005993981380015612,
-0.08857189118862152,
0.041545283049345016,
-0.4325246512889862,
-0.029609162360429764,
-0.03688126802444458,
0.05167559161782265,
-0.11813832819461823,
-0.03874027729034424,
0.01838638447225094,
-0.37495556473731995,
-0.14743423461914062,
0.34034523367881775,
0.21513402462005615,
0.2662767469882965,
0.27069926261901855,
0.5616875886917114,
0.0911722481250763,
-0.07616250216960907,
0.03080311231315136,
-0.0558072105050087,
-0.0015746225835755467,
-0.46264347434043884,
0.2433207631111145,
0.09893110394477844,
0.29347071051597595,
-0.23985809087753296,
-0.5455209612846375,
0.19244229793548584,
-0.028102025389671326,
0.09409462660551071,
0.15411771833896637,
0.3049507737159729,
0.022121448069810867,
0.20651715993881226,
0.07934725284576416,
0.19360817968845367,
-0.00917017925530672,
-0.11720465868711472,
-0.20692431926727295,
0.09760840982198715,
-0.20027866959571838,
-0.15010692179203033,
0.05026973783969879,
-0.07205360382795334,
0.11245013773441315,
0.0640593096613884,
-0.0010052787838503718,
-0.07605742663145065,
-0.01630275882780552,
-0.3864647448062897,
-0.01274816133081913,
0.3588937819004059,
-0.10326281189918518,
0.420350581407547,
0.2520546317100525,
-0.41855016350746155,
0.05969962105154991,
0.18021129071712494,
-0.36885228753089905,
-0.033813633024692535,
-0.21215848624706268,
0.28621235489845276,
-0.10304412245750427,
-0.18798039853572845,
-0.12009236216545105,
0.046823322772979736,
0.4193205237388611,
-0.21455369889736176,
0.15758994221687317,
-0.3543834090232849,
-0.30932241678237915,
-0.27777037024497986,
-0.06630374491214752,
0.22143235802650452,
-0.672246515750885,
0.004389484412968159,
-0.14754599332809448,
-0.02911343239247799,
0.05280744656920433,
0.29601913690567017,
-0.08100432902574539,
0.2062923014163971,
-0.07059221714735031,
0.030349209904670715,
0.13955312967300415,
-0.3906913101673126,
-0.11046354472637177,
0.10354441404342651,
-0.14200283586978912,
-0.24426479637622833,
0.07048094272613525,
-0.040339983999729156,
0.09173159301280975,
-0.0916256308555603,
0.05823083594441414,
-0.1318773776292801,
-0.19963160157203674,
-0.09513296186923981,
-0.1437045931816101,
0.0538102351129055,
0.6539096832275391,
0.09273272007703781,
-0.016799816861748695,
0.07564713805913925,
-0.10022789984941483,
-0.3448372781276703,
-0.042531568557024,
-0.1009543389081955,
0.20621949434280396,
0.21479029953479767,
0.055640604346990585,
0.2983594834804535,
0.1459522396326065,
-0.06447069346904755,
-0.4424961805343628,
0.10170096158981323,
-0.04005378112196922,
0.13956496119499207,
-0.14514334499835968,
-0.19234369695186615,
-0.3297654986381531,
-0.05378612130880356,
-0.20797739923000336,
0.01832341030240059,
0.16331322491168976,
0.06836050748825073,
-0.22142063081264496,
-0.020482944324612617,
0.014084731228649616,
-0.07588552683591843,
-0.017213372513651848,
0.10933033376932144,
-0.10402482002973557,
0.26565271615982056,
-0.09511733055114746,
0.1168939396739006,
-0.026739396154880524,
0.25311946868896484,
0.43260639905929565,
0.24005112051963806,
-0.046622101217508316,
0.36702385544776917,
0.0848604291677475,
-0.3270232081413269,
0.007840029895305634,
-0.1726589947938919,
0.018129581585526466,
-0.08387529104948044,
-0.0163266621530056,
0.11452510952949524,
0.27684012055397034,
-0.10859706997871399,
-0.08471912145614624,
0.14118549227714539,
-0.17720016837120056,
0.2762838900089264,
-0.16197457909584045,
0.20046067237854004,
0.25996318459510803,
-0.10939249396324158,
0.1251230537891388,
-0.2127114236354828,
0.21588031947612762,
-0.12979799509048462,
0.23431450128555298,
0.0071422988548874855,
-0.2617172598838806,
0.06771795451641083,
0.4220546782016754,
0.0015312841860577464,
-0.0035242880694568157,
0.009774230420589447,
-0.15866822004318237,
0.16574595868587494,
-0.013017691671848297,
0.595718264579773,
0.35284286737442017,
0.205955371260643,
-0.16387644410133362,
-0.058268580585718155,
-0.26225870847702026,
-0.13698343932628632,
0.21246269345283508,
0.09510132670402527,
0.029852598905563354,
0.05729620158672333,
0.02610979974269867,
-0.06643904745578766,
-0.17657293379306793,
-0.2433391660451889,
0.20823147892951965,
0.34643009305000305,
-0.5103117227554321,
-0.002906450070440769,
-0.34527212381362915,
-0.23186378180980682,
-0.31859782338142395,
-0.09879127889871597,
-0.23515866696834564,
-0.45904380083084106,
0.09043732285499573,
-0.07749122381210327,
-0.19039256870746613,
0.14507734775543213,
-0.037563350051641464,
0.00791588518768549,
-0.09107247740030289,
0.15205179154872894,
-0.09758404642343521,
-0.4702501893043518,
-0.20457129180431366,
0.18111225962638855,
0.007480352185666561,
0.04695437476038933,
0.4813607335090637,
-0.143199160695076,
-0.12455568462610245,
-0.07857241481542587,
-0.2953171133995056,
0.004026900511234999,
-0.2730652093887329,
0.13660450279712677,
0.1816229671239853,
0.10386001318693161,
0.008461100049316883,
-0.14868579804897308,
0.29301661252975464,
-0.07151931524276733,
0.024639904499053955,
0.10695718973875046,
0.045232538133859634,
-0.29207393527030945,
-0.26646947860717773,
-0.4750193655490875,
-0.47453048825263977,
-0.17748217284679413,
0.06694815307855606,
-0.07590755075216293,
-0.03352787345647812,
0.5198022127151489,
0.06844227761030197,
0.06568092852830887,
0.09314426779747009,
0.023253191262483597,
-0.34674328565597534,
-0.09354142844676971,
0.24904774129390717,
-0.17909251153469086,
-0.2102450281381607,
0.19605785608291626,
0.109309121966362,
0.11752880364656448,
-0.20393434166908264,
-0.3139221668243408,
0.07286331057548523,
-0.05760190263390541,
0.05894489958882332,
0.08131010830402374,
0.1948966234922409,
0.2138824611902237,
0.26710304617881775,
-0.14800302684307098,
-0.32705044746398926,
-0.3317107558250427,
0.13817375898361206,
-0.07196798175573349,
0.1306353658437729,
-0.10625556856393814,
0.29408565163612366,
-0.15208472311496735,
0.3265087604522705,
0.021773260086774826,
-0.2126564383506775,
0.19188947975635529,
-0.04784756898880005,
0.5207315683364868,
0.06838033348321915,
-0.4193750321865082,
0.06588488817214966,
-0.1191064789891243,
0.02694679982960224,
0.1760430485010147,
-0.3196396827697754,
0.03795647993683815,
-0.1479686200618744,
0.39460328221321106,
-0.24780510365962982,
-0.09965687990188599,
-0.10064342617988586,
-0.15016905963420868,
0.04052730277180672,
0.1168999969959259,
-0.04097595810890198,
-0.2084076702594757,
-0.19158531725406647,
-0.2512800097465515,
0.05782434716820717,
-0.09546219557523727,
-0.08755096048116684,
-0.5335752367973328,
-0.23349951207637787,
-0.16499629616737366,
0.2940983772277832,
0.15745164453983307,
0.33466392755508423,
-0.17851665616035461,
0.24547207355499268,
0.04775957763195038,
0.24590007960796356,
0.6149808764457703,
-0.48323866724967957,
0.1547020524740219,
0.22637251019477844,
0.39312776923179626,
-0.17800158262252808,
-0.12725569307804108,
-0.16925759613513947,
0.29472672939300537,
-0.29577749967575073,
0.025988716632127762,
-0.1555343121290207,
-0.09107734262943268,
0.2631010115146637,
0.15540540218353271,
-0.12238091230392456,
-0.314981073141098,
-0.230952650308609,
-0.1793929636478424,
-0.1272861212491989,
-0.05339647829532623,
0.06357742100954056,
0.1866387128829956,
-0.3784876763820648,
0.09864716976881027,
0.14082340896129608,
0.07350759953260422,
0.2715039849281311,
0.11863487213850021,
0.22324363887310028,
0.030276885256171227,
0.19736140966415405,
0.3174017667770386,
0.2587261199951172,
0.5099822282791138,
0.5483976006507874,
-0.3618467152118683,
-0.5113286972045898,
-0.11947935074567795,
-0.11476977169513702,
0.20070751011371613,
0.06500016897916794,
-0.14221541583538055,
0.16609644889831543,
-0.05064032971858978,
0.18545973300933838,
0.09619837999343872,
0.02230874076485634,
0.4922947883605957,
0.16057683527469635,
-0.48984843492507935,
-0.5388927459716797,
0.2713586688041687,
0.03924121707677841,
-0.047840915620326996,
0.12815505266189575,
0.07973120361566544,
-0.34075772762298584,
0.2059531807899475,
-0.1559935361146927,
0.6908734440803528,
0.08379849791526794,
-0.051031067967414856,
-0.017031138762831688,
-0.2261737883090973,
0.7132229208946228,
-0.11871124804019928,
0.0007707070908509195,
-0.36142972111701965,
-0.30746591091156006,
-0.0622297003865242,
-0.022119013592600822,
0.023475833237171173,
0.450693279504776,
-0.3085799813270569,
0.37883761525154114,
-0.32851332426071167,
0.20468570291996002,
0.028749734163284302,
-0.07406040281057358,
0.2494400590658188,
-0.13231314718723297,
-0.08248622715473175,
0.2010338306427002,
-0.157619446516037,
-0.13437534868717194,
-0.16743460297584534,
0.04190531745553017,
-0.23184797167778015,
-0.2680612802505493,
-0.2262599915266037,
0.08226059377193451,
-0.25382542610168457,
0.14157956838607788,
-0.0856545940041542,
-0.016718991100788116,
0.21681223809719086,
0.2025105506181717,
0.48632127046585083,
0.0789249986410141,
-0.14828579127788544,
0.18389585614204407,
0.04215006157755852,
0.13702285289764404,
0.034348372370004654,
0.05374768748879433,
0.4150616228580475,
0.11604932695627213,
-0.26998209953308105,
0.12853087484836578,
-0.07956812530755997,
0.17594999074935913,
-0.08703093975782394,
0.08389480412006378,
-0.09839654713869095,
-0.36537453532218933,
0.032646797597408295,
-0.07703931629657745,
0.22870928049087524,
-0.25377342104911804,
0.17734603583812714,
0.051982734352350235,
-0.046680621802806854,
0.21207952499389648,
-0.2636912763118744,
-0.1465979814529419,
-0.045746877789497375,
0.18923379480838776,
0.025964440777897835,
0.19335640966892242,
0.24724486470222473,
0.025972969830036163,
-0.3513919413089752,
-0.25651127099990845,
0.038952261209487915,
0.023998193442821503,
-0.677836537361145,
0.24598251283168793,
0.2533552944660187,
0.07594631612300873,
-0.057189520448446274,
0.22326934337615967,
-0.01583010144531727,
0.0710860937833786,
0.06101401522755623,
-0.5274378061294556,
-0.2186506688594818,
-0.004670771304517984,
-0.18475456535816193,
0.11692994832992554,
0.2478654682636261,
0.4110053777694702,
0.13375762104988098,
0.07145128399133682,
-0.36415424942970276,
-0.020953631028532982,
-0.1723954677581787,
0.29801294207572937,
0.15251024067401886,
0.019961336627602577,
0.28203174471855164,
-0.17880624532699585,
0.21821677684783936,
0.0007436689338646829,
0.007750303018838167,
-0.24981854856014252,
-0.1872100830078125,
0.11241065710783005,
0.13520900905132294,
-0.19721661508083344,
-0.06341098994016647,
-0.16438139975070953,
0.057837244123220444,
-0.07198324799537659,
-0.017251547425985336,
0.31057360768318176,
0.0032079345546662807,
0.3735310733318329,
-0.1509210169315338,
0.2327837496995926,
-0.046331100165843964,
0.21827778220176697,
0.012716840021312237,
-0.11400211602449417,
0.0742448940873146,
0.172965869307518,
-0.11276409029960632,
0.01947760209441185,
-0.17507928609848022,
0.08479433506727219,
-0.11700432747602463,
-0.11793006956577301,
0.13429364562034607,
-0.5689805746078491,
0.29595574736595154,
0.19363825023174286,
0.4493623673915863,
0.2781369984149933,
-0.18682533502578735,
-0.07076655328273773,
0.38261017203330994,
0.3079267144203186,
-0.36567002534866333,
-0.16836042702198029,
0.1630018949508667,
0.1655603051185608,
0.00039057957474142313,
0.07560659199953079,
0.06072518229484558,
-0.031059913337230682,
0.04489267244935036,
0.008086458779871464,
0.45543810725212097,
-0.4376544952392578,
0.2349056452512741,
0.526982307434082,
-0.06197047978639603,
0.09998403489589691,
0.4967949390411377,
0.17317639291286469,
0.06353333592414856,
0.5881969332695007,
0.03464969992637634,
0.17732051014900208,
0.1874696910381317,
-0.13796021044254303,
-0.0754198282957077,
-0.17221663892269135,
0.18091802299022675,
0.09697161614894867,
0.01885591447353363,
-0.04283132776618004,
-0.09544814378023148,
0.30113545060157776,
-0.38394486904144287,
0.004111276473850012,
-0.005769312847405672,
0.11119753122329712,
-0.22550341486930847,
-0.10601639002561569,
-0.15626324713230133,
-0.09870889037847519,
-0.16644632816314697,
-0.19731619954109192,
0.014028764329850674,
-0.1700502634048462,
0.3556349277496338,
-0.07427991926670074,
-0.19596470892429352,
-0.4565809965133667,
-0.1867782175540924,
0.3054199516773224,
0.0650811493396759,
-0.24731001257896423,
0.016320951282978058,
0.24875697493553162,
-0.1455010026693344,
0.321377158164978,
0.08623901754617691,
0.6039392352104187,
0.17137522995471954,
0.08979114890098572,
-0.34109216928482056,
-0.0972946435213089,
-0.08858039230108261,
0.15166358649730682,
0.21556773781776428,
0.045920465141534805,
-0.0368347093462944,
0.3922654688358307,
0.20187810063362122,
-0.17074967920780182,
0.3085801601409912,
0.3357427418231964,
0.2227049469947815,
-0.17061901092529297,
-0.06306669861078262,
-0.13396593928337097,
-0.25735533237457275,
-0.326639860868454,
0.10131919384002686,
-0.2697952091693878,
0.11595847457647324,
0.4622557461261749,
-0.04151396453380585,
0.08408986032009125,
-0.2942304313182831,
0.1462799608707428,
0.13171051442623138,
0.3118909001350403,
0.2739439308643341,
-0.047624342143535614,
-0.3456515669822693,
0.1615709662437439,
-0.5773788690567017,
0.12946052849292755,
-0.11869868636131287,
-0.1146918311715126,
-0.033454060554504395,
-0.1582234650850296,
0.1593203991651535,
0.02061443030834198,
0.3829503357410431,
0.188819020986557,
-0.015939809381961823,
-0.10867707431316376,
-0.11951394379138947,
-0.19319775700569153,
-0.08259972184896469,
-0.12190037965774536,
0.2010166347026825,
-0.32269033789634705,
-0.0618353970348835,
-0.14577741920948029,
0.038975734263658524,
-0.3498097360134125,
0.09371393173933029,
0.10629752278327942,
-0.020190004259347916,
0.3603176176548004,
0.1459478884935379,
0.76997309923172,
0.04881463944911957,
0.11503157764673233,
-0.09138646721839905,
-0.3536492884159088,
-0.404243141412735,
0.3688684403896332,
0.32559195160865784,
0.2565366327762604,
-0.10637769103050232,
0.009763806127011776,
-0.16448292136192322,
0.09450692683458328,
-0.043546468019485474,
0.32114776968955994,
-0.25447577238082886,
0.214504212141037,
-0.02401093952357769,
0.017140327021479607,
0.09913210570812225,
-0.05562606453895569,
-0.002646812703460455,
0.34105435013771057,
-0.20675647258758545,
-0.604709804058075,
0.619809627532959,
-0.2129315733909607,
-0.23955516517162323,
0.15372981131076813,
0.1545255184173584,
0.22137881815433502,
-0.21874772012233734,
-0.510052502155304,
0.024750813841819763,
0.37738266587257385,
0.019003426656126976,
-0.4423443675041199,
-0.003706148359924555,
-0.19275695085525513,
0.05144556239247322,
0.11356013268232346,
0.30625367164611816,
0.11662862449884415,
-0.19328555464744568,
0.19910407066345215,
-0.25434643030166626
] |
https://github.com/huggingface/datasets/issues/1989
|
Question/problem with dataset labels
|
Sorry for the confusion, the sample above was from a tsv that was used to derive the csv. Let me construct the csv again (I had remove it).
This is the line in the csv - this is the whole line:
```crawl-data/CC-MAIN-2017-47/segments/1510934806225.78/wet/CC-MAIN-20171120203833-20171120223833-00571.warc.wet.gz,Rose Blakey is an aspiring journalist. She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead,"('Rose', '', 'Blakey')",journalist,F,38,journalist,https://www.netgalley.com/catalog/book/121872,_ is desperate to escape the from the small Australian town in which _ lives. Rejection after rejection mean _ is stuck in what _ sees as a dead-end waitressing job., She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead-end waitressing job.```
|
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
| 139
|
Question/problem with dataset labels
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
Sorry for the confusion, the sample above was from a tsv that was used to derive the csv. Let me construct the csv again (I had remove it).
This is the line in the csv - this is the whole line:
```crawl-data/CC-MAIN-2017-47/segments/1510934806225.78/wet/CC-MAIN-20171120203833-20171120223833-00571.warc.wet.gz,Rose Blakey is an aspiring journalist. She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead,"('Rose', '', 'Blakey')",journalist,F,38,journalist,https://www.netgalley.com/catalog/book/121872,_ is desperate to escape the from the small Australian town in which _ lives. Rejection after rejection mean _ is stuck in what _ sees as a dead-end waitressing job., She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead-end waitressing job.```
|
[
0.17891347408294678,
-0.05732341110706329,
0.005179154220968485,
0.13436773419380188,
0.41135331988334656,
0.3502122461795807,
0.6419939398765564,
0.1637083739042282,
-0.16131801903247833,
0.07234936207532883,
0.17885370552539825,
0.06387592107057571,
-0.06077335402369499,
0.030525799840688705,
-0.13023114204406738,
-0.11937106400728226,
0.08908423036336899,
0.173479363322258,
0.18164248764514923,
-0.044466327875852585,
-0.2867426872253418,
-0.03982604295015335,
-0.15668001770973206,
0.36628860235214233,
-0.2972058057785034,
-0.3766840398311615,
0.21054299175739288,
-0.12052856385707855,
-0.11313280463218689,
-0.4633955657482147,
0.27180957794189453,
0.08612103015184402,
0.0026813640724867582,
0.40342751145362854,
-0.00010309632489224896,
0.05875691398978233,
0.29674792289733887,
0.15598881244659424,
-0.3984077572822571,
-0.4321288764476776,
-0.18936008214950562,
-0.02340724691748619,
0.034564148634672165,
-0.3044775724411011,
0.09798295050859451,
-0.28466835618019104,
-0.09054138511419296,
-0.27566608786582947,
0.10468693822622299,
0.4386066496372223,
0.32663995027542114,
0.23734048008918762,
-0.20649951696395874,
-0.2293027937412262,
0.2311529964208603,
0.12508909404277802,
-0.030508195981383324,
0.049476899206638336,
-0.1344391107559204,
-0.006456918548792601,
0.45157045125961304,
0.46091440320014954,
-0.2723958492279053,
0.264771431684494,
0.1353634148836136,
0.14636319875717163,
0.13772615790367126,
-0.391048789024353,
0.2763097286224365,
0.1961430460214615,
0.7452602386474609,
-0.29649990797042847,
-0.29439058899879456,
-0.1697036474943161,
0.1373763233423233,
-0.4167192876338959,
0.18133871257305145,
0.07008437067270279,
0.006375445984303951,
-0.047014687210321426,
-0.03316255286335945,
0.06102658808231354,
0.08074173331260681,
0.0881802961230278,
-0.05807413160800934,
0.03832928463816643,
-0.0986412912607193,
0.32881712913513184,
0.1125299260020256,
-0.07475035637617111,
0.2975311279296875,
-0.005993981380015612,
-0.08857189118862152,
0.041545283049345016,
-0.4325246512889862,
-0.029609162360429764,
-0.03688126802444458,
0.05167559161782265,
-0.11813832819461823,
-0.03874027729034424,
0.01838638447225094,
-0.37495556473731995,
-0.14743423461914062,
0.34034523367881775,
0.21513402462005615,
0.2662767469882965,
0.27069926261901855,
0.5616875886917114,
0.0911722481250763,
-0.07616250216960907,
0.03080311231315136,
-0.0558072105050087,
-0.0015746225835755467,
-0.46264347434043884,
0.2433207631111145,
0.09893110394477844,
0.29347071051597595,
-0.23985809087753296,
-0.5455209612846375,
0.19244229793548584,
-0.028102025389671326,
0.09409462660551071,
0.15411771833896637,
0.3049507737159729,
0.022121448069810867,
0.20651715993881226,
0.07934725284576416,
0.19360817968845367,
-0.00917017925530672,
-0.11720465868711472,
-0.20692431926727295,
0.09760840982198715,
-0.20027866959571838,
-0.15010692179203033,
0.05026973783969879,
-0.07205360382795334,
0.11245013773441315,
0.0640593096613884,
-0.0010052787838503718,
-0.07605742663145065,
-0.01630275882780552,
-0.3864647448062897,
-0.01274816133081913,
0.3588937819004059,
-0.10326281189918518,
0.420350581407547,
0.2520546317100525,
-0.41855016350746155,
0.05969962105154991,
0.18021129071712494,
-0.36885228753089905,
-0.033813633024692535,
-0.21215848624706268,
0.28621235489845276,
-0.10304412245750427,
-0.18798039853572845,
-0.12009236216545105,
0.046823322772979736,
0.4193205237388611,
-0.21455369889736176,
0.15758994221687317,
-0.3543834090232849,
-0.30932241678237915,
-0.27777037024497986,
-0.06630374491214752,
0.22143235802650452,
-0.672246515750885,
0.004389484412968159,
-0.14754599332809448,
-0.02911343239247799,
0.05280744656920433,
0.29601913690567017,
-0.08100432902574539,
0.2062923014163971,
-0.07059221714735031,
0.030349209904670715,
0.13955312967300415,
-0.3906913101673126,
-0.11046354472637177,
0.10354441404342651,
-0.14200283586978912,
-0.24426479637622833,
0.07048094272613525,
-0.040339983999729156,
0.09173159301280975,
-0.0916256308555603,
0.05823083594441414,
-0.1318773776292801,
-0.19963160157203674,
-0.09513296186923981,
-0.1437045931816101,
0.0538102351129055,
0.6539096832275391,
0.09273272007703781,
-0.016799816861748695,
0.07564713805913925,
-0.10022789984941483,
-0.3448372781276703,
-0.042531568557024,
-0.1009543389081955,
0.20621949434280396,
0.21479029953479767,
0.055640604346990585,
0.2983594834804535,
0.1459522396326065,
-0.06447069346904755,
-0.4424961805343628,
0.10170096158981323,
-0.04005378112196922,
0.13956496119499207,
-0.14514334499835968,
-0.19234369695186615,
-0.3297654986381531,
-0.05378612130880356,
-0.20797739923000336,
0.01832341030240059,
0.16331322491168976,
0.06836050748825073,
-0.22142063081264496,
-0.020482944324612617,
0.014084731228649616,
-0.07588552683591843,
-0.017213372513651848,
0.10933033376932144,
-0.10402482002973557,
0.26565271615982056,
-0.09511733055114746,
0.1168939396739006,
-0.026739396154880524,
0.25311946868896484,
0.43260639905929565,
0.24005112051963806,
-0.046622101217508316,
0.36702385544776917,
0.0848604291677475,
-0.3270232081413269,
0.007840029895305634,
-0.1726589947938919,
0.018129581585526466,
-0.08387529104948044,
-0.0163266621530056,
0.11452510952949524,
0.27684012055397034,
-0.10859706997871399,
-0.08471912145614624,
0.14118549227714539,
-0.17720016837120056,
0.2762838900089264,
-0.16197457909584045,
0.20046067237854004,
0.25996318459510803,
-0.10939249396324158,
0.1251230537891388,
-0.2127114236354828,
0.21588031947612762,
-0.12979799509048462,
0.23431450128555298,
0.0071422988548874855,
-0.2617172598838806,
0.06771795451641083,
0.4220546782016754,
0.0015312841860577464,
-0.0035242880694568157,
0.009774230420589447,
-0.15866822004318237,
0.16574595868587494,
-0.013017691671848297,
0.595718264579773,
0.35284286737442017,
0.205955371260643,
-0.16387644410133362,
-0.058268580585718155,
-0.26225870847702026,
-0.13698343932628632,
0.21246269345283508,
0.09510132670402527,
0.029852598905563354,
0.05729620158672333,
0.02610979974269867,
-0.06643904745578766,
-0.17657293379306793,
-0.2433391660451889,
0.20823147892951965,
0.34643009305000305,
-0.5103117227554321,
-0.002906450070440769,
-0.34527212381362915,
-0.23186378180980682,
-0.31859782338142395,
-0.09879127889871597,
-0.23515866696834564,
-0.45904380083084106,
0.09043732285499573,
-0.07749122381210327,
-0.19039256870746613,
0.14507734775543213,
-0.037563350051641464,
0.00791588518768549,
-0.09107247740030289,
0.15205179154872894,
-0.09758404642343521,
-0.4702501893043518,
-0.20457129180431366,
0.18111225962638855,
0.007480352185666561,
0.04695437476038933,
0.4813607335090637,
-0.143199160695076,
-0.12455568462610245,
-0.07857241481542587,
-0.2953171133995056,
0.004026900511234999,
-0.2730652093887329,
0.13660450279712677,
0.1816229671239853,
0.10386001318693161,
0.008461100049316883,
-0.14868579804897308,
0.29301661252975464,
-0.07151931524276733,
0.024639904499053955,
0.10695718973875046,
0.045232538133859634,
-0.29207393527030945,
-0.26646947860717773,
-0.4750193655490875,
-0.47453048825263977,
-0.17748217284679413,
0.06694815307855606,
-0.07590755075216293,
-0.03352787345647812,
0.5198022127151489,
0.06844227761030197,
0.06568092852830887,
0.09314426779747009,
0.023253191262483597,
-0.34674328565597534,
-0.09354142844676971,
0.24904774129390717,
-0.17909251153469086,
-0.2102450281381607,
0.19605785608291626,
0.109309121966362,
0.11752880364656448,
-0.20393434166908264,
-0.3139221668243408,
0.07286331057548523,
-0.05760190263390541,
0.05894489958882332,
0.08131010830402374,
0.1948966234922409,
0.2138824611902237,
0.26710304617881775,
-0.14800302684307098,
-0.32705044746398926,
-0.3317107558250427,
0.13817375898361206,
-0.07196798175573349,
0.1306353658437729,
-0.10625556856393814,
0.29408565163612366,
-0.15208472311496735,
0.3265087604522705,
0.021773260086774826,
-0.2126564383506775,
0.19188947975635529,
-0.04784756898880005,
0.5207315683364868,
0.06838033348321915,
-0.4193750321865082,
0.06588488817214966,
-0.1191064789891243,
0.02694679982960224,
0.1760430485010147,
-0.3196396827697754,
0.03795647993683815,
-0.1479686200618744,
0.39460328221321106,
-0.24780510365962982,
-0.09965687990188599,
-0.10064342617988586,
-0.15016905963420868,
0.04052730277180672,
0.1168999969959259,
-0.04097595810890198,
-0.2084076702594757,
-0.19158531725406647,
-0.2512800097465515,
0.05782434716820717,
-0.09546219557523727,
-0.08755096048116684,
-0.5335752367973328,
-0.23349951207637787,
-0.16499629616737366,
0.2940983772277832,
0.15745164453983307,
0.33466392755508423,
-0.17851665616035461,
0.24547207355499268,
0.04775957763195038,
0.24590007960796356,
0.6149808764457703,
-0.48323866724967957,
0.1547020524740219,
0.22637251019477844,
0.39312776923179626,
-0.17800158262252808,
-0.12725569307804108,
-0.16925759613513947,
0.29472672939300537,
-0.29577749967575073,
0.025988716632127762,
-0.1555343121290207,
-0.09107734262943268,
0.2631010115146637,
0.15540540218353271,
-0.12238091230392456,
-0.314981073141098,
-0.230952650308609,
-0.1793929636478424,
-0.1272861212491989,
-0.05339647829532623,
0.06357742100954056,
0.1866387128829956,
-0.3784876763820648,
0.09864716976881027,
0.14082340896129608,
0.07350759953260422,
0.2715039849281311,
0.11863487213850021,
0.22324363887310028,
0.030276885256171227,
0.19736140966415405,
0.3174017667770386,
0.2587261199951172,
0.5099822282791138,
0.5483976006507874,
-0.3618467152118683,
-0.5113286972045898,
-0.11947935074567795,
-0.11476977169513702,
0.20070751011371613,
0.06500016897916794,
-0.14221541583538055,
0.16609644889831543,
-0.05064032971858978,
0.18545973300933838,
0.09619837999343872,
0.02230874076485634,
0.4922947883605957,
0.16057683527469635,
-0.48984843492507935,
-0.5388927459716797,
0.2713586688041687,
0.03924121707677841,
-0.047840915620326996,
0.12815505266189575,
0.07973120361566544,
-0.34075772762298584,
0.2059531807899475,
-0.1559935361146927,
0.6908734440803528,
0.08379849791526794,
-0.051031067967414856,
-0.017031138762831688,
-0.2261737883090973,
0.7132229208946228,
-0.11871124804019928,
0.0007707070908509195,
-0.36142972111701965,
-0.30746591091156006,
-0.0622297003865242,
-0.022119013592600822,
0.023475833237171173,
0.450693279504776,
-0.3085799813270569,
0.37883761525154114,
-0.32851332426071167,
0.20468570291996002,
0.028749734163284302,
-0.07406040281057358,
0.2494400590658188,
-0.13231314718723297,
-0.08248622715473175,
0.2010338306427002,
-0.157619446516037,
-0.13437534868717194,
-0.16743460297584534,
0.04190531745553017,
-0.23184797167778015,
-0.2680612802505493,
-0.2262599915266037,
0.08226059377193451,
-0.25382542610168457,
0.14157956838607788,
-0.0856545940041542,
-0.016718991100788116,
0.21681223809719086,
0.2025105506181717,
0.48632127046585083,
0.0789249986410141,
-0.14828579127788544,
0.18389585614204407,
0.04215006157755852,
0.13702285289764404,
0.034348372370004654,
0.05374768748879433,
0.4150616228580475,
0.11604932695627213,
-0.26998209953308105,
0.12853087484836578,
-0.07956812530755997,
0.17594999074935913,
-0.08703093975782394,
0.08389480412006378,
-0.09839654713869095,
-0.36537453532218933,
0.032646797597408295,
-0.07703931629657745,
0.22870928049087524,
-0.25377342104911804,
0.17734603583812714,
0.051982734352350235,
-0.046680621802806854,
0.21207952499389648,
-0.2636912763118744,
-0.1465979814529419,
-0.045746877789497375,
0.18923379480838776,
0.025964440777897835,
0.19335640966892242,
0.24724486470222473,
0.025972969830036163,
-0.3513919413089752,
-0.25651127099990845,
0.038952261209487915,
0.023998193442821503,
-0.677836537361145,
0.24598251283168793,
0.2533552944660187,
0.07594631612300873,
-0.057189520448446274,
0.22326934337615967,
-0.01583010144531727,
0.0710860937833786,
0.06101401522755623,
-0.5274378061294556,
-0.2186506688594818,
-0.004670771304517984,
-0.18475456535816193,
0.11692994832992554,
0.2478654682636261,
0.4110053777694702,
0.13375762104988098,
0.07145128399133682,
-0.36415424942970276,
-0.020953631028532982,
-0.1723954677581787,
0.29801294207572937,
0.15251024067401886,
0.019961336627602577,
0.28203174471855164,
-0.17880624532699585,
0.21821677684783936,
0.0007436689338646829,
0.007750303018838167,
-0.24981854856014252,
-0.1872100830078125,
0.11241065710783005,
0.13520900905132294,
-0.19721661508083344,
-0.06341098994016647,
-0.16438139975070953,
0.057837244123220444,
-0.07198324799537659,
-0.017251547425985336,
0.31057360768318176,
0.0032079345546662807,
0.3735310733318329,
-0.1509210169315338,
0.2327837496995926,
-0.046331100165843964,
0.21827778220176697,
0.012716840021312237,
-0.11400211602449417,
0.0742448940873146,
0.172965869307518,
-0.11276409029960632,
0.01947760209441185,
-0.17507928609848022,
0.08479433506727219,
-0.11700432747602463,
-0.11793006956577301,
0.13429364562034607,
-0.5689805746078491,
0.29595574736595154,
0.19363825023174286,
0.4493623673915863,
0.2781369984149933,
-0.18682533502578735,
-0.07076655328273773,
0.38261017203330994,
0.3079267144203186,
-0.36567002534866333,
-0.16836042702198029,
0.1630018949508667,
0.1655603051185608,
0.00039057957474142313,
0.07560659199953079,
0.06072518229484558,
-0.031059913337230682,
0.04489267244935036,
0.008086458779871464,
0.45543810725212097,
-0.4376544952392578,
0.2349056452512741,
0.526982307434082,
-0.06197047978639603,
0.09998403489589691,
0.4967949390411377,
0.17317639291286469,
0.06353333592414856,
0.5881969332695007,
0.03464969992637634,
0.17732051014900208,
0.1874696910381317,
-0.13796021044254303,
-0.0754198282957077,
-0.17221663892269135,
0.18091802299022675,
0.09697161614894867,
0.01885591447353363,
-0.04283132776618004,
-0.09544814378023148,
0.30113545060157776,
-0.38394486904144287,
0.004111276473850012,
-0.005769312847405672,
0.11119753122329712,
-0.22550341486930847,
-0.10601639002561569,
-0.15626324713230133,
-0.09870889037847519,
-0.16644632816314697,
-0.19731619954109192,
0.014028764329850674,
-0.1700502634048462,
0.3556349277496338,
-0.07427991926670074,
-0.19596470892429352,
-0.4565809965133667,
-0.1867782175540924,
0.3054199516773224,
0.0650811493396759,
-0.24731001257896423,
0.016320951282978058,
0.24875697493553162,
-0.1455010026693344,
0.321377158164978,
0.08623901754617691,
0.6039392352104187,
0.17137522995471954,
0.08979114890098572,
-0.34109216928482056,
-0.0972946435213089,
-0.08858039230108261,
0.15166358649730682,
0.21556773781776428,
0.045920465141534805,
-0.0368347093462944,
0.3922654688358307,
0.20187810063362122,
-0.17074967920780182,
0.3085801601409912,
0.3357427418231964,
0.2227049469947815,
-0.17061901092529297,
-0.06306669861078262,
-0.13396593928337097,
-0.25735533237457275,
-0.326639860868454,
0.10131919384002686,
-0.2697952091693878,
0.11595847457647324,
0.4622557461261749,
-0.04151396453380585,
0.08408986032009125,
-0.2942304313182831,
0.1462799608707428,
0.13171051442623138,
0.3118909001350403,
0.2739439308643341,
-0.047624342143535614,
-0.3456515669822693,
0.1615709662437439,
-0.5773788690567017,
0.12946052849292755,
-0.11869868636131287,
-0.1146918311715126,
-0.033454060554504395,
-0.1582234650850296,
0.1593203991651535,
0.02061443030834198,
0.3829503357410431,
0.188819020986557,
-0.015939809381961823,
-0.10867707431316376,
-0.11951394379138947,
-0.19319775700569153,
-0.08259972184896469,
-0.12190037965774536,
0.2010166347026825,
-0.32269033789634705,
-0.0618353970348835,
-0.14577741920948029,
0.038975734263658524,
-0.3498097360134125,
0.09371393173933029,
0.10629752278327942,
-0.020190004259347916,
0.3603176176548004,
0.1459478884935379,
0.76997309923172,
0.04881463944911957,
0.11503157764673233,
-0.09138646721839905,
-0.3536492884159088,
-0.404243141412735,
0.3688684403896332,
0.32559195160865784,
0.2565366327762604,
-0.10637769103050232,
0.009763806127011776,
-0.16448292136192322,
0.09450692683458328,
-0.043546468019485474,
0.32114776968955994,
-0.25447577238082886,
0.214504212141037,
-0.02401093952357769,
0.017140327021479607,
0.09913210570812225,
-0.05562606453895569,
-0.002646812703460455,
0.34105435013771057,
-0.20675647258758545,
-0.604709804058075,
0.619809627532959,
-0.2129315733909607,
-0.23955516517162323,
0.15372981131076813,
0.1545255184173584,
0.22137881815433502,
-0.21874772012233734,
-0.510052502155304,
0.024750813841819763,
0.37738266587257385,
0.019003426656126976,
-0.4423443675041199,
-0.003706148359924555,
-0.19275695085525513,
0.05144556239247322,
0.11356013268232346,
0.30625367164611816,
0.11662862449884415,
-0.19328555464744568,
0.19910407066345215,
-0.25434643030166626
] |
https://github.com/huggingface/datasets/issues/1989
|
Question/problem with dataset labels
|
Hi,
Just in case you want to use tsv directly, you can use the separator argument while loading the dataset.
```python
d = load_dataset("csv",data_files=['test.csv'],sep="\t")
```
Additionally, I don't face the issues with the following csv (same as the one you provided):
```sh
link1,text1,info1,info2,info3,info4,info5,link2,text2,text3
crawl-data/CC-MAIN-2017-47/segments/1510934806225.78/wet/CC-MAIN-20171120203833-20171120223833-00571.warc.wet.gz,Rose Blakey is an aspiring journalist. She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead,"('Rose', '', 'Blakey')",journalist,F,38,journalist,https://www.netgalley.com/catalog/book/121872,_ is desperate to escape the from the small Australian town in which _ lives. Rejection after rejection mean _ is stuck in what _ sees as a dead-end waitressing job., She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead-end waitressing job.
```
Output after loading:
```sh
{'link1': 'crawl-data/CC-MAIN-2017-47/segments/1510934806225.78/wet/CC-MAIN-20171120203833-20171120223833-00571.warc.wet.gz', 'text1': 'Rose Blakey is an aspiring journalist. She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead', 'info1': "('Rose', '', 'Blakey')", 'info2': 'journalist', 'info3': 'F', 'info4': 38, 'info5': 'journalist', 'link2': 'https://www.netgalley.com/catalog/book/121872', 'text2': '_ is desperate to escape the from the small Australian town in which _ lives. Rejection after rejection mean _ is stuck in what _ sees as a dead-end waitressing job.', 'text3': ' She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead-end waitressing job.'}
```
Can you check once if the tsv works for you directly using the separator argument? The conversion from tsv to csv could create issues, I'm only guessing though.
|
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
| 292
|
Question/problem with dataset labels
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
Hi,
Just in case you want to use tsv directly, you can use the separator argument while loading the dataset.
```python
d = load_dataset("csv",data_files=['test.csv'],sep="\t")
```
Additionally, I don't face the issues with the following csv (same as the one you provided):
```sh
link1,text1,info1,info2,info3,info4,info5,link2,text2,text3
crawl-data/CC-MAIN-2017-47/segments/1510934806225.78/wet/CC-MAIN-20171120203833-20171120223833-00571.warc.wet.gz,Rose Blakey is an aspiring journalist. She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead,"('Rose', '', 'Blakey')",journalist,F,38,journalist,https://www.netgalley.com/catalog/book/121872,_ is desperate to escape the from the small Australian town in which _ lives. Rejection after rejection mean _ is stuck in what _ sees as a dead-end waitressing job., She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead-end waitressing job.
```
Output after loading:
```sh
{'link1': 'crawl-data/CC-MAIN-2017-47/segments/1510934806225.78/wet/CC-MAIN-20171120203833-20171120223833-00571.warc.wet.gz', 'text1': 'Rose Blakey is an aspiring journalist. She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead', 'info1': "('Rose', '', 'Blakey')", 'info2': 'journalist', 'info3': 'F', 'info4': 38, 'info5': 'journalist', 'link2': 'https://www.netgalley.com/catalog/book/121872', 'text2': '_ is desperate to escape the from the small Australian town in which _ lives. Rejection after rejection mean _ is stuck in what _ sees as a dead-end waitressing job.', 'text3': ' She is desperate to escape the from the small Australian town in which she lives. Rejection after rejection mean she is stuck in what she sees as a dead-end waitressing job.'}
```
Can you check once if the tsv works for you directly using the separator argument? The conversion from tsv to csv could create issues, I'm only guessing though.
|
[
0.17891347408294678,
-0.05732341110706329,
0.005179154220968485,
0.13436773419380188,
0.41135331988334656,
0.3502122461795807,
0.6419939398765564,
0.1637083739042282,
-0.16131801903247833,
0.07234936207532883,
0.17885370552539825,
0.06387592107057571,
-0.06077335402369499,
0.030525799840688705,
-0.13023114204406738,
-0.11937106400728226,
0.08908423036336899,
0.173479363322258,
0.18164248764514923,
-0.044466327875852585,
-0.2867426872253418,
-0.03982604295015335,
-0.15668001770973206,
0.36628860235214233,
-0.2972058057785034,
-0.3766840398311615,
0.21054299175739288,
-0.12052856385707855,
-0.11313280463218689,
-0.4633955657482147,
0.27180957794189453,
0.08612103015184402,
0.0026813640724867582,
0.40342751145362854,
-0.00010309632489224896,
0.05875691398978233,
0.29674792289733887,
0.15598881244659424,
-0.3984077572822571,
-0.4321288764476776,
-0.18936008214950562,
-0.02340724691748619,
0.034564148634672165,
-0.3044775724411011,
0.09798295050859451,
-0.28466835618019104,
-0.09054138511419296,
-0.27566608786582947,
0.10468693822622299,
0.4386066496372223,
0.32663995027542114,
0.23734048008918762,
-0.20649951696395874,
-0.2293027937412262,
0.2311529964208603,
0.12508909404277802,
-0.030508195981383324,
0.049476899206638336,
-0.1344391107559204,
-0.006456918548792601,
0.45157045125961304,
0.46091440320014954,
-0.2723958492279053,
0.264771431684494,
0.1353634148836136,
0.14636319875717163,
0.13772615790367126,
-0.391048789024353,
0.2763097286224365,
0.1961430460214615,
0.7452602386474609,
-0.29649990797042847,
-0.29439058899879456,
-0.1697036474943161,
0.1373763233423233,
-0.4167192876338959,
0.18133871257305145,
0.07008437067270279,
0.006375445984303951,
-0.047014687210321426,
-0.03316255286335945,
0.06102658808231354,
0.08074173331260681,
0.0881802961230278,
-0.05807413160800934,
0.03832928463816643,
-0.0986412912607193,
0.32881712913513184,
0.1125299260020256,
-0.07475035637617111,
0.2975311279296875,
-0.005993981380015612,
-0.08857189118862152,
0.041545283049345016,
-0.4325246512889862,
-0.029609162360429764,
-0.03688126802444458,
0.05167559161782265,
-0.11813832819461823,
-0.03874027729034424,
0.01838638447225094,
-0.37495556473731995,
-0.14743423461914062,
0.34034523367881775,
0.21513402462005615,
0.2662767469882965,
0.27069926261901855,
0.5616875886917114,
0.0911722481250763,
-0.07616250216960907,
0.03080311231315136,
-0.0558072105050087,
-0.0015746225835755467,
-0.46264347434043884,
0.2433207631111145,
0.09893110394477844,
0.29347071051597595,
-0.23985809087753296,
-0.5455209612846375,
0.19244229793548584,
-0.028102025389671326,
0.09409462660551071,
0.15411771833896637,
0.3049507737159729,
0.022121448069810867,
0.20651715993881226,
0.07934725284576416,
0.19360817968845367,
-0.00917017925530672,
-0.11720465868711472,
-0.20692431926727295,
0.09760840982198715,
-0.20027866959571838,
-0.15010692179203033,
0.05026973783969879,
-0.07205360382795334,
0.11245013773441315,
0.0640593096613884,
-0.0010052787838503718,
-0.07605742663145065,
-0.01630275882780552,
-0.3864647448062897,
-0.01274816133081913,
0.3588937819004059,
-0.10326281189918518,
0.420350581407547,
0.2520546317100525,
-0.41855016350746155,
0.05969962105154991,
0.18021129071712494,
-0.36885228753089905,
-0.033813633024692535,
-0.21215848624706268,
0.28621235489845276,
-0.10304412245750427,
-0.18798039853572845,
-0.12009236216545105,
0.046823322772979736,
0.4193205237388611,
-0.21455369889736176,
0.15758994221687317,
-0.3543834090232849,
-0.30932241678237915,
-0.27777037024497986,
-0.06630374491214752,
0.22143235802650452,
-0.672246515750885,
0.004389484412968159,
-0.14754599332809448,
-0.02911343239247799,
0.05280744656920433,
0.29601913690567017,
-0.08100432902574539,
0.2062923014163971,
-0.07059221714735031,
0.030349209904670715,
0.13955312967300415,
-0.3906913101673126,
-0.11046354472637177,
0.10354441404342651,
-0.14200283586978912,
-0.24426479637622833,
0.07048094272613525,
-0.040339983999729156,
0.09173159301280975,
-0.0916256308555603,
0.05823083594441414,
-0.1318773776292801,
-0.19963160157203674,
-0.09513296186923981,
-0.1437045931816101,
0.0538102351129055,
0.6539096832275391,
0.09273272007703781,
-0.016799816861748695,
0.07564713805913925,
-0.10022789984941483,
-0.3448372781276703,
-0.042531568557024,
-0.1009543389081955,
0.20621949434280396,
0.21479029953479767,
0.055640604346990585,
0.2983594834804535,
0.1459522396326065,
-0.06447069346904755,
-0.4424961805343628,
0.10170096158981323,
-0.04005378112196922,
0.13956496119499207,
-0.14514334499835968,
-0.19234369695186615,
-0.3297654986381531,
-0.05378612130880356,
-0.20797739923000336,
0.01832341030240059,
0.16331322491168976,
0.06836050748825073,
-0.22142063081264496,
-0.020482944324612617,
0.014084731228649616,
-0.07588552683591843,
-0.017213372513651848,
0.10933033376932144,
-0.10402482002973557,
0.26565271615982056,
-0.09511733055114746,
0.1168939396739006,
-0.026739396154880524,
0.25311946868896484,
0.43260639905929565,
0.24005112051963806,
-0.046622101217508316,
0.36702385544776917,
0.0848604291677475,
-0.3270232081413269,
0.007840029895305634,
-0.1726589947938919,
0.018129581585526466,
-0.08387529104948044,
-0.0163266621530056,
0.11452510952949524,
0.27684012055397034,
-0.10859706997871399,
-0.08471912145614624,
0.14118549227714539,
-0.17720016837120056,
0.2762838900089264,
-0.16197457909584045,
0.20046067237854004,
0.25996318459510803,
-0.10939249396324158,
0.1251230537891388,
-0.2127114236354828,
0.21588031947612762,
-0.12979799509048462,
0.23431450128555298,
0.0071422988548874855,
-0.2617172598838806,
0.06771795451641083,
0.4220546782016754,
0.0015312841860577464,
-0.0035242880694568157,
0.009774230420589447,
-0.15866822004318237,
0.16574595868587494,
-0.013017691671848297,
0.595718264579773,
0.35284286737442017,
0.205955371260643,
-0.16387644410133362,
-0.058268580585718155,
-0.26225870847702026,
-0.13698343932628632,
0.21246269345283508,
0.09510132670402527,
0.029852598905563354,
0.05729620158672333,
0.02610979974269867,
-0.06643904745578766,
-0.17657293379306793,
-0.2433391660451889,
0.20823147892951965,
0.34643009305000305,
-0.5103117227554321,
-0.002906450070440769,
-0.34527212381362915,
-0.23186378180980682,
-0.31859782338142395,
-0.09879127889871597,
-0.23515866696834564,
-0.45904380083084106,
0.09043732285499573,
-0.07749122381210327,
-0.19039256870746613,
0.14507734775543213,
-0.037563350051641464,
0.00791588518768549,
-0.09107247740030289,
0.15205179154872894,
-0.09758404642343521,
-0.4702501893043518,
-0.20457129180431366,
0.18111225962638855,
0.007480352185666561,
0.04695437476038933,
0.4813607335090637,
-0.143199160695076,
-0.12455568462610245,
-0.07857241481542587,
-0.2953171133995056,
0.004026900511234999,
-0.2730652093887329,
0.13660450279712677,
0.1816229671239853,
0.10386001318693161,
0.008461100049316883,
-0.14868579804897308,
0.29301661252975464,
-0.07151931524276733,
0.024639904499053955,
0.10695718973875046,
0.045232538133859634,
-0.29207393527030945,
-0.26646947860717773,
-0.4750193655490875,
-0.47453048825263977,
-0.17748217284679413,
0.06694815307855606,
-0.07590755075216293,
-0.03352787345647812,
0.5198022127151489,
0.06844227761030197,
0.06568092852830887,
0.09314426779747009,
0.023253191262483597,
-0.34674328565597534,
-0.09354142844676971,
0.24904774129390717,
-0.17909251153469086,
-0.2102450281381607,
0.19605785608291626,
0.109309121966362,
0.11752880364656448,
-0.20393434166908264,
-0.3139221668243408,
0.07286331057548523,
-0.05760190263390541,
0.05894489958882332,
0.08131010830402374,
0.1948966234922409,
0.2138824611902237,
0.26710304617881775,
-0.14800302684307098,
-0.32705044746398926,
-0.3317107558250427,
0.13817375898361206,
-0.07196798175573349,
0.1306353658437729,
-0.10625556856393814,
0.29408565163612366,
-0.15208472311496735,
0.3265087604522705,
0.021773260086774826,
-0.2126564383506775,
0.19188947975635529,
-0.04784756898880005,
0.5207315683364868,
0.06838033348321915,
-0.4193750321865082,
0.06588488817214966,
-0.1191064789891243,
0.02694679982960224,
0.1760430485010147,
-0.3196396827697754,
0.03795647993683815,
-0.1479686200618744,
0.39460328221321106,
-0.24780510365962982,
-0.09965687990188599,
-0.10064342617988586,
-0.15016905963420868,
0.04052730277180672,
0.1168999969959259,
-0.04097595810890198,
-0.2084076702594757,
-0.19158531725406647,
-0.2512800097465515,
0.05782434716820717,
-0.09546219557523727,
-0.08755096048116684,
-0.5335752367973328,
-0.23349951207637787,
-0.16499629616737366,
0.2940983772277832,
0.15745164453983307,
0.33466392755508423,
-0.17851665616035461,
0.24547207355499268,
0.04775957763195038,
0.24590007960796356,
0.6149808764457703,
-0.48323866724967957,
0.1547020524740219,
0.22637251019477844,
0.39312776923179626,
-0.17800158262252808,
-0.12725569307804108,
-0.16925759613513947,
0.29472672939300537,
-0.29577749967575073,
0.025988716632127762,
-0.1555343121290207,
-0.09107734262943268,
0.2631010115146637,
0.15540540218353271,
-0.12238091230392456,
-0.314981073141098,
-0.230952650308609,
-0.1793929636478424,
-0.1272861212491989,
-0.05339647829532623,
0.06357742100954056,
0.1866387128829956,
-0.3784876763820648,
0.09864716976881027,
0.14082340896129608,
0.07350759953260422,
0.2715039849281311,
0.11863487213850021,
0.22324363887310028,
0.030276885256171227,
0.19736140966415405,
0.3174017667770386,
0.2587261199951172,
0.5099822282791138,
0.5483976006507874,
-0.3618467152118683,
-0.5113286972045898,
-0.11947935074567795,
-0.11476977169513702,
0.20070751011371613,
0.06500016897916794,
-0.14221541583538055,
0.16609644889831543,
-0.05064032971858978,
0.18545973300933838,
0.09619837999343872,
0.02230874076485634,
0.4922947883605957,
0.16057683527469635,
-0.48984843492507935,
-0.5388927459716797,
0.2713586688041687,
0.03924121707677841,
-0.047840915620326996,
0.12815505266189575,
0.07973120361566544,
-0.34075772762298584,
0.2059531807899475,
-0.1559935361146927,
0.6908734440803528,
0.08379849791526794,
-0.051031067967414856,
-0.017031138762831688,
-0.2261737883090973,
0.7132229208946228,
-0.11871124804019928,
0.0007707070908509195,
-0.36142972111701965,
-0.30746591091156006,
-0.0622297003865242,
-0.022119013592600822,
0.023475833237171173,
0.450693279504776,
-0.3085799813270569,
0.37883761525154114,
-0.32851332426071167,
0.20468570291996002,
0.028749734163284302,
-0.07406040281057358,
0.2494400590658188,
-0.13231314718723297,
-0.08248622715473175,
0.2010338306427002,
-0.157619446516037,
-0.13437534868717194,
-0.16743460297584534,
0.04190531745553017,
-0.23184797167778015,
-0.2680612802505493,
-0.2262599915266037,
0.08226059377193451,
-0.25382542610168457,
0.14157956838607788,
-0.0856545940041542,
-0.016718991100788116,
0.21681223809719086,
0.2025105506181717,
0.48632127046585083,
0.0789249986410141,
-0.14828579127788544,
0.18389585614204407,
0.04215006157755852,
0.13702285289764404,
0.034348372370004654,
0.05374768748879433,
0.4150616228580475,
0.11604932695627213,
-0.26998209953308105,
0.12853087484836578,
-0.07956812530755997,
0.17594999074935913,
-0.08703093975782394,
0.08389480412006378,
-0.09839654713869095,
-0.36537453532218933,
0.032646797597408295,
-0.07703931629657745,
0.22870928049087524,
-0.25377342104911804,
0.17734603583812714,
0.051982734352350235,
-0.046680621802806854,
0.21207952499389648,
-0.2636912763118744,
-0.1465979814529419,
-0.045746877789497375,
0.18923379480838776,
0.025964440777897835,
0.19335640966892242,
0.24724486470222473,
0.025972969830036163,
-0.3513919413089752,
-0.25651127099990845,
0.038952261209487915,
0.023998193442821503,
-0.677836537361145,
0.24598251283168793,
0.2533552944660187,
0.07594631612300873,
-0.057189520448446274,
0.22326934337615967,
-0.01583010144531727,
0.0710860937833786,
0.06101401522755623,
-0.5274378061294556,
-0.2186506688594818,
-0.004670771304517984,
-0.18475456535816193,
0.11692994832992554,
0.2478654682636261,
0.4110053777694702,
0.13375762104988098,
0.07145128399133682,
-0.36415424942970276,
-0.020953631028532982,
-0.1723954677581787,
0.29801294207572937,
0.15251024067401886,
0.019961336627602577,
0.28203174471855164,
-0.17880624532699585,
0.21821677684783936,
0.0007436689338646829,
0.007750303018838167,
-0.24981854856014252,
-0.1872100830078125,
0.11241065710783005,
0.13520900905132294,
-0.19721661508083344,
-0.06341098994016647,
-0.16438139975070953,
0.057837244123220444,
-0.07198324799537659,
-0.017251547425985336,
0.31057360768318176,
0.0032079345546662807,
0.3735310733318329,
-0.1509210169315338,
0.2327837496995926,
-0.046331100165843964,
0.21827778220176697,
0.012716840021312237,
-0.11400211602449417,
0.0742448940873146,
0.172965869307518,
-0.11276409029960632,
0.01947760209441185,
-0.17507928609848022,
0.08479433506727219,
-0.11700432747602463,
-0.11793006956577301,
0.13429364562034607,
-0.5689805746078491,
0.29595574736595154,
0.19363825023174286,
0.4493623673915863,
0.2781369984149933,
-0.18682533502578735,
-0.07076655328273773,
0.38261017203330994,
0.3079267144203186,
-0.36567002534866333,
-0.16836042702198029,
0.1630018949508667,
0.1655603051185608,
0.00039057957474142313,
0.07560659199953079,
0.06072518229484558,
-0.031059913337230682,
0.04489267244935036,
0.008086458779871464,
0.45543810725212097,
-0.4376544952392578,
0.2349056452512741,
0.526982307434082,
-0.06197047978639603,
0.09998403489589691,
0.4967949390411377,
0.17317639291286469,
0.06353333592414856,
0.5881969332695007,
0.03464969992637634,
0.17732051014900208,
0.1874696910381317,
-0.13796021044254303,
-0.0754198282957077,
-0.17221663892269135,
0.18091802299022675,
0.09697161614894867,
0.01885591447353363,
-0.04283132776618004,
-0.09544814378023148,
0.30113545060157776,
-0.38394486904144287,
0.004111276473850012,
-0.005769312847405672,
0.11119753122329712,
-0.22550341486930847,
-0.10601639002561569,
-0.15626324713230133,
-0.09870889037847519,
-0.16644632816314697,
-0.19731619954109192,
0.014028764329850674,
-0.1700502634048462,
0.3556349277496338,
-0.07427991926670074,
-0.19596470892429352,
-0.4565809965133667,
-0.1867782175540924,
0.3054199516773224,
0.0650811493396759,
-0.24731001257896423,
0.016320951282978058,
0.24875697493553162,
-0.1455010026693344,
0.321377158164978,
0.08623901754617691,
0.6039392352104187,
0.17137522995471954,
0.08979114890098572,
-0.34109216928482056,
-0.0972946435213089,
-0.08858039230108261,
0.15166358649730682,
0.21556773781776428,
0.045920465141534805,
-0.0368347093462944,
0.3922654688358307,
0.20187810063362122,
-0.17074967920780182,
0.3085801601409912,
0.3357427418231964,
0.2227049469947815,
-0.17061901092529297,
-0.06306669861078262,
-0.13396593928337097,
-0.25735533237457275,
-0.326639860868454,
0.10131919384002686,
-0.2697952091693878,
0.11595847457647324,
0.4622557461261749,
-0.04151396453380585,
0.08408986032009125,
-0.2942304313182831,
0.1462799608707428,
0.13171051442623138,
0.3118909001350403,
0.2739439308643341,
-0.047624342143535614,
-0.3456515669822693,
0.1615709662437439,
-0.5773788690567017,
0.12946052849292755,
-0.11869868636131287,
-0.1146918311715126,
-0.033454060554504395,
-0.1582234650850296,
0.1593203991651535,
0.02061443030834198,
0.3829503357410431,
0.188819020986557,
-0.015939809381961823,
-0.10867707431316376,
-0.11951394379138947,
-0.19319775700569153,
-0.08259972184896469,
-0.12190037965774536,
0.2010166347026825,
-0.32269033789634705,
-0.0618353970348835,
-0.14577741920948029,
0.038975734263658524,
-0.3498097360134125,
0.09371393173933029,
0.10629752278327942,
-0.020190004259347916,
0.3603176176548004,
0.1459478884935379,
0.76997309923172,
0.04881463944911957,
0.11503157764673233,
-0.09138646721839905,
-0.3536492884159088,
-0.404243141412735,
0.3688684403896332,
0.32559195160865784,
0.2565366327762604,
-0.10637769103050232,
0.009763806127011776,
-0.16448292136192322,
0.09450692683458328,
-0.043546468019485474,
0.32114776968955994,
-0.25447577238082886,
0.214504212141037,
-0.02401093952357769,
0.017140327021479607,
0.09913210570812225,
-0.05562606453895569,
-0.002646812703460455,
0.34105435013771057,
-0.20675647258758545,
-0.604709804058075,
0.619809627532959,
-0.2129315733909607,
-0.23955516517162323,
0.15372981131076813,
0.1545255184173584,
0.22137881815433502,
-0.21874772012233734,
-0.510052502155304,
0.024750813841819763,
0.37738266587257385,
0.019003426656126976,
-0.4423443675041199,
-0.003706148359924555,
-0.19275695085525513,
0.05144556239247322,
0.11356013268232346,
0.30625367164611816,
0.11662862449884415,
-0.19328555464744568,
0.19910407066345215,
-0.25434643030166626
] |
https://github.com/huggingface/datasets/issues/1989
|
Question/problem with dataset labels
|
thanks for the tip. very strange :/ I'll check my datasets version as well.
I will have more similar experiments soon so I'll let you know if I manage to get rid of this.
|
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
| 34
|
Question/problem with dataset labels
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
thanks for the tip. very strange :/ I'll check my datasets version as well.
I will have more similar experiments soon so I'll let you know if I manage to get rid of this.
|
[
0.17891347408294678,
-0.05732341110706329,
0.005179154220968485,
0.13436773419380188,
0.41135331988334656,
0.3502122461795807,
0.6419939398765564,
0.1637083739042282,
-0.16131801903247833,
0.07234936207532883,
0.17885370552539825,
0.06387592107057571,
-0.06077335402369499,
0.030525799840688705,
-0.13023114204406738,
-0.11937106400728226,
0.08908423036336899,
0.173479363322258,
0.18164248764514923,
-0.044466327875852585,
-0.2867426872253418,
-0.03982604295015335,
-0.15668001770973206,
0.36628860235214233,
-0.2972058057785034,
-0.3766840398311615,
0.21054299175739288,
-0.12052856385707855,
-0.11313280463218689,
-0.4633955657482147,
0.27180957794189453,
0.08612103015184402,
0.0026813640724867582,
0.40342751145362854,
-0.00010309632489224896,
0.05875691398978233,
0.29674792289733887,
0.15598881244659424,
-0.3984077572822571,
-0.4321288764476776,
-0.18936008214950562,
-0.02340724691748619,
0.034564148634672165,
-0.3044775724411011,
0.09798295050859451,
-0.28466835618019104,
-0.09054138511419296,
-0.27566608786582947,
0.10468693822622299,
0.4386066496372223,
0.32663995027542114,
0.23734048008918762,
-0.20649951696395874,
-0.2293027937412262,
0.2311529964208603,
0.12508909404277802,
-0.030508195981383324,
0.049476899206638336,
-0.1344391107559204,
-0.006456918548792601,
0.45157045125961304,
0.46091440320014954,
-0.2723958492279053,
0.264771431684494,
0.1353634148836136,
0.14636319875717163,
0.13772615790367126,
-0.391048789024353,
0.2763097286224365,
0.1961430460214615,
0.7452602386474609,
-0.29649990797042847,
-0.29439058899879456,
-0.1697036474943161,
0.1373763233423233,
-0.4167192876338959,
0.18133871257305145,
0.07008437067270279,
0.006375445984303951,
-0.047014687210321426,
-0.03316255286335945,
0.06102658808231354,
0.08074173331260681,
0.0881802961230278,
-0.05807413160800934,
0.03832928463816643,
-0.0986412912607193,
0.32881712913513184,
0.1125299260020256,
-0.07475035637617111,
0.2975311279296875,
-0.005993981380015612,
-0.08857189118862152,
0.041545283049345016,
-0.4325246512889862,
-0.029609162360429764,
-0.03688126802444458,
0.05167559161782265,
-0.11813832819461823,
-0.03874027729034424,
0.01838638447225094,
-0.37495556473731995,
-0.14743423461914062,
0.34034523367881775,
0.21513402462005615,
0.2662767469882965,
0.27069926261901855,
0.5616875886917114,
0.0911722481250763,
-0.07616250216960907,
0.03080311231315136,
-0.0558072105050087,
-0.0015746225835755467,
-0.46264347434043884,
0.2433207631111145,
0.09893110394477844,
0.29347071051597595,
-0.23985809087753296,
-0.5455209612846375,
0.19244229793548584,
-0.028102025389671326,
0.09409462660551071,
0.15411771833896637,
0.3049507737159729,
0.022121448069810867,
0.20651715993881226,
0.07934725284576416,
0.19360817968845367,
-0.00917017925530672,
-0.11720465868711472,
-0.20692431926727295,
0.09760840982198715,
-0.20027866959571838,
-0.15010692179203033,
0.05026973783969879,
-0.07205360382795334,
0.11245013773441315,
0.0640593096613884,
-0.0010052787838503718,
-0.07605742663145065,
-0.01630275882780552,
-0.3864647448062897,
-0.01274816133081913,
0.3588937819004059,
-0.10326281189918518,
0.420350581407547,
0.2520546317100525,
-0.41855016350746155,
0.05969962105154991,
0.18021129071712494,
-0.36885228753089905,
-0.033813633024692535,
-0.21215848624706268,
0.28621235489845276,
-0.10304412245750427,
-0.18798039853572845,
-0.12009236216545105,
0.046823322772979736,
0.4193205237388611,
-0.21455369889736176,
0.15758994221687317,
-0.3543834090232849,
-0.30932241678237915,
-0.27777037024497986,
-0.06630374491214752,
0.22143235802650452,
-0.672246515750885,
0.004389484412968159,
-0.14754599332809448,
-0.02911343239247799,
0.05280744656920433,
0.29601913690567017,
-0.08100432902574539,
0.2062923014163971,
-0.07059221714735031,
0.030349209904670715,
0.13955312967300415,
-0.3906913101673126,
-0.11046354472637177,
0.10354441404342651,
-0.14200283586978912,
-0.24426479637622833,
0.07048094272613525,
-0.040339983999729156,
0.09173159301280975,
-0.0916256308555603,
0.05823083594441414,
-0.1318773776292801,
-0.19963160157203674,
-0.09513296186923981,
-0.1437045931816101,
0.0538102351129055,
0.6539096832275391,
0.09273272007703781,
-0.016799816861748695,
0.07564713805913925,
-0.10022789984941483,
-0.3448372781276703,
-0.042531568557024,
-0.1009543389081955,
0.20621949434280396,
0.21479029953479767,
0.055640604346990585,
0.2983594834804535,
0.1459522396326065,
-0.06447069346904755,
-0.4424961805343628,
0.10170096158981323,
-0.04005378112196922,
0.13956496119499207,
-0.14514334499835968,
-0.19234369695186615,
-0.3297654986381531,
-0.05378612130880356,
-0.20797739923000336,
0.01832341030240059,
0.16331322491168976,
0.06836050748825073,
-0.22142063081264496,
-0.020482944324612617,
0.014084731228649616,
-0.07588552683591843,
-0.017213372513651848,
0.10933033376932144,
-0.10402482002973557,
0.26565271615982056,
-0.09511733055114746,
0.1168939396739006,
-0.026739396154880524,
0.25311946868896484,
0.43260639905929565,
0.24005112051963806,
-0.046622101217508316,
0.36702385544776917,
0.0848604291677475,
-0.3270232081413269,
0.007840029895305634,
-0.1726589947938919,
0.018129581585526466,
-0.08387529104948044,
-0.0163266621530056,
0.11452510952949524,
0.27684012055397034,
-0.10859706997871399,
-0.08471912145614624,
0.14118549227714539,
-0.17720016837120056,
0.2762838900089264,
-0.16197457909584045,
0.20046067237854004,
0.25996318459510803,
-0.10939249396324158,
0.1251230537891388,
-0.2127114236354828,
0.21588031947612762,
-0.12979799509048462,
0.23431450128555298,
0.0071422988548874855,
-0.2617172598838806,
0.06771795451641083,
0.4220546782016754,
0.0015312841860577464,
-0.0035242880694568157,
0.009774230420589447,
-0.15866822004318237,
0.16574595868587494,
-0.013017691671848297,
0.595718264579773,
0.35284286737442017,
0.205955371260643,
-0.16387644410133362,
-0.058268580585718155,
-0.26225870847702026,
-0.13698343932628632,
0.21246269345283508,
0.09510132670402527,
0.029852598905563354,
0.05729620158672333,
0.02610979974269867,
-0.06643904745578766,
-0.17657293379306793,
-0.2433391660451889,
0.20823147892951965,
0.34643009305000305,
-0.5103117227554321,
-0.002906450070440769,
-0.34527212381362915,
-0.23186378180980682,
-0.31859782338142395,
-0.09879127889871597,
-0.23515866696834564,
-0.45904380083084106,
0.09043732285499573,
-0.07749122381210327,
-0.19039256870746613,
0.14507734775543213,
-0.037563350051641464,
0.00791588518768549,
-0.09107247740030289,
0.15205179154872894,
-0.09758404642343521,
-0.4702501893043518,
-0.20457129180431366,
0.18111225962638855,
0.007480352185666561,
0.04695437476038933,
0.4813607335090637,
-0.143199160695076,
-0.12455568462610245,
-0.07857241481542587,
-0.2953171133995056,
0.004026900511234999,
-0.2730652093887329,
0.13660450279712677,
0.1816229671239853,
0.10386001318693161,
0.008461100049316883,
-0.14868579804897308,
0.29301661252975464,
-0.07151931524276733,
0.024639904499053955,
0.10695718973875046,
0.045232538133859634,
-0.29207393527030945,
-0.26646947860717773,
-0.4750193655490875,
-0.47453048825263977,
-0.17748217284679413,
0.06694815307855606,
-0.07590755075216293,
-0.03352787345647812,
0.5198022127151489,
0.06844227761030197,
0.06568092852830887,
0.09314426779747009,
0.023253191262483597,
-0.34674328565597534,
-0.09354142844676971,
0.24904774129390717,
-0.17909251153469086,
-0.2102450281381607,
0.19605785608291626,
0.109309121966362,
0.11752880364656448,
-0.20393434166908264,
-0.3139221668243408,
0.07286331057548523,
-0.05760190263390541,
0.05894489958882332,
0.08131010830402374,
0.1948966234922409,
0.2138824611902237,
0.26710304617881775,
-0.14800302684307098,
-0.32705044746398926,
-0.3317107558250427,
0.13817375898361206,
-0.07196798175573349,
0.1306353658437729,
-0.10625556856393814,
0.29408565163612366,
-0.15208472311496735,
0.3265087604522705,
0.021773260086774826,
-0.2126564383506775,
0.19188947975635529,
-0.04784756898880005,
0.5207315683364868,
0.06838033348321915,
-0.4193750321865082,
0.06588488817214966,
-0.1191064789891243,
0.02694679982960224,
0.1760430485010147,
-0.3196396827697754,
0.03795647993683815,
-0.1479686200618744,
0.39460328221321106,
-0.24780510365962982,
-0.09965687990188599,
-0.10064342617988586,
-0.15016905963420868,
0.04052730277180672,
0.1168999969959259,
-0.04097595810890198,
-0.2084076702594757,
-0.19158531725406647,
-0.2512800097465515,
0.05782434716820717,
-0.09546219557523727,
-0.08755096048116684,
-0.5335752367973328,
-0.23349951207637787,
-0.16499629616737366,
0.2940983772277832,
0.15745164453983307,
0.33466392755508423,
-0.17851665616035461,
0.24547207355499268,
0.04775957763195038,
0.24590007960796356,
0.6149808764457703,
-0.48323866724967957,
0.1547020524740219,
0.22637251019477844,
0.39312776923179626,
-0.17800158262252808,
-0.12725569307804108,
-0.16925759613513947,
0.29472672939300537,
-0.29577749967575073,
0.025988716632127762,
-0.1555343121290207,
-0.09107734262943268,
0.2631010115146637,
0.15540540218353271,
-0.12238091230392456,
-0.314981073141098,
-0.230952650308609,
-0.1793929636478424,
-0.1272861212491989,
-0.05339647829532623,
0.06357742100954056,
0.1866387128829956,
-0.3784876763820648,
0.09864716976881027,
0.14082340896129608,
0.07350759953260422,
0.2715039849281311,
0.11863487213850021,
0.22324363887310028,
0.030276885256171227,
0.19736140966415405,
0.3174017667770386,
0.2587261199951172,
0.5099822282791138,
0.5483976006507874,
-0.3618467152118683,
-0.5113286972045898,
-0.11947935074567795,
-0.11476977169513702,
0.20070751011371613,
0.06500016897916794,
-0.14221541583538055,
0.16609644889831543,
-0.05064032971858978,
0.18545973300933838,
0.09619837999343872,
0.02230874076485634,
0.4922947883605957,
0.16057683527469635,
-0.48984843492507935,
-0.5388927459716797,
0.2713586688041687,
0.03924121707677841,
-0.047840915620326996,
0.12815505266189575,
0.07973120361566544,
-0.34075772762298584,
0.2059531807899475,
-0.1559935361146927,
0.6908734440803528,
0.08379849791526794,
-0.051031067967414856,
-0.017031138762831688,
-0.2261737883090973,
0.7132229208946228,
-0.11871124804019928,
0.0007707070908509195,
-0.36142972111701965,
-0.30746591091156006,
-0.0622297003865242,
-0.022119013592600822,
0.023475833237171173,
0.450693279504776,
-0.3085799813270569,
0.37883761525154114,
-0.32851332426071167,
0.20468570291996002,
0.028749734163284302,
-0.07406040281057358,
0.2494400590658188,
-0.13231314718723297,
-0.08248622715473175,
0.2010338306427002,
-0.157619446516037,
-0.13437534868717194,
-0.16743460297584534,
0.04190531745553017,
-0.23184797167778015,
-0.2680612802505493,
-0.2262599915266037,
0.08226059377193451,
-0.25382542610168457,
0.14157956838607788,
-0.0856545940041542,
-0.016718991100788116,
0.21681223809719086,
0.2025105506181717,
0.48632127046585083,
0.0789249986410141,
-0.14828579127788544,
0.18389585614204407,
0.04215006157755852,
0.13702285289764404,
0.034348372370004654,
0.05374768748879433,
0.4150616228580475,
0.11604932695627213,
-0.26998209953308105,
0.12853087484836578,
-0.07956812530755997,
0.17594999074935913,
-0.08703093975782394,
0.08389480412006378,
-0.09839654713869095,
-0.36537453532218933,
0.032646797597408295,
-0.07703931629657745,
0.22870928049087524,
-0.25377342104911804,
0.17734603583812714,
0.051982734352350235,
-0.046680621802806854,
0.21207952499389648,
-0.2636912763118744,
-0.1465979814529419,
-0.045746877789497375,
0.18923379480838776,
0.025964440777897835,
0.19335640966892242,
0.24724486470222473,
0.025972969830036163,
-0.3513919413089752,
-0.25651127099990845,
0.038952261209487915,
0.023998193442821503,
-0.677836537361145,
0.24598251283168793,
0.2533552944660187,
0.07594631612300873,
-0.057189520448446274,
0.22326934337615967,
-0.01583010144531727,
0.0710860937833786,
0.06101401522755623,
-0.5274378061294556,
-0.2186506688594818,
-0.004670771304517984,
-0.18475456535816193,
0.11692994832992554,
0.2478654682636261,
0.4110053777694702,
0.13375762104988098,
0.07145128399133682,
-0.36415424942970276,
-0.020953631028532982,
-0.1723954677581787,
0.29801294207572937,
0.15251024067401886,
0.019961336627602577,
0.28203174471855164,
-0.17880624532699585,
0.21821677684783936,
0.0007436689338646829,
0.007750303018838167,
-0.24981854856014252,
-0.1872100830078125,
0.11241065710783005,
0.13520900905132294,
-0.19721661508083344,
-0.06341098994016647,
-0.16438139975070953,
0.057837244123220444,
-0.07198324799537659,
-0.017251547425985336,
0.31057360768318176,
0.0032079345546662807,
0.3735310733318329,
-0.1509210169315338,
0.2327837496995926,
-0.046331100165843964,
0.21827778220176697,
0.012716840021312237,
-0.11400211602449417,
0.0742448940873146,
0.172965869307518,
-0.11276409029960632,
0.01947760209441185,
-0.17507928609848022,
0.08479433506727219,
-0.11700432747602463,
-0.11793006956577301,
0.13429364562034607,
-0.5689805746078491,
0.29595574736595154,
0.19363825023174286,
0.4493623673915863,
0.2781369984149933,
-0.18682533502578735,
-0.07076655328273773,
0.38261017203330994,
0.3079267144203186,
-0.36567002534866333,
-0.16836042702198029,
0.1630018949508667,
0.1655603051185608,
0.00039057957474142313,
0.07560659199953079,
0.06072518229484558,
-0.031059913337230682,
0.04489267244935036,
0.008086458779871464,
0.45543810725212097,
-0.4376544952392578,
0.2349056452512741,
0.526982307434082,
-0.06197047978639603,
0.09998403489589691,
0.4967949390411377,
0.17317639291286469,
0.06353333592414856,
0.5881969332695007,
0.03464969992637634,
0.17732051014900208,
0.1874696910381317,
-0.13796021044254303,
-0.0754198282957077,
-0.17221663892269135,
0.18091802299022675,
0.09697161614894867,
0.01885591447353363,
-0.04283132776618004,
-0.09544814378023148,
0.30113545060157776,
-0.38394486904144287,
0.004111276473850012,
-0.005769312847405672,
0.11119753122329712,
-0.22550341486930847,
-0.10601639002561569,
-0.15626324713230133,
-0.09870889037847519,
-0.16644632816314697,
-0.19731619954109192,
0.014028764329850674,
-0.1700502634048462,
0.3556349277496338,
-0.07427991926670074,
-0.19596470892429352,
-0.4565809965133667,
-0.1867782175540924,
0.3054199516773224,
0.0650811493396759,
-0.24731001257896423,
0.016320951282978058,
0.24875697493553162,
-0.1455010026693344,
0.321377158164978,
0.08623901754617691,
0.6039392352104187,
0.17137522995471954,
0.08979114890098572,
-0.34109216928482056,
-0.0972946435213089,
-0.08858039230108261,
0.15166358649730682,
0.21556773781776428,
0.045920465141534805,
-0.0368347093462944,
0.3922654688358307,
0.20187810063362122,
-0.17074967920780182,
0.3085801601409912,
0.3357427418231964,
0.2227049469947815,
-0.17061901092529297,
-0.06306669861078262,
-0.13396593928337097,
-0.25735533237457275,
-0.326639860868454,
0.10131919384002686,
-0.2697952091693878,
0.11595847457647324,
0.4622557461261749,
-0.04151396453380585,
0.08408986032009125,
-0.2942304313182831,
0.1462799608707428,
0.13171051442623138,
0.3118909001350403,
0.2739439308643341,
-0.047624342143535614,
-0.3456515669822693,
0.1615709662437439,
-0.5773788690567017,
0.12946052849292755,
-0.11869868636131287,
-0.1146918311715126,
-0.033454060554504395,
-0.1582234650850296,
0.1593203991651535,
0.02061443030834198,
0.3829503357410431,
0.188819020986557,
-0.015939809381961823,
-0.10867707431316376,
-0.11951394379138947,
-0.19319775700569153,
-0.08259972184896469,
-0.12190037965774536,
0.2010166347026825,
-0.32269033789634705,
-0.0618353970348835,
-0.14577741920948029,
0.038975734263658524,
-0.3498097360134125,
0.09371393173933029,
0.10629752278327942,
-0.020190004259347916,
0.3603176176548004,
0.1459478884935379,
0.76997309923172,
0.04881463944911957,
0.11503157764673233,
-0.09138646721839905,
-0.3536492884159088,
-0.404243141412735,
0.3688684403896332,
0.32559195160865784,
0.2565366327762604,
-0.10637769103050232,
0.009763806127011776,
-0.16448292136192322,
0.09450692683458328,
-0.043546468019485474,
0.32114776968955994,
-0.25447577238082886,
0.214504212141037,
-0.02401093952357769,
0.017140327021479607,
0.09913210570812225,
-0.05562606453895569,
-0.002646812703460455,
0.34105435013771057,
-0.20675647258758545,
-0.604709804058075,
0.619809627532959,
-0.2129315733909607,
-0.23955516517162323,
0.15372981131076813,
0.1545255184173584,
0.22137881815433502,
-0.21874772012233734,
-0.510052502155304,
0.024750813841819763,
0.37738266587257385,
0.019003426656126976,
-0.4423443675041199,
-0.003706148359924555,
-0.19275695085525513,
0.05144556239247322,
0.11356013268232346,
0.30625367164611816,
0.11662862449884415,
-0.19328555464744568,
0.19910407066345215,
-0.25434643030166626
] |
https://github.com/huggingface/datasets/issues/1989
|
Question/problem with dataset labels
|
No problem at all. I thought I'd be able to solve this but I'm unable to replicate the issue :/
|
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
| 20
|
Question/problem with dataset labels
Hi, I'm using a dataset with two labels "nurse" and "not nurse". For whatever reason (that I don't understand), I get an error that I think comes from the datasets package (using csv). Everything works fine if the labels are "nurse" and "surgeon".
This is the trace I get:
```
File "../../../models/tr-4.3.2/run_puppets.py", line 523, in <module>
main()
File "../../../models/tr-4.3.2/run_puppets.py", line 249, in main
datasets = load_dataset("csv", data_files=data_files)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 572, in download_and_prepare
self._download_and_prepare(
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/builder.py", line 1028, in _prepare_split
writer.write_table(table)
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/datasets/arrow_writer.py", line 292, in write_table
pa_table = pa_table.cast(self._schema)
File "pyarrow/table.pxi", line 1311, in pyarrow.lib.Table.cast
File "pyarrow/table.pxi", line 265, in pyarrow.lib.ChunkedArray.cast
File "/dccstor/redrug_ier/envs/last-tr/lib/python3.8/site-packages/pyarrow/compute.py", line 87, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 298, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 192, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: not nurse
```
Any ideas how to fix this? For now, I'll probably make them numeric.
No problem at all. I thought I'd be able to solve this but I'm unable to replicate the issue :/
|
[
0.17891347408294678,
-0.05732341110706329,
0.005179154220968485,
0.13436773419380188,
0.41135331988334656,
0.3502122461795807,
0.6419939398765564,
0.1637083739042282,
-0.16131801903247833,
0.07234936207532883,
0.17885370552539825,
0.06387592107057571,
-0.06077335402369499,
0.030525799840688705,
-0.13023114204406738,
-0.11937106400728226,
0.08908423036336899,
0.173479363322258,
0.18164248764514923,
-0.044466327875852585,
-0.2867426872253418,
-0.03982604295015335,
-0.15668001770973206,
0.36628860235214233,
-0.2972058057785034,
-0.3766840398311615,
0.21054299175739288,
-0.12052856385707855,
-0.11313280463218689,
-0.4633955657482147,
0.27180957794189453,
0.08612103015184402,
0.0026813640724867582,
0.40342751145362854,
-0.00010309632489224896,
0.05875691398978233,
0.29674792289733887,
0.15598881244659424,
-0.3984077572822571,
-0.4321288764476776,
-0.18936008214950562,
-0.02340724691748619,
0.034564148634672165,
-0.3044775724411011,
0.09798295050859451,
-0.28466835618019104,
-0.09054138511419296,
-0.27566608786582947,
0.10468693822622299,
0.4386066496372223,
0.32663995027542114,
0.23734048008918762,
-0.20649951696395874,
-0.2293027937412262,
0.2311529964208603,
0.12508909404277802,
-0.030508195981383324,
0.049476899206638336,
-0.1344391107559204,
-0.006456918548792601,
0.45157045125961304,
0.46091440320014954,
-0.2723958492279053,
0.264771431684494,
0.1353634148836136,
0.14636319875717163,
0.13772615790367126,
-0.391048789024353,
0.2763097286224365,
0.1961430460214615,
0.7452602386474609,
-0.29649990797042847,
-0.29439058899879456,
-0.1697036474943161,
0.1373763233423233,
-0.4167192876338959,
0.18133871257305145,
0.07008437067270279,
0.006375445984303951,
-0.047014687210321426,
-0.03316255286335945,
0.06102658808231354,
0.08074173331260681,
0.0881802961230278,
-0.05807413160800934,
0.03832928463816643,
-0.0986412912607193,
0.32881712913513184,
0.1125299260020256,
-0.07475035637617111,
0.2975311279296875,
-0.005993981380015612,
-0.08857189118862152,
0.041545283049345016,
-0.4325246512889862,
-0.029609162360429764,
-0.03688126802444458,
0.05167559161782265,
-0.11813832819461823,
-0.03874027729034424,
0.01838638447225094,
-0.37495556473731995,
-0.14743423461914062,
0.34034523367881775,
0.21513402462005615,
0.2662767469882965,
0.27069926261901855,
0.5616875886917114,
0.0911722481250763,
-0.07616250216960907,
0.03080311231315136,
-0.0558072105050087,
-0.0015746225835755467,
-0.46264347434043884,
0.2433207631111145,
0.09893110394477844,
0.29347071051597595,
-0.23985809087753296,
-0.5455209612846375,
0.19244229793548584,
-0.028102025389671326,
0.09409462660551071,
0.15411771833896637,
0.3049507737159729,
0.022121448069810867,
0.20651715993881226,
0.07934725284576416,
0.19360817968845367,
-0.00917017925530672,
-0.11720465868711472,
-0.20692431926727295,
0.09760840982198715,
-0.20027866959571838,
-0.15010692179203033,
0.05026973783969879,
-0.07205360382795334,
0.11245013773441315,
0.0640593096613884,
-0.0010052787838503718,
-0.07605742663145065,
-0.01630275882780552,
-0.3864647448062897,
-0.01274816133081913,
0.3588937819004059,
-0.10326281189918518,
0.420350581407547,
0.2520546317100525,
-0.41855016350746155,
0.05969962105154991,
0.18021129071712494,
-0.36885228753089905,
-0.033813633024692535,
-0.21215848624706268,
0.28621235489845276,
-0.10304412245750427,
-0.18798039853572845,
-0.12009236216545105,
0.046823322772979736,
0.4193205237388611,
-0.21455369889736176,
0.15758994221687317,
-0.3543834090232849,
-0.30932241678237915,
-0.27777037024497986,
-0.06630374491214752,
0.22143235802650452,
-0.672246515750885,
0.004389484412968159,
-0.14754599332809448,
-0.02911343239247799,
0.05280744656920433,
0.29601913690567017,
-0.08100432902574539,
0.2062923014163971,
-0.07059221714735031,
0.030349209904670715,
0.13955312967300415,
-0.3906913101673126,
-0.11046354472637177,
0.10354441404342651,
-0.14200283586978912,
-0.24426479637622833,
0.07048094272613525,
-0.040339983999729156,
0.09173159301280975,
-0.0916256308555603,
0.05823083594441414,
-0.1318773776292801,
-0.19963160157203674,
-0.09513296186923981,
-0.1437045931816101,
0.0538102351129055,
0.6539096832275391,
0.09273272007703781,
-0.016799816861748695,
0.07564713805913925,
-0.10022789984941483,
-0.3448372781276703,
-0.042531568557024,
-0.1009543389081955,
0.20621949434280396,
0.21479029953479767,
0.055640604346990585,
0.2983594834804535,
0.1459522396326065,
-0.06447069346904755,
-0.4424961805343628,
0.10170096158981323,
-0.04005378112196922,
0.13956496119499207,
-0.14514334499835968,
-0.19234369695186615,
-0.3297654986381531,
-0.05378612130880356,
-0.20797739923000336,
0.01832341030240059,
0.16331322491168976,
0.06836050748825073,
-0.22142063081264496,
-0.020482944324612617,
0.014084731228649616,
-0.07588552683591843,
-0.017213372513651848,
0.10933033376932144,
-0.10402482002973557,
0.26565271615982056,
-0.09511733055114746,
0.1168939396739006,
-0.026739396154880524,
0.25311946868896484,
0.43260639905929565,
0.24005112051963806,
-0.046622101217508316,
0.36702385544776917,
0.0848604291677475,
-0.3270232081413269,
0.007840029895305634,
-0.1726589947938919,
0.018129581585526466,
-0.08387529104948044,
-0.0163266621530056,
0.11452510952949524,
0.27684012055397034,
-0.10859706997871399,
-0.08471912145614624,
0.14118549227714539,
-0.17720016837120056,
0.2762838900089264,
-0.16197457909584045,
0.20046067237854004,
0.25996318459510803,
-0.10939249396324158,
0.1251230537891388,
-0.2127114236354828,
0.21588031947612762,
-0.12979799509048462,
0.23431450128555298,
0.0071422988548874855,
-0.2617172598838806,
0.06771795451641083,
0.4220546782016754,
0.0015312841860577464,
-0.0035242880694568157,
0.009774230420589447,
-0.15866822004318237,
0.16574595868587494,
-0.013017691671848297,
0.595718264579773,
0.35284286737442017,
0.205955371260643,
-0.16387644410133362,
-0.058268580585718155,
-0.26225870847702026,
-0.13698343932628632,
0.21246269345283508,
0.09510132670402527,
0.029852598905563354,
0.05729620158672333,
0.02610979974269867,
-0.06643904745578766,
-0.17657293379306793,
-0.2433391660451889,
0.20823147892951965,
0.34643009305000305,
-0.5103117227554321,
-0.002906450070440769,
-0.34527212381362915,
-0.23186378180980682,
-0.31859782338142395,
-0.09879127889871597,
-0.23515866696834564,
-0.45904380083084106,
0.09043732285499573,
-0.07749122381210327,
-0.19039256870746613,
0.14507734775543213,
-0.037563350051641464,
0.00791588518768549,
-0.09107247740030289,
0.15205179154872894,
-0.09758404642343521,
-0.4702501893043518,
-0.20457129180431366,
0.18111225962638855,
0.007480352185666561,
0.04695437476038933,
0.4813607335090637,
-0.143199160695076,
-0.12455568462610245,
-0.07857241481542587,
-0.2953171133995056,
0.004026900511234999,
-0.2730652093887329,
0.13660450279712677,
0.1816229671239853,
0.10386001318693161,
0.008461100049316883,
-0.14868579804897308,
0.29301661252975464,
-0.07151931524276733,
0.024639904499053955,
0.10695718973875046,
0.045232538133859634,
-0.29207393527030945,
-0.26646947860717773,
-0.4750193655490875,
-0.47453048825263977,
-0.17748217284679413,
0.06694815307855606,
-0.07590755075216293,
-0.03352787345647812,
0.5198022127151489,
0.06844227761030197,
0.06568092852830887,
0.09314426779747009,
0.023253191262483597,
-0.34674328565597534,
-0.09354142844676971,
0.24904774129390717,
-0.17909251153469086,
-0.2102450281381607,
0.19605785608291626,
0.109309121966362,
0.11752880364656448,
-0.20393434166908264,
-0.3139221668243408,
0.07286331057548523,
-0.05760190263390541,
0.05894489958882332,
0.08131010830402374,
0.1948966234922409,
0.2138824611902237,
0.26710304617881775,
-0.14800302684307098,
-0.32705044746398926,
-0.3317107558250427,
0.13817375898361206,
-0.07196798175573349,
0.1306353658437729,
-0.10625556856393814,
0.29408565163612366,
-0.15208472311496735,
0.3265087604522705,
0.021773260086774826,
-0.2126564383506775,
0.19188947975635529,
-0.04784756898880005,
0.5207315683364868,
0.06838033348321915,
-0.4193750321865082,
0.06588488817214966,
-0.1191064789891243,
0.02694679982960224,
0.1760430485010147,
-0.3196396827697754,
0.03795647993683815,
-0.1479686200618744,
0.39460328221321106,
-0.24780510365962982,
-0.09965687990188599,
-0.10064342617988586,
-0.15016905963420868,
0.04052730277180672,
0.1168999969959259,
-0.04097595810890198,
-0.2084076702594757,
-0.19158531725406647,
-0.2512800097465515,
0.05782434716820717,
-0.09546219557523727,
-0.08755096048116684,
-0.5335752367973328,
-0.23349951207637787,
-0.16499629616737366,
0.2940983772277832,
0.15745164453983307,
0.33466392755508423,
-0.17851665616035461,
0.24547207355499268,
0.04775957763195038,
0.24590007960796356,
0.6149808764457703,
-0.48323866724967957,
0.1547020524740219,
0.22637251019477844,
0.39312776923179626,
-0.17800158262252808,
-0.12725569307804108,
-0.16925759613513947,
0.29472672939300537,
-0.29577749967575073,
0.025988716632127762,
-0.1555343121290207,
-0.09107734262943268,
0.2631010115146637,
0.15540540218353271,
-0.12238091230392456,
-0.314981073141098,
-0.230952650308609,
-0.1793929636478424,
-0.1272861212491989,
-0.05339647829532623,
0.06357742100954056,
0.1866387128829956,
-0.3784876763820648,
0.09864716976881027,
0.14082340896129608,
0.07350759953260422,
0.2715039849281311,
0.11863487213850021,
0.22324363887310028,
0.030276885256171227,
0.19736140966415405,
0.3174017667770386,
0.2587261199951172,
0.5099822282791138,
0.5483976006507874,
-0.3618467152118683,
-0.5113286972045898,
-0.11947935074567795,
-0.11476977169513702,
0.20070751011371613,
0.06500016897916794,
-0.14221541583538055,
0.16609644889831543,
-0.05064032971858978,
0.18545973300933838,
0.09619837999343872,
0.02230874076485634,
0.4922947883605957,
0.16057683527469635,
-0.48984843492507935,
-0.5388927459716797,
0.2713586688041687,
0.03924121707677841,
-0.047840915620326996,
0.12815505266189575,
0.07973120361566544,
-0.34075772762298584,
0.2059531807899475,
-0.1559935361146927,
0.6908734440803528,
0.08379849791526794,
-0.051031067967414856,
-0.017031138762831688,
-0.2261737883090973,
0.7132229208946228,
-0.11871124804019928,
0.0007707070908509195,
-0.36142972111701965,
-0.30746591091156006,
-0.0622297003865242,
-0.022119013592600822,
0.023475833237171173,
0.450693279504776,
-0.3085799813270569,
0.37883761525154114,
-0.32851332426071167,
0.20468570291996002,
0.028749734163284302,
-0.07406040281057358,
0.2494400590658188,
-0.13231314718723297,
-0.08248622715473175,
0.2010338306427002,
-0.157619446516037,
-0.13437534868717194,
-0.16743460297584534,
0.04190531745553017,
-0.23184797167778015,
-0.2680612802505493,
-0.2262599915266037,
0.08226059377193451,
-0.25382542610168457,
0.14157956838607788,
-0.0856545940041542,
-0.016718991100788116,
0.21681223809719086,
0.2025105506181717,
0.48632127046585083,
0.0789249986410141,
-0.14828579127788544,
0.18389585614204407,
0.04215006157755852,
0.13702285289764404,
0.034348372370004654,
0.05374768748879433,
0.4150616228580475,
0.11604932695627213,
-0.26998209953308105,
0.12853087484836578,
-0.07956812530755997,
0.17594999074935913,
-0.08703093975782394,
0.08389480412006378,
-0.09839654713869095,
-0.36537453532218933,
0.032646797597408295,
-0.07703931629657745,
0.22870928049087524,
-0.25377342104911804,
0.17734603583812714,
0.051982734352350235,
-0.046680621802806854,
0.21207952499389648,
-0.2636912763118744,
-0.1465979814529419,
-0.045746877789497375,
0.18923379480838776,
0.025964440777897835,
0.19335640966892242,
0.24724486470222473,
0.025972969830036163,
-0.3513919413089752,
-0.25651127099990845,
0.038952261209487915,
0.023998193442821503,
-0.677836537361145,
0.24598251283168793,
0.2533552944660187,
0.07594631612300873,
-0.057189520448446274,
0.22326934337615967,
-0.01583010144531727,
0.0710860937833786,
0.06101401522755623,
-0.5274378061294556,
-0.2186506688594818,
-0.004670771304517984,
-0.18475456535816193,
0.11692994832992554,
0.2478654682636261,
0.4110053777694702,
0.13375762104988098,
0.07145128399133682,
-0.36415424942970276,
-0.020953631028532982,
-0.1723954677581787,
0.29801294207572937,
0.15251024067401886,
0.019961336627602577,
0.28203174471855164,
-0.17880624532699585,
0.21821677684783936,
0.0007436689338646829,
0.007750303018838167,
-0.24981854856014252,
-0.1872100830078125,
0.11241065710783005,
0.13520900905132294,
-0.19721661508083344,
-0.06341098994016647,
-0.16438139975070953,
0.057837244123220444,
-0.07198324799537659,
-0.017251547425985336,
0.31057360768318176,
0.0032079345546662807,
0.3735310733318329,
-0.1509210169315338,
0.2327837496995926,
-0.046331100165843964,
0.21827778220176697,
0.012716840021312237,
-0.11400211602449417,
0.0742448940873146,
0.172965869307518,
-0.11276409029960632,
0.01947760209441185,
-0.17507928609848022,
0.08479433506727219,
-0.11700432747602463,
-0.11793006956577301,
0.13429364562034607,
-0.5689805746078491,
0.29595574736595154,
0.19363825023174286,
0.4493623673915863,
0.2781369984149933,
-0.18682533502578735,
-0.07076655328273773,
0.38261017203330994,
0.3079267144203186,
-0.36567002534866333,
-0.16836042702198029,
0.1630018949508667,
0.1655603051185608,
0.00039057957474142313,
0.07560659199953079,
0.06072518229484558,
-0.031059913337230682,
0.04489267244935036,
0.008086458779871464,
0.45543810725212097,
-0.4376544952392578,
0.2349056452512741,
0.526982307434082,
-0.06197047978639603,
0.09998403489589691,
0.4967949390411377,
0.17317639291286469,
0.06353333592414856,
0.5881969332695007,
0.03464969992637634,
0.17732051014900208,
0.1874696910381317,
-0.13796021044254303,
-0.0754198282957077,
-0.17221663892269135,
0.18091802299022675,
0.09697161614894867,
0.01885591447353363,
-0.04283132776618004,
-0.09544814378023148,
0.30113545060157776,
-0.38394486904144287,
0.004111276473850012,
-0.005769312847405672,
0.11119753122329712,
-0.22550341486930847,
-0.10601639002561569,
-0.15626324713230133,
-0.09870889037847519,
-0.16644632816314697,
-0.19731619954109192,
0.014028764329850674,
-0.1700502634048462,
0.3556349277496338,
-0.07427991926670074,
-0.19596470892429352,
-0.4565809965133667,
-0.1867782175540924,
0.3054199516773224,
0.0650811493396759,
-0.24731001257896423,
0.016320951282978058,
0.24875697493553162,
-0.1455010026693344,
0.321377158164978,
0.08623901754617691,
0.6039392352104187,
0.17137522995471954,
0.08979114890098572,
-0.34109216928482056,
-0.0972946435213089,
-0.08858039230108261,
0.15166358649730682,
0.21556773781776428,
0.045920465141534805,
-0.0368347093462944,
0.3922654688358307,
0.20187810063362122,
-0.17074967920780182,
0.3085801601409912,
0.3357427418231964,
0.2227049469947815,
-0.17061901092529297,
-0.06306669861078262,
-0.13396593928337097,
-0.25735533237457275,
-0.326639860868454,
0.10131919384002686,
-0.2697952091693878,
0.11595847457647324,
0.4622557461261749,
-0.04151396453380585,
0.08408986032009125,
-0.2942304313182831,
0.1462799608707428,
0.13171051442623138,
0.3118909001350403,
0.2739439308643341,
-0.047624342143535614,
-0.3456515669822693,
0.1615709662437439,
-0.5773788690567017,
0.12946052849292755,
-0.11869868636131287,
-0.1146918311715126,
-0.033454060554504395,
-0.1582234650850296,
0.1593203991651535,
0.02061443030834198,
0.3829503357410431,
0.188819020986557,
-0.015939809381961823,
-0.10867707431316376,
-0.11951394379138947,
-0.19319775700569153,
-0.08259972184896469,
-0.12190037965774536,
0.2010166347026825,
-0.32269033789634705,
-0.0618353970348835,
-0.14577741920948029,
0.038975734263658524,
-0.3498097360134125,
0.09371393173933029,
0.10629752278327942,
-0.020190004259347916,
0.3603176176548004,
0.1459478884935379,
0.76997309923172,
0.04881463944911957,
0.11503157764673233,
-0.09138646721839905,
-0.3536492884159088,
-0.404243141412735,
0.3688684403896332,
0.32559195160865784,
0.2565366327762604,
-0.10637769103050232,
0.009763806127011776,
-0.16448292136192322,
0.09450692683458328,
-0.043546468019485474,
0.32114776968955994,
-0.25447577238082886,
0.214504212141037,
-0.02401093952357769,
0.017140327021479607,
0.09913210570812225,
-0.05562606453895569,
-0.002646812703460455,
0.34105435013771057,
-0.20675647258758545,
-0.604709804058075,
0.619809627532959,
-0.2129315733909607,
-0.23955516517162323,
0.15372981131076813,
0.1545255184173584,
0.22137881815433502,
-0.21874772012233734,
-0.510052502155304,
0.024750813841819763,
0.37738266587257385,
0.019003426656126976,
-0.4423443675041199,
-0.003706148359924555,
-0.19275695085525513,
0.05144556239247322,
0.11356013268232346,
0.30625367164611816,
0.11662862449884415,
-0.19328555464744568,
0.19910407066345215,
-0.25434643030166626
] |
https://github.com/huggingface/datasets/issues/1988
|
Readme.md is misleading about kinds of datasets?
|
Hi ! Yes it's possible to use image data. There are already a few of them available (MNIST, CIFAR..)
|
Hi!
At the README.MD, you say: "efficient data pre-processing: simple, fast and reproducible data pre-processing for the above public datasets as well as your own local datasets in CSV/JSON/text. "
But here:
https://github.com/huggingface/datasets/blob/master/templates/new_dataset_script.py#L82-L117
You mention other kinds of datasets, with images and so on. I'm confused.
Is it possible to use it to store, say, imagenet locally?
| 19
|
Readme.md is misleading about kinds of datasets?
Hi!
At the README.MD, you say: "efficient data pre-processing: simple, fast and reproducible data pre-processing for the above public datasets as well as your own local datasets in CSV/JSON/text. "
But here:
https://github.com/huggingface/datasets/blob/master/templates/new_dataset_script.py#L82-L117
You mention other kinds of datasets, with images and so on. I'm confused.
Is it possible to use it to store, say, imagenet locally?
Hi ! Yes it's possible to use image data. There are already a few of them available (MNIST, CIFAR..)
|
[
-0.104894258081913,
-0.40778467059135437,
-0.1252107471227646,
0.3528693616390228,
0.20643292367458344,
0.07730378955602646,
0.2821691632270813,
-0.013219314627349377,
0.10144569724798203,
-0.09215136617422104,
-0.29715514183044434,
-0.07670418173074722,
-0.059190865606069565,
0.5414647459983826,
0.5551630854606628,
-0.05501767620444298,
0.1947564333677292,
0.007737076375633478,
-0.16066423058509827,
0.024353373795747757,
-0.1311546266078949,
-0.018478281795978546,
-0.19196192920207977,
-0.05607668682932854,
-0.24419769644737244,
0.07344415783882141,
-0.2431032806634903,
0.20236071944236755,
-0.3524554669857025,
-0.31531837582588196,
0.12654778361320496,
0.1420256793498993,
0.2038794606924057,
0.15155573189258575,
-0.00011447399447206408,
0.02615046128630638,
0.2794190049171448,
-0.264874666929245,
-0.07990217208862305,
-0.27543196082115173,
-0.2100358009338379,
-0.19585388898849487,
0.13650695979595184,
-0.3097444474697113,
-0.034409794956445694,
-0.36396947503089905,
0.3208792209625244,
-0.2029702216386795,
0.4163278341293335,
0.33210110664367676,
0.1734582781791687,
0.1770460456609726,
-0.012028990313410759,
0.07155880331993103,
0.1994977593421936,
0.704332172870636,
-0.23532353341579437,
0.07656333595514297,
0.39669856429100037,
0.275134801864624,
0.13175958395004272,
0.1904015988111496,
-0.1471005082130432,
0.24462385475635529,
0.667055606842041,
0.28478190302848816,
-0.06340861320495605,
-0.59534752368927,
0.17680995166301727,
0.3605564534664154,
0.7247244119644165,
-0.2514559328556061,
-0.37726259231567383,
-0.2556186318397522,
-0.349287211894989,
-0.14611299335956573,
-0.05310802534222603,
0.2958321273326874,
-0.009454261511564255,
0.23407390713691711,
-0.5905609726905823,
-0.2758913040161133,
-0.18513105809688568,
-0.03295682743191719,
0.06180356815457344,
0.2776296138763428,
-0.37688741087913513,
0.26679766178131104,
0.15191902220249176,
0.14780418574810028,
0.01939127966761589,
-0.24111948907375336,
0.0904681608080864,
0.21363912522792816,
0.10612364113330841,
-0.2127499133348465,
-0.3010914921760559,
0.17350336909294128,
0.4054277837276459,
0.05134465545415878,
-0.02488858439028263,
-0.00017353685689158738,
-0.23889319598674774,
0.26339274644851685,
0.333024263381958,
-0.06605794280767441,
-0.0647343099117279,
-0.07640951871871948,
0.2803303599357605,
-0.06800223141908646,
0.2875707149505615,
-0.09223255515098572,
-0.2132645547389984,
-0.05720413103699684,
-0.13174034655094147,
-0.31849202513694763,
0.13540039956569672,
-0.2608078122138977,
-0.04648933559656143,
0.0581921748816967,
0.13853232562541962,
-0.18531948328018188,
-0.19966472685337067,
0.23537884652614594,
-0.009644299745559692,
-0.16118480265140533,
0.13097994029521942,
0.22348876297473907,
0.11412380635738373,
-0.17014147341251373,
0.008983989246189594,
0.19496987760066986,
-0.28475257754325867,
0.19639042019844055,
0.06101730465888977,
-0.20415052771568298,
0.33923107385635376,
-0.10499970614910126,
0.20440995693206787,
0.03427103906869888,
0.1778145581483841,
-0.2119625359773636,
0.3175318241119385,
0.46555623412132263,
-0.09165316820144653,
0.0578259639441967,
0.07910169661045074,
0.05070444941520691,
-0.40072551369667053,
0.1867390125989914,
-0.4734034836292267,
-0.28558477759361267,
-0.14915530383586884,
0.03660118952393532,
-0.12718217074871063,
0.014197813346982002,
-0.4138632118701935,
0.2678906321525574,
0.11482927948236465,
0.1325334757566452,
0.23751452565193176,
0.056575555354356766,
-0.39376986026763916,
-0.28001806139945984,
0.2161942571401596,
0.20003341138362885,
-0.4700532555580139,
0.11660073697566986,
-0.053897932171821594,
-0.24849647283554077,
-0.0362885482609272,
0.29475995898246765,
-0.19321417808532715,
0.15620867908000946,
-0.21288754045963287,
0.17404495179653168,
0.13663969933986664,
-0.49216338992118835,
0.2029120922088623,
0.3513152003288269,
0.3671306073665619,
-0.11086442321538925,
0.04417182877659798,
0.1537511795759201,
0.042913466691970825,
0.010678603313863277,
-0.2065615952014923,
0.21186426281929016,
0.02401009202003479,
-0.1647769659757614,
-0.05105862021446228,
-0.4474025070667267,
-0.059485550969839096,
0.20025219023227692,
0.0996520072221756,
0.10396304726600647,
0.13262349367141724,
-0.005193779245018959,
0.09291782975196838,
-0.07497977465391159,
0.3068467080593109,
0.01569426618516445,
0.15084610879421234,
0.13592852652072906,
0.13806569576263428,
-0.03186599910259247,
-0.4235830307006836,
0.16851280629634857,
0.06330777704715729,
0.07636605203151703,
0.07617290318012238,
-0.3972407281398773,
-0.017949767410755157,
-0.09666271507740021,
-0.022648610174655914,
-0.3566540479660034,
0.019915610551834106,
-0.06996417045593262,
0.11507740616798401,
-0.19596944749355316,
-0.5987899303436279,
0.3285919725894928,
-0.15115946531295776,
0.02301444485783577,
-0.4239826500415802,
0.141873300075531,
-0.13460376858711243,
0.18034912645816803,
-0.028620384633541107,
-0.040311455726623535,
-0.22511211037635803,
-0.32238784432411194,
0.25589144229888916,
0.3308744728565216,
0.0934397280216217,
0.07226083427667618,
0.15761178731918335,
0.5650749206542969,
0.13126155734062195,
-0.23010949790477753,
0.38807907700538635,
-0.19106683135032654,
0.29060593247413635,
-0.06017327681183815,
-0.45782962441444397,
0.4475468099117279,
-0.055035024881362915,
0.13084788620471954,
0.06384448707103729,
-0.1445370465517044,
0.21650300920009613,
-0.015415125526487827,
-0.26178669929504395,
-0.15156491100788116,
-0.07502000033855438,
0.09452930092811584,
0.36119771003723145,
-0.07167617231607437,
-0.37081271409988403,
0.0365542471408844,
0.26011642813682556,
-0.18208473920822144,
-0.015842024236917496,
0.24170799553394318,
-0.11505594104528427,
-0.3044467270374298,
0.1658320277929306,
0.06874722987413406,
0.49867433309555054,
0.03920242562890053,
0.06697460263967514,
0.287189781665802,
0.0804620236158371,
-0.16710853576660156,
0.1338188201189041,
0.021315395832061768,
0.2222687155008316,
-0.0037222804967314005,
-0.21354007720947266,
-0.031836312264204025,
-0.12279897183179855,
0.09900064766407013,
0.022821765393018723,
0.07431413978338242,
-0.22893328964710236,
0.25014469027519226,
-0.15369769930839539,
-0.22925803065299988,
0.022086597979068756,
0.08967958390712738,
-0.3034619987010956,
0.004784794524312019,
-0.16138330101966858,
-0.05315621569752693,
0.07999138534069061,
-0.13765883445739746,
-0.03570568561553955,
0.4570152461528778,
-0.14644207060337067,
0.14059683680534363,
-0.3284779489040375,
0.07160889357328415,
0.07509094476699829,
0.07504501938819885,
0.3216894268989563,
0.13820071518421173,
0.40026846528053284,
-0.37405461072921753,
-0.13605031371116638,
-0.3646129369735718,
-0.1546107828617096,
0.4024238884449005,
-0.24231399595737457,
0.39591696858406067,
0.3424028754234314,
0.22338595986366272,
-0.11982939392328262,
0.23123003542423248,
0.15235395729541779,
-0.28638285398483276,
-0.16783756017684937,
-0.309868186712265,
-0.09975580126047134,
-0.24888451397418976,
-0.31150099635124207,
-0.005112840794026852,
-0.391694575548172,
-0.1449795663356781,
0.2766239047050476,
0.3025514781475067,
0.39178526401519775,
0.2861984372138977,
0.1617550551891327,
0.38494405150413513,
-0.2790239751338959,
0.0002975965617224574,
-0.36934736371040344,
-0.6604459881782532,
0.2806847095489502,
-0.249624565243721,
-0.35595616698265076,
0.2686167061328888,
0.10826921463012695,
0.11107642203569412,
0.052416808903217316,
-0.5647808909416199,
-0.38039910793304443,
0.07351423054933548,
-0.02988111786544323,
0.3173149824142456,
0.2644760012626648,
0.14114902913570404,
-0.3616514801979065,
0.021611075848340988,
-0.25393977761268616,
-0.2714315950870514,
-0.07208435237407684,
-0.006953065283596516,
0.14944662153720856,
0.3848905861377716,
0.26190873980522156,
-0.06574533879756927,
0.496233731508255,
0.10236473381519318,
-0.006929298397153616,
0.40282532572746277,
0.04298761114478111,
0.43905821442604065,
-0.503619372844696,
0.18891485035419464,
0.3229767382144928,
-0.22802862524986267,
-0.08935262262821198,
0.27973100543022156,
0.1519520878791809,
-0.0002823415561579168,
-0.20329338312149048,
0.07418951392173767,
-0.2951335906982422,
0.08600379526615143,
0.12255015224218369,
0.30080676078796387,
0.035765573382377625,
-0.08287253975868225,
-0.21134941279888153,
0.06584266573190689,
0.07934864610433578,
-0.19802126288414001,
0.5932256579399109,
0.3951215445995331,
0.04238193854689598,
-0.4509609043598175,
-0.049315664917230606,
-0.4759035110473633,
0.20785973966121674,
-0.22910425066947937,
0.03664758801460266,
-0.0622759573161602,
0.1710509955883026,
0.351362019777298,
-0.20086660981178284,
0.32422301173210144,
-0.44710054993629456,
-0.30306902527809143,
0.11486253887414932,
-0.29940280318260193,
-0.19050048291683197,
0.0899861752986908,
-0.17539864778518677,
0.19348226487636566,
-0.042245492339134216,
0.4469913840293884,
-0.26951199769973755,
-0.33099988102912903,
0.21566659212112427,
0.04337204992771149,
-0.2091081738471985,
-0.1733773648738861,
-0.0237401332706213,
-0.37953054904937744,
-0.4606894552707672,
-0.3016345798969269,
0.10946553200483322,
-0.3531164228916168,
0.07894085347652435,
0.10455837845802307,
0.0741400420665741,
0.27460548281669617,
0.07873882353305817,
0.034485623240470886,
0.08909774571657181,
-0.030866321176290512,
-0.11909987032413483,
0.2502956986427307,
0.28335171937942505,
0.10833815485239029,
0.6675293445587158,
-0.20941166579723358,
-0.17038409411907196,
0.16666044294834137,
-0.06854500621557236,
0.3022339344024658,
0.29589545726776123,
-0.04619210213422775,
-0.05091695860028267,
0.24747334420681,
-0.03804223611950874,
-0.5824604630470276,
0.034711580723524094,
0.28929632902145386,
-0.13677389919757843,
-0.4954516887664795,
-0.5957931280136108,
0.6540590524673462,
0.07350116968154907,
-0.0504065677523613,
0.081658735871315,
0.21554432809352875,
-0.37244999408721924,
0.19355320930480957,
0.5435114502906799,
1.0711702108383179,
-0.20644599199295044,
0.47836098074913025,
-0.035317208617925644,
-0.02641792967915535,
0.34455981850624084,
-0.1600816547870636,
-0.20608867704868317,
-0.21303822100162506,
0.05250862240791321,
-0.211636483669281,
-0.043428439646959305,
0.29801106452941895,
0.07436151802539825,
-0.25129789113998413,
0.07119220495223999,
0.04678066819906235,
0.1992855668067932,
-0.26228222250938416,
0.38014766573905945,
-0.07634694874286652,
-0.23257103562355042,
-0.07870896905660629,
0.15118186175823212,
0.16608509421348572,
0.08849204331636429,
-0.0883437842130661,
0.05180410295724869,
-0.1285296082496643,
-0.010441488586366177,
-0.2773342430591583,
-0.40663307905197144,
0.0938110202550888,
-0.21242249011993408,
0.04390899837017059,
-0.04212014004588127,
0.19666540622711182,
0.06100725382566452,
0.48756474256515503,
-0.01199873723089695,
-0.506159245967865,
-0.090920589864254,
-0.1689058393239975,
-0.16011860966682434,
0.0015377680538222194,
-0.338192880153656,
0.2413749396800995,
-0.15945640206336975,
0.07561441510915756,
-0.0897732600569725,
-0.005093850661069155,
-0.28968867659568787,
-0.1152634471654892,
0.07301155477762222,
0.022478517144918442,
-0.11609546840190887,
-0.3256320655345917,
0.04793299362063408,
-0.14186574518680573,
0.011907498352229595,
0.07158634066581726,
0.2889596223831177,
0.028292780742049217,
0.24282534420490265,
-0.022145790979266167,
-0.18775875866413116,
-0.13269594311714172,
0.005165301728993654,
0.19760850071907043,
-0.02160026505589485,
-0.04153388366103172,
0.11552601307630539,
-0.2569546401500702,
-0.18793848156929016,
0.2555367648601532,
0.36571672558784485,
-0.2913581430912018,
0.03434181585907936,
0.2049901783466339,
-0.03859223425388336,
-0.23239757120609283,
0.38375672698020935,
0.2756190299987793,
-0.2539525628089905,
-0.15662480890750885,
-0.4555266499519348,
-0.45564767718315125,
0.2915145456790924,
0.05500895157456398,
0.27226412296295166,
0.09747514128684998,
-0.13197237253189087,
0.3784187138080597,
0.14383183419704437,
-0.26965251564979553,
0.20713546872138977,
0.19439245760440826,
0.2276330292224884,
0.3067960739135742,
0.16154618561267853,
0.12732551991939545,
-0.12193316966295242,
-0.10211716592311859,
0.0005312160355970263,
-0.5738058686256409,
-0.10939473658800125,
-0.08299221843481064,
0.24344006180763245,
0.21022407710552216,
-0.6044508814811707,
0.25120604038238525,
-0.1884346604347229,
-0.41412603855133057,
-0.17056071758270264,
0.05678753927350044,
0.32436805963516235,
-0.1336839646100998,
-0.16980014741420746,
0.3111151456832886,
0.03588606044650078,
0.10187923163175583,
0.012681362219154835,
0.14064279198646545,
0.2875837981700897,
0.10906388610601425,
0.0058356584049761295,
-0.15954625606536865,
-0.07624656707048416,
0.2651560306549072,
0.22415441274642944,
0.3071345090866089,
0.03472599387168884,
0.45030465722084045,
-0.08710353821516037,
0.29932916164398193,
-0.09958170354366302,
0.6628456115722656,
0.4894659221172333,
-0.2899217903614044,
0.21582065522670746,
0.33993181586265564,
0.047665610909461975,
-0.15153266489505768,
-0.023707980290055275,
0.11338769644498825,
0.1913726031780243,
-0.11480093747377396,
0.32574227452278137,
0.5763184428215027,
0.35415634512901306,
-0.05522443726658821,
-0.0920713022351265,
0.49775415658950806,
-0.2361813187599182,
-0.045112162828445435,
-0.004150962457060814,
-0.20093178749084473,
0.21444906294345856,
0.35680702328681946,
0.29590001702308655,
0.24470491707324982,
0.39493680000305176,
-0.044965025037527084,
0.31699442863464355,
0.21171800792217255,
0.3111310303211212,
0.1836915910243988,
-0.1737126260995865,
0.34190502762794495,
0.3521100580692291,
-0.0029111274052411318,
0.29331913590431213,
0.011505281552672386,
0.25483936071395874,
-0.037778206169605255,
0.06494144350290298,
-0.2181037813425064,
0.29750099778175354,
0.07369638234376907,
-0.22343963384628296,
-0.10657495260238647,
-0.24856996536254883,
0.03517042100429535,
0.07817989587783813,
-0.2575293481349945,
-0.43919840455055237,
0.4527999758720398,
-0.16138313710689545,
0.08142067492008209,
-0.011728636920452118,
0.2299814671278,
-0.18404969573020935,
-0.012600104324519634,
-0.014715909957885742,
0.4757888913154602,
-0.03885624557733536,
0.17515042424201965,
0.2862818241119385,
0.49843454360961914,
0.412489116191864,
0.2951309382915497,
0.0415237694978714,
0.11622694134712219,
-0.21709337830543518,
-0.024029342457652092,
-0.10739994794130325,
0.29561999440193176,
0.10525671392679214,
-0.2680230736732483,
0.35243692994117737,
0.04674964025616646,
-0.015057837590575218,
0.16114692389965057,
-0.24807600677013397,
-0.09473264962434769,
-0.2578936517238617,
-0.06532654911279678,
-0.03980426490306854,
-0.05216680094599724,
-0.019610906019806862,
0.0834801122546196,
-0.46525079011917114,
-0.15120165050029755,
0.408355176448822,
-0.18226073682308197,
0.21702724695205688,
-0.019124919548630714,
0.04298941045999527,
-0.12770424783229828,
0.5674461126327515,
0.175866037607193,
0.22554266452789307,
-0.18725158274173737,
-0.06541237980127335,
-0.6191357374191284,
0.017313731834292412,
-0.14856867492198944,
-0.027677053585648537,
-0.03425531089305878,
0.19280076026916504,
0.11834193766117096,
0.3820803761482239,
0.1264033317565918,
-0.16497503221035004,
0.07817436009645462,
0.16246140003204346,
0.06997191160917282,
0.02810530737042427,
-0.13909539580345154,
0.5387632250785828,
-0.1229071095585823,
-0.08954469114542007,
0.3787791430950165,
-0.03595273569226265,
-0.11720658838748932,
-0.23004035651683807,
0.26737236976623535,
0.1256120502948761,
0.050616730004549026,
0.45101845264434814,
0.011147343553602695,
0.10429754108190536,
-0.23955395817756653,
-0.07493414729833603,
-0.2782067358493805,
0.0913223922252655,
-0.3062455654144287,
0.14646287262439728,
0.03926672786474228,
-0.07202091813087463,
-0.5130127668380737,
-0.12600873410701752,
-0.10609205067157745,
-0.0476454459130764,
-0.21473747491836548,
-0.13843335211277008,
-0.28056949377059937,
-0.022200917825102806,
-0.3666772246360779,
-0.13021798431873322,
0.07994520664215088,
0.1912410855293274,
0.020776670426130295,
-0.32685551047325134,
-0.42309489846229553,
-0.096244677901268,
0.5732991695404053,
-0.08079129457473755,
-0.0943526029586792,
0.05042900890111923,
-0.22508510947227478,
0.08670523762702942,
-0.16949734091758728,
-0.8003808856010437,
-0.024474292993545532,
0.2794879376888275,
0.11446155607700348,
-0.04949629679322243,
0.12134110927581787,
0.03760061040520668,
-0.1471032202243805,
-0.37299007177352905,
0.35261204838752747,
-0.0036824883427470922,
-0.1638880968093872,
-0.33889076113700867,
-0.4334893226623535
] |
https://github.com/huggingface/datasets/issues/1983
|
The size of CoNLL-2003 is not consistant with the official release.
|
Hi,
if you inspect the raw data, you can find there are 946 occurrences of `-DOCSTART- -X- -X- O` in the train split and `14041 + 946 = 14987`, which is exactly the number of sentences the authors report. `-DOCSTART-` is a special line that acts as a boundary between two different documents and is filtered out in our implementation.
@lhoestq What do you think about including these lines? ([Link](https://github.com/flairNLP/flair/issues/1097) to a similar issue in the flairNLP repo)
|
Thanks for the dataset sharing! But when I use conll-2003, I meet some questions.
The statistics of conll-2003 in this repo is :
\#train 14041 \#dev 3250 \#test 3453
While the official statistics is:
\#train 14987 \#dev 3466 \#test 3684
Wish for your reply~
| 78
|
The size of CoNLL-2003 is not consistant with the official release.
Thanks for the dataset sharing! But when I use conll-2003, I meet some questions.
The statistics of conll-2003 in this repo is :
\#train 14041 \#dev 3250 \#test 3453
While the official statistics is:
\#train 14987 \#dev 3466 \#test 3684
Wish for your reply~
Hi,
if you inspect the raw data, you can find there are 946 occurrences of `-DOCSTART- -X- -X- O` in the train split and `14041 + 946 = 14987`, which is exactly the number of sentences the authors report. `-DOCSTART-` is a special line that acts as a boundary between two different documents and is filtered out in our implementation.
@lhoestq What do you think about including these lines? ([Link](https://github.com/flairNLP/flair/issues/1097) to a similar issue in the flairNLP repo)
|
[
0.16607044637203217,
-0.34415203332901,
-0.0265198927372694,
0.3718204200267792,
-0.37470144033432007,
-0.002088161651045084,
0.06137146055698395,
-0.07089845836162567,
-0.939496636390686,
-0.00628331582993269,
0.12523503601551056,
0.15680839121341705,
0.08135826885700226,
0.0008900865213945508,
-0.018458843231201172,
0.02929583191871643,
0.16485187411308289,
-0.04007911682128906,
0.2795078456401825,
-0.16712839901447296,
-0.05828525125980377,
0.47503599524497986,
-0.5303710103034973,
0.023151960223913193,
-0.8211597204208374,
0.06900810450315475,
-0.10389886051416397,
0.16458436846733093,
-0.36793065071105957,
-0.35517629981040955,
0.2766615152359009,
0.07233341783285141,
0.12486212700605392,
0.19319337606430054,
-0.0001210675181937404,
-0.43599259853363037,
0.222405806183815,
-0.09818217158317566,
-0.1973593682050705,
0.2145415097475052,
-0.1930089294910431,
-0.4295053780078888,
-0.03821966052055359,
-0.18750914931297302,
0.21448709070682526,
0.43106260895729065,
-0.5452505350112915,
0.26144519448280334,
0.3766060471534729,
0.321940153837204,
0.10628645867109299,
-0.05998676270246506,
0.12514129281044006,
-0.06098334863781929,
0.5427107810974121,
0.04434933513402939,
-0.05328734964132309,
0.2690059542655945,
0.1820468157529831,
0.22107642889022827,
-0.0648551732301712,
0.3887668251991272,
0.08200576156377792,
-0.2496800422668457,
-0.04309893026947975,
-0.028093846514821053,
-0.2199697196483612,
-0.2218952476978302,
0.0012419598642736673,
0.4098292589187622,
0.46096083521842957,
-0.21670040488243103,
-0.30234065651893616,
-0.6893429160118103,
0.2730958163738251,
-0.22582119703292847,
0.10935915261507034,
-0.007353935856372118,
-0.0039542606100440025,
-0.0349641889333725,
-0.10261525958776474,
-0.3313956558704376,
-0.2891084849834442,
-0.11530475318431854,
-0.2888513207435608,
0.36198338866233826,
-0.09821108728647232,
0.04202640801668167,
0.12998227775096893,
0.21710795164108276,
0.6810012459754944,
-0.03529781103134155,
-0.03743709623813629,
-0.05997401475906372,
0.021308090537786484,
-0.28269726037979126,
0.07698085159063339,
-0.08763182908296585,
0.42730867862701416,
-0.31645259261131287,
-0.3112635910511017,
-0.44419270753860474,
0.04227796941995621,
-0.051705025136470795,
0.346698522567749,
0.07965817302465439,
0.1834949553012848,
0.4299296736717224,
0.08451060950756073,
-0.04418975114822388,
0.1412351280450821,
0.11425339430570602,
-0.3085033595561981,
-0.10484545677900314,
-0.4565187394618988,
0.08638428896665573,
-0.4163791239261627,
-0.41306978464126587,
-0.13309386372566223,
0.17241480946540833,
-0.11130232363939285,
-0.27246415615081787,
0.015479225665330887,
0.09700149297714233,
0.24530333280563354,
0.5682399868965149,
-0.00699818879365921,
-0.1539086103439331,
-0.09623608738183975,
-0.2754596769809723,
-0.048761315643787384,
-0.1259206384420395,
-0.08377843350172043,
-0.04074535146355629,
-0.04313674941658974,
-0.468964546918869,
0.1422911137342453,
-0.0367283970117569,
0.34247830510139465,
0.10440933704376221,
0.0005003644619137049,
-0.19081802666187286,
0.11239349842071533,
-0.07600152492523193,
-0.2280939370393753,
-0.04319275915622711,
0.018266506493091583,
0.42657315731048584,
-0.2598370313644409,
0.19833189249038696,
-0.0825980082154274,
-0.32484352588653564,
-0.2638597786426544,
0.022615747526288033,
-0.2561666965484619,
-0.1643790900707245,
0.6193918585777283,
0.052314382046461105,
0.28747352957725525,
-0.10288527607917786,
0.2342781275510788,
-0.21832910180091858,
-0.14484697580337524,
-0.0757279023528099,
0.24447838962078094,
0.15507319569587708,
-0.2432813048362732,
-0.0339374765753746,
0.053598012775182724,
-0.017870711162686348,
0.015811214223504066,
0.2335742861032486,
-0.1454828530550003,
0.48143988847732544,
-0.09974803775548935,
-0.15828680992126465,
0.3144398033618927,
-0.5198944211006165,
-0.13040445744991302,
0.19596384465694427,
0.15127597749233246,
-0.010327693074941635,
-0.12460120767354965,
-0.2870714068412781,
0.5772902369499207,
-0.004811032209545374,
0.03243543207645416,
0.03672197088599205,
0.022380366921424866,
0.005998855922371149,
-0.32432058453559875,
-0.16828970611095428,
-0.461507111787796,
-0.31195068359375,
-0.0392330028116703,
-0.4152747392654419,
-0.35702699422836304,
-0.13256153464317322,
0.4206122159957886,
0.1739865243434906,
-0.07138000428676605,
0.10502448678016663,
0.2062053382396698,
0.27798768877983093,
0.19167813658714294,
0.31332316994667053,
-0.10009942203760147,
-0.019403554499149323,
0.3702368438243866,
0.14408858120441437,
0.5833435654640198,
-0.2024104744195938,
-0.3424498736858368,
0.01809845119714737,
0.3618108034133911,
-0.2660246789455414,
0.046432457864284515,
0.07845716923475266,
0.24907493591308594,
0.10457385331392288,
-0.22303372621536255,
0.22943370044231415,
-0.0686066523194313,
0.08295829594135284,
-0.022883696481585503,
-0.16792553663253784,
0.007625710219144821,
-0.05146457627415657,
0.0765400379896164,
0.3759818375110626,
0.050176750868558884,
0.2213456928730011,
-0.04306500777602196,
0.15605977177619934,
0.37332016229629517,
0.02591104246675968,
0.15937656164169312,
-0.15034103393554688,
0.1712959110736847,
0.07133741676807404,
0.003964584320783615,
-0.3762105703353882,
-0.06715954840183258,
0.15557342767715454,
-0.11901558190584183,
0.2018061727285385,
0.3937215805053711,
-0.08496531844139099,
0.12510700523853302,
-0.1524045318365097,
-0.10328077524900436,
-0.050498202443122864,
-0.04356279596686363,
-0.44408148527145386,
-0.077544666826725,
0.209718719124794,
0.04346402361989021,
0.11478163301944733,
-0.12784481048583984,
0.07944374531507492,
0.27159297466278076,
-0.040666613727808,
-0.3521394729614258,
0.3497374951839447,
-0.3610709011554718,
-0.043185219168663025,
0.16863176226615906,
0.1574980616569519,
0.16287440061569214,
0.27077367901802063,
0.4084945023059845,
0.013615833595395088,
-0.12619470059871674,
-0.21348392963409424,
0.27158865332603455,
0.2755284011363983,
0.2698623538017273,
0.3130464255809784,
0.12875381112098694,
0.20439788699150085,
-0.05767457187175751,
-0.05223233997821808,
0.004961453843861818,
-0.10045398771762848,
-0.20254705846309662,
-0.14761477708816528,
0.08831123262643814,
-0.3175337016582489,
-0.01914057508111,
-0.26434504985809326,
0.13518774509429932,
-0.26328685879707336,
0.20454873144626617,
-0.26547279953956604,
-0.13985620439052582,
-0.09684663265943527,
-0.4157755672931671,
0.39076095819473267,
-0.23952990770339966,
0.27841150760650635,
0.08633634448051453,
-0.23837320506572723,
-0.40467023849487305,
0.06464999914169312,
-0.1899421066045761,
-0.11686662584543228,
0.3373415172100067,
-0.3670266568660736,
0.10299479216337204,
0.14085619151592255,
-0.3336959481239319,
0.4816083610057831,
-0.16561055183410645,
-0.1645953208208084,
0.20191733539104462,
-0.39824166893959045,
-0.08839108794927597,
0.15490786731243134,
-0.18833991885185242,
-0.0865183174610138,
-0.010428817942738533,
-0.20352056622505188,
-0.1064215749502182,
0.1076323464512825,
-0.11341549456119537,
-0.28879767656326294,
0.09650575369596481,
-0.24954552948474884,
0.029788894578814507,
-0.18584604561328888,
0.06343349069356918,
-0.3321937620639801,
-0.09462381899356842,
0.1867457926273346,
-0.3426502048969269,
0.28713491559028625,
-0.1742214560508728,
-0.3361072242259979,
0.061368394643068314,
-0.1169489175081253,
-0.11239968985319138,
0.0519329197704792,
-0.18715286254882812,
-0.11768089234828949,
-0.26429682970046997,
-0.5564440488815308,
0.34575217962265015,
-0.06873507052659988,
0.1330457329750061,
-0.2591450810432434,
0.11609479784965515,
0.30910518765449524,
0.02547094225883484,
0.025379594415426254,
-0.3204878270626068,
0.032914407551288605,
-0.07022722065448761,
-0.06103342026472092,
0.5930923819541931,
-0.22806593775749207,
0.0729794055223465,
0.1565067172050476,
0.12258274108171463,
0.42535385489463806,
0.05936867371201515,
-0.04813738167285919,
0.0182669498026371,
0.16441580653190613,
-0.10712525993585587,
0.16833722591400146,
0.20772121846675873,
-0.09769031405448914,
-0.15633518993854523,
0.47056207060813904,
0.36462000012397766,
-0.005498128477483988,
-0.1388782411813736,
0.18332435190677643,
-0.02933717891573906,
-0.26613765954971313,
0.17399030923843384,
0.29955852031707764,
0.3880104720592499,
-0.1546846181154251,
0.16609050333499908,
-0.15125282108783722,
0.0750187337398529,
-0.2321190983057022,
-0.17019926011562347,
0.3782014846801758,
-0.2222849428653717,
0.3915684223175049,
0.386340856552124,
-0.3913901448249817,
0.2822630703449249,
0.32913124561309814,
-0.08320330828428268,
0.020157085731625557,
-0.2512374818325043,
0.05999934673309326,
0.1080636978149414,
0.3921414911746979,
-0.22492404282093048,
-0.4162839353084564,
0.4402129650115967,
0.1864137053489685,
-0.3669567406177521,
-0.0029856611508876085,
-0.42167478799819946,
-0.6974323391914368,
1.1738085746765137,
0.25734779238700867,
-0.15380893647670746,
0.0064696380868554115,
0.30784374475479126,
0.07863966375589371,
0.013955635949969292,
-0.20597513020038605,
-0.1701982319355011,
-0.13169479370117188,
-0.22176583111286163,
0.05817008391022682,
0.05216328054666519,
-0.04520246759057045,
-0.23918241262435913,
-0.14561128616333008,
0.4471740126609802,
-0.17333148419857025,
-0.05078547075390816,
0.3019072115421295,
0.23295480012893677,
0.035990968346595764,
0.17397505044937134,
0.19019675254821777,
0.2399754524230957,
0.21200504899024963,
0.2777109146118164,
-0.07665666192770004,
-0.4299628734588623,
0.16387100517749786,
-0.20159979164600372,
0.5481739640235901,
0.45935264229774475,
0.006628402508795261,
-0.09798023849725723,
-0.5291191339492798,
-0.027972765266895294,
0.30446991324424744,
0.1693531572818756,
0.2401065230369568,
-0.053031183779239655,
-0.34266331791877747,
-0.09143020957708359,
0.10913356393575668,
0.19105187058448792,
-0.30629411339759827,
-0.00533817196264863,
-0.25501683354377747,
-0.09138946235179901,
0.0554533414542675,
0.2086656540632248,
0.9420138597488403,
0.26014208793640137,
0.1926533281803131,
0.13769114017486572,
-0.4085139334201813,
0.6010940074920654,
0.08202262222766876,
0.11725511401891708,
-0.2683615982532501,
0.1279529631137848,
0.0676628053188324,
-0.19924384355545044,
-0.12373486161231995,
-0.27354636788368225,
-0.2983325123786926,
-0.15898019075393677,
-0.31409040093421936,
-0.17261402308940887,
-0.10101424902677536,
0.35830622911453247,
-0.16427525877952576,
-0.08458147943019867,
0.48123621940612793,
0.0399213545024395,
0.35901692509651184,
0.00603822385892272,
-0.123896524310112,
0.039435699582099915,
-0.37394192814826965,
-0.09885931015014648,
-0.5869013071060181,
-0.24768878519535065,
-0.017536954954266548,
-0.021593419834971428,
-0.13268810510635376,
-0.6107321977615356,
0.04733387753367424,
0.28415408730506897,
0.25723862648010254,
-0.00015923728642519563,
-0.12712492048740387,
0.13643385469913483,
0.3836013376712799,
-0.09676267951726913,
0.3567713797092438,
0.1492614597082138,
0.03688717633485794,
-0.18864701688289642,
-0.2704189121723175,
-0.05271025374531746,
-0.04060937464237213,
0.010483547113835812,
0.12633217871189117,
-0.012773791328072548,
0.21844831109046936,
-0.525165855884552,
0.18231762945652008,
0.29482054710388184,
0.02133024111390114,
-0.20413540303707123,
0.11767835170030594,
0.10391625016927719,
-0.11028236895799637,
0.011643209494650364,
-0.32459861040115356,
-0.34410127997398376,
-0.10302173346281052,
-0.1764567345380783,
0.20903347432613373,
-0.03252890333533287,
-0.06588035821914673,
0.2634502053260803,
-0.16134946048259735,
-0.03936354070901871,
0.40477797389030457,
-0.48169583082199097,
-0.17575478553771973,
0.04674637317657471,
0.38988253474235535,
-0.487367182970047,
-0.20789891481399536,
0.7181899547576904,
0.2839853763580322,
0.12103290110826492,
-0.24420595169067383,
0.07768531888723373,
-0.21901769936084747,
0.28534939885139465,
-0.1448168158531189,
0.26720181107521057,
-0.17149224877357483,
0.19368961453437805,
0.17945654690265656,
-0.2558451294898987,
-0.234559565782547,
-0.05176546424627304,
-0.0645466148853302,
0.05571446195244789,
-0.08141355961561203,
0.0005706395022571087,
-0.16191180050373077,
-0.08690231293439865,
-0.046404339373111725,
0.2907567620277405,
0.14834029972553253,
-0.10663314908742905,
-0.045483704656362534,
0.19944044947624207,
0.056839123368263245,
-0.17142175137996674,
-0.061639174818992615,
0.2124752700328827,
-0.1362292617559433,
-0.1371069699525833,
0.12863890826702118,
-0.029047545045614243,
0.16672974824905396,
0.3370330333709717,
-0.6418233513832092,
0.2252502292394638,
0.09848155826330185,
0.4276832342147827,
0.20315220952033997,
0.33477091789245605,
0.1589769721031189,
0.2815195620059967,
-0.13676117360591888,
0.013174604624509811,
0.2245778888463974,
0.08371946215629578,
-0.1395086646080017,
0.16328488290309906,
-0.01185804046690464,
0.21651309728622437,
0.088219054043293,
0.1616094559431076,
-0.01950591616332531,
0.38196903467178345,
-0.10949502885341644,
-0.07609440386295319,
0.2928074896335602,
0.10944081842899323,
-0.10391221940517426,
0.07779301702976227,
-0.32278746366500854,
0.10222546756267548,
-0.11770815402269363,
0.10590343177318573,
0.13384884595870972,
-0.07177417725324631,
-0.2860387861728668,
-0.09571803361177444,
0.2287205159664154,
0.4395948648452759,
0.04520250856876373,
0.23185855150222778,
-0.20782284438610077,
0.31697508692741394,
-0.1538718342781067,
-0.010630280710756779,
0.07696336507797241,
-0.38036900758743286,
0.3780266046524048,
-0.14781662821769714,
0.07938805222511292,
0.4393113851547241,
0.44900140166282654,
-0.12169813364744186,
0.5643338561058044,
0.09375686943531036,
0.16626426577568054,
0.07778943330049515,
-0.17478793859481812,
0.07629414647817612,
0.3394046723842621,
0.14294251799583435,
-0.5593453049659729,
0.011987533420324326,
0.00983669888228178,
0.0507720485329628,
-0.0907638892531395,
0.07334387302398682,
0.3212527334690094,
0.08121460676193237,
-0.1045704036951065,
-0.040419772267341614,
-0.0034827825147658587,
0.08480855822563171,
-0.14082838594913483,
-0.0825389102101326,
0.2572428584098816,
-0.14289170503616333,
0.26663854718208313,
-0.25090864300727844,
0.2829684317111969,
-0.13347221910953522,
0.2678278386592865,
-0.03211860731244087,
0.3751235008239746,
0.37953677773475647,
0.05960019305348396,
0.2736057639122009,
-0.12823988497257233,
-0.04255850985646248,
0.18633726239204407,
-0.007687068544328213,
0.24949635565280914,
0.38912996649742126,
0.1700572520494461,
0.2802567183971405,
0.0582992248237133,
-0.029289178550243378,
-0.12072377651929855,
-0.03043263778090477,
-0.0494101382791996,
-0.06762605160474777,
-0.10229625552892685,
-0.06966568529605865,
-0.20045773684978485,
0.18514996767044067,
0.1658855527639389,
-0.3086847960948944,
0.4326113164424896,
0.2365027815103531,
-0.08680105209350586,
-0.01615675538778305,
0.15643087029457092,
0.010687976144254208,
-0.1097479984164238,
0.05048619955778122,
0.29272255301475525,
0.30413714051246643,
0.13100992143154144,
-0.5701603293418884,
-0.12233289331197739,
0.1272030919790268,
-0.17521603405475616,
-0.5535445213317871,
0.14710767567157745,
0.0704299807548523,
0.1053009107708931,
0.18674056231975555,
0.1335623860359192,
0.03248072788119316,
-0.17004476487636566,
0.058994781225919724,
-0.09152677655220032,
-0.10227500647306442,
0.3059028089046478,
-0.07940731197595596,
0.01531931757926941,
0.10565871745347977,
0.05156896263360977,
0.0710834190249443,
-0.11111415177583694,
0.08735720068216324,
-0.20754706859588623,
0.2392423152923584,
0.2646920382976532,
0.24937838315963745,
0.322040855884552,
0.676134467124939,
-0.1604975163936615,
0.09593897312879562,
0.0055772545747458935,
-0.05480312183499336,
-0.023848270997405052,
0.1650034785270691,
-0.07995828241109848,
-0.35982105135917664,
-0.301398366689682,
0.08759184181690216,
0.30002298951148987,
0.3268480598926544,
0.3117428421974182,
-0.1694524884223938,
-0.36938926577568054,
-0.3254949152469635,
0.0781048908829689,
-0.23933039605617523,
0.10115940868854523,
0.37073543667793274,
-0.17343904078006744,
-0.24497099220752716,
0.03404058888554573,
-0.10158957540988922,
0.434627503156662,
-0.13820713758468628,
0.11278963088989258,
-0.3447745144367218,
0.16938506066799164,
0.6491165161132812,
-0.1134447380900383,
-0.6402679085731506,
-0.26782211661338806,
0.3487851619720459,
0.24953678250312805,
-0.2667503356933594,
0.14107608795166016,
0.28269070386886597,
-0.18790630996227264,
-0.011999644339084625,
0.8816473484039307,
-0.1740208864212036,
-0.24882838129997253,
-0.20546938478946686,
-0.05596597492694855
] |
https://github.com/huggingface/datasets/issues/1983
|
The size of CoNLL-2003 is not consistant with the official release.
|
We should mention in the Conll2003 dataset card that these lines have been removed indeed.
If some users are interested in using these lines (maybe to recombine documents ?) then we can add a parameter to the conll2003 dataset to include them.
But IMO the default config should stay the current one (without the `-DOCSTART-` stuff), so that you can directly train NER models without additional preprocessing. Let me know what you think
|
Thanks for the dataset sharing! But when I use conll-2003, I meet some questions.
The statistics of conll-2003 in this repo is :
\#train 14041 \#dev 3250 \#test 3453
While the official statistics is:
\#train 14987 \#dev 3466 \#test 3684
Wish for your reply~
| 73
|
The size of CoNLL-2003 is not consistant with the official release.
Thanks for the dataset sharing! But when I use conll-2003, I meet some questions.
The statistics of conll-2003 in this repo is :
\#train 14041 \#dev 3250 \#test 3453
While the official statistics is:
\#train 14987 \#dev 3466 \#test 3684
Wish for your reply~
We should mention in the Conll2003 dataset card that these lines have been removed indeed.
If some users are interested in using these lines (maybe to recombine documents ?) then we can add a parameter to the conll2003 dataset to include them.
But IMO the default config should stay the current one (without the `-DOCSTART-` stuff), so that you can directly train NER models without additional preprocessing. Let me know what you think
|
[
-0.07905232161283493,
0.005305658094584942,
0.02270878106355667,
0.17673157155513763,
-0.1750471144914627,
0.0091941449791193,
0.19263432919979095,
0.15998350083827972,
-1.0088423490524292,
0.09197141230106354,
0.11612102389335632,
0.03976064547896385,
-0.016935667023062706,
0.1187625601887703,
-0.06156933307647705,
0.30978256464004517,
0.07875272631645203,
0.06001214310526848,
0.1479177474975586,
-0.11915604770183563,
-0.3082510530948639,
0.35807594656944275,
-0.3310670554637909,
0.040578052401542664,
-0.5341428518295288,
0.1651313155889511,
-0.09848035871982574,
0.18783538043498993,
-0.43420669436454773,
-0.43544256687164307,
0.3668319284915924,
0.11227110028266907,
0.41307881474494934,
0.016417700797319412,
-0.00011188624193891883,
-0.11925452202558517,
0.25202202796936035,
-0.14122165739536285,
-0.07669337093830109,
0.16946355998516083,
-0.050209879875183105,
-0.2738071382045746,
0.014765839092433453,
-0.027316231280565262,
-0.050335321575403214,
0.2545046806335449,
-0.10911562293767929,
0.2557532787322998,
0.07377175241708755,
0.36818018555641174,
0.21397735178470612,
0.03844822198152542,
0.1702190786600113,
-0.05148329585790634,
0.35415127873420715,
0.21729089319705963,
-0.05252198502421379,
0.38117527961730957,
-0.19514884054660797,
0.10401173681020737,
-0.2099628746509552,
0.26880723237991333,
0.18733184039592743,
-0.2268100529909134,
0.3166728913784027,
0.15400001406669617,
0.25696516036987305,
-0.2214958518743515,
-0.21218475699424744,
0.35007569193840027,
0.29034683108329773,
-0.2142491191625595,
-0.19418743252754211,
-0.2296760380268097,
0.2725408971309662,
-0.4574776291847229,
0.0604044608771801,
0.0433201864361763,
-0.005855562165379524,
0.013737782835960388,
-0.21385329961776733,
-0.5553431510925293,
-0.29264596104621887,
0.058591295033693314,
-0.36671942472457886,
0.3881666660308838,
-0.11572849750518799,
-0.10228993743658066,
0.1817382425069809,
0.05999118462204933,
0.6260008811950684,
0.010335387662053108,
-0.16928225755691528,
-0.14312858879566193,
-0.11973614990711212,
-0.28595849871635437,
-0.055934589356184006,
0.06545546650886536,
0.2638855278491974,
-0.06365551054477692,
-0.11569362878799438,
-0.45107021927833557,
0.21219922602176666,
-0.24826295673847198,
-0.009358333423733711,
0.11319583654403687,
0.2837649881839752,
0.23985616862773895,
0.11208263784646988,
0.22244127094745636,
0.27963533997535706,
0.11298386752605438,
-0.20290091633796692,
-0.0597672201693058,
-0.24347378313541412,
-0.06760740280151367,
-0.017915599048137665,
-0.28107956051826477,
0.12912271916866302,
0.1988324075937271,
0.06394557654857635,
-0.07963816076517105,
-0.1012125238776207,
0.01849396340548992,
0.0820036455988884,
0.451205849647522,
0.003432684578001499,
-0.19843658804893494,
-0.08452911674976349,
-0.3352278769016266,
-0.11661528795957565,
-0.2821265757083893,
-0.08293693512678146,
-0.04592898115515709,
0.03554782643914223,
-0.20124366879463196,
0.1888846755027771,
-0.1283840388059616,
0.2089134156703949,
0.35289624333381653,
0.17743849754333496,
-0.17300976812839508,
0.14464949071407318,
-0.007326040416955948,
-0.2975323498249054,
-0.19501136243343353,
-0.05856536701321602,
0.1618618369102478,
-0.2799876034259796,
0.048545267432928085,
-0.09934750944375992,
-0.3043549358844757,
-0.41628172993659973,
0.12122372537851334,
-0.10190261900424957,
0.011826145462691784,
0.6224343776702881,
0.16646453738212585,
0.08264530450105667,
-0.1743585169315338,
0.06716413050889969,
-0.40802037715911865,
-0.35393235087394714,
-0.1758711189031601,
0.3193432688713074,
0.23307257890701294,
-0.23004485666751862,
-0.11733467131853104,
-0.09116522967815399,
-0.15054559707641602,
0.131071537733078,
0.00841692928224802,
-0.17774522304534912,
0.11057671159505844,
-0.07205747812986374,
-0.22153986990451813,
0.2518283724784851,
-0.33606478571891785,
-0.3417874872684479,
0.11124386638402939,
0.21982388198375702,
-0.32668596506118774,
-0.03301345929503441,
-0.05166853964328766,
0.34880584478378296,
-0.03355320915579796,
0.0222428310662508,
0.09916242957115173,
0.022030944004654884,
-0.21327082812786102,
-0.3179374635219574,
-0.281546950340271,
-0.3954850137233734,
-0.10320822149515152,
0.1473611742258072,
-0.19749973714351654,
-0.352944552898407,
0.031556710600852966,
0.30556926131248474,
0.19243323802947998,
0.011237526312470436,
0.30210399627685547,
0.3747842013835907,
-0.1904214322566986,
0.07839398086071014,
0.2963239252567291,
-0.6002668142318726,
0.03336162120103836,
-0.08809402585029602,
0.23121938109397888,
0.7295771837234497,
-0.08657782524824142,
-0.04869687557220459,
-0.10753551870584488,
0.19382378458976746,
-0.21021263301372528,
0.11658430099487305,
0.06021574139595032,
0.23704251646995544,
0.08849390596151352,
-0.13643991947174072,
0.07854633033275604,
-0.23631522059440613,
0.11352064460515976,
-0.22788485884666443,
-0.17920733988285065,
-0.08976982533931732,
-0.002487198216840625,
0.00924201961606741,
0.06790963560342789,
-0.17652952671051025,
0.2218799740076065,
0.044005606323480606,
0.3089008033275604,
0.30449166893959045,
-0.31361672282218933,
0.08099981397390366,
-0.0011143989395350218,
0.007004946004599333,
0.05682000890374184,
0.008292488753795624,
-0.2714279294013977,
-0.37445172667503357,
0.25553780794143677,
-0.08464023470878601,
0.08080003410577774,
0.4652867317199707,
-0.06986987590789795,
0.20971988141536713,
-0.0009588303510099649,
-0.14544646441936493,
-0.01717774197459221,
-0.0766730010509491,
-0.5671274065971375,
-0.2756134569644928,
0.35973474383354187,
-0.009008875116705894,
0.3806382715702057,
-0.35566258430480957,
-0.06700610369443893,
0.2865486443042755,
0.0019148007268086076,
-0.4107643961906433,
0.44181689620018005,
-0.37452682852745056,
-0.08145293593406677,
0.10613292455673218,
0.48378512263298035,
0.09477240592241287,
0.2629714906215668,
0.2847144603729248,
0.17738012969493866,
-0.06069197878241539,
-0.09770406037569046,
0.3825396001338959,
0.07971812784671783,
0.60066819190979,
0.2228212058544159,
0.015330223366618156,
0.0987115353345871,
0.0872502401471138,
-0.1637636423110962,
0.0181890856474638,
0.15279382467269897,
-0.21980437636375427,
-0.2572898864746094,
0.060175005346536636,
-0.06775286048650742,
-0.07474973797798157,
-0.017705462872982025,
-0.3243747353553772,
-0.13961929082870483,
0.06038004159927368,
-0.23856890201568604,
0.07134697586297989,
-0.029459483921527863,
-0.557930588722229,
0.33890268206596375,
-0.22540083527565002,
0.21552595496177673,
0.15094275772571564,
0.08237934112548828,
-0.5002087354660034,
0.1482926607131958,
-0.10691823065280914,
-0.35319262742996216,
0.04820039123296738,
-0.41826918721199036,
0.06689481437206268,
0.23851105570793152,
-0.326496422290802,
0.3696916699409485,
0.13476766645908356,
0.1904301941394806,
0.22300584614276886,
-0.38714587688446045,
-0.16407570242881775,
0.28418540954589844,
-0.18113480508327484,
0.018317578360438347,
-0.21519170701503754,
-0.0226867888122797,
-0.3398994505405426,
0.25748616456985474,
-0.16554303467273712,
-0.4132050573825836,
-0.06456819176673889,
-0.16896213591098785,
-0.001398680848069489,
0.06847666949033737,
0.03592437878251076,
0.007292211055755615,
-0.02684815786778927,
-0.07572771608829498,
-0.40063121914863586,
0.2760815918445587,
-0.0114549919962883,
-0.24530825018882751,
0.25594180822372437,
0.002532167360186577,
-0.18186430633068085,
-0.02000453695654869,
-0.17058101296424866,
0.1318052113056183,
-0.10819320380687714,
-0.6059454083442688,
0.2363821566104889,
-0.07030884176492691,
-0.010660368017852306,
-0.12749356031417847,
-0.05979857221245766,
0.31788599491119385,
0.23252759873867035,
-0.026087665930390358,
0.09492095559835434,
0.038314491510391235,
0.20878009498119354,
-0.12872347235679626,
0.46112486720085144,
-0.09768588095903397,
0.07730957865715027,
0.045960813760757446,
0.3247408866882324,
0.2846696674823761,
-0.29289767146110535,
-0.12634903192520142,
0.08746176958084106,
0.3358825147151947,
0.00021994917187839746,
0.22093482315540314,
0.025912679731845856,
0.03539355844259262,
0.015260474756360054,
0.3652917742729187,
0.20625068247318268,
-0.11519940942525864,
0.01741752400994301,
0.2381303757429123,
0.19254262745380402,
-0.1675615906715393,
0.032713569700717926,
0.23420226573944092,
0.6284461617469788,
-0.16603729128837585,
0.03294554352760315,
0.02767823077738285,
-0.3331242799758911,
-0.17341819405555725,
-0.1224716305732727,
0.19044353067874908,
-0.13016502559185028,
0.17760424315929413,
0.5518283843994141,
-0.5440957546234131,
0.2639869749546051,
-0.05141846835613251,
0.08053888380527496,
0.11513808369636536,
-0.28172481060028076,
-0.16047175228595734,
-0.00604888005182147,
0.46799448132514954,
-0.048159271478652954,
-0.41257941722869873,
0.3504719138145447,
0.16530483961105347,
-0.4734290540218353,
-0.12155448645353317,
-0.2587650716304779,
-0.533902645111084,
1.0868726968765259,
0.5440801978111267,
-0.03594028577208519,
-0.2314251959323883,
0.3389776647090912,
-0.028615398332476616,
-0.2221275418996811,
-0.16248993575572968,
-0.29480427503585815,
0.07528477907180786,
-0.02097686380147934,
-0.055057376623153687,
-0.2603349983692169,
-0.11307571828365326,
-0.20744401216506958,
-0.010299356654286385,
0.20511725544929504,
-0.19740989804267883,
0.09648329019546509,
0.21911022067070007,
0.3813680410385132,
0.14023210108280182,
0.24319300055503845,
0.059384945780038834,
0.4666583836078644,
0.48510199785232544,
0.15328627824783325,
-0.05736108124256134,
-0.2719494104385376,
0.2822733223438263,
-0.10912349820137024,
0.529907763004303,
0.31078213453292847,
-0.057263605296611786,
-0.021301714703440666,
-0.20387887954711914,
0.07713869959115982,
0.0760965645313263,
0.215923473238945,
0.32422834634780884,
-0.2165440320968628,
-0.3204385042190552,
-0.12043201923370361,
0.020163988694548607,
0.20612625777721405,
-0.20278504490852356,
-0.45433512330055237,
-0.14858084917068481,
-0.07301390916109085,
-0.10132002830505371,
0.4920628070831299,
0.8532766103744507,
0.06602273136377335,
0.2991853356361389,
-0.017137030139565468,
-0.28748181462287903,
0.4888046085834503,
-0.08671226352453232,
0.1391882449388504,
-0.3684089183807373,
-0.007966260425746441,
0.07105058431625366,
-0.10880351811647415,
-0.1466735303401947,
0.08640815317630768,
-0.13995510339736938,
0.09944580495357513,
-0.1318168044090271,
-0.24831807613372803,
-0.01217963732779026,
0.36271923780441284,
0.06245865672826767,
0.04707556217908859,
0.6486369967460632,
0.04023934155702591,
-0.0018698679050430655,
-0.18506163358688354,
-0.033013660460710526,
-0.06685085594654083,
-0.11628052592277527,
0.04118817299604416,
-0.13688641786575317,
-0.11154066026210785,
0.08052586764097214,
-0.0213478934019804,
0.19952738285064697,
-0.4030073881149292,
0.08989699929952621,
0.5373716950416565,
0.17341527342796326,
0.2524738609790802,
-0.2667483389377594,
-0.07807306945323944,
0.25933074951171875,
-0.12004092335700989,
0.39830365777015686,
0.13484890758991241,
0.057116683572530746,
-0.2200695127248764,
-0.29074615240097046,
-0.03893030807375908,
0.1188780814409256,
0.11488848924636841,
0.0022326228208839893,
-0.3247586190700531,
0.13972827792167664,
-0.5065876245498657,
0.14170841872692108,
0.07076528668403625,
0.041173189878463745,
-0.12315438687801361,
0.2083691656589508,
-0.12431658804416656,
-0.022443003952503204,
0.030801065266132355,
-0.14156892895698547,
-0.3870675265789032,
-0.08690840005874634,
-0.10634472221136093,
0.2709779441356659,
0.27689164876937866,
0.12753674387931824,
0.14968600869178772,
-0.05271103233098984,
-0.08569109439849854,
0.2901495397090912,
-0.1613328903913498,
-0.1506539285182953,
0.15199778974056244,
0.4072241187095642,
-0.05591168999671936,
-0.09591883420944214,
0.22891029715538025,
0.24414633214473724,
0.01380203664302826,
-0.08439191430807114,
0.29469943046569824,
-0.4281080663204193,
0.18212422728538513,
-0.20106825232505798,
0.48216134309768677,
-0.11250187456607819,
-0.05479525029659271,
-0.07321485877037048,
-0.2601729929447174,
-0.3238527178764343,
-0.015386325307190418,
-0.1974720060825348,
-0.08789561688899994,
-0.28027793765068054,
0.01686781272292137,
-0.24527397751808167,
-0.0561281256377697,
0.032081134617328644,
-0.08785412460565567,
-0.0835086852312088,
-0.18519766628742218,
-0.06912355124950409,
0.10991708189249039,
-0.03504273295402527,
-0.11354810744524002,
0.18619805574417114,
0.09873182326555252,
-0.331832617521286,
-0.056874003261327744,
-0.07248490303754807,
-0.20562423765659332,
0.21655891835689545,
0.6052776575088501,
-0.47886765003204346,
0.017433930188417435,
0.21672648191452026,
0.3572169542312622,
0.06316874921321869,
0.2910679578781128,
0.19182367622852325,
0.5138146281242371,
-0.09727117419242859,
0.01675674319267273,
-0.08037322759628296,
0.13940675556659698,
-0.37107616662979126,
-0.0375034362077713,
-0.017877187579870224,
0.08289287984371185,
-0.04806579649448395,
-0.004184865392744541,
0.13872294127941132,
0.11442708224058151,
-0.08109761774539948,
-0.11322826892137527,
0.24255599081516266,
0.23905318975448608,
-0.24247001111507416,
0.038445357233285904,
-0.17254571616649628,
0.058764174580574036,
-0.034702252596616745,
0.16506890952587128,
0.1652335375547409,
-0.06663051247596741,
-0.18372030556201935,
0.15023088455200195,
-0.09414958208799362,
0.4256550073623657,
-0.014578538946807384,
0.24392251670360565,
0.006996921729296446,
0.304889440536499,
0.3469518721103668,
-0.12999136745929718,
0.15805545449256897,
-0.04525793716311455,
0.5192869901657104,
-0.043217867612838745,
-0.1320541948080063,
0.30897632241249084,
0.34155505895614624,
-0.44370609521865845,
0.4573957622051239,
0.19896863400936127,
0.112117238342762,
0.07460122555494308,
-0.0678187906742096,
0.09700538963079453,
0.4011935591697693,
-0.13414731621742249,
-0.529808521270752,
0.027816176414489746,
-0.09279986470937729,
-0.17680230736732483,
-0.16490399837493896,
-0.05883004888892174,
0.40244418382644653,
0.3872841000556946,
-0.06080811470746994,
-0.15170463919639587,
-0.06671597063541412,
0.09235922992229462,
-0.24441146850585938,
0.057436659932136536,
0.5005825757980347,
-0.022106168791651726,
0.058125484734773636,
-0.2497326284646988,
0.03160699084401131,
-0.11270979046821594,
-0.004712319932878017,
-0.13603636622428894,
0.4472358822822571,
0.2742937207221985,
0.05042450129985809,
0.16266724467277527,
-0.1984320878982544,
0.27328428626060486,
0.049783121794462204,
-0.1446203738451004,
0.14204919338226318,
0.5019461512565613,
0.2180429995059967,
0.18412187695503235,
0.1261111944913864,
-0.016330379992723465,
-0.22221919894218445,
-0.12272951006889343,
0.03806585818529129,
-0.025414088740944862,
0.1366616040468216,
0.24366001784801483,
-0.17855748534202576,
0.155150905251503,
0.29692596197128296,
-0.4654330909252167,
0.31824761629104614,
0.5749578475952148,
0.13110128045082092,
0.03547077625989914,
0.05780712515115738,
0.07111505419015884,
-0.17689624428749084,
0.04467042163014412,
0.2089402973651886,
0.16239921748638153,
-0.10821746289730072,
-0.5213889479637146,
-0.08115945011377335,
0.27294039726257324,
-0.10016102343797684,
-0.1645810455083847,
0.1313478946685791,
0.1835097223520279,
0.07779553532600403,
0.013211064040660858,
-0.11204584687948227,
-0.05270858854055405,
-0.43847519159317017,
0.18090638518333435,
-0.15602579712867737,
0.020242823287844658,
-0.11992699652910233,
-0.005276059731841087,
0.028947027400135994,
-0.11492232233285904,
-0.01185360923409462,
-0.1289931833744049,
-0.08106787502765656,
-0.09689100831747055,
0.13122282922267914,
0.38444775342941284,
0.4371192455291748,
0.28693538904190063,
0.21507854759693146,
0.3534076511859894,
-0.0599934346973896,
-0.22324343025684357,
-0.07869424670934677,
0.21015509963035583,
-0.2013528048992157,
-0.05855802074074745,
-0.20938566327095032,
-0.21351923048496246,
-0.31995534896850586,
-0.1325802505016327,
0.10560518503189087,
0.28878504037857056,
0.20797154307365417,
-0.08566345274448395,
-0.3484728932380676,
-0.14502274990081787,
0.10127556324005127,
-0.2613719701766968,
0.26028597354888916,
0.2764105498790741,
-0.10399366915225983,
-0.2661339044570923,
-0.06568815559148788,
-0.007432795595377684,
0.3319246172904968,
0.0968865230679512,
0.29778313636779785,
-0.4783831238746643,
-0.02350601553916931,
0.2744099199771881,
0.03644387796521187,
-0.49608170986175537,
-0.07097060233354568,
0.4799349308013916,
0.13487571477890015,
-0.2606056034564972,
0.3722867965698242,
0.13075605034828186,
-0.08449732512235641,
-0.13513749837875366,
0.5800485014915466,
-0.34100016951560974,
-0.3498985469341278,
-0.5202116370201111,
-0.15781143307685852
] |
https://github.com/huggingface/datasets/issues/1983
|
The size of CoNLL-2003 is not consistant with the official release.
|
@lhoestq Yes, I agree adding a small note should be sufficient.
Currently, NLTK's `ConllCorpusReader` ignores the `-DOCSTART-` lines so I think it's ok if we do the same. If there is an interest in the future to use these lines, then we can include them.
|
Thanks for the dataset sharing! But when I use conll-2003, I meet some questions.
The statistics of conll-2003 in this repo is :
\#train 14041 \#dev 3250 \#test 3453
While the official statistics is:
\#train 14987 \#dev 3466 \#test 3684
Wish for your reply~
| 45
|
The size of CoNLL-2003 is not consistant with the official release.
Thanks for the dataset sharing! But when I use conll-2003, I meet some questions.
The statistics of conll-2003 in this repo is :
\#train 14041 \#dev 3250 \#test 3453
While the official statistics is:
\#train 14987 \#dev 3466 \#test 3684
Wish for your reply~
@lhoestq Yes, I agree adding a small note should be sufficient.
Currently, NLTK's `ConllCorpusReader` ignores the `-DOCSTART-` lines so I think it's ok if we do the same. If there is an interest in the future to use these lines, then we can include them.
|
[
0.13010746240615845,
0.09628929197788239,
0.03945065289735794,
0.05336767062544823,
-0.21693184971809387,
0.007520670536905527,
0.15427400171756744,
-0.0001618507958482951,
-0.973116934299469,
0.06726913154125214,
0.20561189949512482,
0.07014226168394089,
-0.05132858827710152,
-0.08427121490240097,
-0.08032756298780441,
0.3419831395149231,
-0.06757493317127228,
0.32786017656326294,
0.2285468578338623,
-0.12276362627744675,
-0.36684587597846985,
0.27751708030700684,
-0.2749781608581543,
-0.008238783106207848,
-0.3934662640094757,
0.08061207085847855,
-0.14193332195281982,
0.27101069688796997,
-0.2415267378091812,
-0.5320177674293518,
0.3974425196647644,
0.22277873754501343,
0.07723747938871384,
0.028881829231977463,
-0.0001155119898612611,
-0.21264956891536713,
0.3872509002685547,
-0.21596525609493256,
-0.20997369289398193,
0.47307664155960083,
-0.11290434747934341,
-0.766029417514801,
-0.04437343031167984,
-0.44478270411491394,
0.03193475306034088,
0.5121638178825378,
-0.08175291866064072,
0.1743456870317459,
0.2542608976364136,
0.16135810315608978,
0.1676938533782959,
0.239318385720253,
0.23750846087932587,
0.1333177387714386,
0.34750059247016907,
-0.024968570098280907,
-0.1696092188358307,
0.5508459210395813,
-0.20811407268047333,
0.12033461034297943,
-0.27800044417381287,
0.3548773229122162,
0.1467534452676773,
-0.23361340165138245,
0.13697181642055511,
-0.03803405538201332,
0.2645009458065033,
-0.06747464835643768,
-0.14199841022491455,
0.2909509837627411,
0.2943904399871826,
-0.2650744915008545,
-0.11949851363897324,
-0.5421304106712341,
0.26774922013282776,
-0.4985671639442444,
0.09953808039426804,
-0.036558281630277634,
-0.015111562795937061,
0.0170592050999403,
-0.25459912419319153,
-0.4198879599571228,
-0.32829588651657104,
0.12001676857471466,
-0.1598796248435974,
0.4180842638015747,
-0.0272403322160244,
0.030142800882458687,
0.1538587361574173,
0.15866392850875854,
0.5796186327934265,
0.07671951502561569,
-0.24449481070041656,
0.021566340699791908,
-0.037782419472932816,
-0.4418599009513855,
0.19022992253303528,
-0.1309911608695984,
0.16423438489437103,
-0.2104482501745224,
-0.1204390823841095,
-0.41997018456459045,
-0.09010668843984604,
-0.05930982902646065,
0.01935003697872162,
0.054341062903404236,
0.4128797650337219,
0.33647099137306213,
0.24082201719284058,
-0.10006123036146164,
0.41143926978111267,
0.14362211525440216,
-0.2529672682285309,
-0.1811218112707138,
-0.1239447295665741,
0.1675824373960495,
-0.2642971873283386,
-0.24068985879421234,
0.16248172521591187,
0.15658311545848846,
-0.034936949610710144,
-0.07352837175130844,
-0.06181802228093147,
-0.01785653457045555,
0.27473971247673035,
0.3580435514450073,
0.06861744821071625,
-0.09455850720405579,
0.07715851813554764,
-0.27236074209213257,
-0.05946366861462593,
-0.3487530052661896,
0.005909128580242395,
-0.01715383306145668,
-0.18438513576984406,
-0.05625949427485466,
0.3026270270347595,
-0.3127997815608978,
0.25982317328453064,
0.3169439136981964,
0.1503162533044815,
0.012402249500155449,
0.09437411278486252,
0.04884948953986168,
-0.08825980871915817,
-0.14847643673419952,
0.021238723769783974,
0.1710018813610077,
-0.37301769852638245,
0.22069981694221497,
0.10787811875343323,
-0.38717561960220337,
-0.49816104769706726,
0.057446904480457306,
-0.32941702008247375,
-0.06611466407775879,
0.5692342519760132,
0.06155172362923622,
0.15338607132434845,
-0.2984737157821655,
0.24794766306877136,
-0.16791479289531708,
-0.17644448578357697,
-0.13770076632499695,
0.27952972054481506,
0.07242664694786072,
0.0772199034690857,
-0.23270228505134583,
-0.21927094459533691,
-0.14208047091960907,
0.21048486232757568,
0.046470046043395996,
-0.19113415479660034,
0.1837276965379715,
-0.08464398235082626,
-0.01690705679357052,
0.4908654987812042,
-0.3189489245414734,
-0.24930469691753387,
0.4301474988460541,
-0.036891136318445206,
-0.21943959593772888,
-0.09887898713350296,
0.13892993330955505,
0.17065726220607758,
-0.19584262371063232,
-0.03320338949561119,
0.151760071516037,
0.03109264187514782,
0.12894470989704132,
-0.3339417576789856,
-0.221944198012352,
-0.2317960262298584,
-0.2167310267686844,
0.16336683928966522,
-0.22278599441051483,
-0.21781659126281738,
0.2956928610801697,
0.43389907479286194,
0.059518057852983475,
-0.06938022375106812,
0.24991585314273834,
0.36855387687683105,
-0.2128675878047943,
-0.10876662284135818,
0.4909599721431732,
-0.3863343894481659,
0.08844345062971115,
0.08078677952289581,
0.2146427482366562,
0.7478343844413757,
-0.2653275728225708,
-0.2305816262960434,
-0.15998238325119019,
0.2598366439342499,
-0.003772234544157982,
0.1104205846786499,
0.15214134752750397,
0.1595449596643448,
0.23140868544578552,
0.14878015220165253,
0.07305498421192169,
-0.16152122616767883,
0.03717569634318352,
0.0772232636809349,
-0.18533435463905334,
-0.030261849984526634,
-0.11656463891267776,
0.16304521262645721,
0.31337907910346985,
0.04098425805568695,
0.22510750591754913,
-0.12525467574596405,
0.36924827098846436,
0.04595867916941643,
-0.048130977898836136,
0.07098163664340973,
-0.16615897417068481,
0.046177562326192856,
0.2672274708747864,
-0.012722245417535305,
-0.39322930574417114,
-0.41525426506996155,
0.061391737312078476,
0.011680184863507748,
0.0987936407327652,
0.5511179566383362,
-0.24389547109603882,
0.0746924877166748,
-0.08411329984664917,
-0.19023261964321136,
-0.14992265403270721,
-0.20794591307640076,
-0.29502248764038086,
-0.2136438637971878,
0.32314756512641907,
-0.21288518607616425,
0.15343408286571503,
-0.3101694583892822,
-0.06340055167675018,
0.4416499137878418,
-0.18532297015190125,
-0.1847078800201416,
0.3180702328681946,
-0.24189512431621552,
-0.08907408267259598,
0.24813492596149445,
0.22561420500278473,
0.01595125161111355,
0.2709316909313202,
0.2830392122268677,
0.13575473427772522,
-0.24085089564323425,
-0.12831568717956543,
0.17523260414600372,
0.2388232946395874,
0.4394451081752777,
0.23919595777988434,
0.09228713810443878,
0.11481355130672455,
0.03407178819179535,
-0.004528427962213755,
-0.005415611434727907,
-0.027731643989682198,
-0.22798752784729004,
-0.36219438910484314,
0.16025355458259583,
-0.15049710869789124,
-0.06508323550224304,
-0.3093799948692322,
-0.22545048594474792,
-0.3511156439781189,
0.10185358673334122,
-0.13880738615989685,
-0.13691560924053192,
0.11451983451843262,
-0.5290237665176392,
0.4189191460609436,
-0.03922164440155029,
0.20312894880771637,
0.20474548637866974,
-0.24976709485054016,
-0.510473370552063,
0.08534522354602814,
-0.041005201637744904,
-0.3061429262161255,
0.35237041115760803,
-0.4794407784938812,
0.0280887633562088,
0.24861979484558105,
-0.48069459199905396,
0.36343199014663696,
-0.08300317078828812,
-0.15813463926315308,
0.20183174312114716,
-0.20512983202934265,
-0.3833320438861847,
0.12080520391464233,
-0.24498514831066132,
0.224606454372406,
-0.1539994329214096,
0.0005652761901728809,
-0.0720471516251564,
0.21230201423168182,
-0.44823068380355835,
-0.16380977630615234,
0.16696634888648987,
-0.3378916382789612,
0.19773496687412262,
-0.0912565216422081,
0.016075054183602333,
0.08179273456335068,
-0.16228267550468445,
0.2011842429637909,
-0.1818697154521942,
0.11547999083995819,
-0.11367270350456238,
0.01670706272125244,
0.22593510150909424,
-0.08113163709640503,
-0.16622374951839447,
0.06995860487222672,
-0.23872071504592896,
0.01060387771576643,
-0.30786243081092834,
-0.7261510491371155,
0.07437518239021301,
0.059525370597839355,
-0.060158003121614456,
-0.11508176475763321,
0.03760470822453499,
0.2131718248128891,
0.11275231838226318,
0.05231982842087746,
-0.08557397872209549,
-0.1226232647895813,
0.16212938725948334,
0.09451074153184891,
0.5319265127182007,
-0.22288762032985687,
0.30963006615638733,
-0.002292755525559187,
0.15905587375164032,
0.2853766679763794,
-0.0007304513710550964,
-0.22525662183761597,
-0.0015947542851790786,
0.2930026352405548,
0.2588471472263336,
0.32865825295448303,
0.32512304186820984,
0.10309898108243942,
-0.13795600831508636,
0.4538411796092987,
0.07740016281604767,
-0.14601759612560272,
0.05539681017398834,
0.14415600895881653,
0.016938701272010803,
-0.43416979908943176,
0.057354703545570374,
0.1168069839477539,
0.562643826007843,
-0.2184775322675705,
-0.008421763777732849,
-0.10973446071147919,
-0.16501356661319733,
-0.23411814868450165,
-0.029319554567337036,
0.300522118806839,
-0.02917739562690258,
0.2054881602525711,
0.2458178997039795,
-0.5631023645401001,
0.2150886505842209,
-0.036278024315834045,
0.08299075067043304,
0.17462678253650665,
-0.2535674273967743,
-0.2356995791196823,
0.10443463176488876,
0.036096129566431046,
-0.09381703287363052,
-0.20633122324943542,
0.3459340035915375,
0.3252565860748291,
-0.291098415851593,
-0.21757622063159943,
-0.2208031415939331,
-0.2699081599712372,
1.2819194793701172,
0.42557668685913086,
-0.38629597425460815,
0.043035756796598434,
0.3762328326702118,
-0.14831744134426117,
-0.14912748336791992,
-0.2190733700990677,
-0.39829039573669434,
-0.17639431357383728,
-0.19425255060195923,
0.1178857833147049,
-0.01545188669115305,
-0.08903209120035172,
-0.12346111238002777,
0.09127940237522125,
0.3205410838127136,
-0.1780039668083191,
0.09684167802333832,
0.39296382665634155,
0.2283860743045807,
0.5601579546928406,
0.16726379096508026,
0.05112101137638092,
0.3188783824443817,
-0.055344611406326294,
0.19465579092502594,
0.11765527725219727,
-0.08283489942550659,
0.25113967061042786,
-0.35255947709083557,
0.4620983600616455,
0.3488347828388214,
0.13131582736968994,
-0.10071640461683273,
-0.16213048994541168,
0.017741285264492035,
0.17482098937034607,
0.3541527986526489,
0.15578177571296692,
-0.32480132579803467,
-0.3251652419567108,
-0.14338813722133636,
0.26634010672569275,
0.06850916892290115,
-0.14874009788036346,
-0.4119538366794586,
-0.19027182459831238,
-0.21399761736392975,
-0.15380460023880005,
0.23921553790569305,
0.80805504322052,
0.12398365885019302,
0.17042626440525055,
0.355984091758728,
-0.29425954818725586,
0.4923354387283325,
0.0814509466290474,
0.03882923722267151,
-0.3318096101284027,
0.26948806643486023,
0.14304307103157043,
-0.04125980660319328,
-0.2466941624879837,
-0.048389703035354614,
-0.4165380001068115,
-0.003149183699861169,
0.0022392459213733673,
-0.24130307137966156,
-0.09307266771793365,
0.323760986328125,
0.05278487503528595,
0.06395364552736282,
0.2752552032470703,
0.03893761336803436,
0.1326100081205368,
-0.05100199952721596,
0.012095274403691292,
-0.2595161497592926,
-0.17580711841583252,
-0.17704683542251587,
-0.3532351553440094,
-0.3114783763885498,
0.14125977456569672,
0.018509434536099434,
-0.023655768483877182,
-0.4095524847507477,
0.19212082028388977,
0.27702072262763977,
0.35890987515449524,
0.2970506250858307,
-0.21692830324172974,
-0.10931114107370377,
0.25289663672447205,
-0.20342642068862915,
0.3574486970901489,
0.2469758540391922,
0.03481828421354294,
-0.2830648720264435,
-0.19564858078956604,
0.1517179310321808,
-0.10017725825309753,
-0.03768162056803703,
0.14607805013656616,
-0.17815952003002167,
0.014208116568624973,
-0.3417792320251465,
-0.03545335307717323,
0.3411003649234772,
-0.08775459975004196,
-0.010029733180999756,
0.13758644461631775,
0.09325157105922699,
-0.03530136123299599,
-0.15632279217243195,
-0.2820816934108734,
-0.20600515604019165,
-0.044456686824560165,
-0.3939482271671295,
0.13725432753562927,
0.1824120581150055,
-0.021890580654144287,
0.042390547692775726,
0.022850120440125465,
0.0014153284719213843,
0.1289575845003128,
-0.4131377935409546,
-0.07709579169750214,
-0.0668577253818512,
0.5177924036979675,
-0.2952233552932739,
-0.29137304425239563,
0.2481762319803238,
0.19479642808437347,
0.2999891936779022,
-0.10228262841701508,
0.26329752802848816,
-0.4071255028247833,
0.2513202726840973,
-0.2720458507537842,
0.445905864238739,
0.000009019149729283527,
0.40267881751060486,
-0.07454879581928253,
-0.18728913366794586,
-0.2772981524467468,
-0.2720986604690552,
-0.22974883019924164,
0.010797698982059956,
-0.18794980645179749,
0.045886311680078506,
-0.14564314484596252,
-0.12315258383750916,
-0.027406778186559677,
0.1666625440120697,
-0.0020092728082090616,
-0.10856516659259796,
0.026101596653461456,
0.16789914667606354,
0.045809306204319,
-0.03627555072307587,
0.22900184988975525,
0.0017382710939273238,
-0.13957834243774414,
-0.020596055313944817,
0.03944991156458855,
-0.38337305188179016,
0.1314445436000824,
0.6604417562484741,
-0.5886898636817932,
0.4171699285507202,
0.251173198223114,
0.25643986463546753,
-0.01927449181675911,
0.3532106280326843,
-0.11483442038297653,
0.5428196787834167,
-0.004675520118325949,
0.10385316610336304,
0.247819185256958,
0.06584266573190689,
-0.39223015308380127,
0.14414742588996887,
-0.0034274409990757704,
0.15521353483200073,
-0.07603363692760468,
0.004132824018597603,
-0.05377046391367912,
0.07223476469516754,
-0.29650336503982544,
-0.19901560246944427,
0.21631324291229248,
0.17534412443637848,
-0.29901644587516785,
0.18871207535266876,
-0.1672666221857071,
-0.034874074161052704,
0.15876689553260803,
0.14922098815441132,
0.031630393117666245,
-0.10849178582429886,
-0.1870100498199463,
0.20799222588539124,
-0.1151566207408905,
0.38942378759384155,
-0.018680885434150696,
0.26229915022850037,
-0.0982712134718895,
0.275238037109375,
0.09796788543462753,
-0.1320030391216278,
0.26433175802230835,
-0.40305134654045105,
0.5268945097923279,
-0.1661982536315918,
-0.12497040629386902,
0.26963531970977783,
0.18433810770511627,
-0.2103806883096695,
0.36393147706985474,
0.31023097038269043,
0.09927646070718765,
0.25281569361686707,
0.0409560389816761,
0.1101132333278656,
0.1543634682893753,
0.17724522948265076,
-0.611467719078064,
0.13042539358139038,
-0.021784616634249687,
0.03717780113220215,
0.002564822556450963,
0.24862076342105865,
0.197456493973732,
0.1135738343000412,
-0.07056472450494766,
-0.03093419037759304,
-0.36145496368408203,
0.03569550812244415,
-0.07797973603010178,
0.21711796522140503,
0.33587270975112915,
0.14980366826057434,
0.0945749580860138,
-0.3691619038581848,
0.03716166317462921,
-0.16399133205413818,
-0.026408256962895393,
-0.11657799035310745,
0.4230066239833832,
0.30498987436294556,
0.014247359707951546,
0.17972394824028015,
-0.062315795570611954,
0.19799721240997314,
0.15745927393436432,
-0.1397767812013626,
0.07170983403921127,
0.3436499834060669,
0.08094213157892227,
0.2746034860610962,
0.10123341530561447,
-0.06630127131938934,
0.0407203771173954,
-0.19175079464912415,
-0.181882843375206,
0.025762608274817467,
0.1480100303888321,
0.15532556176185608,
-0.27144819498062134,
0.13517475128173828,
0.15114907920360565,
-0.2748742997646332,
0.3268391489982605,
0.3695690631866455,
0.33354640007019043,
0.09222114086151123,
-0.11992423981428146,
0.046059928834438324,
-0.05181484669446945,
0.13571126759052277,
0.33516570925712585,
0.115669846534729,
0.05916663631796837,
-0.6472338438034058,
-0.26151472330093384,
0.2753874361515045,
-0.18589851260185242,
-0.6451829671859741,
0.3044983744621277,
0.023330049589276314,
0.10429532080888748,
0.07858924567699432,
-0.1120031476020813,
-0.10325145721435547,
-0.4663708806037903,
-0.1224789172410965,
-0.17097941040992737,
-0.18593339622020721,
0.03326485678553581,
-0.08088571578264236,
0.06168288365006447,
-0.055532053112983704,
0.08941981196403503,
0.08451297879219055,
-0.005715591367334127,
-0.07989849150180817,
0.15644524991512299,
0.40280836820602417,
0.5088053941726685,
0.2772643268108368,
0.19355276226997375,
0.5034731030464172,
-0.16098950803279877,
-0.21870896220207214,
0.09614276140928268,
0.015353024005889893,
-0.04061948135495186,
-0.17197243869304657,
-0.232699453830719,
-0.09010579437017441,
-0.20258402824401855,
0.19032295048236847,
-0.01345005352050066,
0.29780900478363037,
0.2321568876504898,
-0.09349877387285233,
-0.11281470954418182,
-0.1320217400789261,
-0.00029586211894638836,
-0.17561694979667664,
0.06333735585212708,
0.2933475375175476,
-0.09904000908136368,
-0.032828688621520996,
-0.06937805563211441,
-0.22041812539100647,
0.2743246257305145,
-0.09550189226865768,
0.17145760357379913,
-0.26964202523231506,
0.14781711995601654,
0.08460293710231781,
0.10204644501209259,
-0.5734165906906128,
-0.0021992672700434923,
0.44563746452331543,
0.3907031714916229,
-0.37747034430503845,
0.28123894333839417,
0.19217096269130707,
-0.11856787651777267,
0.03169836103916168,
0.622976541519165,
-0.28076064586639404,
-0.506376326084137,
-0.4081287682056427,
-0.2519994378089905
] |
https://github.com/huggingface/datasets/issues/1983
|
The size of CoNLL-2003 is not consistant with the official release.
|
I added a mention of this in conll2003's dataset card:
https://github.com/huggingface/datasets/blob/fc9796920da88486c3b97690969aabf03d6b4088/datasets/conll2003/README.md#conll2003
Edit: just saw your PR @mariosasko (noticed it too late ^^)
Let me take a look at it :)
|
Thanks for the dataset sharing! But when I use conll-2003, I meet some questions.
The statistics of conll-2003 in this repo is :
\#train 14041 \#dev 3250 \#test 3453
While the official statistics is:
\#train 14987 \#dev 3466 \#test 3684
Wish for your reply~
| 30
|
The size of CoNLL-2003 is not consistant with the official release.
Thanks for the dataset sharing! But when I use conll-2003, I meet some questions.
The statistics of conll-2003 in this repo is :
\#train 14041 \#dev 3250 \#test 3453
While the official statistics is:
\#train 14987 \#dev 3466 \#test 3684
Wish for your reply~
I added a mention of this in conll2003's dataset card:
https://github.com/huggingface/datasets/blob/fc9796920da88486c3b97690969aabf03d6b4088/datasets/conll2003/README.md#conll2003
Edit: just saw your PR @mariosasko (noticed it too late ^^)
Let me take a look at it :)
|
[
-0.11778036504983902,
-0.14909039437770844,
-0.1239805594086647,
0.4063592851161957,
-0.14216841757297516,
-0.18602555990219116,
0.2695666551589966,
0.01081132609397173,
-0.976585865020752,
0.12976129353046417,
0.0317082405090332,
-0.04652972146868706,
0.029543418437242508,
0.1740386188030243,
-0.07360482960939407,
0.12774577736854553,
0.06285610795021057,
-0.11948850750923157,
-0.07110366225242615,
-0.16196946799755096,
-0.14691175520420074,
0.4227977693080902,
-0.34524035453796387,
-0.05698041245341301,
-0.47104886174201965,
0.2424960732460022,
-0.12262727320194244,
0.07011735439300537,
-0.5567561388015747,
-0.32333827018737793,
0.40870144963264465,
-0.08661051094532013,
0.1769324392080307,
0.35544219613075256,
-0.00010404672502772883,
-0.1748572736978531,
0.2246979922056198,
-0.11574244499206543,
-0.06555543839931488,
0.2404014766216278,
-0.2004331350326538,
-0.1920398771762848,
-0.1547529101371765,
-0.030286261811852455,
0.0281114112585783,
0.27323609590530396,
-0.30899831652641296,
0.29939237236976624,
0.1822165548801422,
0.24308809638023376,
0.294532835483551,
0.08092144131660461,
0.2179153710603714,
-0.17604467272758484,
0.2989802360534668,
0.1917588859796524,
-0.11657173931598663,
0.22604523599147797,
-0.13072089850902557,
0.22758449614048004,
-0.087283194065094,
0.2860417068004608,
0.33497458696365356,
-0.17243024706840515,
0.08490574359893799,
-0.026191599667072296,
-0.08708120882511139,
-0.08644375205039978,
0.09545392543077469,
0.32110700011253357,
0.3949128985404968,
-0.3121787905693054,
-0.40265220403671265,
-0.1913684457540512,
0.031051425263285637,
-0.34626343846321106,
0.05632064864039421,
0.00963945034891367,
0.04613218829035759,
-0.058436743915081024,
-0.4982582926750183,
-0.1443534791469574,
-0.20755687355995178,
-0.04255862534046173,
-0.3624969720840454,
0.451224148273468,
-0.24200715124607086,
0.017779063433408737,
0.10087069869041443,
-0.05274096131324768,
0.41424593329429626,
0.027484577149152756,
-0.09224501997232437,
-0.086094930768013,
-0.2407749593257904,
-0.3211270868778229,
0.11061905324459076,
-0.12677566707134247,
0.4134698212146759,
-0.17619094252586365,
-0.32135748863220215,
-0.41952288150787354,
0.015968941152095795,
-0.33418503403663635,
0.18793965876102448,
0.23406608402729034,
0.01041619572788477,
0.16689173877239227,
0.1190469041466713,
0.07611897587776184,
0.272338330745697,
0.09307564049959183,
-0.24491025507450104,
-0.10014161467552185,
-0.2591286301612854,
-0.01999553292989731,
-0.1423545777797699,
-0.28683653473854065,
-0.10391660779714584,
0.09911194443702698,
-0.09187127649784088,
-0.15839678049087524,
-0.04698776826262474,
0.15262459218502045,
-0.007952610962092876,
0.4124995768070221,
-0.12674038112163544,
-0.055519040673971176,
-0.025935465469956398,
-0.29383203387260437,
-0.2362736314535141,
-0.30698534846305847,
-0.11960804462432861,
-0.20697735249996185,
-0.13348250091075897,
-0.14952866733074188,
0.29413294792175293,
-0.11338187754154205,
0.2720677852630615,
0.20488341152668,
0.02097991667687893,
-0.131098672747612,
0.03509733825922012,
-0.003628338221460581,
-0.2124435305595398,
-0.24516385793685913,
-0.09873633086681366,
0.16802334785461426,
-0.256064772605896,
-0.12840737402439117,
0.05714020878076553,
-0.32497647404670715,
-0.38232091069221497,
0.1705315262079239,
-0.1979285329580307,
-0.029026202857494354,
0.5316363573074341,
0.09593662619590759,
0.050576645880937576,
0.15573318302631378,
0.14039184153079987,
-0.34081706404685974,
-0.06990758329629898,
-0.22923101484775543,
0.31763604283332825,
0.08362895250320435,
-0.1907844990491867,
-0.07872069627046585,
-0.08769559860229492,
-0.20946098864078522,
0.17757801711559296,
0.21580514311790466,
-0.06215489283204079,
-0.09345748275518417,
-0.10838154703378677,
-0.23431432247161865,
0.14963585138320923,
-0.3616790473461151,
-0.43998008966445923,
0.22092096507549286,
0.17576852440834045,
-0.2946111857891083,
0.07708045840263367,
-0.021882863715291023,
0.3208504617214203,
0.04633375257253647,
0.0911380723118782,
0.09181368350982666,
0.04175339639186859,
-0.0348818302154541,
-0.17902246117591858,
-0.3428456783294678,
-0.354228138923645,
-0.138577401638031,
0.20415860414505005,
-0.3445737659931183,
-0.1481049656867981,
0.07305419445037842,
0.3761896789073944,
0.2262469232082367,
-0.07077281922101974,
0.26201558113098145,
0.4964693784713745,
-0.14206591248512268,
0.020206119865179062,
0.2618134915828705,
-0.347964346408844,
0.038945116102695465,
0.12039493024349213,
0.11058903485536575,
0.725997269153595,
-0.17053760588169098,
-0.2706605792045593,
0.046580277383327484,
0.24936436116695404,
-0.09994470328092575,
0.20311537384986877,
0.04045907407999039,
0.3650391399860382,
-0.004091841168701649,
-0.11047016829252243,
0.11397414654493332,
-0.01789914444088936,
-0.029275795444846153,
0.10107032209634781,
-0.1370583474636078,
-0.0016147567657753825,
-0.06534236669540405,
0.1549781858921051,
0.24030256271362305,
-0.04119190573692322,
0.10020982474088669,
-0.04795359447598457,
0.22809557616710663,
0.30121517181396484,
-0.20310227572917938,
0.20461837947368622,
0.042294085025787354,
0.062479980289936066,
0.22545506060123444,
0.08786973357200623,
-0.42477864027023315,
-0.2324255108833313,
0.2775835394859314,
-0.12411252409219742,
0.22564749419689178,
0.48455411195755005,
-0.23233097791671753,
0.11955154687166214,
-0.029378617182374,
0.025113433599472046,
-0.08480566740036011,
0.005210790783166885,
-0.34286025166511536,
-0.22045883536338806,
0.1815636307001114,
0.057542331516742706,
0.2655124366283417,
-0.36896952986717224,
0.03828373923897743,
0.31362906098365784,
-0.04310676082968712,
-0.306302547454834,
0.268869549036026,
-0.491364985704422,
-0.08226499706506729,
0.22808924317359924,
0.4648595154285431,
0.10761567950248718,
0.27888023853302,
0.42530015110969543,
0.0682951807975769,
0.05181349813938141,
-0.0445772223174572,
0.19963060319423676,
0.047905102372169495,
0.41864335536956787,
0.1436414122581482,
0.08310968428850174,
0.09657790511846542,
-0.03898834064602852,
-0.06463407725095749,
-0.00504379253834486,
0.0042762476950883865,
-0.08243872970342636,
-0.24268846213817596,
-0.0907878652215004,
-0.010018924251198769,
-0.012168463319540024,
-0.21765649318695068,
-0.2514374554157257,
-0.16269861161708832,
0.12141738831996918,
-0.30090197920799255,
0.05107578635215759,
-0.06330983340740204,
-0.3588634431362152,
0.16813646256923676,
0.013689707964658737,
0.31354382634162903,
0.2385154664516449,
0.1388937532901764,
-0.4799485206604004,
0.22591693699359894,
-0.1357046216726303,
-0.37816286087036133,
0.23796217143535614,
-0.41664761304855347,
0.06953968107700348,
0.08195126801729202,
-0.2997792661190033,
0.38625434041023254,
-0.1278277188539505,
0.00645842868834734,
0.16388759016990662,
-0.3423284590244293,
-0.2572755515575409,
0.356346994638443,
-0.07302270084619522,
-0.10173305869102478,
-0.2386440485715866,
0.005729669705033302,
-0.30397695302963257,
0.0857304260134697,
-0.2400319129228592,
-0.26037779450416565,
-0.08343083411455154,
-0.09324351698160172,
0.19438084959983826,
0.01876009628176689,
-0.02786080911755562,
0.02402915246784687,
0.11475308984518051,
0.15723657608032227,
-0.21346749365329742,
0.14952069520950317,
-0.28038665652275085,
-0.38067537546157837,
0.11390803009271622,
-0.03517496958374977,
-0.2225525677204132,
0.04819973558187485,
0.03050711378455162,
0.09311666339635849,
-0.15763837099075317,
-0.6883493661880493,
-0.0888282060623169,
-0.15760912001132965,
0.12907668948173523,
-0.12520994246006012,
0.15569664537906647,
0.22304555773735046,
0.05399647355079651,
-0.12115798890590668,
-0.11042357236146927,
-0.15637539327144623,
0.04112711921334267,
0.09459442645311356,
0.6660487651824951,
-0.19457341730594635,
0.20592531561851501,
0.24367240071296692,
0.4627051055431366,
0.4733089804649353,
-0.25809818506240845,
-0.08673970401287079,
-0.006799846421927214,
0.2599475681781769,
0.01250005979090929,
0.3047550320625305,
0.34876441955566406,
-0.06934520602226257,
-0.042855896055698395,
0.35927626490592957,
0.23119303584098816,
-0.011224044486880302,
0.11187265813350677,
0.29655638337135315,
0.10823716968297958,
-0.07360918074846268,
-0.005964080337435007,
0.4028126299381256,
0.4447234869003296,
-0.10624198615550995,
0.14737583696842194,
-0.13482940196990967,
-0.10461751371622086,
-0.12107566744089127,
-0.26051631569862366,
0.0995485931634903,
-0.10714748501777649,
0.25159311294555664,
0.34484729170799255,
-0.6651978492736816,
0.3250334858894348,
0.05197727307677269,
0.026449337601661682,
0.06465967744588852,
-0.10421427339315414,
-0.10223019868135452,
0.0845467746257782,
0.4017074704170227,
0.015804409980773926,
-0.1736903041601181,
0.2601069211959839,
-0.028571290895342827,
-0.39247292280197144,
-0.09871265292167664,
-0.41333845257759094,
-0.418616384267807,
1.0134071111679077,
0.47790879011154175,
-0.19893503189086914,
-0.07238200306892395,
0.28430506587028503,
0.14225520193576813,
-0.06981416791677475,
-0.15598715841770172,
-0.3303987383842468,
-0.1588703989982605,
0.04165595397353172,
0.05858529731631279,
-0.02340864948928356,
0.006052558775991201,
-0.1393439620733261,
-0.11416617780923843,
0.22119662165641785,
-0.24004393815994263,
0.030337337404489517,
0.2552061975002289,
0.4171558618545532,
0.2711310088634491,
0.19917838275432587,
-0.022170597687363625,
0.3590056598186493,
0.23648293316364288,
0.387264221906662,
0.07967425882816315,
-0.2558598220348358,
0.33165302872657776,
-0.005172327160835266,
0.44349223375320435,
0.3573232889175415,
-0.02774837240576744,
-0.1808556616306305,
-0.26133275032043457,
0.16654758155345917,
0.08239544928073883,
0.2123364955186844,
0.38830336928367615,
-0.01157581526786089,
-0.24624399840831757,
-0.11238856613636017,
0.18287724256515503,
0.10397158563137054,
-0.06595329940319061,
-0.24619300663471222,
-0.08138098567724228,
0.020325440913438797,
-0.08066169917583466,
0.28850582242012024,
0.8127254843711853,
-0.0819903016090393,
0.059610381722450256,
0.04117550700902939,
-0.3376266360282898,
0.23989267647266388,
-0.06954269856214523,
0.11487531661987305,
-0.33901506662368774,
-0.08354033529758453,
0.13620972633361816,
-0.11373212188482285,
-0.24181075394153595,
-0.07806933671236038,
-0.15532372891902924,
0.03906925022602081,
-0.14247554540634155,
-0.09211669862270355,
-0.09233047813177109,
0.24105221033096313,
-0.013318145647644997,
0.15704798698425293,
0.4033709466457367,
0.2571753263473511,
0.2467217892408371,
0.03120996616780758,
-0.0076874857768416405,
-0.09422777593135834,
-0.2511577904224396,
-0.031016163527965546,
-0.45069995522499084,
-0.14965485036373138,
-0.04153870791196823,
0.04370687156915665,
0.14639577269554138,
-0.44778281450271606,
-0.052312351763248444,
0.4075412452220917,
0.19180083274841309,
0.1762993186712265,
-0.177876278758049,
0.11436781287193298,
0.15891526639461517,
0.16220764815807343,
0.4319051504135132,
0.21484118700027466,
-0.14641180634498596,
-0.18852272629737854,
-0.29692018032073975,
0.13717682659626007,
0.06685797870159149,
0.05084685608744621,
0.06209341436624527,
-0.1832195520401001,
0.008464626036584377,
-0.4938531517982483,
0.30077967047691345,
0.0256829634308815,
0.06528681516647339,
-0.015288607217371464,
0.2463904470205307,
0.07471103966236115,
-0.05193307623267174,
0.03467260301113129,
-0.07041992992162704,
-0.43629708886146545,
-0.1606471687555313,
-0.10923345386981964,
0.15914389491081238,
0.368476539850235,
-0.0709737092256546,
0.10984282940626144,
0.03274538740515709,
-0.03099384903907776,
0.2632477581501007,
-0.34977152943611145,
-0.04679609835147858,
0.041174184530973434,
0.06604762375354767,
-0.22398220002651215,
-0.10873492807149887,
0.1983463019132614,
0.3862471580505371,
-0.0008994939271360636,
-0.2026977837085724,
0.11716638505458832,
-0.3669373095035553,
0.16624344885349274,
-0.1405935138463974,
0.4673711359500885,
-0.25691670179367065,
0.17297156155109406,
-0.022886035963892937,
-0.3501428961753845,
-0.3971061408519745,
-0.12634006142616272,
-0.26596933603286743,
-0.11352522671222687,
-0.39127835631370544,
-0.1805739551782608,
-0.10140334814786911,
-0.01712191291153431,
0.14419996738433838,
-0.052400797605514526,
-0.12381219118833542,
-0.27015814185142517,
-0.027882950380444527,
0.055412281304597855,
-0.0799713283777237,
-0.12377872318029404,
0.0732189416885376,
0.12106681615114212,
-0.3472324013710022,
-0.055411260575056076,
0.14605383574962616,
-0.039532504975795746,
0.2261103391647339,
0.4076474905014038,
-0.5039839148521423,
0.07259432226419449,
0.22140885889530182,
0.21205855906009674,
0.3264288902282715,
0.39905768632888794,
0.0824613943696022,
0.4527708888053894,
0.1557207703590393,
0.06853702664375305,
-0.017462998628616333,
0.042617395520210266,
-0.22377219796180725,
-0.038706760853528976,
0.08531899005174637,
0.167707160115242,
0.1316864937543869,
0.22000648081302643,
0.22729404270648956,
0.18329517543315887,
-0.10640973597764969,
0.04827594757080078,
0.15940053761005402,
0.305054634809494,
-0.2743837237358093,
0.10712280124425888,
-0.2487887293100357,
0.36901724338531494,
-0.03234804421663284,
0.17794175446033478,
0.1711961179971695,
0.039964862167835236,
-0.03352343291044235,
0.07940025627613068,
0.08340618014335632,
0.525468111038208,
-0.01635112799704075,
0.11205600947141647,
-0.01855337806046009,
0.4008268713951111,
0.2523587942123413,
-0.20617727935314178,
0.1637974977493286,
0.03493627905845642,
0.3331679403781891,
-0.11944074928760529,
-0.28567230701446533,
0.29205548763275146,
0.3565751314163208,
-0.16821052134037018,
0.33400240540504456,
0.18331430852413177,
-0.06671322882175446,
0.01798122748732567,
-0.0859546959400177,
0.16779030859470367,
-0.012094749137759209,
-0.0016966448165476322,
-0.7779330015182495,
0.05127410218119621,
-0.05615701153874397,
-0.10494964569807053,
0.12080925703048706,
-0.08152037858963013,
0.17091891169548035,
0.33472442626953125,
-0.23473653197288513,
-0.12702804803848267,
0.05501990765333176,
-0.07581088691949844,
-0.13941454887390137,
-0.05091781169176102,
0.1089923083782196,
0.20494762063026428,
0.0740077942609787,
-0.2799781560897827,
0.2123626470565796,
0.07561015337705612,
0.10400231927633286,
-0.10481669753789902,
0.4057825803756714,
0.28502270579338074,
-0.08171487599611282,
0.0166616328060627,
-0.09043999761343002,
0.20107275247573853,
0.1049899160861969,
-0.260087251663208,
0.09408756345510483,
0.33851081132888794,
0.07876655459403992,
0.25973570346832275,
0.20111224055290222,
-0.1343291997909546,
-0.24169105291366577,
-0.2874891757965088,
0.05041525512933731,
-0.1882932335138321,
0.15379303693771362,
-0.149167999625206,
-0.09165186434984207,
0.05430508032441139,
0.1305515468120575,
-0.49235594272613525,
0.22769047319889069,
0.3193545341491699,
0.055612169206142426,
0.1301308274269104,
-0.019379576668143272,
0.11609435826539993,
-0.27945736050605774,
-0.022717051208019257,
0.24742379784584045,
0.20130141079425812,
0.08794140815734863,
-0.5815749764442444,
-0.09237436205148697,
0.3105407655239105,
-0.16546714305877686,
-0.3448004424571991,
0.05326256901025772,
0.3007666766643524,
0.03726785257458687,
0.03769722208380699,
0.1974075585603714,
-0.1079816147685051,
-0.26138660311698914,
0.11923956125974655,
-0.3053140640258789,
0.01573820598423481,
0.0029153390787541866,
0.02495615743100643,
0.17743754386901855,
-0.016139909625053406,
0.056510958820581436,
-0.13105367124080658,
0.0159714687615633,
-0.11696962267160416,
0.023999661207199097,
0.32449743151664734,
0.21143533289432526,
0.33517947793006897,
0.15028510987758636,
0.4356205463409424,
-0.11513238400220871,
-0.3086126744747162,
-0.10748684406280518,
0.05397893488407135,
0.04323866218328476,
-0.10129507631063461,
-0.33733105659484863,
-0.2797779440879822,
-0.19995960593223572,
0.03972986340522766,
0.21891486644744873,
0.46440911293029785,
0.22393903136253357,
-0.14496907591819763,
-0.23409290611743927,
-0.09603994339704514,
-0.10712737590074539,
-0.33279523253440857,
0.17314645648002625,
0.25696641206741333,
-0.14552795886993408,
-0.27069687843322754,
0.017523624002933502,
-0.0046458556316792965,
0.31476208567619324,
-0.1813981980085373,
0.10842761397361755,
-0.34983983635902405,
-0.15410614013671875,
0.24462345242500305,
-0.11816319823265076,
-0.4130527973175049,
0.0719902440905571,
0.37621667981147766,
0.3241552412509918,
-0.09674996882677078,
0.30593645572662354,
0.14065200090408325,
-0.1888909935951233,
-0.005348320584744215,
0.7830976247787476,
-0.3070812523365021,
-0.4296426475048065,
-0.11242835223674774,
-0.06672412902116776
] |
https://github.com/huggingface/datasets/issues/1981
|
wmt datasets fail to load
|
yes, of course, I reverted to the version before that and it works ;)
but since a new release was just made you will probably need to make a hotfix.
and add the wmt to the tests?
|
on master:
```
python -c 'from datasets import load_dataset; load_dataset("wmt14", "de-en")'
Downloading and preparing dataset wmt14/de-en (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/stas/.cache/huggingface/datasets/wmt14/de-en/1.0.0/43e717d978d2261502b0194999583acb874ba73b0f4aed0ada2889d1bb00f36e...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/builder.py", line 578, in download_and_prepare
self._download_and_prepare(
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/builder.py", line 634, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/stas/.cache/huggingface/modules/datasets_modules/datasets/wmt14/43e717d978d2261502b0194999583acb874ba73b0f4aed0ada2889d1bb00f36e/wmt_utils.py", line 760, in _split_generators
extraction_map = dict(downloaded_files, **manual_files)
```
it worked fine recently. same problem if I try wmt16.
git bisect points to this commit from Feb 25 as the culprit https://github.com/huggingface/datasets/commit/792f1d9bb1c5361908f73e2ef7f0181b2be409fa
@albertvillanova
| 37
|
wmt datasets fail to load
on master:
```
python -c 'from datasets import load_dataset; load_dataset("wmt14", "de-en")'
Downloading and preparing dataset wmt14/de-en (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/stas/.cache/huggingface/datasets/wmt14/de-en/1.0.0/43e717d978d2261502b0194999583acb874ba73b0f4aed0ada2889d1bb00f36e...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/builder.py", line 578, in download_and_prepare
self._download_and_prepare(
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/builder.py", line 634, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/stas/.cache/huggingface/modules/datasets_modules/datasets/wmt14/43e717d978d2261502b0194999583acb874ba73b0f4aed0ada2889d1bb00f36e/wmt_utils.py", line 760, in _split_generators
extraction_map = dict(downloaded_files, **manual_files)
```
it worked fine recently. same problem if I try wmt16.
git bisect points to this commit from Feb 25 as the culprit https://github.com/huggingface/datasets/commit/792f1d9bb1c5361908f73e2ef7f0181b2be409fa
@albertvillanova
yes, of course, I reverted to the version before that and it works ;)
but since a new release was just made you will probably need to make a hotfix.
and add the wmt to the tests?
|
[
-0.32907208800315857,
-0.058493927121162415,
-0.010408253408968449,
0.5395734310150146,
0.31043118238449097,
0.00410419050604105,
0.20977970957756042,
0.08727094531059265,
0.31293484568595886,
0.10788709670305252,
-0.022500500082969666,
-0.1256612092256546,
-0.2969317138195038,
0.1887950450181961,
0.11141631752252579,
0.18481852114200592,
-0.13642457127571106,
0.005854577291756868,
-0.821604311466217,
0.015869082883000374,
-0.1838497519493103,
0.19848500192165375,
-0.16734184324741364,
-0.09697236120700836,
-0.5068033933639526,
0.23755261301994324,
-0.03000888042151928,
0.2536432445049286,
-0.2113707959651947,
-0.481631875038147,
0.5141915678977966,
0.030974959954619408,
0.05185168981552124,
0.557685136795044,
-0.00011410440492909402,
0.15152524411678314,
0.2935236692428589,
-0.010246101766824722,
-0.24660207331180573,
-0.2974121570587158,
-0.5779017210006714,
-0.3827316164970398,
0.021959686651825905,
0.22454851865768433,
-0.1884627342224121,
0.0820988193154335,
-0.24006755650043488,
-0.3640691041946411,
0.282050758600235,
0.29432395100593567,
0.221495121717453,
0.41515854001045227,
0.2789473831653595,
-0.3091942071914673,
0.051098331809043884,
0.2907717823982239,
-0.13798826932907104,
-0.02800210751593113,
0.013574084267020226,
-0.13521550595760345,
0.023276980966329575,
0.031646568328142166,
0.07332340627908707,
0.32977238297462463,
0.34579363465309143,
-0.1587228924036026,
0.2857420742511749,
-0.008103284984827042,
0.2792254388332367,
0.057778093963861465,
0.19649283587932587,
-0.075779989361763,
-0.2360387146472931,
-0.05942971259355545,
-0.13069595396518707,
-0.427654504776001,
0.2592034637928009,
0.2658752202987671,
0.030344245955348015,
0.2660064697265625,
-0.35894039273262024,
0.07395696640014648,
0.22120776772499084,
0.0317862369120121,
-0.38816720247268677,
0.3771415948867798,
-0.31149473786354065,
0.0018198230536654592,
0.2749309837818146,
-0.19026848673820496,
0.16606637835502625,
-0.1114593893289566,
-0.018749745562672615,
0.08372154086828232,
-0.5072572827339172,
0.2616909444332123,
0.02555856853723526,
0.2756204605102539,
-0.0800570622086525,
0.15823696553707123,
-0.25201791524887085,
0.01492790412157774,
0.20893849432468414,
-0.01556477788835764,
0.1787920594215393,
0.13862477242946625,
-0.10994362086057663,
-0.06265781819820404,
0.274922251701355,
0.05509822070598602,
-0.1853424608707428,
0.1351211965084076,
-0.17037932574748993,
-0.44336608052253723,
-0.08917540311813354,
-0.18943043053150177,
0.15255111455917358,
-0.07202807068824768,
-0.2599213421344757,
0.06353223323822021,
0.13551907241344452,
-0.314213365316391,
0.020418670028448105,
0.28552019596099854,
0.04840947315096855,
0.17023508250713348,
0.1179606094956398,
0.00365279009565711,
-0.004203212913125753,
-0.03577040880918503,
-0.35644733905792236,
-0.3906189501285553,
-0.29916325211524963,
0.061119936406612396,
0.4078386723995209,
-0.2185743898153305,
0.22830308973789215,
0.00040992526919580996,
-0.13100573420524597,
-0.12732183933258057,
-0.2269301414489746,
-0.007742516230791807,
0.2188933938741684,
0.4824039936065674,
0.07109355926513672,
0.2990785539150238,
0.24436607956886292,
0.15959204733371735,
-0.008131464943289757,
-0.007437875960022211,
-0.0995403602719307,
-0.29560190439224243,
0.1295192539691925,
0.2581726908683777,
-0.08152329921722412,
0.1570652276277542,
-0.2294500321149826,
-0.11366402357816696,
0.10502021759748459,
0.3215997517108917,
-0.19287154078483582,
-0.24175423383712769,
-0.16372564435005188,
-0.06663846969604492,
0.532138466835022,
0.5977157950401306,
0.009566912427544594,
-0.1942441463470459,
-0.3947499692440033,
-0.04718674719333649,
0.23443573713302612,
0.33222416043281555,
-0.02982283942401409,
0.100702665746212,
-0.26099610328674316,
-0.24705976247787476,
-0.08204495161771774,
-0.05945033207535744,
-0.18328458070755005,
0.13714541494846344,
-0.13132397830486298,
0.27511680126190186,
0.03245135396718979,
-0.12637971341609955,
0.014530199579894543,
-0.22653543949127197,
0.3428903818130493,
0.08913604170084,
-0.15807674825191498,
0.08362831920385361,
-0.07941689342260361,
-0.31649115681648254,
0.24742762744426727,
0.18862661719322205,
0.1936805546283722,
-0.1896166354417801,
0.21572543680667877,
0.024287493899464607,
0.06840922683477402,
0.05708952993154526,
0.12925033271312714,
0.03851975128054619,
0.08485949784517288,
-0.01277889870107174,
-0.08891816437244415,
0.05340175703167915,
-0.4473014771938324,
0.29648739099502563,
0.2691907584667206,
0.04374021664261818,
0.11734557151794434,
0.12081629037857056,
-0.1622200757265091,
0.13357685506343842,
-0.34347501397132874,
-0.18876931071281433,
0.08767901360988617,
0.13490237295627594,
-0.0035135403741151094,
-0.1450340896844864,
-0.03880850225687027,
-0.023978618904948235,
-0.22591696679592133,
0.14871419966220856,
0.2445327192544937,
0.0667206197977066,
-0.14334730803966522,
-0.12520886957645416,
0.2802846431732178,
0.2743450999259949,
0.16356143355369568,
-0.16977031528949738,
-0.163063645362854,
0.09085723012685776,
0.13997609913349152,
0.3951955735683441,
-0.08718639612197876,
0.1039203554391861,
0.17919087409973145,
-0.4736976623535156,
0.169942706823349,
0.13615936040878296,
-0.1402694284915924,
-0.2992374002933502,
0.12042985111474991,
0.04246269166469574,
-0.11031579226255417,
0.26758432388305664,
0.11755912750959396,
0.03573476895689964,
0.16481834650039673,
0.07098985463380814,
0.1453152447938919,
-0.38792166113853455,
0.2801468074321747,
-0.09231588989496231,
0.34285521507263184,
0.2670234143733978,
0.0239536352455616,
-0.042550813406705856,
0.3805403709411621,
0.16340261697769165,
0.2022349238395691,
0.015098481439054012,
-0.38560041785240173,
-0.08566095679998398,
-0.0661872923374176,
0.050184834748506546,
0.39677274227142334,
0.07352638989686966,
0.09358609467744827,
0.178636372089386,
0.11497236788272858,
-0.3025265336036682,
0.44670262932777405,
-0.0749790370464325,
-0.07670716941356659,
0.30438709259033203,
-0.023559896275401115,
-0.07227735221385956,
-0.26205572485923767,
0.5669651627540588,
0.058209918439388275,
0.0062177409417927265,
-0.19751502573490143,
-0.2630079984664917,
-0.4342707693576813,
0.23578296601772308,
-0.35005688667297363,
-0.5691426396369934,
-0.2052619308233261,
-0.20574262738227844,
-0.2758678197860718,
0.11813673377037048,
-0.0988529697060585,
0.24787220358848572,
0.06874673813581467,
0.21888881921768188,
-0.049077924340963364,
0.34659749269485474,
-0.0977025106549263,
-0.22596144676208496,
-0.10649710148572922,
0.039105258882045746,
0.5312064290046692,
-0.29954636096954346,
0.3275356590747833,
-0.1957142949104309,
0.06398846209049225,
-0.2002602517604828,
-0.22829727828502655,
0.08723219484090805,
-0.047869738191366196,
0.3465409278869629,
0.21176870167255402,
-0.023282885551452637,
0.3644324541091919,
-0.10893639177083969,
0.32595276832580566,
-0.15729746222496033,
-0.015335163101553917,
0.0034700334072113037,
-0.044544897973537445,
-0.14267076551914215,
-0.2228533923625946,
-0.34462296962738037,
-0.44080591201782227,
-0.38834521174430847,
-0.010653168894350529,
-0.026188010349869728,
-0.04189227893948555,
0.09175693243741989,
-0.13428980112075806,
-0.053230706602334976,
-0.0178123340010643,
-0.02589116431772709,
-0.3486141860485077,
-0.29844820499420166,
0.20006683468818665,
-0.30206507444381714,
-0.28192445635795593,
0.23929323256015778,
0.13543649017810822,
0.4544394314289093,
0.04012666270136833,
-0.39373883605003357,
0.5808204412460327,
-0.13911132514476776,
-0.11426214873790741,
0.18045711517333984,
0.3090636730194092,
-0.09056569635868073,
0.16540540754795074,
-0.049584489315748215,
-0.1657467931509018,
-0.2646004557609558,
-0.18060120940208435,
-0.2320658266544342,
0.15910384058952332,
-0.145669624209404,
0.06278549134731293,
0.010417954064905643,
0.804719865322113,
0.06547973304986954,
-0.2943533957004547,
0.18274617195129395,
0.12671272456645966,
0.22185206413269043,
-0.0006963182240724564,
-0.5895357728004456,
0.20101194083690643,
-0.09861599653959274,
0.22158391773700714,
0.3626623749732971,
0.043289922177791595,
0.17377445101737976,
-0.11392266303300858,
0.19395847618579865,
-0.18877960741519928,
-0.3513716161251068,
-0.12816403806209564,
0.2005111575126648,
0.38496890664100647,
0.09005293995141983,
0.12198779731988907,
0.02739141695201397,
-0.0954919159412384,
-0.009534705430269241,
0.35470137000083923,
0.12224742770195007,
0.0885339006781578,
-0.10506492108106613,
-0.056013233959674835,
-0.23697613179683685,
0.053589046001434326,
-0.1932053416967392,
0.4575611352920532,
-0.03244979307055473,
-0.12304670363664627,
-0.042314786463975906,
-0.018291009590029716,
0.5026878118515015,
0.19673973321914673,
0.39277029037475586,
0.10224811732769012,
-0.42482274770736694,
-0.239299938082695,
-0.12757550179958344,
0.09022291749715805,
-0.07357539236545563,
0.12852157652378082,
0.18462029099464417,
-0.20202913880348206,
-0.5072084069252014,
0.20257990062236786,
0.11078982800245285,
-0.1888125091791153,
-0.11982704699039459,
-0.14532987773418427,
0.024949295446276665,
-0.2902219891548157,
-0.07774002104997635,
-0.2248147428035736,
0.17979267239570618,
-0.4049381911754608,
-0.02397300861775875,
-0.15451888740062714,
-0.07883813977241516,
0.15115724503993988,
0.06572174280881882,
0.0934659093618393,
0.04429912939667702,
0.49238133430480957,
0.31229645013809204,
0.32004907727241516,
0.5650808811187744,
0.6159532070159912,
-0.10106368362903595,
0.034418292343616486,
0.08350595086812973,
0.016380291432142258,
0.05228275805711746,
0.2831592857837677,
-0.07817649096250534,
0.11110146343708038,
0.04386172816157341,
0.11074847728013992,
-0.596082866191864,
0.12400131672620773,
0.20190826058387756,
0.06802090257406235,
-0.3572424054145813,
-0.09975821524858475,
0.19460712373256683,
0.026873726397752762,
0.20069824159145355,
0.17600932717323303,
0.17026200890541077,
-0.39729538559913635,
-0.46661609411239624,
0.016818076372146606,
0.4947311282157898,
-0.07358695566654205,
0.22224144637584686,
-0.14231882989406586,
-0.11037736386060715,
0.05664834380149841,
0.27787768840789795,
-0.11726609617471695,
-0.19149573147296906,
0.1790856570005417,
0.03193129226565361,
-0.15855662524700165,
0.0860942006111145,
0.11525540798902512,
-0.0740375891327858,
0.27611061930656433,
0.04730994254350662,
0.5473339557647705,
0.13990235328674316,
0.08276138454675674,
-0.13338753581047058,
-0.2570023238658905,
-0.2534717917442322,
0.1469002664089203,
-0.040102701634168625,
0.33556726574897766,
-0.231438547372818,
-0.10192509740591049,
0.3119755983352661,
-0.06653553247451782,
-0.2452947497367859,
0.006580171640962362,
-0.6495987772941589,
0.10334190726280212,
-0.03576153889298439,
-0.103101447224617,
0.3692237138748169,
-0.23136365413665771,
0.18111717700958252,
0.31997597217559814,
-0.1902628391981125,
0.10110046714544296,
-0.31379395723342896,
0.038330577313899994,
-0.2302723228931427,
0.2646718919277191,
0.1008012592792511,
-0.033617760986089706,
-0.060365159064531326,
-0.10863864421844482,
-0.04074487090110779,
-0.05392984673380852,
0.03385309502482414,
0.05077141895890236,
-0.05529039725661278,
-0.049335554242134094,
-0.3194914162158966,
0.01181946974247694,
0.013150326907634735,
-0.15111097693443298,
0.1543607860803604,
0.0290807094424963,
-0.054929468780756,
0.3291853070259094,
-0.054955460131168365,
-0.1067551001906395,
-0.058549970388412476,
0.41458967328071594,
-0.26236051321029663,
0.02298640087246895,
0.30388006567955017,
0.41510558128356934,
-0.017547760158777237,
-0.28132715821266174,
-0.06851547211408615,
0.09080612659454346,
-0.24481137096881866,
0.2701687812805176,
0.11642244458198547,
-0.08998125791549683,
0.38016843795776367,
0.5611461400985718,
0.34226006269454956,
-0.1498243808746338,
0.0122461449354887,
-0.2868361175060272,
-0.19111813604831696,
0.06081416830420494,
-0.14355844259262085,
0.1625950038433075,
0.027716144919395447,
0.44049373269081116,
-0.17470639944076538,
0.3926457166671753,
-0.30593565106391907,
0.27493804693222046,
-0.09475819021463394,
-0.00005822788807563484,
0.21237224340438843,
-0.15855330228805542,
0.1591578722000122,
-0.09213411062955856,
0.041224416345357895,
-0.03402632847428322,
-0.5342020392417908,
-0.2137608826160431,
-0.11785994470119476,
0.094538114964962,
0.09808192402124405,
-0.2711144685745239,
0.16907384991645813,
-0.10803546756505966,
0.08079560101032257,
-0.16971030831336975,
0.3470475375652313,
0.06606954336166382,
-0.12226007878780365,
0.022901812568306923,
0.07030180841684341,
0.06582406163215637,
-0.16896209120750427,
0.1390584111213684,
0.0714525431394577,
-0.06772809475660324,
-0.0049929432570934296,
-0.04107728227972984,
0.04417707771062851,
0.020837675780057907,
0.11503085494041443,
0.010286190547049046,
-0.021657448261976242,
0.11822179704904556,
0.5093994736671448,
-0.30560871958732605,
-0.25251275300979614,
0.2638099789619446,
0.2856656014919281,
0.16861650347709656,
0.05136149376630783,
0.06142739951610565,
-0.16902229189872742,
0.1712697297334671,
-0.2953849136829376,
-0.07953968644142151,
-0.037757568061351776,
0.16378048062324524,
0.08571268618106842,
0.04997268319129944,
0.3570753037929535,
-0.21518827974796295,
-0.2337023913860321,
0.3549886643886566,
0.32511913776397705,
-0.11169131100177765,
0.17485427856445312,
0.46126222610473633,
0.08477901667356491,
0.2086668461561203,
0.10753466188907623,
-0.16532063484191895,
0.10477516055107117,
0.3765082359313965,
-0.23962783813476562,
0.6803718209266663,
0.06465525925159454,
0.006373960990458727,
0.24075651168823242,
-0.4143279194831848,
0.11077133566141129,
0.2690978944301605,
-0.15683044493198395,
0.024420393630862236,
-0.2630809247493744,
0.13773348927497864,
-0.34020090103149414,
-0.2731533348560333,
-0.18553632497787476,
0.19849398732185364,
-0.06555115431547165,
-0.12541380524635315,
-0.2556764781475067,
-0.1166849136352539,
-0.07807338237762451,
0.02736246958374977,
-0.0752224251627922,
-0.10226684808731079,
0.25959303975105286,
0.17326141893863678,
-0.15647491812705994,
-0.4046463072299957,
-0.36947739124298096,
0.016145009547472,
-0.09831968694925308,
-0.12282101809978485,
0.2560095489025116,
0.40483665466308594,
-0.21233735978603363,
0.13849422335624695,
0.4051622748374939,
0.4715682566165924,
0.3013881742954254,
-0.0192852932959795,
-0.08603452891111374,
0.0871981605887413,
-0.08514032512903214,
-0.27749940752983093,
0.4197256565093994,
-0.25680747628211975,
-0.15734222531318665,
0.004949019756168127,
0.16996318101882935,
-0.18624190986156464,
-0.3644257187843323,
0.12785694003105164,
-0.3126029372215271,
-0.28356191515922546,
0.19259627163410187,
-0.08869824558496475,
-0.057649627327919006,
-0.0464046373963356,
0.3801315426826477,
-0.046356651932001114,
0.22710734605789185,
0.6677155494689941,
-0.027535421773791313,
0.12809278070926666,
-0.24235840141773224,
0.1004885882139206,
0.08526204526424408,
0.7199046015739441,
0.2930552661418915,
-0.08171450346708298,
-0.2865353226661682,
-0.509995698928833,
-0.7815911173820496,
0.04826103895902634,
0.15429233014583588,
0.4362871050834656,
0.07365301251411438,
0.043988171964883804,
0.11922387033700943,
-0.022530656307935715,
0.15371669828891754,
0.12201851606369019,
0.2925766408443451,
-0.21513381600379944,
-0.3548651933670044,
0.17969664931297302,
-0.09501558542251587,
-0.1906725913286209,
-0.005380847025662661,
-0.32202109694480896,
0.1466888189315796,
-0.2788921892642975,
0.024702733382582664,
-0.24172334372997284,
0.4235900640487671,
0.0029754103161394596,
0.28758132457733154,
0.21881155669689178,
0.08809041231870651,
0.30637121200561523,
0.01079792995005846,
-0.063056580722332,
-0.419731080532074,
-0.31127825379371643,
0.014537946321070194,
0.08607228100299835,
-0.1074673980474472,
0.3646848201751709,
-0.053701095283031464,
-0.2685224413871765,
-0.4432089626789093,
0.10508644580841064,
0.11436906456947327,
0.20233570039272308,
-0.17699281871318817,
0.22221076488494873,
-0.21476826071739197,
-0.1733139455318451,
0.34437641501426697,
0.4282420575618744,
-0.02923724427819252,
0.18783746659755707,
-0.21067696809768677,
-0.38733237981796265,
0.2546338438987732,
-0.28877589106559753,
-0.16298402845859528,
-0.4629842936992645,
0.17723603546619415,
-0.0954379215836525,
-0.16986368596553802,
-0.42178064584732056,
0.15284375846385956,
0.17121684551239014,
-0.10168129205703735,
-0.21474589407444,
0.3726140558719635,
-0.04605444520711899,
-0.06841344386339188,
-0.018581144511699677,
0.1694670170545578,
0.1803852617740631,
-0.3343183994293213,
-0.11396177113056183,
-0.059833724051713943
] |
https://github.com/huggingface/datasets/issues/1981
|
wmt datasets fail to load
|
@stas00 it is fixed. @lhoestq are you releasing the hot fix or would you prefer me to do it?
|
on master:
```
python -c 'from datasets import load_dataset; load_dataset("wmt14", "de-en")'
Downloading and preparing dataset wmt14/de-en (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/stas/.cache/huggingface/datasets/wmt14/de-en/1.0.0/43e717d978d2261502b0194999583acb874ba73b0f4aed0ada2889d1bb00f36e...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/builder.py", line 578, in download_and_prepare
self._download_and_prepare(
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/builder.py", line 634, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/stas/.cache/huggingface/modules/datasets_modules/datasets/wmt14/43e717d978d2261502b0194999583acb874ba73b0f4aed0ada2889d1bb00f36e/wmt_utils.py", line 760, in _split_generators
extraction_map = dict(downloaded_files, **manual_files)
```
it worked fine recently. same problem if I try wmt16.
git bisect points to this commit from Feb 25 as the culprit https://github.com/huggingface/datasets/commit/792f1d9bb1c5361908f73e2ef7f0181b2be409fa
@albertvillanova
| 19
|
wmt datasets fail to load
on master:
```
python -c 'from datasets import load_dataset; load_dataset("wmt14", "de-en")'
Downloading and preparing dataset wmt14/de-en (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/stas/.cache/huggingface/datasets/wmt14/de-en/1.0.0/43e717d978d2261502b0194999583acb874ba73b0f4aed0ada2889d1bb00f36e...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/load.py", line 740, in load_dataset
builder_instance.download_and_prepare(
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/builder.py", line 578, in download_and_prepare
self._download_and_prepare(
File "/mnt/nvme1/code/huggingface/datasets-master/src/datasets/builder.py", line 634, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/stas/.cache/huggingface/modules/datasets_modules/datasets/wmt14/43e717d978d2261502b0194999583acb874ba73b0f4aed0ada2889d1bb00f36e/wmt_utils.py", line 760, in _split_generators
extraction_map = dict(downloaded_files, **manual_files)
```
it worked fine recently. same problem if I try wmt16.
git bisect points to this commit from Feb 25 as the culprit https://github.com/huggingface/datasets/commit/792f1d9bb1c5361908f73e2ef7f0181b2be409fa
@albertvillanova
@stas00 it is fixed. @lhoestq are you releasing the hot fix or would you prefer me to do it?
|
[
-0.32907208800315857,
-0.058493927121162415,
-0.010408253408968449,
0.5395734310150146,
0.31043118238449097,
0.00410419050604105,
0.20977970957756042,
0.08727094531059265,
0.31293484568595886,
0.10788709670305252,
-0.022500500082969666,
-0.1256612092256546,
-0.2969317138195038,
0.1887950450181961,
0.11141631752252579,
0.18481852114200592,
-0.13642457127571106,
0.005854577291756868,
-0.821604311466217,
0.015869082883000374,
-0.1838497519493103,
0.19848500192165375,
-0.16734184324741364,
-0.09697236120700836,
-0.5068033933639526,
0.23755261301994324,
-0.03000888042151928,
0.2536432445049286,
-0.2113707959651947,
-0.481631875038147,
0.5141915678977966,
0.030974959954619408,
0.05185168981552124,
0.557685136795044,
-0.00011410440492909402,
0.15152524411678314,
0.2935236692428589,
-0.010246101766824722,
-0.24660207331180573,
-0.2974121570587158,
-0.5779017210006714,
-0.3827316164970398,
0.021959686651825905,
0.22454851865768433,
-0.1884627342224121,
0.0820988193154335,
-0.24006755650043488,
-0.3640691041946411,
0.282050758600235,
0.29432395100593567,
0.221495121717453,
0.41515854001045227,
0.2789473831653595,
-0.3091942071914673,
0.051098331809043884,
0.2907717823982239,
-0.13798826932907104,
-0.02800210751593113,
0.013574084267020226,
-0.13521550595760345,
0.023276980966329575,
0.031646568328142166,
0.07332340627908707,
0.32977238297462463,
0.34579363465309143,
-0.1587228924036026,
0.2857420742511749,
-0.008103284984827042,
0.2792254388332367,
0.057778093963861465,
0.19649283587932587,
-0.075779989361763,
-0.2360387146472931,
-0.05942971259355545,
-0.13069595396518707,
-0.427654504776001,
0.2592034637928009,
0.2658752202987671,
0.030344245955348015,
0.2660064697265625,
-0.35894039273262024,
0.07395696640014648,
0.22120776772499084,
0.0317862369120121,
-0.38816720247268677,
0.3771415948867798,
-0.31149473786354065,
0.0018198230536654592,
0.2749309837818146,
-0.19026848673820496,
0.16606637835502625,
-0.1114593893289566,
-0.018749745562672615,
0.08372154086828232,
-0.5072572827339172,
0.2616909444332123,
0.02555856853723526,
0.2756204605102539,
-0.0800570622086525,
0.15823696553707123,
-0.25201791524887085,
0.01492790412157774,
0.20893849432468414,
-0.01556477788835764,
0.1787920594215393,
0.13862477242946625,
-0.10994362086057663,
-0.06265781819820404,
0.274922251701355,
0.05509822070598602,
-0.1853424608707428,
0.1351211965084076,
-0.17037932574748993,
-0.44336608052253723,
-0.08917540311813354,
-0.18943043053150177,
0.15255111455917358,
-0.07202807068824768,
-0.2599213421344757,
0.06353223323822021,
0.13551907241344452,
-0.314213365316391,
0.020418670028448105,
0.28552019596099854,
0.04840947315096855,
0.17023508250713348,
0.1179606094956398,
0.00365279009565711,
-0.004203212913125753,
-0.03577040880918503,
-0.35644733905792236,
-0.3906189501285553,
-0.29916325211524963,
0.061119936406612396,
0.4078386723995209,
-0.2185743898153305,
0.22830308973789215,
0.00040992526919580996,
-0.13100573420524597,
-0.12732183933258057,
-0.2269301414489746,
-0.007742516230791807,
0.2188933938741684,
0.4824039936065674,
0.07109355926513672,
0.2990785539150238,
0.24436607956886292,
0.15959204733371735,
-0.008131464943289757,
-0.007437875960022211,
-0.0995403602719307,
-0.29560190439224243,
0.1295192539691925,
0.2581726908683777,
-0.08152329921722412,
0.1570652276277542,
-0.2294500321149826,
-0.11366402357816696,
0.10502021759748459,
0.3215997517108917,
-0.19287154078483582,
-0.24175423383712769,
-0.16372564435005188,
-0.06663846969604492,
0.532138466835022,
0.5977157950401306,
0.009566912427544594,
-0.1942441463470459,
-0.3947499692440033,
-0.04718674719333649,
0.23443573713302612,
0.33222416043281555,
-0.02982283942401409,
0.100702665746212,
-0.26099610328674316,
-0.24705976247787476,
-0.08204495161771774,
-0.05945033207535744,
-0.18328458070755005,
0.13714541494846344,
-0.13132397830486298,
0.27511680126190186,
0.03245135396718979,
-0.12637971341609955,
0.014530199579894543,
-0.22653543949127197,
0.3428903818130493,
0.08913604170084,
-0.15807674825191498,
0.08362831920385361,
-0.07941689342260361,
-0.31649115681648254,
0.24742762744426727,
0.18862661719322205,
0.1936805546283722,
-0.1896166354417801,
0.21572543680667877,
0.024287493899464607,
0.06840922683477402,
0.05708952993154526,
0.12925033271312714,
0.03851975128054619,
0.08485949784517288,
-0.01277889870107174,
-0.08891816437244415,
0.05340175703167915,
-0.4473014771938324,
0.29648739099502563,
0.2691907584667206,
0.04374021664261818,
0.11734557151794434,
0.12081629037857056,
-0.1622200757265091,
0.13357685506343842,
-0.34347501397132874,
-0.18876931071281433,
0.08767901360988617,
0.13490237295627594,
-0.0035135403741151094,
-0.1450340896844864,
-0.03880850225687027,
-0.023978618904948235,
-0.22591696679592133,
0.14871419966220856,
0.2445327192544937,
0.0667206197977066,
-0.14334730803966522,
-0.12520886957645416,
0.2802846431732178,
0.2743450999259949,
0.16356143355369568,
-0.16977031528949738,
-0.163063645362854,
0.09085723012685776,
0.13997609913349152,
0.3951955735683441,
-0.08718639612197876,
0.1039203554391861,
0.17919087409973145,
-0.4736976623535156,
0.169942706823349,
0.13615936040878296,
-0.1402694284915924,
-0.2992374002933502,
0.12042985111474991,
0.04246269166469574,
-0.11031579226255417,
0.26758432388305664,
0.11755912750959396,
0.03573476895689964,
0.16481834650039673,
0.07098985463380814,
0.1453152447938919,
-0.38792166113853455,
0.2801468074321747,
-0.09231588989496231,
0.34285521507263184,
0.2670234143733978,
0.0239536352455616,
-0.042550813406705856,
0.3805403709411621,
0.16340261697769165,
0.2022349238395691,
0.015098481439054012,
-0.38560041785240173,
-0.08566095679998398,
-0.0661872923374176,
0.050184834748506546,
0.39677274227142334,
0.07352638989686966,
0.09358609467744827,
0.178636372089386,
0.11497236788272858,
-0.3025265336036682,
0.44670262932777405,
-0.0749790370464325,
-0.07670716941356659,
0.30438709259033203,
-0.023559896275401115,
-0.07227735221385956,
-0.26205572485923767,
0.5669651627540588,
0.058209918439388275,
0.0062177409417927265,
-0.19751502573490143,
-0.2630079984664917,
-0.4342707693576813,
0.23578296601772308,
-0.35005688667297363,
-0.5691426396369934,
-0.2052619308233261,
-0.20574262738227844,
-0.2758678197860718,
0.11813673377037048,
-0.0988529697060585,
0.24787220358848572,
0.06874673813581467,
0.21888881921768188,
-0.049077924340963364,
0.34659749269485474,
-0.0977025106549263,
-0.22596144676208496,
-0.10649710148572922,
0.039105258882045746,
0.5312064290046692,
-0.29954636096954346,
0.3275356590747833,
-0.1957142949104309,
0.06398846209049225,
-0.2002602517604828,
-0.22829727828502655,
0.08723219484090805,
-0.047869738191366196,
0.3465409278869629,
0.21176870167255402,
-0.023282885551452637,
0.3644324541091919,
-0.10893639177083969,
0.32595276832580566,
-0.15729746222496033,
-0.015335163101553917,
0.0034700334072113037,
-0.044544897973537445,
-0.14267076551914215,
-0.2228533923625946,
-0.34462296962738037,
-0.44080591201782227,
-0.38834521174430847,
-0.010653168894350529,
-0.026188010349869728,
-0.04189227893948555,
0.09175693243741989,
-0.13428980112075806,
-0.053230706602334976,
-0.0178123340010643,
-0.02589116431772709,
-0.3486141860485077,
-0.29844820499420166,
0.20006683468818665,
-0.30206507444381714,
-0.28192445635795593,
0.23929323256015778,
0.13543649017810822,
0.4544394314289093,
0.04012666270136833,
-0.39373883605003357,
0.5808204412460327,
-0.13911132514476776,
-0.11426214873790741,
0.18045711517333984,
0.3090636730194092,
-0.09056569635868073,
0.16540540754795074,
-0.049584489315748215,
-0.1657467931509018,
-0.2646004557609558,
-0.18060120940208435,
-0.2320658266544342,
0.15910384058952332,
-0.145669624209404,
0.06278549134731293,
0.010417954064905643,
0.804719865322113,
0.06547973304986954,
-0.2943533957004547,
0.18274617195129395,
0.12671272456645966,
0.22185206413269043,
-0.0006963182240724564,
-0.5895357728004456,
0.20101194083690643,
-0.09861599653959274,
0.22158391773700714,
0.3626623749732971,
0.043289922177791595,
0.17377445101737976,
-0.11392266303300858,
0.19395847618579865,
-0.18877960741519928,
-0.3513716161251068,
-0.12816403806209564,
0.2005111575126648,
0.38496890664100647,
0.09005293995141983,
0.12198779731988907,
0.02739141695201397,
-0.0954919159412384,
-0.009534705430269241,
0.35470137000083923,
0.12224742770195007,
0.0885339006781578,
-0.10506492108106613,
-0.056013233959674835,
-0.23697613179683685,
0.053589046001434326,
-0.1932053416967392,
0.4575611352920532,
-0.03244979307055473,
-0.12304670363664627,
-0.042314786463975906,
-0.018291009590029716,
0.5026878118515015,
0.19673973321914673,
0.39277029037475586,
0.10224811732769012,
-0.42482274770736694,
-0.239299938082695,
-0.12757550179958344,
0.09022291749715805,
-0.07357539236545563,
0.12852157652378082,
0.18462029099464417,
-0.20202913880348206,
-0.5072084069252014,
0.20257990062236786,
0.11078982800245285,
-0.1888125091791153,
-0.11982704699039459,
-0.14532987773418427,
0.024949295446276665,
-0.2902219891548157,
-0.07774002104997635,
-0.2248147428035736,
0.17979267239570618,
-0.4049381911754608,
-0.02397300861775875,
-0.15451888740062714,
-0.07883813977241516,
0.15115724503993988,
0.06572174280881882,
0.0934659093618393,
0.04429912939667702,
0.49238133430480957,
0.31229645013809204,
0.32004907727241516,
0.5650808811187744,
0.6159532070159912,
-0.10106368362903595,
0.034418292343616486,
0.08350595086812973,
0.016380291432142258,
0.05228275805711746,
0.2831592857837677,
-0.07817649096250534,
0.11110146343708038,
0.04386172816157341,
0.11074847728013992,
-0.596082866191864,
0.12400131672620773,
0.20190826058387756,
0.06802090257406235,
-0.3572424054145813,
-0.09975821524858475,
0.19460712373256683,
0.026873726397752762,
0.20069824159145355,
0.17600932717323303,
0.17026200890541077,
-0.39729538559913635,
-0.46661609411239624,
0.016818076372146606,
0.4947311282157898,
-0.07358695566654205,
0.22224144637584686,
-0.14231882989406586,
-0.11037736386060715,
0.05664834380149841,
0.27787768840789795,
-0.11726609617471695,
-0.19149573147296906,
0.1790856570005417,
0.03193129226565361,
-0.15855662524700165,
0.0860942006111145,
0.11525540798902512,
-0.0740375891327858,
0.27611061930656433,
0.04730994254350662,
0.5473339557647705,
0.13990235328674316,
0.08276138454675674,
-0.13338753581047058,
-0.2570023238658905,
-0.2534717917442322,
0.1469002664089203,
-0.040102701634168625,
0.33556726574897766,
-0.231438547372818,
-0.10192509740591049,
0.3119755983352661,
-0.06653553247451782,
-0.2452947497367859,
0.006580171640962362,
-0.6495987772941589,
0.10334190726280212,
-0.03576153889298439,
-0.103101447224617,
0.3692237138748169,
-0.23136365413665771,
0.18111717700958252,
0.31997597217559814,
-0.1902628391981125,
0.10110046714544296,
-0.31379395723342896,
0.038330577313899994,
-0.2302723228931427,
0.2646718919277191,
0.1008012592792511,
-0.033617760986089706,
-0.060365159064531326,
-0.10863864421844482,
-0.04074487090110779,
-0.05392984673380852,
0.03385309502482414,
0.05077141895890236,
-0.05529039725661278,
-0.049335554242134094,
-0.3194914162158966,
0.01181946974247694,
0.013150326907634735,
-0.15111097693443298,
0.1543607860803604,
0.0290807094424963,
-0.054929468780756,
0.3291853070259094,
-0.054955460131168365,
-0.1067551001906395,
-0.058549970388412476,
0.41458967328071594,
-0.26236051321029663,
0.02298640087246895,
0.30388006567955017,
0.41510558128356934,
-0.017547760158777237,
-0.28132715821266174,
-0.06851547211408615,
0.09080612659454346,
-0.24481137096881866,
0.2701687812805176,
0.11642244458198547,
-0.08998125791549683,
0.38016843795776367,
0.5611461400985718,
0.34226006269454956,
-0.1498243808746338,
0.0122461449354887,
-0.2868361175060272,
-0.19111813604831696,
0.06081416830420494,
-0.14355844259262085,
0.1625950038433075,
0.027716144919395447,
0.44049373269081116,
-0.17470639944076538,
0.3926457166671753,
-0.30593565106391907,
0.27493804693222046,
-0.09475819021463394,
-0.00005822788807563484,
0.21237224340438843,
-0.15855330228805542,
0.1591578722000122,
-0.09213411062955856,
0.041224416345357895,
-0.03402632847428322,
-0.5342020392417908,
-0.2137608826160431,
-0.11785994470119476,
0.094538114964962,
0.09808192402124405,
-0.2711144685745239,
0.16907384991645813,
-0.10803546756505966,
0.08079560101032257,
-0.16971030831336975,
0.3470475375652313,
0.06606954336166382,
-0.12226007878780365,
0.022901812568306923,
0.07030180841684341,
0.06582406163215637,
-0.16896209120750427,
0.1390584111213684,
0.0714525431394577,
-0.06772809475660324,
-0.0049929432570934296,
-0.04107728227972984,
0.04417707771062851,
0.020837675780057907,
0.11503085494041443,
0.010286190547049046,
-0.021657448261976242,
0.11822179704904556,
0.5093994736671448,
-0.30560871958732605,
-0.25251275300979614,
0.2638099789619446,
0.2856656014919281,
0.16861650347709656,
0.05136149376630783,
0.06142739951610565,
-0.16902229189872742,
0.1712697297334671,
-0.2953849136829376,
-0.07953968644142151,
-0.037757568061351776,
0.16378048062324524,
0.08571268618106842,
0.04997268319129944,
0.3570753037929535,
-0.21518827974796295,
-0.2337023913860321,
0.3549886643886566,
0.32511913776397705,
-0.11169131100177765,
0.17485427856445312,
0.46126222610473633,
0.08477901667356491,
0.2086668461561203,
0.10753466188907623,
-0.16532063484191895,
0.10477516055107117,
0.3765082359313965,
-0.23962783813476562,
0.6803718209266663,
0.06465525925159454,
0.006373960990458727,
0.24075651168823242,
-0.4143279194831848,
0.11077133566141129,
0.2690978944301605,
-0.15683044493198395,
0.024420393630862236,
-0.2630809247493744,
0.13773348927497864,
-0.34020090103149414,
-0.2731533348560333,
-0.18553632497787476,
0.19849398732185364,
-0.06555115431547165,
-0.12541380524635315,
-0.2556764781475067,
-0.1166849136352539,
-0.07807338237762451,
0.02736246958374977,
-0.0752224251627922,
-0.10226684808731079,
0.25959303975105286,
0.17326141893863678,
-0.15647491812705994,
-0.4046463072299957,
-0.36947739124298096,
0.016145009547472,
-0.09831968694925308,
-0.12282101809978485,
0.2560095489025116,
0.40483665466308594,
-0.21233735978603363,
0.13849422335624695,
0.4051622748374939,
0.4715682566165924,
0.3013881742954254,
-0.0192852932959795,
-0.08603452891111374,
0.0871981605887413,
-0.08514032512903214,
-0.27749940752983093,
0.4197256565093994,
-0.25680747628211975,
-0.15734222531318665,
0.004949019756168127,
0.16996318101882935,
-0.18624190986156464,
-0.3644257187843323,
0.12785694003105164,
-0.3126029372215271,
-0.28356191515922546,
0.19259627163410187,
-0.08869824558496475,
-0.057649627327919006,
-0.0464046373963356,
0.3801315426826477,
-0.046356651932001114,
0.22710734605789185,
0.6677155494689941,
-0.027535421773791313,
0.12809278070926666,
-0.24235840141773224,
0.1004885882139206,
0.08526204526424408,
0.7199046015739441,
0.2930552661418915,
-0.08171450346708298,
-0.2865353226661682,
-0.509995698928833,
-0.7815911173820496,
0.04826103895902634,
0.15429233014583588,
0.4362871050834656,
0.07365301251411438,
0.043988171964883804,
0.11922387033700943,
-0.022530656307935715,
0.15371669828891754,
0.12201851606369019,
0.2925766408443451,
-0.21513381600379944,
-0.3548651933670044,
0.17969664931297302,
-0.09501558542251587,
-0.1906725913286209,
-0.005380847025662661,
-0.32202109694480896,
0.1466888189315796,
-0.2788921892642975,
0.024702733382582664,
-0.24172334372997284,
0.4235900640487671,
0.0029754103161394596,
0.28758132457733154,
0.21881155669689178,
0.08809041231870651,
0.30637121200561523,
0.01079792995005846,
-0.063056580722332,
-0.419731080532074,
-0.31127825379371643,
0.014537946321070194,
0.08607228100299835,
-0.1074673980474472,
0.3646848201751709,
-0.053701095283031464,
-0.2685224413871765,
-0.4432089626789093,
0.10508644580841064,
0.11436906456947327,
0.20233570039272308,
-0.17699281871318817,
0.22221076488494873,
-0.21476826071739197,
-0.1733139455318451,
0.34437641501426697,
0.4282420575618744,
-0.02923724427819252,
0.18783746659755707,
-0.21067696809768677,
-0.38733237981796265,
0.2546338438987732,
-0.28877589106559753,
-0.16298402845859528,
-0.4629842936992645,
0.17723603546619415,
-0.0954379215836525,
-0.16986368596553802,
-0.42178064584732056,
0.15284375846385956,
0.17121684551239014,
-0.10168129205703735,
-0.21474589407444,
0.3726140558719635,
-0.04605444520711899,
-0.06841344386339188,
-0.018581144511699677,
0.1694670170545578,
0.1803852617740631,
-0.3343183994293213,
-0.11396177113056183,
-0.059833724051713943
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.