html_url
stringlengths 48
51
| title
stringlengths 5
268
| comments
stringlengths 70
51.8k
| body
stringlengths 0
29.8k
| comment_length
int64 16
1.52k
| text
stringlengths 164
54.1k
| embeddings
sequence |
---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/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.49882426857948303,
-0.26827821135520935,
-0.024500802159309387,
0.12822844088077545,
0.059439767152071,
0.20778393745422363,
0.12146293371915817,
0.424129843711853,
0.2917422652244568,
0.2924969494342804,
-0.11882511526346207,
0.18831509351730347,
0.13721297681331635,
0.08582092076539993,
-0.13625647127628326,
0.17504262924194336,
0.23703262209892273,
0.085334412753582,
0.26079800724983215,
-0.1344141811132431,
-0.3274792730808258,
-0.30906447768211365,
-0.1589120626449585,
-0.25786224007606506,
-0.40069231390953064,
-0.09581870585680008,
-0.24362216889858246,
-0.08205043524503708,
0.1982472836971283,
-0.47291645407676697,
-0.13753260672092438,
0.1398429274559021,
0.3402584493160248,
0.25829294323921204,
-0.00012204971426399425,
0.05567660555243492,
0.22800791263580322,
0.06546296179294586,
-0.22299756109714508,
0.6411958336830139,
0.3400726914405823,
-0.06948840618133545,
-0.17511016130447388,
-0.3107709586620331,
-0.14555539190769196,
-0.1110420823097229,
0.08107972890138626,
-0.046929746866226196,
-0.16636499762535095,
0.19430115818977356,
0.026624053716659546,
-0.05828651040792465,
0.052254825830459595,
-0.015400376170873642,
0.4025115668773651,
-0.0755913034081459,
-0.06917718797922134,
0.31747138500213623,
0.1635129153728485,
-0.07223787903785706,
0.09974309802055359,
0.4481078088283539,
0.1206413134932518,
-0.22677725553512573,
0.10890393704175949,
0.20516155660152435,
0.7838166952133179,
0.02243974804878235,
0.06526792794466019,
0.15266957879066467,
0.015340343117713928,
-0.09055263549089432,
-0.443008691072464,
-0.10290376842021942,
0.4257138669490814,
-0.6180593967437744,
-0.06740126758813858,
-0.08374200016260147,
-0.10147474706172943,
0.05386023595929146,
0.1745855063199997,
-0.030229715630412102,
0.03631801903247833,
0.04745089262723923,
0.17489956319332123,
0.16535739600658417,
0.3874708414077759,
-0.05990241467952728,
0.5584333539009094,
0.04244744032621384,
-0.11685466021299362,
0.04488252475857735,
-0.0920773297548294,
0.012196335010230541,
-0.6050297617912292,
0.08808468282222748,
-0.030915843322873116,
-0.0993313416838646,
-0.09268704801797867,
0.017801953479647636,
-0.3694859743118286,
0.006165648344904184,
0.2365599423646927,
0.0033363497350364923,
-0.18306466937065125,
-0.0902583971619606,
-0.5061047673225403,
0.05588098615407944,
0.08390173316001892,
0.10628709942102432,
-0.3780878484249115,
0.0992341935634613,
-0.0033381283283233643,
-0.0043098581954836845,
-0.32598063349723816,
-0.29813525080680847,
-0.22889026999473572,
0.22280706465244293,
-0.18114228546619415,
0.07718804478645325,
-0.40396830439567566,
-0.2522764801979065,
0.2050725668668747,
0.4162214994430542,
-0.11774410307407379,
-0.07613665610551834,
0.010839437134563923,
-0.03461559861898422,
-0.23442770540714264,
0.17616906762123108,
-0.2220170646905899,
0.230660080909729,
-0.031963787972927094,
0.5045983195304871,
-0.02910623513162136,
-0.22139422595500946,
-0.08906898647546768,
-0.021730657666921616,
0.08396384865045547,
-0.007842419669032097,
-0.04416358843445778,
-0.29989323019981384,
0.24666792154312134,
0.07492318749427795,
-0.26321426033973694,
-0.0676850825548172,
-0.09395191818475723,
0.12111034244298935,
-0.22782327234745026,
0.22150824964046478,
-0.21739467978477478,
-0.36510223150253296,
0.02715788595378399,
0.01933111622929573,
0.3086775839328766,
-0.06309258937835693,
0.4208229184150696,
0.11439721286296844,
0.17301848530769348,
0.16133517026901245,
0.15917645394802094,
-0.13144344091415405,
-0.26802125573158264,
0.08318649977445602,
0.22678394615650177,
0.3627384305000305,
0.09372176229953766,
0.034771163016557693,
0.2980126738548279,
0.3901304304599762,
0.21240505576133728,
0.39999380707740784,
-0.11594892293214798,
0.6762601137161255,
-0.32000401616096497,
0.08429210633039474,
0.2451203614473343,
-0.25537848472595215,
-0.2924264967441559,
0.18690460920333862,
-0.16636402904987335,
-0.07732588797807693,
0.32966315746307373,
0.5182706713676453,
0.31202951073646545,
0.08701563626527786,
0.34109318256378174,
0.30625542998313904,
0.00902649201452732,
-0.031247306615114212,
-0.4050687849521637,
-0.05827170982956886,
0.2639196813106537,
0.3804076910018921,
-0.3354525566101074,
0.10174062848091125,
-0.040181465446949005,
-0.32988062500953674,
0.6009740233421326,
-0.4761059880256653,
-0.12176213413476944,
0.06805813312530518,
0.3615734875202179,
0.33938679099082947,
0.2328696995973587,
0.27611035108566284,
0.14954213798046112,
0.16262602806091309,
0.09601449221372604,
0.09878889471292496,
0.1701553463935852,
-0.4183505177497864,
0.2156297266483307,
-0.02575014904141426,
-0.21819250285625458,
0.10788197070360184,
-0.06097814068198204,
0.15002501010894775,
-0.04567669704556465,
-0.19987307488918304,
-0.15688681602478027,
0.5427840352058411,
-0.615797758102417,
0.027946149930357933,
-0.24889658391475677,
-0.15608298778533936,
0.007015147712081671,
-0.21342599391937256,
-0.0342438630759716,
0.1429586410522461,
0.05249624699354172,
-0.3868664503097534,
-0.053833141922950745,
0.10286086052656174,
0.1266249418258667,
-0.18767639994621277,
0.5111070275306702,
-0.11369612067937851,
-0.037036772817373276,
0.29622212052345276,
0.04495333135128021,
-0.15126502513885498,
0.10901666432619095,
-0.1937614381313324,
-0.0018786939326673746,
0.4852040112018585,
0.348783940076828,
0.24583379924297333,
-0.021493790671229362,
-0.23320843279361725,
0.04702914506196976,
-0.04065045341849327,
-0.07938706129789352,
0.22752587497234344,
0.07994377613067627,
0.13025294244289398,
0.409172385931015,
-0.033335525542497635,
-0.3332445025444031,
0.2324640303850174,
0.18577706813812256,
-0.20312990248203278,
-0.4314081072807312,
0.27104198932647705,
0.3516995310783386,
-0.03689766302704811,
-0.3497084677219391,
-0.5220087170600891,
0.23602674901485443,
0.31859877705574036,
0.18839353322982788,
-0.07165404409170151,
-0.02765103615820408,
-0.24728143215179443,
0.16910947859287262,
0.05655350908637047,
-0.04837210476398468,
0.10004787892103195,
0.17664200067520142,
-0.21454474329948425,
-0.20678988099098206,
-0.2552962005138397,
-0.13639681041240692,
0.4286458492279053,
-0.04433870315551758,
0.30944040417671204,
0.17776265740394592,
0.2771869897842407,
-0.12472452968358994,
-0.1249765008687973,
0.288752019405365,
0.008840441703796387,
0.04161085933446884,
-0.10893554985523224,
-0.03623880445957184,
0.19310900568962097,
-0.04694970324635506,
0.36491888761520386,
0.19579416513442993,
-0.32509055733680725,
0.019844286143779755,
-0.09847083687782288,
-0.12149498611688614,
-0.07897848635911942,
0.12100525945425034,
-0.15055014193058014,
0.11739997565746307,
0.043947670608758926,
-0.05258079990744591,
-0.18513640761375427,
-0.08627132326364517,
-0.1575877070426941,
-0.07947695255279541,
-0.2974512279033661,
-0.1662350296974182,
-0.24606843292713165,
-0.12503769993782043,
-0.11964450776576996,
0.004330579191446304,
0.0005504606524482369,
-0.010686952620744705,
-0.04048753157258034,
-0.2826741635799408,
-0.15883666276931763,
0.06079476326704025,
-0.29363352060317993,
-0.21670202910900116,
-0.17391912639141083,
0.22814130783081055,
-0.024399638175964355,
0.09305882453918457,
-0.11566931754350662,
0.06675166636705399,
0.12224092334508896,
-0.0957009419798851,
-0.1543302685022354,
-0.0534617118537426,
-0.23314307630062103,
0.2917097210884094,
0.14917242527008057,
0.046831462532281876,
-0.0794370248913765,
-0.4122962951660156,
-0.014396958984434605,
0.4969033896923065,
-0.5218711495399475,
-0.040799517184495926,
-0.3583909571170807,
0.2859594225883484,
-0.3150937855243683,
0.458298921585083,
0.05670680105686188,
-0.24624888598918915,
-0.13801392912864685,
0.3644827604293823,
0.17451028525829315,
0.38753044605255127,
-0.06171327456831932,
0.05497738718986511,
-0.08791763335466385,
0.2675449550151825,
-0.11497532576322556,
0.5162416696548462,
0.32723158597946167,
-0.21369847655296326,
-0.047819457948207855,
-0.26239633560180664,
0.11595174670219421,
0.052770111709833145,
-0.13988173007965088,
0.2965240776538849,
0.08347784727811813,
-0.3149952292442322,
0.1665278822183609,
-0.2887440323829651,
-0.4117943346500397,
0.03204244002699852,
-0.0527595579624176,
0.1982455551624298,
-0.24431078135967255,
0.31699225306510925,
0.04895063117146492,
0.49109962582588196,
-0.17805010080337524,
0.29109612107276917,
-0.2383602410554886,
-0.17670398950576782,
0.19751477241516113,
0.2727530002593994,
0.2449011355638504,
-0.16755743324756622,
0.02649645321071148,
-0.5409093499183655,
-0.421677827835083,
0.28344085812568665,
0.16747960448265076,
0.23528353869915009,
0.2791197597980499,
-0.10083501785993576,
0.5258054137229919,
-0.15621203184127808,
0.7999858260154724,
0.0206834077835083,
-0.3363375663757324,
0.38449087738990784,
-0.16181997954845428,
0.052876416593790054,
-0.2177928239107132,
-0.18270893394947052,
-0.06598951667547226,
0.23377379775047302,
0.4407469630241394,
-0.09317754209041595,
-0.24796470999717712,
0.6446051001548767,
0.06708776205778122,
-0.14724837243556976,
-0.3441516160964966,
-0.18618205189704895,
-0.3543059527873993,
-0.041218943893909454,
0.7678550481796265,
-0.12169056385755539,
0.15568961203098297,
0.18221955001354218,
-0.0512346550822258,
-0.3818883001804352,
0.15986619889736176,
0.23867474496364594,
-0.005119742825627327,
0.05058307573199272,
0.4557841718196869,
0.43481042981147766,
0.07141751050949097,
0.0007319067372009158,
0.11927418410778046,
-0.036911290138959885,
-0.3043968677520752,
0.07315223664045334,
-0.1888461410999298,
-0.25568529963493347,
0.379942387342453,
0.7006737589836121,
0.18687668442726135,
0.24840733408927917,
-0.21023090183734894,
0.37758868932724,
-0.1914457231760025,
0.024531112983822823,
0.43831270933151245,
-0.002062194049358368,
-0.17877252399921417,
-0.5383260250091553,
0.31127890944480896,
0.20342282950878143,
0.07330281287431717,
0.060861214995384216,
-0.07573027908802032,
-0.016380347311496735,
0.30217087268829346,
0.1249999925494194,
0.9838243722915649,
-0.02691962942481041,
0.1929832547903061,
0.5063086152076721,
0.004840589128434658,
-0.24390451610088348,
-0.6487342119216919,
0.36927682161331177,
-0.33292126655578613,
-0.2241525799036026,
0.1931164562702179,
-0.10114146769046783,
-0.08476846665143967,
0.07353442162275314,
-0.039342787116765976,
0.09914487600326538,
-0.047275446355342865,
-0.08625619858503342,
-0.25860172510147095,
0.3895537555217743,
0.3151942193508148,
-0.4278399646282196,
0.024883057922124863,
0.0013510254211723804,
0.2714568078517914,
-0.09871600568294525,
0.12781575322151184,
-0.16340012848377228,
-0.11088655889034271,
0.018440984189510345,
0.12517410516738892,
-0.0791136622428894,
-0.12837843596935272,
0.013058449141681194,
-0.04877298325300217,
-0.08731182664632797,
-0.232926145195961,
-0.3244182765483856,
0.46041905879974365,
-0.02994643710553646,
0.09953416138887405,
0.08158383518457413,
-0.09911013394594193,
0.07216362655162811,
-0.08676929026842117,
-0.49708321690559387,
0.22654153406620026,
0.0808124989271164,
-0.17367757856845856,
0.1493709236383438,
0.07872668653726578,
-0.3227713704109192,
-0.1460990458726883,
0.17443028092384338,
0.020577240735292435,
0.007548075169324875,
-0.03673753887414932,
0.31799888610839844,
-0.26263728737831116,
-0.23356527090072632,
0.02005961164832115,
0.09207762032747269,
-0.4317518472671509,
0.5605170130729675,
-0.3023819327354431,
-0.38006824254989624,
-0.054655522108078,
0.016695648431777954,
0.30580800771713257,
0.05603788420557976,
0.26237085461616516,
-0.0891195759177208,
-0.3048812747001648,
-0.15467683970928192,
-0.3024292290210724,
0.061282847076654434,
0.03862520307302475,
0.09388820081949234,
0.3024209439754486,
-0.006131275556981564,
0.02539917454123497,
-0.23266452550888062,
-0.32271745800971985,
-0.14176981151103973,
-0.3823907673358917,
0.1146000474691391,
-0.3576402962207794,
-0.1850680708885193,
0.2572285234928131,
0.3836848735809326,
0.03601778298616409,
0.23422391712665558,
-0.4448952376842499,
0.25904718041419983,
-0.21766971051692963,
-0.06533902883529663,
-0.031239528208971024,
0.2600191831588745,
-0.03270886093378067,
-0.2574276030063629,
0.1754397302865982,
0.2162696272134781,
0.11998913437128067,
0.14120355248451233,
0.03736573085188866,
-0.1117987260222435,
0.10294876247644424,
0.1834249347448349,
-0.11074664443731308,
0.16845057904720306,
0.08115547895431519,
-0.1483059972524643,
-0.3009880781173706,
-0.26529812812805176,
0.13436605036258698,
-0.11070296168327332,
-0.025854986160993576,
-0.13035948574543,
-0.12170922756195068,
-0.11248783767223358,
0.3323768377304077,
0.2738248407840729,
0.2040049135684967,
0.2833092510700226,
-0.07349912077188492,
0.07670185714960098,
-0.242833212018013,
-0.2653929889202118,
-0.05103721097111702,
0.1903247982263565,
0.061643991619348526,
0.08636786043643951,
-0.09186612069606781,
-0.17318780720233917,
-0.3799477815628052,
-0.0381179042160511,
0.03176894411444664,
0.4498938322067261,
0.04249393194913864,
-0.28836652636528015,
0.18529601395130157,
0.037937231361866,
-0.2797204554080963,
-0.1952764391899109,
0.36242690682411194,
-0.45070144534111023,
0.20022888481616974,
0.4017176926136017,
0.264575332403183,
0.16572357714176178,
-0.4832741916179657,
0.09376326948404312,
-0.23451700806617737,
0.09630575776100159,
-0.4337073266506195,
-0.09045102447271347,
0.3514745235443115,
-0.1948997974395752,
0.2041250616312027,
0.3052140772342682,
0.23111993074417114,
0.608918309211731,
0.03142382949590683,
0.27529004216194153,
0.18787717819213867,
0.21332718431949615,
-0.32170340418815613,
-0.17983657121658325,
0.29066896438598633,
0.23226867616176605,
-0.03177293762564659,
-0.20784491300582886,
0.009094808250665665,
0.234734445810318,
0.24403557181358337,
-0.5169647336006165,
-0.2611280381679535,
0.1630207896232605,
-0.12201986461877823,
-0.12818105518817902,
0.41174909472465515,
0.056770458817481995,
-0.27808162569999695,
0.22702665627002716,
0.0776640847325325,
0.19237351417541504,
-0.1272481083869934,
0.2008739858865738,
0.2934538424015045,
0.22120051085948944,
-0.02311350777745247,
0.09102419763803482,
0.43377068638801575,
-0.3367399573326111,
-0.20791500806808472,
-0.011150526814162731,
-0.0027166465297341347,
0.023589380085468292,
-0.15122292935848236,
0.2809459865093231,
0.2448248267173767,
-0.055502988398075104,
0.26872164011001587,
-0.05044205114245415,
-0.008870905265212059,
0.043804269284009933,
-0.03440093994140625,
-0.10841257870197296,
-0.10039348155260086,
0.10061768442392349,
-0.09087688475847244,
-0.12853382527828217,
-0.12072337418794632,
-0.242632657289505,
0.20261327922344208,
-0.180425226688385,
0.023068368434906006,
0.3459426462650299,
-0.09753980487585068,
-0.39480555057525635,
0.09524164348840714,
-0.2833029329776764,
0.06918026506900787,
0.10627041757106781,
-0.3566010296344757,
-0.08913610875606537,
0.26030680537223816,
-0.0016340732108801603,
-0.425748735666275,
0.5468894839286804,
0.17240485548973083,
0.12868216633796692,
-0.3299410045146942,
-0.0014341416535899043,
-0.3207877278327942,
-0.03450971096754074,
-0.5890920758247375,
0.1126355454325676,
0.1176835373044014,
0.44035446643829346,
0.07392621785402298,
-0.07035461813211441,
0.4031084477901459,
-0.40797150135040283,
0.09923962503671646,
0.3735490143299103,
-0.17344193160533905,
-0.030622584745287895,
-0.4397856593132019,
-0.07384752482175827,
0.04228341951966286,
-0.37432244420051575,
0.2847956717014313,
-0.12820696830749512,
-0.014769630506634712,
0.19237162172794342,
-0.020269667729735374,
0.12265091389417648,
0.06268276274204254,
0.5298790335655212,
-0.09794431179761887,
0.00005469910320243798,
-0.09645382314920425,
0.008634934201836586,
-0.2321903109550476,
0.1219586655497551,
-0.20707805454730988,
0.00857600849121809,
-0.02188819646835327,
0.17337539792060852,
-0.20737430453300476,
-0.3919600546360016,
-0.18153391778469086,
0.41765710711479187,
0.31262990832328796,
-0.41869649291038513,
0.19802717864513397,
0.1526593118906021,
-0.1558281034231186,
0.47959399223327637,
0.15036264061927795,
0.2282840758562088,
0.14673294126987457,
-0.03405112400650978,
-0.3561268746852875,
-0.10542018711566925,
0.6236688494682312,
-0.18829429149627686,
-0.029361853376030922,
-0.34943878650665283,
0.2549011707305908,
0.44379231333732605,
0.551044225692749,
-0.26457661390304565,
0.0862380638718605,
0.12194327265024185,
0.05357404798269272,
-0.21039441227912903,
0.5777595043182373,
0.18686150014400482,
0.01477066520601511,
-0.07378377765417099,
-0.26480770111083984,
-0.06308911740779877,
-0.0029668877832591534,
-0.3532100021839142,
-0.28143084049224854
] |
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.49882426857948303,
-0.26827821135520935,
-0.024500802159309387,
0.12822844088077545,
0.059439767152071,
0.20778393745422363,
0.12146293371915817,
0.424129843711853,
0.2917422652244568,
0.2924969494342804,
-0.11882511526346207,
0.18831509351730347,
0.13721297681331635,
0.08582092076539993,
-0.13625647127628326,
0.17504262924194336,
0.23703262209892273,
0.085334412753582,
0.26079800724983215,
-0.1344141811132431,
-0.3274792730808258,
-0.30906447768211365,
-0.1589120626449585,
-0.25786224007606506,
-0.40069231390953064,
-0.09581870585680008,
-0.24362216889858246,
-0.08205043524503708,
0.1982472836971283,
-0.47291645407676697,
-0.13753260672092438,
0.1398429274559021,
0.3402584493160248,
0.25829294323921204,
-0.00012204971426399425,
0.05567660555243492,
0.22800791263580322,
0.06546296179294586,
-0.22299756109714508,
0.6411958336830139,
0.3400726914405823,
-0.06948840618133545,
-0.17511016130447388,
-0.3107709586620331,
-0.14555539190769196,
-0.1110420823097229,
0.08107972890138626,
-0.046929746866226196,
-0.16636499762535095,
0.19430115818977356,
0.026624053716659546,
-0.05828651040792465,
0.052254825830459595,
-0.015400376170873642,
0.4025115668773651,
-0.0755913034081459,
-0.06917718797922134,
0.31747138500213623,
0.1635129153728485,
-0.07223787903785706,
0.09974309802055359,
0.4481078088283539,
0.1206413134932518,
-0.22677725553512573,
0.10890393704175949,
0.20516155660152435,
0.7838166952133179,
0.02243974804878235,
0.06526792794466019,
0.15266957879066467,
0.015340343117713928,
-0.09055263549089432,
-0.443008691072464,
-0.10290376842021942,
0.4257138669490814,
-0.6180593967437744,
-0.06740126758813858,
-0.08374200016260147,
-0.10147474706172943,
0.05386023595929146,
0.1745855063199997,
-0.030229715630412102,
0.03631801903247833,
0.04745089262723923,
0.17489956319332123,
0.16535739600658417,
0.3874708414077759,
-0.05990241467952728,
0.5584333539009094,
0.04244744032621384,
-0.11685466021299362,
0.04488252475857735,
-0.0920773297548294,
0.012196335010230541,
-0.6050297617912292,
0.08808468282222748,
-0.030915843322873116,
-0.0993313416838646,
-0.09268704801797867,
0.017801953479647636,
-0.3694859743118286,
0.006165648344904184,
0.2365599423646927,
0.0033363497350364923,
-0.18306466937065125,
-0.0902583971619606,
-0.5061047673225403,
0.05588098615407944,
0.08390173316001892,
0.10628709942102432,
-0.3780878484249115,
0.0992341935634613,
-0.0033381283283233643,
-0.0043098581954836845,
-0.32598063349723816,
-0.29813525080680847,
-0.22889026999473572,
0.22280706465244293,
-0.18114228546619415,
0.07718804478645325,
-0.40396830439567566,
-0.2522764801979065,
0.2050725668668747,
0.4162214994430542,
-0.11774410307407379,
-0.07613665610551834,
0.010839437134563923,
-0.03461559861898422,
-0.23442770540714264,
0.17616906762123108,
-0.2220170646905899,
0.230660080909729,
-0.031963787972927094,
0.5045983195304871,
-0.02910623513162136,
-0.22139422595500946,
-0.08906898647546768,
-0.021730657666921616,
0.08396384865045547,
-0.007842419669032097,
-0.04416358843445778,
-0.29989323019981384,
0.24666792154312134,
0.07492318749427795,
-0.26321426033973694,
-0.0676850825548172,
-0.09395191818475723,
0.12111034244298935,
-0.22782327234745026,
0.22150824964046478,
-0.21739467978477478,
-0.36510223150253296,
0.02715788595378399,
0.01933111622929573,
0.3086775839328766,
-0.06309258937835693,
0.4208229184150696,
0.11439721286296844,
0.17301848530769348,
0.16133517026901245,
0.15917645394802094,
-0.13144344091415405,
-0.26802125573158264,
0.08318649977445602,
0.22678394615650177,
0.3627384305000305,
0.09372176229953766,
0.034771163016557693,
0.2980126738548279,
0.3901304304599762,
0.21240505576133728,
0.39999380707740784,
-0.11594892293214798,
0.6762601137161255,
-0.32000401616096497,
0.08429210633039474,
0.2451203614473343,
-0.25537848472595215,
-0.2924264967441559,
0.18690460920333862,
-0.16636402904987335,
-0.07732588797807693,
0.32966315746307373,
0.5182706713676453,
0.31202951073646545,
0.08701563626527786,
0.34109318256378174,
0.30625542998313904,
0.00902649201452732,
-0.031247306615114212,
-0.4050687849521637,
-0.05827170982956886,
0.2639196813106537,
0.3804076910018921,
-0.3354525566101074,
0.10174062848091125,
-0.040181465446949005,
-0.32988062500953674,
0.6009740233421326,
-0.4761059880256653,
-0.12176213413476944,
0.06805813312530518,
0.3615734875202179,
0.33938679099082947,
0.2328696995973587,
0.27611035108566284,
0.14954213798046112,
0.16262602806091309,
0.09601449221372604,
0.09878889471292496,
0.1701553463935852,
-0.4183505177497864,
0.2156297266483307,
-0.02575014904141426,
-0.21819250285625458,
0.10788197070360184,
-0.06097814068198204,
0.15002501010894775,
-0.04567669704556465,
-0.19987307488918304,
-0.15688681602478027,
0.5427840352058411,
-0.615797758102417,
0.027946149930357933,
-0.24889658391475677,
-0.15608298778533936,
0.007015147712081671,
-0.21342599391937256,
-0.0342438630759716,
0.1429586410522461,
0.05249624699354172,
-0.3868664503097534,
-0.053833141922950745,
0.10286086052656174,
0.1266249418258667,
-0.18767639994621277,
0.5111070275306702,
-0.11369612067937851,
-0.037036772817373276,
0.29622212052345276,
0.04495333135128021,
-0.15126502513885498,
0.10901666432619095,
-0.1937614381313324,
-0.0018786939326673746,
0.4852040112018585,
0.348783940076828,
0.24583379924297333,
-0.021493790671229362,
-0.23320843279361725,
0.04702914506196976,
-0.04065045341849327,
-0.07938706129789352,
0.22752587497234344,
0.07994377613067627,
0.13025294244289398,
0.409172385931015,
-0.033335525542497635,
-0.3332445025444031,
0.2324640303850174,
0.18577706813812256,
-0.20312990248203278,
-0.4314081072807312,
0.27104198932647705,
0.3516995310783386,
-0.03689766302704811,
-0.3497084677219391,
-0.5220087170600891,
0.23602674901485443,
0.31859877705574036,
0.18839353322982788,
-0.07165404409170151,
-0.02765103615820408,
-0.24728143215179443,
0.16910947859287262,
0.05655350908637047,
-0.04837210476398468,
0.10004787892103195,
0.17664200067520142,
-0.21454474329948425,
-0.20678988099098206,
-0.2552962005138397,
-0.13639681041240692,
0.4286458492279053,
-0.04433870315551758,
0.30944040417671204,
0.17776265740394592,
0.2771869897842407,
-0.12472452968358994,
-0.1249765008687973,
0.288752019405365,
0.008840441703796387,
0.04161085933446884,
-0.10893554985523224,
-0.03623880445957184,
0.19310900568962097,
-0.04694970324635506,
0.36491888761520386,
0.19579416513442993,
-0.32509055733680725,
0.019844286143779755,
-0.09847083687782288,
-0.12149498611688614,
-0.07897848635911942,
0.12100525945425034,
-0.15055014193058014,
0.11739997565746307,
0.043947670608758926,
-0.05258079990744591,
-0.18513640761375427,
-0.08627132326364517,
-0.1575877070426941,
-0.07947695255279541,
-0.2974512279033661,
-0.1662350296974182,
-0.24606843292713165,
-0.12503769993782043,
-0.11964450776576996,
0.004330579191446304,
0.0005504606524482369,
-0.010686952620744705,
-0.04048753157258034,
-0.2826741635799408,
-0.15883666276931763,
0.06079476326704025,
-0.29363352060317993,
-0.21670202910900116,
-0.17391912639141083,
0.22814130783081055,
-0.024399638175964355,
0.09305882453918457,
-0.11566931754350662,
0.06675166636705399,
0.12224092334508896,
-0.0957009419798851,
-0.1543302685022354,
-0.0534617118537426,
-0.23314307630062103,
0.2917097210884094,
0.14917242527008057,
0.046831462532281876,
-0.0794370248913765,
-0.4122962951660156,
-0.014396958984434605,
0.4969033896923065,
-0.5218711495399475,
-0.040799517184495926,
-0.3583909571170807,
0.2859594225883484,
-0.3150937855243683,
0.458298921585083,
0.05670680105686188,
-0.24624888598918915,
-0.13801392912864685,
0.3644827604293823,
0.17451028525829315,
0.38753044605255127,
-0.06171327456831932,
0.05497738718986511,
-0.08791763335466385,
0.2675449550151825,
-0.11497532576322556,
0.5162416696548462,
0.32723158597946167,
-0.21369847655296326,
-0.047819457948207855,
-0.26239633560180664,
0.11595174670219421,
0.052770111709833145,
-0.13988173007965088,
0.2965240776538849,
0.08347784727811813,
-0.3149952292442322,
0.1665278822183609,
-0.2887440323829651,
-0.4117943346500397,
0.03204244002699852,
-0.0527595579624176,
0.1982455551624298,
-0.24431078135967255,
0.31699225306510925,
0.04895063117146492,
0.49109962582588196,
-0.17805010080337524,
0.29109612107276917,
-0.2383602410554886,
-0.17670398950576782,
0.19751477241516113,
0.2727530002593994,
0.2449011355638504,
-0.16755743324756622,
0.02649645321071148,
-0.5409093499183655,
-0.421677827835083,
0.28344085812568665,
0.16747960448265076,
0.23528353869915009,
0.2791197597980499,
-0.10083501785993576,
0.5258054137229919,
-0.15621203184127808,
0.7999858260154724,
0.0206834077835083,
-0.3363375663757324,
0.38449087738990784,
-0.16181997954845428,
0.052876416593790054,
-0.2177928239107132,
-0.18270893394947052,
-0.06598951667547226,
0.23377379775047302,
0.4407469630241394,
-0.09317754209041595,
-0.24796470999717712,
0.6446051001548767,
0.06708776205778122,
-0.14724837243556976,
-0.3441516160964966,
-0.18618205189704895,
-0.3543059527873993,
-0.041218943893909454,
0.7678550481796265,
-0.12169056385755539,
0.15568961203098297,
0.18221955001354218,
-0.0512346550822258,
-0.3818883001804352,
0.15986619889736176,
0.23867474496364594,
-0.005119742825627327,
0.05058307573199272,
0.4557841718196869,
0.43481042981147766,
0.07141751050949097,
0.0007319067372009158,
0.11927418410778046,
-0.036911290138959885,
-0.3043968677520752,
0.07315223664045334,
-0.1888461410999298,
-0.25568529963493347,
0.379942387342453,
0.7006737589836121,
0.18687668442726135,
0.24840733408927917,
-0.21023090183734894,
0.37758868932724,
-0.1914457231760025,
0.024531112983822823,
0.43831270933151245,
-0.002062194049358368,
-0.17877252399921417,
-0.5383260250091553,
0.31127890944480896,
0.20342282950878143,
0.07330281287431717,
0.060861214995384216,
-0.07573027908802032,
-0.016380347311496735,
0.30217087268829346,
0.1249999925494194,
0.9838243722915649,
-0.02691962942481041,
0.1929832547903061,
0.5063086152076721,
0.004840589128434658,
-0.24390451610088348,
-0.6487342119216919,
0.36927682161331177,
-0.33292126655578613,
-0.2241525799036026,
0.1931164562702179,
-0.10114146769046783,
-0.08476846665143967,
0.07353442162275314,
-0.039342787116765976,
0.09914487600326538,
-0.047275446355342865,
-0.08625619858503342,
-0.25860172510147095,
0.3895537555217743,
0.3151942193508148,
-0.4278399646282196,
0.024883057922124863,
0.0013510254211723804,
0.2714568078517914,
-0.09871600568294525,
0.12781575322151184,
-0.16340012848377228,
-0.11088655889034271,
0.018440984189510345,
0.12517410516738892,
-0.0791136622428894,
-0.12837843596935272,
0.013058449141681194,
-0.04877298325300217,
-0.08731182664632797,
-0.232926145195961,
-0.3244182765483856,
0.46041905879974365,
-0.02994643710553646,
0.09953416138887405,
0.08158383518457413,
-0.09911013394594193,
0.07216362655162811,
-0.08676929026842117,
-0.49708321690559387,
0.22654153406620026,
0.0808124989271164,
-0.17367757856845856,
0.1493709236383438,
0.07872668653726578,
-0.3227713704109192,
-0.1460990458726883,
0.17443028092384338,
0.020577240735292435,
0.007548075169324875,
-0.03673753887414932,
0.31799888610839844,
-0.26263728737831116,
-0.23356527090072632,
0.02005961164832115,
0.09207762032747269,
-0.4317518472671509,
0.5605170130729675,
-0.3023819327354431,
-0.38006824254989624,
-0.054655522108078,
0.016695648431777954,
0.30580800771713257,
0.05603788420557976,
0.26237085461616516,
-0.0891195759177208,
-0.3048812747001648,
-0.15467683970928192,
-0.3024292290210724,
0.061282847076654434,
0.03862520307302475,
0.09388820081949234,
0.3024209439754486,
-0.006131275556981564,
0.02539917454123497,
-0.23266452550888062,
-0.32271745800971985,
-0.14176981151103973,
-0.3823907673358917,
0.1146000474691391,
-0.3576402962207794,
-0.1850680708885193,
0.2572285234928131,
0.3836848735809326,
0.03601778298616409,
0.23422391712665558,
-0.4448952376842499,
0.25904718041419983,
-0.21766971051692963,
-0.06533902883529663,
-0.031239528208971024,
0.2600191831588745,
-0.03270886093378067,
-0.2574276030063629,
0.1754397302865982,
0.2162696272134781,
0.11998913437128067,
0.14120355248451233,
0.03736573085188866,
-0.1117987260222435,
0.10294876247644424,
0.1834249347448349,
-0.11074664443731308,
0.16845057904720306,
0.08115547895431519,
-0.1483059972524643,
-0.3009880781173706,
-0.26529812812805176,
0.13436605036258698,
-0.11070296168327332,
-0.025854986160993576,
-0.13035948574543,
-0.12170922756195068,
-0.11248783767223358,
0.3323768377304077,
0.2738248407840729,
0.2040049135684967,
0.2833092510700226,
-0.07349912077188492,
0.07670185714960098,
-0.242833212018013,
-0.2653929889202118,
-0.05103721097111702,
0.1903247982263565,
0.061643991619348526,
0.08636786043643951,
-0.09186612069606781,
-0.17318780720233917,
-0.3799477815628052,
-0.0381179042160511,
0.03176894411444664,
0.4498938322067261,
0.04249393194913864,
-0.28836652636528015,
0.18529601395130157,
0.037937231361866,
-0.2797204554080963,
-0.1952764391899109,
0.36242690682411194,
-0.45070144534111023,
0.20022888481616974,
0.4017176926136017,
0.264575332403183,
0.16572357714176178,
-0.4832741916179657,
0.09376326948404312,
-0.23451700806617737,
0.09630575776100159,
-0.4337073266506195,
-0.09045102447271347,
0.3514745235443115,
-0.1948997974395752,
0.2041250616312027,
0.3052140772342682,
0.23111993074417114,
0.608918309211731,
0.03142382949590683,
0.27529004216194153,
0.18787717819213867,
0.21332718431949615,
-0.32170340418815613,
-0.17983657121658325,
0.29066896438598633,
0.23226867616176605,
-0.03177293762564659,
-0.20784491300582886,
0.009094808250665665,
0.234734445810318,
0.24403557181358337,
-0.5169647336006165,
-0.2611280381679535,
0.1630207896232605,
-0.12201986461877823,
-0.12818105518817902,
0.41174909472465515,
0.056770458817481995,
-0.27808162569999695,
0.22702665627002716,
0.0776640847325325,
0.19237351417541504,
-0.1272481083869934,
0.2008739858865738,
0.2934538424015045,
0.22120051085948944,
-0.02311350777745247,
0.09102419763803482,
0.43377068638801575,
-0.3367399573326111,
-0.20791500806808472,
-0.011150526814162731,
-0.0027166465297341347,
0.023589380085468292,
-0.15122292935848236,
0.2809459865093231,
0.2448248267173767,
-0.055502988398075104,
0.26872164011001587,
-0.05044205114245415,
-0.008870905265212059,
0.043804269284009933,
-0.03440093994140625,
-0.10841257870197296,
-0.10039348155260086,
0.10061768442392349,
-0.09087688475847244,
-0.12853382527828217,
-0.12072337418794632,
-0.242632657289505,
0.20261327922344208,
-0.180425226688385,
0.023068368434906006,
0.3459426462650299,
-0.09753980487585068,
-0.39480555057525635,
0.09524164348840714,
-0.2833029329776764,
0.06918026506900787,
0.10627041757106781,
-0.3566010296344757,
-0.08913610875606537,
0.26030680537223816,
-0.0016340732108801603,
-0.425748735666275,
0.5468894839286804,
0.17240485548973083,
0.12868216633796692,
-0.3299410045146942,
-0.0014341416535899043,
-0.3207877278327942,
-0.03450971096754074,
-0.5890920758247375,
0.1126355454325676,
0.1176835373044014,
0.44035446643829346,
0.07392621785402298,
-0.07035461813211441,
0.4031084477901459,
-0.40797150135040283,
0.09923962503671646,
0.3735490143299103,
-0.17344193160533905,
-0.030622584745287895,
-0.4397856593132019,
-0.07384752482175827,
0.04228341951966286,
-0.37432244420051575,
0.2847956717014313,
-0.12820696830749512,
-0.014769630506634712,
0.19237162172794342,
-0.020269667729735374,
0.12265091389417648,
0.06268276274204254,
0.5298790335655212,
-0.09794431179761887,
0.00005469910320243798,
-0.09645382314920425,
0.008634934201836586,
-0.2321903109550476,
0.1219586655497551,
-0.20707805454730988,
0.00857600849121809,
-0.02188819646835327,
0.17337539792060852,
-0.20737430453300476,
-0.3919600546360016,
-0.18153391778469086,
0.41765710711479187,
0.31262990832328796,
-0.41869649291038513,
0.19802717864513397,
0.1526593118906021,
-0.1558281034231186,
0.47959399223327637,
0.15036264061927795,
0.2282840758562088,
0.14673294126987457,
-0.03405112400650978,
-0.3561268746852875,
-0.10542018711566925,
0.6236688494682312,
-0.18829429149627686,
-0.029361853376030922,
-0.34943878650665283,
0.2549011707305908,
0.44379231333732605,
0.551044225692749,
-0.26457661390304565,
0.0862380638718605,
0.12194327265024185,
0.05357404798269272,
-0.21039441227912903,
0.5777595043182373,
0.18686150014400482,
0.01477066520601511,
-0.07378377765417099,
-0.26480770111083984,
-0.06308911740779877,
-0.0029668877832591534,
-0.3532100021839142,
-0.28143084049224854
] |
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.49882426857948303,
-0.26827821135520935,
-0.024500802159309387,
0.12822844088077545,
0.059439767152071,
0.20778393745422363,
0.12146293371915817,
0.424129843711853,
0.2917422652244568,
0.2924969494342804,
-0.11882511526346207,
0.18831509351730347,
0.13721297681331635,
0.08582092076539993,
-0.13625647127628326,
0.17504262924194336,
0.23703262209892273,
0.085334412753582,
0.26079800724983215,
-0.1344141811132431,
-0.3274792730808258,
-0.30906447768211365,
-0.1589120626449585,
-0.25786224007606506,
-0.40069231390953064,
-0.09581870585680008,
-0.24362216889858246,
-0.08205043524503708,
0.1982472836971283,
-0.47291645407676697,
-0.13753260672092438,
0.1398429274559021,
0.3402584493160248,
0.25829294323921204,
-0.00012204971426399425,
0.05567660555243492,
0.22800791263580322,
0.06546296179294586,
-0.22299756109714508,
0.6411958336830139,
0.3400726914405823,
-0.06948840618133545,
-0.17511016130447388,
-0.3107709586620331,
-0.14555539190769196,
-0.1110420823097229,
0.08107972890138626,
-0.046929746866226196,
-0.16636499762535095,
0.19430115818977356,
0.026624053716659546,
-0.05828651040792465,
0.052254825830459595,
-0.015400376170873642,
0.4025115668773651,
-0.0755913034081459,
-0.06917718797922134,
0.31747138500213623,
0.1635129153728485,
-0.07223787903785706,
0.09974309802055359,
0.4481078088283539,
0.1206413134932518,
-0.22677725553512573,
0.10890393704175949,
0.20516155660152435,
0.7838166952133179,
0.02243974804878235,
0.06526792794466019,
0.15266957879066467,
0.015340343117713928,
-0.09055263549089432,
-0.443008691072464,
-0.10290376842021942,
0.4257138669490814,
-0.6180593967437744,
-0.06740126758813858,
-0.08374200016260147,
-0.10147474706172943,
0.05386023595929146,
0.1745855063199997,
-0.030229715630412102,
0.03631801903247833,
0.04745089262723923,
0.17489956319332123,
0.16535739600658417,
0.3874708414077759,
-0.05990241467952728,
0.5584333539009094,
0.04244744032621384,
-0.11685466021299362,
0.04488252475857735,
-0.0920773297548294,
0.012196335010230541,
-0.6050297617912292,
0.08808468282222748,
-0.030915843322873116,
-0.0993313416838646,
-0.09268704801797867,
0.017801953479647636,
-0.3694859743118286,
0.006165648344904184,
0.2365599423646927,
0.0033363497350364923,
-0.18306466937065125,
-0.0902583971619606,
-0.5061047673225403,
0.05588098615407944,
0.08390173316001892,
0.10628709942102432,
-0.3780878484249115,
0.0992341935634613,
-0.0033381283283233643,
-0.0043098581954836845,
-0.32598063349723816,
-0.29813525080680847,
-0.22889026999473572,
0.22280706465244293,
-0.18114228546619415,
0.07718804478645325,
-0.40396830439567566,
-0.2522764801979065,
0.2050725668668747,
0.4162214994430542,
-0.11774410307407379,
-0.07613665610551834,
0.010839437134563923,
-0.03461559861898422,
-0.23442770540714264,
0.17616906762123108,
-0.2220170646905899,
0.230660080909729,
-0.031963787972927094,
0.5045983195304871,
-0.02910623513162136,
-0.22139422595500946,
-0.08906898647546768,
-0.021730657666921616,
0.08396384865045547,
-0.007842419669032097,
-0.04416358843445778,
-0.29989323019981384,
0.24666792154312134,
0.07492318749427795,
-0.26321426033973694,
-0.0676850825548172,
-0.09395191818475723,
0.12111034244298935,
-0.22782327234745026,
0.22150824964046478,
-0.21739467978477478,
-0.36510223150253296,
0.02715788595378399,
0.01933111622929573,
0.3086775839328766,
-0.06309258937835693,
0.4208229184150696,
0.11439721286296844,
0.17301848530769348,
0.16133517026901245,
0.15917645394802094,
-0.13144344091415405,
-0.26802125573158264,
0.08318649977445602,
0.22678394615650177,
0.3627384305000305,
0.09372176229953766,
0.034771163016557693,
0.2980126738548279,
0.3901304304599762,
0.21240505576133728,
0.39999380707740784,
-0.11594892293214798,
0.6762601137161255,
-0.32000401616096497,
0.08429210633039474,
0.2451203614473343,
-0.25537848472595215,
-0.2924264967441559,
0.18690460920333862,
-0.16636402904987335,
-0.07732588797807693,
0.32966315746307373,
0.5182706713676453,
0.31202951073646545,
0.08701563626527786,
0.34109318256378174,
0.30625542998313904,
0.00902649201452732,
-0.031247306615114212,
-0.4050687849521637,
-0.05827170982956886,
0.2639196813106537,
0.3804076910018921,
-0.3354525566101074,
0.10174062848091125,
-0.040181465446949005,
-0.32988062500953674,
0.6009740233421326,
-0.4761059880256653,
-0.12176213413476944,
0.06805813312530518,
0.3615734875202179,
0.33938679099082947,
0.2328696995973587,
0.27611035108566284,
0.14954213798046112,
0.16262602806091309,
0.09601449221372604,
0.09878889471292496,
0.1701553463935852,
-0.4183505177497864,
0.2156297266483307,
-0.02575014904141426,
-0.21819250285625458,
0.10788197070360184,
-0.06097814068198204,
0.15002501010894775,
-0.04567669704556465,
-0.19987307488918304,
-0.15688681602478027,
0.5427840352058411,
-0.615797758102417,
0.027946149930357933,
-0.24889658391475677,
-0.15608298778533936,
0.007015147712081671,
-0.21342599391937256,
-0.0342438630759716,
0.1429586410522461,
0.05249624699354172,
-0.3868664503097534,
-0.053833141922950745,
0.10286086052656174,
0.1266249418258667,
-0.18767639994621277,
0.5111070275306702,
-0.11369612067937851,
-0.037036772817373276,
0.29622212052345276,
0.04495333135128021,
-0.15126502513885498,
0.10901666432619095,
-0.1937614381313324,
-0.0018786939326673746,
0.4852040112018585,
0.348783940076828,
0.24583379924297333,
-0.021493790671229362,
-0.23320843279361725,
0.04702914506196976,
-0.04065045341849327,
-0.07938706129789352,
0.22752587497234344,
0.07994377613067627,
0.13025294244289398,
0.409172385931015,
-0.033335525542497635,
-0.3332445025444031,
0.2324640303850174,
0.18577706813812256,
-0.20312990248203278,
-0.4314081072807312,
0.27104198932647705,
0.3516995310783386,
-0.03689766302704811,
-0.3497084677219391,
-0.5220087170600891,
0.23602674901485443,
0.31859877705574036,
0.18839353322982788,
-0.07165404409170151,
-0.02765103615820408,
-0.24728143215179443,
0.16910947859287262,
0.05655350908637047,
-0.04837210476398468,
0.10004787892103195,
0.17664200067520142,
-0.21454474329948425,
-0.20678988099098206,
-0.2552962005138397,
-0.13639681041240692,
0.4286458492279053,
-0.04433870315551758,
0.30944040417671204,
0.17776265740394592,
0.2771869897842407,
-0.12472452968358994,
-0.1249765008687973,
0.288752019405365,
0.008840441703796387,
0.04161085933446884,
-0.10893554985523224,
-0.03623880445957184,
0.19310900568962097,
-0.04694970324635506,
0.36491888761520386,
0.19579416513442993,
-0.32509055733680725,
0.019844286143779755,
-0.09847083687782288,
-0.12149498611688614,
-0.07897848635911942,
0.12100525945425034,
-0.15055014193058014,
0.11739997565746307,
0.043947670608758926,
-0.05258079990744591,
-0.18513640761375427,
-0.08627132326364517,
-0.1575877070426941,
-0.07947695255279541,
-0.2974512279033661,
-0.1662350296974182,
-0.24606843292713165,
-0.12503769993782043,
-0.11964450776576996,
0.004330579191446304,
0.0005504606524482369,
-0.010686952620744705,
-0.04048753157258034,
-0.2826741635799408,
-0.15883666276931763,
0.06079476326704025,
-0.29363352060317993,
-0.21670202910900116,
-0.17391912639141083,
0.22814130783081055,
-0.024399638175964355,
0.09305882453918457,
-0.11566931754350662,
0.06675166636705399,
0.12224092334508896,
-0.0957009419798851,
-0.1543302685022354,
-0.0534617118537426,
-0.23314307630062103,
0.2917097210884094,
0.14917242527008057,
0.046831462532281876,
-0.0794370248913765,
-0.4122962951660156,
-0.014396958984434605,
0.4969033896923065,
-0.5218711495399475,
-0.040799517184495926,
-0.3583909571170807,
0.2859594225883484,
-0.3150937855243683,
0.458298921585083,
0.05670680105686188,
-0.24624888598918915,
-0.13801392912864685,
0.3644827604293823,
0.17451028525829315,
0.38753044605255127,
-0.06171327456831932,
0.05497738718986511,
-0.08791763335466385,
0.2675449550151825,
-0.11497532576322556,
0.5162416696548462,
0.32723158597946167,
-0.21369847655296326,
-0.047819457948207855,
-0.26239633560180664,
0.11595174670219421,
0.052770111709833145,
-0.13988173007965088,
0.2965240776538849,
0.08347784727811813,
-0.3149952292442322,
0.1665278822183609,
-0.2887440323829651,
-0.4117943346500397,
0.03204244002699852,
-0.0527595579624176,
0.1982455551624298,
-0.24431078135967255,
0.31699225306510925,
0.04895063117146492,
0.49109962582588196,
-0.17805010080337524,
0.29109612107276917,
-0.2383602410554886,
-0.17670398950576782,
0.19751477241516113,
0.2727530002593994,
0.2449011355638504,
-0.16755743324756622,
0.02649645321071148,
-0.5409093499183655,
-0.421677827835083,
0.28344085812568665,
0.16747960448265076,
0.23528353869915009,
0.2791197597980499,
-0.10083501785993576,
0.5258054137229919,
-0.15621203184127808,
0.7999858260154724,
0.0206834077835083,
-0.3363375663757324,
0.38449087738990784,
-0.16181997954845428,
0.052876416593790054,
-0.2177928239107132,
-0.18270893394947052,
-0.06598951667547226,
0.23377379775047302,
0.4407469630241394,
-0.09317754209041595,
-0.24796470999717712,
0.6446051001548767,
0.06708776205778122,
-0.14724837243556976,
-0.3441516160964966,
-0.18618205189704895,
-0.3543059527873993,
-0.041218943893909454,
0.7678550481796265,
-0.12169056385755539,
0.15568961203098297,
0.18221955001354218,
-0.0512346550822258,
-0.3818883001804352,
0.15986619889736176,
0.23867474496364594,
-0.005119742825627327,
0.05058307573199272,
0.4557841718196869,
0.43481042981147766,
0.07141751050949097,
0.0007319067372009158,
0.11927418410778046,
-0.036911290138959885,
-0.3043968677520752,
0.07315223664045334,
-0.1888461410999298,
-0.25568529963493347,
0.379942387342453,
0.7006737589836121,
0.18687668442726135,
0.24840733408927917,
-0.21023090183734894,
0.37758868932724,
-0.1914457231760025,
0.024531112983822823,
0.43831270933151245,
-0.002062194049358368,
-0.17877252399921417,
-0.5383260250091553,
0.31127890944480896,
0.20342282950878143,
0.07330281287431717,
0.060861214995384216,
-0.07573027908802032,
-0.016380347311496735,
0.30217087268829346,
0.1249999925494194,
0.9838243722915649,
-0.02691962942481041,
0.1929832547903061,
0.5063086152076721,
0.004840589128434658,
-0.24390451610088348,
-0.6487342119216919,
0.36927682161331177,
-0.33292126655578613,
-0.2241525799036026,
0.1931164562702179,
-0.10114146769046783,
-0.08476846665143967,
0.07353442162275314,
-0.039342787116765976,
0.09914487600326538,
-0.047275446355342865,
-0.08625619858503342,
-0.25860172510147095,
0.3895537555217743,
0.3151942193508148,
-0.4278399646282196,
0.024883057922124863,
0.0013510254211723804,
0.2714568078517914,
-0.09871600568294525,
0.12781575322151184,
-0.16340012848377228,
-0.11088655889034271,
0.018440984189510345,
0.12517410516738892,
-0.0791136622428894,
-0.12837843596935272,
0.013058449141681194,
-0.04877298325300217,
-0.08731182664632797,
-0.232926145195961,
-0.3244182765483856,
0.46041905879974365,
-0.02994643710553646,
0.09953416138887405,
0.08158383518457413,
-0.09911013394594193,
0.07216362655162811,
-0.08676929026842117,
-0.49708321690559387,
0.22654153406620026,
0.0808124989271164,
-0.17367757856845856,
0.1493709236383438,
0.07872668653726578,
-0.3227713704109192,
-0.1460990458726883,
0.17443028092384338,
0.020577240735292435,
0.007548075169324875,
-0.03673753887414932,
0.31799888610839844,
-0.26263728737831116,
-0.23356527090072632,
0.02005961164832115,
0.09207762032747269,
-0.4317518472671509,
0.5605170130729675,
-0.3023819327354431,
-0.38006824254989624,
-0.054655522108078,
0.016695648431777954,
0.30580800771713257,
0.05603788420557976,
0.26237085461616516,
-0.0891195759177208,
-0.3048812747001648,
-0.15467683970928192,
-0.3024292290210724,
0.061282847076654434,
0.03862520307302475,
0.09388820081949234,
0.3024209439754486,
-0.006131275556981564,
0.02539917454123497,
-0.23266452550888062,
-0.32271745800971985,
-0.14176981151103973,
-0.3823907673358917,
0.1146000474691391,
-0.3576402962207794,
-0.1850680708885193,
0.2572285234928131,
0.3836848735809326,
0.03601778298616409,
0.23422391712665558,
-0.4448952376842499,
0.25904718041419983,
-0.21766971051692963,
-0.06533902883529663,
-0.031239528208971024,
0.2600191831588745,
-0.03270886093378067,
-0.2574276030063629,
0.1754397302865982,
0.2162696272134781,
0.11998913437128067,
0.14120355248451233,
0.03736573085188866,
-0.1117987260222435,
0.10294876247644424,
0.1834249347448349,
-0.11074664443731308,
0.16845057904720306,
0.08115547895431519,
-0.1483059972524643,
-0.3009880781173706,
-0.26529812812805176,
0.13436605036258698,
-0.11070296168327332,
-0.025854986160993576,
-0.13035948574543,
-0.12170922756195068,
-0.11248783767223358,
0.3323768377304077,
0.2738248407840729,
0.2040049135684967,
0.2833092510700226,
-0.07349912077188492,
0.07670185714960098,
-0.242833212018013,
-0.2653929889202118,
-0.05103721097111702,
0.1903247982263565,
0.061643991619348526,
0.08636786043643951,
-0.09186612069606781,
-0.17318780720233917,
-0.3799477815628052,
-0.0381179042160511,
0.03176894411444664,
0.4498938322067261,
0.04249393194913864,
-0.28836652636528015,
0.18529601395130157,
0.037937231361866,
-0.2797204554080963,
-0.1952764391899109,
0.36242690682411194,
-0.45070144534111023,
0.20022888481616974,
0.4017176926136017,
0.264575332403183,
0.16572357714176178,
-0.4832741916179657,
0.09376326948404312,
-0.23451700806617737,
0.09630575776100159,
-0.4337073266506195,
-0.09045102447271347,
0.3514745235443115,
-0.1948997974395752,
0.2041250616312027,
0.3052140772342682,
0.23111993074417114,
0.608918309211731,
0.03142382949590683,
0.27529004216194153,
0.18787717819213867,
0.21332718431949615,
-0.32170340418815613,
-0.17983657121658325,
0.29066896438598633,
0.23226867616176605,
-0.03177293762564659,
-0.20784491300582886,
0.009094808250665665,
0.234734445810318,
0.24403557181358337,
-0.5169647336006165,
-0.2611280381679535,
0.1630207896232605,
-0.12201986461877823,
-0.12818105518817902,
0.41174909472465515,
0.056770458817481995,
-0.27808162569999695,
0.22702665627002716,
0.0776640847325325,
0.19237351417541504,
-0.1272481083869934,
0.2008739858865738,
0.2934538424015045,
0.22120051085948944,
-0.02311350777745247,
0.09102419763803482,
0.43377068638801575,
-0.3367399573326111,
-0.20791500806808472,
-0.011150526814162731,
-0.0027166465297341347,
0.023589380085468292,
-0.15122292935848236,
0.2809459865093231,
0.2448248267173767,
-0.055502988398075104,
0.26872164011001587,
-0.05044205114245415,
-0.008870905265212059,
0.043804269284009933,
-0.03440093994140625,
-0.10841257870197296,
-0.10039348155260086,
0.10061768442392349,
-0.09087688475847244,
-0.12853382527828217,
-0.12072337418794632,
-0.242632657289505,
0.20261327922344208,
-0.180425226688385,
0.023068368434906006,
0.3459426462650299,
-0.09753980487585068,
-0.39480555057525635,
0.09524164348840714,
-0.2833029329776764,
0.06918026506900787,
0.10627041757106781,
-0.3566010296344757,
-0.08913610875606537,
0.26030680537223816,
-0.0016340732108801603,
-0.425748735666275,
0.5468894839286804,
0.17240485548973083,
0.12868216633796692,
-0.3299410045146942,
-0.0014341416535899043,
-0.3207877278327942,
-0.03450971096754074,
-0.5890920758247375,
0.1126355454325676,
0.1176835373044014,
0.44035446643829346,
0.07392621785402298,
-0.07035461813211441,
0.4031084477901459,
-0.40797150135040283,
0.09923962503671646,
0.3735490143299103,
-0.17344193160533905,
-0.030622584745287895,
-0.4397856593132019,
-0.07384752482175827,
0.04228341951966286,
-0.37432244420051575,
0.2847956717014313,
-0.12820696830749512,
-0.014769630506634712,
0.19237162172794342,
-0.020269667729735374,
0.12265091389417648,
0.06268276274204254,
0.5298790335655212,
-0.09794431179761887,
0.00005469910320243798,
-0.09645382314920425,
0.008634934201836586,
-0.2321903109550476,
0.1219586655497551,
-0.20707805454730988,
0.00857600849121809,
-0.02188819646835327,
0.17337539792060852,
-0.20737430453300476,
-0.3919600546360016,
-0.18153391778469086,
0.41765710711479187,
0.31262990832328796,
-0.41869649291038513,
0.19802717864513397,
0.1526593118906021,
-0.1558281034231186,
0.47959399223327637,
0.15036264061927795,
0.2282840758562088,
0.14673294126987457,
-0.03405112400650978,
-0.3561268746852875,
-0.10542018711566925,
0.6236688494682312,
-0.18829429149627686,
-0.029361853376030922,
-0.34943878650665283,
0.2549011707305908,
0.44379231333732605,
0.551044225692749,
-0.26457661390304565,
0.0862380638718605,
0.12194327265024185,
0.05357404798269272,
-0.21039441227912903,
0.5777595043182373,
0.18686150014400482,
0.01477066520601511,
-0.07378377765417099,
-0.26480770111083984,
-0.06308911740779877,
-0.0029668877832591534,
-0.3532100021839142,
-0.28143084049224854
] |
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.49882426857948303,
-0.26827821135520935,
-0.024500802159309387,
0.12822844088077545,
0.059439767152071,
0.20778393745422363,
0.12146293371915817,
0.424129843711853,
0.2917422652244568,
0.2924969494342804,
-0.11882511526346207,
0.18831509351730347,
0.13721297681331635,
0.08582092076539993,
-0.13625647127628326,
0.17504262924194336,
0.23703262209892273,
0.085334412753582,
0.26079800724983215,
-0.1344141811132431,
-0.3274792730808258,
-0.30906447768211365,
-0.1589120626449585,
-0.25786224007606506,
-0.40069231390953064,
-0.09581870585680008,
-0.24362216889858246,
-0.08205043524503708,
0.1982472836971283,
-0.47291645407676697,
-0.13753260672092438,
0.1398429274559021,
0.3402584493160248,
0.25829294323921204,
-0.00012204971426399425,
0.05567660555243492,
0.22800791263580322,
0.06546296179294586,
-0.22299756109714508,
0.6411958336830139,
0.3400726914405823,
-0.06948840618133545,
-0.17511016130447388,
-0.3107709586620331,
-0.14555539190769196,
-0.1110420823097229,
0.08107972890138626,
-0.046929746866226196,
-0.16636499762535095,
0.19430115818977356,
0.026624053716659546,
-0.05828651040792465,
0.052254825830459595,
-0.015400376170873642,
0.4025115668773651,
-0.0755913034081459,
-0.06917718797922134,
0.31747138500213623,
0.1635129153728485,
-0.07223787903785706,
0.09974309802055359,
0.4481078088283539,
0.1206413134932518,
-0.22677725553512573,
0.10890393704175949,
0.20516155660152435,
0.7838166952133179,
0.02243974804878235,
0.06526792794466019,
0.15266957879066467,
0.015340343117713928,
-0.09055263549089432,
-0.443008691072464,
-0.10290376842021942,
0.4257138669490814,
-0.6180593967437744,
-0.06740126758813858,
-0.08374200016260147,
-0.10147474706172943,
0.05386023595929146,
0.1745855063199997,
-0.030229715630412102,
0.03631801903247833,
0.04745089262723923,
0.17489956319332123,
0.16535739600658417,
0.3874708414077759,
-0.05990241467952728,
0.5584333539009094,
0.04244744032621384,
-0.11685466021299362,
0.04488252475857735,
-0.0920773297548294,
0.012196335010230541,
-0.6050297617912292,
0.08808468282222748,
-0.030915843322873116,
-0.0993313416838646,
-0.09268704801797867,
0.017801953479647636,
-0.3694859743118286,
0.006165648344904184,
0.2365599423646927,
0.0033363497350364923,
-0.18306466937065125,
-0.0902583971619606,
-0.5061047673225403,
0.05588098615407944,
0.08390173316001892,
0.10628709942102432,
-0.3780878484249115,
0.0992341935634613,
-0.0033381283283233643,
-0.0043098581954836845,
-0.32598063349723816,
-0.29813525080680847,
-0.22889026999473572,
0.22280706465244293,
-0.18114228546619415,
0.07718804478645325,
-0.40396830439567566,
-0.2522764801979065,
0.2050725668668747,
0.4162214994430542,
-0.11774410307407379,
-0.07613665610551834,
0.010839437134563923,
-0.03461559861898422,
-0.23442770540714264,
0.17616906762123108,
-0.2220170646905899,
0.230660080909729,
-0.031963787972927094,
0.5045983195304871,
-0.02910623513162136,
-0.22139422595500946,
-0.08906898647546768,
-0.021730657666921616,
0.08396384865045547,
-0.007842419669032097,
-0.04416358843445778,
-0.29989323019981384,
0.24666792154312134,
0.07492318749427795,
-0.26321426033973694,
-0.0676850825548172,
-0.09395191818475723,
0.12111034244298935,
-0.22782327234745026,
0.22150824964046478,
-0.21739467978477478,
-0.36510223150253296,
0.02715788595378399,
0.01933111622929573,
0.3086775839328766,
-0.06309258937835693,
0.4208229184150696,
0.11439721286296844,
0.17301848530769348,
0.16133517026901245,
0.15917645394802094,
-0.13144344091415405,
-0.26802125573158264,
0.08318649977445602,
0.22678394615650177,
0.3627384305000305,
0.09372176229953766,
0.034771163016557693,
0.2980126738548279,
0.3901304304599762,
0.21240505576133728,
0.39999380707740784,
-0.11594892293214798,
0.6762601137161255,
-0.32000401616096497,
0.08429210633039474,
0.2451203614473343,
-0.25537848472595215,
-0.2924264967441559,
0.18690460920333862,
-0.16636402904987335,
-0.07732588797807693,
0.32966315746307373,
0.5182706713676453,
0.31202951073646545,
0.08701563626527786,
0.34109318256378174,
0.30625542998313904,
0.00902649201452732,
-0.031247306615114212,
-0.4050687849521637,
-0.05827170982956886,
0.2639196813106537,
0.3804076910018921,
-0.3354525566101074,
0.10174062848091125,
-0.040181465446949005,
-0.32988062500953674,
0.6009740233421326,
-0.4761059880256653,
-0.12176213413476944,
0.06805813312530518,
0.3615734875202179,
0.33938679099082947,
0.2328696995973587,
0.27611035108566284,
0.14954213798046112,
0.16262602806091309,
0.09601449221372604,
0.09878889471292496,
0.1701553463935852,
-0.4183505177497864,
0.2156297266483307,
-0.02575014904141426,
-0.21819250285625458,
0.10788197070360184,
-0.06097814068198204,
0.15002501010894775,
-0.04567669704556465,
-0.19987307488918304,
-0.15688681602478027,
0.5427840352058411,
-0.615797758102417,
0.027946149930357933,
-0.24889658391475677,
-0.15608298778533936,
0.007015147712081671,
-0.21342599391937256,
-0.0342438630759716,
0.1429586410522461,
0.05249624699354172,
-0.3868664503097534,
-0.053833141922950745,
0.10286086052656174,
0.1266249418258667,
-0.18767639994621277,
0.5111070275306702,
-0.11369612067937851,
-0.037036772817373276,
0.29622212052345276,
0.04495333135128021,
-0.15126502513885498,
0.10901666432619095,
-0.1937614381313324,
-0.0018786939326673746,
0.4852040112018585,
0.348783940076828,
0.24583379924297333,
-0.021493790671229362,
-0.23320843279361725,
0.04702914506196976,
-0.04065045341849327,
-0.07938706129789352,
0.22752587497234344,
0.07994377613067627,
0.13025294244289398,
0.409172385931015,
-0.033335525542497635,
-0.3332445025444031,
0.2324640303850174,
0.18577706813812256,
-0.20312990248203278,
-0.4314081072807312,
0.27104198932647705,
0.3516995310783386,
-0.03689766302704811,
-0.3497084677219391,
-0.5220087170600891,
0.23602674901485443,
0.31859877705574036,
0.18839353322982788,
-0.07165404409170151,
-0.02765103615820408,
-0.24728143215179443,
0.16910947859287262,
0.05655350908637047,
-0.04837210476398468,
0.10004787892103195,
0.17664200067520142,
-0.21454474329948425,
-0.20678988099098206,
-0.2552962005138397,
-0.13639681041240692,
0.4286458492279053,
-0.04433870315551758,
0.30944040417671204,
0.17776265740394592,
0.2771869897842407,
-0.12472452968358994,
-0.1249765008687973,
0.288752019405365,
0.008840441703796387,
0.04161085933446884,
-0.10893554985523224,
-0.03623880445957184,
0.19310900568962097,
-0.04694970324635506,
0.36491888761520386,
0.19579416513442993,
-0.32509055733680725,
0.019844286143779755,
-0.09847083687782288,
-0.12149498611688614,
-0.07897848635911942,
0.12100525945425034,
-0.15055014193058014,
0.11739997565746307,
0.043947670608758926,
-0.05258079990744591,
-0.18513640761375427,
-0.08627132326364517,
-0.1575877070426941,
-0.07947695255279541,
-0.2974512279033661,
-0.1662350296974182,
-0.24606843292713165,
-0.12503769993782043,
-0.11964450776576996,
0.004330579191446304,
0.0005504606524482369,
-0.010686952620744705,
-0.04048753157258034,
-0.2826741635799408,
-0.15883666276931763,
0.06079476326704025,
-0.29363352060317993,
-0.21670202910900116,
-0.17391912639141083,
0.22814130783081055,
-0.024399638175964355,
0.09305882453918457,
-0.11566931754350662,
0.06675166636705399,
0.12224092334508896,
-0.0957009419798851,
-0.1543302685022354,
-0.0534617118537426,
-0.23314307630062103,
0.2917097210884094,
0.14917242527008057,
0.046831462532281876,
-0.0794370248913765,
-0.4122962951660156,
-0.014396958984434605,
0.4969033896923065,
-0.5218711495399475,
-0.040799517184495926,
-0.3583909571170807,
0.2859594225883484,
-0.3150937855243683,
0.458298921585083,
0.05670680105686188,
-0.24624888598918915,
-0.13801392912864685,
0.3644827604293823,
0.17451028525829315,
0.38753044605255127,
-0.06171327456831932,
0.05497738718986511,
-0.08791763335466385,
0.2675449550151825,
-0.11497532576322556,
0.5162416696548462,
0.32723158597946167,
-0.21369847655296326,
-0.047819457948207855,
-0.26239633560180664,
0.11595174670219421,
0.052770111709833145,
-0.13988173007965088,
0.2965240776538849,
0.08347784727811813,
-0.3149952292442322,
0.1665278822183609,
-0.2887440323829651,
-0.4117943346500397,
0.03204244002699852,
-0.0527595579624176,
0.1982455551624298,
-0.24431078135967255,
0.31699225306510925,
0.04895063117146492,
0.49109962582588196,
-0.17805010080337524,
0.29109612107276917,
-0.2383602410554886,
-0.17670398950576782,
0.19751477241516113,
0.2727530002593994,
0.2449011355638504,
-0.16755743324756622,
0.02649645321071148,
-0.5409093499183655,
-0.421677827835083,
0.28344085812568665,
0.16747960448265076,
0.23528353869915009,
0.2791197597980499,
-0.10083501785993576,
0.5258054137229919,
-0.15621203184127808,
0.7999858260154724,
0.0206834077835083,
-0.3363375663757324,
0.38449087738990784,
-0.16181997954845428,
0.052876416593790054,
-0.2177928239107132,
-0.18270893394947052,
-0.06598951667547226,
0.23377379775047302,
0.4407469630241394,
-0.09317754209041595,
-0.24796470999717712,
0.6446051001548767,
0.06708776205778122,
-0.14724837243556976,
-0.3441516160964966,
-0.18618205189704895,
-0.3543059527873993,
-0.041218943893909454,
0.7678550481796265,
-0.12169056385755539,
0.15568961203098297,
0.18221955001354218,
-0.0512346550822258,
-0.3818883001804352,
0.15986619889736176,
0.23867474496364594,
-0.005119742825627327,
0.05058307573199272,
0.4557841718196869,
0.43481042981147766,
0.07141751050949097,
0.0007319067372009158,
0.11927418410778046,
-0.036911290138959885,
-0.3043968677520752,
0.07315223664045334,
-0.1888461410999298,
-0.25568529963493347,
0.379942387342453,
0.7006737589836121,
0.18687668442726135,
0.24840733408927917,
-0.21023090183734894,
0.37758868932724,
-0.1914457231760025,
0.024531112983822823,
0.43831270933151245,
-0.002062194049358368,
-0.17877252399921417,
-0.5383260250091553,
0.31127890944480896,
0.20342282950878143,
0.07330281287431717,
0.060861214995384216,
-0.07573027908802032,
-0.016380347311496735,
0.30217087268829346,
0.1249999925494194,
0.9838243722915649,
-0.02691962942481041,
0.1929832547903061,
0.5063086152076721,
0.004840589128434658,
-0.24390451610088348,
-0.6487342119216919,
0.36927682161331177,
-0.33292126655578613,
-0.2241525799036026,
0.1931164562702179,
-0.10114146769046783,
-0.08476846665143967,
0.07353442162275314,
-0.039342787116765976,
0.09914487600326538,
-0.047275446355342865,
-0.08625619858503342,
-0.25860172510147095,
0.3895537555217743,
0.3151942193508148,
-0.4278399646282196,
0.024883057922124863,
0.0013510254211723804,
0.2714568078517914,
-0.09871600568294525,
0.12781575322151184,
-0.16340012848377228,
-0.11088655889034271,
0.018440984189510345,
0.12517410516738892,
-0.0791136622428894,
-0.12837843596935272,
0.013058449141681194,
-0.04877298325300217,
-0.08731182664632797,
-0.232926145195961,
-0.3244182765483856,
0.46041905879974365,
-0.02994643710553646,
0.09953416138887405,
0.08158383518457413,
-0.09911013394594193,
0.07216362655162811,
-0.08676929026842117,
-0.49708321690559387,
0.22654153406620026,
0.0808124989271164,
-0.17367757856845856,
0.1493709236383438,
0.07872668653726578,
-0.3227713704109192,
-0.1460990458726883,
0.17443028092384338,
0.020577240735292435,
0.007548075169324875,
-0.03673753887414932,
0.31799888610839844,
-0.26263728737831116,
-0.23356527090072632,
0.02005961164832115,
0.09207762032747269,
-0.4317518472671509,
0.5605170130729675,
-0.3023819327354431,
-0.38006824254989624,
-0.054655522108078,
0.016695648431777954,
0.30580800771713257,
0.05603788420557976,
0.26237085461616516,
-0.0891195759177208,
-0.3048812747001648,
-0.15467683970928192,
-0.3024292290210724,
0.061282847076654434,
0.03862520307302475,
0.09388820081949234,
0.3024209439754486,
-0.006131275556981564,
0.02539917454123497,
-0.23266452550888062,
-0.32271745800971985,
-0.14176981151103973,
-0.3823907673358917,
0.1146000474691391,
-0.3576402962207794,
-0.1850680708885193,
0.2572285234928131,
0.3836848735809326,
0.03601778298616409,
0.23422391712665558,
-0.4448952376842499,
0.25904718041419983,
-0.21766971051692963,
-0.06533902883529663,
-0.031239528208971024,
0.2600191831588745,
-0.03270886093378067,
-0.2574276030063629,
0.1754397302865982,
0.2162696272134781,
0.11998913437128067,
0.14120355248451233,
0.03736573085188866,
-0.1117987260222435,
0.10294876247644424,
0.1834249347448349,
-0.11074664443731308,
0.16845057904720306,
0.08115547895431519,
-0.1483059972524643,
-0.3009880781173706,
-0.26529812812805176,
0.13436605036258698,
-0.11070296168327332,
-0.025854986160993576,
-0.13035948574543,
-0.12170922756195068,
-0.11248783767223358,
0.3323768377304077,
0.2738248407840729,
0.2040049135684967,
0.2833092510700226,
-0.07349912077188492,
0.07670185714960098,
-0.242833212018013,
-0.2653929889202118,
-0.05103721097111702,
0.1903247982263565,
0.061643991619348526,
0.08636786043643951,
-0.09186612069606781,
-0.17318780720233917,
-0.3799477815628052,
-0.0381179042160511,
0.03176894411444664,
0.4498938322067261,
0.04249393194913864,
-0.28836652636528015,
0.18529601395130157,
0.037937231361866,
-0.2797204554080963,
-0.1952764391899109,
0.36242690682411194,
-0.45070144534111023,
0.20022888481616974,
0.4017176926136017,
0.264575332403183,
0.16572357714176178,
-0.4832741916179657,
0.09376326948404312,
-0.23451700806617737,
0.09630575776100159,
-0.4337073266506195,
-0.09045102447271347,
0.3514745235443115,
-0.1948997974395752,
0.2041250616312027,
0.3052140772342682,
0.23111993074417114,
0.608918309211731,
0.03142382949590683,
0.27529004216194153,
0.18787717819213867,
0.21332718431949615,
-0.32170340418815613,
-0.17983657121658325,
0.29066896438598633,
0.23226867616176605,
-0.03177293762564659,
-0.20784491300582886,
0.009094808250665665,
0.234734445810318,
0.24403557181358337,
-0.5169647336006165,
-0.2611280381679535,
0.1630207896232605,
-0.12201986461877823,
-0.12818105518817902,
0.41174909472465515,
0.056770458817481995,
-0.27808162569999695,
0.22702665627002716,
0.0776640847325325,
0.19237351417541504,
-0.1272481083869934,
0.2008739858865738,
0.2934538424015045,
0.22120051085948944,
-0.02311350777745247,
0.09102419763803482,
0.43377068638801575,
-0.3367399573326111,
-0.20791500806808472,
-0.011150526814162731,
-0.0027166465297341347,
0.023589380085468292,
-0.15122292935848236,
0.2809459865093231,
0.2448248267173767,
-0.055502988398075104,
0.26872164011001587,
-0.05044205114245415,
-0.008870905265212059,
0.043804269284009933,
-0.03440093994140625,
-0.10841257870197296,
-0.10039348155260086,
0.10061768442392349,
-0.09087688475847244,
-0.12853382527828217,
-0.12072337418794632,
-0.242632657289505,
0.20261327922344208,
-0.180425226688385,
0.023068368434906006,
0.3459426462650299,
-0.09753980487585068,
-0.39480555057525635,
0.09524164348840714,
-0.2833029329776764,
0.06918026506900787,
0.10627041757106781,
-0.3566010296344757,
-0.08913610875606537,
0.26030680537223816,
-0.0016340732108801603,
-0.425748735666275,
0.5468894839286804,
0.17240485548973083,
0.12868216633796692,
-0.3299410045146942,
-0.0014341416535899043,
-0.3207877278327942,
-0.03450971096754074,
-0.5890920758247375,
0.1126355454325676,
0.1176835373044014,
0.44035446643829346,
0.07392621785402298,
-0.07035461813211441,
0.4031084477901459,
-0.40797150135040283,
0.09923962503671646,
0.3735490143299103,
-0.17344193160533905,
-0.030622584745287895,
-0.4397856593132019,
-0.07384752482175827,
0.04228341951966286,
-0.37432244420051575,
0.2847956717014313,
-0.12820696830749512,
-0.014769630506634712,
0.19237162172794342,
-0.020269667729735374,
0.12265091389417648,
0.06268276274204254,
0.5298790335655212,
-0.09794431179761887,
0.00005469910320243798,
-0.09645382314920425,
0.008634934201836586,
-0.2321903109550476,
0.1219586655497551,
-0.20707805454730988,
0.00857600849121809,
-0.02188819646835327,
0.17337539792060852,
-0.20737430453300476,
-0.3919600546360016,
-0.18153391778469086,
0.41765710711479187,
0.31262990832328796,
-0.41869649291038513,
0.19802717864513397,
0.1526593118906021,
-0.1558281034231186,
0.47959399223327637,
0.15036264061927795,
0.2282840758562088,
0.14673294126987457,
-0.03405112400650978,
-0.3561268746852875,
-0.10542018711566925,
0.6236688494682312,
-0.18829429149627686,
-0.029361853376030922,
-0.34943878650665283,
0.2549011707305908,
0.44379231333732605,
0.551044225692749,
-0.26457661390304565,
0.0862380638718605,
0.12194327265024185,
0.05357404798269272,
-0.21039441227912903,
0.5777595043182373,
0.18686150014400482,
0.01477066520601511,
-0.07378377765417099,
-0.26480770111083984,
-0.06308911740779877,
-0.0029668877832591534,
-0.3532100021839142,
-0.28143084049224854
] |
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.49882426857948303,
-0.26827821135520935,
-0.024500802159309387,
0.12822844088077545,
0.059439767152071,
0.20778393745422363,
0.12146293371915817,
0.424129843711853,
0.2917422652244568,
0.2924969494342804,
-0.11882511526346207,
0.18831509351730347,
0.13721297681331635,
0.08582092076539993,
-0.13625647127628326,
0.17504262924194336,
0.23703262209892273,
0.085334412753582,
0.26079800724983215,
-0.1344141811132431,
-0.3274792730808258,
-0.30906447768211365,
-0.1589120626449585,
-0.25786224007606506,
-0.40069231390953064,
-0.09581870585680008,
-0.24362216889858246,
-0.08205043524503708,
0.1982472836971283,
-0.47291645407676697,
-0.13753260672092438,
0.1398429274559021,
0.3402584493160248,
0.25829294323921204,
-0.00012204971426399425,
0.05567660555243492,
0.22800791263580322,
0.06546296179294586,
-0.22299756109714508,
0.6411958336830139,
0.3400726914405823,
-0.06948840618133545,
-0.17511016130447388,
-0.3107709586620331,
-0.14555539190769196,
-0.1110420823097229,
0.08107972890138626,
-0.046929746866226196,
-0.16636499762535095,
0.19430115818977356,
0.026624053716659546,
-0.05828651040792465,
0.052254825830459595,
-0.015400376170873642,
0.4025115668773651,
-0.0755913034081459,
-0.06917718797922134,
0.31747138500213623,
0.1635129153728485,
-0.07223787903785706,
0.09974309802055359,
0.4481078088283539,
0.1206413134932518,
-0.22677725553512573,
0.10890393704175949,
0.20516155660152435,
0.7838166952133179,
0.02243974804878235,
0.06526792794466019,
0.15266957879066467,
0.015340343117713928,
-0.09055263549089432,
-0.443008691072464,
-0.10290376842021942,
0.4257138669490814,
-0.6180593967437744,
-0.06740126758813858,
-0.08374200016260147,
-0.10147474706172943,
0.05386023595929146,
0.1745855063199997,
-0.030229715630412102,
0.03631801903247833,
0.04745089262723923,
0.17489956319332123,
0.16535739600658417,
0.3874708414077759,
-0.05990241467952728,
0.5584333539009094,
0.04244744032621384,
-0.11685466021299362,
0.04488252475857735,
-0.0920773297548294,
0.012196335010230541,
-0.6050297617912292,
0.08808468282222748,
-0.030915843322873116,
-0.0993313416838646,
-0.09268704801797867,
0.017801953479647636,
-0.3694859743118286,
0.006165648344904184,
0.2365599423646927,
0.0033363497350364923,
-0.18306466937065125,
-0.0902583971619606,
-0.5061047673225403,
0.05588098615407944,
0.08390173316001892,
0.10628709942102432,
-0.3780878484249115,
0.0992341935634613,
-0.0033381283283233643,
-0.0043098581954836845,
-0.32598063349723816,
-0.29813525080680847,
-0.22889026999473572,
0.22280706465244293,
-0.18114228546619415,
0.07718804478645325,
-0.40396830439567566,
-0.2522764801979065,
0.2050725668668747,
0.4162214994430542,
-0.11774410307407379,
-0.07613665610551834,
0.010839437134563923,
-0.03461559861898422,
-0.23442770540714264,
0.17616906762123108,
-0.2220170646905899,
0.230660080909729,
-0.031963787972927094,
0.5045983195304871,
-0.02910623513162136,
-0.22139422595500946,
-0.08906898647546768,
-0.021730657666921616,
0.08396384865045547,
-0.007842419669032097,
-0.04416358843445778,
-0.29989323019981384,
0.24666792154312134,
0.07492318749427795,
-0.26321426033973694,
-0.0676850825548172,
-0.09395191818475723,
0.12111034244298935,
-0.22782327234745026,
0.22150824964046478,
-0.21739467978477478,
-0.36510223150253296,
0.02715788595378399,
0.01933111622929573,
0.3086775839328766,
-0.06309258937835693,
0.4208229184150696,
0.11439721286296844,
0.17301848530769348,
0.16133517026901245,
0.15917645394802094,
-0.13144344091415405,
-0.26802125573158264,
0.08318649977445602,
0.22678394615650177,
0.3627384305000305,
0.09372176229953766,
0.034771163016557693,
0.2980126738548279,
0.3901304304599762,
0.21240505576133728,
0.39999380707740784,
-0.11594892293214798,
0.6762601137161255,
-0.32000401616096497,
0.08429210633039474,
0.2451203614473343,
-0.25537848472595215,
-0.2924264967441559,
0.18690460920333862,
-0.16636402904987335,
-0.07732588797807693,
0.32966315746307373,
0.5182706713676453,
0.31202951073646545,
0.08701563626527786,
0.34109318256378174,
0.30625542998313904,
0.00902649201452732,
-0.031247306615114212,
-0.4050687849521637,
-0.05827170982956886,
0.2639196813106537,
0.3804076910018921,
-0.3354525566101074,
0.10174062848091125,
-0.040181465446949005,
-0.32988062500953674,
0.6009740233421326,
-0.4761059880256653,
-0.12176213413476944,
0.06805813312530518,
0.3615734875202179,
0.33938679099082947,
0.2328696995973587,
0.27611035108566284,
0.14954213798046112,
0.16262602806091309,
0.09601449221372604,
0.09878889471292496,
0.1701553463935852,
-0.4183505177497864,
0.2156297266483307,
-0.02575014904141426,
-0.21819250285625458,
0.10788197070360184,
-0.06097814068198204,
0.15002501010894775,
-0.04567669704556465,
-0.19987307488918304,
-0.15688681602478027,
0.5427840352058411,
-0.615797758102417,
0.027946149930357933,
-0.24889658391475677,
-0.15608298778533936,
0.007015147712081671,
-0.21342599391937256,
-0.0342438630759716,
0.1429586410522461,
0.05249624699354172,
-0.3868664503097534,
-0.053833141922950745,
0.10286086052656174,
0.1266249418258667,
-0.18767639994621277,
0.5111070275306702,
-0.11369612067937851,
-0.037036772817373276,
0.29622212052345276,
0.04495333135128021,
-0.15126502513885498,
0.10901666432619095,
-0.1937614381313324,
-0.0018786939326673746,
0.4852040112018585,
0.348783940076828,
0.24583379924297333,
-0.021493790671229362,
-0.23320843279361725,
0.04702914506196976,
-0.04065045341849327,
-0.07938706129789352,
0.22752587497234344,
0.07994377613067627,
0.13025294244289398,
0.409172385931015,
-0.033335525542497635,
-0.3332445025444031,
0.2324640303850174,
0.18577706813812256,
-0.20312990248203278,
-0.4314081072807312,
0.27104198932647705,
0.3516995310783386,
-0.03689766302704811,
-0.3497084677219391,
-0.5220087170600891,
0.23602674901485443,
0.31859877705574036,
0.18839353322982788,
-0.07165404409170151,
-0.02765103615820408,
-0.24728143215179443,
0.16910947859287262,
0.05655350908637047,
-0.04837210476398468,
0.10004787892103195,
0.17664200067520142,
-0.21454474329948425,
-0.20678988099098206,
-0.2552962005138397,
-0.13639681041240692,
0.4286458492279053,
-0.04433870315551758,
0.30944040417671204,
0.17776265740394592,
0.2771869897842407,
-0.12472452968358994,
-0.1249765008687973,
0.288752019405365,
0.008840441703796387,
0.04161085933446884,
-0.10893554985523224,
-0.03623880445957184,
0.19310900568962097,
-0.04694970324635506,
0.36491888761520386,
0.19579416513442993,
-0.32509055733680725,
0.019844286143779755,
-0.09847083687782288,
-0.12149498611688614,
-0.07897848635911942,
0.12100525945425034,
-0.15055014193058014,
0.11739997565746307,
0.043947670608758926,
-0.05258079990744591,
-0.18513640761375427,
-0.08627132326364517,
-0.1575877070426941,
-0.07947695255279541,
-0.2974512279033661,
-0.1662350296974182,
-0.24606843292713165,
-0.12503769993782043,
-0.11964450776576996,
0.004330579191446304,
0.0005504606524482369,
-0.010686952620744705,
-0.04048753157258034,
-0.2826741635799408,
-0.15883666276931763,
0.06079476326704025,
-0.29363352060317993,
-0.21670202910900116,
-0.17391912639141083,
0.22814130783081055,
-0.024399638175964355,
0.09305882453918457,
-0.11566931754350662,
0.06675166636705399,
0.12224092334508896,
-0.0957009419798851,
-0.1543302685022354,
-0.0534617118537426,
-0.23314307630062103,
0.2917097210884094,
0.14917242527008057,
0.046831462532281876,
-0.0794370248913765,
-0.4122962951660156,
-0.014396958984434605,
0.4969033896923065,
-0.5218711495399475,
-0.040799517184495926,
-0.3583909571170807,
0.2859594225883484,
-0.3150937855243683,
0.458298921585083,
0.05670680105686188,
-0.24624888598918915,
-0.13801392912864685,
0.3644827604293823,
0.17451028525829315,
0.38753044605255127,
-0.06171327456831932,
0.05497738718986511,
-0.08791763335466385,
0.2675449550151825,
-0.11497532576322556,
0.5162416696548462,
0.32723158597946167,
-0.21369847655296326,
-0.047819457948207855,
-0.26239633560180664,
0.11595174670219421,
0.052770111709833145,
-0.13988173007965088,
0.2965240776538849,
0.08347784727811813,
-0.3149952292442322,
0.1665278822183609,
-0.2887440323829651,
-0.4117943346500397,
0.03204244002699852,
-0.0527595579624176,
0.1982455551624298,
-0.24431078135967255,
0.31699225306510925,
0.04895063117146492,
0.49109962582588196,
-0.17805010080337524,
0.29109612107276917,
-0.2383602410554886,
-0.17670398950576782,
0.19751477241516113,
0.2727530002593994,
0.2449011355638504,
-0.16755743324756622,
0.02649645321071148,
-0.5409093499183655,
-0.421677827835083,
0.28344085812568665,
0.16747960448265076,
0.23528353869915009,
0.2791197597980499,
-0.10083501785993576,
0.5258054137229919,
-0.15621203184127808,
0.7999858260154724,
0.0206834077835083,
-0.3363375663757324,
0.38449087738990784,
-0.16181997954845428,
0.052876416593790054,
-0.2177928239107132,
-0.18270893394947052,
-0.06598951667547226,
0.23377379775047302,
0.4407469630241394,
-0.09317754209041595,
-0.24796470999717712,
0.6446051001548767,
0.06708776205778122,
-0.14724837243556976,
-0.3441516160964966,
-0.18618205189704895,
-0.3543059527873993,
-0.041218943893909454,
0.7678550481796265,
-0.12169056385755539,
0.15568961203098297,
0.18221955001354218,
-0.0512346550822258,
-0.3818883001804352,
0.15986619889736176,
0.23867474496364594,
-0.005119742825627327,
0.05058307573199272,
0.4557841718196869,
0.43481042981147766,
0.07141751050949097,
0.0007319067372009158,
0.11927418410778046,
-0.036911290138959885,
-0.3043968677520752,
0.07315223664045334,
-0.1888461410999298,
-0.25568529963493347,
0.379942387342453,
0.7006737589836121,
0.18687668442726135,
0.24840733408927917,
-0.21023090183734894,
0.37758868932724,
-0.1914457231760025,
0.024531112983822823,
0.43831270933151245,
-0.002062194049358368,
-0.17877252399921417,
-0.5383260250091553,
0.31127890944480896,
0.20342282950878143,
0.07330281287431717,
0.060861214995384216,
-0.07573027908802032,
-0.016380347311496735,
0.30217087268829346,
0.1249999925494194,
0.9838243722915649,
-0.02691962942481041,
0.1929832547903061,
0.5063086152076721,
0.004840589128434658,
-0.24390451610088348,
-0.6487342119216919,
0.36927682161331177,
-0.33292126655578613,
-0.2241525799036026,
0.1931164562702179,
-0.10114146769046783,
-0.08476846665143967,
0.07353442162275314,
-0.039342787116765976,
0.09914487600326538,
-0.047275446355342865,
-0.08625619858503342,
-0.25860172510147095,
0.3895537555217743,
0.3151942193508148,
-0.4278399646282196,
0.024883057922124863,
0.0013510254211723804,
0.2714568078517914,
-0.09871600568294525,
0.12781575322151184,
-0.16340012848377228,
-0.11088655889034271,
0.018440984189510345,
0.12517410516738892,
-0.0791136622428894,
-0.12837843596935272,
0.013058449141681194,
-0.04877298325300217,
-0.08731182664632797,
-0.232926145195961,
-0.3244182765483856,
0.46041905879974365,
-0.02994643710553646,
0.09953416138887405,
0.08158383518457413,
-0.09911013394594193,
0.07216362655162811,
-0.08676929026842117,
-0.49708321690559387,
0.22654153406620026,
0.0808124989271164,
-0.17367757856845856,
0.1493709236383438,
0.07872668653726578,
-0.3227713704109192,
-0.1460990458726883,
0.17443028092384338,
0.020577240735292435,
0.007548075169324875,
-0.03673753887414932,
0.31799888610839844,
-0.26263728737831116,
-0.23356527090072632,
0.02005961164832115,
0.09207762032747269,
-0.4317518472671509,
0.5605170130729675,
-0.3023819327354431,
-0.38006824254989624,
-0.054655522108078,
0.016695648431777954,
0.30580800771713257,
0.05603788420557976,
0.26237085461616516,
-0.0891195759177208,
-0.3048812747001648,
-0.15467683970928192,
-0.3024292290210724,
0.061282847076654434,
0.03862520307302475,
0.09388820081949234,
0.3024209439754486,
-0.006131275556981564,
0.02539917454123497,
-0.23266452550888062,
-0.32271745800971985,
-0.14176981151103973,
-0.3823907673358917,
0.1146000474691391,
-0.3576402962207794,
-0.1850680708885193,
0.2572285234928131,
0.3836848735809326,
0.03601778298616409,
0.23422391712665558,
-0.4448952376842499,
0.25904718041419983,
-0.21766971051692963,
-0.06533902883529663,
-0.031239528208971024,
0.2600191831588745,
-0.03270886093378067,
-0.2574276030063629,
0.1754397302865982,
0.2162696272134781,
0.11998913437128067,
0.14120355248451233,
0.03736573085188866,
-0.1117987260222435,
0.10294876247644424,
0.1834249347448349,
-0.11074664443731308,
0.16845057904720306,
0.08115547895431519,
-0.1483059972524643,
-0.3009880781173706,
-0.26529812812805176,
0.13436605036258698,
-0.11070296168327332,
-0.025854986160993576,
-0.13035948574543,
-0.12170922756195068,
-0.11248783767223358,
0.3323768377304077,
0.2738248407840729,
0.2040049135684967,
0.2833092510700226,
-0.07349912077188492,
0.07670185714960098,
-0.242833212018013,
-0.2653929889202118,
-0.05103721097111702,
0.1903247982263565,
0.061643991619348526,
0.08636786043643951,
-0.09186612069606781,
-0.17318780720233917,
-0.3799477815628052,
-0.0381179042160511,
0.03176894411444664,
0.4498938322067261,
0.04249393194913864,
-0.28836652636528015,
0.18529601395130157,
0.037937231361866,
-0.2797204554080963,
-0.1952764391899109,
0.36242690682411194,
-0.45070144534111023,
0.20022888481616974,
0.4017176926136017,
0.264575332403183,
0.16572357714176178,
-0.4832741916179657,
0.09376326948404312,
-0.23451700806617737,
0.09630575776100159,
-0.4337073266506195,
-0.09045102447271347,
0.3514745235443115,
-0.1948997974395752,
0.2041250616312027,
0.3052140772342682,
0.23111993074417114,
0.608918309211731,
0.03142382949590683,
0.27529004216194153,
0.18787717819213867,
0.21332718431949615,
-0.32170340418815613,
-0.17983657121658325,
0.29066896438598633,
0.23226867616176605,
-0.03177293762564659,
-0.20784491300582886,
0.009094808250665665,
0.234734445810318,
0.24403557181358337,
-0.5169647336006165,
-0.2611280381679535,
0.1630207896232605,
-0.12201986461877823,
-0.12818105518817902,
0.41174909472465515,
0.056770458817481995,
-0.27808162569999695,
0.22702665627002716,
0.0776640847325325,
0.19237351417541504,
-0.1272481083869934,
0.2008739858865738,
0.2934538424015045,
0.22120051085948944,
-0.02311350777745247,
0.09102419763803482,
0.43377068638801575,
-0.3367399573326111,
-0.20791500806808472,
-0.011150526814162731,
-0.0027166465297341347,
0.023589380085468292,
-0.15122292935848236,
0.2809459865093231,
0.2448248267173767,
-0.055502988398075104,
0.26872164011001587,
-0.05044205114245415,
-0.008870905265212059,
0.043804269284009933,
-0.03440093994140625,
-0.10841257870197296,
-0.10039348155260086,
0.10061768442392349,
-0.09087688475847244,
-0.12853382527828217,
-0.12072337418794632,
-0.242632657289505,
0.20261327922344208,
-0.180425226688385,
0.023068368434906006,
0.3459426462650299,
-0.09753980487585068,
-0.39480555057525635,
0.09524164348840714,
-0.2833029329776764,
0.06918026506900787,
0.10627041757106781,
-0.3566010296344757,
-0.08913610875606537,
0.26030680537223816,
-0.0016340732108801603,
-0.425748735666275,
0.5468894839286804,
0.17240485548973083,
0.12868216633796692,
-0.3299410045146942,
-0.0014341416535899043,
-0.3207877278327942,
-0.03450971096754074,
-0.5890920758247375,
0.1126355454325676,
0.1176835373044014,
0.44035446643829346,
0.07392621785402298,
-0.07035461813211441,
0.4031084477901459,
-0.40797150135040283,
0.09923962503671646,
0.3735490143299103,
-0.17344193160533905,
-0.030622584745287895,
-0.4397856593132019,
-0.07384752482175827,
0.04228341951966286,
-0.37432244420051575,
0.2847956717014313,
-0.12820696830749512,
-0.014769630506634712,
0.19237162172794342,
-0.020269667729735374,
0.12265091389417648,
0.06268276274204254,
0.5298790335655212,
-0.09794431179761887,
0.00005469910320243798,
-0.09645382314920425,
0.008634934201836586,
-0.2321903109550476,
0.1219586655497551,
-0.20707805454730988,
0.00857600849121809,
-0.02188819646835327,
0.17337539792060852,
-0.20737430453300476,
-0.3919600546360016,
-0.18153391778469086,
0.41765710711479187,
0.31262990832328796,
-0.41869649291038513,
0.19802717864513397,
0.1526593118906021,
-0.1558281034231186,
0.47959399223327637,
0.15036264061927795,
0.2282840758562088,
0.14673294126987457,
-0.03405112400650978,
-0.3561268746852875,
-0.10542018711566925,
0.6236688494682312,
-0.18829429149627686,
-0.029361853376030922,
-0.34943878650665283,
0.2549011707305908,
0.44379231333732605,
0.551044225692749,
-0.26457661390304565,
0.0862380638718605,
0.12194327265024185,
0.05357404798269272,
-0.21039441227912903,
0.5777595043182373,
0.18686150014400482,
0.01477066520601511,
-0.07378377765417099,
-0.26480770111083984,
-0.06308911740779877,
-0.0029668877832591534,
-0.3532100021839142,
-0.28143084049224854
] |
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.49882426857948303,
-0.26827821135520935,
-0.024500802159309387,
0.12822844088077545,
0.059439767152071,
0.20778393745422363,
0.12146293371915817,
0.424129843711853,
0.2917422652244568,
0.2924969494342804,
-0.11882511526346207,
0.18831509351730347,
0.13721297681331635,
0.08582092076539993,
-0.13625647127628326,
0.17504262924194336,
0.23703262209892273,
0.085334412753582,
0.26079800724983215,
-0.1344141811132431,
-0.3274792730808258,
-0.30906447768211365,
-0.1589120626449585,
-0.25786224007606506,
-0.40069231390953064,
-0.09581870585680008,
-0.24362216889858246,
-0.08205043524503708,
0.1982472836971283,
-0.47291645407676697,
-0.13753260672092438,
0.1398429274559021,
0.3402584493160248,
0.25829294323921204,
-0.00012204971426399425,
0.05567660555243492,
0.22800791263580322,
0.06546296179294586,
-0.22299756109714508,
0.6411958336830139,
0.3400726914405823,
-0.06948840618133545,
-0.17511016130447388,
-0.3107709586620331,
-0.14555539190769196,
-0.1110420823097229,
0.08107972890138626,
-0.046929746866226196,
-0.16636499762535095,
0.19430115818977356,
0.026624053716659546,
-0.05828651040792465,
0.052254825830459595,
-0.015400376170873642,
0.4025115668773651,
-0.0755913034081459,
-0.06917718797922134,
0.31747138500213623,
0.1635129153728485,
-0.07223787903785706,
0.09974309802055359,
0.4481078088283539,
0.1206413134932518,
-0.22677725553512573,
0.10890393704175949,
0.20516155660152435,
0.7838166952133179,
0.02243974804878235,
0.06526792794466019,
0.15266957879066467,
0.015340343117713928,
-0.09055263549089432,
-0.443008691072464,
-0.10290376842021942,
0.4257138669490814,
-0.6180593967437744,
-0.06740126758813858,
-0.08374200016260147,
-0.10147474706172943,
0.05386023595929146,
0.1745855063199997,
-0.030229715630412102,
0.03631801903247833,
0.04745089262723923,
0.17489956319332123,
0.16535739600658417,
0.3874708414077759,
-0.05990241467952728,
0.5584333539009094,
0.04244744032621384,
-0.11685466021299362,
0.04488252475857735,
-0.0920773297548294,
0.012196335010230541,
-0.6050297617912292,
0.08808468282222748,
-0.030915843322873116,
-0.0993313416838646,
-0.09268704801797867,
0.017801953479647636,
-0.3694859743118286,
0.006165648344904184,
0.2365599423646927,
0.0033363497350364923,
-0.18306466937065125,
-0.0902583971619606,
-0.5061047673225403,
0.05588098615407944,
0.08390173316001892,
0.10628709942102432,
-0.3780878484249115,
0.0992341935634613,
-0.0033381283283233643,
-0.0043098581954836845,
-0.32598063349723816,
-0.29813525080680847,
-0.22889026999473572,
0.22280706465244293,
-0.18114228546619415,
0.07718804478645325,
-0.40396830439567566,
-0.2522764801979065,
0.2050725668668747,
0.4162214994430542,
-0.11774410307407379,
-0.07613665610551834,
0.010839437134563923,
-0.03461559861898422,
-0.23442770540714264,
0.17616906762123108,
-0.2220170646905899,
0.230660080909729,
-0.031963787972927094,
0.5045983195304871,
-0.02910623513162136,
-0.22139422595500946,
-0.08906898647546768,
-0.021730657666921616,
0.08396384865045547,
-0.007842419669032097,
-0.04416358843445778,
-0.29989323019981384,
0.24666792154312134,
0.07492318749427795,
-0.26321426033973694,
-0.0676850825548172,
-0.09395191818475723,
0.12111034244298935,
-0.22782327234745026,
0.22150824964046478,
-0.21739467978477478,
-0.36510223150253296,
0.02715788595378399,
0.01933111622929573,
0.3086775839328766,
-0.06309258937835693,
0.4208229184150696,
0.11439721286296844,
0.17301848530769348,
0.16133517026901245,
0.15917645394802094,
-0.13144344091415405,
-0.26802125573158264,
0.08318649977445602,
0.22678394615650177,
0.3627384305000305,
0.09372176229953766,
0.034771163016557693,
0.2980126738548279,
0.3901304304599762,
0.21240505576133728,
0.39999380707740784,
-0.11594892293214798,
0.6762601137161255,
-0.32000401616096497,
0.08429210633039474,
0.2451203614473343,
-0.25537848472595215,
-0.2924264967441559,
0.18690460920333862,
-0.16636402904987335,
-0.07732588797807693,
0.32966315746307373,
0.5182706713676453,
0.31202951073646545,
0.08701563626527786,
0.34109318256378174,
0.30625542998313904,
0.00902649201452732,
-0.031247306615114212,
-0.4050687849521637,
-0.05827170982956886,
0.2639196813106537,
0.3804076910018921,
-0.3354525566101074,
0.10174062848091125,
-0.040181465446949005,
-0.32988062500953674,
0.6009740233421326,
-0.4761059880256653,
-0.12176213413476944,
0.06805813312530518,
0.3615734875202179,
0.33938679099082947,
0.2328696995973587,
0.27611035108566284,
0.14954213798046112,
0.16262602806091309,
0.09601449221372604,
0.09878889471292496,
0.1701553463935852,
-0.4183505177497864,
0.2156297266483307,
-0.02575014904141426,
-0.21819250285625458,
0.10788197070360184,
-0.06097814068198204,
0.15002501010894775,
-0.04567669704556465,
-0.19987307488918304,
-0.15688681602478027,
0.5427840352058411,
-0.615797758102417,
0.027946149930357933,
-0.24889658391475677,
-0.15608298778533936,
0.007015147712081671,
-0.21342599391937256,
-0.0342438630759716,
0.1429586410522461,
0.05249624699354172,
-0.3868664503097534,
-0.053833141922950745,
0.10286086052656174,
0.1266249418258667,
-0.18767639994621277,
0.5111070275306702,
-0.11369612067937851,
-0.037036772817373276,
0.29622212052345276,
0.04495333135128021,
-0.15126502513885498,
0.10901666432619095,
-0.1937614381313324,
-0.0018786939326673746,
0.4852040112018585,
0.348783940076828,
0.24583379924297333,
-0.021493790671229362,
-0.23320843279361725,
0.04702914506196976,
-0.04065045341849327,
-0.07938706129789352,
0.22752587497234344,
0.07994377613067627,
0.13025294244289398,
0.409172385931015,
-0.033335525542497635,
-0.3332445025444031,
0.2324640303850174,
0.18577706813812256,
-0.20312990248203278,
-0.4314081072807312,
0.27104198932647705,
0.3516995310783386,
-0.03689766302704811,
-0.3497084677219391,
-0.5220087170600891,
0.23602674901485443,
0.31859877705574036,
0.18839353322982788,
-0.07165404409170151,
-0.02765103615820408,
-0.24728143215179443,
0.16910947859287262,
0.05655350908637047,
-0.04837210476398468,
0.10004787892103195,
0.17664200067520142,
-0.21454474329948425,
-0.20678988099098206,
-0.2552962005138397,
-0.13639681041240692,
0.4286458492279053,
-0.04433870315551758,
0.30944040417671204,
0.17776265740394592,
0.2771869897842407,
-0.12472452968358994,
-0.1249765008687973,
0.288752019405365,
0.008840441703796387,
0.04161085933446884,
-0.10893554985523224,
-0.03623880445957184,
0.19310900568962097,
-0.04694970324635506,
0.36491888761520386,
0.19579416513442993,
-0.32509055733680725,
0.019844286143779755,
-0.09847083687782288,
-0.12149498611688614,
-0.07897848635911942,
0.12100525945425034,
-0.15055014193058014,
0.11739997565746307,
0.043947670608758926,
-0.05258079990744591,
-0.18513640761375427,
-0.08627132326364517,
-0.1575877070426941,
-0.07947695255279541,
-0.2974512279033661,
-0.1662350296974182,
-0.24606843292713165,
-0.12503769993782043,
-0.11964450776576996,
0.004330579191446304,
0.0005504606524482369,
-0.010686952620744705,
-0.04048753157258034,
-0.2826741635799408,
-0.15883666276931763,
0.06079476326704025,
-0.29363352060317993,
-0.21670202910900116,
-0.17391912639141083,
0.22814130783081055,
-0.024399638175964355,
0.09305882453918457,
-0.11566931754350662,
0.06675166636705399,
0.12224092334508896,
-0.0957009419798851,
-0.1543302685022354,
-0.0534617118537426,
-0.23314307630062103,
0.2917097210884094,
0.14917242527008057,
0.046831462532281876,
-0.0794370248913765,
-0.4122962951660156,
-0.014396958984434605,
0.4969033896923065,
-0.5218711495399475,
-0.040799517184495926,
-0.3583909571170807,
0.2859594225883484,
-0.3150937855243683,
0.458298921585083,
0.05670680105686188,
-0.24624888598918915,
-0.13801392912864685,
0.3644827604293823,
0.17451028525829315,
0.38753044605255127,
-0.06171327456831932,
0.05497738718986511,
-0.08791763335466385,
0.2675449550151825,
-0.11497532576322556,
0.5162416696548462,
0.32723158597946167,
-0.21369847655296326,
-0.047819457948207855,
-0.26239633560180664,
0.11595174670219421,
0.052770111709833145,
-0.13988173007965088,
0.2965240776538849,
0.08347784727811813,
-0.3149952292442322,
0.1665278822183609,
-0.2887440323829651,
-0.4117943346500397,
0.03204244002699852,
-0.0527595579624176,
0.1982455551624298,
-0.24431078135967255,
0.31699225306510925,
0.04895063117146492,
0.49109962582588196,
-0.17805010080337524,
0.29109612107276917,
-0.2383602410554886,
-0.17670398950576782,
0.19751477241516113,
0.2727530002593994,
0.2449011355638504,
-0.16755743324756622,
0.02649645321071148,
-0.5409093499183655,
-0.421677827835083,
0.28344085812568665,
0.16747960448265076,
0.23528353869915009,
0.2791197597980499,
-0.10083501785993576,
0.5258054137229919,
-0.15621203184127808,
0.7999858260154724,
0.0206834077835083,
-0.3363375663757324,
0.38449087738990784,
-0.16181997954845428,
0.052876416593790054,
-0.2177928239107132,
-0.18270893394947052,
-0.06598951667547226,
0.23377379775047302,
0.4407469630241394,
-0.09317754209041595,
-0.24796470999717712,
0.6446051001548767,
0.06708776205778122,
-0.14724837243556976,
-0.3441516160964966,
-0.18618205189704895,
-0.3543059527873993,
-0.041218943893909454,
0.7678550481796265,
-0.12169056385755539,
0.15568961203098297,
0.18221955001354218,
-0.0512346550822258,
-0.3818883001804352,
0.15986619889736176,
0.23867474496364594,
-0.005119742825627327,
0.05058307573199272,
0.4557841718196869,
0.43481042981147766,
0.07141751050949097,
0.0007319067372009158,
0.11927418410778046,
-0.036911290138959885,
-0.3043968677520752,
0.07315223664045334,
-0.1888461410999298,
-0.25568529963493347,
0.379942387342453,
0.7006737589836121,
0.18687668442726135,
0.24840733408927917,
-0.21023090183734894,
0.37758868932724,
-0.1914457231760025,
0.024531112983822823,
0.43831270933151245,
-0.002062194049358368,
-0.17877252399921417,
-0.5383260250091553,
0.31127890944480896,
0.20342282950878143,
0.07330281287431717,
0.060861214995384216,
-0.07573027908802032,
-0.016380347311496735,
0.30217087268829346,
0.1249999925494194,
0.9838243722915649,
-0.02691962942481041,
0.1929832547903061,
0.5063086152076721,
0.004840589128434658,
-0.24390451610088348,
-0.6487342119216919,
0.36927682161331177,
-0.33292126655578613,
-0.2241525799036026,
0.1931164562702179,
-0.10114146769046783,
-0.08476846665143967,
0.07353442162275314,
-0.039342787116765976,
0.09914487600326538,
-0.047275446355342865,
-0.08625619858503342,
-0.25860172510147095,
0.3895537555217743,
0.3151942193508148,
-0.4278399646282196,
0.024883057922124863,
0.0013510254211723804,
0.2714568078517914,
-0.09871600568294525,
0.12781575322151184,
-0.16340012848377228,
-0.11088655889034271,
0.018440984189510345,
0.12517410516738892,
-0.0791136622428894,
-0.12837843596935272,
0.013058449141681194,
-0.04877298325300217,
-0.08731182664632797,
-0.232926145195961,
-0.3244182765483856,
0.46041905879974365,
-0.02994643710553646,
0.09953416138887405,
0.08158383518457413,
-0.09911013394594193,
0.07216362655162811,
-0.08676929026842117,
-0.49708321690559387,
0.22654153406620026,
0.0808124989271164,
-0.17367757856845856,
0.1493709236383438,
0.07872668653726578,
-0.3227713704109192,
-0.1460990458726883,
0.17443028092384338,
0.020577240735292435,
0.007548075169324875,
-0.03673753887414932,
0.31799888610839844,
-0.26263728737831116,
-0.23356527090072632,
0.02005961164832115,
0.09207762032747269,
-0.4317518472671509,
0.5605170130729675,
-0.3023819327354431,
-0.38006824254989624,
-0.054655522108078,
0.016695648431777954,
0.30580800771713257,
0.05603788420557976,
0.26237085461616516,
-0.0891195759177208,
-0.3048812747001648,
-0.15467683970928192,
-0.3024292290210724,
0.061282847076654434,
0.03862520307302475,
0.09388820081949234,
0.3024209439754486,
-0.006131275556981564,
0.02539917454123497,
-0.23266452550888062,
-0.32271745800971985,
-0.14176981151103973,
-0.3823907673358917,
0.1146000474691391,
-0.3576402962207794,
-0.1850680708885193,
0.2572285234928131,
0.3836848735809326,
0.03601778298616409,
0.23422391712665558,
-0.4448952376842499,
0.25904718041419983,
-0.21766971051692963,
-0.06533902883529663,
-0.031239528208971024,
0.2600191831588745,
-0.03270886093378067,
-0.2574276030063629,
0.1754397302865982,
0.2162696272134781,
0.11998913437128067,
0.14120355248451233,
0.03736573085188866,
-0.1117987260222435,
0.10294876247644424,
0.1834249347448349,
-0.11074664443731308,
0.16845057904720306,
0.08115547895431519,
-0.1483059972524643,
-0.3009880781173706,
-0.26529812812805176,
0.13436605036258698,
-0.11070296168327332,
-0.025854986160993576,
-0.13035948574543,
-0.12170922756195068,
-0.11248783767223358,
0.3323768377304077,
0.2738248407840729,
0.2040049135684967,
0.2833092510700226,
-0.07349912077188492,
0.07670185714960098,
-0.242833212018013,
-0.2653929889202118,
-0.05103721097111702,
0.1903247982263565,
0.061643991619348526,
0.08636786043643951,
-0.09186612069606781,
-0.17318780720233917,
-0.3799477815628052,
-0.0381179042160511,
0.03176894411444664,
0.4498938322067261,
0.04249393194913864,
-0.28836652636528015,
0.18529601395130157,
0.037937231361866,
-0.2797204554080963,
-0.1952764391899109,
0.36242690682411194,
-0.45070144534111023,
0.20022888481616974,
0.4017176926136017,
0.264575332403183,
0.16572357714176178,
-0.4832741916179657,
0.09376326948404312,
-0.23451700806617737,
0.09630575776100159,
-0.4337073266506195,
-0.09045102447271347,
0.3514745235443115,
-0.1948997974395752,
0.2041250616312027,
0.3052140772342682,
0.23111993074417114,
0.608918309211731,
0.03142382949590683,
0.27529004216194153,
0.18787717819213867,
0.21332718431949615,
-0.32170340418815613,
-0.17983657121658325,
0.29066896438598633,
0.23226867616176605,
-0.03177293762564659,
-0.20784491300582886,
0.009094808250665665,
0.234734445810318,
0.24403557181358337,
-0.5169647336006165,
-0.2611280381679535,
0.1630207896232605,
-0.12201986461877823,
-0.12818105518817902,
0.41174909472465515,
0.056770458817481995,
-0.27808162569999695,
0.22702665627002716,
0.0776640847325325,
0.19237351417541504,
-0.1272481083869934,
0.2008739858865738,
0.2934538424015045,
0.22120051085948944,
-0.02311350777745247,
0.09102419763803482,
0.43377068638801575,
-0.3367399573326111,
-0.20791500806808472,
-0.011150526814162731,
-0.0027166465297341347,
0.023589380085468292,
-0.15122292935848236,
0.2809459865093231,
0.2448248267173767,
-0.055502988398075104,
0.26872164011001587,
-0.05044205114245415,
-0.008870905265212059,
0.043804269284009933,
-0.03440093994140625,
-0.10841257870197296,
-0.10039348155260086,
0.10061768442392349,
-0.09087688475847244,
-0.12853382527828217,
-0.12072337418794632,
-0.242632657289505,
0.20261327922344208,
-0.180425226688385,
0.023068368434906006,
0.3459426462650299,
-0.09753980487585068,
-0.39480555057525635,
0.09524164348840714,
-0.2833029329776764,
0.06918026506900787,
0.10627041757106781,
-0.3566010296344757,
-0.08913610875606537,
0.26030680537223816,
-0.0016340732108801603,
-0.425748735666275,
0.5468894839286804,
0.17240485548973083,
0.12868216633796692,
-0.3299410045146942,
-0.0014341416535899043,
-0.3207877278327942,
-0.03450971096754074,
-0.5890920758247375,
0.1126355454325676,
0.1176835373044014,
0.44035446643829346,
0.07392621785402298,
-0.07035461813211441,
0.4031084477901459,
-0.40797150135040283,
0.09923962503671646,
0.3735490143299103,
-0.17344193160533905,
-0.030622584745287895,
-0.4397856593132019,
-0.07384752482175827,
0.04228341951966286,
-0.37432244420051575,
0.2847956717014313,
-0.12820696830749512,
-0.014769630506634712,
0.19237162172794342,
-0.020269667729735374,
0.12265091389417648,
0.06268276274204254,
0.5298790335655212,
-0.09794431179761887,
0.00005469910320243798,
-0.09645382314920425,
0.008634934201836586,
-0.2321903109550476,
0.1219586655497551,
-0.20707805454730988,
0.00857600849121809,
-0.02188819646835327,
0.17337539792060852,
-0.20737430453300476,
-0.3919600546360016,
-0.18153391778469086,
0.41765710711479187,
0.31262990832328796,
-0.41869649291038513,
0.19802717864513397,
0.1526593118906021,
-0.1558281034231186,
0.47959399223327637,
0.15036264061927795,
0.2282840758562088,
0.14673294126987457,
-0.03405112400650978,
-0.3561268746852875,
-0.10542018711566925,
0.6236688494682312,
-0.18829429149627686,
-0.029361853376030922,
-0.34943878650665283,
0.2549011707305908,
0.44379231333732605,
0.551044225692749,
-0.26457661390304565,
0.0862380638718605,
0.12194327265024185,
0.05357404798269272,
-0.21039441227912903,
0.5777595043182373,
0.18686150014400482,
0.01477066520601511,
-0.07378377765417099,
-0.26480770111083984,
-0.06308911740779877,
-0.0029668877832591534,
-0.3532100021839142,
-0.28143084049224854
] |
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.49882426857948303,
-0.26827821135520935,
-0.024500802159309387,
0.12822844088077545,
0.059439767152071,
0.20778393745422363,
0.12146293371915817,
0.424129843711853,
0.2917422652244568,
0.2924969494342804,
-0.11882511526346207,
0.18831509351730347,
0.13721297681331635,
0.08582092076539993,
-0.13625647127628326,
0.17504262924194336,
0.23703262209892273,
0.085334412753582,
0.26079800724983215,
-0.1344141811132431,
-0.3274792730808258,
-0.30906447768211365,
-0.1589120626449585,
-0.25786224007606506,
-0.40069231390953064,
-0.09581870585680008,
-0.24362216889858246,
-0.08205043524503708,
0.1982472836971283,
-0.47291645407676697,
-0.13753260672092438,
0.1398429274559021,
0.3402584493160248,
0.25829294323921204,
-0.00012204971426399425,
0.05567660555243492,
0.22800791263580322,
0.06546296179294586,
-0.22299756109714508,
0.6411958336830139,
0.3400726914405823,
-0.06948840618133545,
-0.17511016130447388,
-0.3107709586620331,
-0.14555539190769196,
-0.1110420823097229,
0.08107972890138626,
-0.046929746866226196,
-0.16636499762535095,
0.19430115818977356,
0.026624053716659546,
-0.05828651040792465,
0.052254825830459595,
-0.015400376170873642,
0.4025115668773651,
-0.0755913034081459,
-0.06917718797922134,
0.31747138500213623,
0.1635129153728485,
-0.07223787903785706,
0.09974309802055359,
0.4481078088283539,
0.1206413134932518,
-0.22677725553512573,
0.10890393704175949,
0.20516155660152435,
0.7838166952133179,
0.02243974804878235,
0.06526792794466019,
0.15266957879066467,
0.015340343117713928,
-0.09055263549089432,
-0.443008691072464,
-0.10290376842021942,
0.4257138669490814,
-0.6180593967437744,
-0.06740126758813858,
-0.08374200016260147,
-0.10147474706172943,
0.05386023595929146,
0.1745855063199997,
-0.030229715630412102,
0.03631801903247833,
0.04745089262723923,
0.17489956319332123,
0.16535739600658417,
0.3874708414077759,
-0.05990241467952728,
0.5584333539009094,
0.04244744032621384,
-0.11685466021299362,
0.04488252475857735,
-0.0920773297548294,
0.012196335010230541,
-0.6050297617912292,
0.08808468282222748,
-0.030915843322873116,
-0.0993313416838646,
-0.09268704801797867,
0.017801953479647636,
-0.3694859743118286,
0.006165648344904184,
0.2365599423646927,
0.0033363497350364923,
-0.18306466937065125,
-0.0902583971619606,
-0.5061047673225403,
0.05588098615407944,
0.08390173316001892,
0.10628709942102432,
-0.3780878484249115,
0.0992341935634613,
-0.0033381283283233643,
-0.0043098581954836845,
-0.32598063349723816,
-0.29813525080680847,
-0.22889026999473572,
0.22280706465244293,
-0.18114228546619415,
0.07718804478645325,
-0.40396830439567566,
-0.2522764801979065,
0.2050725668668747,
0.4162214994430542,
-0.11774410307407379,
-0.07613665610551834,
0.010839437134563923,
-0.03461559861898422,
-0.23442770540714264,
0.17616906762123108,
-0.2220170646905899,
0.230660080909729,
-0.031963787972927094,
0.5045983195304871,
-0.02910623513162136,
-0.22139422595500946,
-0.08906898647546768,
-0.021730657666921616,
0.08396384865045547,
-0.007842419669032097,
-0.04416358843445778,
-0.29989323019981384,
0.24666792154312134,
0.07492318749427795,
-0.26321426033973694,
-0.0676850825548172,
-0.09395191818475723,
0.12111034244298935,
-0.22782327234745026,
0.22150824964046478,
-0.21739467978477478,
-0.36510223150253296,
0.02715788595378399,
0.01933111622929573,
0.3086775839328766,
-0.06309258937835693,
0.4208229184150696,
0.11439721286296844,
0.17301848530769348,
0.16133517026901245,
0.15917645394802094,
-0.13144344091415405,
-0.26802125573158264,
0.08318649977445602,
0.22678394615650177,
0.3627384305000305,
0.09372176229953766,
0.034771163016557693,
0.2980126738548279,
0.3901304304599762,
0.21240505576133728,
0.39999380707740784,
-0.11594892293214798,
0.6762601137161255,
-0.32000401616096497,
0.08429210633039474,
0.2451203614473343,
-0.25537848472595215,
-0.2924264967441559,
0.18690460920333862,
-0.16636402904987335,
-0.07732588797807693,
0.32966315746307373,
0.5182706713676453,
0.31202951073646545,
0.08701563626527786,
0.34109318256378174,
0.30625542998313904,
0.00902649201452732,
-0.031247306615114212,
-0.4050687849521637,
-0.05827170982956886,
0.2639196813106537,
0.3804076910018921,
-0.3354525566101074,
0.10174062848091125,
-0.040181465446949005,
-0.32988062500953674,
0.6009740233421326,
-0.4761059880256653,
-0.12176213413476944,
0.06805813312530518,
0.3615734875202179,
0.33938679099082947,
0.2328696995973587,
0.27611035108566284,
0.14954213798046112,
0.16262602806091309,
0.09601449221372604,
0.09878889471292496,
0.1701553463935852,
-0.4183505177497864,
0.2156297266483307,
-0.02575014904141426,
-0.21819250285625458,
0.10788197070360184,
-0.06097814068198204,
0.15002501010894775,
-0.04567669704556465,
-0.19987307488918304,
-0.15688681602478027,
0.5427840352058411,
-0.615797758102417,
0.027946149930357933,
-0.24889658391475677,
-0.15608298778533936,
0.007015147712081671,
-0.21342599391937256,
-0.0342438630759716,
0.1429586410522461,
0.05249624699354172,
-0.3868664503097534,
-0.053833141922950745,
0.10286086052656174,
0.1266249418258667,
-0.18767639994621277,
0.5111070275306702,
-0.11369612067937851,
-0.037036772817373276,
0.29622212052345276,
0.04495333135128021,
-0.15126502513885498,
0.10901666432619095,
-0.1937614381313324,
-0.0018786939326673746,
0.4852040112018585,
0.348783940076828,
0.24583379924297333,
-0.021493790671229362,
-0.23320843279361725,
0.04702914506196976,
-0.04065045341849327,
-0.07938706129789352,
0.22752587497234344,
0.07994377613067627,
0.13025294244289398,
0.409172385931015,
-0.033335525542497635,
-0.3332445025444031,
0.2324640303850174,
0.18577706813812256,
-0.20312990248203278,
-0.4314081072807312,
0.27104198932647705,
0.3516995310783386,
-0.03689766302704811,
-0.3497084677219391,
-0.5220087170600891,
0.23602674901485443,
0.31859877705574036,
0.18839353322982788,
-0.07165404409170151,
-0.02765103615820408,
-0.24728143215179443,
0.16910947859287262,
0.05655350908637047,
-0.04837210476398468,
0.10004787892103195,
0.17664200067520142,
-0.21454474329948425,
-0.20678988099098206,
-0.2552962005138397,
-0.13639681041240692,
0.4286458492279053,
-0.04433870315551758,
0.30944040417671204,
0.17776265740394592,
0.2771869897842407,
-0.12472452968358994,
-0.1249765008687973,
0.288752019405365,
0.008840441703796387,
0.04161085933446884,
-0.10893554985523224,
-0.03623880445957184,
0.19310900568962097,
-0.04694970324635506,
0.36491888761520386,
0.19579416513442993,
-0.32509055733680725,
0.019844286143779755,
-0.09847083687782288,
-0.12149498611688614,
-0.07897848635911942,
0.12100525945425034,
-0.15055014193058014,
0.11739997565746307,
0.043947670608758926,
-0.05258079990744591,
-0.18513640761375427,
-0.08627132326364517,
-0.1575877070426941,
-0.07947695255279541,
-0.2974512279033661,
-0.1662350296974182,
-0.24606843292713165,
-0.12503769993782043,
-0.11964450776576996,
0.004330579191446304,
0.0005504606524482369,
-0.010686952620744705,
-0.04048753157258034,
-0.2826741635799408,
-0.15883666276931763,
0.06079476326704025,
-0.29363352060317993,
-0.21670202910900116,
-0.17391912639141083,
0.22814130783081055,
-0.024399638175964355,
0.09305882453918457,
-0.11566931754350662,
0.06675166636705399,
0.12224092334508896,
-0.0957009419798851,
-0.1543302685022354,
-0.0534617118537426,
-0.23314307630062103,
0.2917097210884094,
0.14917242527008057,
0.046831462532281876,
-0.0794370248913765,
-0.4122962951660156,
-0.014396958984434605,
0.4969033896923065,
-0.5218711495399475,
-0.040799517184495926,
-0.3583909571170807,
0.2859594225883484,
-0.3150937855243683,
0.458298921585083,
0.05670680105686188,
-0.24624888598918915,
-0.13801392912864685,
0.3644827604293823,
0.17451028525829315,
0.38753044605255127,
-0.06171327456831932,
0.05497738718986511,
-0.08791763335466385,
0.2675449550151825,
-0.11497532576322556,
0.5162416696548462,
0.32723158597946167,
-0.21369847655296326,
-0.047819457948207855,
-0.26239633560180664,
0.11595174670219421,
0.052770111709833145,
-0.13988173007965088,
0.2965240776538849,
0.08347784727811813,
-0.3149952292442322,
0.1665278822183609,
-0.2887440323829651,
-0.4117943346500397,
0.03204244002699852,
-0.0527595579624176,
0.1982455551624298,
-0.24431078135967255,
0.31699225306510925,
0.04895063117146492,
0.49109962582588196,
-0.17805010080337524,
0.29109612107276917,
-0.2383602410554886,
-0.17670398950576782,
0.19751477241516113,
0.2727530002593994,
0.2449011355638504,
-0.16755743324756622,
0.02649645321071148,
-0.5409093499183655,
-0.421677827835083,
0.28344085812568665,
0.16747960448265076,
0.23528353869915009,
0.2791197597980499,
-0.10083501785993576,
0.5258054137229919,
-0.15621203184127808,
0.7999858260154724,
0.0206834077835083,
-0.3363375663757324,
0.38449087738990784,
-0.16181997954845428,
0.052876416593790054,
-0.2177928239107132,
-0.18270893394947052,
-0.06598951667547226,
0.23377379775047302,
0.4407469630241394,
-0.09317754209041595,
-0.24796470999717712,
0.6446051001548767,
0.06708776205778122,
-0.14724837243556976,
-0.3441516160964966,
-0.18618205189704895,
-0.3543059527873993,
-0.041218943893909454,
0.7678550481796265,
-0.12169056385755539,
0.15568961203098297,
0.18221955001354218,
-0.0512346550822258,
-0.3818883001804352,
0.15986619889736176,
0.23867474496364594,
-0.005119742825627327,
0.05058307573199272,
0.4557841718196869,
0.43481042981147766,
0.07141751050949097,
0.0007319067372009158,
0.11927418410778046,
-0.036911290138959885,
-0.3043968677520752,
0.07315223664045334,
-0.1888461410999298,
-0.25568529963493347,
0.379942387342453,
0.7006737589836121,
0.18687668442726135,
0.24840733408927917,
-0.21023090183734894,
0.37758868932724,
-0.1914457231760025,
0.024531112983822823,
0.43831270933151245,
-0.002062194049358368,
-0.17877252399921417,
-0.5383260250091553,
0.31127890944480896,
0.20342282950878143,
0.07330281287431717,
0.060861214995384216,
-0.07573027908802032,
-0.016380347311496735,
0.30217087268829346,
0.1249999925494194,
0.9838243722915649,
-0.02691962942481041,
0.1929832547903061,
0.5063086152076721,
0.004840589128434658,
-0.24390451610088348,
-0.6487342119216919,
0.36927682161331177,
-0.33292126655578613,
-0.2241525799036026,
0.1931164562702179,
-0.10114146769046783,
-0.08476846665143967,
0.07353442162275314,
-0.039342787116765976,
0.09914487600326538,
-0.047275446355342865,
-0.08625619858503342,
-0.25860172510147095,
0.3895537555217743,
0.3151942193508148,
-0.4278399646282196,
0.024883057922124863,
0.0013510254211723804,
0.2714568078517914,
-0.09871600568294525,
0.12781575322151184,
-0.16340012848377228,
-0.11088655889034271,
0.018440984189510345,
0.12517410516738892,
-0.0791136622428894,
-0.12837843596935272,
0.013058449141681194,
-0.04877298325300217,
-0.08731182664632797,
-0.232926145195961,
-0.3244182765483856,
0.46041905879974365,
-0.02994643710553646,
0.09953416138887405,
0.08158383518457413,
-0.09911013394594193,
0.07216362655162811,
-0.08676929026842117,
-0.49708321690559387,
0.22654153406620026,
0.0808124989271164,
-0.17367757856845856,
0.1493709236383438,
0.07872668653726578,
-0.3227713704109192,
-0.1460990458726883,
0.17443028092384338,
0.020577240735292435,
0.007548075169324875,
-0.03673753887414932,
0.31799888610839844,
-0.26263728737831116,
-0.23356527090072632,
0.02005961164832115,
0.09207762032747269,
-0.4317518472671509,
0.5605170130729675,
-0.3023819327354431,
-0.38006824254989624,
-0.054655522108078,
0.016695648431777954,
0.30580800771713257,
0.05603788420557976,
0.26237085461616516,
-0.0891195759177208,
-0.3048812747001648,
-0.15467683970928192,
-0.3024292290210724,
0.061282847076654434,
0.03862520307302475,
0.09388820081949234,
0.3024209439754486,
-0.006131275556981564,
0.02539917454123497,
-0.23266452550888062,
-0.32271745800971985,
-0.14176981151103973,
-0.3823907673358917,
0.1146000474691391,
-0.3576402962207794,
-0.1850680708885193,
0.2572285234928131,
0.3836848735809326,
0.03601778298616409,
0.23422391712665558,
-0.4448952376842499,
0.25904718041419983,
-0.21766971051692963,
-0.06533902883529663,
-0.031239528208971024,
0.2600191831588745,
-0.03270886093378067,
-0.2574276030063629,
0.1754397302865982,
0.2162696272134781,
0.11998913437128067,
0.14120355248451233,
0.03736573085188866,
-0.1117987260222435,
0.10294876247644424,
0.1834249347448349,
-0.11074664443731308,
0.16845057904720306,
0.08115547895431519,
-0.1483059972524643,
-0.3009880781173706,
-0.26529812812805176,
0.13436605036258698,
-0.11070296168327332,
-0.025854986160993576,
-0.13035948574543,
-0.12170922756195068,
-0.11248783767223358,
0.3323768377304077,
0.2738248407840729,
0.2040049135684967,
0.2833092510700226,
-0.07349912077188492,
0.07670185714960098,
-0.242833212018013,
-0.2653929889202118,
-0.05103721097111702,
0.1903247982263565,
0.061643991619348526,
0.08636786043643951,
-0.09186612069606781,
-0.17318780720233917,
-0.3799477815628052,
-0.0381179042160511,
0.03176894411444664,
0.4498938322067261,
0.04249393194913864,
-0.28836652636528015,
0.18529601395130157,
0.037937231361866,
-0.2797204554080963,
-0.1952764391899109,
0.36242690682411194,
-0.45070144534111023,
0.20022888481616974,
0.4017176926136017,
0.264575332403183,
0.16572357714176178,
-0.4832741916179657,
0.09376326948404312,
-0.23451700806617737,
0.09630575776100159,
-0.4337073266506195,
-0.09045102447271347,
0.3514745235443115,
-0.1948997974395752,
0.2041250616312027,
0.3052140772342682,
0.23111993074417114,
0.608918309211731,
0.03142382949590683,
0.27529004216194153,
0.18787717819213867,
0.21332718431949615,
-0.32170340418815613,
-0.17983657121658325,
0.29066896438598633,
0.23226867616176605,
-0.03177293762564659,
-0.20784491300582886,
0.009094808250665665,
0.234734445810318,
0.24403557181358337,
-0.5169647336006165,
-0.2611280381679535,
0.1630207896232605,
-0.12201986461877823,
-0.12818105518817902,
0.41174909472465515,
0.056770458817481995,
-0.27808162569999695,
0.22702665627002716,
0.0776640847325325,
0.19237351417541504,
-0.1272481083869934,
0.2008739858865738,
0.2934538424015045,
0.22120051085948944,
-0.02311350777745247,
0.09102419763803482,
0.43377068638801575,
-0.3367399573326111,
-0.20791500806808472,
-0.011150526814162731,
-0.0027166465297341347,
0.023589380085468292,
-0.15122292935848236,
0.2809459865093231,
0.2448248267173767,
-0.055502988398075104,
0.26872164011001587,
-0.05044205114245415,
-0.008870905265212059,
0.043804269284009933,
-0.03440093994140625,
-0.10841257870197296,
-0.10039348155260086,
0.10061768442392349,
-0.09087688475847244,
-0.12853382527828217,
-0.12072337418794632,
-0.242632657289505,
0.20261327922344208,
-0.180425226688385,
0.023068368434906006,
0.3459426462650299,
-0.09753980487585068,
-0.39480555057525635,
0.09524164348840714,
-0.2833029329776764,
0.06918026506900787,
0.10627041757106781,
-0.3566010296344757,
-0.08913610875606537,
0.26030680537223816,
-0.0016340732108801603,
-0.425748735666275,
0.5468894839286804,
0.17240485548973083,
0.12868216633796692,
-0.3299410045146942,
-0.0014341416535899043,
-0.3207877278327942,
-0.03450971096754074,
-0.5890920758247375,
0.1126355454325676,
0.1176835373044014,
0.44035446643829346,
0.07392621785402298,
-0.07035461813211441,
0.4031084477901459,
-0.40797150135040283,
0.09923962503671646,
0.3735490143299103,
-0.17344193160533905,
-0.030622584745287895,
-0.4397856593132019,
-0.07384752482175827,
0.04228341951966286,
-0.37432244420051575,
0.2847956717014313,
-0.12820696830749512,
-0.014769630506634712,
0.19237162172794342,
-0.020269667729735374,
0.12265091389417648,
0.06268276274204254,
0.5298790335655212,
-0.09794431179761887,
0.00005469910320243798,
-0.09645382314920425,
0.008634934201836586,
-0.2321903109550476,
0.1219586655497551,
-0.20707805454730988,
0.00857600849121809,
-0.02188819646835327,
0.17337539792060852,
-0.20737430453300476,
-0.3919600546360016,
-0.18153391778469086,
0.41765710711479187,
0.31262990832328796,
-0.41869649291038513,
0.19802717864513397,
0.1526593118906021,
-0.1558281034231186,
0.47959399223327637,
0.15036264061927795,
0.2282840758562088,
0.14673294126987457,
-0.03405112400650978,
-0.3561268746852875,
-0.10542018711566925,
0.6236688494682312,
-0.18829429149627686,
-0.029361853376030922,
-0.34943878650665283,
0.2549011707305908,
0.44379231333732605,
0.551044225692749,
-0.26457661390304565,
0.0862380638718605,
0.12194327265024185,
0.05357404798269272,
-0.21039441227912903,
0.5777595043182373,
0.18686150014400482,
0.01477066520601511,
-0.07378377765417099,
-0.26480770111083984,
-0.06308911740779877,
-0.0029668877832591534,
-0.3532100021839142,
-0.28143084049224854
] |
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.011297954246401787,
-0.025898095220327377,
-0.04495936259627342,
0.5074424743652344,
0.1715032309293747,
0.18271680176258087,
0.057955753058195114,
0.1286478340625763,
-0.06289076805114746,
0.13362279534339905,
0.07037336379289627,
0.2955009937286377,
-0.08438046276569366,
-0.10250107944011688,
-0.3257565200328827,
-0.1238994374871254,
0.21246829628944397,
-0.0417843796312809,
-0.1874171495437622,
-0.11637775599956512,
-0.4338988661766052,
0.3035927712917328,
-0.09412902593612671,
0.044132109731435776,
-0.3788500130176544,
-0.12164876610040665,
-0.3139137923717499,
0.36396563053131104,
-0.13143830001354218,
-0.14006373286247253,
0.3840755224227905,
-0.043493423610925674,
0.14314359426498413,
0.4993313252925873,
-0.0001239130215253681,
-0.05184919759631157,
-0.02551581710577011,
-0.12648984789848328,
-0.33739036321640015,
-0.3795106112957001,
-0.29544058442115784,
-0.24935397505760193,
0.11748258769512177,
-0.35154083371162415,
0.3774071931838989,
-0.19620175659656525,
-0.10297437012195587,
-0.7265008091926575,
0.2809564173221588,
0.22954995930194855,
0.07619763910770416,
0.19729401171207428,
0.13170677423477173,
-0.047894034534692764,
0.03191044181585312,
0.07358164340257645,
0.15371659398078918,
0.20296071469783783,
-0.055039770901203156,
0.023870142176747322,
0.19426940381526947,
-0.000548499810975045,
-0.23284880816936493,
-0.11859486252069473,
0.13626335561275482,
0.4979304075241089,
0.05541934818029404,
-0.5291479825973511,
-0.06905663013458252,
0.08632108569145203,
0.4802344739437103,
-0.37638571858406067,
-0.37810128927230835,
-0.1759454309940338,
0.007004177663475275,
-0.32687124609947205,
0.10103000700473785,
0.35458409786224365,
0.0001946522679645568,
0.11180853843688965,
-0.06175012141466141,
-0.03423814848065376,
-0.2941898703575134,
0.07259491086006165,
-0.08510201424360275,
0.03586053103208542,
-0.08588474988937378,
0.17814041674137115,
0.44935333728790283,
0.04795105382800102,
0.3216395080089569,
-0.4869164228439331,
0.06369579583406448,
0.19227154552936554,
-0.10969538986682892,
0.1452183723449707,
-0.16400234401226044,
-0.5908127427101135,
0.006675166077911854,
-0.010949193499982357,
0.18363909423351288,
-0.13482670485973358,
-0.1758417934179306,
0.30220091342926025,
0.25346946716308594,
0.3053894639015198,
-0.014131867326796055,
0.428830087184906,
-0.010318457148969173,
-0.13304544985294342,
0.05013737455010414,
-0.025855230167508125,
-0.02935606613755226,
-0.42265814542770386,
0.07969001680612564,
-0.07181454449892044,
0.10622702538967133,
0.012951653450727463,
-0.3877180814743042,
0.18035583198070526,
-0.28400781750679016,
-0.15731190145015717,
0.09716245532035828,
-0.017804507166147232,
0.0777067318558693,
0.3530092239379883,
0.38763391971588135,
0.3053711950778961,
0.08206728845834732,
0.29787778854370117,
-0.14463573694229126,
0.19673222303390503,
0.07490620017051697,
0.08389794081449509,
0.10684558004140854,
0.001640706555917859,
0.011990521103143692,
0.10677304118871689,
0.07972922176122665,
-0.12206900119781494,
0.027195286005735397,
-0.341692715883255,
0.28219616413116455,
0.15663698315620422,
0.0981631651520729,
0.34808120131492615,
0.25924381613731384,
-0.2748633027076721,
-0.18705607950687408,
0.3995108902454376,
-0.357648104429245,
-0.1869688183069229,
-0.1376318782567978,
0.049473609775304794,
-0.10457174479961395,
0.14100554585456848,
-0.42299363017082214,
-0.0059977020137012005,
0.3018893003463745,
0.30519595742225647,
-0.1290159821510315,
-0.056831348687410355,
-0.12961390614509583,
-0.4591296315193176,
0.34122708439826965,
0.007385002449154854,
-0.4581018090248108,
0.009723780676722527,
0.29037949442863464,
0.10489001125097275,
0.19656145572662354,
0.4308503270149231,
-0.14415840804576874,
0.3636820912361145,
-0.304504930973053,
0.010236366651952267,
0.40045610070228577,
-0.40942227840423584,
-0.10385653376579285,
0.171697199344635,
-0.1796124428510666,
-0.04109174385666847,
0.3645087480545044,
0.027034733444452286,
0.006306729279458523,
0.2094055414199829,
0.7220625877380371,
0.24255923926830292,
0.07466588914394379,
-0.16574111580848694,
-0.09523815661668777,
-0.23260264098644257,
0.3555580675601959,
-0.2086942493915558,
-0.13397930562496185,
-0.025947704911231995,
-0.2588166892528534,
-0.5167703628540039,
0.42400747537612915,
-0.2052067667245865,
0.06406594067811966,
0.43642082810401917,
0.35688072443008423,
-0.12336675077676773,
-0.10384920984506607,
0.15376877784729004,
-0.19341786205768585,
0.16865955293178558,
-0.01483080629259348,
-0.2227093130350113,
-0.2647583484649658,
-0.022049179300665855,
-0.21069428324699402,
0.1269540935754776,
-0.07098044455051422,
0.08144501596689224,
-0.01537423487752676,
0.03250863403081894,
0.005666663404554129,
-0.10544747114181519,
-0.348185658454895,
0.5563709735870361,
-0.16314537823200226,
0.021901847794651985,
-0.25417575240135193,
0.45693841576576233,
-0.15780501067638397,
-0.02639104053378105,
-0.045371126383543015,
0.03693382069468498,
0.27298668026924133,
0.16777938604354858,
0.022781413048505783,
0.47173503041267395,
-0.04300754517316818,
0.09504642337560654,
0.08933860063552856,
0.08084569871425629,
0.17162775993347168,
0.005739906337112188,
0.1627616435289383,
-0.05793618783354759,
0.15583430230617523,
-0.17280377447605133,
-0.09091836959123611,
0.48709261417388916,
-0.3344886600971222,
0.4485848546028137,
0.11464966088533401,
0.051275357604026794,
0.10623862594366074,
0.043970998376607895,
-0.07847504317760468,
-0.23693175613880157,
0.01692204922437668,
0.08496615290641785,
0.21922430396080017,
0.21704263985157013,
-0.3525521159172058,
0.07008375972509384,
0.18291287124156952,
0.07549919188022614,
-0.05896773189306259,
-0.010834144428372383,
-0.1080612912774086,
-0.015997417271137238,
-0.10950198769569397,
0.39029955863952637,
0.5840009450912476,
0.17195439338684082,
0.16498984396457672,
-0.1167304590344429,
-0.137131005525589,
-0.1706053465604782,
0.3417835831642151,
0.1398364007472992,
0.2364145815372467,
0.17288179695606232,
-0.08572512120008469,
-0.07562034577131271,
-0.0717298835515976,
-0.017531365156173706,
-0.19189593195915222,
0.032885145395994186,
-0.5536923408508301,
-0.045890454202890396,
-0.21764878928661346,
-0.10989907383918762,
-0.44819194078445435,
-0.34603843092918396,
-0.09749330580234528,
-0.5419756174087524,
-0.2592167556285858,
0.454741507768631,
-0.11694585531949997,
-0.05278361216187477,
-0.28450000286102295,
0.14566250145435333,
0.005228308495134115,
0.0678616613149643,
0.1234738901257515,
0.010436906479299068,
-0.07831665128469467,
-0.03185237944126129,
-0.13688139617443085,
0.01800188422203064,
-0.013650583103299141,
-0.07263249158859253,
0.25631338357925415,
-0.2595609128475189,
0.06696471571922302,
-0.14675825834274292,
-0.15336087346076965,
0.08496003597974777,
0.032246969640254974,
0.31590670347213745,
-0.22814244031906128,
-0.6266648173332214,
0.05803638696670532,
0.5674740672111511,
-0.13896042108535767,
0.09005469083786011,
0.2620217502117157,
-0.18418551981449127,
0.0017383551457896829,
-0.2506844103336334,
-0.45237860083580017,
-0.25021159648895264,
0.02986345812678337,
-0.17470480501651764,
0.24913251399993896,
0.17127588391304016,
0.26967063546180725,
0.10908166319131851,
0.3577364385128021,
0.19410045444965363,
-0.11353810876607895,
-0.255730539560318,
0.4422731399536133,
-0.05362918972969055,
-0.16427738964557648,
0.0017757342429831624,
0.008876211009919643,
0.07541097700595856,
0.15045954287052155,
-0.3661915957927704,
0.018025537952780724,
-0.2361498922109604,
0.1363368034362793,
-0.11474855989217758,
0.3011989891529083,
0.13400211930274963,
0.45958420634269714,
-0.04627871513366699,
-0.2586548626422882,
-0.27372244000434875,
0.2683786451816559,
0.15892772376537323,
0.3044024705886841,
-0.012301018461585045,
0.20902247726917267,
0.07317038625478745,
0.34391626715660095,
0.36408731341362,
0.1217380240559578,
0.2549828886985779,
0.18364408612251282,
0.5346711277961731,
0.014441060833632946,
-0.44068947434425354,
-0.40770262479782104,
-0.0011521143605932593,
-0.2065868228673935,
-0.13948887586593628,
0.048393525183200836,
0.0872388407588005,
-0.09358668327331543,
0.21181195974349976,
-0.23575091361999512,
-0.30367740988731384,
0.09380316734313965,
-0.3211861550807953,
0.12500008940696716,
-0.21632543206214905,
-0.06795056164264679,
-0.2828485667705536,
0.31942296028137207,
-0.12861187756061554,
0.06002398207783699,
0.21889299154281616,
-0.13556751608848572,
-0.35723328590393066,
-0.3390057682991028,
-0.37770718336105347,
0.30494454503059387,
0.054389581084251404,
0.3831130564212799,
0.053990453481674194,
-0.29078227281570435,
-0.20166891813278198,
0.044948551803827286,
0.7679038047790527,
0.2945113182067871,
-0.37832462787628174,
0.4131023585796356,
0.06765392422676086,
-0.5299780368804932,
-0.03808090090751648,
0.08377530425786972,
0.24248267710208893,
-0.26751068234443665,
0.4022998809814453,
-0.24028819799423218,
-0.1255396455526352,
-0.11067944020032883,
0.4439462125301361,
-0.14297959208488464,
0.08497615903615952,
-0.031319934874773026,
-0.13031169772148132,
-0.15268480777740479,
-0.3208155632019043,
0.054221805185079575,
0.38233551383018494,
-0.3698830008506775,
-0.06262598931789398,
-0.0008341040811501443,
-0.2915797829627991,
0.3242530822753906,
-0.3542225658893585,
0.6015849709510803,
-0.07030424475669861,
0.10906580835580826,
0.2168455868959427,
0.1730603128671646,
0.49148163199424744,
0.4670769274234772,
-0.24435226619243622,
-0.11752844601869583,
0.012657302431762218,
0.09110914915800095,
0.510978102684021,
0.332325279712677,
-0.22255995869636536,
-0.030194463208317757,
0.019420690834522247,
-0.0991327241063118,
-0.27408844232559204,
-0.11630541831254959,
0.2955109775066376,
-0.01052924431860447,
-0.42405447363853455,
-0.3991219699382782,
0.2900097072124481,
0.3583662807941437,
-0.1670624017715454,
0.44181978702545166,
0.008378136903047562,
-0.4729836881160736,
0.34701651334762573,
-0.1212993934750557,
1.0756556987762451,
0.04043477773666382,
0.2828832268714905,
0.16257113218307495,
-0.294295072555542,
0.09040097147226334,
0.29244986176490784,
-0.031874075531959534,
-0.19881047308444977,
-0.12528809905052185,
-0.12034023553133011,
-0.3440372347831726,
0.0014597867848351598,
0.23216299712657928,
-0.3387196958065033,
0.17956137657165527,
-0.5210159420967102,
-0.11619192361831665,
-0.20297124981880188,
0.04733532294631004,
-0.12718278169631958,
-0.2273617535829544,
-0.35341644287109375,
-0.02098635770380497,
0.21435217559337616,
-0.1160489171743393,
-0.018417224287986755,
-0.17292682826519012,
-0.5257242918014526,
-0.1964712142944336,
-0.12852686643600464,
0.040109045803546906,
-0.31982457637786865,
0.6732955574989319,
-0.2941884994506836,
-0.4334101378917694,
-0.43294352293014526,
0.3981276750564575,
0.40856263041496277,
-0.031907547265291214,
0.026282282546162605,
-0.12878873944282532,
0.047580599784851074,
0.008444667793810368,
-0.07515623420476913,
-0.2583678960800171,
0.19397813081741333,
0.14767493307590485,
-0.07459117472171783,
0.11354942619800568,
-0.08174125850200653,
-0.36940672993659973,
-0.08468002080917358,
0.10090002417564392,
0.033948540687561035,
-0.2673566937446594,
-0.3413451910018921,
0.17357662320137024,
-0.06460705399513245,
-0.0645264983177185,
0.023926522582769394,
0.3677728772163391,
-0.06265496462583542,
0.2074289172887802,
-0.21265926957130432,
-0.33768442273139954,
-0.05606910586357117,
0.484371542930603,
0.31312569975852966,
-0.017801033332943916,
0.504768967628479,
-0.036133602261543274,
-0.10059422254562378,
-0.029803168028593063,
0.3686380684375763,
0.2418304681777954,
0.10308803617954254,
0.34313294291496277,
0.08011778444051743,
0.0010799505980685353,
-0.18081043660640717,
0.3765242397785187,
0.39690935611724854,
0.23149383068084717,
-0.09989790618419647,
-0.26651468873023987,
-0.5434694886207581,
0.40343740582466125,
0.036755699664354324,
0.4078214466571808,
-0.028473231941461563,
-0.436443567276001,
-0.09233975410461426,
-0.09556359797716141,
-0.19851389527320862,
0.05727832019329071,
-0.10688705742359161,
0.020285427570343018,
0.2047136425971985,
0.01987033523619175,
0.17789919674396515,
-0.01356324553489685,
0.058011494576931,
-0.19841960072517395,
-0.06346319615840912,
-0.07825127243995667,
0.04765155538916588,
0.1854497790336609,
0.11219975352287292,
-0.07733228802680969,
-0.11239495873451233,
-0.4440902769565582,
0.028665978461503983,
-0.20247113704681396,
-0.17070777714252472,
0.561383843421936,
0.061937399208545685,
0.11616720259189606,
0.00005032238914282061,
0.21005314588546753,
0.01617642492055893,
0.12694261968135834,
0.08198090642690659,
0.22381892800331116,
0.045877594500780106,
0.24382205307483673,
-0.3202715218067169,
-0.2187679260969162,
-0.3172675371170044,
0.05083608999848366,
-0.138719379901886,
-0.03353855013847351,
0.12695419788360596,
-0.14742106199264526,
-0.22267292439937592,
0.03409598767757416,
0.39463892579078674,
0.42783528566360474,
-0.11750715970993042,
0.15835753083229065,
-0.028310898691415787,
0.08342555910348892,
0.12162796407938004,
-0.21428731083869934,
-0.13800998032093048,
-0.19680722057819366,
-0.2094019651412964,
0.1497979462146759,
0.06268114596605301,
-0.08211781084537506,
-0.3396139144897461,
0.025671320036053658,
0.5485680103302002,
-0.16061587631702423,
0.400190144777298,
0.09322935342788696,
0.15086252987384796,
0.00778560247272253,
-0.008948864415287971,
0.24211491644382477,
0.4247482419013977,
-0.05856497585773468,
-0.21446546912193298,
0.09036587178707123,
0.4816087782382965,
-0.1609705537557602,
0.21622802317142487,
-0.230855330824852,
-0.05462074652314186,
0.14992034435272217,
-0.16888423264026642,
-0.011007745750248432,
0.06248052790760994,
0.3620600700378418,
-0.39198216795921326,
-0.2237451821565628,
0.0981600433588028,
0.34357163310050964,
-0.1242571696639061,
-0.1706208884716034,
0.008811618201434612,
-0.2805445194244385,
0.03625116124749184,
-0.18015743792057037,
0.13472750782966614,
-0.3597922623157501,
0.19517841935157776,
-0.027408596128225327,
0.02882167138159275,
-0.1145174503326416,
0.347395658493042,
0.4074494242668152,
0.10724413394927979,
-0.23727354407310486,
-0.010777559131383896,
0.19622260332107544,
-0.04700658470392227,
0.14926031231880188,
0.18950243294239044,
0.5935682058334351,
0.5518577098846436,
-0.03853524848818779,
0.12282853573560715,
0.08626437187194824,
-0.26474881172180176,
0.0007320755976252258,
-0.02691676840186119,
-0.20133723318576813,
-0.38948845863342285,
0.4084107577800751,
0.18079188466072083,
0.009347320534288883,
0.06485693156719208,
0.2460976094007492,
0.588613748550415,
-0.12202214449644089,
0.10538145899772644,
-0.1613059788942337,
-0.23825408518314362,
0.15257975459098816,
-0.0851622074842453,
-0.39698395133018494,
-0.263962060213089,
0.44104719161987305,
-0.07169994711875916,
0.1276211142539978,
0.26292845606803894,
0.03819725289940834,
0.046206824481487274,
0.24468263983726501,
0.29886749386787415,
0.12900197505950928,
-0.4679640829563141,
-0.010986348614096642,
-0.32177478075027466,
-0.21288761496543884,
0.3092111647129059,
0.1748177856206894,
-0.19013136625289917,
0.3667967617511749,
0.16394592821598053,
-0.015823522582650185,
0.24887996912002563,
0.08145245909690857,
-0.16058914363384247,
0.10021542012691498,
-0.41522568464279175,
-0.1393943727016449,
0.3665907680988312,
0.039643630385398865,
-0.05832884460687637,
-0.20681075751781464,
0.19096757471561432,
0.12402356415987015,
0.01279844343662262,
0.02918621338903904,
0.082761250436306,
0.12023760378360748,
0.43338435888290405,
0.289852112531662,
0.1749393492937088,
0.26080939173698425,
-0.12206421047449112,
0.02282186783850193,
0.01822788640856743,
-0.30675697326660156,
-0.044615887105464935,
0.18265081942081451,
-0.08782884478569031,
0.46091949939727783,
-0.5516217350959778,
0.04279084503650665,
-0.11697182804346085,
0.029259895905852318,
-0.0026027250569313765,
-0.468941867351532,
-0.061602190136909485,
0.0664890706539154,
-0.007573333568871021,
-0.025279687717556953,
0.143179789185524,
0.22226372361183167,
0.01591608300805092,
0.5831583142280579,
0.07047330588102341,
-0.446138471364975,
0.4071059823036194,
0.0208620335906744,
-0.11254589259624481,
0.1859319508075714,
-0.008548016659915447,
0.30545979738235474,
0.4251757264137268,
-0.6048347353935242,
-0.18130815029144287,
0.4282563626766205,
-0.2483881562948227,
-0.26721131801605225,
0.009246399626135826,
-0.07833462953567505,
-0.02994167059659958,
0.015382466837763786,
0.49391064047813416,
-0.10249384492635727,
-0.354438453912735,
-0.03021705150604248,
-0.27610206604003906
] |
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.007757666055113077,
-0.007315397262573242,
-0.018826721236109734,
0.5390485525131226,
0.22807568311691284,
0.18429206311702728,
0.05310789868235588,
0.13096661865711212,
-0.05644036829471588,
0.14849811792373657,
0.06288619339466095,
0.23425522446632385,
-0.032504647970199585,
-0.16660575568675995,
-0.32681211829185486,
-0.05976666137576103,
0.23270893096923828,
0.007199419662356377,
-0.07890728861093521,
-0.11945869773626328,
-0.42204201221466064,
0.2971971035003662,
-0.1387292742729187,
-0.05857895687222481,
-0.39545005559921265,
-0.06675543636083603,
-0.4116058647632599,
0.43868309259414673,
-0.1577688753604889,
-0.10152656584978104,
0.5081788897514343,
-0.08628407120704651,
0.12243705242872238,
0.6370719075202942,
-0.00012261152733117342,
-0.030820557847619057,
-0.03247955068945885,
-0.20201633870601654,
-0.27021658420562744,
-0.4532005786895752,
-0.21123307943344116,
-0.2356751561164856,
-0.04479502514004707,
-0.3365784287452698,
0.2640663981437683,
-0.07353062182664871,
-0.11247367411851883,
-0.7267846465110779,
0.1495838314294815,
0.2615775465965271,
0.07585423439741135,
0.20239348709583282,
0.04125510901212692,
-0.01154643390327692,
-0.003460837993770838,
0.1429174691438675,
0.14699828624725342,
0.16674236953258514,
-0.0944770947098732,
-0.06066594272851944,
0.20734624564647675,
-0.07519926875829697,
-0.3042546808719635,
0.013134840875864029,
0.11429578065872192,
0.4793723225593567,
-0.05994164198637009,
-0.43401873111724854,
-0.0781598687171936,
-0.02286127395927906,
0.46043264865875244,
-0.3695722222328186,
-0.3713536858558655,
-0.10616278648376465,
0.04839116707444191,
-0.28981637954711914,
0.13515223562717438,
0.38069218397140503,
-0.02663755789399147,
0.10822314023971558,
-0.21355833113193512,
0.009028904139995575,
-0.252833753824234,
-0.04397385194897652,
-0.13084444403648376,
-0.051733579486608505,
-0.0689103752374649,
0.1527518928050995,
0.42635583877563477,
0.12468316406011581,
0.33698874711990356,
-0.5939992666244507,
0.024772197008132935,
0.2136668860912323,
-0.2035798728466034,
0.07589540630578995,
-0.02319275215268135,
-0.42144227027893066,
0.017854832112789154,
-0.049541864544153214,
0.21948350965976715,
-0.12944580614566803,
-0.1592090129852295,
0.2647930681705475,
0.1793379932641983,
0.4705994427204132,
-0.030680298805236816,
0.4814178943634033,
0.05611669272184372,
-0.124871164560318,
-0.016485149040818214,
0.022042714059352875,
-0.010734154842793941,
-0.28092724084854126,
0.1725064367055893,
-0.037634775042533875,
0.05129365622997284,
0.017245929688215256,
-0.4902621805667877,
0.1722743958234787,
-0.2627790868282318,
-0.15794992446899414,
0.13755248486995697,
-0.03582165017724037,
0.02475132793188095,
0.39583590626716614,
0.3578869104385376,
0.338594913482666,
0.07730768620967865,
0.33625873923301697,
-0.17574714124202728,
0.2379208356142044,
0.061454348266124725,
0.11290048062801361,
0.2048763632774353,
-0.026817243546247482,
-0.03242945671081543,
0.06690873950719833,
0.019686704501509666,
-0.06309254467487335,
0.007189350668340921,
-0.4055667817592621,
0.2116442173719406,
0.14684046804904938,
0.16558656096458435,
0.33858978748321533,
0.313498318195343,
-0.34763187170028687,
-0.13638602197170258,
0.3720194399356842,
-0.39016857743263245,
-0.1624978482723236,
-0.06086612120270729,
0.06833654642105103,
-0.1990797370672226,
0.08224177360534668,
-0.4669089615345001,
0.005926460027694702,
0.28047341108322144,
0.31465473771095276,
-0.21051374077796936,
-0.03115064464509487,
-0.2271655797958374,
-0.44722315669059753,
0.3580998480319977,
0.04109557718038559,
-0.43936681747436523,
0.03181003779172897,
0.26595667004585266,
0.11682743579149246,
0.21341896057128906,
0.4657851457595825,
-0.01832076720893383,
0.4720539152622223,
-0.3376358449459076,
-0.012589866295456886,
0.34187987446784973,
-0.4551289975643158,
-0.17263665795326233,
0.2068520039319992,
-0.17117606103420258,
-0.010898771695792675,
0.3100951015949249,
0.04501819983124733,
-0.012449373491108418,
0.23870185017585754,
0.7105070352554321,
0.3106863796710968,
-0.036810290068387985,
-0.05912090092897415,
-0.12826108932495117,
-0.179166778922081,
0.36018621921539307,
-0.13051395118236542,
-0.07173965871334076,
0.12584668397903442,
-0.24187058210372925,
-0.4316971004009247,
0.3587989807128906,
-0.2525397539138794,
0.05637608468532562,
0.4634280800819397,
0.3992076516151428,
-0.15215235948562622,
-0.109336256980896,
0.07024753093719482,
-0.17555955052375793,
0.24096639454364777,
0.03808110952377319,
-0.1411438286304474,
-0.28924381732940674,
0.04923572018742561,
-0.1995348483324051,
0.07208386808633804,
-0.10834164917469025,
0.03091868944466114,
0.011054961942136288,
0.1900499165058136,
0.020237550139427185,
-0.1286933571100235,
-0.24561424553394318,
0.6411566138267517,
-0.08214379101991653,
-0.012617253698408604,
-0.17107313871383667,
0.5629542469978333,
-0.22423291206359863,
-0.09496748447418213,
-0.0774521604180336,
-0.004756994545459747,
0.2522278130054474,
0.11733666807413101,
0.019238360226154327,
0.4581300616264343,
-0.029352521523833275,
0.0652100071310997,
0.16460049152374268,
-0.001537568517960608,
0.15870290994644165,
0.09264051914215088,
0.16910775005817413,
-0.03223702311515808,
0.2578331530094147,
-0.23279288411140442,
-0.11629266291856766,
0.3702288568019867,
-0.3233276605606079,
0.40825214982032776,
0.12171938270330429,
-0.051772043108940125,
0.1363522857427597,
0.05886226147413254,
0.002976595191285014,
-0.15291108191013336,
0.0995618924498558,
0.15318487584590912,
0.22259865701198578,
0.21187281608581543,
-0.304670125246048,
-0.012798733077943325,
0.25712788105010986,
0.03718807175755501,
0.00532169034704566,
0.01515178382396698,
-0.05272906273603439,
-0.1384250372648239,
-0.20079603791236877,
0.35415884852409363,
0.7381991744041443,
0.11672051250934601,
0.1836727261543274,
-0.0615905337035656,
-0.156594917178154,
-0.11441416293382645,
0.29586949944496155,
0.13836656510829926,
0.1884901374578476,
0.28366905450820923,
0.005192986223846674,
-0.0268549844622612,
-0.13139082491397858,
0.005278846248984337,
-0.14500883221626282,
0.054979316890239716,
-0.518707275390625,
-0.035422589629888535,
-0.19692248106002808,
-0.06886482238769531,
-0.38410207629203796,
-0.3000257909297943,
-0.09576602280139923,
-0.5155738592147827,
-0.2982622981071472,
0.48320433497428894,
0.034070342779159546,
-0.10171862691640854,
-0.21684087812900543,
0.18968024849891663,
0.04251282289624214,
-0.06580280512571335,
0.09002510458230972,
-0.002025364199653268,
-0.11744582653045654,
-0.019323179498314857,
-0.1849120408296585,
-0.06448009610176086,
0.02721238322556019,
-0.17597952485084534,
0.2759290039539337,
-0.32467392086982727,
0.0726151391863823,
-0.14266356825828552,
-0.2029588222503662,
0.17345476150512695,
0.07797810435295105,
0.28038644790649414,
-0.20353250205516815,
-0.592438280582428,
0.1457236260175705,
0.5013505816459656,
-0.18691854178905487,
0.165806844830513,
0.2946104109287262,
-0.21109724044799805,
-0.07000264525413513,
-0.21698853373527527,
-0.3874443769454956,
-0.2615772783756256,
-0.07837498933076859,
-0.19658029079437256,
0.1751646101474762,
0.092607781291008,
0.19319188594818115,
0.12709729373455048,
0.36306232213974,
0.16439615190029144,
-0.15373733639717102,
-0.3676389455795288,
0.4445556700229645,
0.005461457651108503,
-0.18836918473243713,
-0.02984987013041973,
0.007579904515296221,
0.11898134648799896,
0.17033711075782776,
-0.37106722593307495,
-0.02094952203333378,
-0.2660009264945984,
0.13245773315429688,
-0.09867540001869202,
0.320501446723938,
0.14834095537662506,
0.3702242076396942,
-0.027901101857423782,
-0.27776265144348145,
-0.33893492817878723,
0.18721167743206024,
0.24472974240779877,
0.3925762474536896,
-0.08071151375770569,
0.27426016330718994,
0.14448416233062744,
0.32118549942970276,
0.3186562955379486,
0.07069851458072662,
0.36181890964508057,
0.20494206249713898,
0.5604655742645264,
-0.041033875197172165,
-0.5407702326774597,
-0.3021301329135895,
-0.05445060506463051,
-0.2745860815048218,
-0.04566371813416481,
0.039516713470220566,
0.02548597753047943,
-0.17167769372463226,
0.13947920501232147,
-0.20764698088169098,
-0.21673181653022766,
0.04676163196563721,
-0.26574477553367615,
0.1350400596857071,
-0.16394077241420746,
-0.04099418222904205,
-0.29675132036209106,
0.29640376567840576,
-0.16156411170959473,
0.12787453830242157,
0.2145496904850006,
-0.077827088534832,
-0.39574992656707764,
-0.34474050998687744,
-0.41164180636405945,
0.32739654183387756,
0.11218150705099106,
0.3608628511428833,
0.0535268671810627,
-0.2476406693458557,
-0.2672666609287262,
0.00018947941134683788,
0.8296083807945251,
0.285965234041214,
-0.35049086809158325,
0.42407867312431335,
-0.0052012852393090725,
-0.4869096577167511,
-0.06993141025304794,
0.06518971920013428,
0.19532795250415802,
-0.3118864595890045,
0.4359980821609497,
-0.2213549017906189,
-0.021482981741428375,
-0.12375453114509583,
0.500230610370636,
-0.1325320154428482,
0.029593415558338165,
-0.1533937156200409,
-0.21133367717266083,
-0.10274169594049454,
-0.2540701925754547,
-0.013713328167796135,
0.451271116733551,
-0.3278297483921051,
-0.014841200783848763,
0.01401397306472063,
-0.28254351019859314,
0.35526755452156067,
-0.37860211730003357,
0.5898546576499939,
-0.08378329873085022,
0.14618517458438873,
0.0838904082775116,
0.13584625720977783,
0.39028364419937134,
0.4980376362800598,
-0.2678968906402588,
-0.08986367285251617,
0.05806729197502136,
0.04524360969662666,
0.469269335269928,
0.2317836582660675,
-0.20595522224903107,
-0.1364583969116211,
-0.09805301576852798,
-0.08072972297668457,
-0.34476298093795776,
-0.048269122838974,
0.345511794090271,
0.046646345406770706,
-0.38985055685043335,
-0.34838077425956726,
0.23343883454799652,
0.3130781948566437,
-0.10071944445371628,
0.3356812596321106,
0.006423824466764927,
-0.4863872826099396,
0.30603769421577454,
-0.16928249597549438,
0.96952223777771,
0.06907053291797638,
0.28582361340522766,
0.20723050832748413,
-0.21423153579235077,
0.061458855867385864,
0.25369906425476074,
0.08112753182649612,
-0.15403924882411957,
-0.2758867144584656,
-0.12875394523143768,
-0.3111579716205597,
0.039787355810403824,
0.28403833508491516,
-0.3629774749279022,
0.3248738944530487,
-0.40894216299057007,
-0.12133648991584778,
-0.1199788972735405,
0.05675318464636803,
-0.11757318675518036,
-0.16752365231513977,
-0.3534541428089142,
0.019321823492646217,
0.1732371598482132,
0.011388531886041164,
-0.009167427197098732,
-0.04199916869401932,
-0.4983079135417938,
-0.21196426451206207,
-0.12966325879096985,
0.12950462102890015,
-0.2722187638282776,
0.6612726449966431,
-0.36077240109443665,
-0.4087214171886444,
-0.4596441984176636,
0.3534539043903351,
0.44689786434173584,
-0.04067661240696907,
0.02037961594760418,
-0.09411857277154922,
-0.004010490141808987,
0.13472484052181244,
0.014861302450299263,
-0.2953513264656067,
0.19343897700309753,
0.16358625888824463,
-0.058704301714897156,
-0.0635407418012619,
-0.0726570263504982,
-0.34421178698539734,
-0.09352760016918182,
0.05916218459606171,
-0.002229714300483465,
-0.20736859738826752,
-0.3623814880847931,
0.17808428406715393,
0.029074467718601227,
-0.06666143238544464,
0.0257021002471447,
0.3393508791923523,
-0.05074484646320343,
0.31585216522216797,
-0.3541826903820038,
-0.3773806393146515,
-0.07397059351205826,
0.5312650203704834,
0.2242584079504013,
-0.05627446249127388,
0.41269469261169434,
-0.07747508585453033,
-0.12033357471227646,
-0.002246030606329441,
0.3146800994873047,
0.15221600234508514,
0.21072830259799957,
0.3843657374382019,
-0.018637889996170998,
-0.003637257032096386,
-0.09690648317337036,
0.3600209057331085,
0.3548288941383362,
0.18591579794883728,
-0.08421365171670914,
-0.27101436257362366,
-0.49225345253944397,
0.3682185709476471,
0.10366187989711761,
0.3379027843475342,
0.04384363070130348,
-0.352238267660141,
0.0508226603269577,
-0.13911141455173492,
-0.19266773760318756,
0.012873530387878418,
-0.20974929630756378,
0.04218138009309769,
0.22381016612052917,
-0.016576183959841728,
0.18556883931159973,
0.04482143372297287,
0.07286600023508072,
-0.1860189139842987,
-0.005239242222160101,
-0.08832798898220062,
0.09312568604946136,
0.18739265203475952,
0.1110863909125328,
0.011904017068445683,
-0.005746257025748491,
-0.46616870164871216,
0.02589249610900879,
-0.24653179943561554,
-0.09445299953222275,
0.5793569684028625,
0.017571931704878807,
0.1690879613161087,
-0.019627567380666733,
0.21369625627994537,
0.06169908493757248,
0.07638905942440033,
-0.0025380891747772694,
0.12159128487110138,
0.0036705853417515755,
0.23053893446922302,
-0.2393224537372589,
-0.1587931513786316,
-0.3834434151649475,
-0.023367319256067276,
-0.11168229579925537,
0.00981605239212513,
0.22927340865135193,
-0.1504141092300415,
-0.14842526614665985,
-0.012473535723984241,
0.3728411793708801,
0.3538389205932617,
-0.15880537033081055,
0.13642427325248718,
-0.07169200479984283,
0.08650902658700943,
0.04926067218184471,
-0.2904600501060486,
-0.19477993249893188,
-0.22925975918769836,
-0.21078096330165863,
0.1381397247314453,
-0.008870103396475315,
-0.014932459220290184,
-0.4017888307571411,
-0.01009900588542223,
0.7563079595565796,
-0.14199337363243103,
0.2795637249946594,
0.046181198209524155,
0.09027792513370514,
0.050569698214530945,
0.032693877816200256,
0.14083603024482727,
0.30301815271377563,
0.06406226009130478,
-0.10837385803461075,
0.1676551252603531,
0.38233041763305664,
-0.12803028523921967,
0.26090556383132935,
-0.17992612719535828,
-0.008866088464856148,
0.1120496392250061,
-0.13184590637683868,
-0.027541587129235268,
0.05118970200419426,
0.17710255086421967,
-0.517402172088623,
-0.14643403887748718,
0.007996121421456337,
0.30081307888031006,
-0.13595078885555267,
-0.13517959415912628,
0.07498663663864136,
-0.27329665422439575,
0.048955608159303665,
-0.1438186913728714,
0.1196199432015419,
-0.2969890832901001,
0.15138737857341766,
-0.05449549853801727,
-0.04239172488451004,
-0.04714810848236084,
0.2694109082221985,
0.3872373104095459,
0.05995728075504303,
-0.2542600631713867,
0.009973347187042236,
0.2114083617925644,
-0.05446749925613403,
0.13912464678287506,
0.2713523209095001,
0.5723231434822083,
0.5754199624061584,
0.02243235893547535,
0.08439694344997406,
0.04272238910198212,
-0.2839961349964142,
-0.04375791549682617,
0.06508660316467285,
-0.33341291546821594,
-0.37430673837661743,
0.33299872279167175,
0.19228877127170563,
0.01427697017788887,
0.06683539599180222,
0.21608392894268036,
0.5071805119514465,
-0.222914919257164,
0.23553548753261566,
-0.19778640568256378,
-0.2077813744544983,
0.10370627790689468,
0.013859612867236137,
-0.3823937773704529,
-0.20689724385738373,
0.34321796894073486,
-0.0100480355322361,
0.16536515951156616,
0.19606909155845642,
0.04516131058335304,
0.061803705990314484,
0.19468924403190613,
0.2713276147842407,
0.008570874109864235,
-0.4885701835155487,
-0.014843177981674671,
-0.41344398260116577,
-0.17253151535987854,
0.37903186678886414,
0.1948205977678299,
-0.26888611912727356,
0.4094076454639435,
0.13882224261760712,
-0.06945834308862686,
0.16298675537109375,
0.16212020814418793,
-0.1625235676765442,
0.05186644196510315,
-0.43638136982917786,
-0.19063498079776764,
0.20932617783546448,
-0.033198099583387375,
-0.06536193192005157,
-0.31892627477645874,
0.18697166442871094,
0.16553685069084167,
0.040678393095731735,
-0.008566481992602348,
0.08489877730607986,
0.17786477506160736,
0.4394781291484833,
0.22910115122795105,
0.19874949753284454,
0.3351501524448395,
-0.12798026204109192,
-0.007993606850504875,
-0.018061378970742226,
-0.2785053253173828,
-0.09732335805892944,
0.0944775715470314,
-0.12414764612913132,
0.4446903467178345,
-0.5122811794281006,
0.09188944846391678,
-0.15928134322166443,
0.015487993136048317,
0.07139814645051956,
-0.3703899681568146,
-0.14539973437786102,
0.03969478979706764,
-0.03676903247833252,
0.012751991860568523,
0.158624529838562,
0.22623330354690552,
0.04521777108311653,
0.5562227368354797,
0.017278848215937614,
-0.44418540596961975,
0.3679264783859253,
0.1131613478064537,
-0.1632419228553772,
0.09266628324985504,
-0.054183393716812134,
0.17214806377887726,
0.3824462294578552,
-0.5713045001029968,
-0.1840982437133789,
0.44924259185791016,
-0.21794261038303375,
-0.32804062962532043,
0.07558518648147583,
-0.10196257382631302,
0.04619951918721199,
-0.007967847399413586,
0.35824379324913025,
-0.13225041329860687,
-0.32583922147750854,
0.05536660924553871,
-0.1872069388628006
] |
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.0903853103518486,
-0.0803101435303688,
-0.021714722737669945,
0.42966046929359436,
0.21229062974452972,
0.26673153042793274,
0.04071652144193649,
0.17951634526252747,
-0.07189302146434784,
0.1746957004070282,
-0.0009913422400131822,
0.1995583027601242,
-0.0881771445274353,
-0.0326920747756958,
-0.34390535950660706,
-0.0558384545147419,
0.1930520385503769,
0.018710752949118614,
-0.10415798425674438,
0.009861507453024387,
-0.444235235452652,
0.2436521351337433,
-0.15522034466266632,
-0.035929352045059204,
-0.31147313117980957,
-0.0647420734167099,
-0.358011394739151,
0.3418426215648651,
-0.11531145125627518,
-0.12061198800802231,
0.5508385896682739,
-0.04775390401482582,
0.08698643743991852,
0.5565169453620911,
-0.00011674216511892155,
-0.005871452856808901,
-0.03981192037463188,
-0.15968400239944458,
-0.24129830300807953,
-0.4698685109615326,
-0.2993326485157013,
-0.24015668034553528,
-0.02135603502392769,
-0.2968687415122986,
0.20866183936595917,
-0.186007559299469,
-0.10971789807081223,
-0.718521237373352,
0.2358154058456421,
0.21942397952079773,
0.13161629438400269,
0.16060523688793182,
0.15903230011463165,
-0.053723081946372986,
0.006094228010624647,
0.06041363999247551,
0.17726092040538788,
0.17952051758766174,
-0.12992753088474274,
-0.035863425582647324,
0.264275461435318,
-0.006864074617624283,
-0.38686275482177734,
-0.054220739752054214,
0.1337350457906723,
0.4457707107067108,
0.09421072155237198,
-0.45611533522605896,
-0.14772558212280273,
0.07523081451654434,
0.42001593112945557,
-0.3262958526611328,
-0.3272229731082916,
-0.0913664698600769,
0.09714169055223465,
-0.38585683703422546,
0.11834482103586197,
0.36937984824180603,
0.06398177146911621,
0.1274227648973465,
-0.21282990276813507,
-0.08891355246305466,
-0.189578577876091,
0.006588374264538288,
-0.11501175910234451,
0.02189001999795437,
-0.021095190197229385,
0.16465674340724945,
0.5099678635597229,
-0.032512616366147995,
0.41557079553604126,
-0.5363280773162842,
0.047603119164705276,
0.18976740539073944,
-0.19912150502204895,
0.035990454256534576,
-0.08571195602416992,
-0.5460634827613831,
0.07068651914596558,
-0.181073859333992,
0.11627507209777832,
-0.11603812873363495,
-0.16028542816638947,
0.3259335160255432,
0.18679915368556976,
0.4233536422252655,
0.045959122478961945,
0.5026444792747498,
0.034294597804546356,
-0.08021716773509979,
0.06442847102880478,
0.05240587517619133,
0.07192770391702652,
-0.36686280369758606,
0.09573525935411453,
0.015341498889029026,
0.11431574076414108,
0.0008163165184669197,
-0.42452195286750793,
0.12773507833480835,
-0.2855323553085327,
-0.08480769395828247,
0.05695967748761177,
-0.07957439869642258,
0.04663646221160889,
0.39950695633888245,
0.38964203000068665,
0.3132680058479309,
0.07838356494903564,
0.25040972232818604,
-0.17763864994049072,
0.1767178624868393,
0.14199991524219513,
0.12403158098459244,
0.15263396501541138,
-0.0639878511428833,
-0.0817171037197113,
0.19196771085262299,
-0.0037850579246878624,
0.014207666739821434,
0.0226847305893898,
-0.35948118567466736,
0.19063299894332886,
0.1651124209165573,
0.10700367391109467,
0.26703760027885437,
0.30681008100509644,
-0.35123690962791443,
-0.1848161667585373,
0.3993566632270813,
-0.4019359350204468,
-0.16006825864315033,
-0.14834178984165192,
0.11776886880397797,
-0.11065348982810974,
0.09295179694890976,
-0.43059301376342773,
0.10366471856832504,
0.28925055265426636,
0.2214408665895462,
-0.255033403635025,
-0.10515694320201874,
-0.2563724219799042,
-0.38794565200805664,
0.307394802570343,
-0.05010879784822464,
-0.43175914883613586,
-0.00851372443139553,
0.2673156261444092,
0.1099049374461174,
0.2351314127445221,
0.46620261669158936,
-0.07820947468280792,
0.3340339958667755,
-0.26278558373451233,
-0.09792965650558472,
0.16989833116531372,
-0.3320310413837433,
-0.1988215446472168,
0.1342199444770813,
-0.15351396799087524,
0.03503236174583435,
0.19879400730133057,
0.04357610270380974,
0.02851991169154644,
0.249815434217453,
0.7739899754524231,
0.31666120886802673,
-0.03809702768921852,
-0.11918742209672928,
-0.15316176414489746,
-0.26662158966064453,
0.46612638235092163,
-0.1315007507801056,
-0.14166435599327087,
0.09884946048259735,
-0.37251609563827515,
-0.39757436513900757,
0.34727510809898376,
-0.2832825779914856,
0.0636296421289444,
0.4213290214538574,
0.3263687491416931,
-0.18171647191047668,
-0.1018906906247139,
0.024623604491353035,
-0.20542867481708527,
0.1895037591457367,
-0.03356662765145302,
-0.10182033479213715,
-0.22666257619857788,
-0.05870048701763153,
-0.16730162501335144,
0.01874043047428131,
-0.05389763042330742,
0.1412987858057022,
0.03920336440205574,
0.014167819172143936,
-0.07188273221254349,
-0.10226075351238251,
-0.26739534735679626,
0.5654740333557129,
-0.09033319354057312,
0.038302741944789886,
-0.25484699010849,
0.47973108291625977,
-0.16872406005859375,
-0.04234616830945015,
-0.025789404287934303,
-0.007185149006545544,
0.2499663531780243,
0.09860990196466446,
-0.006040769629180431,
0.4919341206550598,
-0.09367374330759048,
0.011919740587472916,
0.0779169499874115,
0.015920069068670273,
0.22719277441501617,
0.017850246280431747,
0.07698498666286469,
0.005622078664600849,
0.12916526198387146,
-0.18703420460224152,
-0.07958056032657623,
0.42451193928718567,
-0.36679786443710327,
0.3369198739528656,
0.03146320581436157,
0.08698946237564087,
0.214921772480011,
-0.02004469744861126,
-0.032752156257629395,
-0.23529990017414093,
0.018013212829828262,
0.007793773896992207,
0.05984732508659363,
0.15973882377147675,
-0.32710495591163635,
-0.050254933536052704,
0.137006938457489,
0.04359200969338417,
-0.00815946701914072,
0.04763496667146683,
-0.07929875701665878,
-0.07755900174379349,
-0.14224515855312347,
0.2626616954803467,
0.5957340002059937,
0.20514115691184998,
0.09334145486354828,
0.03013196960091591,
-0.1562047004699707,
-0.04628533869981766,
0.31240686774253845,
0.1212165504693985,
0.19402705132961273,
0.21944190561771393,
-0.013891834765672684,
-0.022664809599518776,
-0.07246430218219757,
0.05752313509583473,
-0.1133960634469986,
0.11805305629968643,
-0.5014937520027161,
-0.09627247601747513,
-0.3015749156475067,
-0.10217359662055969,
-0.3828297257423401,
-0.300468385219574,
-0.19739703834056854,
-0.48387593030929565,
-0.26154187321662903,
0.4586673080921173,
-0.059023916721343994,
0.038206592202186584,
-0.12701737880706787,
0.16831329464912415,
0.07200492173433304,
0.0265385489910841,
0.15589001774787903,
-0.02167297527194023,
-0.058319054543972015,
0.044499702751636505,
-0.07785743474960327,
-0.06224715709686279,
0.059110578149557114,
-0.12175047397613525,
0.21774467825889587,
-0.2410196214914322,
0.03858635574579239,
-0.15009529888629913,
-0.18275761604309082,
0.09934276342391968,
0.0969478189945221,
0.29070210456848145,
-0.2663252055644989,
-0.5855745673179626,
0.12328457832336426,
0.5215250849723816,
-0.12665724754333496,
0.17300496995449066,
0.2626034915447235,
-0.18298065662384033,
-0.079832062125206,
-0.2237948775291443,
-0.3680776059627533,
-0.2371440976858139,
-0.07980813086032867,
-0.25926342606544495,
0.24727262556552887,
0.09903157502412796,
0.26495012640953064,
0.08202382922172546,
0.36541134119033813,
0.10077352821826935,
-0.14460468292236328,
-0.28783634305000305,
0.38860616087913513,
-0.008441108278930187,
-0.17906054854393005,
0.006531058344990015,
-0.005005137529224157,
0.08627522736787796,
0.16645528376102448,
-0.37018367648124695,
-0.009542985819280148,
-0.18042801320552826,
0.0963539406657219,
-0.13262216746807098,
0.2878189980983734,
0.11168041080236435,
0.48468664288520813,
-0.053226448595523834,
-0.13801424205303192,
-0.31442126631736755,
0.1558961719274521,
0.19220593571662903,
0.38164815306663513,
-0.04301390424370766,
0.27229785919189453,
0.06883235275745392,
0.2513546943664551,
0.3474905788898468,
0.10603161156177521,
0.22027046978473663,
0.2680480480194092,
0.46714431047439575,
-0.06796830892562866,
-0.5600993037223816,
-0.3960492014884949,
-0.020785916596651077,
-0.207926407456398,
-0.09208019822835922,
-0.03029860183596611,
0.00460589537397027,
-0.14374718070030212,
0.15224948525428772,
-0.1051037609577179,
-0.23451313376426697,
0.08896119892597198,
-0.297952800989151,
0.17423966526985168,
-0.14621146023273468,
-0.11231378465890884,
-0.31724855303764343,
0.23380371928215027,
-0.16210758686065674,
0.007230397313833237,
0.18262599408626556,
-0.14775361120700836,
-0.39485523104667664,
-0.30195558071136475,
-0.4231875538825989,
0.42840775847435,
0.09401165693998337,
0.36003732681274414,
0.10299070924520493,
-0.2116030603647232,
-0.3140146732330322,
0.06446181982755661,
0.7793229818344116,
0.24288402497768402,
-0.47935670614242554,
0.4762115180492401,
0.04866110533475876,
-0.5282110571861267,
-0.0892101377248764,
0.07767427712678909,
0.17030438780784607,
-0.2709621787071228,
0.5176334381103516,
-0.23959849774837494,
0.00781690701842308,
-0.05451382324099541,
0.5147520303726196,
-0.17008329927921295,
0.06288789212703705,
-0.08555980771780014,
-0.23723918199539185,
-0.1355614811182022,
-0.24215689301490784,
-0.007106492295861244,
0.5239639282226562,
-0.29325518012046814,
-0.00722056720405817,
-0.04059987515211105,
-0.2700952887535095,
0.4007333517074585,
-0.385030061006546,
0.5835527181625366,
-0.0071736834943294525,
0.15688630938529968,
0.17162062227725983,
0.150517076253891,
0.3474331498146057,
0.48528388142585754,
-0.23800620436668396,
-0.13810664415359497,
-0.018534330651164055,
0.12233805656433105,
0.4762546420097351,
0.232466921210289,
-0.12017542123794556,
-0.004802065901458263,
-0.03424624353647232,
0.01781785488128662,
-0.3697010278701782,
-0.06575942784547806,
0.2507535517215729,
0.028016971424221992,
-0.4654092788696289,
-0.43135809898376465,
0.20426274836063385,
0.31027019023895264,
-0.12458232045173645,
0.3593561053276062,
-0.03234262019395828,
-0.47025951743125916,
0.3982970416545868,
-0.11627209931612015,
0.9791232943534851,
-0.06791601330041885,
0.19780950248241425,
0.12638217210769653,
-0.1889854520559311,
0.16857755184173584,
0.28588977456092834,
0.1136947050690651,
-0.2019079476594925,
-0.29073503613471985,
-0.1255357265472412,
-0.26937222480773926,
0.04917608201503754,
0.23886601626873016,
-0.44256678223609924,
0.2669604420661926,
-0.4332694709300995,
-0.09902776032686234,
-0.17758721113204956,
0.06578822433948517,
-0.03416716307401657,
-0.21733368933200836,
-0.3752554953098297,
0.06146447733044624,
0.08799008280038834,
-0.11095818132162094,
0.008018377237021923,
-0.06335415691137314,
-0.3858080506324768,
-0.13351663947105408,
-0.11016929149627686,
0.09765839576721191,
-0.19913095235824585,
0.765714168548584,
-0.38438260555267334,
-0.3101261556148529,
-0.3907928466796875,
0.25890010595321655,
0.4397601783275604,
0.002420383971184492,
0.050885140895843506,
-0.13276146352291107,
0.016540516167879105,
0.04228390380740166,
-0.012544302269816399,
-0.24536336958408356,
0.18643294274806976,
0.18573147058486938,
-0.12046467512845993,
0.0721946582198143,
0.024608949199318886,
-0.34901759028434753,
-0.11420515179634094,
0.002914698328822851,
-0.009468305855989456,
-0.29980000853538513,
-0.364050030708313,
0.17906850576400757,
0.14275038242340088,
-0.06081951782107353,
0.06683477014303207,
0.3294079005718231,
-0.05389213189482689,
0.27579036355018616,
-0.3172314167022705,
-0.34271240234375,
-0.09654843062162399,
0.5646893978118896,
0.36274126172065735,
-0.02367076463997364,
0.4135940372943878,
-0.03953324630856514,
-0.07016785442829132,
-0.016143212094902992,
0.3499983847141266,
0.15116529166698456,
0.20371100306510925,
0.4430515468120575,
0.010172158479690552,
-0.010912065394222736,
-0.18156862258911133,
0.36286529898643494,
0.3714286983013153,
0.2277034968137741,
-0.042089272290468216,
-0.16466385126113892,
-0.5605289340019226,
0.3672232925891876,
0.15998698770999908,
0.365121990442276,
0.08181840926408768,
-0.3125770688056946,
-0.1021241545677185,
-0.08958614617586136,
-0.25438591837882996,
0.02886970341205597,
-0.17905057966709137,
0.03819296881556511,
0.1982564628124237,
-0.04077759012579918,
0.13134710490703583,
-0.052727337926626205,
0.13777628540992737,
-0.21347159147262573,
0.012442449107766151,
-0.15494303405284882,
0.062077105045318604,
0.13880734145641327,
0.08655261248350143,
-0.12007887661457062,
-0.021039173007011414,
-0.45468056201934814,
-0.02398877963423729,
-0.20921359956264496,
-0.09408503770828247,
0.6052910089492798,
0.036198925226926804,
0.1405511051416397,
-0.061177562922239304,
0.13955934345722198,
0.08123268187046051,
0.05955039709806442,
0.057657111436128616,
0.05658068507909775,
-0.06296644359827042,
0.22054384648799896,
-0.28351157903671265,
-0.18962830305099487,
-0.34572508931159973,
0.010538369417190552,
-0.1799464374780655,
-0.05842294171452522,
0.2393825650215149,
-0.13866420090198517,
-0.20370639860630035,
0.16895271837711334,
0.3811873495578766,
0.3318369388580322,
-0.19809846580028534,
0.17885644733905792,
-0.00797346606850624,
0.14123286306858063,
-0.0037087127566337585,
-0.2662273347377777,
-0.09024715423583984,
-0.12989798188209534,
-0.22663381695747375,
0.06935373693704605,
-0.02308538183569908,
0.024143477901816368,
-0.39696088433265686,
0.042518459260463715,
0.6044138669967651,
-0.17291870713233948,
0.3787427842617035,
0.09490751475095749,
0.10643080621957779,
-0.05639411881566048,
0.033081356436014175,
0.11875543743371964,
0.4463942050933838,
-0.04736173152923584,
-0.1196502074599266,
0.09885033220052719,
0.33903568983078003,
-0.11449455469846725,
0.22008733451366425,
-0.2309977263212204,
0.021580779924988747,
0.20778591930866241,
-0.18555311858654022,
0.01403994020074606,
0.14075542986392975,
0.23516573011875153,
-0.5215611457824707,
-0.2858961224555969,
0.05069972947239876,
0.4173049032688141,
-0.17601309716701508,
-0.1280166357755661,
0.1223989874124527,
-0.1778515875339508,
0.048035167157649994,
-0.14718465507030487,
0.12405814975500107,
-0.3219696283340454,
0.19120612740516663,
-0.08579722791910172,
-0.02823783829808235,
-0.034460343420505524,
0.2446112483739853,
0.41525131464004517,
0.10872384160757065,
-0.21960648894309998,
-0.11939135193824768,
0.2977903187274933,
-0.07352475076913834,
0.10690135508775711,
0.31581804156303406,
0.5540587902069092,
0.5522786378860474,
-0.031205695122480392,
0.13086678087711334,
0.06895740330219269,
-0.20486243069171906,
0.04297604784369469,
0.013464457355439663,
-0.21742305159568787,
-0.27985015511512756,
0.4076702296733856,
0.19716359674930573,
-0.030816011130809784,
0.05309110879898071,
0.17693407833576202,
0.5629744529724121,
-0.1761532872915268,
0.14202167093753815,
-0.09437255561351776,
-0.1839529275894165,
0.11420727521181107,
0.03495025262236595,
-0.31021419167518616,
-0.2542951703071594,
0.36670827865600586,
-0.011050228029489517,
0.14354577660560608,
0.24487365782260895,
0.08542335033416748,
0.06317882984876633,
0.1999257653951645,
0.33370599150657654,
-0.04188167303800583,
-0.509641706943512,
-0.0054249572567641735,
-0.42456257343292236,
-0.18141613900661469,
0.28510618209838867,
0.2403235137462616,
-0.14370086789131165,
0.3626502454280853,
0.167926624417305,
-0.037157803773880005,
0.06596270948648453,
0.04729294404387474,
-0.1909380853176117,
-0.05249837413430214,
-0.3705112934112549,
-0.14873014390468597,
0.21063409745693207,
-0.06044693663716316,
-0.05874462425708771,
-0.2856879234313965,
0.2719462215900421,
0.15230675041675568,
0.05359240621328354,
0.009166348725557327,
0.16405323147773743,
0.1470792591571808,
0.3854425251483917,
0.19482018053531647,
0.20950104296207428,
0.3070427477359772,
-0.11525063961744308,
0.031645674258470535,
0.019572410732507706,
-0.33043521642684937,
-0.14236396551132202,
0.13321490585803986,
-0.08601430058479309,
0.5072711706161499,
-0.5292454957962036,
0.0353102870285511,
-0.12137279659509659,
0.11962416768074036,
0.01592017151415348,
-0.4145379662513733,
-0.2292204052209854,
0.10314632952213287,
-0.011365322396159172,
-0.049156609922647476,
0.07738663256168365,
0.29989704489707947,
0.015459966845810413,
0.5862025022506714,
0.098146453499794,
-0.422811359167099,
0.4048633277416229,
0.11326450109481812,
-0.14947877824306488,
0.08225464820861816,
-0.08725171536207199,
0.20431895554065704,
0.3383575975894928,
-0.5801485180854797,
-0.21217399835586548,
0.4233350157737732,
-0.2602572739124298,
-0.3111743628978729,
0.10982435196638107,
-0.10285808145999908,
0.002929233480244875,
0.012132031843066216,
0.4039594829082489,
-0.06418465822935104,
-0.40160131454467773,
0.023752626031637192,
-0.22129108011722565
] |
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.04838201031088829,
-0.07965635508298874,
-0.021617192775011063,
0.4603257179260254,
0.1872410774230957,
0.26541784405708313,
0.04070878401398659,
0.11934351176023483,
-0.04796808958053589,
0.14856724441051483,
0.05258757993578911,
0.1789597123861313,
-0.06306624412536621,
-0.07126651704311371,
-0.29877132177352905,
-0.06330069899559021,
0.255967915058136,
-0.014330603182315826,
-0.12438802421092987,
-0.03350299224257469,
-0.43655648827552795,
0.2530573606491089,
-0.12421196699142456,
-0.044664837419986725,
-0.30367782711982727,
-0.06688456237316132,
-0.40699025988578796,
0.3554331362247467,
-0.07525435090065002,
-0.12310083210468292,
0.5189289450645447,
-0.020126216113567352,
0.09416321665048599,
0.5816606879234314,
-0.00012137419253122061,
-0.004354395903646946,
-0.10394998639822006,
-0.1759781688451767,
-0.2422225922346115,
-0.4407137334346771,
-0.23660603165626526,
-0.25088241696357727,
-0.036446597427129745,
-0.2931850850582123,
0.25390681624412537,
-0.1341373175382614,
-0.11759613454341888,
-0.7231463193893433,
0.24578805267810822,
0.19861344993114471,
0.09222456067800522,
0.1944197416305542,
0.06564901769161224,
-0.0409410186111927,
-0.04092958942055702,
0.1304788440465927,
0.19957958161830902,
0.1953568458557129,
-0.10210234671831131,
-0.027738692238926888,
0.24316631257534027,
-0.01925474964082241,
-0.35802367329597473,
-0.04786497727036476,
0.14823174476623535,
0.45316898822784424,
-0.00532892532646656,
-0.4363865852355957,
-0.13607485592365265,
0.007988284341990948,
0.4547099769115448,
-0.39509573578834534,
-0.3489309549331665,
-0.11716865748167038,
0.08377520740032196,
-0.36391907930374146,
0.11459644883871078,
0.3478942811489105,
0.007878606207668781,
0.12554216384887695,
-0.23527687788009644,
-0.10323089361190796,
-0.2160906195640564,
-0.033609043806791306,
-0.13038180768489838,
-0.02333386428654194,
-0.010051385499536991,
0.19401904940605164,
0.4782029390335083,
0.03103627637028694,
0.332533061504364,
-0.5216780304908752,
0.056500136852264404,
0.2090533971786499,
-0.18527135252952576,
0.03929257020354271,
-0.0924740806221962,
-0.5081062912940979,
0.03482268750667572,
-0.11931010335683823,
0.12423289567232132,
-0.14693082869052887,
-0.16552379727363586,
0.33564114570617676,
0.24342507123947144,
0.38929885625839233,
0.01071897428482771,
0.46725982427597046,
0.05210278183221817,
-0.16906794905662537,
0.019590100273489952,
0.028832975775003433,
0.04933828487992287,
-0.31856462359428406,
0.1396733820438385,
-0.06427206099033356,
0.039478011429309845,
0.001953606028109789,
-0.4597359001636505,
0.23381084203720093,
-0.27469462156295776,
-0.12614832818508148,
0.11219389736652374,
-0.02762710675597191,
0.0581166110932827,
0.3988304138183594,
0.4030521512031555,
0.3217603266239166,
0.06582099944353104,
0.2085610181093216,
-0.16501069068908691,
0.24758437275886536,
0.1256019026041031,
0.14027971029281616,
0.15362128615379333,
-0.028880972415208817,
-0.06356779485940933,
0.12186300754547119,
0.005378902889788151,
-0.07643476128578186,
-0.009222752414643764,
-0.36307138204574585,
0.13620451092720032,
0.1413985639810562,
0.16191159188747406,
0.32769498229026794,
0.29810065031051636,
-0.34943222999572754,
-0.1738562285900116,
0.4263887405395508,
-0.3527107238769531,
-0.15705591440200806,
-0.10833851248025894,
0.07666143774986267,
-0.16360501945018768,
0.08016271144151688,
-0.426265150308609,
0.09444209933280945,
0.352064847946167,
0.25120773911476135,
-0.2572672665119171,
-0.054866973310709,
-0.277634859085083,
-0.41513901948928833,
0.3119908273220062,
0.001474123215302825,
-0.47451040148735046,
-0.03212374821305275,
0.29389914870262146,
0.09893356263637543,
0.17299620807170868,
0.45790085196495056,
-0.04734591394662857,
0.43478378653526306,
-0.27841296792030334,
-0.07601650059223175,
0.26482176780700684,
-0.38923072814941406,
-0.15946076810359955,
0.14998048543930054,
-0.1660076230764389,
0.008146282285451889,
0.2545248568058014,
0.06669638305902481,
-0.0031892212573438883,
0.2272636592388153,
0.7549241781234741,
0.35037538409233093,
-0.0465829037129879,
-0.08909787982702255,
-0.10839789360761642,
-0.20297837257385254,
0.43511220812797546,
-0.11516803503036499,
-0.07409216463565826,
0.0758218839764595,
-0.3071582019329071,
-0.407696396112442,
0.3597155809402466,
-0.2330860197544098,
0.05111817270517349,
0.45099538564682007,
0.3342950642108917,
-0.1403176188468933,
-0.122275210916996,
0.05583205446600914,
-0.16549453139305115,
0.17520907521247864,
0.04250667616724968,
-0.16813461482524872,
-0.2135874330997467,
-0.023174704983830452,
-0.23402239382266998,
0.0914141908288002,
-0.04040292650461197,
0.12610118091106415,
-0.006041878368705511,
0.09844086319208145,
-0.06758085638284683,
-0.09242001175880432,
-0.24835188686847687,
0.6367929577827454,
-0.11561329662799835,
0.0506182536482811,
-0.24801349639892578,
0.5165682435035706,
-0.1867620348930359,
-0.07498486340045929,
-0.07163088023662567,
-0.0034891909454017878,
0.26986587047576904,
0.14319239556789398,
0.023276666179299355,
0.5011239647865295,
-0.08642621338367462,
0.04653870314359665,
0.10625866055488586,
-0.02832907810807228,
0.20866672694683075,
0.06415162980556488,
0.1096680611371994,
-0.044999584555625916,
0.18428882956504822,
-0.22204968333244324,
-0.12960495054721832,
0.43786925077438354,
-0.33334657549858093,
0.3640975058078766,
0.079106904566288,
0.057542748749256134,
0.16317276656627655,
0.04471321031451225,
0.0018772957846522331,
-0.20208556950092316,
0.07373112440109253,
0.10140291601419449,
0.15974542498588562,
0.19031377136707306,
-0.3452679514884949,
-0.04056234285235405,
0.12536336481571198,
0.052734535187482834,
0.013652392663061619,
0.014211640693247318,
-0.06739728897809982,
-0.08986243605613708,
-0.13063891232013702,
0.3200007677078247,
0.6371326446533203,
0.1329653114080429,
0.09114933758974075,
-0.035395778715610504,
-0.20032750070095062,
-0.05301004275679588,
0.28572386503219604,
0.11538723111152649,
0.16989049315452576,
0.18357491493225098,
-0.0004649171605706215,
-0.055312130600214005,
-0.06529416888952255,
0.02930479310452938,
-0.12158532440662384,
0.08842682093381882,
-0.558756411075592,
-0.040884267538785934,
-0.25920191407203674,
-0.08919541537761688,
-0.43265610933303833,
-0.3007502555847168,
-0.178582563996315,
-0.5216220617294312,
-0.27523285150527954,
0.5282121896743774,
-0.044464241713285446,
-0.034200966358184814,
-0.1716000884771347,
0.19943013787269592,
0.016033239662647247,
0.015833185985684395,
0.22337459027767181,
-0.016453862190246582,
-0.06836093217134476,
-0.0021434661466628313,
-0.1374315321445465,
-0.07098960131406784,
0.08676806837320328,
-0.14769765734672546,
0.21063748002052307,
-0.23775224387645721,
0.06442081928253174,
-0.15130412578582764,
-0.180469810962677,
0.12542873620986938,
0.06077482923865318,
0.2815026044845581,
-0.2824745178222656,
-0.627493679523468,
0.1269659698009491,
0.5603989958763123,
-0.12143482267856598,
0.15522003173828125,
0.26528048515319824,
-0.20350241661071777,
-0.03975735604763031,
-0.1804061233997345,
-0.383797824382782,
-0.2179223597049713,
-0.05793038383126259,
-0.23517608642578125,
0.22476570308208466,
0.11027184128761292,
0.22973544895648956,
0.07258488982915878,
0.39103764295578003,
0.1411738246679306,
-0.15055684745311737,
-0.31732162833213806,
0.4028310775756836,
-0.010666106827557087,
-0.1393473893404007,
0.01157346647232771,
0.024893824011087418,
0.07917024940252304,
0.16794556379318237,
-0.37149128317832947,
-0.0036192703992128372,
-0.19243553280830383,
0.12601949274539948,
-0.1266138106584549,
0.29279831051826477,
0.0760921835899353,
0.4290400445461273,
-0.007263543084263802,
-0.21534202992916107,
-0.36894428730010986,
0.19654755294322968,
0.18686144053936005,
0.3983033001422882,
-0.07782775163650513,
0.2956409156322479,
0.11763788759708405,
0.2697819769382477,
0.30122557282447815,
0.09387477487325668,
0.28486621379852295,
0.25225168466567993,
0.5076847672462463,
-0.0031350962817668915,
-0.5560576915740967,
-0.3561553359031677,
-0.04555100202560425,
-0.2627848982810974,
-0.10991472750902176,
-0.003571601351723075,
0.02824036404490471,
-0.16965551674365997,
0.1573154479265213,
-0.15750031173229218,
-0.21933461725711823,
0.012328053824603558,
-0.23994837701320648,
0.14582295715808868,
-0.14265619218349457,
-0.06760024279356003,
-0.32646024227142334,
0.2706413269042969,
-0.17859217524528503,
0.04453485086560249,
0.20918706059455872,
-0.11651184409856796,
-0.44530948996543884,
-0.34597423672676086,
-0.4078502655029297,
0.3821882903575897,
0.08032224327325821,
0.3729104995727539,
0.07602794468402863,
-0.21978069841861725,
-0.2744781970977783,
0.03573735058307648,
0.8388230800628662,
0.2913859784603119,
-0.4263603985309601,
0.388417512178421,
0.026392681524157524,
-0.5281167030334473,
-0.0850614532828331,
0.11995690315961838,
0.1918412297964096,
-0.26075780391693115,
0.39662185311317444,
-0.23300102353096008,
0.021718215197324753,
-0.04914621263742447,
0.5023084878921509,
-0.19876934587955475,
0.01022245828062296,
-0.08150378614664078,
-0.2123834192752838,
-0.13267214596271515,
-0.2198648601770401,
0.0007042206707410514,
0.4571666717529297,
-0.3032931685447693,
0.03136976435780525,
0.026457438245415688,
-0.25838223099708557,
0.4094303846359253,
-0.3536216914653778,
0.6024322509765625,
-0.03851470723748207,
0.18866831064224243,
0.12868699431419373,
0.13003335893154144,
0.3836229145526886,
0.5007208585739136,
-0.230315700173378,
-0.1833069771528244,
0.007825909182429314,
0.10632184892892838,
0.4872782826423645,
0.24226199090480804,
-0.15224266052246094,
-0.03831346333026886,
-0.05203232914209366,
-0.0673813447356224,
-0.3485018312931061,
-0.0687059611082077,
0.2765887379646301,
0.011287343688309193,
-0.45711028575897217,
-0.41279298067092896,
0.22284220159053802,
0.3240778148174286,
-0.11805393546819687,
0.3458717167377472,
-0.03905472159385681,
-0.4746815264225006,
0.3770339787006378,
-0.14907416701316833,
1.0115323066711426,
-0.030279377475380898,
0.2235890030860901,
0.13922525942325592,
-0.22247129678726196,
0.16094739735126495,
0.2818366289138794,
0.058657195419073105,
-0.18981029093265533,
-0.25580573081970215,
-0.11556591838598251,
-0.2795868217945099,
0.044363051652908325,
0.25882160663604736,
-0.39289626479148865,
0.3099094033241272,
-0.4455200135707855,
-0.10182816535234451,
-0.1641739010810852,
0.048461247235536575,
-0.04640820249915123,
-0.222067728638649,
-0.3521374762058258,
0.018546121194958687,
0.10502903163433075,
-0.060944557189941406,
-0.037462539970874786,
-0.020958086475729942,
-0.43718719482421875,
-0.1583186239004135,
-0.17351888120174408,
0.09850028157234192,
-0.16090579330921173,
0.727836012840271,
-0.34503093361854553,
-0.3661649525165558,
-0.44559308886528015,
0.3316722512245178,
0.48197218775749207,
0.027244621887803078,
0.03982391953468323,
-0.10743999481201172,
-0.006005357950925827,
0.08639982342720032,
-0.028122400864958763,
-0.23768828809261322,
0.19291892647743225,
0.1784897893667221,
-0.09193797409534454,
0.015487471595406532,
0.006706736050546169,
-0.33192598819732666,
-0.13303710520267487,
0.045170627534389496,
0.00002911509909608867,
-0.2735178768634796,
-0.35780856013298035,
0.18851613998413086,
0.10143233835697174,
-0.1184045597910881,
0.02652823179960251,
0.3572262227535248,
-0.06514833122491837,
0.282315731048584,
-0.36813226342201233,
-0.3245559632778168,
-0.09244273602962494,
0.5428096055984497,
0.3373904824256897,
-0.07092390209436417,
0.3994651436805725,
-0.006944332737475634,
-0.11548907309770584,
0.011119546368718147,
0.33320480585098267,
0.17299224436283112,
0.185127854347229,
0.4267689287662506,
0.006929333787411451,
-0.00701094837859273,
-0.19567379355430603,
0.3540216088294983,
0.350394070148468,
0.19561968743801117,
0.03137969225645065,
-0.21862587332725525,
-0.5530779361724854,
0.3396942615509033,
0.17062970995903015,
0.3276749849319458,
0.1049652174115181,
-0.30889618396759033,
-0.06846824288368225,
-0.02346046455204487,
-0.20582489669322968,
0.000022074276785133407,
-0.18705816566944122,
0.043453048914670944,
0.21844471991062164,
0.02877669408917427,
0.08326368033885956,
-0.010145763866603374,
0.09877455979585648,
-0.1689891815185547,
0.023357335478067398,
-0.09752018004655838,
0.06285440176725388,
0.17825135588645935,
0.07380126416683197,
-0.09040684252977371,
0.005143092013895512,
-0.45934468507766724,
0.014007885940372944,
-0.22943168878555298,
-0.12174342572689056,
0.6715193390846252,
0.05106990784406662,
0.12149583548307419,
0.015886202454566956,
0.22858262062072754,
0.06803900003433228,
0.08780067414045334,
0.048474885523319244,
0.09635114669799805,
0.010016381740570068,
0.22225229442119598,
-0.2736038565635681,
-0.1764543503522873,
-0.38794785737991333,
-0.00896954070776701,
-0.12004293501377106,
-0.04710020124912262,
0.203180730342865,
-0.16018711030483246,
-0.20051927864551544,
0.11080434173345566,
0.41104230284690857,
0.3873536288738251,
-0.19792619347572327,
0.19008342921733856,
-0.030457857996225357,
0.08743448555469513,
0.01689094491302967,
-0.28272363543510437,
-0.09832039475440979,
-0.1849256008863449,
-0.27577781677246094,
0.12547831237316132,
0.007580921985208988,
0.0357760414481163,
-0.3907298445701599,
0.012761064805090427,
0.6847839951515198,
-0.13351717591285706,
0.3405170142650604,
0.0607745498418808,
0.11563732475042343,
-0.010597248561680317,
-0.025071503594517708,
0.16195060312747955,
0.4223310649394989,
-0.009183458052575588,
-0.14207324385643005,
0.09739315509796143,
0.3798941373825073,
-0.13793712854385376,
0.22997388243675232,
-0.24048613011837006,
0.040882278233766556,
0.18853993713855743,
-0.16508066654205322,
-0.02419382892549038,
0.07714661955833435,
0.18395957350730896,
-0.5160556435585022,
-0.24803009629249573,
0.0020999531261622906,
0.4248028099536896,
-0.13857795298099518,
-0.13435515761375427,
0.09076406061649323,
-0.22465436160564423,
0.00278412620536983,
-0.11045478284358978,
0.12897640466690063,
-0.39965343475341797,
0.1721114218235016,
-0.08197245746850967,
-0.009600820019841194,
-0.08845734596252441,
0.23555800318717957,
0.38152581453323364,
0.07217391580343246,
-0.26529693603515625,
-0.05073844641447067,
0.2551621198654175,
-0.06945283710956573,
0.1916286051273346,
0.22599509358406067,
0.5554201602935791,
0.5561281442642212,
0.025550371035933495,
0.14063860476016998,
0.0032016427721828222,
-0.2122267484664917,
-0.005352651234716177,
-0.002525532618165016,
-0.29357755184173584,
-0.3012855052947998,
0.40948522090911865,
0.17507830262184143,
0.002435836009681225,
0.06747652590274811,
0.2661318778991699,
0.547737181186676,
-0.2297874391078949,
0.15645894408226013,
-0.1596250832080841,
-0.20058214664459229,
0.09172552824020386,
0.002465619472786784,
-0.3389190435409546,
-0.25369992852211,
0.3616603910923004,
-0.01870225928723812,
0.13981741666793823,
0.2566126883029938,
0.052887510508298874,
0.05473426356911659,
0.18915192782878876,
0.2871242165565491,
-0.01307277288287878,
-0.5009990334510803,
-0.03567070886492729,
-0.4185151159763336,
-0.14725099503993988,
0.31429752707481384,
0.1910638064146042,
-0.1895875185728073,
0.37732627987861633,
0.14168493449687958,
-0.04108588770031929,
0.11771754920482635,
0.12736068665981293,
-0.17534668743610382,
0.023447800427675247,
-0.3930685818195343,
-0.18639177083969116,
0.21769528090953827,
-0.07624803483486176,
-0.0608634278178215,
-0.23663489520549774,
0.22871720790863037,
0.1713470220565796,
0.019656576216220856,
0.011934543028473854,
0.08364489674568176,
0.15882842242717743,
0.41420692205429077,
0.257252037525177,
0.169101744890213,
0.3638535737991333,
-0.10031719505786896,
0.00479550939053297,
0.043884895741939545,
-0.35052257776260376,
-0.15830452740192413,
0.1300315409898758,
-0.1268361508846283,
0.5008474588394165,
-0.5447799563407898,
0.08132727444171906,
-0.12667550146579742,
0.08496914803981781,
0.034407954663038254,
-0.4037501811981201,
-0.1758655607700348,
0.05506626144051552,
-0.013366550207138062,
0.018315577879548073,
0.13821306824684143,
0.2336796671152115,
0.02569826878607273,
0.6657631993293762,
0.06085490807890892,
-0.4091665744781494,
0.4009993076324463,
0.137735977768898,
-0.15149931609630585,
0.04924619197845459,
-0.07796600461006165,
0.18269965052604675,
0.3516894280910492,
-0.60990971326828,
-0.21573300659656525,
0.43582600355148315,
-0.21886451542377472,
-0.29902273416519165,
0.09337364882230759,
-0.09478148072957993,
-0.010687317699193954,
0.005380093585699797,
0.41361379623413086,
-0.12912443280220032,
-0.3908880949020386,
0.06671164929866791,
-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.12009257823228836,
0.1984141319990158,
-0.11187494546175003,
0.1850014179944992,
0.11309680342674255,
0.216303750872612,
0.10356401652097702,
0.4946839511394501,
0.20697243511676788,
-0.0703190341591835,
0.07293292135000229,
0.0472201332449913,
0.19815464317798615,
0.2417430281639099,
-0.06892559677362442,
-0.09112352132797241,
-0.02677084319293499,
0.2664072811603546,
0.06811585277318954,
0.08858616650104523,
-0.02662316896021366,
0.14072808623313904,
-0.19235755503177643,
-0.12822841107845306,
-0.21905958652496338,
-0.04065769165754318,
0.038716308772563934,
0.1655925065279007,
-0.5414215922355652,
-0.4992533326148987,
0.430462121963501,
0.47939011454582214,
0.081971175968647,
0.38556134700775146,
-0.00010813284461619332,
-0.03767700865864754,
0.5466257929801941,
-0.029058443382382393,
-0.4618394672870636,
-0.051954235881567,
-0.33420881628990173,
-0.18551388382911682,
-0.14114698767662048,
-0.08354425430297852,
-0.015258483588695526,
-0.3255075514316559,
-0.12399938702583313,
0.07895854860544205,
0.2135801762342453,
0.1726309061050415,
0.24692127108573914,
0.421130508184433,
0.5330948233604431,
-0.1848715990781784,
0.10944388061761856,
-0.04246223717927933,
0.18554259836673737,
0.4435174763202667,
0.32520729303359985,
0.03166341781616211,
0.29278039932250977,
0.348206490278244,
-0.0668817013502121,
-0.10156308859586716,
0.19297385215759277,
-0.166529580950737,
0.131511852145195,
-0.10643666982650757,
0.16574640572071075,
0.17772218585014343,
0.6516277194023132,
-0.3433515429496765,
-0.3737466037273407,
-0.08353093266487122,
-0.15507078170776367,
-0.1994560956954956,
0.3918651044368744,
-0.28938472270965576,
0.275310218334198,
0.21956241130828857,
-0.19723568856716156,
-0.35016706585884094,
-0.016771959140896797,
0.05527991056442261,
-0.08430231362581253,
-0.10059841722249985,
-0.1842760294675827,
-0.14552420377731323,
0.14574989676475525,
-0.14321018755435944,
-0.13179022073745728,
-0.004624172579497099,
-0.3207758963108063,
0.05975138023495674,
-0.07721459865570068,
-0.29979148507118225,
-0.204033762216568,
0.10481712967157364,
0.37505069375038147,
0.21490828692913055,
0.09419318288564682,
0.04975118115544319,
-0.3412807881832123,
0.1715232878923416,
0.1495143473148346,
0.11823854595422745,
0.43042823672294617,
-0.02081233821809292,
0.3718366026878357,
0.6826692819595337,
0.11445938795804977,
-0.04798739030957222,
-0.004207768943160772,
-0.24814818799495697,
0.024340573698282242,
0.02382569946348667,
0.33935442566871643,
-0.49057725071907043,
-0.06515305489301682,
0.18656204640865326,
-0.015993522480130196,
-0.05573835223913193,
0.23562848567962646,
0.3187640607357025,
-0.36129313707351685,
0.16257354617118835,
0.16628038883209229,
-0.02965654619038105,
0.04461174085736275,
-0.31227588653564453,
-0.07639182358980179,
0.026126399636268616,
-0.028405671939253807,
0.215308278799057,
0.3751753568649292,
-0.37579071521759033,
0.4739307463169098,
0.03533688932657242,
-0.16021962463855743,
0.043941888958215714,
-0.07445023953914642,
-0.12079811841249466,
-0.2017621248960495,
0.2391945719718933,
-0.02545136585831642,
0.050477035343647,
-0.09739422053098679,
-0.012774406000971794,
0.027316374704241753,
-0.18168626725673676,
-0.30455631017684937,
-0.3762093186378479,
-0.24055001139640808,
0.20195232331752777,
-0.02346297912299633,
-0.11182049661874771,
-0.23651161789894104,
-0.10285533219575882,
0.17934399843215942,
-0.49978986382484436,
-0.04554982855916023,
-0.07300955802202225,
-0.1554112583398819,
-0.02203894592821598,
0.19265006482601166,
0.3321073651313782,
-0.0709211602807045,
0.09006870537996292,
0.06673431396484375,
-0.3115294277667999,
-0.22411999106407166,
0.20146360993385315,
-0.08829869329929352,
0.1940479874610901,
-0.2010299563407898,
0.060373932123184204,
-0.040451858192682266,
-0.6165739893913269,
-0.3859306871891022,
0.10603661835193634,
0.22307176887989044,
-0.0932433232665062,
-0.13470357656478882,
-0.23676517605781555,
0.236641526222229,
-0.29522690176963806,
-0.1073620542883873,
0.04900035634636879,
0.10508835315704346,
-0.023957351222634315,
-0.3267242908477783,
-0.22936765849590302,
-0.03331179916858673,
0.10303642600774765,
-0.04299185052514076,
0.019500985741615295,
0.03444240242242813,
0.4565272033214569,
0.14231322705745697,
-0.04094574227929115,
0.04695923998951912,
0.28129011392593384,
0.4166463017463684,
0.03359496220946312,
-0.0447671115398407,
-0.040899746119976044,
-0.5700746178627014,
0.20993557572364807,
0.14074388146400452,
-0.1254223734140396,
-0.12508119642734528,
-0.16385309398174286,
-0.2609320878982544,
-0.05978802219033241,
-0.06570408493280411,
-0.01787475496530533,
0.15558843314647675,
0.1592804342508316,
0.33218124508857727,
0.10943704098463058,
-0.11914414167404175,
0.21301187574863434,
-0.5373792052268982,
0.17827847599983215,
-0.26224812865257263,
0.17793317139148712,
-0.030457984656095505,
0.12532034516334534,
0.3239288926124573,
-0.09931063652038574,
0.08796627074480057,
-0.1290886104106903,
-0.08314402401447296,
0.5027291774749756,
0.009386955760419369,
0.13579457998275757,
0.2471981793642044,
0.3728531002998352,
0.05439750850200653,
-0.08521746844053268,
0.0808367133140564,
-0.16526740789413452,
-0.04196551442146301,
0.0343083031475544,
-0.2673317492008209,
0.03268163278698921,
-0.08498716354370117,
-0.06738485395908356,
0.2248896062374115,
-0.07411964982748032,
0.3140823543071747,
-0.029769089072942734,
-0.038882993161678314,
-0.27518340945243835,
-0.17771214246749878,
-0.07517336308956146,
0.36071035265922546,
-0.14301390945911407,
-0.06265798211097717,
0.15598097443580627,
0.4095158576965332,
-0.020629046484827995,
-0.09067484736442566,
0.19840529561042786,
0.08152593672275543,
-0.22911284863948822,
-0.08166059851646423,
0.2641116678714752,
0.23457440733909607,
0.2276798039674759,
-0.014012527652084827,
0.18948587775230408,
0.07117639482021332,
-0.056192442774772644,
0.1673864722251892,
-0.16918529570102692,
-0.009760270826518536,
0.40362274646759033,
0.1256834715604782,
0.010898214764893055,
-0.26503700017929077,
0.045433931052684784,
0.2030116766691208,
0.5164207816123962,
-0.3069399297237396,
-0.07801933586597443,
-0.20331329107284546,
-0.022364815697073936,
-0.0027794570196419954,
-0.34371814131736755,
-0.35785111784935,
-0.13497549295425415,
0.06799938529729843,
0.4726887345314026,
0.11569245159626007,
0.1248631551861763,
-0.053858183324337006,
0.22245363891124725,
0.09254029393196106,
-0.1651446670293808,
-0.18714001774787903,
0.0658755749464035,
-0.0979110449552536,
0.05567748472094536,
0.3926015794277191,
-0.0635673776268959,
0.3531547486782074,
-0.5244255661964417,
-0.1744997203350067,
-0.5462661981582642,
-0.4836136996746063,
0.21966400742530823,
-0.20578128099441528,
0.25776079297065735,
0.2761019468307495,
0.3172798156738281,
0.1261565238237381,
-0.00008193148823920637,
0.15535876154899597,
-0.27605924010276794,
-0.3546033203601837,
-0.2557944655418396,
-0.01916629634797573,
-0.10921645164489746,
-0.13519220054149628,
-0.36983275413513184,
0.10125385224819183,
-0.21008674800395966,
0.1020706444978714,
0.0008245304925367236,
0.02672441303730011,
0.285705029964447,
0.08145149797201157,
0.18618594110012054,
-0.1705823540687561,
0.20646525919437408,
-0.29835638403892517,
-0.7436745762825012,
0.09506987780332565,
-0.19936178624629974,
-0.2288203239440918,
0.01119670644402504,
0.2518719434738159,
0.2966250479221344,
-0.06406434625387192,
-0.4512532949447632,
-0.39206331968307495,
-0.090387724339962,
0.15937258303165436,
0.01650978811085224,
-0.15543368458747864,
0.39545729756355286,
-0.09977678954601288,
-0.12252719700336456,
-0.19275128841400146,
-0.3537534773349762,
0.11857552081346512,
-0.0744081437587738,
0.359825074672699,
-0.03532908484339714,
0.27839305996894836,
-0.006932304240763187,
0.5527370572090149,
0.06371550261974335,
-0.373184472322464,
0.255465567111969,
0.036171939224004745,
0.5047954320907593,
-0.12037793546915054,
-0.18761460483074188,
-0.08813358843326569,
-0.001853575580753386,
0.13787977397441864,
0.1637527346611023,
0.08055254817008972,
0.1937585026025772,
-0.20146554708480835,
-0.3641481101512909,
-0.4616739749908447,
-0.18763920664787292,
-0.1725011169910431,
0.2224402278661728,
0.30642637610435486,
-0.03673448786139488,
0.03822363168001175,
-0.10443014651536942,
-0.038564328104257584,
0.2388698160648346,
0.6212207674980164,
0.05791030079126358,
0.11479745805263519,
-0.2876330316066742,
0.20324082672595978,
-0.1122884675860405,
0.4098142683506012,
-0.05140416696667671,
0.28838416934013367,
-0.05887482315301895,
0.08354397118091583,
-0.0875767171382904,
-0.2908475995063782,
0.3274449110031128,
-0.1836218535900116,
0.32184329628944397,
0.04583314433693886,
-0.10384394228458405,
0.023512102663517,
-0.1497754454612732,
-0.12958359718322754,
0.19560344517230988,
0.26563337445259094,
0.49551838636398315,
-0.4432009756565094,
-0.35981568694114685,
0.32118818163871765,
0.06737522035837173,
-0.05598427727818489,
-0.10246202349662781,
-0.15674260258674622,
-0.19226036965847015,
-0.27636122703552246,
-0.023016074672341347,
-0.2217041254043579,
0.03768681734800339,
-0.15698818862438202,
0.04279644787311554,
0.13483454287052155,
-0.016849227249622345,
0.07923208922147751,
0.2699025273323059,
0.20044301450252533,
0.1592649221420288,
0.26875007152557373,
0.2128036767244339,
0.27165931463241577,
0.6806361079216003,
0.3026638925075531,
-0.09935450553894043,
-0.12452636659145355,
-0.2011505514383316,
-0.08466294407844543,
0.06734013557434082,
0.16497637331485748,
-0.04754919931292534,
0.1596614271402359,
0.337009996175766,
-0.14893457293510437,
-0.016988476738333702,
0.08541975170373917,
0.4840284585952759,
0.021070800721645355,
-0.2948288023471832,
-0.27549272775650024,
0.2434903383255005,
0.1808883249759674,
-0.06367260962724686,
0.12746979296207428,
0.10301357507705688,
-0.12758372724056244,
-0.2348642647266388,
0.15910834074020386,
0.7583659291267395,
0.08679669350385666,
-0.32152584195137024,
0.16781654953956604,
-0.20785149931907654,
0.33446961641311646,
-0.3076881170272827,
-0.09561575949192047,
-0.3612344264984131,
-0.06292447447776794,
0.0182159673422575,
0.051824960857629776,
0.20388434827327728,
-0.27137282490730286,
-0.42206326127052307,
0.21605995297431946,
-0.29132676124572754,
0.04904289171099663,
-0.12813007831573486,
0.43550798296928406,
-0.1518867313861847,
-0.053397852927446365,
-0.4187328517436981,
0.22624003887176514,
0.03778568655252457,
0.11341003328561783,
-0.26148656010627747,
-0.15081797540187836,
0.088503897190094,
-0.4387352168560028,
-0.23002326488494873,
-0.008429838344454765,
0.0856359601020813,
-0.07680122554302216,
0.18556050956249237,
0.26838603615760803,
0.11971806734800339,
0.031668521463871,
0.4012097716331482,
0.2393573671579361,
-0.3454667329788208,
0.08142401278018951,
-0.3129981458187103,
-0.17959095537662506,
-0.008827983401715755,
-0.07925661653280258,
0.359706312417984,
-0.26417168974876404,
-0.32392174005508423,
-0.018861984834074974,
-0.09213970601558685,
-0.3278953731060028,
-0.018003158271312714,
-0.24675706028938293,
-0.26715654134750366,
-0.25337350368499756,
-0.04362645745277405,
0.06423530727624893,
-0.16753675043582916,
-0.2751356363296509,
0.21324041485786438,
-0.02573222666978836,
-0.008235323242843151,
0.010276179760694504,
0.2115834355354309,
-0.18408218026161194,
-0.06409857422113419,
0.5821512937545776,
-0.23821498453617096,
0.0018265820108354092,
0.44498366117477417,
0.045429740101099014,
-0.08735845237970352,
-0.3670882284641266,
-0.26235494017601013,
-0.020444368943572044,
-0.22357192635536194,
0.07129130512475967,
0.1381031572818756,
0.22343581914901733,
0.01320965588092804,
0.28159692883491516,
0.23633809387683868,
-0.08033374696969986,
0.2098322957754135,
-0.5782486796379089,
-0.35540539026260376,
0.24155034124851227,
-0.20800736546516418,
0.13504953682422638,
-0.14097657799720764,
0.1401205211877823,
-0.03753459453582764,
-0.023221999406814575,
-0.3887764513492584,
0.2520698010921478,
-0.1794511377811432,
0.16924674808979034,
0.33532214164733887,
0.05832971632480621,
0.2780822515487671,
-0.17337767779827118,
0.09139115363359451,
-0.10163334012031555,
-0.36892837285995483,
-0.19693003594875336,
-0.17188149690628052,
0.12637244164943695,
0.03598758205771446,
0.061791758984327316,
0.13934791088104248,
-0.04022318869829178,
-0.2844003438949585,
0.047508981078863144,
-0.047384027391672134,
-0.04632655903697014,
0.13113203644752502,
0.17526619136333466,
0.019460003823041916,
0.26572558283805847,
0.052494604140520096,
-0.003203409956768155,
0.194853276014328,
0.12502440810203552,
-0.07693573087453842,
0.14018550515174866,
-0.29705876111984253,
-0.13727109134197235,
0.17316482961177826,
0.2029390186071396,
0.17746324837207794,
-0.1687949299812317,
0.191931813955307,
-0.21132604777812958,
0.11384817957878113,
0.2148861140012741,
0.36081886291503906,
0.5215637683868408,
-0.17094780504703522,
0.028968242928385735,
0.1324632316827774,
0.2687728703022003,
-0.16445617377758026,
0.03665144369006157,
0.2581135332584381,
-0.0537409745156765,
-0.15294359624385834,
0.0027489778585731983,
0.34825778007507324,
-0.21349824965000153,
0.20030322670936584,
0.27797672152519226,
0.3267616629600525,
-0.1841546893119812,
0.053250931203365326,
0.22372759878635406,
-0.2742606997489929,
-0.002942248247563839,
0.24843847751617432,
0.01942666620016098,
0.08840776979923248,
0.21865476667881012,
-0.15884117782115936,
0.08721286058425903,
-0.11641110479831696,
0.37958502769470215,
-0.05888446420431137,
-0.2583574652671814,
0.20924638211727142,
0.4876077473163605,
0.2635890543460846,
-0.07305321842432022,
0.07533681392669678,
0.4748770594596863,
0.08221563696861267,
-0.04851359501481056,
-0.5303446054458618,
0.1542346477508545,
-0.1189722791314125,
-0.1307220458984375,
-0.2884332835674286,
-0.34375202655792236,
0.012443174608051777,
0.009209712035953999,
-0.04305914789438248,
0.02564369887113571,
0.06882224231958389,
-0.004309011157602072,
-0.3971519470214844,
-0.5800519585609436,
-0.17415039241313934,
0.2551024258136749,
0.10905985534191132,
-0.17220176756381989,
0.27958545088768005,
0.25704583525657654,
-0.15205471217632294,
0.30708861351013184,
0.7304962873458862,
0.4203175902366638,
0.24567870795726776,
0.2398923635482788,
-0.10113012045621872,
-0.3405095636844635,
0.0049239257350564,
0.0588030107319355,
0.4122328758239746,
0.023098846897482872,
-0.3534127175807953,
0.2803240716457367,
0.18930597603321075,
-0.17523592710494995,
0.07892601937055588,
-0.21209488809108734,
0.053321368992328644,
-0.11633240431547165,
-0.048763226717710495,
0.15419252216815948,
0.14082273840904236,
-0.3030185103416443,
0.1664286106824875,
-0.3497418165206909,
-0.05815371498465538,
0.21891731023788452,
0.23018713295459747,
0.18889480829238892,
0.040314462035894394,
0.1150403693318367,
-0.035221170634031296,
0.5214558243751526,
0.36774134635925293,
-0.14610537886619568,
0.003299533389508724,
-0.28179243206977844,
-0.6077660322189331,
-0.012870396487414837,
0.030386095866560936,
0.11562773585319519,
-0.07653133571147919,
-0.025792811065912247,
0.10600335150957108,
0.15668430924415588,
0.31022343039512634,
-0.22418847680091858,
-0.11529350280761719,
-0.31922799348831177,
-0.3017616271972656,
0.23089274764060974,
-0.10663367807865143,
-0.06299953907728195,
0.12454058974981308,
-0.17166981101036072,
0.09544041007757187,
-0.039896003901958466,
0.024701958522200584,
-0.07323791086673737,
0.32765084505081177,
-0.2639652490615845,
0.07178199291229248,
0.5029470920562744,
0.2613281011581421,
0.47528010606765747,
-0.2293340116739273,
-0.21742431819438934,
-0.41616249084472656,
-0.0664636492729187,
-0.27672144770622253,
0.43281319737434387,
0.13065101206302643,
0.1294761747121811,
-0.027789335697889328,
-0.10767288506031036,
-0.24237699806690216,
0.5078527927398682,
0.032611433416604996,
-0.2268674522638321,
-0.41832903027534485,
-0.05547133460640907,
0.06937064975500107,
-0.06511396914720535,
-0.06515546143054962,
0.02812892571091652,
0.0025856466963887215,
0.061346929520368576,
-0.5129871964454651,
-0.08759251981973648,
0.5630139112472534,
-0.05815688520669937,
0.010820983909070492,
-0.07101807743310928,
0.2790163457393646,
0.17255809903144836,
-0.3536723256111145,
-0.698035717010498,
0.29936158657073975,
0.2710725963115692,
0.016405398026108742,
-0.28739243745803833,
0.3345271944999695,
-0.08332334458827972,
0.28246772289276123,
-0.09709246456623077,
0.2147708386182785,
0.030527325347065926,
-0.27567058801651,
-0.10908928513526917,
0.029915345832705498
] |
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.2544982135295868,
-0.07792056351900101,
-0.15375836193561554,
0.43086668848991394,
0.39970290660858154,
0.35046160221099854,
0.1368504762649536,
0.5331581830978394,
0.1893271654844284,
0.02358449064195156,
-0.17730358242988586,
-0.09421747922897339,
0.0944037139415741,
0.01118418388068676,
-0.02970508299767971,
-0.4591735899448395,
-0.06729070842266083,
0.029537241905927658,
-0.13527131080627441,
-0.11689338088035583,
-0.2519627809524536,
0.1256147027015686,
-0.07917483150959015,
-0.049028921872377396,
-0.038745563477277756,
-0.18283987045288086,
-0.09583508968353271,
-0.20730535686016083,
-0.35074687004089355,
-0.24086447060108185,
0.35457777976989746,
0.019257333129644394,
0.310111939907074,
0.15299738943576813,
-0.0001114367987611331,
-0.05096485838294029,
0.3131166100502014,
-0.23579451441764832,
-0.29361215233802795,
-0.28885766863822937,
-0.07208975404500961,
-0.3261859714984894,
-0.0904388427734375,
-0.4200315475463867,
0.12744630873203278,
0.04668254777789116,
0.08067119866609573,
-0.1318010538816452,
0.07575744390487671,
0.2992253005504608,
0.24687129259109497,
-0.14260315895080566,
0.3134346008300781,
-0.14573781192302704,
0.3651963770389557,
-0.3777085542678833,
-0.028033748269081116,
0.33958613872528076,
0.21872088313102722,
0.07134268432855606,
0.2154792696237564,
0.22204306721687317,
-0.23414058983325958,
0.013499359600245953,
0.04822444170713425,
-0.29122394323349,
0.22220568358898163,
-0.6297016739845276,
0.5206419229507446,
0.5344284772872925,
0.8290327787399292,
-0.12835146486759186,
-0.0874670147895813,
0.07239186763763428,
-0.026059096679091454,
-0.031374186277389526,
-0.05574001744389534,
0.48197975754737854,
-0.189326211810112,
0.09759805351495743,
0.12616495788097382,
-0.12543036043643951,
-0.15671876072883606,
0.4228466749191284,
-0.1241367980837822,
0.4435881972312927,
-0.05271994322538376,
0.21125955879688263,
-0.02166694588959217,
-0.10270191729068756,
-0.26364216208457947,
-0.06965938210487366,
-0.09616027027368546,
0.29332154989242554,
-0.27939802408218384,
0.019635798409581184,
-0.16150179505348206,
0.055646974593400955,
0.35113525390625,
-0.15038315951824188,
-0.23462142050266266,
-0.045078106224536896,
0.09601062536239624,
0.15757444500923157,
0.1801503747701645,
0.16378308832645416,
0.06204820051789284,
-0.20000669360160828,
0.27828115224838257,
0.30790406465530396,
-0.08421199023723602,
-0.07617081701755524,
-0.21004319190979004,
-0.223056361079216,
-0.29475703835487366,
0.09442926198244095,
0.0875294879078865,
-0.2031715214252472,
-0.17794664204120636,
0.0071133277378976345,
-0.14436103403568268,
-0.019439060240983963,
-0.20239496231079102,
0.36282092332839966,
-0.15014290809631348,
0.43123859167099,
0.1779012233018875,
0.3288218379020691,
-0.10357259213924408,
-0.2613101005554199,
-0.01735217496752739,
0.3065483570098877,
-0.1393197476863861,
-0.10366039723157883,
0.21878290176391602,
-0.10991612076759338,
0.2648516893386841,
-0.08937210589647293,
-0.10313823819160461,
-0.17641228437423706,
-0.15369121730327606,
-0.3695678412914276,
-0.17910364270210266,
0.23040911555290222,
0.16197676956653595,
0.2839276194572449,
0.14761391282081604,
-0.2447475790977478,
-0.230580672621727,
0.1207452118396759,
-0.35961484909057617,
-0.16815488040447235,
-0.20515474677085876,
0.1944684386253357,
0.061098285019397736,
-0.054650310426950455,
-0.31600674986839294,
0.28766417503356934,
0.3030640184879303,
-0.1423991620540619,
0.11807280033826828,
-0.007546153385192156,
-0.02325410768389702,
-0.2251897156238556,
0.1790112406015396,
0.4908003509044647,
-0.3999600410461426,
0.09189733117818832,
-0.02385064773261547,
-0.033711988478899,
0.18978182971477509,
0.18429692089557648,
-0.17795272171497345,
0.25654125213623047,
-0.09788408875465393,
0.03816019371151924,
0.2101312130689621,
-0.3214418590068817,
-0.577635645866394,
0.18605385720729828,
0.11340946704149246,
-0.167003333568573,
0.09947936236858368,
0.016000675037503242,
0.27503055334091187,
-0.04938738793134689,
0.05245433375239372,
0.39567482471466064,
0.1368376910686493,
-0.10564488172531128,
-0.32745060324668884,
-0.5078234672546387,
0.32648178935050964,
0.16331782937049866,
0.4547145366668701,
-0.13227002322673798,
0.2759854197502136,
0.2917214632034302,
0.3191739618778229,
-0.19154758751392365,
0.1246788501739502,
0.23336054384708405,
-0.008948449045419693,
-0.044575244188308716,
-0.0025623058900237083,
-0.331027626991272,
-0.3097583055496216,
0.14775997400283813,
0.10291313380002975,
0.1654643714427948,
-0.1609552800655365,
0.02968333102762699,
-0.31618940830230713,
-0.08880764245986938,
-0.1953115314245224,
0.10326912999153137,
0.19956380128860474,
-0.10527704656124115,
0.11959313601255417,
0.4854589104652405,
0.12651655077934265,
-0.09945959597826004,
-0.41569027304649353,
-0.0948527380824089,
-0.17893452942371368,
0.09233184158802032,
-0.2174282670021057,
0.20449234545230865,
0.03368109092116356,
0.025809040293097496,
0.17968381941318512,
0.07305268943309784,
-0.16072392463684082,
-0.011061287485063076,
-0.07845237106084824,
-0.10354473441839218,
0.13546285033226013,
0.11696410179138184,
0.1331281214952469,
-0.4173752963542938,
0.19202983379364014,
0.10847938805818558,
0.32974642515182495,
-0.13577251136302948,
0.11781623959541321,
0.1222366914153099,
0.03997359797358513,
0.36553433537483215,
0.1234310120344162,
0.14983154833316803,
0.45559966564178467,
0.030526477843523026,
0.1263546198606491,
-0.0049747284501791,
0.32711923122406006,
0.15565995872020721,
0.012748918496072292,
-0.13295936584472656,
-0.029277890920639038,
-0.11351418495178223,
0.31667277216911316,
-0.08453383296728134,
0.2671484649181366,
0.2927594780921936,
-0.07651899755001068,
-0.0048597645945847034,
-0.09782715886831284,
0.15339849889278412,
0.052207596600055695,
0.06990519911050797,
0.10658899694681168,
-0.09984391927719116,
0.35964956879615784,
-0.12939266860485077,
0.2643094062805176,
0.17554204165935516,
0.1863328218460083,
0.20913559198379517,
0.1350802332162857,
-0.011175724677741528,
-0.1882825791835785,
-0.1296796202659607,
0.06999406963586807,
0.37171775102615356,
0.06918374449014664,
0.16594518721103668,
-0.048434533178806305,
-0.1418599635362625,
0.08419087529182434,
-0.05239205062389374,
-0.25094324350357056,
-0.2163173109292984,
-0.12563829123973846,
-0.0857284739613533,
0.0915834903717041,
-0.00010499619384063408,
-0.3266668915748596,
-0.07210199534893036,
0.062166281044483185,
-0.3203508257865906,
-0.1605679988861084,
-0.29812300205230713,
-0.36844977736473083,
0.07678736001253128,
0.3871299922466278,
0.11129014194011688,
0.2952096164226532,
-0.33262893557548523,
-0.19187885522842407,
-0.0899461880326271,
-0.2681114375591278,
-0.014313800260424614,
-0.15697041153907776,
0.24139511585235596,
-0.02411693148314953,
0.7152196168899536,
-0.17999617755413055,
-0.25142109394073486,
0.1846485435962677,
-0.007019855547696352,
0.06587454676628113,
0.24977140128612518,
-0.15347877144813538,
-0.04292391240596771,
0.08453571051359177,
-0.48565348982810974,
-0.5155765414237976,
-0.2696564793586731,
0.012519127689301968,
0.04851781949400902,
0.08780647814273834,
0.1686408817768097,
0.19248414039611816,
0.06802687048912048,
0.12118791043758392,
0.18090678751468658,
-0.19004330039024353,
-0.15186916291713715,
0.44968941807746887,
-0.02741352841258049,
-0.4299626648426056,
0.1881868541240692,
0.010994362644851208,
0.3149319291114807,
0.007927228696644306,
-0.6572360396385193,
0.14411282539367676,
-0.27635928988456726,
0.24994297325611115,
-0.02199326455593109,
0.18347719311714172,
0.11434390395879745,
-0.2136971652507782,
0.04797237366437912,
0.044995591044425964,
0.10590976476669312,
-0.0406210795044899,
-0.2095252424478531,
0.2556219696998596,
0.02994566597044468,
0.29618558287620544,
0.16442088782787323,
0.6888411045074463,
0.05485555902123451,
0.16584059596061707,
0.4367813467979431,
0.23858247697353363,
0.23103131353855133,
-0.2314291149377823,
-0.36457139253616333,
0.060574550181627274,
-0.23949159681797028,
-0.031003020703792572,
0.2670123875141144,
-0.1623198240995407,
-0.4674171507358551,
-0.34771260619163513,
-0.2426847368478775,
-0.36746740341186523,
-0.21077117323875427,
0.15399810671806335,
-0.05018192529678345,
0.08294021338224411,
0.057596296072006226,
0.12039868533611298,
0.02157370001077652,
-0.28234997391700745,
0.21378928422927856,
0.5317095518112183,
-0.2486015409231186,
0.16858960688114166,
-0.27826690673828125,
-0.34212231636047363,
-0.41263410449028015,
0.25245529413223267,
0.07770678400993347,
0.4147612154483795,
-0.0938025489449501,
0.3499189615249634,
0.201179638504982,
-0.08926890045404434,
0.29062291979789734,
-0.17024411261081696,
0.12305095046758652,
0.1972467452287674,
0.10499271005392075,
-0.2152172476053238,
-0.062439925968647,
-0.2943331301212311,
-0.01668798364698887,
0.30541670322418213,
-0.044455636292696,
-0.670965850353241,
0.08432900160551071,
-0.04258571192622185,
0.5003299713134766,
-0.0571771115064621,
-0.017350096255540848,
-0.16185656189918518,
-0.5653649568557739,
-0.4854041039943695,
-0.027687307447195053,
0.18957556784152985,
0.40460941195487976,
-0.19720959663391113,
0.2628990113735199,
-0.10207849740982056,
0.22056272625923157,
0.0213165320456028,
0.007735002785921097,
0.21325649321079254,
0.23278610408306122,
0.09743288904428482,
-0.19678789377212524,
-0.13784702122211456,
0.15032655000686646,
0.3620433211326599,
-0.06353224068880081,
-0.23431262373924255,
-0.1212475597858429,
-0.04300370439887047,
0.043483130633831024,
0.14154617488384247,
-0.10129068046808243,
0.047706928104162216,
0.14866341650485992,
-0.13793547451496124,
0.16582079231739044,
-0.012841412797570229,
0.25194650888442993,
-0.10633760690689087,
-0.4962351620197296,
-0.5676659941673279,
0.6620468497276306,
0.02338203601539135,
0.07014227658510208,
0.2541714310646057,
0.1754048466682434,
-0.1958611011505127,
0.37537339329719543,
0.10580281913280487,
1.1372194290161133,
-0.2281344085931778,
0.11042045056819916,
-0.10398449748754501,
0.10946617275476456,
0.3614170253276825,
-0.3578398525714874,
0.20840711891651154,
-0.322641521692276,
-0.10890696197748184,
-0.01951955258846283,
0.07367454469203949,
-0.046139009296894073,
0.09989327937364578,
-0.3072269558906555,
0.25644198060035706,
-0.36623305082321167,
-0.08695430308580399,
0.10564962774515152,
0.23298592865467072,
-0.4058893322944641,
-0.06803674250841141,
-0.32137972116470337,
0.11962879449129105,
-0.21466036140918732,
0.254692941904068,
-0.2110012322664261,
-0.12547852098941803,
-0.06142447516322136,
-0.2672702670097351,
-0.5050505995750427,
0.07064370810985565,
-0.288350373506546,
0.32986873388290405,
-0.489351361989975,
-0.1897745132446289,
0.33862072229385376,
0.44487127661705017,
0.04147944226861,
0.40315479040145874,
-0.2879834771156311,
0.11165224015712738,
-0.26386111974716187,
-0.4236195683479309,
0.0944913774728775,
0.011207422241568565,
0.08713383227586746,
-0.18162883818149567,
-0.37099048495292664,
0.16697321832180023,
-0.05757244676351547,
0.05284932628273964,
-0.09598754346370697,
0.1043776124715805,
0.2016545534133911,
-0.04589762166142464,
-0.3565550446510315,
-0.022283045575022697,
-0.09438576549291611,
-0.08943305909633636,
0.12416660040616989,
0.08219688385725021,
-0.11190381646156311,
0.14091330766677856,
0.18529561161994934,
-0.3349807858467102,
0.02179151214659214,
0.3491058945655823,
0.18344904482364655,
0.023953847587108612,
0.6245267987251282,
0.31554579734802246,
-0.39654064178466797,
-0.18981510400772095,
0.043914150446653366,
-0.2713772654533386,
-0.4585741460323334,
-0.08960501104593277,
-0.042189743369817734,
0.3383435606956482,
-0.41492870450019836,
0.3502538800239563,
0.1749066561460495,
-0.23483158648014069,
0.2064642459154129,
-0.7065883874893188,
-0.12402184307575226,
0.21609380841255188,
-0.07890909165143967,
0.006574691738933325,
0.08407121151685715,
-0.309599369764328,
0.12182832509279251,
0.23526333272457123,
-0.26108893752098083,
0.2092309594154358,
-0.3233412504196167,
0.10076379030942917,
0.09949403256177902,
0.06333232671022415,
0.022301556542515755,
0.19910256564617157,
0.06504800915718079,
0.06916136294603348,
-0.04966387152671814,
-0.2599099576473236,
-0.07022753357887268,
0.19481271505355835,
0.2051142156124115,
-0.05790087580680847,
0.2278750240802765,
-0.5071966052055359,
-0.16867001354694366,
0.08223892003297806,
-0.0584757924079895,
0.11558473110198975,
0.003859944175928831,
0.1811005026102066,
0.20132549107074738,
0.2885710895061493,
-0.3500802218914032,
0.24587810039520264,
-0.08690515905618668,
0.2614988088607788,
0.1408281922340393,
0.07593606412410736,
0.457992285490036,
0.021300675347447395,
-0.33520999550819397,
-0.033540841192007065,
-0.030077507719397545,
0.0866357684135437,
0.25588086247444153,
-0.23335890471935272,
0.30034759640693665,
0.19892065227031708,
-0.11749505251646042,
0.5623859763145447,
-0.14960452914237976,
0.206596240401268,
0.4130837917327881,
0.18722322583198547,
-0.3698635995388031,
0.0016460190527141094,
0.2932015657424927,
-0.09663724154233932,
-0.07098226249217987,
0.07596101611852646,
0.2589093744754791,
-0.32232800126075745,
0.11372043192386627,
-0.06573902070522308,
0.16478252410888672,
-0.056551460176706314,
0.19225868582725525,
0.6700765490531921,
0.2270732969045639,
0.04992593079805374,
-0.06946466118097305,
0.16999314725399017,
0.09539465606212616,
0.3628067076206207,
-0.22345639765262604,
0.19276364147663116,
-0.05200393125414848,
0.02463502623140812,
-0.1621609479188919,
-0.34005627036094666,
0.29861143231391907,
0.16320201754570007,
-0.02477441169321537,
0.09867644309997559,
-0.17225758731365204,
0.2616477310657501,
0.15435947477817535,
0.03022313117980957,
-0.2611556351184845,
0.1914432793855667,
-0.12247762084007263,
-0.012982700951397419,
-0.04421001672744751,
-0.2680072486400604,
0.0015670889988541603,
0.15562628209590912,
-0.004662046674638987,
-0.356573224067688,
0.255573570728302,
0.3037431836128235,
-0.24408632516860962,
-0.4411398768424988,
0.13480910658836365,
0.21249282360076904,
0.03117045760154724,
-0.3002210855484009,
0.15776105225086212,
0.41378054022789,
0.07809220999479294,
-0.12705518305301666,
0.20191627740859985,
0.44334620237350464,
0.4205476641654968,
-0.3373264670372009,
0.04244129732251167,
0.0753406435251236,
-0.0656806230545044,
-0.023378871381282806,
0.22761006653308868,
0.4672245979309082,
0.2502681314945221,
0.39701032638549805,
0.11842593550682068,
-0.14159998297691345,
-0.03197537362575531,
0.2360502928495407,
-0.06391900032758713,
-0.056670818477869034,
-0.045185934752225876,
-0.05903537571430206,
0.14072102308273315,
-0.420553594827652,
-0.01358474139124155,
-0.5078691840171814,
0.340022474527359,
0.16105616092681885,
0.0025874883867800236,
0.17752929031848907,
-0.0925811380147934,
0.0479857474565506,
-0.15697577595710754,
0.3962930738925934,
0.3195856511592865,
0.1991414874792099,
-0.390832781791687,
-0.008995363488793373,
-0.4645191431045532,
-0.01863555796444416,
-0.2982347011566162,
0.11210089921951294,
-0.08143272995948792,
0.128655806183815,
0.0755082219839096,
0.21327190101146698,
0.03663254529237747,
0.045098282396793365,
0.0668024867773056,
0.4949166476726532,
-0.23153118789196014,
-0.24470388889312744,
-0.1948166936635971,
0.21916277706623077,
-0.15832379460334778,
-0.3909315764904022,
0.05759390443563461,
-0.1385609358549118,
0.03407329320907593,
-0.3200198709964752,
-0.06650041043758392,
0.09557262808084488,
0.005959891714155674,
0.33242854475975037,
0.15237803757190704,
0.5925302505493164,
-0.15409445762634277,
-0.20217695832252502,
-0.20867185294628143,
-0.01107005774974823,
-0.15993501245975494,
0.3116777539253235,
0.1967293620109558,
0.09890645742416382,
-0.16079366207122803,
-0.1119711846113205,
-0.02956446446478367,
0.2984873056411743,
-0.04481641948223114,
0.19492299854755402,
-0.366961807012558,
-0.38635703921318054,
0.05791765823960304,
0.11385614424943924,
0.1190270259976387,
0.04692619666457176,
-0.13085615634918213,
-0.05331842601299286,
-0.3421497344970703,
-0.30868643522262573,
0.38665443658828735,
-0.37730371952056885,
-0.569782018661499,
-0.09215481579303741,
0.007928847335278988,
0.04705679789185524,
0.19029778242111206,
-0.3660883903503418,
0.2775549292564392,
0.38977333903312683,
0.0513334646821022,
-0.15096791088581085,
0.1664217859506607,
0.028648633509874344,
-0.01621546596288681,
-0.09404341876506805,
0.11607009172439575,
-0.008284271694719791,
-0.3563149869441986,
-0.22058449685573578,
-0.39125844836235046
] |
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.2544982135295868,
-0.07792056351900101,
-0.15375836193561554,
0.43086668848991394,
0.39970290660858154,
0.35046160221099854,
0.1368504762649536,
0.5331581830978394,
0.1893271654844284,
0.02358449064195156,
-0.17730358242988586,
-0.09421747922897339,
0.0944037139415741,
0.01118418388068676,
-0.02970508299767971,
-0.4591735899448395,
-0.06729070842266083,
0.029537241905927658,
-0.13527131080627441,
-0.11689338088035583,
-0.2519627809524536,
0.1256147027015686,
-0.07917483150959015,
-0.049028921872377396,
-0.038745563477277756,
-0.18283987045288086,
-0.09583508968353271,
-0.20730535686016083,
-0.35074687004089355,
-0.24086447060108185,
0.35457777976989746,
0.019257333129644394,
0.310111939907074,
0.15299738943576813,
-0.0001114367987611331,
-0.05096485838294029,
0.3131166100502014,
-0.23579451441764832,
-0.29361215233802795,
-0.28885766863822937,
-0.07208975404500961,
-0.3261859714984894,
-0.0904388427734375,
-0.4200315475463867,
0.12744630873203278,
0.04668254777789116,
0.08067119866609573,
-0.1318010538816452,
0.07575744390487671,
0.2992253005504608,
0.24687129259109497,
-0.14260315895080566,
0.3134346008300781,
-0.14573781192302704,
0.3651963770389557,
-0.3777085542678833,
-0.028033748269081116,
0.33958613872528076,
0.21872088313102722,
0.07134268432855606,
0.2154792696237564,
0.22204306721687317,
-0.23414058983325958,
0.013499359600245953,
0.04822444170713425,
-0.29122394323349,
0.22220568358898163,
-0.6297016739845276,
0.5206419229507446,
0.5344284772872925,
0.8290327787399292,
-0.12835146486759186,
-0.0874670147895813,
0.07239186763763428,
-0.026059096679091454,
-0.031374186277389526,
-0.05574001744389534,
0.48197975754737854,
-0.189326211810112,
0.09759805351495743,
0.12616495788097382,
-0.12543036043643951,
-0.15671876072883606,
0.4228466749191284,
-0.1241367980837822,
0.4435881972312927,
-0.05271994322538376,
0.21125955879688263,
-0.02166694588959217,
-0.10270191729068756,
-0.26364216208457947,
-0.06965938210487366,
-0.09616027027368546,
0.29332154989242554,
-0.27939802408218384,
0.019635798409581184,
-0.16150179505348206,
0.055646974593400955,
0.35113525390625,
-0.15038315951824188,
-0.23462142050266266,
-0.045078106224536896,
0.09601062536239624,
0.15757444500923157,
0.1801503747701645,
0.16378308832645416,
0.06204820051789284,
-0.20000669360160828,
0.27828115224838257,
0.30790406465530396,
-0.08421199023723602,
-0.07617081701755524,
-0.21004319190979004,
-0.223056361079216,
-0.29475703835487366,
0.09442926198244095,
0.0875294879078865,
-0.2031715214252472,
-0.17794664204120636,
0.0071133277378976345,
-0.14436103403568268,
-0.019439060240983963,
-0.20239496231079102,
0.36282092332839966,
-0.15014290809631348,
0.43123859167099,
0.1779012233018875,
0.3288218379020691,
-0.10357259213924408,
-0.2613101005554199,
-0.01735217496752739,
0.3065483570098877,
-0.1393197476863861,
-0.10366039723157883,
0.21878290176391602,
-0.10991612076759338,
0.2648516893386841,
-0.08937210589647293,
-0.10313823819160461,
-0.17641228437423706,
-0.15369121730327606,
-0.3695678412914276,
-0.17910364270210266,
0.23040911555290222,
0.16197676956653595,
0.2839276194572449,
0.14761391282081604,
-0.2447475790977478,
-0.230580672621727,
0.1207452118396759,
-0.35961484909057617,
-0.16815488040447235,
-0.20515474677085876,
0.1944684386253357,
0.061098285019397736,
-0.054650310426950455,
-0.31600674986839294,
0.28766417503356934,
0.3030640184879303,
-0.1423991620540619,
0.11807280033826828,
-0.007546153385192156,
-0.02325410768389702,
-0.2251897156238556,
0.1790112406015396,
0.4908003509044647,
-0.3999600410461426,
0.09189733117818832,
-0.02385064773261547,
-0.033711988478899,
0.18978182971477509,
0.18429692089557648,
-0.17795272171497345,
0.25654125213623047,
-0.09788408875465393,
0.03816019371151924,
0.2101312130689621,
-0.3214418590068817,
-0.577635645866394,
0.18605385720729828,
0.11340946704149246,
-0.167003333568573,
0.09947936236858368,
0.016000675037503242,
0.27503055334091187,
-0.04938738793134689,
0.05245433375239372,
0.39567482471466064,
0.1368376910686493,
-0.10564488172531128,
-0.32745060324668884,
-0.5078234672546387,
0.32648178935050964,
0.16331782937049866,
0.4547145366668701,
-0.13227002322673798,
0.2759854197502136,
0.2917214632034302,
0.3191739618778229,
-0.19154758751392365,
0.1246788501739502,
0.23336054384708405,
-0.008948449045419693,
-0.044575244188308716,
-0.0025623058900237083,
-0.331027626991272,
-0.3097583055496216,
0.14775997400283813,
0.10291313380002975,
0.1654643714427948,
-0.1609552800655365,
0.02968333102762699,
-0.31618940830230713,
-0.08880764245986938,
-0.1953115314245224,
0.10326912999153137,
0.19956380128860474,
-0.10527704656124115,
0.11959313601255417,
0.4854589104652405,
0.12651655077934265,
-0.09945959597826004,
-0.41569027304649353,
-0.0948527380824089,
-0.17893452942371368,
0.09233184158802032,
-0.2174282670021057,
0.20449234545230865,
0.03368109092116356,
0.025809040293097496,
0.17968381941318512,
0.07305268943309784,
-0.16072392463684082,
-0.011061287485063076,
-0.07845237106084824,
-0.10354473441839218,
0.13546285033226013,
0.11696410179138184,
0.1331281214952469,
-0.4173752963542938,
0.19202983379364014,
0.10847938805818558,
0.32974642515182495,
-0.13577251136302948,
0.11781623959541321,
0.1222366914153099,
0.03997359797358513,
0.36553433537483215,
0.1234310120344162,
0.14983154833316803,
0.45559966564178467,
0.030526477843523026,
0.1263546198606491,
-0.0049747284501791,
0.32711923122406006,
0.15565995872020721,
0.012748918496072292,
-0.13295936584472656,
-0.029277890920639038,
-0.11351418495178223,
0.31667277216911316,
-0.08453383296728134,
0.2671484649181366,
0.2927594780921936,
-0.07651899755001068,
-0.0048597645945847034,
-0.09782715886831284,
0.15339849889278412,
0.052207596600055695,
0.06990519911050797,
0.10658899694681168,
-0.09984391927719116,
0.35964956879615784,
-0.12939266860485077,
0.2643094062805176,
0.17554204165935516,
0.1863328218460083,
0.20913559198379517,
0.1350802332162857,
-0.011175724677741528,
-0.1882825791835785,
-0.1296796202659607,
0.06999406963586807,
0.37171775102615356,
0.06918374449014664,
0.16594518721103668,
-0.048434533178806305,
-0.1418599635362625,
0.08419087529182434,
-0.05239205062389374,
-0.25094324350357056,
-0.2163173109292984,
-0.12563829123973846,
-0.0857284739613533,
0.0915834903717041,
-0.00010499619384063408,
-0.3266668915748596,
-0.07210199534893036,
0.062166281044483185,
-0.3203508257865906,
-0.1605679988861084,
-0.29812300205230713,
-0.36844977736473083,
0.07678736001253128,
0.3871299922466278,
0.11129014194011688,
0.2952096164226532,
-0.33262893557548523,
-0.19187885522842407,
-0.0899461880326271,
-0.2681114375591278,
-0.014313800260424614,
-0.15697041153907776,
0.24139511585235596,
-0.02411693148314953,
0.7152196168899536,
-0.17999617755413055,
-0.25142109394073486,
0.1846485435962677,
-0.007019855547696352,
0.06587454676628113,
0.24977140128612518,
-0.15347877144813538,
-0.04292391240596771,
0.08453571051359177,
-0.48565348982810974,
-0.5155765414237976,
-0.2696564793586731,
0.012519127689301968,
0.04851781949400902,
0.08780647814273834,
0.1686408817768097,
0.19248414039611816,
0.06802687048912048,
0.12118791043758392,
0.18090678751468658,
-0.19004330039024353,
-0.15186916291713715,
0.44968941807746887,
-0.02741352841258049,
-0.4299626648426056,
0.1881868541240692,
0.010994362644851208,
0.3149319291114807,
0.007927228696644306,
-0.6572360396385193,
0.14411282539367676,
-0.27635928988456726,
0.24994297325611115,
-0.02199326455593109,
0.18347719311714172,
0.11434390395879745,
-0.2136971652507782,
0.04797237366437912,
0.044995591044425964,
0.10590976476669312,
-0.0406210795044899,
-0.2095252424478531,
0.2556219696998596,
0.02994566597044468,
0.29618558287620544,
0.16442088782787323,
0.6888411045074463,
0.05485555902123451,
0.16584059596061707,
0.4367813467979431,
0.23858247697353363,
0.23103131353855133,
-0.2314291149377823,
-0.36457139253616333,
0.060574550181627274,
-0.23949159681797028,
-0.031003020703792572,
0.2670123875141144,
-0.1623198240995407,
-0.4674171507358551,
-0.34771260619163513,
-0.2426847368478775,
-0.36746740341186523,
-0.21077117323875427,
0.15399810671806335,
-0.05018192529678345,
0.08294021338224411,
0.057596296072006226,
0.12039868533611298,
0.02157370001077652,
-0.28234997391700745,
0.21378928422927856,
0.5317095518112183,
-0.2486015409231186,
0.16858960688114166,
-0.27826690673828125,
-0.34212231636047363,
-0.41263410449028015,
0.25245529413223267,
0.07770678400993347,
0.4147612154483795,
-0.0938025489449501,
0.3499189615249634,
0.201179638504982,
-0.08926890045404434,
0.29062291979789734,
-0.17024411261081696,
0.12305095046758652,
0.1972467452287674,
0.10499271005392075,
-0.2152172476053238,
-0.062439925968647,
-0.2943331301212311,
-0.01668798364698887,
0.30541670322418213,
-0.044455636292696,
-0.670965850353241,
0.08432900160551071,
-0.04258571192622185,
0.5003299713134766,
-0.0571771115064621,
-0.017350096255540848,
-0.16185656189918518,
-0.5653649568557739,
-0.4854041039943695,
-0.027687307447195053,
0.18957556784152985,
0.40460941195487976,
-0.19720959663391113,
0.2628990113735199,
-0.10207849740982056,
0.22056272625923157,
0.0213165320456028,
0.007735002785921097,
0.21325649321079254,
0.23278610408306122,
0.09743288904428482,
-0.19678789377212524,
-0.13784702122211456,
0.15032655000686646,
0.3620433211326599,
-0.06353224068880081,
-0.23431262373924255,
-0.1212475597858429,
-0.04300370439887047,
0.043483130633831024,
0.14154617488384247,
-0.10129068046808243,
0.047706928104162216,
0.14866341650485992,
-0.13793547451496124,
0.16582079231739044,
-0.012841412797570229,
0.25194650888442993,
-0.10633760690689087,
-0.4962351620197296,
-0.5676659941673279,
0.6620468497276306,
0.02338203601539135,
0.07014227658510208,
0.2541714310646057,
0.1754048466682434,
-0.1958611011505127,
0.37537339329719543,
0.10580281913280487,
1.1372194290161133,
-0.2281344085931778,
0.11042045056819916,
-0.10398449748754501,
0.10946617275476456,
0.3614170253276825,
-0.3578398525714874,
0.20840711891651154,
-0.322641521692276,
-0.10890696197748184,
-0.01951955258846283,
0.07367454469203949,
-0.046139009296894073,
0.09989327937364578,
-0.3072269558906555,
0.25644198060035706,
-0.36623305082321167,
-0.08695430308580399,
0.10564962774515152,
0.23298592865467072,
-0.4058893322944641,
-0.06803674250841141,
-0.32137972116470337,
0.11962879449129105,
-0.21466036140918732,
0.254692941904068,
-0.2110012322664261,
-0.12547852098941803,
-0.06142447516322136,
-0.2672702670097351,
-0.5050505995750427,
0.07064370810985565,
-0.288350373506546,
0.32986873388290405,
-0.489351361989975,
-0.1897745132446289,
0.33862072229385376,
0.44487127661705017,
0.04147944226861,
0.40315479040145874,
-0.2879834771156311,
0.11165224015712738,
-0.26386111974716187,
-0.4236195683479309,
0.0944913774728775,
0.011207422241568565,
0.08713383227586746,
-0.18162883818149567,
-0.37099048495292664,
0.16697321832180023,
-0.05757244676351547,
0.05284932628273964,
-0.09598754346370697,
0.1043776124715805,
0.2016545534133911,
-0.04589762166142464,
-0.3565550446510315,
-0.022283045575022697,
-0.09438576549291611,
-0.08943305909633636,
0.12416660040616989,
0.08219688385725021,
-0.11190381646156311,
0.14091330766677856,
0.18529561161994934,
-0.3349807858467102,
0.02179151214659214,
0.3491058945655823,
0.18344904482364655,
0.023953847587108612,
0.6245267987251282,
0.31554579734802246,
-0.39654064178466797,
-0.18981510400772095,
0.043914150446653366,
-0.2713772654533386,
-0.4585741460323334,
-0.08960501104593277,
-0.042189743369817734,
0.3383435606956482,
-0.41492870450019836,
0.3502538800239563,
0.1749066561460495,
-0.23483158648014069,
0.2064642459154129,
-0.7065883874893188,
-0.12402184307575226,
0.21609380841255188,
-0.07890909165143967,
0.006574691738933325,
0.08407121151685715,
-0.309599369764328,
0.12182832509279251,
0.23526333272457123,
-0.26108893752098083,
0.2092309594154358,
-0.3233412504196167,
0.10076379030942917,
0.09949403256177902,
0.06333232671022415,
0.022301556542515755,
0.19910256564617157,
0.06504800915718079,
0.06916136294603348,
-0.04966387152671814,
-0.2599099576473236,
-0.07022753357887268,
0.19481271505355835,
0.2051142156124115,
-0.05790087580680847,
0.2278750240802765,
-0.5071966052055359,
-0.16867001354694366,
0.08223892003297806,
-0.0584757924079895,
0.11558473110198975,
0.003859944175928831,
0.1811005026102066,
0.20132549107074738,
0.2885710895061493,
-0.3500802218914032,
0.24587810039520264,
-0.08690515905618668,
0.2614988088607788,
0.1408281922340393,
0.07593606412410736,
0.457992285490036,
0.021300675347447395,
-0.33520999550819397,
-0.033540841192007065,
-0.030077507719397545,
0.0866357684135437,
0.25588086247444153,
-0.23335890471935272,
0.30034759640693665,
0.19892065227031708,
-0.11749505251646042,
0.5623859763145447,
-0.14960452914237976,
0.206596240401268,
0.4130837917327881,
0.18722322583198547,
-0.3698635995388031,
0.0016460190527141094,
0.2932015657424927,
-0.09663724154233932,
-0.07098226249217987,
0.07596101611852646,
0.2589093744754791,
-0.32232800126075745,
0.11372043192386627,
-0.06573902070522308,
0.16478252410888672,
-0.056551460176706314,
0.19225868582725525,
0.6700765490531921,
0.2270732969045639,
0.04992593079805374,
-0.06946466118097305,
0.16999314725399017,
0.09539465606212616,
0.3628067076206207,
-0.22345639765262604,
0.19276364147663116,
-0.05200393125414848,
0.02463502623140812,
-0.1621609479188919,
-0.34005627036094666,
0.29861143231391907,
0.16320201754570007,
-0.02477441169321537,
0.09867644309997559,
-0.17225758731365204,
0.2616477310657501,
0.15435947477817535,
0.03022313117980957,
-0.2611556351184845,
0.1914432793855667,
-0.12247762084007263,
-0.012982700951397419,
-0.04421001672744751,
-0.2680072486400604,
0.0015670889988541603,
0.15562628209590912,
-0.004662046674638987,
-0.356573224067688,
0.255573570728302,
0.3037431836128235,
-0.24408632516860962,
-0.4411398768424988,
0.13480910658836365,
0.21249282360076904,
0.03117045760154724,
-0.3002210855484009,
0.15776105225086212,
0.41378054022789,
0.07809220999479294,
-0.12705518305301666,
0.20191627740859985,
0.44334620237350464,
0.4205476641654968,
-0.3373264670372009,
0.04244129732251167,
0.0753406435251236,
-0.0656806230545044,
-0.023378871381282806,
0.22761006653308868,
0.4672245979309082,
0.2502681314945221,
0.39701032638549805,
0.11842593550682068,
-0.14159998297691345,
-0.03197537362575531,
0.2360502928495407,
-0.06391900032758713,
-0.056670818477869034,
-0.045185934752225876,
-0.05903537571430206,
0.14072102308273315,
-0.420553594827652,
-0.01358474139124155,
-0.5078691840171814,
0.340022474527359,
0.16105616092681885,
0.0025874883867800236,
0.17752929031848907,
-0.0925811380147934,
0.0479857474565506,
-0.15697577595710754,
0.3962930738925934,
0.3195856511592865,
0.1991414874792099,
-0.390832781791687,
-0.008995363488793373,
-0.4645191431045532,
-0.01863555796444416,
-0.2982347011566162,
0.11210089921951294,
-0.08143272995948792,
0.128655806183815,
0.0755082219839096,
0.21327190101146698,
0.03663254529237747,
0.045098282396793365,
0.0668024867773056,
0.4949166476726532,
-0.23153118789196014,
-0.24470388889312744,
-0.1948166936635971,
0.21916277706623077,
-0.15832379460334778,
-0.3909315764904022,
0.05759390443563461,
-0.1385609358549118,
0.03407329320907593,
-0.3200198709964752,
-0.06650041043758392,
0.09557262808084488,
0.005959891714155674,
0.33242854475975037,
0.15237803757190704,
0.5925302505493164,
-0.15409445762634277,
-0.20217695832252502,
-0.20867185294628143,
-0.01107005774974823,
-0.15993501245975494,
0.3116777539253235,
0.1967293620109558,
0.09890645742416382,
-0.16079366207122803,
-0.1119711846113205,
-0.02956446446478367,
0.2984873056411743,
-0.04481641948223114,
0.19492299854755402,
-0.366961807012558,
-0.38635703921318054,
0.05791765823960304,
0.11385614424943924,
0.1190270259976387,
0.04692619666457176,
-0.13085615634918213,
-0.05331842601299286,
-0.3421497344970703,
-0.30868643522262573,
0.38665443658828735,
-0.37730371952056885,
-0.569782018661499,
-0.09215481579303741,
0.007928847335278988,
0.04705679789185524,
0.19029778242111206,
-0.3660883903503418,
0.2775549292564392,
0.38977333903312683,
0.0513334646821022,
-0.15096791088581085,
0.1664217859506607,
0.028648633509874344,
-0.01621546596288681,
-0.09404341876506805,
0.11607009172439575,
-0.008284271694719791,
-0.3563149869441986,
-0.22058449685573578,
-0.39125844836235046
] |
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.2544982135295868,
-0.07792056351900101,
-0.15375836193561554,
0.43086668848991394,
0.39970290660858154,
0.35046160221099854,
0.1368504762649536,
0.5331581830978394,
0.1893271654844284,
0.02358449064195156,
-0.17730358242988586,
-0.09421747922897339,
0.0944037139415741,
0.01118418388068676,
-0.02970508299767971,
-0.4591735899448395,
-0.06729070842266083,
0.029537241905927658,
-0.13527131080627441,
-0.11689338088035583,
-0.2519627809524536,
0.1256147027015686,
-0.07917483150959015,
-0.049028921872377396,
-0.038745563477277756,
-0.18283987045288086,
-0.09583508968353271,
-0.20730535686016083,
-0.35074687004089355,
-0.24086447060108185,
0.35457777976989746,
0.019257333129644394,
0.310111939907074,
0.15299738943576813,
-0.0001114367987611331,
-0.05096485838294029,
0.3131166100502014,
-0.23579451441764832,
-0.29361215233802795,
-0.28885766863822937,
-0.07208975404500961,
-0.3261859714984894,
-0.0904388427734375,
-0.4200315475463867,
0.12744630873203278,
0.04668254777789116,
0.08067119866609573,
-0.1318010538816452,
0.07575744390487671,
0.2992253005504608,
0.24687129259109497,
-0.14260315895080566,
0.3134346008300781,
-0.14573781192302704,
0.3651963770389557,
-0.3777085542678833,
-0.028033748269081116,
0.33958613872528076,
0.21872088313102722,
0.07134268432855606,
0.2154792696237564,
0.22204306721687317,
-0.23414058983325958,
0.013499359600245953,
0.04822444170713425,
-0.29122394323349,
0.22220568358898163,
-0.6297016739845276,
0.5206419229507446,
0.5344284772872925,
0.8290327787399292,
-0.12835146486759186,
-0.0874670147895813,
0.07239186763763428,
-0.026059096679091454,
-0.031374186277389526,
-0.05574001744389534,
0.48197975754737854,
-0.189326211810112,
0.09759805351495743,
0.12616495788097382,
-0.12543036043643951,
-0.15671876072883606,
0.4228466749191284,
-0.1241367980837822,
0.4435881972312927,
-0.05271994322538376,
0.21125955879688263,
-0.02166694588959217,
-0.10270191729068756,
-0.26364216208457947,
-0.06965938210487366,
-0.09616027027368546,
0.29332154989242554,
-0.27939802408218384,
0.019635798409581184,
-0.16150179505348206,
0.055646974593400955,
0.35113525390625,
-0.15038315951824188,
-0.23462142050266266,
-0.045078106224536896,
0.09601062536239624,
0.15757444500923157,
0.1801503747701645,
0.16378308832645416,
0.06204820051789284,
-0.20000669360160828,
0.27828115224838257,
0.30790406465530396,
-0.08421199023723602,
-0.07617081701755524,
-0.21004319190979004,
-0.223056361079216,
-0.29475703835487366,
0.09442926198244095,
0.0875294879078865,
-0.2031715214252472,
-0.17794664204120636,
0.0071133277378976345,
-0.14436103403568268,
-0.019439060240983963,
-0.20239496231079102,
0.36282092332839966,
-0.15014290809631348,
0.43123859167099,
0.1779012233018875,
0.3288218379020691,
-0.10357259213924408,
-0.2613101005554199,
-0.01735217496752739,
0.3065483570098877,
-0.1393197476863861,
-0.10366039723157883,
0.21878290176391602,
-0.10991612076759338,
0.2648516893386841,
-0.08937210589647293,
-0.10313823819160461,
-0.17641228437423706,
-0.15369121730327606,
-0.3695678412914276,
-0.17910364270210266,
0.23040911555290222,
0.16197676956653595,
0.2839276194572449,
0.14761391282081604,
-0.2447475790977478,
-0.230580672621727,
0.1207452118396759,
-0.35961484909057617,
-0.16815488040447235,
-0.20515474677085876,
0.1944684386253357,
0.061098285019397736,
-0.054650310426950455,
-0.31600674986839294,
0.28766417503356934,
0.3030640184879303,
-0.1423991620540619,
0.11807280033826828,
-0.007546153385192156,
-0.02325410768389702,
-0.2251897156238556,
0.1790112406015396,
0.4908003509044647,
-0.3999600410461426,
0.09189733117818832,
-0.02385064773261547,
-0.033711988478899,
0.18978182971477509,
0.18429692089557648,
-0.17795272171497345,
0.25654125213623047,
-0.09788408875465393,
0.03816019371151924,
0.2101312130689621,
-0.3214418590068817,
-0.577635645866394,
0.18605385720729828,
0.11340946704149246,
-0.167003333568573,
0.09947936236858368,
0.016000675037503242,
0.27503055334091187,
-0.04938738793134689,
0.05245433375239372,
0.39567482471466064,
0.1368376910686493,
-0.10564488172531128,
-0.32745060324668884,
-0.5078234672546387,
0.32648178935050964,
0.16331782937049866,
0.4547145366668701,
-0.13227002322673798,
0.2759854197502136,
0.2917214632034302,
0.3191739618778229,
-0.19154758751392365,
0.1246788501739502,
0.23336054384708405,
-0.008948449045419693,
-0.044575244188308716,
-0.0025623058900237083,
-0.331027626991272,
-0.3097583055496216,
0.14775997400283813,
0.10291313380002975,
0.1654643714427948,
-0.1609552800655365,
0.02968333102762699,
-0.31618940830230713,
-0.08880764245986938,
-0.1953115314245224,
0.10326912999153137,
0.19956380128860474,
-0.10527704656124115,
0.11959313601255417,
0.4854589104652405,
0.12651655077934265,
-0.09945959597826004,
-0.41569027304649353,
-0.0948527380824089,
-0.17893452942371368,
0.09233184158802032,
-0.2174282670021057,
0.20449234545230865,
0.03368109092116356,
0.025809040293097496,
0.17968381941318512,
0.07305268943309784,
-0.16072392463684082,
-0.011061287485063076,
-0.07845237106084824,
-0.10354473441839218,
0.13546285033226013,
0.11696410179138184,
0.1331281214952469,
-0.4173752963542938,
0.19202983379364014,
0.10847938805818558,
0.32974642515182495,
-0.13577251136302948,
0.11781623959541321,
0.1222366914153099,
0.03997359797358513,
0.36553433537483215,
0.1234310120344162,
0.14983154833316803,
0.45559966564178467,
0.030526477843523026,
0.1263546198606491,
-0.0049747284501791,
0.32711923122406006,
0.15565995872020721,
0.012748918496072292,
-0.13295936584472656,
-0.029277890920639038,
-0.11351418495178223,
0.31667277216911316,
-0.08453383296728134,
0.2671484649181366,
0.2927594780921936,
-0.07651899755001068,
-0.0048597645945847034,
-0.09782715886831284,
0.15339849889278412,
0.052207596600055695,
0.06990519911050797,
0.10658899694681168,
-0.09984391927719116,
0.35964956879615784,
-0.12939266860485077,
0.2643094062805176,
0.17554204165935516,
0.1863328218460083,
0.20913559198379517,
0.1350802332162857,
-0.011175724677741528,
-0.1882825791835785,
-0.1296796202659607,
0.06999406963586807,
0.37171775102615356,
0.06918374449014664,
0.16594518721103668,
-0.048434533178806305,
-0.1418599635362625,
0.08419087529182434,
-0.05239205062389374,
-0.25094324350357056,
-0.2163173109292984,
-0.12563829123973846,
-0.0857284739613533,
0.0915834903717041,
-0.00010499619384063408,
-0.3266668915748596,
-0.07210199534893036,
0.062166281044483185,
-0.3203508257865906,
-0.1605679988861084,
-0.29812300205230713,
-0.36844977736473083,
0.07678736001253128,
0.3871299922466278,
0.11129014194011688,
0.2952096164226532,
-0.33262893557548523,
-0.19187885522842407,
-0.0899461880326271,
-0.2681114375591278,
-0.014313800260424614,
-0.15697041153907776,
0.24139511585235596,
-0.02411693148314953,
0.7152196168899536,
-0.17999617755413055,
-0.25142109394073486,
0.1846485435962677,
-0.007019855547696352,
0.06587454676628113,
0.24977140128612518,
-0.15347877144813538,
-0.04292391240596771,
0.08453571051359177,
-0.48565348982810974,
-0.5155765414237976,
-0.2696564793586731,
0.012519127689301968,
0.04851781949400902,
0.08780647814273834,
0.1686408817768097,
0.19248414039611816,
0.06802687048912048,
0.12118791043758392,
0.18090678751468658,
-0.19004330039024353,
-0.15186916291713715,
0.44968941807746887,
-0.02741352841258049,
-0.4299626648426056,
0.1881868541240692,
0.010994362644851208,
0.3149319291114807,
0.007927228696644306,
-0.6572360396385193,
0.14411282539367676,
-0.27635928988456726,
0.24994297325611115,
-0.02199326455593109,
0.18347719311714172,
0.11434390395879745,
-0.2136971652507782,
0.04797237366437912,
0.044995591044425964,
0.10590976476669312,
-0.0406210795044899,
-0.2095252424478531,
0.2556219696998596,
0.02994566597044468,
0.29618558287620544,
0.16442088782787323,
0.6888411045074463,
0.05485555902123451,
0.16584059596061707,
0.4367813467979431,
0.23858247697353363,
0.23103131353855133,
-0.2314291149377823,
-0.36457139253616333,
0.060574550181627274,
-0.23949159681797028,
-0.031003020703792572,
0.2670123875141144,
-0.1623198240995407,
-0.4674171507358551,
-0.34771260619163513,
-0.2426847368478775,
-0.36746740341186523,
-0.21077117323875427,
0.15399810671806335,
-0.05018192529678345,
0.08294021338224411,
0.057596296072006226,
0.12039868533611298,
0.02157370001077652,
-0.28234997391700745,
0.21378928422927856,
0.5317095518112183,
-0.2486015409231186,
0.16858960688114166,
-0.27826690673828125,
-0.34212231636047363,
-0.41263410449028015,
0.25245529413223267,
0.07770678400993347,
0.4147612154483795,
-0.0938025489449501,
0.3499189615249634,
0.201179638504982,
-0.08926890045404434,
0.29062291979789734,
-0.17024411261081696,
0.12305095046758652,
0.1972467452287674,
0.10499271005392075,
-0.2152172476053238,
-0.062439925968647,
-0.2943331301212311,
-0.01668798364698887,
0.30541670322418213,
-0.044455636292696,
-0.670965850353241,
0.08432900160551071,
-0.04258571192622185,
0.5003299713134766,
-0.0571771115064621,
-0.017350096255540848,
-0.16185656189918518,
-0.5653649568557739,
-0.4854041039943695,
-0.027687307447195053,
0.18957556784152985,
0.40460941195487976,
-0.19720959663391113,
0.2628990113735199,
-0.10207849740982056,
0.22056272625923157,
0.0213165320456028,
0.007735002785921097,
0.21325649321079254,
0.23278610408306122,
0.09743288904428482,
-0.19678789377212524,
-0.13784702122211456,
0.15032655000686646,
0.3620433211326599,
-0.06353224068880081,
-0.23431262373924255,
-0.1212475597858429,
-0.04300370439887047,
0.043483130633831024,
0.14154617488384247,
-0.10129068046808243,
0.047706928104162216,
0.14866341650485992,
-0.13793547451496124,
0.16582079231739044,
-0.012841412797570229,
0.25194650888442993,
-0.10633760690689087,
-0.4962351620197296,
-0.5676659941673279,
0.6620468497276306,
0.02338203601539135,
0.07014227658510208,
0.2541714310646057,
0.1754048466682434,
-0.1958611011505127,
0.37537339329719543,
0.10580281913280487,
1.1372194290161133,
-0.2281344085931778,
0.11042045056819916,
-0.10398449748754501,
0.10946617275476456,
0.3614170253276825,
-0.3578398525714874,
0.20840711891651154,
-0.322641521692276,
-0.10890696197748184,
-0.01951955258846283,
0.07367454469203949,
-0.046139009296894073,
0.09989327937364578,
-0.3072269558906555,
0.25644198060035706,
-0.36623305082321167,
-0.08695430308580399,
0.10564962774515152,
0.23298592865467072,
-0.4058893322944641,
-0.06803674250841141,
-0.32137972116470337,
0.11962879449129105,
-0.21466036140918732,
0.254692941904068,
-0.2110012322664261,
-0.12547852098941803,
-0.06142447516322136,
-0.2672702670097351,
-0.5050505995750427,
0.07064370810985565,
-0.288350373506546,
0.32986873388290405,
-0.489351361989975,
-0.1897745132446289,
0.33862072229385376,
0.44487127661705017,
0.04147944226861,
0.40315479040145874,
-0.2879834771156311,
0.11165224015712738,
-0.26386111974716187,
-0.4236195683479309,
0.0944913774728775,
0.011207422241568565,
0.08713383227586746,
-0.18162883818149567,
-0.37099048495292664,
0.16697321832180023,
-0.05757244676351547,
0.05284932628273964,
-0.09598754346370697,
0.1043776124715805,
0.2016545534133911,
-0.04589762166142464,
-0.3565550446510315,
-0.022283045575022697,
-0.09438576549291611,
-0.08943305909633636,
0.12416660040616989,
0.08219688385725021,
-0.11190381646156311,
0.14091330766677856,
0.18529561161994934,
-0.3349807858467102,
0.02179151214659214,
0.3491058945655823,
0.18344904482364655,
0.023953847587108612,
0.6245267987251282,
0.31554579734802246,
-0.39654064178466797,
-0.18981510400772095,
0.043914150446653366,
-0.2713772654533386,
-0.4585741460323334,
-0.08960501104593277,
-0.042189743369817734,
0.3383435606956482,
-0.41492870450019836,
0.3502538800239563,
0.1749066561460495,
-0.23483158648014069,
0.2064642459154129,
-0.7065883874893188,
-0.12402184307575226,
0.21609380841255188,
-0.07890909165143967,
0.006574691738933325,
0.08407121151685715,
-0.309599369764328,
0.12182832509279251,
0.23526333272457123,
-0.26108893752098083,
0.2092309594154358,
-0.3233412504196167,
0.10076379030942917,
0.09949403256177902,
0.06333232671022415,
0.022301556542515755,
0.19910256564617157,
0.06504800915718079,
0.06916136294603348,
-0.04966387152671814,
-0.2599099576473236,
-0.07022753357887268,
0.19481271505355835,
0.2051142156124115,
-0.05790087580680847,
0.2278750240802765,
-0.5071966052055359,
-0.16867001354694366,
0.08223892003297806,
-0.0584757924079895,
0.11558473110198975,
0.003859944175928831,
0.1811005026102066,
0.20132549107074738,
0.2885710895061493,
-0.3500802218914032,
0.24587810039520264,
-0.08690515905618668,
0.2614988088607788,
0.1408281922340393,
0.07593606412410736,
0.457992285490036,
0.021300675347447395,
-0.33520999550819397,
-0.033540841192007065,
-0.030077507719397545,
0.0866357684135437,
0.25588086247444153,
-0.23335890471935272,
0.30034759640693665,
0.19892065227031708,
-0.11749505251646042,
0.5623859763145447,
-0.14960452914237976,
0.206596240401268,
0.4130837917327881,
0.18722322583198547,
-0.3698635995388031,
0.0016460190527141094,
0.2932015657424927,
-0.09663724154233932,
-0.07098226249217987,
0.07596101611852646,
0.2589093744754791,
-0.32232800126075745,
0.11372043192386627,
-0.06573902070522308,
0.16478252410888672,
-0.056551460176706314,
0.19225868582725525,
0.6700765490531921,
0.2270732969045639,
0.04992593079805374,
-0.06946466118097305,
0.16999314725399017,
0.09539465606212616,
0.3628067076206207,
-0.22345639765262604,
0.19276364147663116,
-0.05200393125414848,
0.02463502623140812,
-0.1621609479188919,
-0.34005627036094666,
0.29861143231391907,
0.16320201754570007,
-0.02477441169321537,
0.09867644309997559,
-0.17225758731365204,
0.2616477310657501,
0.15435947477817535,
0.03022313117980957,
-0.2611556351184845,
0.1914432793855667,
-0.12247762084007263,
-0.012982700951397419,
-0.04421001672744751,
-0.2680072486400604,
0.0015670889988541603,
0.15562628209590912,
-0.004662046674638987,
-0.356573224067688,
0.255573570728302,
0.3037431836128235,
-0.24408632516860962,
-0.4411398768424988,
0.13480910658836365,
0.21249282360076904,
0.03117045760154724,
-0.3002210855484009,
0.15776105225086212,
0.41378054022789,
0.07809220999479294,
-0.12705518305301666,
0.20191627740859985,
0.44334620237350464,
0.4205476641654968,
-0.3373264670372009,
0.04244129732251167,
0.0753406435251236,
-0.0656806230545044,
-0.023378871381282806,
0.22761006653308868,
0.4672245979309082,
0.2502681314945221,
0.39701032638549805,
0.11842593550682068,
-0.14159998297691345,
-0.03197537362575531,
0.2360502928495407,
-0.06391900032758713,
-0.056670818477869034,
-0.045185934752225876,
-0.05903537571430206,
0.14072102308273315,
-0.420553594827652,
-0.01358474139124155,
-0.5078691840171814,
0.340022474527359,
0.16105616092681885,
0.0025874883867800236,
0.17752929031848907,
-0.0925811380147934,
0.0479857474565506,
-0.15697577595710754,
0.3962930738925934,
0.3195856511592865,
0.1991414874792099,
-0.390832781791687,
-0.008995363488793373,
-0.4645191431045532,
-0.01863555796444416,
-0.2982347011566162,
0.11210089921951294,
-0.08143272995948792,
0.128655806183815,
0.0755082219839096,
0.21327190101146698,
0.03663254529237747,
0.045098282396793365,
0.0668024867773056,
0.4949166476726532,
-0.23153118789196014,
-0.24470388889312744,
-0.1948166936635971,
0.21916277706623077,
-0.15832379460334778,
-0.3909315764904022,
0.05759390443563461,
-0.1385609358549118,
0.03407329320907593,
-0.3200198709964752,
-0.06650041043758392,
0.09557262808084488,
0.005959891714155674,
0.33242854475975037,
0.15237803757190704,
0.5925302505493164,
-0.15409445762634277,
-0.20217695832252502,
-0.20867185294628143,
-0.01107005774974823,
-0.15993501245975494,
0.3116777539253235,
0.1967293620109558,
0.09890645742416382,
-0.16079366207122803,
-0.1119711846113205,
-0.02956446446478367,
0.2984873056411743,
-0.04481641948223114,
0.19492299854755402,
-0.366961807012558,
-0.38635703921318054,
0.05791765823960304,
0.11385614424943924,
0.1190270259976387,
0.04692619666457176,
-0.13085615634918213,
-0.05331842601299286,
-0.3421497344970703,
-0.30868643522262573,
0.38665443658828735,
-0.37730371952056885,
-0.569782018661499,
-0.09215481579303741,
0.007928847335278988,
0.04705679789185524,
0.19029778242111206,
-0.3660883903503418,
0.2775549292564392,
0.38977333903312683,
0.0513334646821022,
-0.15096791088581085,
0.1664217859506607,
0.028648633509874344,
-0.01621546596288681,
-0.09404341876506805,
0.11607009172439575,
-0.008284271694719791,
-0.3563149869441986,
-0.22058449685573578,
-0.39125844836235046
] |
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.2544982135295868,
-0.07792056351900101,
-0.15375836193561554,
0.43086668848991394,
0.39970290660858154,
0.35046160221099854,
0.1368504762649536,
0.5331581830978394,
0.1893271654844284,
0.02358449064195156,
-0.17730358242988586,
-0.09421747922897339,
0.0944037139415741,
0.01118418388068676,
-0.02970508299767971,
-0.4591735899448395,
-0.06729070842266083,
0.029537241905927658,
-0.13527131080627441,
-0.11689338088035583,
-0.2519627809524536,
0.1256147027015686,
-0.07917483150959015,
-0.049028921872377396,
-0.038745563477277756,
-0.18283987045288086,
-0.09583508968353271,
-0.20730535686016083,
-0.35074687004089355,
-0.24086447060108185,
0.35457777976989746,
0.019257333129644394,
0.310111939907074,
0.15299738943576813,
-0.0001114367987611331,
-0.05096485838294029,
0.3131166100502014,
-0.23579451441764832,
-0.29361215233802795,
-0.28885766863822937,
-0.07208975404500961,
-0.3261859714984894,
-0.0904388427734375,
-0.4200315475463867,
0.12744630873203278,
0.04668254777789116,
0.08067119866609573,
-0.1318010538816452,
0.07575744390487671,
0.2992253005504608,
0.24687129259109497,
-0.14260315895080566,
0.3134346008300781,
-0.14573781192302704,
0.3651963770389557,
-0.3777085542678833,
-0.028033748269081116,
0.33958613872528076,
0.21872088313102722,
0.07134268432855606,
0.2154792696237564,
0.22204306721687317,
-0.23414058983325958,
0.013499359600245953,
0.04822444170713425,
-0.29122394323349,
0.22220568358898163,
-0.6297016739845276,
0.5206419229507446,
0.5344284772872925,
0.8290327787399292,
-0.12835146486759186,
-0.0874670147895813,
0.07239186763763428,
-0.026059096679091454,
-0.031374186277389526,
-0.05574001744389534,
0.48197975754737854,
-0.189326211810112,
0.09759805351495743,
0.12616495788097382,
-0.12543036043643951,
-0.15671876072883606,
0.4228466749191284,
-0.1241367980837822,
0.4435881972312927,
-0.05271994322538376,
0.21125955879688263,
-0.02166694588959217,
-0.10270191729068756,
-0.26364216208457947,
-0.06965938210487366,
-0.09616027027368546,
0.29332154989242554,
-0.27939802408218384,
0.019635798409581184,
-0.16150179505348206,
0.055646974593400955,
0.35113525390625,
-0.15038315951824188,
-0.23462142050266266,
-0.045078106224536896,
0.09601062536239624,
0.15757444500923157,
0.1801503747701645,
0.16378308832645416,
0.06204820051789284,
-0.20000669360160828,
0.27828115224838257,
0.30790406465530396,
-0.08421199023723602,
-0.07617081701755524,
-0.21004319190979004,
-0.223056361079216,
-0.29475703835487366,
0.09442926198244095,
0.0875294879078865,
-0.2031715214252472,
-0.17794664204120636,
0.0071133277378976345,
-0.14436103403568268,
-0.019439060240983963,
-0.20239496231079102,
0.36282092332839966,
-0.15014290809631348,
0.43123859167099,
0.1779012233018875,
0.3288218379020691,
-0.10357259213924408,
-0.2613101005554199,
-0.01735217496752739,
0.3065483570098877,
-0.1393197476863861,
-0.10366039723157883,
0.21878290176391602,
-0.10991612076759338,
0.2648516893386841,
-0.08937210589647293,
-0.10313823819160461,
-0.17641228437423706,
-0.15369121730327606,
-0.3695678412914276,
-0.17910364270210266,
0.23040911555290222,
0.16197676956653595,
0.2839276194572449,
0.14761391282081604,
-0.2447475790977478,
-0.230580672621727,
0.1207452118396759,
-0.35961484909057617,
-0.16815488040447235,
-0.20515474677085876,
0.1944684386253357,
0.061098285019397736,
-0.054650310426950455,
-0.31600674986839294,
0.28766417503356934,
0.3030640184879303,
-0.1423991620540619,
0.11807280033826828,
-0.007546153385192156,
-0.02325410768389702,
-0.2251897156238556,
0.1790112406015396,
0.4908003509044647,
-0.3999600410461426,
0.09189733117818832,
-0.02385064773261547,
-0.033711988478899,
0.18978182971477509,
0.18429692089557648,
-0.17795272171497345,
0.25654125213623047,
-0.09788408875465393,
0.03816019371151924,
0.2101312130689621,
-0.3214418590068817,
-0.577635645866394,
0.18605385720729828,
0.11340946704149246,
-0.167003333568573,
0.09947936236858368,
0.016000675037503242,
0.27503055334091187,
-0.04938738793134689,
0.05245433375239372,
0.39567482471466064,
0.1368376910686493,
-0.10564488172531128,
-0.32745060324668884,
-0.5078234672546387,
0.32648178935050964,
0.16331782937049866,
0.4547145366668701,
-0.13227002322673798,
0.2759854197502136,
0.2917214632034302,
0.3191739618778229,
-0.19154758751392365,
0.1246788501739502,
0.23336054384708405,
-0.008948449045419693,
-0.044575244188308716,
-0.0025623058900237083,
-0.331027626991272,
-0.3097583055496216,
0.14775997400283813,
0.10291313380002975,
0.1654643714427948,
-0.1609552800655365,
0.02968333102762699,
-0.31618940830230713,
-0.08880764245986938,
-0.1953115314245224,
0.10326912999153137,
0.19956380128860474,
-0.10527704656124115,
0.11959313601255417,
0.4854589104652405,
0.12651655077934265,
-0.09945959597826004,
-0.41569027304649353,
-0.0948527380824089,
-0.17893452942371368,
0.09233184158802032,
-0.2174282670021057,
0.20449234545230865,
0.03368109092116356,
0.025809040293097496,
0.17968381941318512,
0.07305268943309784,
-0.16072392463684082,
-0.011061287485063076,
-0.07845237106084824,
-0.10354473441839218,
0.13546285033226013,
0.11696410179138184,
0.1331281214952469,
-0.4173752963542938,
0.19202983379364014,
0.10847938805818558,
0.32974642515182495,
-0.13577251136302948,
0.11781623959541321,
0.1222366914153099,
0.03997359797358513,
0.36553433537483215,
0.1234310120344162,
0.14983154833316803,
0.45559966564178467,
0.030526477843523026,
0.1263546198606491,
-0.0049747284501791,
0.32711923122406006,
0.15565995872020721,
0.012748918496072292,
-0.13295936584472656,
-0.029277890920639038,
-0.11351418495178223,
0.31667277216911316,
-0.08453383296728134,
0.2671484649181366,
0.2927594780921936,
-0.07651899755001068,
-0.0048597645945847034,
-0.09782715886831284,
0.15339849889278412,
0.052207596600055695,
0.06990519911050797,
0.10658899694681168,
-0.09984391927719116,
0.35964956879615784,
-0.12939266860485077,
0.2643094062805176,
0.17554204165935516,
0.1863328218460083,
0.20913559198379517,
0.1350802332162857,
-0.011175724677741528,
-0.1882825791835785,
-0.1296796202659607,
0.06999406963586807,
0.37171775102615356,
0.06918374449014664,
0.16594518721103668,
-0.048434533178806305,
-0.1418599635362625,
0.08419087529182434,
-0.05239205062389374,
-0.25094324350357056,
-0.2163173109292984,
-0.12563829123973846,
-0.0857284739613533,
0.0915834903717041,
-0.00010499619384063408,
-0.3266668915748596,
-0.07210199534893036,
0.062166281044483185,
-0.3203508257865906,
-0.1605679988861084,
-0.29812300205230713,
-0.36844977736473083,
0.07678736001253128,
0.3871299922466278,
0.11129014194011688,
0.2952096164226532,
-0.33262893557548523,
-0.19187885522842407,
-0.0899461880326271,
-0.2681114375591278,
-0.014313800260424614,
-0.15697041153907776,
0.24139511585235596,
-0.02411693148314953,
0.7152196168899536,
-0.17999617755413055,
-0.25142109394073486,
0.1846485435962677,
-0.007019855547696352,
0.06587454676628113,
0.24977140128612518,
-0.15347877144813538,
-0.04292391240596771,
0.08453571051359177,
-0.48565348982810974,
-0.5155765414237976,
-0.2696564793586731,
0.012519127689301968,
0.04851781949400902,
0.08780647814273834,
0.1686408817768097,
0.19248414039611816,
0.06802687048912048,
0.12118791043758392,
0.18090678751468658,
-0.19004330039024353,
-0.15186916291713715,
0.44968941807746887,
-0.02741352841258049,
-0.4299626648426056,
0.1881868541240692,
0.010994362644851208,
0.3149319291114807,
0.007927228696644306,
-0.6572360396385193,
0.14411282539367676,
-0.27635928988456726,
0.24994297325611115,
-0.02199326455593109,
0.18347719311714172,
0.11434390395879745,
-0.2136971652507782,
0.04797237366437912,
0.044995591044425964,
0.10590976476669312,
-0.0406210795044899,
-0.2095252424478531,
0.2556219696998596,
0.02994566597044468,
0.29618558287620544,
0.16442088782787323,
0.6888411045074463,
0.05485555902123451,
0.16584059596061707,
0.4367813467979431,
0.23858247697353363,
0.23103131353855133,
-0.2314291149377823,
-0.36457139253616333,
0.060574550181627274,
-0.23949159681797028,
-0.031003020703792572,
0.2670123875141144,
-0.1623198240995407,
-0.4674171507358551,
-0.34771260619163513,
-0.2426847368478775,
-0.36746740341186523,
-0.21077117323875427,
0.15399810671806335,
-0.05018192529678345,
0.08294021338224411,
0.057596296072006226,
0.12039868533611298,
0.02157370001077652,
-0.28234997391700745,
0.21378928422927856,
0.5317095518112183,
-0.2486015409231186,
0.16858960688114166,
-0.27826690673828125,
-0.34212231636047363,
-0.41263410449028015,
0.25245529413223267,
0.07770678400993347,
0.4147612154483795,
-0.0938025489449501,
0.3499189615249634,
0.201179638504982,
-0.08926890045404434,
0.29062291979789734,
-0.17024411261081696,
0.12305095046758652,
0.1972467452287674,
0.10499271005392075,
-0.2152172476053238,
-0.062439925968647,
-0.2943331301212311,
-0.01668798364698887,
0.30541670322418213,
-0.044455636292696,
-0.670965850353241,
0.08432900160551071,
-0.04258571192622185,
0.5003299713134766,
-0.0571771115064621,
-0.017350096255540848,
-0.16185656189918518,
-0.5653649568557739,
-0.4854041039943695,
-0.027687307447195053,
0.18957556784152985,
0.40460941195487976,
-0.19720959663391113,
0.2628990113735199,
-0.10207849740982056,
0.22056272625923157,
0.0213165320456028,
0.007735002785921097,
0.21325649321079254,
0.23278610408306122,
0.09743288904428482,
-0.19678789377212524,
-0.13784702122211456,
0.15032655000686646,
0.3620433211326599,
-0.06353224068880081,
-0.23431262373924255,
-0.1212475597858429,
-0.04300370439887047,
0.043483130633831024,
0.14154617488384247,
-0.10129068046808243,
0.047706928104162216,
0.14866341650485992,
-0.13793547451496124,
0.16582079231739044,
-0.012841412797570229,
0.25194650888442993,
-0.10633760690689087,
-0.4962351620197296,
-0.5676659941673279,
0.6620468497276306,
0.02338203601539135,
0.07014227658510208,
0.2541714310646057,
0.1754048466682434,
-0.1958611011505127,
0.37537339329719543,
0.10580281913280487,
1.1372194290161133,
-0.2281344085931778,
0.11042045056819916,
-0.10398449748754501,
0.10946617275476456,
0.3614170253276825,
-0.3578398525714874,
0.20840711891651154,
-0.322641521692276,
-0.10890696197748184,
-0.01951955258846283,
0.07367454469203949,
-0.046139009296894073,
0.09989327937364578,
-0.3072269558906555,
0.25644198060035706,
-0.36623305082321167,
-0.08695430308580399,
0.10564962774515152,
0.23298592865467072,
-0.4058893322944641,
-0.06803674250841141,
-0.32137972116470337,
0.11962879449129105,
-0.21466036140918732,
0.254692941904068,
-0.2110012322664261,
-0.12547852098941803,
-0.06142447516322136,
-0.2672702670097351,
-0.5050505995750427,
0.07064370810985565,
-0.288350373506546,
0.32986873388290405,
-0.489351361989975,
-0.1897745132446289,
0.33862072229385376,
0.44487127661705017,
0.04147944226861,
0.40315479040145874,
-0.2879834771156311,
0.11165224015712738,
-0.26386111974716187,
-0.4236195683479309,
0.0944913774728775,
0.011207422241568565,
0.08713383227586746,
-0.18162883818149567,
-0.37099048495292664,
0.16697321832180023,
-0.05757244676351547,
0.05284932628273964,
-0.09598754346370697,
0.1043776124715805,
0.2016545534133911,
-0.04589762166142464,
-0.3565550446510315,
-0.022283045575022697,
-0.09438576549291611,
-0.08943305909633636,
0.12416660040616989,
0.08219688385725021,
-0.11190381646156311,
0.14091330766677856,
0.18529561161994934,
-0.3349807858467102,
0.02179151214659214,
0.3491058945655823,
0.18344904482364655,
0.023953847587108612,
0.6245267987251282,
0.31554579734802246,
-0.39654064178466797,
-0.18981510400772095,
0.043914150446653366,
-0.2713772654533386,
-0.4585741460323334,
-0.08960501104593277,
-0.042189743369817734,
0.3383435606956482,
-0.41492870450019836,
0.3502538800239563,
0.1749066561460495,
-0.23483158648014069,
0.2064642459154129,
-0.7065883874893188,
-0.12402184307575226,
0.21609380841255188,
-0.07890909165143967,
0.006574691738933325,
0.08407121151685715,
-0.309599369764328,
0.12182832509279251,
0.23526333272457123,
-0.26108893752098083,
0.2092309594154358,
-0.3233412504196167,
0.10076379030942917,
0.09949403256177902,
0.06333232671022415,
0.022301556542515755,
0.19910256564617157,
0.06504800915718079,
0.06916136294603348,
-0.04966387152671814,
-0.2599099576473236,
-0.07022753357887268,
0.19481271505355835,
0.2051142156124115,
-0.05790087580680847,
0.2278750240802765,
-0.5071966052055359,
-0.16867001354694366,
0.08223892003297806,
-0.0584757924079895,
0.11558473110198975,
0.003859944175928831,
0.1811005026102066,
0.20132549107074738,
0.2885710895061493,
-0.3500802218914032,
0.24587810039520264,
-0.08690515905618668,
0.2614988088607788,
0.1408281922340393,
0.07593606412410736,
0.457992285490036,
0.021300675347447395,
-0.33520999550819397,
-0.033540841192007065,
-0.030077507719397545,
0.0866357684135437,
0.25588086247444153,
-0.23335890471935272,
0.30034759640693665,
0.19892065227031708,
-0.11749505251646042,
0.5623859763145447,
-0.14960452914237976,
0.206596240401268,
0.4130837917327881,
0.18722322583198547,
-0.3698635995388031,
0.0016460190527141094,
0.2932015657424927,
-0.09663724154233932,
-0.07098226249217987,
0.07596101611852646,
0.2589093744754791,
-0.32232800126075745,
0.11372043192386627,
-0.06573902070522308,
0.16478252410888672,
-0.056551460176706314,
0.19225868582725525,
0.6700765490531921,
0.2270732969045639,
0.04992593079805374,
-0.06946466118097305,
0.16999314725399017,
0.09539465606212616,
0.3628067076206207,
-0.22345639765262604,
0.19276364147663116,
-0.05200393125414848,
0.02463502623140812,
-0.1621609479188919,
-0.34005627036094666,
0.29861143231391907,
0.16320201754570007,
-0.02477441169321537,
0.09867644309997559,
-0.17225758731365204,
0.2616477310657501,
0.15435947477817535,
0.03022313117980957,
-0.2611556351184845,
0.1914432793855667,
-0.12247762084007263,
-0.012982700951397419,
-0.04421001672744751,
-0.2680072486400604,
0.0015670889988541603,
0.15562628209590912,
-0.004662046674638987,
-0.356573224067688,
0.255573570728302,
0.3037431836128235,
-0.24408632516860962,
-0.4411398768424988,
0.13480910658836365,
0.21249282360076904,
0.03117045760154724,
-0.3002210855484009,
0.15776105225086212,
0.41378054022789,
0.07809220999479294,
-0.12705518305301666,
0.20191627740859985,
0.44334620237350464,
0.4205476641654968,
-0.3373264670372009,
0.04244129732251167,
0.0753406435251236,
-0.0656806230545044,
-0.023378871381282806,
0.22761006653308868,
0.4672245979309082,
0.2502681314945221,
0.39701032638549805,
0.11842593550682068,
-0.14159998297691345,
-0.03197537362575531,
0.2360502928495407,
-0.06391900032758713,
-0.056670818477869034,
-0.045185934752225876,
-0.05903537571430206,
0.14072102308273315,
-0.420553594827652,
-0.01358474139124155,
-0.5078691840171814,
0.340022474527359,
0.16105616092681885,
0.0025874883867800236,
0.17752929031848907,
-0.0925811380147934,
0.0479857474565506,
-0.15697577595710754,
0.3962930738925934,
0.3195856511592865,
0.1991414874792099,
-0.390832781791687,
-0.008995363488793373,
-0.4645191431045532,
-0.01863555796444416,
-0.2982347011566162,
0.11210089921951294,
-0.08143272995948792,
0.128655806183815,
0.0755082219839096,
0.21327190101146698,
0.03663254529237747,
0.045098282396793365,
0.0668024867773056,
0.4949166476726532,
-0.23153118789196014,
-0.24470388889312744,
-0.1948166936635971,
0.21916277706623077,
-0.15832379460334778,
-0.3909315764904022,
0.05759390443563461,
-0.1385609358549118,
0.03407329320907593,
-0.3200198709964752,
-0.06650041043758392,
0.09557262808084488,
0.005959891714155674,
0.33242854475975037,
0.15237803757190704,
0.5925302505493164,
-0.15409445762634277,
-0.20217695832252502,
-0.20867185294628143,
-0.01107005774974823,
-0.15993501245975494,
0.3116777539253235,
0.1967293620109558,
0.09890645742416382,
-0.16079366207122803,
-0.1119711846113205,
-0.02956446446478367,
0.2984873056411743,
-0.04481641948223114,
0.19492299854755402,
-0.366961807012558,
-0.38635703921318054,
0.05791765823960304,
0.11385614424943924,
0.1190270259976387,
0.04692619666457176,
-0.13085615634918213,
-0.05331842601299286,
-0.3421497344970703,
-0.30868643522262573,
0.38665443658828735,
-0.37730371952056885,
-0.569782018661499,
-0.09215481579303741,
0.007928847335278988,
0.04705679789185524,
0.19029778242111206,
-0.3660883903503418,
0.2775549292564392,
0.38977333903312683,
0.0513334646821022,
-0.15096791088581085,
0.1664217859506607,
0.028648633509874344,
-0.01621546596288681,
-0.09404341876506805,
0.11607009172439575,
-0.008284271694719791,
-0.3563149869441986,
-0.22058449685573578,
-0.39125844836235046
] |
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.2544982135295868,
-0.07792056351900101,
-0.15375836193561554,
0.43086668848991394,
0.39970290660858154,
0.35046160221099854,
0.1368504762649536,
0.5331581830978394,
0.1893271654844284,
0.02358449064195156,
-0.17730358242988586,
-0.09421747922897339,
0.0944037139415741,
0.01118418388068676,
-0.02970508299767971,
-0.4591735899448395,
-0.06729070842266083,
0.029537241905927658,
-0.13527131080627441,
-0.11689338088035583,
-0.2519627809524536,
0.1256147027015686,
-0.07917483150959015,
-0.049028921872377396,
-0.038745563477277756,
-0.18283987045288086,
-0.09583508968353271,
-0.20730535686016083,
-0.35074687004089355,
-0.24086447060108185,
0.35457777976989746,
0.019257333129644394,
0.310111939907074,
0.15299738943576813,
-0.0001114367987611331,
-0.05096485838294029,
0.3131166100502014,
-0.23579451441764832,
-0.29361215233802795,
-0.28885766863822937,
-0.07208975404500961,
-0.3261859714984894,
-0.0904388427734375,
-0.4200315475463867,
0.12744630873203278,
0.04668254777789116,
0.08067119866609573,
-0.1318010538816452,
0.07575744390487671,
0.2992253005504608,
0.24687129259109497,
-0.14260315895080566,
0.3134346008300781,
-0.14573781192302704,
0.3651963770389557,
-0.3777085542678833,
-0.028033748269081116,
0.33958613872528076,
0.21872088313102722,
0.07134268432855606,
0.2154792696237564,
0.22204306721687317,
-0.23414058983325958,
0.013499359600245953,
0.04822444170713425,
-0.29122394323349,
0.22220568358898163,
-0.6297016739845276,
0.5206419229507446,
0.5344284772872925,
0.8290327787399292,
-0.12835146486759186,
-0.0874670147895813,
0.07239186763763428,
-0.026059096679091454,
-0.031374186277389526,
-0.05574001744389534,
0.48197975754737854,
-0.189326211810112,
0.09759805351495743,
0.12616495788097382,
-0.12543036043643951,
-0.15671876072883606,
0.4228466749191284,
-0.1241367980837822,
0.4435881972312927,
-0.05271994322538376,
0.21125955879688263,
-0.02166694588959217,
-0.10270191729068756,
-0.26364216208457947,
-0.06965938210487366,
-0.09616027027368546,
0.29332154989242554,
-0.27939802408218384,
0.019635798409581184,
-0.16150179505348206,
0.055646974593400955,
0.35113525390625,
-0.15038315951824188,
-0.23462142050266266,
-0.045078106224536896,
0.09601062536239624,
0.15757444500923157,
0.1801503747701645,
0.16378308832645416,
0.06204820051789284,
-0.20000669360160828,
0.27828115224838257,
0.30790406465530396,
-0.08421199023723602,
-0.07617081701755524,
-0.21004319190979004,
-0.223056361079216,
-0.29475703835487366,
0.09442926198244095,
0.0875294879078865,
-0.2031715214252472,
-0.17794664204120636,
0.0071133277378976345,
-0.14436103403568268,
-0.019439060240983963,
-0.20239496231079102,
0.36282092332839966,
-0.15014290809631348,
0.43123859167099,
0.1779012233018875,
0.3288218379020691,
-0.10357259213924408,
-0.2613101005554199,
-0.01735217496752739,
0.3065483570098877,
-0.1393197476863861,
-0.10366039723157883,
0.21878290176391602,
-0.10991612076759338,
0.2648516893386841,
-0.08937210589647293,
-0.10313823819160461,
-0.17641228437423706,
-0.15369121730327606,
-0.3695678412914276,
-0.17910364270210266,
0.23040911555290222,
0.16197676956653595,
0.2839276194572449,
0.14761391282081604,
-0.2447475790977478,
-0.230580672621727,
0.1207452118396759,
-0.35961484909057617,
-0.16815488040447235,
-0.20515474677085876,
0.1944684386253357,
0.061098285019397736,
-0.054650310426950455,
-0.31600674986839294,
0.28766417503356934,
0.3030640184879303,
-0.1423991620540619,
0.11807280033826828,
-0.007546153385192156,
-0.02325410768389702,
-0.2251897156238556,
0.1790112406015396,
0.4908003509044647,
-0.3999600410461426,
0.09189733117818832,
-0.02385064773261547,
-0.033711988478899,
0.18978182971477509,
0.18429692089557648,
-0.17795272171497345,
0.25654125213623047,
-0.09788408875465393,
0.03816019371151924,
0.2101312130689621,
-0.3214418590068817,
-0.577635645866394,
0.18605385720729828,
0.11340946704149246,
-0.167003333568573,
0.09947936236858368,
0.016000675037503242,
0.27503055334091187,
-0.04938738793134689,
0.05245433375239372,
0.39567482471466064,
0.1368376910686493,
-0.10564488172531128,
-0.32745060324668884,
-0.5078234672546387,
0.32648178935050964,
0.16331782937049866,
0.4547145366668701,
-0.13227002322673798,
0.2759854197502136,
0.2917214632034302,
0.3191739618778229,
-0.19154758751392365,
0.1246788501739502,
0.23336054384708405,
-0.008948449045419693,
-0.044575244188308716,
-0.0025623058900237083,
-0.331027626991272,
-0.3097583055496216,
0.14775997400283813,
0.10291313380002975,
0.1654643714427948,
-0.1609552800655365,
0.02968333102762699,
-0.31618940830230713,
-0.08880764245986938,
-0.1953115314245224,
0.10326912999153137,
0.19956380128860474,
-0.10527704656124115,
0.11959313601255417,
0.4854589104652405,
0.12651655077934265,
-0.09945959597826004,
-0.41569027304649353,
-0.0948527380824089,
-0.17893452942371368,
0.09233184158802032,
-0.2174282670021057,
0.20449234545230865,
0.03368109092116356,
0.025809040293097496,
0.17968381941318512,
0.07305268943309784,
-0.16072392463684082,
-0.011061287485063076,
-0.07845237106084824,
-0.10354473441839218,
0.13546285033226013,
0.11696410179138184,
0.1331281214952469,
-0.4173752963542938,
0.19202983379364014,
0.10847938805818558,
0.32974642515182495,
-0.13577251136302948,
0.11781623959541321,
0.1222366914153099,
0.03997359797358513,
0.36553433537483215,
0.1234310120344162,
0.14983154833316803,
0.45559966564178467,
0.030526477843523026,
0.1263546198606491,
-0.0049747284501791,
0.32711923122406006,
0.15565995872020721,
0.012748918496072292,
-0.13295936584472656,
-0.029277890920639038,
-0.11351418495178223,
0.31667277216911316,
-0.08453383296728134,
0.2671484649181366,
0.2927594780921936,
-0.07651899755001068,
-0.0048597645945847034,
-0.09782715886831284,
0.15339849889278412,
0.052207596600055695,
0.06990519911050797,
0.10658899694681168,
-0.09984391927719116,
0.35964956879615784,
-0.12939266860485077,
0.2643094062805176,
0.17554204165935516,
0.1863328218460083,
0.20913559198379517,
0.1350802332162857,
-0.011175724677741528,
-0.1882825791835785,
-0.1296796202659607,
0.06999406963586807,
0.37171775102615356,
0.06918374449014664,
0.16594518721103668,
-0.048434533178806305,
-0.1418599635362625,
0.08419087529182434,
-0.05239205062389374,
-0.25094324350357056,
-0.2163173109292984,
-0.12563829123973846,
-0.0857284739613533,
0.0915834903717041,
-0.00010499619384063408,
-0.3266668915748596,
-0.07210199534893036,
0.062166281044483185,
-0.3203508257865906,
-0.1605679988861084,
-0.29812300205230713,
-0.36844977736473083,
0.07678736001253128,
0.3871299922466278,
0.11129014194011688,
0.2952096164226532,
-0.33262893557548523,
-0.19187885522842407,
-0.0899461880326271,
-0.2681114375591278,
-0.014313800260424614,
-0.15697041153907776,
0.24139511585235596,
-0.02411693148314953,
0.7152196168899536,
-0.17999617755413055,
-0.25142109394073486,
0.1846485435962677,
-0.007019855547696352,
0.06587454676628113,
0.24977140128612518,
-0.15347877144813538,
-0.04292391240596771,
0.08453571051359177,
-0.48565348982810974,
-0.5155765414237976,
-0.2696564793586731,
0.012519127689301968,
0.04851781949400902,
0.08780647814273834,
0.1686408817768097,
0.19248414039611816,
0.06802687048912048,
0.12118791043758392,
0.18090678751468658,
-0.19004330039024353,
-0.15186916291713715,
0.44968941807746887,
-0.02741352841258049,
-0.4299626648426056,
0.1881868541240692,
0.010994362644851208,
0.3149319291114807,
0.007927228696644306,
-0.6572360396385193,
0.14411282539367676,
-0.27635928988456726,
0.24994297325611115,
-0.02199326455593109,
0.18347719311714172,
0.11434390395879745,
-0.2136971652507782,
0.04797237366437912,
0.044995591044425964,
0.10590976476669312,
-0.0406210795044899,
-0.2095252424478531,
0.2556219696998596,
0.02994566597044468,
0.29618558287620544,
0.16442088782787323,
0.6888411045074463,
0.05485555902123451,
0.16584059596061707,
0.4367813467979431,
0.23858247697353363,
0.23103131353855133,
-0.2314291149377823,
-0.36457139253616333,
0.060574550181627274,
-0.23949159681797028,
-0.031003020703792572,
0.2670123875141144,
-0.1623198240995407,
-0.4674171507358551,
-0.34771260619163513,
-0.2426847368478775,
-0.36746740341186523,
-0.21077117323875427,
0.15399810671806335,
-0.05018192529678345,
0.08294021338224411,
0.057596296072006226,
0.12039868533611298,
0.02157370001077652,
-0.28234997391700745,
0.21378928422927856,
0.5317095518112183,
-0.2486015409231186,
0.16858960688114166,
-0.27826690673828125,
-0.34212231636047363,
-0.41263410449028015,
0.25245529413223267,
0.07770678400993347,
0.4147612154483795,
-0.0938025489449501,
0.3499189615249634,
0.201179638504982,
-0.08926890045404434,
0.29062291979789734,
-0.17024411261081696,
0.12305095046758652,
0.1972467452287674,
0.10499271005392075,
-0.2152172476053238,
-0.062439925968647,
-0.2943331301212311,
-0.01668798364698887,
0.30541670322418213,
-0.044455636292696,
-0.670965850353241,
0.08432900160551071,
-0.04258571192622185,
0.5003299713134766,
-0.0571771115064621,
-0.017350096255540848,
-0.16185656189918518,
-0.5653649568557739,
-0.4854041039943695,
-0.027687307447195053,
0.18957556784152985,
0.40460941195487976,
-0.19720959663391113,
0.2628990113735199,
-0.10207849740982056,
0.22056272625923157,
0.0213165320456028,
0.007735002785921097,
0.21325649321079254,
0.23278610408306122,
0.09743288904428482,
-0.19678789377212524,
-0.13784702122211456,
0.15032655000686646,
0.3620433211326599,
-0.06353224068880081,
-0.23431262373924255,
-0.1212475597858429,
-0.04300370439887047,
0.043483130633831024,
0.14154617488384247,
-0.10129068046808243,
0.047706928104162216,
0.14866341650485992,
-0.13793547451496124,
0.16582079231739044,
-0.012841412797570229,
0.25194650888442993,
-0.10633760690689087,
-0.4962351620197296,
-0.5676659941673279,
0.6620468497276306,
0.02338203601539135,
0.07014227658510208,
0.2541714310646057,
0.1754048466682434,
-0.1958611011505127,
0.37537339329719543,
0.10580281913280487,
1.1372194290161133,
-0.2281344085931778,
0.11042045056819916,
-0.10398449748754501,
0.10946617275476456,
0.3614170253276825,
-0.3578398525714874,
0.20840711891651154,
-0.322641521692276,
-0.10890696197748184,
-0.01951955258846283,
0.07367454469203949,
-0.046139009296894073,
0.09989327937364578,
-0.3072269558906555,
0.25644198060035706,
-0.36623305082321167,
-0.08695430308580399,
0.10564962774515152,
0.23298592865467072,
-0.4058893322944641,
-0.06803674250841141,
-0.32137972116470337,
0.11962879449129105,
-0.21466036140918732,
0.254692941904068,
-0.2110012322664261,
-0.12547852098941803,
-0.06142447516322136,
-0.2672702670097351,
-0.5050505995750427,
0.07064370810985565,
-0.288350373506546,
0.32986873388290405,
-0.489351361989975,
-0.1897745132446289,
0.33862072229385376,
0.44487127661705017,
0.04147944226861,
0.40315479040145874,
-0.2879834771156311,
0.11165224015712738,
-0.26386111974716187,
-0.4236195683479309,
0.0944913774728775,
0.011207422241568565,
0.08713383227586746,
-0.18162883818149567,
-0.37099048495292664,
0.16697321832180023,
-0.05757244676351547,
0.05284932628273964,
-0.09598754346370697,
0.1043776124715805,
0.2016545534133911,
-0.04589762166142464,
-0.3565550446510315,
-0.022283045575022697,
-0.09438576549291611,
-0.08943305909633636,
0.12416660040616989,
0.08219688385725021,
-0.11190381646156311,
0.14091330766677856,
0.18529561161994934,
-0.3349807858467102,
0.02179151214659214,
0.3491058945655823,
0.18344904482364655,
0.023953847587108612,
0.6245267987251282,
0.31554579734802246,
-0.39654064178466797,
-0.18981510400772095,
0.043914150446653366,
-0.2713772654533386,
-0.4585741460323334,
-0.08960501104593277,
-0.042189743369817734,
0.3383435606956482,
-0.41492870450019836,
0.3502538800239563,
0.1749066561460495,
-0.23483158648014069,
0.2064642459154129,
-0.7065883874893188,
-0.12402184307575226,
0.21609380841255188,
-0.07890909165143967,
0.006574691738933325,
0.08407121151685715,
-0.309599369764328,
0.12182832509279251,
0.23526333272457123,
-0.26108893752098083,
0.2092309594154358,
-0.3233412504196167,
0.10076379030942917,
0.09949403256177902,
0.06333232671022415,
0.022301556542515755,
0.19910256564617157,
0.06504800915718079,
0.06916136294603348,
-0.04966387152671814,
-0.2599099576473236,
-0.07022753357887268,
0.19481271505355835,
0.2051142156124115,
-0.05790087580680847,
0.2278750240802765,
-0.5071966052055359,
-0.16867001354694366,
0.08223892003297806,
-0.0584757924079895,
0.11558473110198975,
0.003859944175928831,
0.1811005026102066,
0.20132549107074738,
0.2885710895061493,
-0.3500802218914032,
0.24587810039520264,
-0.08690515905618668,
0.2614988088607788,
0.1408281922340393,
0.07593606412410736,
0.457992285490036,
0.021300675347447395,
-0.33520999550819397,
-0.033540841192007065,
-0.030077507719397545,
0.0866357684135437,
0.25588086247444153,
-0.23335890471935272,
0.30034759640693665,
0.19892065227031708,
-0.11749505251646042,
0.5623859763145447,
-0.14960452914237976,
0.206596240401268,
0.4130837917327881,
0.18722322583198547,
-0.3698635995388031,
0.0016460190527141094,
0.2932015657424927,
-0.09663724154233932,
-0.07098226249217987,
0.07596101611852646,
0.2589093744754791,
-0.32232800126075745,
0.11372043192386627,
-0.06573902070522308,
0.16478252410888672,
-0.056551460176706314,
0.19225868582725525,
0.6700765490531921,
0.2270732969045639,
0.04992593079805374,
-0.06946466118097305,
0.16999314725399017,
0.09539465606212616,
0.3628067076206207,
-0.22345639765262604,
0.19276364147663116,
-0.05200393125414848,
0.02463502623140812,
-0.1621609479188919,
-0.34005627036094666,
0.29861143231391907,
0.16320201754570007,
-0.02477441169321537,
0.09867644309997559,
-0.17225758731365204,
0.2616477310657501,
0.15435947477817535,
0.03022313117980957,
-0.2611556351184845,
0.1914432793855667,
-0.12247762084007263,
-0.012982700951397419,
-0.04421001672744751,
-0.2680072486400604,
0.0015670889988541603,
0.15562628209590912,
-0.004662046674638987,
-0.356573224067688,
0.255573570728302,
0.3037431836128235,
-0.24408632516860962,
-0.4411398768424988,
0.13480910658836365,
0.21249282360076904,
0.03117045760154724,
-0.3002210855484009,
0.15776105225086212,
0.41378054022789,
0.07809220999479294,
-0.12705518305301666,
0.20191627740859985,
0.44334620237350464,
0.4205476641654968,
-0.3373264670372009,
0.04244129732251167,
0.0753406435251236,
-0.0656806230545044,
-0.023378871381282806,
0.22761006653308868,
0.4672245979309082,
0.2502681314945221,
0.39701032638549805,
0.11842593550682068,
-0.14159998297691345,
-0.03197537362575531,
0.2360502928495407,
-0.06391900032758713,
-0.056670818477869034,
-0.045185934752225876,
-0.05903537571430206,
0.14072102308273315,
-0.420553594827652,
-0.01358474139124155,
-0.5078691840171814,
0.340022474527359,
0.16105616092681885,
0.0025874883867800236,
0.17752929031848907,
-0.0925811380147934,
0.0479857474565506,
-0.15697577595710754,
0.3962930738925934,
0.3195856511592865,
0.1991414874792099,
-0.390832781791687,
-0.008995363488793373,
-0.4645191431045532,
-0.01863555796444416,
-0.2982347011566162,
0.11210089921951294,
-0.08143272995948792,
0.128655806183815,
0.0755082219839096,
0.21327190101146698,
0.03663254529237747,
0.045098282396793365,
0.0668024867773056,
0.4949166476726532,
-0.23153118789196014,
-0.24470388889312744,
-0.1948166936635971,
0.21916277706623077,
-0.15832379460334778,
-0.3909315764904022,
0.05759390443563461,
-0.1385609358549118,
0.03407329320907593,
-0.3200198709964752,
-0.06650041043758392,
0.09557262808084488,
0.005959891714155674,
0.33242854475975037,
0.15237803757190704,
0.5925302505493164,
-0.15409445762634277,
-0.20217695832252502,
-0.20867185294628143,
-0.01107005774974823,
-0.15993501245975494,
0.3116777539253235,
0.1967293620109558,
0.09890645742416382,
-0.16079366207122803,
-0.1119711846113205,
-0.02956446446478367,
0.2984873056411743,
-0.04481641948223114,
0.19492299854755402,
-0.366961807012558,
-0.38635703921318054,
0.05791765823960304,
0.11385614424943924,
0.1190270259976387,
0.04692619666457176,
-0.13085615634918213,
-0.05331842601299286,
-0.3421497344970703,
-0.30868643522262573,
0.38665443658828735,
-0.37730371952056885,
-0.569782018661499,
-0.09215481579303741,
0.007928847335278988,
0.04705679789185524,
0.19029778242111206,
-0.3660883903503418,
0.2775549292564392,
0.38977333903312683,
0.0513334646821022,
-0.15096791088581085,
0.1664217859506607,
0.028648633509874344,
-0.01621546596288681,
-0.09404341876506805,
0.11607009172439575,
-0.008284271694719791,
-0.3563149869441986,
-0.22058449685573578,
-0.39125844836235046
] |
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.2544982135295868,
-0.07792056351900101,
-0.15375836193561554,
0.43086668848991394,
0.39970290660858154,
0.35046160221099854,
0.1368504762649536,
0.5331581830978394,
0.1893271654844284,
0.02358449064195156,
-0.17730358242988586,
-0.09421747922897339,
0.0944037139415741,
0.01118418388068676,
-0.02970508299767971,
-0.4591735899448395,
-0.06729070842266083,
0.029537241905927658,
-0.13527131080627441,
-0.11689338088035583,
-0.2519627809524536,
0.1256147027015686,
-0.07917483150959015,
-0.049028921872377396,
-0.038745563477277756,
-0.18283987045288086,
-0.09583508968353271,
-0.20730535686016083,
-0.35074687004089355,
-0.24086447060108185,
0.35457777976989746,
0.019257333129644394,
0.310111939907074,
0.15299738943576813,
-0.0001114367987611331,
-0.05096485838294029,
0.3131166100502014,
-0.23579451441764832,
-0.29361215233802795,
-0.28885766863822937,
-0.07208975404500961,
-0.3261859714984894,
-0.0904388427734375,
-0.4200315475463867,
0.12744630873203278,
0.04668254777789116,
0.08067119866609573,
-0.1318010538816452,
0.07575744390487671,
0.2992253005504608,
0.24687129259109497,
-0.14260315895080566,
0.3134346008300781,
-0.14573781192302704,
0.3651963770389557,
-0.3777085542678833,
-0.028033748269081116,
0.33958613872528076,
0.21872088313102722,
0.07134268432855606,
0.2154792696237564,
0.22204306721687317,
-0.23414058983325958,
0.013499359600245953,
0.04822444170713425,
-0.29122394323349,
0.22220568358898163,
-0.6297016739845276,
0.5206419229507446,
0.5344284772872925,
0.8290327787399292,
-0.12835146486759186,
-0.0874670147895813,
0.07239186763763428,
-0.026059096679091454,
-0.031374186277389526,
-0.05574001744389534,
0.48197975754737854,
-0.189326211810112,
0.09759805351495743,
0.12616495788097382,
-0.12543036043643951,
-0.15671876072883606,
0.4228466749191284,
-0.1241367980837822,
0.4435881972312927,
-0.05271994322538376,
0.21125955879688263,
-0.02166694588959217,
-0.10270191729068756,
-0.26364216208457947,
-0.06965938210487366,
-0.09616027027368546,
0.29332154989242554,
-0.27939802408218384,
0.019635798409581184,
-0.16150179505348206,
0.055646974593400955,
0.35113525390625,
-0.15038315951824188,
-0.23462142050266266,
-0.045078106224536896,
0.09601062536239624,
0.15757444500923157,
0.1801503747701645,
0.16378308832645416,
0.06204820051789284,
-0.20000669360160828,
0.27828115224838257,
0.30790406465530396,
-0.08421199023723602,
-0.07617081701755524,
-0.21004319190979004,
-0.223056361079216,
-0.29475703835487366,
0.09442926198244095,
0.0875294879078865,
-0.2031715214252472,
-0.17794664204120636,
0.0071133277378976345,
-0.14436103403568268,
-0.019439060240983963,
-0.20239496231079102,
0.36282092332839966,
-0.15014290809631348,
0.43123859167099,
0.1779012233018875,
0.3288218379020691,
-0.10357259213924408,
-0.2613101005554199,
-0.01735217496752739,
0.3065483570098877,
-0.1393197476863861,
-0.10366039723157883,
0.21878290176391602,
-0.10991612076759338,
0.2648516893386841,
-0.08937210589647293,
-0.10313823819160461,
-0.17641228437423706,
-0.15369121730327606,
-0.3695678412914276,
-0.17910364270210266,
0.23040911555290222,
0.16197676956653595,
0.2839276194572449,
0.14761391282081604,
-0.2447475790977478,
-0.230580672621727,
0.1207452118396759,
-0.35961484909057617,
-0.16815488040447235,
-0.20515474677085876,
0.1944684386253357,
0.061098285019397736,
-0.054650310426950455,
-0.31600674986839294,
0.28766417503356934,
0.3030640184879303,
-0.1423991620540619,
0.11807280033826828,
-0.007546153385192156,
-0.02325410768389702,
-0.2251897156238556,
0.1790112406015396,
0.4908003509044647,
-0.3999600410461426,
0.09189733117818832,
-0.02385064773261547,
-0.033711988478899,
0.18978182971477509,
0.18429692089557648,
-0.17795272171497345,
0.25654125213623047,
-0.09788408875465393,
0.03816019371151924,
0.2101312130689621,
-0.3214418590068817,
-0.577635645866394,
0.18605385720729828,
0.11340946704149246,
-0.167003333568573,
0.09947936236858368,
0.016000675037503242,
0.27503055334091187,
-0.04938738793134689,
0.05245433375239372,
0.39567482471466064,
0.1368376910686493,
-0.10564488172531128,
-0.32745060324668884,
-0.5078234672546387,
0.32648178935050964,
0.16331782937049866,
0.4547145366668701,
-0.13227002322673798,
0.2759854197502136,
0.2917214632034302,
0.3191739618778229,
-0.19154758751392365,
0.1246788501739502,
0.23336054384708405,
-0.008948449045419693,
-0.044575244188308716,
-0.0025623058900237083,
-0.331027626991272,
-0.3097583055496216,
0.14775997400283813,
0.10291313380002975,
0.1654643714427948,
-0.1609552800655365,
0.02968333102762699,
-0.31618940830230713,
-0.08880764245986938,
-0.1953115314245224,
0.10326912999153137,
0.19956380128860474,
-0.10527704656124115,
0.11959313601255417,
0.4854589104652405,
0.12651655077934265,
-0.09945959597826004,
-0.41569027304649353,
-0.0948527380824089,
-0.17893452942371368,
0.09233184158802032,
-0.2174282670021057,
0.20449234545230865,
0.03368109092116356,
0.025809040293097496,
0.17968381941318512,
0.07305268943309784,
-0.16072392463684082,
-0.011061287485063076,
-0.07845237106084824,
-0.10354473441839218,
0.13546285033226013,
0.11696410179138184,
0.1331281214952469,
-0.4173752963542938,
0.19202983379364014,
0.10847938805818558,
0.32974642515182495,
-0.13577251136302948,
0.11781623959541321,
0.1222366914153099,
0.03997359797358513,
0.36553433537483215,
0.1234310120344162,
0.14983154833316803,
0.45559966564178467,
0.030526477843523026,
0.1263546198606491,
-0.0049747284501791,
0.32711923122406006,
0.15565995872020721,
0.012748918496072292,
-0.13295936584472656,
-0.029277890920639038,
-0.11351418495178223,
0.31667277216911316,
-0.08453383296728134,
0.2671484649181366,
0.2927594780921936,
-0.07651899755001068,
-0.0048597645945847034,
-0.09782715886831284,
0.15339849889278412,
0.052207596600055695,
0.06990519911050797,
0.10658899694681168,
-0.09984391927719116,
0.35964956879615784,
-0.12939266860485077,
0.2643094062805176,
0.17554204165935516,
0.1863328218460083,
0.20913559198379517,
0.1350802332162857,
-0.011175724677741528,
-0.1882825791835785,
-0.1296796202659607,
0.06999406963586807,
0.37171775102615356,
0.06918374449014664,
0.16594518721103668,
-0.048434533178806305,
-0.1418599635362625,
0.08419087529182434,
-0.05239205062389374,
-0.25094324350357056,
-0.2163173109292984,
-0.12563829123973846,
-0.0857284739613533,
0.0915834903717041,
-0.00010499619384063408,
-0.3266668915748596,
-0.07210199534893036,
0.062166281044483185,
-0.3203508257865906,
-0.1605679988861084,
-0.29812300205230713,
-0.36844977736473083,
0.07678736001253128,
0.3871299922466278,
0.11129014194011688,
0.2952096164226532,
-0.33262893557548523,
-0.19187885522842407,
-0.0899461880326271,
-0.2681114375591278,
-0.014313800260424614,
-0.15697041153907776,
0.24139511585235596,
-0.02411693148314953,
0.7152196168899536,
-0.17999617755413055,
-0.25142109394073486,
0.1846485435962677,
-0.007019855547696352,
0.06587454676628113,
0.24977140128612518,
-0.15347877144813538,
-0.04292391240596771,
0.08453571051359177,
-0.48565348982810974,
-0.5155765414237976,
-0.2696564793586731,
0.012519127689301968,
0.04851781949400902,
0.08780647814273834,
0.1686408817768097,
0.19248414039611816,
0.06802687048912048,
0.12118791043758392,
0.18090678751468658,
-0.19004330039024353,
-0.15186916291713715,
0.44968941807746887,
-0.02741352841258049,
-0.4299626648426056,
0.1881868541240692,
0.010994362644851208,
0.3149319291114807,
0.007927228696644306,
-0.6572360396385193,
0.14411282539367676,
-0.27635928988456726,
0.24994297325611115,
-0.02199326455593109,
0.18347719311714172,
0.11434390395879745,
-0.2136971652507782,
0.04797237366437912,
0.044995591044425964,
0.10590976476669312,
-0.0406210795044899,
-0.2095252424478531,
0.2556219696998596,
0.02994566597044468,
0.29618558287620544,
0.16442088782787323,
0.6888411045074463,
0.05485555902123451,
0.16584059596061707,
0.4367813467979431,
0.23858247697353363,
0.23103131353855133,
-0.2314291149377823,
-0.36457139253616333,
0.060574550181627274,
-0.23949159681797028,
-0.031003020703792572,
0.2670123875141144,
-0.1623198240995407,
-0.4674171507358551,
-0.34771260619163513,
-0.2426847368478775,
-0.36746740341186523,
-0.21077117323875427,
0.15399810671806335,
-0.05018192529678345,
0.08294021338224411,
0.057596296072006226,
0.12039868533611298,
0.02157370001077652,
-0.28234997391700745,
0.21378928422927856,
0.5317095518112183,
-0.2486015409231186,
0.16858960688114166,
-0.27826690673828125,
-0.34212231636047363,
-0.41263410449028015,
0.25245529413223267,
0.07770678400993347,
0.4147612154483795,
-0.0938025489449501,
0.3499189615249634,
0.201179638504982,
-0.08926890045404434,
0.29062291979789734,
-0.17024411261081696,
0.12305095046758652,
0.1972467452287674,
0.10499271005392075,
-0.2152172476053238,
-0.062439925968647,
-0.2943331301212311,
-0.01668798364698887,
0.30541670322418213,
-0.044455636292696,
-0.670965850353241,
0.08432900160551071,
-0.04258571192622185,
0.5003299713134766,
-0.0571771115064621,
-0.017350096255540848,
-0.16185656189918518,
-0.5653649568557739,
-0.4854041039943695,
-0.027687307447195053,
0.18957556784152985,
0.40460941195487976,
-0.19720959663391113,
0.2628990113735199,
-0.10207849740982056,
0.22056272625923157,
0.0213165320456028,
0.007735002785921097,
0.21325649321079254,
0.23278610408306122,
0.09743288904428482,
-0.19678789377212524,
-0.13784702122211456,
0.15032655000686646,
0.3620433211326599,
-0.06353224068880081,
-0.23431262373924255,
-0.1212475597858429,
-0.04300370439887047,
0.043483130633831024,
0.14154617488384247,
-0.10129068046808243,
0.047706928104162216,
0.14866341650485992,
-0.13793547451496124,
0.16582079231739044,
-0.012841412797570229,
0.25194650888442993,
-0.10633760690689087,
-0.4962351620197296,
-0.5676659941673279,
0.6620468497276306,
0.02338203601539135,
0.07014227658510208,
0.2541714310646057,
0.1754048466682434,
-0.1958611011505127,
0.37537339329719543,
0.10580281913280487,
1.1372194290161133,
-0.2281344085931778,
0.11042045056819916,
-0.10398449748754501,
0.10946617275476456,
0.3614170253276825,
-0.3578398525714874,
0.20840711891651154,
-0.322641521692276,
-0.10890696197748184,
-0.01951955258846283,
0.07367454469203949,
-0.046139009296894073,
0.09989327937364578,
-0.3072269558906555,
0.25644198060035706,
-0.36623305082321167,
-0.08695430308580399,
0.10564962774515152,
0.23298592865467072,
-0.4058893322944641,
-0.06803674250841141,
-0.32137972116470337,
0.11962879449129105,
-0.21466036140918732,
0.254692941904068,
-0.2110012322664261,
-0.12547852098941803,
-0.06142447516322136,
-0.2672702670097351,
-0.5050505995750427,
0.07064370810985565,
-0.288350373506546,
0.32986873388290405,
-0.489351361989975,
-0.1897745132446289,
0.33862072229385376,
0.44487127661705017,
0.04147944226861,
0.40315479040145874,
-0.2879834771156311,
0.11165224015712738,
-0.26386111974716187,
-0.4236195683479309,
0.0944913774728775,
0.011207422241568565,
0.08713383227586746,
-0.18162883818149567,
-0.37099048495292664,
0.16697321832180023,
-0.05757244676351547,
0.05284932628273964,
-0.09598754346370697,
0.1043776124715805,
0.2016545534133911,
-0.04589762166142464,
-0.3565550446510315,
-0.022283045575022697,
-0.09438576549291611,
-0.08943305909633636,
0.12416660040616989,
0.08219688385725021,
-0.11190381646156311,
0.14091330766677856,
0.18529561161994934,
-0.3349807858467102,
0.02179151214659214,
0.3491058945655823,
0.18344904482364655,
0.023953847587108612,
0.6245267987251282,
0.31554579734802246,
-0.39654064178466797,
-0.18981510400772095,
0.043914150446653366,
-0.2713772654533386,
-0.4585741460323334,
-0.08960501104593277,
-0.042189743369817734,
0.3383435606956482,
-0.41492870450019836,
0.3502538800239563,
0.1749066561460495,
-0.23483158648014069,
0.2064642459154129,
-0.7065883874893188,
-0.12402184307575226,
0.21609380841255188,
-0.07890909165143967,
0.006574691738933325,
0.08407121151685715,
-0.309599369764328,
0.12182832509279251,
0.23526333272457123,
-0.26108893752098083,
0.2092309594154358,
-0.3233412504196167,
0.10076379030942917,
0.09949403256177902,
0.06333232671022415,
0.022301556542515755,
0.19910256564617157,
0.06504800915718079,
0.06916136294603348,
-0.04966387152671814,
-0.2599099576473236,
-0.07022753357887268,
0.19481271505355835,
0.2051142156124115,
-0.05790087580680847,
0.2278750240802765,
-0.5071966052055359,
-0.16867001354694366,
0.08223892003297806,
-0.0584757924079895,
0.11558473110198975,
0.003859944175928831,
0.1811005026102066,
0.20132549107074738,
0.2885710895061493,
-0.3500802218914032,
0.24587810039520264,
-0.08690515905618668,
0.2614988088607788,
0.1408281922340393,
0.07593606412410736,
0.457992285490036,
0.021300675347447395,
-0.33520999550819397,
-0.033540841192007065,
-0.030077507719397545,
0.0866357684135437,
0.25588086247444153,
-0.23335890471935272,
0.30034759640693665,
0.19892065227031708,
-0.11749505251646042,
0.5623859763145447,
-0.14960452914237976,
0.206596240401268,
0.4130837917327881,
0.18722322583198547,
-0.3698635995388031,
0.0016460190527141094,
0.2932015657424927,
-0.09663724154233932,
-0.07098226249217987,
0.07596101611852646,
0.2589093744754791,
-0.32232800126075745,
0.11372043192386627,
-0.06573902070522308,
0.16478252410888672,
-0.056551460176706314,
0.19225868582725525,
0.6700765490531921,
0.2270732969045639,
0.04992593079805374,
-0.06946466118097305,
0.16999314725399017,
0.09539465606212616,
0.3628067076206207,
-0.22345639765262604,
0.19276364147663116,
-0.05200393125414848,
0.02463502623140812,
-0.1621609479188919,
-0.34005627036094666,
0.29861143231391907,
0.16320201754570007,
-0.02477441169321537,
0.09867644309997559,
-0.17225758731365204,
0.2616477310657501,
0.15435947477817535,
0.03022313117980957,
-0.2611556351184845,
0.1914432793855667,
-0.12247762084007263,
-0.012982700951397419,
-0.04421001672744751,
-0.2680072486400604,
0.0015670889988541603,
0.15562628209590912,
-0.004662046674638987,
-0.356573224067688,
0.255573570728302,
0.3037431836128235,
-0.24408632516860962,
-0.4411398768424988,
0.13480910658836365,
0.21249282360076904,
0.03117045760154724,
-0.3002210855484009,
0.15776105225086212,
0.41378054022789,
0.07809220999479294,
-0.12705518305301666,
0.20191627740859985,
0.44334620237350464,
0.4205476641654968,
-0.3373264670372009,
0.04244129732251167,
0.0753406435251236,
-0.0656806230545044,
-0.023378871381282806,
0.22761006653308868,
0.4672245979309082,
0.2502681314945221,
0.39701032638549805,
0.11842593550682068,
-0.14159998297691345,
-0.03197537362575531,
0.2360502928495407,
-0.06391900032758713,
-0.056670818477869034,
-0.045185934752225876,
-0.05903537571430206,
0.14072102308273315,
-0.420553594827652,
-0.01358474139124155,
-0.5078691840171814,
0.340022474527359,
0.16105616092681885,
0.0025874883867800236,
0.17752929031848907,
-0.0925811380147934,
0.0479857474565506,
-0.15697577595710754,
0.3962930738925934,
0.3195856511592865,
0.1991414874792099,
-0.390832781791687,
-0.008995363488793373,
-0.4645191431045532,
-0.01863555796444416,
-0.2982347011566162,
0.11210089921951294,
-0.08143272995948792,
0.128655806183815,
0.0755082219839096,
0.21327190101146698,
0.03663254529237747,
0.045098282396793365,
0.0668024867773056,
0.4949166476726532,
-0.23153118789196014,
-0.24470388889312744,
-0.1948166936635971,
0.21916277706623077,
-0.15832379460334778,
-0.3909315764904022,
0.05759390443563461,
-0.1385609358549118,
0.03407329320907593,
-0.3200198709964752,
-0.06650041043758392,
0.09557262808084488,
0.005959891714155674,
0.33242854475975037,
0.15237803757190704,
0.5925302505493164,
-0.15409445762634277,
-0.20217695832252502,
-0.20867185294628143,
-0.01107005774974823,
-0.15993501245975494,
0.3116777539253235,
0.1967293620109558,
0.09890645742416382,
-0.16079366207122803,
-0.1119711846113205,
-0.02956446446478367,
0.2984873056411743,
-0.04481641948223114,
0.19492299854755402,
-0.366961807012558,
-0.38635703921318054,
0.05791765823960304,
0.11385614424943924,
0.1190270259976387,
0.04692619666457176,
-0.13085615634918213,
-0.05331842601299286,
-0.3421497344970703,
-0.30868643522262573,
0.38665443658828735,
-0.37730371952056885,
-0.569782018661499,
-0.09215481579303741,
0.007928847335278988,
0.04705679789185524,
0.19029778242111206,
-0.3660883903503418,
0.2775549292564392,
0.38977333903312683,
0.0513334646821022,
-0.15096791088581085,
0.1664217859506607,
0.028648633509874344,
-0.01621546596288681,
-0.09404341876506805,
0.11607009172439575,
-0.008284271694719791,
-0.3563149869441986,
-0.22058449685573578,
-0.39125844836235046
] |
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.2544982135295868,
-0.07792056351900101,
-0.15375836193561554,
0.43086668848991394,
0.39970290660858154,
0.35046160221099854,
0.1368504762649536,
0.5331581830978394,
0.1893271654844284,
0.02358449064195156,
-0.17730358242988586,
-0.09421747922897339,
0.0944037139415741,
0.01118418388068676,
-0.02970508299767971,
-0.4591735899448395,
-0.06729070842266083,
0.029537241905927658,
-0.13527131080627441,
-0.11689338088035583,
-0.2519627809524536,
0.1256147027015686,
-0.07917483150959015,
-0.049028921872377396,
-0.038745563477277756,
-0.18283987045288086,
-0.09583508968353271,
-0.20730535686016083,
-0.35074687004089355,
-0.24086447060108185,
0.35457777976989746,
0.019257333129644394,
0.310111939907074,
0.15299738943576813,
-0.0001114367987611331,
-0.05096485838294029,
0.3131166100502014,
-0.23579451441764832,
-0.29361215233802795,
-0.28885766863822937,
-0.07208975404500961,
-0.3261859714984894,
-0.0904388427734375,
-0.4200315475463867,
0.12744630873203278,
0.04668254777789116,
0.08067119866609573,
-0.1318010538816452,
0.07575744390487671,
0.2992253005504608,
0.24687129259109497,
-0.14260315895080566,
0.3134346008300781,
-0.14573781192302704,
0.3651963770389557,
-0.3777085542678833,
-0.028033748269081116,
0.33958613872528076,
0.21872088313102722,
0.07134268432855606,
0.2154792696237564,
0.22204306721687317,
-0.23414058983325958,
0.013499359600245953,
0.04822444170713425,
-0.29122394323349,
0.22220568358898163,
-0.6297016739845276,
0.5206419229507446,
0.5344284772872925,
0.8290327787399292,
-0.12835146486759186,
-0.0874670147895813,
0.07239186763763428,
-0.026059096679091454,
-0.031374186277389526,
-0.05574001744389534,
0.48197975754737854,
-0.189326211810112,
0.09759805351495743,
0.12616495788097382,
-0.12543036043643951,
-0.15671876072883606,
0.4228466749191284,
-0.1241367980837822,
0.4435881972312927,
-0.05271994322538376,
0.21125955879688263,
-0.02166694588959217,
-0.10270191729068756,
-0.26364216208457947,
-0.06965938210487366,
-0.09616027027368546,
0.29332154989242554,
-0.27939802408218384,
0.019635798409581184,
-0.16150179505348206,
0.055646974593400955,
0.35113525390625,
-0.15038315951824188,
-0.23462142050266266,
-0.045078106224536896,
0.09601062536239624,
0.15757444500923157,
0.1801503747701645,
0.16378308832645416,
0.06204820051789284,
-0.20000669360160828,
0.27828115224838257,
0.30790406465530396,
-0.08421199023723602,
-0.07617081701755524,
-0.21004319190979004,
-0.223056361079216,
-0.29475703835487366,
0.09442926198244095,
0.0875294879078865,
-0.2031715214252472,
-0.17794664204120636,
0.0071133277378976345,
-0.14436103403568268,
-0.019439060240983963,
-0.20239496231079102,
0.36282092332839966,
-0.15014290809631348,
0.43123859167099,
0.1779012233018875,
0.3288218379020691,
-0.10357259213924408,
-0.2613101005554199,
-0.01735217496752739,
0.3065483570098877,
-0.1393197476863861,
-0.10366039723157883,
0.21878290176391602,
-0.10991612076759338,
0.2648516893386841,
-0.08937210589647293,
-0.10313823819160461,
-0.17641228437423706,
-0.15369121730327606,
-0.3695678412914276,
-0.17910364270210266,
0.23040911555290222,
0.16197676956653595,
0.2839276194572449,
0.14761391282081604,
-0.2447475790977478,
-0.230580672621727,
0.1207452118396759,
-0.35961484909057617,
-0.16815488040447235,
-0.20515474677085876,
0.1944684386253357,
0.061098285019397736,
-0.054650310426950455,
-0.31600674986839294,
0.28766417503356934,
0.3030640184879303,
-0.1423991620540619,
0.11807280033826828,
-0.007546153385192156,
-0.02325410768389702,
-0.2251897156238556,
0.1790112406015396,
0.4908003509044647,
-0.3999600410461426,
0.09189733117818832,
-0.02385064773261547,
-0.033711988478899,
0.18978182971477509,
0.18429692089557648,
-0.17795272171497345,
0.25654125213623047,
-0.09788408875465393,
0.03816019371151924,
0.2101312130689621,
-0.3214418590068817,
-0.577635645866394,
0.18605385720729828,
0.11340946704149246,
-0.167003333568573,
0.09947936236858368,
0.016000675037503242,
0.27503055334091187,
-0.04938738793134689,
0.05245433375239372,
0.39567482471466064,
0.1368376910686493,
-0.10564488172531128,
-0.32745060324668884,
-0.5078234672546387,
0.32648178935050964,
0.16331782937049866,
0.4547145366668701,
-0.13227002322673798,
0.2759854197502136,
0.2917214632034302,
0.3191739618778229,
-0.19154758751392365,
0.1246788501739502,
0.23336054384708405,
-0.008948449045419693,
-0.044575244188308716,
-0.0025623058900237083,
-0.331027626991272,
-0.3097583055496216,
0.14775997400283813,
0.10291313380002975,
0.1654643714427948,
-0.1609552800655365,
0.02968333102762699,
-0.31618940830230713,
-0.08880764245986938,
-0.1953115314245224,
0.10326912999153137,
0.19956380128860474,
-0.10527704656124115,
0.11959313601255417,
0.4854589104652405,
0.12651655077934265,
-0.09945959597826004,
-0.41569027304649353,
-0.0948527380824089,
-0.17893452942371368,
0.09233184158802032,
-0.2174282670021057,
0.20449234545230865,
0.03368109092116356,
0.025809040293097496,
0.17968381941318512,
0.07305268943309784,
-0.16072392463684082,
-0.011061287485063076,
-0.07845237106084824,
-0.10354473441839218,
0.13546285033226013,
0.11696410179138184,
0.1331281214952469,
-0.4173752963542938,
0.19202983379364014,
0.10847938805818558,
0.32974642515182495,
-0.13577251136302948,
0.11781623959541321,
0.1222366914153099,
0.03997359797358513,
0.36553433537483215,
0.1234310120344162,
0.14983154833316803,
0.45559966564178467,
0.030526477843523026,
0.1263546198606491,
-0.0049747284501791,
0.32711923122406006,
0.15565995872020721,
0.012748918496072292,
-0.13295936584472656,
-0.029277890920639038,
-0.11351418495178223,
0.31667277216911316,
-0.08453383296728134,
0.2671484649181366,
0.2927594780921936,
-0.07651899755001068,
-0.0048597645945847034,
-0.09782715886831284,
0.15339849889278412,
0.052207596600055695,
0.06990519911050797,
0.10658899694681168,
-0.09984391927719116,
0.35964956879615784,
-0.12939266860485077,
0.2643094062805176,
0.17554204165935516,
0.1863328218460083,
0.20913559198379517,
0.1350802332162857,
-0.011175724677741528,
-0.1882825791835785,
-0.1296796202659607,
0.06999406963586807,
0.37171775102615356,
0.06918374449014664,
0.16594518721103668,
-0.048434533178806305,
-0.1418599635362625,
0.08419087529182434,
-0.05239205062389374,
-0.25094324350357056,
-0.2163173109292984,
-0.12563829123973846,
-0.0857284739613533,
0.0915834903717041,
-0.00010499619384063408,
-0.3266668915748596,
-0.07210199534893036,
0.062166281044483185,
-0.3203508257865906,
-0.1605679988861084,
-0.29812300205230713,
-0.36844977736473083,
0.07678736001253128,
0.3871299922466278,
0.11129014194011688,
0.2952096164226532,
-0.33262893557548523,
-0.19187885522842407,
-0.0899461880326271,
-0.2681114375591278,
-0.014313800260424614,
-0.15697041153907776,
0.24139511585235596,
-0.02411693148314953,
0.7152196168899536,
-0.17999617755413055,
-0.25142109394073486,
0.1846485435962677,
-0.007019855547696352,
0.06587454676628113,
0.24977140128612518,
-0.15347877144813538,
-0.04292391240596771,
0.08453571051359177,
-0.48565348982810974,
-0.5155765414237976,
-0.2696564793586731,
0.012519127689301968,
0.04851781949400902,
0.08780647814273834,
0.1686408817768097,
0.19248414039611816,
0.06802687048912048,
0.12118791043758392,
0.18090678751468658,
-0.19004330039024353,
-0.15186916291713715,
0.44968941807746887,
-0.02741352841258049,
-0.4299626648426056,
0.1881868541240692,
0.010994362644851208,
0.3149319291114807,
0.007927228696644306,
-0.6572360396385193,
0.14411282539367676,
-0.27635928988456726,
0.24994297325611115,
-0.02199326455593109,
0.18347719311714172,
0.11434390395879745,
-0.2136971652507782,
0.04797237366437912,
0.044995591044425964,
0.10590976476669312,
-0.0406210795044899,
-0.2095252424478531,
0.2556219696998596,
0.02994566597044468,
0.29618558287620544,
0.16442088782787323,
0.6888411045074463,
0.05485555902123451,
0.16584059596061707,
0.4367813467979431,
0.23858247697353363,
0.23103131353855133,
-0.2314291149377823,
-0.36457139253616333,
0.060574550181627274,
-0.23949159681797028,
-0.031003020703792572,
0.2670123875141144,
-0.1623198240995407,
-0.4674171507358551,
-0.34771260619163513,
-0.2426847368478775,
-0.36746740341186523,
-0.21077117323875427,
0.15399810671806335,
-0.05018192529678345,
0.08294021338224411,
0.057596296072006226,
0.12039868533611298,
0.02157370001077652,
-0.28234997391700745,
0.21378928422927856,
0.5317095518112183,
-0.2486015409231186,
0.16858960688114166,
-0.27826690673828125,
-0.34212231636047363,
-0.41263410449028015,
0.25245529413223267,
0.07770678400993347,
0.4147612154483795,
-0.0938025489449501,
0.3499189615249634,
0.201179638504982,
-0.08926890045404434,
0.29062291979789734,
-0.17024411261081696,
0.12305095046758652,
0.1972467452287674,
0.10499271005392075,
-0.2152172476053238,
-0.062439925968647,
-0.2943331301212311,
-0.01668798364698887,
0.30541670322418213,
-0.044455636292696,
-0.670965850353241,
0.08432900160551071,
-0.04258571192622185,
0.5003299713134766,
-0.0571771115064621,
-0.017350096255540848,
-0.16185656189918518,
-0.5653649568557739,
-0.4854041039943695,
-0.027687307447195053,
0.18957556784152985,
0.40460941195487976,
-0.19720959663391113,
0.2628990113735199,
-0.10207849740982056,
0.22056272625923157,
0.0213165320456028,
0.007735002785921097,
0.21325649321079254,
0.23278610408306122,
0.09743288904428482,
-0.19678789377212524,
-0.13784702122211456,
0.15032655000686646,
0.3620433211326599,
-0.06353224068880081,
-0.23431262373924255,
-0.1212475597858429,
-0.04300370439887047,
0.043483130633831024,
0.14154617488384247,
-0.10129068046808243,
0.047706928104162216,
0.14866341650485992,
-0.13793547451496124,
0.16582079231739044,
-0.012841412797570229,
0.25194650888442993,
-0.10633760690689087,
-0.4962351620197296,
-0.5676659941673279,
0.6620468497276306,
0.02338203601539135,
0.07014227658510208,
0.2541714310646057,
0.1754048466682434,
-0.1958611011505127,
0.37537339329719543,
0.10580281913280487,
1.1372194290161133,
-0.2281344085931778,
0.11042045056819916,
-0.10398449748754501,
0.10946617275476456,
0.3614170253276825,
-0.3578398525714874,
0.20840711891651154,
-0.322641521692276,
-0.10890696197748184,
-0.01951955258846283,
0.07367454469203949,
-0.046139009296894073,
0.09989327937364578,
-0.3072269558906555,
0.25644198060035706,
-0.36623305082321167,
-0.08695430308580399,
0.10564962774515152,
0.23298592865467072,
-0.4058893322944641,
-0.06803674250841141,
-0.32137972116470337,
0.11962879449129105,
-0.21466036140918732,
0.254692941904068,
-0.2110012322664261,
-0.12547852098941803,
-0.06142447516322136,
-0.2672702670097351,
-0.5050505995750427,
0.07064370810985565,
-0.288350373506546,
0.32986873388290405,
-0.489351361989975,
-0.1897745132446289,
0.33862072229385376,
0.44487127661705017,
0.04147944226861,
0.40315479040145874,
-0.2879834771156311,
0.11165224015712738,
-0.26386111974716187,
-0.4236195683479309,
0.0944913774728775,
0.011207422241568565,
0.08713383227586746,
-0.18162883818149567,
-0.37099048495292664,
0.16697321832180023,
-0.05757244676351547,
0.05284932628273964,
-0.09598754346370697,
0.1043776124715805,
0.2016545534133911,
-0.04589762166142464,
-0.3565550446510315,
-0.022283045575022697,
-0.09438576549291611,
-0.08943305909633636,
0.12416660040616989,
0.08219688385725021,
-0.11190381646156311,
0.14091330766677856,
0.18529561161994934,
-0.3349807858467102,
0.02179151214659214,
0.3491058945655823,
0.18344904482364655,
0.023953847587108612,
0.6245267987251282,
0.31554579734802246,
-0.39654064178466797,
-0.18981510400772095,
0.043914150446653366,
-0.2713772654533386,
-0.4585741460323334,
-0.08960501104593277,
-0.042189743369817734,
0.3383435606956482,
-0.41492870450019836,
0.3502538800239563,
0.1749066561460495,
-0.23483158648014069,
0.2064642459154129,
-0.7065883874893188,
-0.12402184307575226,
0.21609380841255188,
-0.07890909165143967,
0.006574691738933325,
0.08407121151685715,
-0.309599369764328,
0.12182832509279251,
0.23526333272457123,
-0.26108893752098083,
0.2092309594154358,
-0.3233412504196167,
0.10076379030942917,
0.09949403256177902,
0.06333232671022415,
0.022301556542515755,
0.19910256564617157,
0.06504800915718079,
0.06916136294603348,
-0.04966387152671814,
-0.2599099576473236,
-0.07022753357887268,
0.19481271505355835,
0.2051142156124115,
-0.05790087580680847,
0.2278750240802765,
-0.5071966052055359,
-0.16867001354694366,
0.08223892003297806,
-0.0584757924079895,
0.11558473110198975,
0.003859944175928831,
0.1811005026102066,
0.20132549107074738,
0.2885710895061493,
-0.3500802218914032,
0.24587810039520264,
-0.08690515905618668,
0.2614988088607788,
0.1408281922340393,
0.07593606412410736,
0.457992285490036,
0.021300675347447395,
-0.33520999550819397,
-0.033540841192007065,
-0.030077507719397545,
0.0866357684135437,
0.25588086247444153,
-0.23335890471935272,
0.30034759640693665,
0.19892065227031708,
-0.11749505251646042,
0.5623859763145447,
-0.14960452914237976,
0.206596240401268,
0.4130837917327881,
0.18722322583198547,
-0.3698635995388031,
0.0016460190527141094,
0.2932015657424927,
-0.09663724154233932,
-0.07098226249217987,
0.07596101611852646,
0.2589093744754791,
-0.32232800126075745,
0.11372043192386627,
-0.06573902070522308,
0.16478252410888672,
-0.056551460176706314,
0.19225868582725525,
0.6700765490531921,
0.2270732969045639,
0.04992593079805374,
-0.06946466118097305,
0.16999314725399017,
0.09539465606212616,
0.3628067076206207,
-0.22345639765262604,
0.19276364147663116,
-0.05200393125414848,
0.02463502623140812,
-0.1621609479188919,
-0.34005627036094666,
0.29861143231391907,
0.16320201754570007,
-0.02477441169321537,
0.09867644309997559,
-0.17225758731365204,
0.2616477310657501,
0.15435947477817535,
0.03022313117980957,
-0.2611556351184845,
0.1914432793855667,
-0.12247762084007263,
-0.012982700951397419,
-0.04421001672744751,
-0.2680072486400604,
0.0015670889988541603,
0.15562628209590912,
-0.004662046674638987,
-0.356573224067688,
0.255573570728302,
0.3037431836128235,
-0.24408632516860962,
-0.4411398768424988,
0.13480910658836365,
0.21249282360076904,
0.03117045760154724,
-0.3002210855484009,
0.15776105225086212,
0.41378054022789,
0.07809220999479294,
-0.12705518305301666,
0.20191627740859985,
0.44334620237350464,
0.4205476641654968,
-0.3373264670372009,
0.04244129732251167,
0.0753406435251236,
-0.0656806230545044,
-0.023378871381282806,
0.22761006653308868,
0.4672245979309082,
0.2502681314945221,
0.39701032638549805,
0.11842593550682068,
-0.14159998297691345,
-0.03197537362575531,
0.2360502928495407,
-0.06391900032758713,
-0.056670818477869034,
-0.045185934752225876,
-0.05903537571430206,
0.14072102308273315,
-0.420553594827652,
-0.01358474139124155,
-0.5078691840171814,
0.340022474527359,
0.16105616092681885,
0.0025874883867800236,
0.17752929031848907,
-0.0925811380147934,
0.0479857474565506,
-0.15697577595710754,
0.3962930738925934,
0.3195856511592865,
0.1991414874792099,
-0.390832781791687,
-0.008995363488793373,
-0.4645191431045532,
-0.01863555796444416,
-0.2982347011566162,
0.11210089921951294,
-0.08143272995948792,
0.128655806183815,
0.0755082219839096,
0.21327190101146698,
0.03663254529237747,
0.045098282396793365,
0.0668024867773056,
0.4949166476726532,
-0.23153118789196014,
-0.24470388889312744,
-0.1948166936635971,
0.21916277706623077,
-0.15832379460334778,
-0.3909315764904022,
0.05759390443563461,
-0.1385609358549118,
0.03407329320907593,
-0.3200198709964752,
-0.06650041043758392,
0.09557262808084488,
0.005959891714155674,
0.33242854475975037,
0.15237803757190704,
0.5925302505493164,
-0.15409445762634277,
-0.20217695832252502,
-0.20867185294628143,
-0.01107005774974823,
-0.15993501245975494,
0.3116777539253235,
0.1967293620109558,
0.09890645742416382,
-0.16079366207122803,
-0.1119711846113205,
-0.02956446446478367,
0.2984873056411743,
-0.04481641948223114,
0.19492299854755402,
-0.366961807012558,
-0.38635703921318054,
0.05791765823960304,
0.11385614424943924,
0.1190270259976387,
0.04692619666457176,
-0.13085615634918213,
-0.05331842601299286,
-0.3421497344970703,
-0.30868643522262573,
0.38665443658828735,
-0.37730371952056885,
-0.569782018661499,
-0.09215481579303741,
0.007928847335278988,
0.04705679789185524,
0.19029778242111206,
-0.3660883903503418,
0.2775549292564392,
0.38977333903312683,
0.0513334646821022,
-0.15096791088581085,
0.1664217859506607,
0.028648633509874344,
-0.01621546596288681,
-0.09404341876506805,
0.11607009172439575,
-0.008284271694719791,
-0.3563149869441986,
-0.22058449685573578,
-0.39125844836235046
] |
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.2544982135295868,
-0.07792056351900101,
-0.15375836193561554,
0.43086668848991394,
0.39970290660858154,
0.35046160221099854,
0.1368504762649536,
0.5331581830978394,
0.1893271654844284,
0.02358449064195156,
-0.17730358242988586,
-0.09421747922897339,
0.0944037139415741,
0.01118418388068676,
-0.02970508299767971,
-0.4591735899448395,
-0.06729070842266083,
0.029537241905927658,
-0.13527131080627441,
-0.11689338088035583,
-0.2519627809524536,
0.1256147027015686,
-0.07917483150959015,
-0.049028921872377396,
-0.038745563477277756,
-0.18283987045288086,
-0.09583508968353271,
-0.20730535686016083,
-0.35074687004089355,
-0.24086447060108185,
0.35457777976989746,
0.019257333129644394,
0.310111939907074,
0.15299738943576813,
-0.0001114367987611331,
-0.05096485838294029,
0.3131166100502014,
-0.23579451441764832,
-0.29361215233802795,
-0.28885766863822937,
-0.07208975404500961,
-0.3261859714984894,
-0.0904388427734375,
-0.4200315475463867,
0.12744630873203278,
0.04668254777789116,
0.08067119866609573,
-0.1318010538816452,
0.07575744390487671,
0.2992253005504608,
0.24687129259109497,
-0.14260315895080566,
0.3134346008300781,
-0.14573781192302704,
0.3651963770389557,
-0.3777085542678833,
-0.028033748269081116,
0.33958613872528076,
0.21872088313102722,
0.07134268432855606,
0.2154792696237564,
0.22204306721687317,
-0.23414058983325958,
0.013499359600245953,
0.04822444170713425,
-0.29122394323349,
0.22220568358898163,
-0.6297016739845276,
0.5206419229507446,
0.5344284772872925,
0.8290327787399292,
-0.12835146486759186,
-0.0874670147895813,
0.07239186763763428,
-0.026059096679091454,
-0.031374186277389526,
-0.05574001744389534,
0.48197975754737854,
-0.189326211810112,
0.09759805351495743,
0.12616495788097382,
-0.12543036043643951,
-0.15671876072883606,
0.4228466749191284,
-0.1241367980837822,
0.4435881972312927,
-0.05271994322538376,
0.21125955879688263,
-0.02166694588959217,
-0.10270191729068756,
-0.26364216208457947,
-0.06965938210487366,
-0.09616027027368546,
0.29332154989242554,
-0.27939802408218384,
0.019635798409581184,
-0.16150179505348206,
0.055646974593400955,
0.35113525390625,
-0.15038315951824188,
-0.23462142050266266,
-0.045078106224536896,
0.09601062536239624,
0.15757444500923157,
0.1801503747701645,
0.16378308832645416,
0.06204820051789284,
-0.20000669360160828,
0.27828115224838257,
0.30790406465530396,
-0.08421199023723602,
-0.07617081701755524,
-0.21004319190979004,
-0.223056361079216,
-0.29475703835487366,
0.09442926198244095,
0.0875294879078865,
-0.2031715214252472,
-0.17794664204120636,
0.0071133277378976345,
-0.14436103403568268,
-0.019439060240983963,
-0.20239496231079102,
0.36282092332839966,
-0.15014290809631348,
0.43123859167099,
0.1779012233018875,
0.3288218379020691,
-0.10357259213924408,
-0.2613101005554199,
-0.01735217496752739,
0.3065483570098877,
-0.1393197476863861,
-0.10366039723157883,
0.21878290176391602,
-0.10991612076759338,
0.2648516893386841,
-0.08937210589647293,
-0.10313823819160461,
-0.17641228437423706,
-0.15369121730327606,
-0.3695678412914276,
-0.17910364270210266,
0.23040911555290222,
0.16197676956653595,
0.2839276194572449,
0.14761391282081604,
-0.2447475790977478,
-0.230580672621727,
0.1207452118396759,
-0.35961484909057617,
-0.16815488040447235,
-0.20515474677085876,
0.1944684386253357,
0.061098285019397736,
-0.054650310426950455,
-0.31600674986839294,
0.28766417503356934,
0.3030640184879303,
-0.1423991620540619,
0.11807280033826828,
-0.007546153385192156,
-0.02325410768389702,
-0.2251897156238556,
0.1790112406015396,
0.4908003509044647,
-0.3999600410461426,
0.09189733117818832,
-0.02385064773261547,
-0.033711988478899,
0.18978182971477509,
0.18429692089557648,
-0.17795272171497345,
0.25654125213623047,
-0.09788408875465393,
0.03816019371151924,
0.2101312130689621,
-0.3214418590068817,
-0.577635645866394,
0.18605385720729828,
0.11340946704149246,
-0.167003333568573,
0.09947936236858368,
0.016000675037503242,
0.27503055334091187,
-0.04938738793134689,
0.05245433375239372,
0.39567482471466064,
0.1368376910686493,
-0.10564488172531128,
-0.32745060324668884,
-0.5078234672546387,
0.32648178935050964,
0.16331782937049866,
0.4547145366668701,
-0.13227002322673798,
0.2759854197502136,
0.2917214632034302,
0.3191739618778229,
-0.19154758751392365,
0.1246788501739502,
0.23336054384708405,
-0.008948449045419693,
-0.044575244188308716,
-0.0025623058900237083,
-0.331027626991272,
-0.3097583055496216,
0.14775997400283813,
0.10291313380002975,
0.1654643714427948,
-0.1609552800655365,
0.02968333102762699,
-0.31618940830230713,
-0.08880764245986938,
-0.1953115314245224,
0.10326912999153137,
0.19956380128860474,
-0.10527704656124115,
0.11959313601255417,
0.4854589104652405,
0.12651655077934265,
-0.09945959597826004,
-0.41569027304649353,
-0.0948527380824089,
-0.17893452942371368,
0.09233184158802032,
-0.2174282670021057,
0.20449234545230865,
0.03368109092116356,
0.025809040293097496,
0.17968381941318512,
0.07305268943309784,
-0.16072392463684082,
-0.011061287485063076,
-0.07845237106084824,
-0.10354473441839218,
0.13546285033226013,
0.11696410179138184,
0.1331281214952469,
-0.4173752963542938,
0.19202983379364014,
0.10847938805818558,
0.32974642515182495,
-0.13577251136302948,
0.11781623959541321,
0.1222366914153099,
0.03997359797358513,
0.36553433537483215,
0.1234310120344162,
0.14983154833316803,
0.45559966564178467,
0.030526477843523026,
0.1263546198606491,
-0.0049747284501791,
0.32711923122406006,
0.15565995872020721,
0.012748918496072292,
-0.13295936584472656,
-0.029277890920639038,
-0.11351418495178223,
0.31667277216911316,
-0.08453383296728134,
0.2671484649181366,
0.2927594780921936,
-0.07651899755001068,
-0.0048597645945847034,
-0.09782715886831284,
0.15339849889278412,
0.052207596600055695,
0.06990519911050797,
0.10658899694681168,
-0.09984391927719116,
0.35964956879615784,
-0.12939266860485077,
0.2643094062805176,
0.17554204165935516,
0.1863328218460083,
0.20913559198379517,
0.1350802332162857,
-0.011175724677741528,
-0.1882825791835785,
-0.1296796202659607,
0.06999406963586807,
0.37171775102615356,
0.06918374449014664,
0.16594518721103668,
-0.048434533178806305,
-0.1418599635362625,
0.08419087529182434,
-0.05239205062389374,
-0.25094324350357056,
-0.2163173109292984,
-0.12563829123973846,
-0.0857284739613533,
0.0915834903717041,
-0.00010499619384063408,
-0.3266668915748596,
-0.07210199534893036,
0.062166281044483185,
-0.3203508257865906,
-0.1605679988861084,
-0.29812300205230713,
-0.36844977736473083,
0.07678736001253128,
0.3871299922466278,
0.11129014194011688,
0.2952096164226532,
-0.33262893557548523,
-0.19187885522842407,
-0.0899461880326271,
-0.2681114375591278,
-0.014313800260424614,
-0.15697041153907776,
0.24139511585235596,
-0.02411693148314953,
0.7152196168899536,
-0.17999617755413055,
-0.25142109394073486,
0.1846485435962677,
-0.007019855547696352,
0.06587454676628113,
0.24977140128612518,
-0.15347877144813538,
-0.04292391240596771,
0.08453571051359177,
-0.48565348982810974,
-0.5155765414237976,
-0.2696564793586731,
0.012519127689301968,
0.04851781949400902,
0.08780647814273834,
0.1686408817768097,
0.19248414039611816,
0.06802687048912048,
0.12118791043758392,
0.18090678751468658,
-0.19004330039024353,
-0.15186916291713715,
0.44968941807746887,
-0.02741352841258049,
-0.4299626648426056,
0.1881868541240692,
0.010994362644851208,
0.3149319291114807,
0.007927228696644306,
-0.6572360396385193,
0.14411282539367676,
-0.27635928988456726,
0.24994297325611115,
-0.02199326455593109,
0.18347719311714172,
0.11434390395879745,
-0.2136971652507782,
0.04797237366437912,
0.044995591044425964,
0.10590976476669312,
-0.0406210795044899,
-0.2095252424478531,
0.2556219696998596,
0.02994566597044468,
0.29618558287620544,
0.16442088782787323,
0.6888411045074463,
0.05485555902123451,
0.16584059596061707,
0.4367813467979431,
0.23858247697353363,
0.23103131353855133,
-0.2314291149377823,
-0.36457139253616333,
0.060574550181627274,
-0.23949159681797028,
-0.031003020703792572,
0.2670123875141144,
-0.1623198240995407,
-0.4674171507358551,
-0.34771260619163513,
-0.2426847368478775,
-0.36746740341186523,
-0.21077117323875427,
0.15399810671806335,
-0.05018192529678345,
0.08294021338224411,
0.057596296072006226,
0.12039868533611298,
0.02157370001077652,
-0.28234997391700745,
0.21378928422927856,
0.5317095518112183,
-0.2486015409231186,
0.16858960688114166,
-0.27826690673828125,
-0.34212231636047363,
-0.41263410449028015,
0.25245529413223267,
0.07770678400993347,
0.4147612154483795,
-0.0938025489449501,
0.3499189615249634,
0.201179638504982,
-0.08926890045404434,
0.29062291979789734,
-0.17024411261081696,
0.12305095046758652,
0.1972467452287674,
0.10499271005392075,
-0.2152172476053238,
-0.062439925968647,
-0.2943331301212311,
-0.01668798364698887,
0.30541670322418213,
-0.044455636292696,
-0.670965850353241,
0.08432900160551071,
-0.04258571192622185,
0.5003299713134766,
-0.0571771115064621,
-0.017350096255540848,
-0.16185656189918518,
-0.5653649568557739,
-0.4854041039943695,
-0.027687307447195053,
0.18957556784152985,
0.40460941195487976,
-0.19720959663391113,
0.2628990113735199,
-0.10207849740982056,
0.22056272625923157,
0.0213165320456028,
0.007735002785921097,
0.21325649321079254,
0.23278610408306122,
0.09743288904428482,
-0.19678789377212524,
-0.13784702122211456,
0.15032655000686646,
0.3620433211326599,
-0.06353224068880081,
-0.23431262373924255,
-0.1212475597858429,
-0.04300370439887047,
0.043483130633831024,
0.14154617488384247,
-0.10129068046808243,
0.047706928104162216,
0.14866341650485992,
-0.13793547451496124,
0.16582079231739044,
-0.012841412797570229,
0.25194650888442993,
-0.10633760690689087,
-0.4962351620197296,
-0.5676659941673279,
0.6620468497276306,
0.02338203601539135,
0.07014227658510208,
0.2541714310646057,
0.1754048466682434,
-0.1958611011505127,
0.37537339329719543,
0.10580281913280487,
1.1372194290161133,
-0.2281344085931778,
0.11042045056819916,
-0.10398449748754501,
0.10946617275476456,
0.3614170253276825,
-0.3578398525714874,
0.20840711891651154,
-0.322641521692276,
-0.10890696197748184,
-0.01951955258846283,
0.07367454469203949,
-0.046139009296894073,
0.09989327937364578,
-0.3072269558906555,
0.25644198060035706,
-0.36623305082321167,
-0.08695430308580399,
0.10564962774515152,
0.23298592865467072,
-0.4058893322944641,
-0.06803674250841141,
-0.32137972116470337,
0.11962879449129105,
-0.21466036140918732,
0.254692941904068,
-0.2110012322664261,
-0.12547852098941803,
-0.06142447516322136,
-0.2672702670097351,
-0.5050505995750427,
0.07064370810985565,
-0.288350373506546,
0.32986873388290405,
-0.489351361989975,
-0.1897745132446289,
0.33862072229385376,
0.44487127661705017,
0.04147944226861,
0.40315479040145874,
-0.2879834771156311,
0.11165224015712738,
-0.26386111974716187,
-0.4236195683479309,
0.0944913774728775,
0.011207422241568565,
0.08713383227586746,
-0.18162883818149567,
-0.37099048495292664,
0.16697321832180023,
-0.05757244676351547,
0.05284932628273964,
-0.09598754346370697,
0.1043776124715805,
0.2016545534133911,
-0.04589762166142464,
-0.3565550446510315,
-0.022283045575022697,
-0.09438576549291611,
-0.08943305909633636,
0.12416660040616989,
0.08219688385725021,
-0.11190381646156311,
0.14091330766677856,
0.18529561161994934,
-0.3349807858467102,
0.02179151214659214,
0.3491058945655823,
0.18344904482364655,
0.023953847587108612,
0.6245267987251282,
0.31554579734802246,
-0.39654064178466797,
-0.18981510400772095,
0.043914150446653366,
-0.2713772654533386,
-0.4585741460323334,
-0.08960501104593277,
-0.042189743369817734,
0.3383435606956482,
-0.41492870450019836,
0.3502538800239563,
0.1749066561460495,
-0.23483158648014069,
0.2064642459154129,
-0.7065883874893188,
-0.12402184307575226,
0.21609380841255188,
-0.07890909165143967,
0.006574691738933325,
0.08407121151685715,
-0.309599369764328,
0.12182832509279251,
0.23526333272457123,
-0.26108893752098083,
0.2092309594154358,
-0.3233412504196167,
0.10076379030942917,
0.09949403256177902,
0.06333232671022415,
0.022301556542515755,
0.19910256564617157,
0.06504800915718079,
0.06916136294603348,
-0.04966387152671814,
-0.2599099576473236,
-0.07022753357887268,
0.19481271505355835,
0.2051142156124115,
-0.05790087580680847,
0.2278750240802765,
-0.5071966052055359,
-0.16867001354694366,
0.08223892003297806,
-0.0584757924079895,
0.11558473110198975,
0.003859944175928831,
0.1811005026102066,
0.20132549107074738,
0.2885710895061493,
-0.3500802218914032,
0.24587810039520264,
-0.08690515905618668,
0.2614988088607788,
0.1408281922340393,
0.07593606412410736,
0.457992285490036,
0.021300675347447395,
-0.33520999550819397,
-0.033540841192007065,
-0.030077507719397545,
0.0866357684135437,
0.25588086247444153,
-0.23335890471935272,
0.30034759640693665,
0.19892065227031708,
-0.11749505251646042,
0.5623859763145447,
-0.14960452914237976,
0.206596240401268,
0.4130837917327881,
0.18722322583198547,
-0.3698635995388031,
0.0016460190527141094,
0.2932015657424927,
-0.09663724154233932,
-0.07098226249217987,
0.07596101611852646,
0.2589093744754791,
-0.32232800126075745,
0.11372043192386627,
-0.06573902070522308,
0.16478252410888672,
-0.056551460176706314,
0.19225868582725525,
0.6700765490531921,
0.2270732969045639,
0.04992593079805374,
-0.06946466118097305,
0.16999314725399017,
0.09539465606212616,
0.3628067076206207,
-0.22345639765262604,
0.19276364147663116,
-0.05200393125414848,
0.02463502623140812,
-0.1621609479188919,
-0.34005627036094666,
0.29861143231391907,
0.16320201754570007,
-0.02477441169321537,
0.09867644309997559,
-0.17225758731365204,
0.2616477310657501,
0.15435947477817535,
0.03022313117980957,
-0.2611556351184845,
0.1914432793855667,
-0.12247762084007263,
-0.012982700951397419,
-0.04421001672744751,
-0.2680072486400604,
0.0015670889988541603,
0.15562628209590912,
-0.004662046674638987,
-0.356573224067688,
0.255573570728302,
0.3037431836128235,
-0.24408632516860962,
-0.4411398768424988,
0.13480910658836365,
0.21249282360076904,
0.03117045760154724,
-0.3002210855484009,
0.15776105225086212,
0.41378054022789,
0.07809220999479294,
-0.12705518305301666,
0.20191627740859985,
0.44334620237350464,
0.4205476641654968,
-0.3373264670372009,
0.04244129732251167,
0.0753406435251236,
-0.0656806230545044,
-0.023378871381282806,
0.22761006653308868,
0.4672245979309082,
0.2502681314945221,
0.39701032638549805,
0.11842593550682068,
-0.14159998297691345,
-0.03197537362575531,
0.2360502928495407,
-0.06391900032758713,
-0.056670818477869034,
-0.045185934752225876,
-0.05903537571430206,
0.14072102308273315,
-0.420553594827652,
-0.01358474139124155,
-0.5078691840171814,
0.340022474527359,
0.16105616092681885,
0.0025874883867800236,
0.17752929031848907,
-0.0925811380147934,
0.0479857474565506,
-0.15697577595710754,
0.3962930738925934,
0.3195856511592865,
0.1991414874792099,
-0.390832781791687,
-0.008995363488793373,
-0.4645191431045532,
-0.01863555796444416,
-0.2982347011566162,
0.11210089921951294,
-0.08143272995948792,
0.128655806183815,
0.0755082219839096,
0.21327190101146698,
0.03663254529237747,
0.045098282396793365,
0.0668024867773056,
0.4949166476726532,
-0.23153118789196014,
-0.24470388889312744,
-0.1948166936635971,
0.21916277706623077,
-0.15832379460334778,
-0.3909315764904022,
0.05759390443563461,
-0.1385609358549118,
0.03407329320907593,
-0.3200198709964752,
-0.06650041043758392,
0.09557262808084488,
0.005959891714155674,
0.33242854475975037,
0.15237803757190704,
0.5925302505493164,
-0.15409445762634277,
-0.20217695832252502,
-0.20867185294628143,
-0.01107005774974823,
-0.15993501245975494,
0.3116777539253235,
0.1967293620109558,
0.09890645742416382,
-0.16079366207122803,
-0.1119711846113205,
-0.02956446446478367,
0.2984873056411743,
-0.04481641948223114,
0.19492299854755402,
-0.366961807012558,
-0.38635703921318054,
0.05791765823960304,
0.11385614424943924,
0.1190270259976387,
0.04692619666457176,
-0.13085615634918213,
-0.05331842601299286,
-0.3421497344970703,
-0.30868643522262573,
0.38665443658828735,
-0.37730371952056885,
-0.569782018661499,
-0.09215481579303741,
0.007928847335278988,
0.04705679789185524,
0.19029778242111206,
-0.3660883903503418,
0.2775549292564392,
0.38977333903312683,
0.0513334646821022,
-0.15096791088581085,
0.1664217859506607,
0.028648633509874344,
-0.01621546596288681,
-0.09404341876506805,
0.11607009172439575,
-0.008284271694719791,
-0.3563149869441986,
-0.22058449685573578,
-0.39125844836235046
] |
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.2544982135295868,
-0.07792056351900101,
-0.15375836193561554,
0.43086668848991394,
0.39970290660858154,
0.35046160221099854,
0.1368504762649536,
0.5331581830978394,
0.1893271654844284,
0.02358449064195156,
-0.17730358242988586,
-0.09421747922897339,
0.0944037139415741,
0.01118418388068676,
-0.02970508299767971,
-0.4591735899448395,
-0.06729070842266083,
0.029537241905927658,
-0.13527131080627441,
-0.11689338088035583,
-0.2519627809524536,
0.1256147027015686,
-0.07917483150959015,
-0.049028921872377396,
-0.038745563477277756,
-0.18283987045288086,
-0.09583508968353271,
-0.20730535686016083,
-0.35074687004089355,
-0.24086447060108185,
0.35457777976989746,
0.019257333129644394,
0.310111939907074,
0.15299738943576813,
-0.0001114367987611331,
-0.05096485838294029,
0.3131166100502014,
-0.23579451441764832,
-0.29361215233802795,
-0.28885766863822937,
-0.07208975404500961,
-0.3261859714984894,
-0.0904388427734375,
-0.4200315475463867,
0.12744630873203278,
0.04668254777789116,
0.08067119866609573,
-0.1318010538816452,
0.07575744390487671,
0.2992253005504608,
0.24687129259109497,
-0.14260315895080566,
0.3134346008300781,
-0.14573781192302704,
0.3651963770389557,
-0.3777085542678833,
-0.028033748269081116,
0.33958613872528076,
0.21872088313102722,
0.07134268432855606,
0.2154792696237564,
0.22204306721687317,
-0.23414058983325958,
0.013499359600245953,
0.04822444170713425,
-0.29122394323349,
0.22220568358898163,
-0.6297016739845276,
0.5206419229507446,
0.5344284772872925,
0.8290327787399292,
-0.12835146486759186,
-0.0874670147895813,
0.07239186763763428,
-0.026059096679091454,
-0.031374186277389526,
-0.05574001744389534,
0.48197975754737854,
-0.189326211810112,
0.09759805351495743,
0.12616495788097382,
-0.12543036043643951,
-0.15671876072883606,
0.4228466749191284,
-0.1241367980837822,
0.4435881972312927,
-0.05271994322538376,
0.21125955879688263,
-0.02166694588959217,
-0.10270191729068756,
-0.26364216208457947,
-0.06965938210487366,
-0.09616027027368546,
0.29332154989242554,
-0.27939802408218384,
0.019635798409581184,
-0.16150179505348206,
0.055646974593400955,
0.35113525390625,
-0.15038315951824188,
-0.23462142050266266,
-0.045078106224536896,
0.09601062536239624,
0.15757444500923157,
0.1801503747701645,
0.16378308832645416,
0.06204820051789284,
-0.20000669360160828,
0.27828115224838257,
0.30790406465530396,
-0.08421199023723602,
-0.07617081701755524,
-0.21004319190979004,
-0.223056361079216,
-0.29475703835487366,
0.09442926198244095,
0.0875294879078865,
-0.2031715214252472,
-0.17794664204120636,
0.0071133277378976345,
-0.14436103403568268,
-0.019439060240983963,
-0.20239496231079102,
0.36282092332839966,
-0.15014290809631348,
0.43123859167099,
0.1779012233018875,
0.3288218379020691,
-0.10357259213924408,
-0.2613101005554199,
-0.01735217496752739,
0.3065483570098877,
-0.1393197476863861,
-0.10366039723157883,
0.21878290176391602,
-0.10991612076759338,
0.2648516893386841,
-0.08937210589647293,
-0.10313823819160461,
-0.17641228437423706,
-0.15369121730327606,
-0.3695678412914276,
-0.17910364270210266,
0.23040911555290222,
0.16197676956653595,
0.2839276194572449,
0.14761391282081604,
-0.2447475790977478,
-0.230580672621727,
0.1207452118396759,
-0.35961484909057617,
-0.16815488040447235,
-0.20515474677085876,
0.1944684386253357,
0.061098285019397736,
-0.054650310426950455,
-0.31600674986839294,
0.28766417503356934,
0.3030640184879303,
-0.1423991620540619,
0.11807280033826828,
-0.007546153385192156,
-0.02325410768389702,
-0.2251897156238556,
0.1790112406015396,
0.4908003509044647,
-0.3999600410461426,
0.09189733117818832,
-0.02385064773261547,
-0.033711988478899,
0.18978182971477509,
0.18429692089557648,
-0.17795272171497345,
0.25654125213623047,
-0.09788408875465393,
0.03816019371151924,
0.2101312130689621,
-0.3214418590068817,
-0.577635645866394,
0.18605385720729828,
0.11340946704149246,
-0.167003333568573,
0.09947936236858368,
0.016000675037503242,
0.27503055334091187,
-0.04938738793134689,
0.05245433375239372,
0.39567482471466064,
0.1368376910686493,
-0.10564488172531128,
-0.32745060324668884,
-0.5078234672546387,
0.32648178935050964,
0.16331782937049866,
0.4547145366668701,
-0.13227002322673798,
0.2759854197502136,
0.2917214632034302,
0.3191739618778229,
-0.19154758751392365,
0.1246788501739502,
0.23336054384708405,
-0.008948449045419693,
-0.044575244188308716,
-0.0025623058900237083,
-0.331027626991272,
-0.3097583055496216,
0.14775997400283813,
0.10291313380002975,
0.1654643714427948,
-0.1609552800655365,
0.02968333102762699,
-0.31618940830230713,
-0.08880764245986938,
-0.1953115314245224,
0.10326912999153137,
0.19956380128860474,
-0.10527704656124115,
0.11959313601255417,
0.4854589104652405,
0.12651655077934265,
-0.09945959597826004,
-0.41569027304649353,
-0.0948527380824089,
-0.17893452942371368,
0.09233184158802032,
-0.2174282670021057,
0.20449234545230865,
0.03368109092116356,
0.025809040293097496,
0.17968381941318512,
0.07305268943309784,
-0.16072392463684082,
-0.011061287485063076,
-0.07845237106084824,
-0.10354473441839218,
0.13546285033226013,
0.11696410179138184,
0.1331281214952469,
-0.4173752963542938,
0.19202983379364014,
0.10847938805818558,
0.32974642515182495,
-0.13577251136302948,
0.11781623959541321,
0.1222366914153099,
0.03997359797358513,
0.36553433537483215,
0.1234310120344162,
0.14983154833316803,
0.45559966564178467,
0.030526477843523026,
0.1263546198606491,
-0.0049747284501791,
0.32711923122406006,
0.15565995872020721,
0.012748918496072292,
-0.13295936584472656,
-0.029277890920639038,
-0.11351418495178223,
0.31667277216911316,
-0.08453383296728134,
0.2671484649181366,
0.2927594780921936,
-0.07651899755001068,
-0.0048597645945847034,
-0.09782715886831284,
0.15339849889278412,
0.052207596600055695,
0.06990519911050797,
0.10658899694681168,
-0.09984391927719116,
0.35964956879615784,
-0.12939266860485077,
0.2643094062805176,
0.17554204165935516,
0.1863328218460083,
0.20913559198379517,
0.1350802332162857,
-0.011175724677741528,
-0.1882825791835785,
-0.1296796202659607,
0.06999406963586807,
0.37171775102615356,
0.06918374449014664,
0.16594518721103668,
-0.048434533178806305,
-0.1418599635362625,
0.08419087529182434,
-0.05239205062389374,
-0.25094324350357056,
-0.2163173109292984,
-0.12563829123973846,
-0.0857284739613533,
0.0915834903717041,
-0.00010499619384063408,
-0.3266668915748596,
-0.07210199534893036,
0.062166281044483185,
-0.3203508257865906,
-0.1605679988861084,
-0.29812300205230713,
-0.36844977736473083,
0.07678736001253128,
0.3871299922466278,
0.11129014194011688,
0.2952096164226532,
-0.33262893557548523,
-0.19187885522842407,
-0.0899461880326271,
-0.2681114375591278,
-0.014313800260424614,
-0.15697041153907776,
0.24139511585235596,
-0.02411693148314953,
0.7152196168899536,
-0.17999617755413055,
-0.25142109394073486,
0.1846485435962677,
-0.007019855547696352,
0.06587454676628113,
0.24977140128612518,
-0.15347877144813538,
-0.04292391240596771,
0.08453571051359177,
-0.48565348982810974,
-0.5155765414237976,
-0.2696564793586731,
0.012519127689301968,
0.04851781949400902,
0.08780647814273834,
0.1686408817768097,
0.19248414039611816,
0.06802687048912048,
0.12118791043758392,
0.18090678751468658,
-0.19004330039024353,
-0.15186916291713715,
0.44968941807746887,
-0.02741352841258049,
-0.4299626648426056,
0.1881868541240692,
0.010994362644851208,
0.3149319291114807,
0.007927228696644306,
-0.6572360396385193,
0.14411282539367676,
-0.27635928988456726,
0.24994297325611115,
-0.02199326455593109,
0.18347719311714172,
0.11434390395879745,
-0.2136971652507782,
0.04797237366437912,
0.044995591044425964,
0.10590976476669312,
-0.0406210795044899,
-0.2095252424478531,
0.2556219696998596,
0.02994566597044468,
0.29618558287620544,
0.16442088782787323,
0.6888411045074463,
0.05485555902123451,
0.16584059596061707,
0.4367813467979431,
0.23858247697353363,
0.23103131353855133,
-0.2314291149377823,
-0.36457139253616333,
0.060574550181627274,
-0.23949159681797028,
-0.031003020703792572,
0.2670123875141144,
-0.1623198240995407,
-0.4674171507358551,
-0.34771260619163513,
-0.2426847368478775,
-0.36746740341186523,
-0.21077117323875427,
0.15399810671806335,
-0.05018192529678345,
0.08294021338224411,
0.057596296072006226,
0.12039868533611298,
0.02157370001077652,
-0.28234997391700745,
0.21378928422927856,
0.5317095518112183,
-0.2486015409231186,
0.16858960688114166,
-0.27826690673828125,
-0.34212231636047363,
-0.41263410449028015,
0.25245529413223267,
0.07770678400993347,
0.4147612154483795,
-0.0938025489449501,
0.3499189615249634,
0.201179638504982,
-0.08926890045404434,
0.29062291979789734,
-0.17024411261081696,
0.12305095046758652,
0.1972467452287674,
0.10499271005392075,
-0.2152172476053238,
-0.062439925968647,
-0.2943331301212311,
-0.01668798364698887,
0.30541670322418213,
-0.044455636292696,
-0.670965850353241,
0.08432900160551071,
-0.04258571192622185,
0.5003299713134766,
-0.0571771115064621,
-0.017350096255540848,
-0.16185656189918518,
-0.5653649568557739,
-0.4854041039943695,
-0.027687307447195053,
0.18957556784152985,
0.40460941195487976,
-0.19720959663391113,
0.2628990113735199,
-0.10207849740982056,
0.22056272625923157,
0.0213165320456028,
0.007735002785921097,
0.21325649321079254,
0.23278610408306122,
0.09743288904428482,
-0.19678789377212524,
-0.13784702122211456,
0.15032655000686646,
0.3620433211326599,
-0.06353224068880081,
-0.23431262373924255,
-0.1212475597858429,
-0.04300370439887047,
0.043483130633831024,
0.14154617488384247,
-0.10129068046808243,
0.047706928104162216,
0.14866341650485992,
-0.13793547451496124,
0.16582079231739044,
-0.012841412797570229,
0.25194650888442993,
-0.10633760690689087,
-0.4962351620197296,
-0.5676659941673279,
0.6620468497276306,
0.02338203601539135,
0.07014227658510208,
0.2541714310646057,
0.1754048466682434,
-0.1958611011505127,
0.37537339329719543,
0.10580281913280487,
1.1372194290161133,
-0.2281344085931778,
0.11042045056819916,
-0.10398449748754501,
0.10946617275476456,
0.3614170253276825,
-0.3578398525714874,
0.20840711891651154,
-0.322641521692276,
-0.10890696197748184,
-0.01951955258846283,
0.07367454469203949,
-0.046139009296894073,
0.09989327937364578,
-0.3072269558906555,
0.25644198060035706,
-0.36623305082321167,
-0.08695430308580399,
0.10564962774515152,
0.23298592865467072,
-0.4058893322944641,
-0.06803674250841141,
-0.32137972116470337,
0.11962879449129105,
-0.21466036140918732,
0.254692941904068,
-0.2110012322664261,
-0.12547852098941803,
-0.06142447516322136,
-0.2672702670097351,
-0.5050505995750427,
0.07064370810985565,
-0.288350373506546,
0.32986873388290405,
-0.489351361989975,
-0.1897745132446289,
0.33862072229385376,
0.44487127661705017,
0.04147944226861,
0.40315479040145874,
-0.2879834771156311,
0.11165224015712738,
-0.26386111974716187,
-0.4236195683479309,
0.0944913774728775,
0.011207422241568565,
0.08713383227586746,
-0.18162883818149567,
-0.37099048495292664,
0.16697321832180023,
-0.05757244676351547,
0.05284932628273964,
-0.09598754346370697,
0.1043776124715805,
0.2016545534133911,
-0.04589762166142464,
-0.3565550446510315,
-0.022283045575022697,
-0.09438576549291611,
-0.08943305909633636,
0.12416660040616989,
0.08219688385725021,
-0.11190381646156311,
0.14091330766677856,
0.18529561161994934,
-0.3349807858467102,
0.02179151214659214,
0.3491058945655823,
0.18344904482364655,
0.023953847587108612,
0.6245267987251282,
0.31554579734802246,
-0.39654064178466797,
-0.18981510400772095,
0.043914150446653366,
-0.2713772654533386,
-0.4585741460323334,
-0.08960501104593277,
-0.042189743369817734,
0.3383435606956482,
-0.41492870450019836,
0.3502538800239563,
0.1749066561460495,
-0.23483158648014069,
0.2064642459154129,
-0.7065883874893188,
-0.12402184307575226,
0.21609380841255188,
-0.07890909165143967,
0.006574691738933325,
0.08407121151685715,
-0.309599369764328,
0.12182832509279251,
0.23526333272457123,
-0.26108893752098083,
0.2092309594154358,
-0.3233412504196167,
0.10076379030942917,
0.09949403256177902,
0.06333232671022415,
0.022301556542515755,
0.19910256564617157,
0.06504800915718079,
0.06916136294603348,
-0.04966387152671814,
-0.2599099576473236,
-0.07022753357887268,
0.19481271505355835,
0.2051142156124115,
-0.05790087580680847,
0.2278750240802765,
-0.5071966052055359,
-0.16867001354694366,
0.08223892003297806,
-0.0584757924079895,
0.11558473110198975,
0.003859944175928831,
0.1811005026102066,
0.20132549107074738,
0.2885710895061493,
-0.3500802218914032,
0.24587810039520264,
-0.08690515905618668,
0.2614988088607788,
0.1408281922340393,
0.07593606412410736,
0.457992285490036,
0.021300675347447395,
-0.33520999550819397,
-0.033540841192007065,
-0.030077507719397545,
0.0866357684135437,
0.25588086247444153,
-0.23335890471935272,
0.30034759640693665,
0.19892065227031708,
-0.11749505251646042,
0.5623859763145447,
-0.14960452914237976,
0.206596240401268,
0.4130837917327881,
0.18722322583198547,
-0.3698635995388031,
0.0016460190527141094,
0.2932015657424927,
-0.09663724154233932,
-0.07098226249217987,
0.07596101611852646,
0.2589093744754791,
-0.32232800126075745,
0.11372043192386627,
-0.06573902070522308,
0.16478252410888672,
-0.056551460176706314,
0.19225868582725525,
0.6700765490531921,
0.2270732969045639,
0.04992593079805374,
-0.06946466118097305,
0.16999314725399017,
0.09539465606212616,
0.3628067076206207,
-0.22345639765262604,
0.19276364147663116,
-0.05200393125414848,
0.02463502623140812,
-0.1621609479188919,
-0.34005627036094666,
0.29861143231391907,
0.16320201754570007,
-0.02477441169321537,
0.09867644309997559,
-0.17225758731365204,
0.2616477310657501,
0.15435947477817535,
0.03022313117980957,
-0.2611556351184845,
0.1914432793855667,
-0.12247762084007263,
-0.012982700951397419,
-0.04421001672744751,
-0.2680072486400604,
0.0015670889988541603,
0.15562628209590912,
-0.004662046674638987,
-0.356573224067688,
0.255573570728302,
0.3037431836128235,
-0.24408632516860962,
-0.4411398768424988,
0.13480910658836365,
0.21249282360076904,
0.03117045760154724,
-0.3002210855484009,
0.15776105225086212,
0.41378054022789,
0.07809220999479294,
-0.12705518305301666,
0.20191627740859985,
0.44334620237350464,
0.4205476641654968,
-0.3373264670372009,
0.04244129732251167,
0.0753406435251236,
-0.0656806230545044,
-0.023378871381282806,
0.22761006653308868,
0.4672245979309082,
0.2502681314945221,
0.39701032638549805,
0.11842593550682068,
-0.14159998297691345,
-0.03197537362575531,
0.2360502928495407,
-0.06391900032758713,
-0.056670818477869034,
-0.045185934752225876,
-0.05903537571430206,
0.14072102308273315,
-0.420553594827652,
-0.01358474139124155,
-0.5078691840171814,
0.340022474527359,
0.16105616092681885,
0.0025874883867800236,
0.17752929031848907,
-0.0925811380147934,
0.0479857474565506,
-0.15697577595710754,
0.3962930738925934,
0.3195856511592865,
0.1991414874792099,
-0.390832781791687,
-0.008995363488793373,
-0.4645191431045532,
-0.01863555796444416,
-0.2982347011566162,
0.11210089921951294,
-0.08143272995948792,
0.128655806183815,
0.0755082219839096,
0.21327190101146698,
0.03663254529237747,
0.045098282396793365,
0.0668024867773056,
0.4949166476726532,
-0.23153118789196014,
-0.24470388889312744,
-0.1948166936635971,
0.21916277706623077,
-0.15832379460334778,
-0.3909315764904022,
0.05759390443563461,
-0.1385609358549118,
0.03407329320907593,
-0.3200198709964752,
-0.06650041043758392,
0.09557262808084488,
0.005959891714155674,
0.33242854475975037,
0.15237803757190704,
0.5925302505493164,
-0.15409445762634277,
-0.20217695832252502,
-0.20867185294628143,
-0.01107005774974823,
-0.15993501245975494,
0.3116777539253235,
0.1967293620109558,
0.09890645742416382,
-0.16079366207122803,
-0.1119711846113205,
-0.02956446446478367,
0.2984873056411743,
-0.04481641948223114,
0.19492299854755402,
-0.366961807012558,
-0.38635703921318054,
0.05791765823960304,
0.11385614424943924,
0.1190270259976387,
0.04692619666457176,
-0.13085615634918213,
-0.05331842601299286,
-0.3421497344970703,
-0.30868643522262573,
0.38665443658828735,
-0.37730371952056885,
-0.569782018661499,
-0.09215481579303741,
0.007928847335278988,
0.04705679789185524,
0.19029778242111206,
-0.3660883903503418,
0.2775549292564392,
0.38977333903312683,
0.0513334646821022,
-0.15096791088581085,
0.1664217859506607,
0.028648633509874344,
-0.01621546596288681,
-0.09404341876506805,
0.11607009172439575,
-0.008284271694719791,
-0.3563149869441986,
-0.22058449685573578,
-0.39125844836235046
] |
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.2544982135295868,
-0.07792056351900101,
-0.15375836193561554,
0.43086668848991394,
0.39970290660858154,
0.35046160221099854,
0.1368504762649536,
0.5331581830978394,
0.1893271654844284,
0.02358449064195156,
-0.17730358242988586,
-0.09421747922897339,
0.0944037139415741,
0.01118418388068676,
-0.02970508299767971,
-0.4591735899448395,
-0.06729070842266083,
0.029537241905927658,
-0.13527131080627441,
-0.11689338088035583,
-0.2519627809524536,
0.1256147027015686,
-0.07917483150959015,
-0.049028921872377396,
-0.038745563477277756,
-0.18283987045288086,
-0.09583508968353271,
-0.20730535686016083,
-0.35074687004089355,
-0.24086447060108185,
0.35457777976989746,
0.019257333129644394,
0.310111939907074,
0.15299738943576813,
-0.0001114367987611331,
-0.05096485838294029,
0.3131166100502014,
-0.23579451441764832,
-0.29361215233802795,
-0.28885766863822937,
-0.07208975404500961,
-0.3261859714984894,
-0.0904388427734375,
-0.4200315475463867,
0.12744630873203278,
0.04668254777789116,
0.08067119866609573,
-0.1318010538816452,
0.07575744390487671,
0.2992253005504608,
0.24687129259109497,
-0.14260315895080566,
0.3134346008300781,
-0.14573781192302704,
0.3651963770389557,
-0.3777085542678833,
-0.028033748269081116,
0.33958613872528076,
0.21872088313102722,
0.07134268432855606,
0.2154792696237564,
0.22204306721687317,
-0.23414058983325958,
0.013499359600245953,
0.04822444170713425,
-0.29122394323349,
0.22220568358898163,
-0.6297016739845276,
0.5206419229507446,
0.5344284772872925,
0.8290327787399292,
-0.12835146486759186,
-0.0874670147895813,
0.07239186763763428,
-0.026059096679091454,
-0.031374186277389526,
-0.05574001744389534,
0.48197975754737854,
-0.189326211810112,
0.09759805351495743,
0.12616495788097382,
-0.12543036043643951,
-0.15671876072883606,
0.4228466749191284,
-0.1241367980837822,
0.4435881972312927,
-0.05271994322538376,
0.21125955879688263,
-0.02166694588959217,
-0.10270191729068756,
-0.26364216208457947,
-0.06965938210487366,
-0.09616027027368546,
0.29332154989242554,
-0.27939802408218384,
0.019635798409581184,
-0.16150179505348206,
0.055646974593400955,
0.35113525390625,
-0.15038315951824188,
-0.23462142050266266,
-0.045078106224536896,
0.09601062536239624,
0.15757444500923157,
0.1801503747701645,
0.16378308832645416,
0.06204820051789284,
-0.20000669360160828,
0.27828115224838257,
0.30790406465530396,
-0.08421199023723602,
-0.07617081701755524,
-0.21004319190979004,
-0.223056361079216,
-0.29475703835487366,
0.09442926198244095,
0.0875294879078865,
-0.2031715214252472,
-0.17794664204120636,
0.0071133277378976345,
-0.14436103403568268,
-0.019439060240983963,
-0.20239496231079102,
0.36282092332839966,
-0.15014290809631348,
0.43123859167099,
0.1779012233018875,
0.3288218379020691,
-0.10357259213924408,
-0.2613101005554199,
-0.01735217496752739,
0.3065483570098877,
-0.1393197476863861,
-0.10366039723157883,
0.21878290176391602,
-0.10991612076759338,
0.2648516893386841,
-0.08937210589647293,
-0.10313823819160461,
-0.17641228437423706,
-0.15369121730327606,
-0.3695678412914276,
-0.17910364270210266,
0.23040911555290222,
0.16197676956653595,
0.2839276194572449,
0.14761391282081604,
-0.2447475790977478,
-0.230580672621727,
0.1207452118396759,
-0.35961484909057617,
-0.16815488040447235,
-0.20515474677085876,
0.1944684386253357,
0.061098285019397736,
-0.054650310426950455,
-0.31600674986839294,
0.28766417503356934,
0.3030640184879303,
-0.1423991620540619,
0.11807280033826828,
-0.007546153385192156,
-0.02325410768389702,
-0.2251897156238556,
0.1790112406015396,
0.4908003509044647,
-0.3999600410461426,
0.09189733117818832,
-0.02385064773261547,
-0.033711988478899,
0.18978182971477509,
0.18429692089557648,
-0.17795272171497345,
0.25654125213623047,
-0.09788408875465393,
0.03816019371151924,
0.2101312130689621,
-0.3214418590068817,
-0.577635645866394,
0.18605385720729828,
0.11340946704149246,
-0.167003333568573,
0.09947936236858368,
0.016000675037503242,
0.27503055334091187,
-0.04938738793134689,
0.05245433375239372,
0.39567482471466064,
0.1368376910686493,
-0.10564488172531128,
-0.32745060324668884,
-0.5078234672546387,
0.32648178935050964,
0.16331782937049866,
0.4547145366668701,
-0.13227002322673798,
0.2759854197502136,
0.2917214632034302,
0.3191739618778229,
-0.19154758751392365,
0.1246788501739502,
0.23336054384708405,
-0.008948449045419693,
-0.044575244188308716,
-0.0025623058900237083,
-0.331027626991272,
-0.3097583055496216,
0.14775997400283813,
0.10291313380002975,
0.1654643714427948,
-0.1609552800655365,
0.02968333102762699,
-0.31618940830230713,
-0.08880764245986938,
-0.1953115314245224,
0.10326912999153137,
0.19956380128860474,
-0.10527704656124115,
0.11959313601255417,
0.4854589104652405,
0.12651655077934265,
-0.09945959597826004,
-0.41569027304649353,
-0.0948527380824089,
-0.17893452942371368,
0.09233184158802032,
-0.2174282670021057,
0.20449234545230865,
0.03368109092116356,
0.025809040293097496,
0.17968381941318512,
0.07305268943309784,
-0.16072392463684082,
-0.011061287485063076,
-0.07845237106084824,
-0.10354473441839218,
0.13546285033226013,
0.11696410179138184,
0.1331281214952469,
-0.4173752963542938,
0.19202983379364014,
0.10847938805818558,
0.32974642515182495,
-0.13577251136302948,
0.11781623959541321,
0.1222366914153099,
0.03997359797358513,
0.36553433537483215,
0.1234310120344162,
0.14983154833316803,
0.45559966564178467,
0.030526477843523026,
0.1263546198606491,
-0.0049747284501791,
0.32711923122406006,
0.15565995872020721,
0.012748918496072292,
-0.13295936584472656,
-0.029277890920639038,
-0.11351418495178223,
0.31667277216911316,
-0.08453383296728134,
0.2671484649181366,
0.2927594780921936,
-0.07651899755001068,
-0.0048597645945847034,
-0.09782715886831284,
0.15339849889278412,
0.052207596600055695,
0.06990519911050797,
0.10658899694681168,
-0.09984391927719116,
0.35964956879615784,
-0.12939266860485077,
0.2643094062805176,
0.17554204165935516,
0.1863328218460083,
0.20913559198379517,
0.1350802332162857,
-0.011175724677741528,
-0.1882825791835785,
-0.1296796202659607,
0.06999406963586807,
0.37171775102615356,
0.06918374449014664,
0.16594518721103668,
-0.048434533178806305,
-0.1418599635362625,
0.08419087529182434,
-0.05239205062389374,
-0.25094324350357056,
-0.2163173109292984,
-0.12563829123973846,
-0.0857284739613533,
0.0915834903717041,
-0.00010499619384063408,
-0.3266668915748596,
-0.07210199534893036,
0.062166281044483185,
-0.3203508257865906,
-0.1605679988861084,
-0.29812300205230713,
-0.36844977736473083,
0.07678736001253128,
0.3871299922466278,
0.11129014194011688,
0.2952096164226532,
-0.33262893557548523,
-0.19187885522842407,
-0.0899461880326271,
-0.2681114375591278,
-0.014313800260424614,
-0.15697041153907776,
0.24139511585235596,
-0.02411693148314953,
0.7152196168899536,
-0.17999617755413055,
-0.25142109394073486,
0.1846485435962677,
-0.007019855547696352,
0.06587454676628113,
0.24977140128612518,
-0.15347877144813538,
-0.04292391240596771,
0.08453571051359177,
-0.48565348982810974,
-0.5155765414237976,
-0.2696564793586731,
0.012519127689301968,
0.04851781949400902,
0.08780647814273834,
0.1686408817768097,
0.19248414039611816,
0.06802687048912048,
0.12118791043758392,
0.18090678751468658,
-0.19004330039024353,
-0.15186916291713715,
0.44968941807746887,
-0.02741352841258049,
-0.4299626648426056,
0.1881868541240692,
0.010994362644851208,
0.3149319291114807,
0.007927228696644306,
-0.6572360396385193,
0.14411282539367676,
-0.27635928988456726,
0.24994297325611115,
-0.02199326455593109,
0.18347719311714172,
0.11434390395879745,
-0.2136971652507782,
0.04797237366437912,
0.044995591044425964,
0.10590976476669312,
-0.0406210795044899,
-0.2095252424478531,
0.2556219696998596,
0.02994566597044468,
0.29618558287620544,
0.16442088782787323,
0.6888411045074463,
0.05485555902123451,
0.16584059596061707,
0.4367813467979431,
0.23858247697353363,
0.23103131353855133,
-0.2314291149377823,
-0.36457139253616333,
0.060574550181627274,
-0.23949159681797028,
-0.031003020703792572,
0.2670123875141144,
-0.1623198240995407,
-0.4674171507358551,
-0.34771260619163513,
-0.2426847368478775,
-0.36746740341186523,
-0.21077117323875427,
0.15399810671806335,
-0.05018192529678345,
0.08294021338224411,
0.057596296072006226,
0.12039868533611298,
0.02157370001077652,
-0.28234997391700745,
0.21378928422927856,
0.5317095518112183,
-0.2486015409231186,
0.16858960688114166,
-0.27826690673828125,
-0.34212231636047363,
-0.41263410449028015,
0.25245529413223267,
0.07770678400993347,
0.4147612154483795,
-0.0938025489449501,
0.3499189615249634,
0.201179638504982,
-0.08926890045404434,
0.29062291979789734,
-0.17024411261081696,
0.12305095046758652,
0.1972467452287674,
0.10499271005392075,
-0.2152172476053238,
-0.062439925968647,
-0.2943331301212311,
-0.01668798364698887,
0.30541670322418213,
-0.044455636292696,
-0.670965850353241,
0.08432900160551071,
-0.04258571192622185,
0.5003299713134766,
-0.0571771115064621,
-0.017350096255540848,
-0.16185656189918518,
-0.5653649568557739,
-0.4854041039943695,
-0.027687307447195053,
0.18957556784152985,
0.40460941195487976,
-0.19720959663391113,
0.2628990113735199,
-0.10207849740982056,
0.22056272625923157,
0.0213165320456028,
0.007735002785921097,
0.21325649321079254,
0.23278610408306122,
0.09743288904428482,
-0.19678789377212524,
-0.13784702122211456,
0.15032655000686646,
0.3620433211326599,
-0.06353224068880081,
-0.23431262373924255,
-0.1212475597858429,
-0.04300370439887047,
0.043483130633831024,
0.14154617488384247,
-0.10129068046808243,
0.047706928104162216,
0.14866341650485992,
-0.13793547451496124,
0.16582079231739044,
-0.012841412797570229,
0.25194650888442993,
-0.10633760690689087,
-0.4962351620197296,
-0.5676659941673279,
0.6620468497276306,
0.02338203601539135,
0.07014227658510208,
0.2541714310646057,
0.1754048466682434,
-0.1958611011505127,
0.37537339329719543,
0.10580281913280487,
1.1372194290161133,
-0.2281344085931778,
0.11042045056819916,
-0.10398449748754501,
0.10946617275476456,
0.3614170253276825,
-0.3578398525714874,
0.20840711891651154,
-0.322641521692276,
-0.10890696197748184,
-0.01951955258846283,
0.07367454469203949,
-0.046139009296894073,
0.09989327937364578,
-0.3072269558906555,
0.25644198060035706,
-0.36623305082321167,
-0.08695430308580399,
0.10564962774515152,
0.23298592865467072,
-0.4058893322944641,
-0.06803674250841141,
-0.32137972116470337,
0.11962879449129105,
-0.21466036140918732,
0.254692941904068,
-0.2110012322664261,
-0.12547852098941803,
-0.06142447516322136,
-0.2672702670097351,
-0.5050505995750427,
0.07064370810985565,
-0.288350373506546,
0.32986873388290405,
-0.489351361989975,
-0.1897745132446289,
0.33862072229385376,
0.44487127661705017,
0.04147944226861,
0.40315479040145874,
-0.2879834771156311,
0.11165224015712738,
-0.26386111974716187,
-0.4236195683479309,
0.0944913774728775,
0.011207422241568565,
0.08713383227586746,
-0.18162883818149567,
-0.37099048495292664,
0.16697321832180023,
-0.05757244676351547,
0.05284932628273964,
-0.09598754346370697,
0.1043776124715805,
0.2016545534133911,
-0.04589762166142464,
-0.3565550446510315,
-0.022283045575022697,
-0.09438576549291611,
-0.08943305909633636,
0.12416660040616989,
0.08219688385725021,
-0.11190381646156311,
0.14091330766677856,
0.18529561161994934,
-0.3349807858467102,
0.02179151214659214,
0.3491058945655823,
0.18344904482364655,
0.023953847587108612,
0.6245267987251282,
0.31554579734802246,
-0.39654064178466797,
-0.18981510400772095,
0.043914150446653366,
-0.2713772654533386,
-0.4585741460323334,
-0.08960501104593277,
-0.042189743369817734,
0.3383435606956482,
-0.41492870450019836,
0.3502538800239563,
0.1749066561460495,
-0.23483158648014069,
0.2064642459154129,
-0.7065883874893188,
-0.12402184307575226,
0.21609380841255188,
-0.07890909165143967,
0.006574691738933325,
0.08407121151685715,
-0.309599369764328,
0.12182832509279251,
0.23526333272457123,
-0.26108893752098083,
0.2092309594154358,
-0.3233412504196167,
0.10076379030942917,
0.09949403256177902,
0.06333232671022415,
0.022301556542515755,
0.19910256564617157,
0.06504800915718079,
0.06916136294603348,
-0.04966387152671814,
-0.2599099576473236,
-0.07022753357887268,
0.19481271505355835,
0.2051142156124115,
-0.05790087580680847,
0.2278750240802765,
-0.5071966052055359,
-0.16867001354694366,
0.08223892003297806,
-0.0584757924079895,
0.11558473110198975,
0.003859944175928831,
0.1811005026102066,
0.20132549107074738,
0.2885710895061493,
-0.3500802218914032,
0.24587810039520264,
-0.08690515905618668,
0.2614988088607788,
0.1408281922340393,
0.07593606412410736,
0.457992285490036,
0.021300675347447395,
-0.33520999550819397,
-0.033540841192007065,
-0.030077507719397545,
0.0866357684135437,
0.25588086247444153,
-0.23335890471935272,
0.30034759640693665,
0.19892065227031708,
-0.11749505251646042,
0.5623859763145447,
-0.14960452914237976,
0.206596240401268,
0.4130837917327881,
0.18722322583198547,
-0.3698635995388031,
0.0016460190527141094,
0.2932015657424927,
-0.09663724154233932,
-0.07098226249217987,
0.07596101611852646,
0.2589093744754791,
-0.32232800126075745,
0.11372043192386627,
-0.06573902070522308,
0.16478252410888672,
-0.056551460176706314,
0.19225868582725525,
0.6700765490531921,
0.2270732969045639,
0.04992593079805374,
-0.06946466118097305,
0.16999314725399017,
0.09539465606212616,
0.3628067076206207,
-0.22345639765262604,
0.19276364147663116,
-0.05200393125414848,
0.02463502623140812,
-0.1621609479188919,
-0.34005627036094666,
0.29861143231391907,
0.16320201754570007,
-0.02477441169321537,
0.09867644309997559,
-0.17225758731365204,
0.2616477310657501,
0.15435947477817535,
0.03022313117980957,
-0.2611556351184845,
0.1914432793855667,
-0.12247762084007263,
-0.012982700951397419,
-0.04421001672744751,
-0.2680072486400604,
0.0015670889988541603,
0.15562628209590912,
-0.004662046674638987,
-0.356573224067688,
0.255573570728302,
0.3037431836128235,
-0.24408632516860962,
-0.4411398768424988,
0.13480910658836365,
0.21249282360076904,
0.03117045760154724,
-0.3002210855484009,
0.15776105225086212,
0.41378054022789,
0.07809220999479294,
-0.12705518305301666,
0.20191627740859985,
0.44334620237350464,
0.4205476641654968,
-0.3373264670372009,
0.04244129732251167,
0.0753406435251236,
-0.0656806230545044,
-0.023378871381282806,
0.22761006653308868,
0.4672245979309082,
0.2502681314945221,
0.39701032638549805,
0.11842593550682068,
-0.14159998297691345,
-0.03197537362575531,
0.2360502928495407,
-0.06391900032758713,
-0.056670818477869034,
-0.045185934752225876,
-0.05903537571430206,
0.14072102308273315,
-0.420553594827652,
-0.01358474139124155,
-0.5078691840171814,
0.340022474527359,
0.16105616092681885,
0.0025874883867800236,
0.17752929031848907,
-0.0925811380147934,
0.0479857474565506,
-0.15697577595710754,
0.3962930738925934,
0.3195856511592865,
0.1991414874792099,
-0.390832781791687,
-0.008995363488793373,
-0.4645191431045532,
-0.01863555796444416,
-0.2982347011566162,
0.11210089921951294,
-0.08143272995948792,
0.128655806183815,
0.0755082219839096,
0.21327190101146698,
0.03663254529237747,
0.045098282396793365,
0.0668024867773056,
0.4949166476726532,
-0.23153118789196014,
-0.24470388889312744,
-0.1948166936635971,
0.21916277706623077,
-0.15832379460334778,
-0.3909315764904022,
0.05759390443563461,
-0.1385609358549118,
0.03407329320907593,
-0.3200198709964752,
-0.06650041043758392,
0.09557262808084488,
0.005959891714155674,
0.33242854475975037,
0.15237803757190704,
0.5925302505493164,
-0.15409445762634277,
-0.20217695832252502,
-0.20867185294628143,
-0.01107005774974823,
-0.15993501245975494,
0.3116777539253235,
0.1967293620109558,
0.09890645742416382,
-0.16079366207122803,
-0.1119711846113205,
-0.02956446446478367,
0.2984873056411743,
-0.04481641948223114,
0.19492299854755402,
-0.366961807012558,
-0.38635703921318054,
0.05791765823960304,
0.11385614424943924,
0.1190270259976387,
0.04692619666457176,
-0.13085615634918213,
-0.05331842601299286,
-0.3421497344970703,
-0.30868643522262573,
0.38665443658828735,
-0.37730371952056885,
-0.569782018661499,
-0.09215481579303741,
0.007928847335278988,
0.04705679789185524,
0.19029778242111206,
-0.3660883903503418,
0.2775549292564392,
0.38977333903312683,
0.0513334646821022,
-0.15096791088581085,
0.1664217859506607,
0.028648633509874344,
-0.01621546596288681,
-0.09404341876506805,
0.11607009172439575,
-0.008284271694719791,
-0.3563149869441986,
-0.22058449685573578,
-0.39125844836235046
] |
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.21865254640579224,
-0.11096194386482239,
-0.052367083728313446,
0.624684751033783,
0.3160347640514374,
0.09426531940698624,
-0.21173663437366486,
0.33323344588279724,
0.20938129723072052,
0.25795042514801025,
0.006053997669368982,
0.1517626792192459,
0.2327897995710373,
-0.12655332684516907,
-0.2175300419330597,
-0.21034404635429382,
0.043729234486818314,
0.07434704154729843,
0.03712183237075806,
-0.2225492298603058,
-0.22596661746501923,
0.12416926771402359,
-0.2827932834625244,
-0.12147098034620285,
-0.17570054531097412,
0.15075069665908813,
0.08346201479434967,
-0.19253432750701904,
-0.17684407532215118,
-0.3868058919906616,
0.14274251461029053,
0.002126408042386174,
-0.12528078258037567,
0.2270926684141159,
-0.00011130444909213111,
-0.17868797481060028,
0.5870485901832581,
-0.017546024173498154,
-0.14387920498847961,
0.10739272832870483,
-0.20371286571025848,
-0.07391225546598434,
-0.1006895899772644,
-0.28783831000328064,
0.14150546491146088,
-0.03001803159713745,
0.16945478320121765,
-0.27437734603881836,
0.3588358461856842,
-0.05553537607192993,
0.22966879606246948,
-0.09951240569353104,
0.41344407200813293,
-0.046806760132312775,
0.7186949849128723,
0.2662895619869232,
-0.033587437123060226,
0.029499061405658722,
0.14833243191242218,
-0.12021173536777496,
0.02610369585454464,
0.4042426645755768,
-0.15691769123077393,
0.01658739522099495,
0.2526492476463318,
-0.14933714270591736,
0.04398880526423454,
-0.5066653490066528,
0.46207699179649353,
0.3427119255065918,
0.5755247473716736,
-0.14992135763168335,
0.10628234595060349,
0.0310701634734869,
-0.10397186130285263,
-0.13158193230628967,
0.2247125655412674,
0.40015941858291626,
-0.653328001499176,
-0.06833583861589432,
0.310906320810318,
-0.48206770420074463,
-0.1790921539068222,
0.20634806156158447,
-0.0007491353317163885,
0.31837671995162964,
-0.007374167907983065,
0.06341198086738586,
0.2590227425098419,
-0.001834840513765812,
-0.11670026183128357,
-0.04348444566130638,
-0.07423142343759537,
0.21876566112041473,
0.03053283505141735,
0.16333909332752228,
0.18440555036067963,
-0.18229623138904572,
0.27799689769744873,
-0.4200804531574249,
-0.40943366289138794,
0.006629391573369503,
0.27806463837623596,
-0.04077736660838127,
0.3894082009792328,
0.027034098282456398,
-0.017056507989764214,
0.1133425235748291,
0.3600498139858246,
0.21157680451869965,
-0.3496324121952057,
-0.08460111916065216,
0.13038946688175201,
0.052046965807676315,
0.0831238254904747,
-0.1065112054347992,
0.01918558031320572,
-0.0676594004034996,
0.17010219395160675,
0.23868580162525177,
-0.2658778727054596,
-0.07087761908769608,
-0.20805226266384125,
0.4120153784751892,
-0.04382761940360069,
0.3727596700191498,
0.18699708580970764,
0.08538972586393356,
-0.4100782871246338,
-0.31161919236183167,
-0.13783887028694153,
0.2522203028202057,
-0.28219276666641235,
0.047286927700042725,
0.001004855614155531,
-0.14431291818618774,
0.21169880032539368,
0.17310652136802673,
-0.1932028830051422,
-0.40355047583580017,
0.054077014327049255,
-0.19065342843532562,
0.20738542079925537,
0.26486334204673767,
0.06967253983020782,
0.2217063456773758,
-0.1199447363615036,
-0.08726318180561066,
-0.042838625609874725,
0.28290989995002747,
-0.01792636513710022,
-0.06425344944000244,
0.00016985100228339434,
0.24168159067630768,
0.06598047912120819,
0.19537679851055145,
0.008276519365608692,
-0.16247764229774475,
0.5027117133140564,
0.12040126323699951,
0.015703849494457245,
0.006114639807492495,
-0.012003748677670956,
-0.25630027055740356,
0.17826642096042633,
0.45004671812057495,
0.11541300266981125,
0.12497065961360931,
-0.1744934618473053,
0.13344332575798035,
0.48263171315193176,
0.16337880492210388,
0.004183284472674131,
0.4243837296962738,
-0.12278709560632706,
0.25917062163352966,
-0.023981133475899696,
-0.2639952600002289,
-0.31979572772979736,
-0.01835738681256771,
0.12099460512399673,
0.21700385212898254,
-0.03948504477739334,
0.027486838400363922,
0.12404248118400574,
0.33831462264060974,
0.013630597852170467,
0.27894270420074463,
0.07468460500240326,
0.12920045852661133,
-0.45392709970474243,
-0.22717389464378357,
0.21934716403484344,
-0.3085440397262573,
0.31553274393081665,
-0.039596106857061386,
0.1276441514492035,
0.40333521366119385,
0.6220804452896118,
-0.256340891122818,
0.3680499494075775,
0.1581970751285553,
0.314920574426651,
0.05500571057200432,
0.03255271911621094,
-0.1054980456829071,
-0.12108245491981506,
0.08155419677495956,
-0.20726913213729858,
0.3825248181819916,
-0.06457947194576263,
-0.1309957504272461,
-0.10746150463819504,
0.08737972378730774,
-0.2546546161174774,
-0.34560272097587585,
0.20499153435230255,
0.1016073003411293,
0.35024818778038025,
0.2771033048629761,
0.13178201019763947,
-0.44853824377059937,
-0.1533704698085785,
0.1642218977212906,
-0.7328389286994934,
0.017481185495853424,
-0.16485804319381714,
-0.08566729724407196,
-0.1884651482105255,
0.07390841096639633,
-0.07468762248754501,
0.01462141890078783,
-0.11743874102830887,
-0.1440369188785553,
0.2105429619550705,
0.19542302191257477,
-0.27699002623558044,
-0.08075729012489319,
0.22594089806079865,
-0.45123258233070374,
0.19409343600273132,
0.4587641954421997,
0.1753472089767456,
-0.09628637135028839,
0.16056616604328156,
-0.11558829247951508,
-0.0212009996175766,
0.0453738309442997,
0.12331178039312363,
0.0445285364985466,
0.2474222630262375,
0.123011514544487,
0.1593005210161209,
-0.13627564907073975,
0.11218280345201492,
0.5882782936096191,
-0.09064000099897385,
0.02013232558965683,
-0.11099148541688919,
-0.052671730518341064,
0.44894641637802124,
0.23132868111133575,
0.15960611402988434,
0.04793577641248703,
-0.3074400722980499,
-0.30583134293556213,
0.019124675542116165,
0.09201836585998535,
-0.15861496329307556,
-0.0036710340064018965,
0.13245844841003418,
-0.05079995095729828,
0.33782443404197693,
-0.2958720624446869,
0.4203757345676422,
-0.0014917273074388504,
0.16118811070919037,
0.21698389947414398,
0.12967093288898468,
-0.027682866901159286,
-0.3015904724597931,
0.29430320858955383,
-0.007241841871291399,
0.3758419454097748,
0.10969030857086182,
-0.2038993239402771,
0.05884862318634987,
-0.4482652246952057,
0.013791481964290142,
-0.12354771047830582,
-0.20246969163417816,
-0.32982292771339417,
0.1109551340341568,
0.2990665137767792,
-0.2745771110057831,
-0.17864952981472015,
0.039827343076467514,
-0.28575602173805237,
0.08823999762535095,
-0.06418375670909882,
-0.16085784137248993,
-0.36781832575798035,
-0.17473433911800385,
0.026736021041870117,
0.2860376834869385,
-0.061983734369277954,
0.06039690598845482,
0.06251154094934464,
-0.22415830194950104,
-0.21907426416873932,
-0.1240186095237732,
0.26603391766548157,
-0.09002529829740524,
0.01776396483182907,
-0.2295583039522171,
0.4114503264427185,
0.14633618295192719,
-0.14304529130458832,
0.25133758783340454,
-0.32574576139450073,
0.015834098681807518,
0.24873977899551392,
0.14999939501285553,
0.17447367310523987,
-0.12339671701192856,
-0.47259286046028137,
0.0953734889626503,
-0.4844037592411041,
0.21654093265533447,
-0.0715496763586998,
0.10141491889953613,
0.6841793060302734,
0.05600188300013542,
-0.06514927744865417,
-0.054873276501894,
0.1761161983013153,
-0.3081728518009186,
-0.1929733157157898,
0.20510417222976685,
-0.16735225915908813,
-0.3377016484737396,
0.03648226335644722,
-0.015345312654972076,
0.3164588212966919,
0.38230621814727783,
-0.2814795672893524,
0.2819819152355194,
-0.1632007658481598,
0.34467780590057373,
0.07123903930187225,
0.27620863914489746,
0.12846380472183228,
-0.03426040709018707,
-0.09649717062711716,
0.09769740700721741,
0.49609437584877014,
-0.05269614979624748,
-0.0706968829035759,
0.0776836946606636,
0.13687244057655334,
0.049421679228544235,
0.049529604613780975,
0.47618672251701355,
0.1436738520860672,
0.5873879790306091,
0.36952170729637146,
0.11712367832660675,
0.09948214888572693,
-0.0463382750749588,
-0.19205544888973236,
0.00761800492182374,
-0.20973719656467438,
-0.22040462493896484,
0.14378546178340912,
0.039184942841529846,
-0.13616058230400085,
-0.11215926706790924,
-0.017456455156207085,
-0.13551397621631622,
-0.49646398425102234,
0.21885961294174194,
0.2334728091955185,
0.33403488993644714,
-0.0010706987231969833,
0.26860252022743225,
0.12844331562519073,
-0.34720203280448914,
0.0751790776848793,
-0.20737947523593903,
0.20898430049419403,
-0.008935146033763885,
0.009537599980831146,
-0.3298080563545227,
-0.5612033605575562,
0.0703183189034462,
0.09460912644863129,
-0.16018204391002655,
0.1369471698999405,
-0.26737597584724426,
0.1915387064218521,
-0.01567065343260765,
0.2761344611644745,
0.12964630126953125,
0.010777919553220272,
0.07975707948207855,
-0.04023357853293419,
-0.09323700517416,
0.2106625735759735,
-0.13649208843708038,
-0.020892931148409843,
0.21610072255134583,
-0.04519960656762123,
-0.4547621011734009,
-0.1504536271095276,
0.0004927095142193139,
0.34988144040107727,
-0.1717812865972519,
0.03729601204395294,
-0.1772453337907791,
-0.33227118849754333,
-0.5068713426589966,
-0.10463397204875946,
0.13797633349895477,
0.415951132774353,
0.09826217591762543,
-0.13484515249729156,
0.282101571559906,
0.0894632562994957,
-0.07844728231430054,
0.07640870660543442,
0.30251646041870117,
-0.19990403950214386,
-0.002488080644980073,
-0.033188510686159134,
-0.2916373312473297,
0.09721715748310089,
0.13913507759571075,
0.09377782791852951,
0.00135762058198452,
-0.35110926628112793,
-0.14263242483139038,
-0.12386517971754074,
0.02090740203857422,
-0.09977170079946518,
0.20293398201465607,
-0.09696029126644135,
0.10065110772848129,
-0.2624901831150055,
-0.18328216671943665,
0.12360010296106339,
-0.19753046333789825,
0.1065526157617569,
-0.20939309895038605,
0.31503304839134216,
-0.08830827474594116,
0.09702400118112564,
0.545416533946991,
0.0013295374810695648,
-0.32949480414390564,
-0.021848544478416443,
0.21357358992099762,
0.8503887057304382,
-0.15259578824043274,
0.20355011522769928,
0.38371238112449646,
0.20437826216220856,
0.4438612759113312,
-0.09516751766204834,
0.4557698965072632,
-0.4460804760456085,
0.19657690823078156,
0.188008651137352,
0.2044646143913269,
-0.12362713366746902,
-0.32612428069114685,
-0.07607630640268326,
0.09267550706863403,
-0.1996021419763565,
0.057218752801418304,
-0.07461308687925339,
0.33867645263671875,
-0.06800029426813126,
-0.10128507763147354,
-0.1137884259223938,
0.0897195115685463,
-0.038105275481939316,
0.3747813105583191,
-0.19960686564445496,
0.10928046703338623,
0.15186086297035217,
-0.008616747334599495,
-0.3571421802043915,
0.13471145927906036,
-0.12786820530891418,
0.31383928656578064,
-0.16926242411136627,
-0.29857319593429565,
-0.15227749943733215,
0.20912274718284607,
-0.30888068675994873,
0.26683685183525085,
-0.11832138895988464,
0.009040091186761856,
-0.1343430131673813,
-0.30136826634407043,
-0.09812398254871368,
0.20411480963230133,
0.2514207661151886,
-0.079351045191288,
-0.3915467858314514,
0.3663368225097656,
-0.12483718246221542,
-0.2694855034351349,
-0.3880552649497986,
0.006317598279565573,
-0.25154346227645874,
-0.0010344175389036536,
-0.01990765891969204,
-0.03886616602540016,
-0.4225255846977234,
-0.04674895852804184,
0.1766573041677475,
0.20873422920703888,
-0.3466225862503052,
0.12731501460075378,
-0.26204103231430054,
-0.15585549175739288,
-0.010847952216863632,
-0.05306527391076088,
0.46310147643089294,
0.16699838638305664,
0.49854931235313416,
0.3981514871120453,
-0.1369817703962326,
-0.20703043043613434,
-0.25253647565841675,
-0.24424123764038086,
-0.27415651082992554,
0.3001498878002167,
-0.07928279787302017,
-0.019402168691158295,
-0.21083247661590576,
0.14230333268642426,
-0.19961430132389069,
-0.23622091114521027,
0.04272264614701271,
-0.16159167885780334,
-0.2933995723724365,
0.2349669188261032,
-0.0004799503367394209,
0.07446730881929398,
-0.021656256169080734,
0.0198184996843338,
0.12765952944755554,
0.13108031451702118,
-0.28106847405433655,
-0.03542955964803696,
-0.005044006276875734,
0.14458882808685303,
0.1383122056722641,
-0.14453035593032837,
-0.06252434849739075,
-0.029495399445295334,
0.07632806152105331,
0.10322455316781998,
-0.12141168117523193,
-0.23547527194023132,
0.12767040729522705,
0.08886855840682983,
0.07589887827634811,
-0.1377897411584854,
0.1375192403793335,
-0.2588726282119751,
0.05123734846711159,
-0.24349500238895416,
0.1451592743396759,
0.02469196356832981,
-0.12235669046640396,
0.271765798330307,
0.05947216972708702,
0.09152793884277344,
-0.13139724731445312,
0.25220242142677307,
0.04261714592576027,
0.33455079793930054,
0.008039065636694431,
0.1259251981973648,
0.399385929107666,
-0.12609758973121643,
-0.7414153814315796,
-0.04344155266880989,
-0.12351641803979874,
-0.12030800431966782,
0.34505075216293335,
-0.002181365853175521,
-0.29669684171676636,
0.358151912689209,
0.1455201655626297,
0.36380982398986816,
0.03176948055624962,
0.07916952669620514,
0.03306059166789055,
0.26614147424697876,
-0.13451771438121796,
0.12335940450429916,
0.01102424319833517,
-0.1922679841518402,
-0.10882892459630966,
0.0627267137169838,
-0.030870266258716583,
-0.23884017765522003,
0.02542305923998356,
0.15984314680099487,
-0.07918175309896469,
-0.1824394315481186,
0.4027220606803894,
0.05159848928451538,
0.16446779668331146,
-0.03258626535534859,
0.022465264424681664,
0.1362169086933136,
0.10645512491464615,
0.27328357100486755,
0.18209560215473175,
0.13620582222938538,
0.09505823999643326,
0.0025316448882222176,
-0.19885288178920746,
0.05050486698746681,
-0.11603046208620071,
0.4192367196083069,
-0.36530953645706177,
0.24053965508937836,
-0.12507390975952148,
0.029200652614235878,
0.26453763246536255,
0.016822976991534233,
-0.285610169172287,
0.2863122522830963,
-0.2693563997745514,
-0.13768121600151062,
0.0908489003777504,
-0.3488932251930237,
0.08299748599529266,
0.13612675666809082,
0.25294700264930725,
-0.19997836649417877,
0.2733370065689087,
0.0997958555817604,
-0.40586772561073303,
-0.3179627060890198,
0.6245747208595276,
-0.022479427978396416,
0.22099095582962036,
-0.4029296040534973,
-0.12962202727794647,
0.15547628700733185,
-0.18128152191638947,
-0.43921276926994324,
0.4111100137233734,
0.2919529974460602,
0.43017441034317017,
-0.5130152106285095,
0.10230015963315964,
-0.16981852054595947,
-0.07900360226631165,
-0.26311829686164856,
0.24114559590816498,
0.1912723034620285,
0.1533513218164444,
-0.08488159626722336,
0.08822067081928253,
-0.2010698765516281,
-0.3969239890575409,
0.5125553607940674,
0.2918365001678467,
-0.04001348093152046,
-0.2914661765098572,
0.08263237029314041,
-0.23278526961803436,
-0.10045400261878967,
-0.15153852105140686,
-0.40544116497039795,
0.5398056507110596,
0.19020532071590424,
0.012269270606338978,
-0.017553113400936127,
-0.23267675936222076,
0.0941384807229042,
-0.13956058025360107,
0.20335204899311066,
0.17441190779209137,
0.07702086865901947,
-0.30073702335357666,
-0.2969958186149597,
-0.40831199288368225,
0.42564886808395386,
-0.34813472628593445,
-0.11796033382415771,
0.006775261834263802,
0.4143895208835602,
-0.2831633985042572,
-0.0244600810110569,
-0.1137406975030899,
-0.4053596556186676,
0.05676380544900894,
0.2254755198955536,
-0.13309448957443237,
0.01316909585148096,
0.04388359189033508,
-0.2902199625968933,
-0.05946192517876625,
-0.4011071026325226,
0.3153993785381317,
-0.303993821144104,
0.03279320150613785,
-0.08920246362686157,
0.20109494030475616,
0.24438408017158508,
0.19341087341308594,
0.3121206760406494,
0.17024172842502594,
-0.1130366325378418,
-0.08695745468139648,
-0.5135857462882996,
-0.2686932384967804,
-0.015314005315303802,
0.09842900931835175,
0.12758614122867584,
0.07674786448478699,
0.3675941228866577,
-0.21235907077789307,
-0.059463370591402054,
-0.5560924410820007,
0.4299430847167969,
-0.22012914717197418,
0.0037103646900504827,
-0.2014356255531311,
-0.13797390460968018,
-0.04016044735908508,
0.07473910599946976,
0.13642936944961548,
0.36696934700012207,
-0.24268174171447754,
0.044330693781375885,
-0.5643947720527649,
-0.4570699632167816,
0.058504849672317505,
-0.483691543340683,
-0.5538263916969299,
-0.12026362866163254,
0.25075259804725647,
-0.02824026718735695,
-0.17785193026065826,
-0.3676697313785553,
0.2605847418308258,
0.07324647903442383,
0.04825981706380844,
-0.29009130597114563,
-0.1871773600578308,
-0.05938175693154335,
-0.08681279420852661,
0.10220075398683548,
0.26771047711372375,
0.307443767786026,
-0.33211395144462585,
0.2800371050834656,
-0.10164664685726166
] |
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.0550745390355587,
-0.6190828084945679,
0.07025013118982315,
0.36131319403648376,
0.15540002286434174,
0.271070659160614,
0.345333993434906,
0.05105719342827797,
0.5391319990158081,
0.2844027876853943,
-0.0778135433793068,
0.15644237399101257,
0.4091763198375702,
-0.06366683542728424,
-0.0600455105304718,
-0.036585528403520584,
0.22996406257152557,
0.270969957113266,
0.27711841464042664,
-0.11723693460226059,
-0.21328285336494446,
0.12541380524635315,
-0.24151121079921722,
0.23965059220790863,
-0.2419932335615158,
0.1532631665468216,
-0.23606950044631958,
0.020749110728502274,
-0.19631530344486237,
-0.4184427559375763,
0.32184484601020813,
-0.2817220389842987,
0.6558504700660706,
0.19629643857479095,
-0.0001232086942763999,
0.07663341611623764,
0.35823455452919006,
-0.12245369702577591,
-0.21540555357933044,
0.06179613247513771,
0.13875450193881989,
0.06916630268096924,
0.20783492922782898,
-0.04172668606042862,
-0.014701064676046371,
-0.6515752673149109,
0.02663656882941723,
-0.15972800552845,
0.2974437177181244,
-0.005564224906265736,
0.09437331557273865,
0.009831687435507774,
0.08096075057983398,
-0.3012821674346924,
0.06911538541316986,
-0.3261914849281311,
-0.05404364690184593,
0.24273249506950378,
0.04529021680355072,
0.007650298066437244,
0.06686186045408249,
0.2988046109676361,
-0.04010191932320595,
0.021910522133111954,
0.4202641546726227,
0.27661219239234924,
0.3658124804496765,
-0.16593945026397705,
0.12981246411800385,
0.18717536330223083,
0.39165499806404114,
-0.10821136832237244,
-0.43089452385902405,
-0.17392385005950928,
0.27717891335487366,
-0.11611402034759521,
0.2110203206539154,
-0.32978346943855286,
-0.015711991116404533,
0.27929747104644775,
0.4297996163368225,
-0.24344833195209503,
0.1159292608499527,
0.08304181694984436,
-0.08956518024206161,
-0.0029296791180968285,
-0.192494198679924,
0.039061903953552246,
0.179605171084404,
-0.1281748116016388,
-0.3079979717731476,
-0.11444225907325745,
0.10009782016277313,
0.12095971405506134,
-0.30516520142555237,
0.10964839905500412,
0.19388951361179352,
0.008168444968760014,
-0.1355562061071396,
0.008052858524024487,
-0.25095808506011963,
-0.03736970201134682,
0.057297151535749435,
0.379947692155838,
-0.1640041619539261,
0.014769498258829117,
0.09003230184316635,
0.061175864189863205,
0.06046643480658531,
0.2328323870897293,
0.0334700345993042,
-0.21082232892513275,
-0.17640027403831482,
-0.154916450381279,
-0.4953107237815857,
-0.3186216950416565,
-0.04502600431442261,
-0.31583088636398315,
-0.46812891960144043,
0.31270018219947815,
-0.40210768580436707,
-0.10819964855909348,
-0.0031758372206240892,
0.5753400921821594,
0.20597511529922485,
-0.1731269508600235,
0.281745970249176,
0.34107670187950134,
-0.2425624281167984,
0.2558037340641022,
-0.16184702515602112,
0.12062758207321167,
-0.12695591151714325,
0.37447959184646606,
0.05277049541473389,
-0.43890586495399475,
0.205288827419281,
0.044482938945293427,
0.2107006311416626,
0.10287478566169739,
-0.42160919308662415,
0.00016908672114368528,
0.2830241024494171,
0.28128576278686523,
-0.08307719230651855,
0.09201336652040482,
0.3403276801109314,
-0.34232297539711,
-0.1909656673669815,
0.04518637806177139,
-0.11482156068086624,
-0.07473184168338776,
-0.17848820984363556,
0.09114935994148254,
-0.07040051370859146,
-0.08972429484128952,
0.174400195479393,
0.05619056895375252,
0.15862706303596497,
-0.25810468196868896,
0.08013954758644104,
0.025199037045240402,
-0.1384504735469818,
-0.17999330163002014,
0.4784158170223236,
0.39562106132507324,
-0.7722763419151306,
-0.39882799983024597,
0.11439760774374008,
0.1689775437116623,
-0.1344379037618637,
0.28558698296546936,
-0.08924371004104614,
0.06236715242266655,
-0.23198027908802032,
0.4219355881214142,
0.11154841631650925,
-0.12787139415740967,
-0.19274435937404633,
0.06857172399759293,
0.06793218851089478,
0.004826782736927271,
0.22713103890419006,
-0.16176164150238037,
0.3247579038143158,
0.15313316881656647,
0.3888324797153473,
0.07133746892213821,
0.03995933383703232,
-0.32574114203453064,
-0.1789892613887787,
-0.3758670389652252,
0.0991172045469284,
0.1026763767004013,
-0.09611935168504715,
-0.07423592358827591,
-0.18361058831214905,
-0.3227066099643707,
0.08831460773944855,
-0.23800280690193176,
-0.04856216534972191,
0.040044017136096954,
0.30230841040611267,
0.4282282888889313,
0.4427759349346161,
0.0368308387696743,
-0.011563570238649845,
0.26620128750801086,
0.03248748928308487,
0.09515566378831863,
-0.2985554337501526,
-0.05198797211050987,
-0.23569107055664062,
0.04640115797519684,
-0.06619815528392792,
-0.20133812725543976,
-0.06590921431779861,
-0.009109639562666416,
-0.024678455665707588,
0.04752754420042038,
-0.32207152247428894,
0.07772883027791977,
-0.194769486784935,
0.21952658891677856,
-0.46182700991630554,
0.4788578152656555,
-0.26204463839530945,
-0.2415875345468521,
0.04626620560884476,
0.3040083050727844,
0.18663805723190308,
-0.17258411645889282,
0.16633306443691254,
0.09493917226791382,
-0.0937458798289299,
-0.19922231137752533,
0.11901677399873734,
-0.1917668730020523,
0.15935754776000977,
-0.15710033476352692,
0.057443857192993164,
-0.06692266464233398,
0.19235505163669586,
0.12207698076963425,
-0.1792985498905182,
0.48702898621559143,
0.03920195251703262,
0.27926501631736755,
-0.1853855550289154,
-0.1539820283651352,
0.11312583088874817,
-0.0026398892514407635,
0.010103416629135609,
-0.3382647633552551,
-0.08892489224672318,
-0.00465530576184392,
-0.11991759389638901,
-0.06265714764595032,
0.026810308918356895,
0.1231289654970169,
0.017413951456546783,
0.02857004664838314,
-0.1038767620921135,
0.05353522300720215,
-0.33471643924713135,
0.06762348115444183,
0.04714572802186012,
-0.36819419264793396,
0.3542417883872986,
0.2893678545951843,
-0.1669883131980896,
-0.24667903780937195,
-0.24663162231445312,
-0.2522495687007904,
0.13046467304229736,
-0.052790042012929916,
-0.23802752792835236,
0.06198764219880104,
-0.13294640183448792,
0.09304413944482803,
-0.2039637714624405,
-0.03931255266070366,
0.007351691368967295,
0.1990104615688324,
-0.5885117650032043,
0.0874701514840126,
-0.3268994987010956,
-0.08485236018896103,
-0.008932426571846008,
-0.11832062900066376,
-0.03503309562802315,
-0.37141016125679016,
0.18186789751052856,
-0.1842873990535736,
-0.033905114978551865,
0.22881942987442017,
0.010824852623045444,
0.19860665500164032,
-0.015873346477746964,
0.034943465143442154,
-0.1994725465774536,
-0.19226869940757751,
-0.2766531705856323,
-0.07508470118045807,
-0.026126613840460777,
0.21214333176612854,
0.24640415608882904,
-0.01749318465590477,
-0.10351864993572235,
-0.10360042750835419,
-0.2901809513568878,
0.26085343956947327,
-0.21846896409988403,
0.09603162109851837,
-0.1443014144897461,
0.13346607983112335,
-0.11501450091600418,
-0.2030872404575348,
0.3162396252155304,
-0.07128536701202393,
-0.22333651781082153,
-0.07486896216869354,
0.1445920765399933,
-0.01725723035633564,
-0.11714127659797668,
-0.34397488832473755,
0.08657018095254898,
-0.2017683982849121,
-0.05190010368824005,
-0.1715555489063263,
-0.07578551024198532,
-0.34031715989112854,
0.3888872563838959,
0.10980290174484253,
-0.12065836042165756,
0.08358822017908096,
-0.27835625410079956,
0.07603348046541214,
0.36203449964523315,
-0.04950564727187157,
-0.22942140698432922,
0.16086117923259735,
0.053470268845558167,
-0.21142426133155823,
-0.0739707201719284,
-0.30189675092697144,
-0.5255081653594971,
-0.013785338029265404,
0.2082930952310562,
0.2294153869152069,
0.41046345233917236,
0.14614339172840118,
-0.016689075157046318,
-0.08218935132026672,
-0.08180689066648483,
-0.3491123914718628,
0.03399038687348366,
-0.12745772302150726,
0.18635213375091553,
-0.15800747275352478,
0.5168378353118896,
-0.26276248693466187,
0.4241447448730469,
0.4182260036468506,
-0.33448341488838196,
0.40186336636543274,
-0.10264245420694351,
0.48110151290893555,
-0.19389012455940247,
-0.19007138907909393,
0.13050325214862823,
0.05210987851023674,
0.04143485054373741,
0.22562275826931,
-0.07838447391986847,
0.1515784114599228,
0.05007573962211609,
0.27468469738960266,
-0.1358632594347,
-0.24876727163791656,
0.06968265771865845,
-0.026574870571494102,
-0.003489870112389326,
-0.10627318918704987,
0.285016268491745,
-0.1292751282453537,
0.15036192536354065,
0.22823762893676758,
0.4088183641433716,
0.36972862482070923,
-0.11079570651054382,
0.3304608464241028,
-0.3246174454689026,
-0.24792250990867615,
0.5417067408561707,
0.07691430300474167,
0.25908225774765015,
-0.19516165554523468,
-0.08861775696277618,
0.4172724485397339,
0.16333159804344177,
0.5660609006881714,
-0.3769993185997009,
-0.3231421709060669,
0.27170810103416443,
0.26718446612358093,
-0.37121251225471497,
-0.11774448305368423,
-0.020698364824056625,
-0.04353204742074013,
-0.01803319901227951,
0.6748079061508179,
-0.4430408179759979,
-0.04734227806329727,
0.265881210565567,
0.06509604305028915,
-0.1818183958530426,
-0.4256833493709564,
-0.49097391963005066,
-0.10806609690189362,
-0.4735228419303894,
-0.03776717931032181,
-0.06436038762331009,
0.3547734022140503,
0.05869942530989647,
0.2814425826072693,
-0.07200504094362259,
0.02132226713001728,
0.23081201314926147,
0.3325808644294739,
0.08805584162473679,
0.05965650826692581,
0.19274917244911194,
0.41229569911956787,
0.4405749440193176,
0.2876454293727875,
0.38522037863731384,
-0.08862381428480148,
-0.5030118227005005,
0.11899556964635849,
0.07952946424484253,
0.19151319563388824,
0.3066512942314148,
-0.05773394554853439,
0.25836309790611267,
-0.15171198546886444,
0.0912914127111435,
-0.2620263993740082,
-0.3267897069454193,
0.12303818762302399,
0.11361454427242279,
0.03200019896030426,
-0.2792312502861023,
0.4609562158584595,
-0.0027984848711639643,
-0.11770518124103546,
-0.11319369822740555,
0.7454816102981567,
-0.044563326984643936,
0.906688928604126,
-0.022490469738841057,
0.903816819190979,
-0.18376673758029938,
0.005494824144989252,
0.4124699532985687,
-0.1430426836013794,
0.5982550978660583,
-0.1397470384836197,
0.005640789866447449,
-0.4372064471244812,
-0.1494947373867035,
-0.05437404289841652,
0.013612362556159496,
0.21451890468597412,
-0.0728713870048523,
-0.3070850968360901,
0.12280220538377762,
-0.07230066508054733,
-0.14651773869991302,
-0.08935727179050446,
-0.02706841006875038,
0.06110193952918053,
-0.44983527064323425,
-0.32945987582206726,
0.007824145257472992,
0.44732430577278137,
0.3218042850494385,
0.059540778398513794,
-0.07983072847127914,
-0.3183341920375824,
0.004913668148219585,
-0.35883885622024536,
0.07128839194774628,
0.2994559109210968,
0.16056090593338013,
0.36016643047332764,
-0.20492048561573029,
0.2669718265533447,
0.1277434527873993,
0.7160631418228149,
-0.38896045088768005,
-0.2528811991214752,
0.12047973275184631,
-0.366764634847641,
-0.2427174597978592,
-0.12803614139556885,
-0.30137601494789124,
0.3244975507259369,
0.24489499628543854,
-0.4326145350933075,
0.29452940821647644,
0.18069593608379364,
-0.16465193033218384,
-0.16185638308525085,
0.14550456404685974,
-0.06770617514848709,
-0.3563482463359833,
-0.11755257099866867,
-0.09057176858186722,
0.3375670313835144,
-0.14440074563026428,
0.06597653776407242,
0.20468279719352722,
-0.08204789459705353,
0.1091366559267044,
0.08383018523454666,
-0.12310907244682312,
-0.005533761344850063,
0.5033709406852722,
-0.22855928540229797,
0.11460459977388382,
0.34993988275527954,
0.12862329185009003,
-0.44989287853240967,
0.0003882453893311322,
-0.4983140528202057,
0.5014638900756836,
-0.3836683928966522,
-0.1845143884420395,
0.34911981225013733,
-0.23497037589550018,
-0.02267720364034176,
-0.0013708558399230242,
0.3730074465274811,
-0.23263828456401825,
-0.2815312445163727,
-0.26019182801246643,
-0.10827504843473434,
0.36139732599258423,
-0.13285954296588898,
0.16167593002319336,
-0.08604393899440765,
0.11582794040441513,
-0.12790361046791077,
0.012833531945943832,
-0.2126484364271164,
0.15792310237884521,
-0.13722887635231018,
0.0753517597913742,
-0.07343509793281555,
-0.21430353820323944,
-0.005420655943453312,
-0.2459961175918579,
0.019829919561743736,
0.1660509705543518,
0.028093475848436356,
-0.016721485182642937,
-0.010271817445755005,
0.17211829125881195,
0.06172143295407295,
0.12581580877304077,
-0.4139373004436493,
-0.07177039235830307,
-0.0320810042321682,
-0.39670583605766296,
0.3543544113636017,
0.20075111091136932,
-0.04689202830195427,
-0.07181432098150253,
0.002162652090191841,
0.07318703830242157,
0.0412617102265358,
0.24621160328388214,
0.12417799979448318,
0.5196714997291565,
0.2802634537220001,
-0.11639057099819183,
-0.4827328026294708,
0.14838950335979462,
0.024219747632741928,
0.4092273414134979,
0.15061528980731964,
-0.04090229049324989,
0.3504684865474701,
-0.29400500655174255,
-0.06803026795387268,
0.004269827157258987,
0.22359369695186615,
0.3811904191970825,
-0.09775079041719437,
0.0681164339184761,
0.21369896829128265,
0.04740546643733978,
-0.2503564655780792,
0.03477910906076431,
0.38098442554473877,
-0.14747069776058197,
-0.03412383794784546,
0.23386873304843903,
0.18129977583885193,
0.12278834730386734,
-0.19792440533638,
0.06926000118255615,
0.20642589032649994,
0.1313120275735855,
-0.39175906777381897,
0.04854492098093033,
0.14348888397216797,
0.2531648874282837,
0.4207596480846405,
0.226064071059227,
0.3615332841873169,
0.10744072496891022,
-0.1683153510093689,
0.030405037105083466,
-0.042869944125413895,
0.3624761700630188,
-0.17027774453163147,
-0.5442959666252136,
0.45911550521850586,
0.19908122718334198,
0.4446202516555786,
-0.300570547580719,
0.011094232089817524,
0.22464364767074585,
-0.0075121670961380005,
0.0029913445468991995,
-0.1264297217130661,
0.01947956532239914,
-0.20735307037830353,
-0.4814678132534027,
0.24697059392929077,
0.007039297372102737,
-0.16179600358009338,
-0.07484143227338791,
0.09046324342489243,
-0.16714340448379517,
-0.11276157200336456,
-0.12882210314273834,
-0.31276264786720276,
-0.16333015263080597,
-0.3798961937427521,
0.29762428998947144,
0.27462929487228394,
0.01720622181892395,
-0.09243019670248032,
-0.08203772455453873,
-0.012950737960636616,
0.3628854751586914,
0.07100282609462738,
0.5582455396652222,
0.09283310920000076,
-0.1161193922162056,
0.11368659883737564,
0.010831814259290695,
0.05225749686360359,
-0.014790138229727745,
0.1180373951792717,
-0.16040554642677307,
0.2515518069267273,
0.2814062237739563,
0.07933174073696136,
-0.12622275948524475,
-0.3866676390171051,
-0.026021864265203476,
0.651531994342804,
0.09285786002874374,
-0.12936824560165405,
-0.407452791929245,
0.07243694365024567,
-0.110880546271801,
0.038362711668014526,
-0.3113243877887726,
0.2983472943305969,
0.03686930611729622,
-0.09624901413917542,
-0.012902723625302315,
0.2667495310306549,
0.023687992244958878,
-0.1871163547039032,
0.2547547221183777,
0.8629193902015686,
-0.08747672289609909,
-0.2432614415884018,
0.15775993466377258,
-0.5931991338729858,
0.23700450360774994,
-0.07493975013494492,
-0.2206319123506546,
0.227603018283844,
0.6163491606712341,
0.4311293959617615,
-0.0319099985063076,
-0.010508601553738117,
-0.04498790577054024,
0.26897895336151123,
0.4219910204410553,
-0.00008609865471953526,
-0.3120776414871216,
-0.11986386030912399,
-0.20529405772686005,
-0.10858345776796341,
0.016001079231500626,
0.11131499707698822,
-0.10173149406909943,
-0.0438833124935627,
0.03898793086409569,
0.12288050353527069,
-0.1738751381635666,
-0.3629506528377533,
0.6114472150802612,
0.03690795972943306,
0.34708473086357117,
-0.13606008887290955,
-0.0059692878276109695,
-0.1750841736793518,
-0.16968268156051636,
0.03294584900140762,
0.28291475772857666,
-0.18066048622131348,
0.22057165205478668,
-0.1766616404056549,
-0.2883686423301697,
-0.26442617177963257,
0.25165215134620667,
0.07120125740766525,
-0.2701525390148163,
-0.20920014381408691,
0.18262223899364471,
-0.17582394182682037,
0.044812530279159546,
-0.03616902232170105,
0.0521940141916275,
-0.0462338961660862,
0.2966391146183014,
0.10567732155323029,
-0.264036625623703,
0.6632553339004517,
-0.3797847032546997,
0.03185649588704109,
0.18263064324855804,
0.19510890543460846,
0.49074921011924744,
0.007104380987584591,
-0.89055335521698,
0.04151272773742676,
0.03829405456781387,
-0.061208099126815796,
-0.323199987411499,
-0.0907064899802208,
0.20052139461040497,
0.07877621799707413,
-0.23113086819648743,
-0.17332342267036438,
0.016819532960653305,
0.12169090658426285,
0.017773784697055817,
-0.26730796694755554
] |
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.017279598861932755,
-0.5772307515144348,
0.06312285363674164,
0.2795126736164093,
0.08014950156211853,
0.27220675349235535,
0.3179304301738739,
0.1032484620809555,
0.5430013537406921,
0.27028775215148926,
-0.11547315865755081,
0.11195041239261627,
0.4107092320919037,
-0.10571878403425217,
-0.05825597047805786,
-0.019387995824217796,
0.22881749272346497,
0.2564588785171509,
0.22517114877700806,
-0.133942112326622,
-0.20510074496269226,
0.09734763205051422,
-0.2735079228878021,
0.21045471727848053,
-0.21787646412849426,
0.15188847482204437,
-0.22787684202194214,
0.05689408630132675,
-0.17686419188976288,
-0.4319815933704376,
0.32455867528915405,
-0.22393403947353363,
0.6598057150840759,
0.19772271811962128,
-0.00012157022865721956,
0.12187913805246353,
0.38074254989624023,
-0.15950995683670044,
-0.25136828422546387,
0.1151006743311882,
0.07641639560461044,
0.027223872020840645,
0.2132132202386856,
-0.07267741858959198,
0.006101013161242008,
-0.6095624566078186,
0.05332890525460243,
-0.17941993474960327,
0.24127556383609772,
0.02455890364944935,
0.11260111629962921,
0.05767915025353432,
0.04220433160662651,
-0.37552696466445923,
0.09923212230205536,
-0.31272661685943604,
-0.06819204241037369,
0.2848207950592041,
-0.007159828208386898,
0.002299804938957095,
0.006347860675305128,
0.3573624789714813,
-0.02006930112838745,
0.019340889528393745,
0.40046223998069763,
0.22847579419612885,
0.3043693006038666,
-0.1044265627861023,
0.15673713386058807,
0.17006249725818634,
0.3159221410751343,
-0.15487723052501678,
-0.39620861411094666,
-0.12166787683963776,
0.1943071037530899,
-0.12639844417572021,
0.19703702628612518,
-0.30634739995002747,
0.02351386845111847,
0.3119213581085205,
0.395224392414093,
-0.19003739953041077,
0.11774006485939026,
0.08200948685407639,
-0.06454765796661377,
-0.05138431861996651,
-0.21085506677627563,
0.024079052731394768,
0.19027945399284363,
-0.08653094619512558,
-0.28200918436050415,
-0.15597333014011383,
0.07476403564214706,
0.08232749253511429,
-0.35040879249572754,
0.168051615357399,
0.20654594898223877,
0.020942971110343933,
-0.07232388108968735,
-0.024858595803380013,
-0.2064308077096939,
0.015259934589266777,
0.15694041550159454,
0.36110302805900574,
-0.20304587483406067,
-0.01781168207526207,
0.044889990240335464,
0.019162727519869804,
0.1014065369963646,
0.27696356177330017,
-0.0010165264829993248,
-0.21690714359283447,
-0.11316897720098495,
-0.15016503632068634,
-0.49022775888442993,
-0.336726576089859,
-0.04144088923931122,
-0.3489939272403717,
-0.4786965548992157,
0.30672183632850647,
-0.4552727937698364,
-0.13043475151062012,
0.01864609681069851,
0.6528445482254028,
0.18601474165916443,
-0.2571895718574524,
0.2522352635860443,
0.32968226075172424,
-0.3448685109615326,
0.2203895002603531,
-0.19810941815376282,
0.11313501745462418,
-0.11607953161001205,
0.4127856194972992,
0.10975617170333862,
-0.4600387513637543,
0.17544648051261902,
0.012085131369531155,
0.22218018770217896,
0.08428379148244858,
-0.3430343568325043,
-0.03079059161245823,
0.31620827317237854,
0.2977692186832428,
-0.06580507755279541,
0.07196720689535141,
0.37832894921302795,
-0.32620564103126526,
-0.22400668263435364,
0.04656852036714554,
-0.12611691653728485,
-0.1155301183462143,
-0.1683061569929123,
0.11499959230422974,
-0.04471934214234352,
-0.06951548159122467,
0.23598213493824005,
0.09916103631258011,
0.14315716922283173,
-0.2634616494178772,
0.08151675760746002,
0.03930431976914406,
-0.18172162771224976,
-0.17815276980400085,
0.46683168411254883,
0.4261373281478882,
-0.7533155083656311,
-0.35830703377723694,
0.10445935279130936,
0.22463998198509216,
-0.13046729564666748,
0.2801528871059418,
-0.13365525007247925,
0.051203370094299316,
-0.2663242220878601,
0.47767335176467896,
0.1605357974767685,
-0.15009263157844543,
-0.21011453866958618,
0.11528760194778442,
0.10371845960617065,
0.0163558479398489,
0.19066780805587769,
-0.15384408831596375,
0.33974015712738037,
0.11711142212152481,
0.3372931182384491,
-0.024212658405303955,
0.036470066756010056,
-0.34727397561073303,
-0.255196213722229,
-0.33730989694595337,
0.08232685923576355,
0.09593231976032257,
-0.05802858620882034,
-0.11279790848493576,
-0.10977733135223389,
-0.3149944245815277,
0.11164318770170212,
-0.21942847967147827,
-0.06899131834506989,
0.1341981291770935,
0.29314160346984863,
0.3978092074394226,
0.4509914517402649,
0.0653037577867508,
-0.07931564748287201,
0.26044055819511414,
0.02858486771583557,
0.060842931270599365,
-0.1846124529838562,
-0.10177192836999893,
-0.28286412358283997,
0.047787442803382874,
-0.10882019996643066,
-0.21916598081588745,
-0.028245123103260994,
-0.002813933417201042,
-0.05790271237492561,
0.05746179446578026,
-0.3144201934337616,
0.10719062387943268,
-0.2037622034549713,
0.1530473232269287,
-0.43859511613845825,
0.4663407802581787,
-0.3173542320728302,
-0.2310287207365036,
0.04600328579545021,
0.2543342113494873,
0.17450077831745148,
-0.16363896429538727,
0.12952642142772675,
0.10269757360219955,
-0.05661974102258682,
-0.2618730068206787,
0.1746414452791214,
-0.1655094176530838,
0.14276239275932312,
-0.2291909158229828,
0.08323057740926743,
-0.041944749653339386,
0.20455145835876465,
0.11576368659734726,
-0.22818516194820404,
0.45758384466171265,
0.05206082761287689,
0.26777055859565735,
-0.14735984802246094,
-0.22050347924232483,
0.13868847489356995,
0.02980159968137741,
-0.0034482546616345644,
-0.32383430004119873,
-0.10255724936723709,
0.037752289324998856,
-0.11645346134901047,
-0.06538501381874084,
0.01812111958861351,
0.19225694239139557,
0.019889770075678825,
0.03167015314102173,
-0.10305547714233398,
0.08113855868577957,
-0.25992754101753235,
0.02538793720304966,
0.09230522066354752,
-0.4249451160430908,
0.36047598719596863,
0.2861749827861786,
-0.13271448016166687,
-0.2303948700428009,
-0.26571887731552124,
-0.28749880194664,
0.06737486273050308,
-0.08044205605983734,
-0.22731351852416992,
0.1274016946554184,
-0.07425534725189209,
0.08627088367938995,
-0.22239282727241516,
-0.0440518818795681,
0.012266675941646099,
0.14903709292411804,
-0.5887739062309265,
0.13965897262096405,
-0.38800355792045593,
-0.09424590319395065,
0.029119526967406273,
-0.13836374878883362,
-0.08690408617258072,
-0.3894473910331726,
0.23123733699321747,
-0.1868148148059845,
-0.05425843223929405,
0.23514743149280548,
-0.08085662871599197,
0.18291151523590088,
0.01586746610701084,
-0.009837775491178036,
-0.16900373995304108,
-0.16157084703445435,
-0.3648662269115448,
-0.08544234931468964,
-0.024152545258402824,
0.29703858494758606,
0.2358439713716507,
-0.03164512291550636,
-0.1209295243024826,
-0.13398700952529907,
-0.3524388372898102,
0.2762562036514282,
-0.14326521754264832,
0.12914791703224182,
-0.10654930025339127,
0.07737141102552414,
-0.17035597562789917,
-0.17098237574100494,
0.31471356749534607,
-0.022213846445083618,
-0.19754815101623535,
-0.014907664619386196,
0.12426146864891052,
0.03556182608008385,
-0.06515329331159592,
-0.33283016085624695,
0.10470706969499588,
-0.2776852250099182,
-0.11367107927799225,
-0.1886594444513321,
-0.053595151752233505,
-0.3046748638153076,
0.38917380571365356,
0.11959362775087357,
-0.1083313599228859,
0.09647034108638763,
-0.29303213953971863,
0.14722953736782074,
0.36781033873558044,
-0.10097159445285797,
-0.29944029450416565,
0.18631373345851898,
0.028902003541588783,
-0.21744613349437714,
-0.0438997745513916,
-0.3964250981807709,
-0.48383569717407227,
-0.026263637468218803,
0.22399987280368805,
0.20831719040870667,
0.37736672163009644,
0.1585732102394104,
-0.08787602931261063,
-0.08576887845993042,
-0.09887898713350296,
-0.3516179919242859,
0.08676166832447052,
-0.18403266370296478,
0.1607314795255661,
-0.19173787534236908,
0.5027087926864624,
-0.2363252490758896,
0.44152042269706726,
0.4734842777252197,
-0.3138490915298462,
0.4359810948371887,
-0.05602715536952019,
0.5026717782020569,
-0.25588375329971313,
-0.16059942543506622,
0.12896808981895447,
0.04156190901994705,
-0.015303051099181175,
0.23191218078136444,
-0.06993406265974045,
0.13131727278232574,
0.0795842707157135,
0.24802131950855255,
-0.08464451134204865,
-0.28263500332832336,
0.11312326788902283,
0.02794509008526802,
0.004901450593024492,
-0.08292464911937714,
0.29153165221214294,
-0.07844517379999161,
0.1364879161119461,
0.26199671626091003,
0.49949419498443604,
0.374681293964386,
-0.05959819629788399,
0.39227986335754395,
-0.2716044783592224,
-0.29883238673210144,
0.5406866073608398,
0.07666856795549393,
0.2704482078552246,
-0.23162738978862762,
-0.1329110711812973,
0.3817056119441986,
0.11871699243783951,
0.4669497013092041,
-0.32021287083625793,
-0.2769588828086853,
0.36230412125587463,
0.21574783325195312,
-0.35391172766685486,
-0.16028311848640442,
-0.04219917580485344,
-0.064976766705513,
-0.045661330223083496,
0.6810310482978821,
-0.44880983233451843,
-0.09192007780075073,
0.27196335792541504,
0.04849422350525856,
-0.19177517294883728,
-0.4296596944332123,
-0.4913111925125122,
-0.2099977284669876,
-0.43703779578208923,
-0.07126777619123459,
-0.0832088440656662,
0.28824520111083984,
0.06757629662752151,
0.2692578136920929,
-0.06398624926805496,
0.021134214475750923,
0.17592747509479523,
0.29881545901298523,
0.08544468879699707,
0.05540034919977188,
0.22257806360721588,
0.35165122151374817,
0.44935843348503113,
0.310546875,
0.37614747881889343,
-0.09229999035596848,
-0.36851754784584045,
0.19497880339622498,
0.12154883146286011,
0.13476267457008362,
0.34883400797843933,
-0.0598921962082386,
0.31283265352249146,
-0.14109466969966888,
0.13426683843135834,
-0.25919124484062195,
-0.31055545806884766,
0.07688970118761063,
0.058270975947380066,
0.0437600202858448,
-0.20969650149345398,
0.5280874967575073,
-0.017682967707514763,
-0.10884208232164383,
-0.10193168371915817,
0.7750852704048157,
-0.0008788991253823042,
0.8857609629631042,
0.056502848863601685,
0.909035861492157,
-0.1713172346353531,
0.02348911203444004,
0.4463818669319153,
-0.1876300871372223,
0.4825897812843323,
-0.19514624774456024,
0.042612843215465546,
-0.4373917877674103,
-0.2519877254962921,
-0.056614141911268234,
0.0048722075298428535,
0.16581085324287415,
-0.08413129299879074,
-0.35714343190193176,
0.1029772236943245,
-0.04961568862199783,
-0.16446086764335632,
-0.08599738776683807,
-0.06378734111785889,
-0.0010359003208577633,
-0.3792615532875061,
-0.303900808095932,
0.029028501361608505,
0.4822969138622284,
0.36954084038734436,
0.022044392302632332,
-0.07903241366147995,
-0.2914417088031769,
0.006442755926400423,
-0.3014764189720154,
0.040913257747888565,
0.2598651051521301,
0.15976345539093018,
0.3091951310634613,
-0.16461260616779327,
0.2454792559146881,
0.03595932573080063,
0.6067762970924377,
-0.396373987197876,
-0.22782738506793976,
0.06608564406633377,
-0.29782289266586304,
-0.2367134988307953,
-0.09107309579849243,
-0.32103079557418823,
0.3530060648918152,
0.21641385555267334,
-0.39307671785354614,
0.2455594539642334,
0.1277560442686081,
-0.16995234787464142,
-0.19087453186511993,
0.17982377111911774,
-0.10010845214128494,
-0.3621915280818939,
-0.07925139367580414,
-0.08531540632247925,
0.24354800581932068,
-0.09452350437641144,
0.07483958452939987,
0.17136308550834656,
-0.019291073083877563,
0.13981617987155914,
0.12925446033477783,
-0.13242502510547638,
0.006368538830429316,
0.5463544130325317,
-0.26051780581474304,
0.1305040866136551,
0.3212527334690094,
0.15464141964912415,
-0.49566400051116943,
-0.03223583847284317,
-0.5321475267410278,
0.4935291111469269,
-0.3097323775291443,
-0.1765691488981247,
0.22866703569889069,
-0.18502764403820038,
-0.00022397487191483378,
0.03565508499741554,
0.41128337383270264,
-0.30130791664123535,
-0.29879695177078247,
-0.27008864283561707,
-0.0951463133096695,
0.4340413510799408,
-0.09440912306308746,
0.1565036177635193,
-0.08192355185747147,
0.07990143448114395,
-0.10405655205249786,
0.04196184501051903,
-0.23910664021968842,
0.1509060263633728,
-0.12278787791728973,
0.03788857161998749,
-0.17882944643497467,
-0.21388167142868042,
0.020580029115080833,
-0.17556114494800568,
0.016848254948854446,
0.17163722217082977,
-0.0522175095975399,
-0.042493708431720734,
0.011465232819318771,
0.17594638466835022,
0.026844335719943047,
0.09678102284669876,
-0.3826614022254944,
-0.08191177994012833,
-0.06489751487970352,
-0.37801405787467957,
0.30313119292259216,
0.1970614790916443,
-0.07791759073734283,
-0.11886630952358246,
0.015341530553996563,
0.03078688308596611,
0.06249057874083519,
0.25312215089797974,
0.18423056602478027,
0.5281672477722168,
0.24601855874061584,
-0.13276307284832,
-0.5212600827217102,
0.12348823994398117,
0.0725359097123146,
0.4531141519546509,
0.14549799263477325,
-0.06404558569192886,
0.37157654762268066,
-0.33486562967300415,
-0.035445988178253174,
-0.06358171999454498,
0.28200051188468933,
0.3686346709728241,
-0.11746986210346222,
0.03124356083571911,
0.17432989180088043,
0.06965300440788269,
-0.2446892410516739,
0.06746434420347214,
0.3783979117870331,
-0.12763918936252594,
0.021246153861284256,
0.2595113515853882,
0.196068674325943,
0.12450966238975525,
-0.17767806351184845,
0.0934915840625763,
0.14377200603485107,
0.18012650310993195,
-0.4203799068927765,
0.014665983617305756,
0.05939223989844322,
0.27377811074256897,
0.39315420389175415,
0.18469861149787903,
0.4034120738506317,
0.07298164814710617,
-0.12661629915237427,
0.07672540843486786,
0.004841636400669813,
0.3915553390979767,
-0.20590174198150635,
-0.6314303874969482,
0.47307318449020386,
0.2434367835521698,
0.5203193426132202,
-0.30032649636268616,
-0.027320627123117447,
0.2113475650548935,
0.01586747169494629,
0.0019207707373425364,
-0.14044691622257233,
0.008724031038582325,
-0.17970171570777893,
-0.422844260931015,
0.26030823588371277,
-0.013575328513979912,
-0.25005802512168884,
-0.1014532819390297,
0.055635396391153336,
-0.13754376769065857,
-0.12219931185245514,
-0.09836693853139877,
-0.27382320165634155,
-0.13516609370708466,
-0.29592856764793396,
0.3009159564971924,
0.2911665737628937,
0.04079737514257431,
-0.02535642497241497,
-0.042055364698171616,
0.00727076455950737,
0.34672075510025024,
0.04850055277347565,
0.5328792929649353,
0.14213970303535461,
-0.10488138347864151,
0.07605984807014465,
0.06317289173603058,
0.058993514627218246,
0.00003609101622714661,
0.13441689312458038,
-0.16734786331653595,
0.21819041669368744,
0.34097209572792053,
0.06370199471712112,
-0.1314152479171753,
-0.31977683305740356,
-0.0504971444606781,
0.5998361706733704,
0.10000215470790863,
-0.16187681257724762,
-0.35878750681877136,
0.10461173206567764,
-0.06218978390097618,
0.021511102095246315,
-0.26326456665992737,
0.28260189294815063,
0.11950492113828659,
-0.14053505659103394,
0.08468197286128998,
0.2874368727207184,
0.038590606302022934,
-0.17727048695087433,
0.3113381564617157,
0.8044198751449585,
-0.07803411781787872,
-0.2670656740665436,
0.12880834937095642,
-0.5427348613739014,
0.2680162191390991,
-0.18297825753688812,
-0.18503503501415253,
0.2906191051006317,
0.649626612663269,
0.41903215646743774,
-0.03230738267302513,
0.07213109731674194,
-0.110471211373806,
0.34199029207229614,
0.44373267889022827,
0.021263860166072845,
-0.33508753776550293,
-0.16642150282859802,
-0.2112397402524948,
-0.13984385132789612,
-0.06455443054437637,
0.13040702044963837,
-0.06124335899949074,
-0.012106536887586117,
0.03484603762626648,
0.10608712583780289,
-0.09498774260282516,
-0.34371083974838257,
0.6024442911148071,
0.038087062537670135,
0.3508692681789398,
-0.1602427363395691,
-0.04480316862463951,
-0.17961932718753815,
-0.11768217384815216,
0.03824443370103836,
0.23024272918701172,
-0.21099673211574554,
0.16365249454975128,
-0.14356555044651031,
-0.31418168544769287,
-0.26847440004348755,
0.29332268238067627,
0.09347706288099289,
-0.2817206084728241,
-0.17171849310398102,
0.14325983822345734,
-0.20024895668029785,
0.03347460925579071,
-0.027099046856164932,
0.07889311015605927,
-0.03356675058603287,
0.33099907636642456,
0.07544302195310593,
-0.2962704300880432,
0.6966265439987183,
-0.37283506989479065,
0.07053136825561523,
0.2038528323173523,
0.2360534816980362,
0.5011436939239502,
0.03288127854466438,
-0.8710231184959412,
-0.006415095180273056,
0.09064827859401703,
-0.07195466011762619,
-0.2740330100059509,
-0.055465541779994965,
0.19809432327747345,
0.038443922996520996,
-0.23263904452323914,
-0.08695149421691895,
-0.0006063325563445687,
0.11367864161729813,
-0.04630749672651291,
-0.2873269021511078
] |
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.13970813155174255,
-0.533545970916748,
0.05147164687514305,
0.3196974992752075,
0.1264747977256775,
0.27505674958229065,
0.41199612617492676,
-0.040478285402059555,
0.6586287021636963,
0.2073548585176468,
-0.062413282692432404,
0.1538582593202591,
0.3866048753261566,
-0.04890155792236328,
0.013030270114541054,
-0.01736144907772541,
0.30340275168418884,
0.2208627462387085,
0.24146108329296112,
-0.15659816563129425,
-0.18136973679065704,
0.07171725481748581,
-0.277050256729126,
0.11127297580242157,
-0.19683091342449188,
0.1754428893327713,
-0.24991391599178314,
-0.0327952578663826,
-0.22553835809230804,
-0.39271488785743713,
0.32989370822906494,
-0.24550430476665497,
0.6396083831787109,
0.19093121588230133,
-0.0001244103186763823,
0.11366710811853409,
0.38217753171920776,
-0.1372377872467041,
-0.259538859128952,
0.12433965504169464,
-0.040792785584926605,
0.028389228507876396,
0.22597329318523407,
-0.07417450100183487,
0.04440004751086235,
-0.6045319437980652,
0.030618097633123398,
-0.2664101719856262,
0.2041674554347992,
0.07840278744697571,
0.0811232328414917,
0.026671716943383217,
0.05949336662888527,
-0.35015878081321716,
0.14530625939369202,
-0.29447034001350403,
-0.1072397381067276,
0.2723376750946045,
0.03636644780635834,
0.05917879566550255,
0.09677029401063919,
0.223483607172966,
-0.02970072254538536,
-0.0044607724994421005,
0.3816768229007721,
0.3206751048564911,
0.3233526647090912,
-0.14994101226329803,
0.18329700827598572,
0.13964425027370453,
0.477842777967453,
-0.08671437203884125,
-0.3786841630935669,
-0.12745897471904755,
0.21332231163978577,
-0.16934674978256226,
0.1781800240278244,
-0.30183547735214233,
0.04948735609650612,
0.2833385169506073,
0.39472076296806335,
-0.2305176705121994,
0.17291860282421112,
0.11101865023374557,
-0.10586528480052948,
0.029611049219965935,
-0.23336999118328094,
0.08126862347126007,
0.12547867000102997,
-0.08155524730682373,
-0.23091259598731995,
-0.11102115362882614,
0.12038411945104599,
0.11445936560630798,
-0.3478136956691742,
0.22444769740104675,
0.21049991250038147,
0.01923082396388054,
-0.1170734316110611,
0.035505231469869614,
-0.11751255393028259,
0.0451514795422554,
0.0825696736574173,
0.3602946698665619,
-0.1612788736820221,
0.04259512200951576,
0.09055016934871674,
-0.0014763359213247895,
0.03157084807753563,
0.2060631811618805,
0.03467019647359848,
-0.235473170876503,
-0.12731854617595673,
-0.05116438493132591,
-0.46011748909950256,
-0.39723968505859375,
-0.02208450436592102,
-0.2939675450325012,
-0.4682564437389374,
0.32697004079818726,
-0.3949011564254761,
-0.1495511680841446,
0.035907480865716934,
0.6100538969039917,
0.24236539006233215,
-0.24100305140018463,
0.25742000341415405,
0.33290666341781616,
-0.2494075894355774,
0.25055524706840515,
-0.21557900309562683,
0.10016094893217087,
-0.1791633814573288,
0.4160977303981781,
0.08831650763750076,
-0.43629881739616394,
0.2058897614479065,
-0.01568521186709404,
0.1153181865811348,
0.016086099669337273,
-0.44228029251098633,
-0.010799524374306202,
0.32890796661376953,
0.31009432673454285,
-0.11815516650676727,
0.06469899415969849,
0.2906968891620636,
-0.39395031332969666,
-0.17814408242702484,
0.08676356077194214,
-0.11326046288013458,
-0.02435045689344406,
-0.19088642299175262,
0.07114733755588531,
-0.11139914393424988,
-0.13815391063690186,
0.2029104232788086,
0.12367627024650574,
0.15407995879650116,
-0.2610228955745697,
0.10423668473958969,
0.032444048672914505,
-0.16944974660873413,
-0.188051238656044,
0.5441299676895142,
0.3905662000179291,
-0.7543743848800659,
-0.3546566367149353,
0.021022094413638115,
0.19536784291267395,
-0.08983325213193893,
0.20882447063922882,
-0.07030362635850906,
0.13844160735607147,
-0.28013527393341064,
0.4364032447338104,
0.2500099837779999,
-0.029927268624305725,
-0.1367250382900238,
-0.027881579473614693,
0.0822836384177208,
0.011290157213807106,
0.14623990654945374,
-0.04641159623861313,
0.30896806716918945,
0.23037415742874146,
0.2861497700214386,
0.006139114964753389,
0.05979647487401962,
-0.36159467697143555,
-0.19483844935894012,
-0.2727173864841461,
0.11601220071315765,
0.08043073117733002,
-0.037242334336042404,
-0.02800905704498291,
-0.09629309922456741,
-0.3618800640106201,
0.06445019692182541,
-0.16095861792564392,
-0.04790513217449188,
0.05180796608328819,
0.3199556767940521,
0.42494747042655945,
0.44397202134132385,
0.06355342268943787,
-0.14283737540245056,
0.273123562335968,
0.1668575555086136,
0.0024763206019997597,
-0.1946399062871933,
-0.0410473458468914,
-0.3104977309703827,
0.10023627430200577,
-0.08617077767848969,
-0.19012625515460968,
-0.0936029925942421,
0.043404534459114075,
-0.03930385410785675,
0.03485722839832306,
-0.3543620705604553,
0.09177004545927048,
-0.13899315893650055,
0.18693126738071442,
-0.4618312120437622,
0.46879926323890686,
-0.2446717768907547,
-0.23997841775417328,
-0.06605589389801025,
0.29288873076438904,
0.09532396495342255,
-0.2305012047290802,
0.1591467559337616,
0.11849068850278854,
0.015007233247160912,
-0.28393638134002686,
0.1743021160364151,
-0.17552539706230164,
0.1507222056388855,
-0.2129492610692978,
0.10873406380414963,
-0.06529003381729126,
0.2566761374473572,
0.06909511238336563,
-0.23927409946918488,
0.4237156808376312,
0.018119152635335922,
0.29577839374542236,
-0.19879405200481415,
-0.21147775650024414,
0.1270291954278946,
0.04185125231742859,
-0.054572828114032745,
-0.3016969859600067,
-0.18672475218772888,
-0.025951607152819633,
-0.12244861572980881,
-0.04582720249891281,
0.001379884430207312,
0.14798325300216675,
-0.03177360072731972,
0.05332490801811218,
-0.07620555907487869,
0.0467841662466526,
-0.359403133392334,
0.01752610132098198,
0.0633009597659111,
-0.40149983763694763,
0.40998777747154236,
0.2676883041858673,
-0.04248392954468727,
-0.28473377227783203,
-0.1580413281917572,
-0.292766273021698,
0.03624892979860306,
-0.03726116567850113,
-0.23390087485313416,
0.1330191045999527,
-0.05644960328936577,
0.024952342733740807,
-0.2709622383117676,
0.03848806023597717,
0.10107440501451492,
0.12261912971735,
-0.5553828477859497,
0.09185945987701416,
-0.32174110412597656,
-0.02280852198600769,
0.024797281250357628,
-0.10728034377098083,
-0.04404347017407417,
-0.39126017689704895,
0.15310390293598175,
-0.11462400108575821,
-0.016935011371970177,
0.21432362496852875,
-0.062000077217817307,
0.21817131340503693,
-0.024720238521695137,
-0.04014355316758156,
-0.18765324354171753,
-0.2124551385641098,
-0.3034580945968628,
-0.09880757331848145,
-0.0032461127266287804,
0.2954036593437195,
0.2241867333650589,
-0.02026662975549698,
-0.07088177651166916,
-0.16172105073928833,
-0.32949158549308777,
0.2559998333454132,
-0.1673351377248764,
0.13258902728557587,
-0.1250998079776764,
0.11967162787914276,
-0.19699089229106903,
-0.1260315179824829,
0.26353418827056885,
-0.048738982528448105,
-0.17949217557907104,
-0.05375538766384125,
0.18226584792137146,
0.02491229586303234,
-0.10082308202981949,
-0.4248003661632538,
0.13421349227428436,
-0.18540748953819275,
-0.07517432421445847,
-0.16832584142684937,
-0.07007219642400742,
-0.29508307576179504,
0.3934321105480194,
0.12326330691576004,
-0.08229894936084747,
0.0814591720700264,
-0.36216476559638977,
0.14329510927200317,
0.35592707991600037,
-0.05116449296474457,
-0.3062043786048889,
0.22697219252586365,
-0.023869695141911507,
-0.2126530110836029,
-0.023242425173521042,
-0.30016493797302246,
-0.4479036033153534,
0.024727677926421165,
0.14864923059940338,
0.3076385259628296,
0.41442009806632996,
0.19592368602752686,
-0.1259261965751648,
-0.03822304680943489,
-0.12480182945728302,
-0.42076054215431213,
0.12425244599580765,
-0.011737284250557423,
0.19733959436416626,
-0.09833205491304398,
0.5074975490570068,
-0.30510878562927246,
0.4946765601634979,
0.34916922450065613,
-0.4038628339767456,
0.4498751163482666,
-0.15380442142486572,
0.5353228449821472,
-0.22702771425247192,
-0.1876468062400818,
0.09773068130016327,
0.09771321713924408,
-0.07425659149885178,
0.2291565239429474,
-0.07714632898569107,
0.10777979344129562,
0.0786254033446312,
0.399854838848114,
-0.1534990519285202,
-0.23505881428718567,
0.09338147193193436,
0.04169899597764015,
-0.004332059528678656,
-0.09674771130084991,
0.2947271466255188,
-0.09905856102705002,
0.14029847085475922,
0.14482693374156952,
0.466146320104599,
0.4105902314186096,
-0.11447320878505707,
0.3640742897987366,
-0.27890151739120483,
-0.3221743702888489,
0.5076091885566711,
-0.009489170275628567,
0.3112461566925049,
-0.19096794724464417,
-0.22576339542865753,
0.42709067463874817,
0.1622132956981659,
0.5094699859619141,
-0.37137579917907715,
-0.3883594572544098,
0.3326302170753479,
0.2954976260662079,
-0.3631885349750519,
-0.15254074335098267,
-0.027386728674173355,
-0.021593134850263596,
-0.037003327161073685,
0.652685284614563,
-0.4228726029396057,
-0.0011687128571793437,
0.24165968596935272,
0.08184249699115753,
-0.2017996460199356,
-0.3822227418422699,
-0.5365279316902161,
-0.2004128396511078,
-0.36919236183166504,
-0.05372002348303795,
-0.11743632704019547,
0.3132625222206116,
0.169392392039299,
0.1766940951347351,
-0.09361789375543594,
-0.06188970059156418,
0.19373805820941925,
0.3094624876976013,
0.08490931987762451,
0.18150992691516876,
0.22773177921772003,
0.37158992886543274,
0.4876290261745453,
0.25521937012672424,
0.3997567296028137,
-0.19003769755363464,
-0.24395091831684113,
0.18601815402507782,
0.025717848911881447,
0.21177411079406738,
0.28991082310676575,
-0.03300463780760765,
0.20364446938037872,
-0.19589976966381073,
0.06492581218481064,
-0.22016626596450806,
-0.25909221172332764,
0.14629147946834564,
0.09349098056554794,
0.0041814143769443035,
-0.2914552092552185,
0.5448598265647888,
-0.017598655074834824,
-0.22072626650333405,
-0.16301703453063965,
0.7354042530059814,
-0.05294731631875038,
0.8978898525238037,
-0.002841179957613349,
0.9030033946037292,
-0.257996141910553,
-0.05609507858753204,
0.4146471321582794,
-0.08457832783460617,
0.5710943341255188,
-0.14553944766521454,
0.07414916157722473,
-0.4189850389957428,
-0.23358997702598572,
-0.0828629583120346,
-0.052309565246105194,
0.18024195730686188,
-0.10725102573633194,
-0.29004770517349243,
0.08747357130050659,
-0.08362127095460892,
-0.1342562586069107,
-0.08750048279762268,
-0.07320374250411987,
0.1548387110233307,
-0.33995527029037476,
-0.20966170728206635,
0.011137797497212887,
0.4751355051994324,
0.3716219365596771,
0.00044937286293134093,
-0.0049823918379843235,
-0.31484925746917725,
-0.020831234753131866,
-0.2948208749294281,
0.025920817628502846,
0.30434006452560425,
0.14374588429927826,
0.3011051118373871,
-0.24683593213558197,
0.20286642014980316,
0.13603737950325012,
0.5763686299324036,
-0.48883429169654846,
-0.19049851596355438,
0.11825346946716309,
-0.3001488149166107,
-0.22964927554130554,
-0.15868200361728668,
-0.3349230885505676,
0.2959030270576477,
0.3055291175842285,
-0.395714670419693,
0.21168369054794312,
0.13475051522254944,
-0.21608825027942657,
-0.18102233111858368,
0.20220878720283508,
-0.03488548845052719,
-0.4023381471633911,
-0.11476285010576248,
0.00806825514882803,
0.28586873412132263,
-0.09762481600046158,
0.04075606167316437,
0.16612796485424042,
-0.03704915568232536,
0.20139263570308685,
0.14747337996959686,
-0.1411544233560562,
-0.005466634873300791,
0.5710302591323853,
-0.2033819854259491,
0.17250458896160126,
0.2977307140827179,
0.14023379981517792,
-0.4358294606208801,
-0.035342566668987274,
-0.5515819787979126,
0.5049036741256714,
-0.2644136846065521,
-0.20701655745506287,
0.26309484243392944,
-0.17694677412509918,
0.052321430295705795,
0.021084174513816833,
0.3146515190601349,
-0.25097334384918213,
-0.39159777760505676,
-0.27117079496383667,
-0.04768943414092064,
0.42465919256210327,
-0.08915908634662628,
0.18838348984718323,
-0.17194966971874237,
0.00017598189879208803,
-0.09201542288064957,
0.013145415112376213,
-0.19611689448356628,
0.16572420299053192,
-0.07582701742649078,
0.10750287771224976,
-0.029734676703810692,
-0.17648743093013763,
0.007623357232660055,
-0.3154180943965912,
0.01218464970588684,
0.0821584090590477,
0.020067529752850533,
-0.017369462177157402,
0.05585397779941559,
0.18419380486011505,
0.08154857903718948,
0.15430580079555511,
-0.46903711557388306,
-0.03691719472408295,
-0.05662499740719795,
-0.4456322491168976,
0.3262780010700226,
0.14440235495567322,
-0.15965327620506287,
-0.13179172575473785,
0.03735014423727989,
0.1413363367319107,
0.04746096953749657,
0.21255676448345184,
0.13606856763362885,
0.5164860486984253,
0.2325790375471115,
-0.13561244308948517,
-0.42685484886169434,
0.1551963835954666,
0.08979978412389755,
0.4254204034805298,
0.16615872085094452,
-0.14813676476478577,
0.3840099573135376,
-0.3068832755088806,
0.01126786321401596,
-0.013534351252019405,
0.21346087753772736,
0.4560752511024475,
-0.06283007562160492,
0.07916554808616638,
0.19103507697582245,
0.041177842766046524,
-0.19625410437583923,
0.08363290131092072,
0.3954755365848541,
-0.10426487773656845,
0.015106301754713058,
0.28219592571258545,
0.21611155569553375,
0.15743765234947205,
-0.2313300520181656,
0.04672510549426079,
0.16956251859664917,
0.27419084310531616,
-0.39478713274002075,
-0.003167851595208049,
0.0739472284913063,
0.2783547043800354,
0.44036227464675903,
0.17064838111400604,
0.3151627480983734,
0.151032954454422,
-0.16431234776973724,
0.10359596461057663,
0.03899097815155983,
0.4055016338825226,
-0.18533344566822052,
-0.579871416091919,
0.5499578714370728,
0.25648292899131775,
0.49674147367477417,
-0.2785114347934723,
0.027635904029011726,
0.21316303312778473,
0.007769281510263681,
-0.011287151835858822,
-0.21049875020980835,
0.03702738508582115,
-0.1464020162820816,
-0.4431435465812683,
0.21752919256687164,
-0.04438683018088341,
-0.23701994121074677,
-0.10080019384622574,
0.029851296916604042,
-0.19731669127941132,
-0.10290899872779846,
-0.16728447377681732,
-0.30349594354629517,
-0.16123853623867035,
-0.3351871371269226,
0.29846200346946716,
0.22374926507472992,
0.06942310929298401,
-0.051013216376304626,
-0.1726658046245575,
-0.014790123328566551,
0.3651047348976135,
0.09828722476959229,
0.4093313217163086,
0.09224281460046768,
-0.05016640946269035,
0.13715393841266632,
0.04767107963562012,
0.0098274489864707,
-0.06809050589799881,
0.13685019314289093,
-0.20606720447540283,
0.17847087979316711,
0.20988857746124268,
0.062412526458501816,
-0.06111741065979004,
-0.33006319403648376,
-0.027206767350435257,
0.6360583901405334,
0.04770257696509361,
-0.1378117948770523,
-0.3980536162853241,
0.039239611476659775,
-0.08326347172260284,
-0.011674930341541767,
-0.2653491497039795,
0.2788212299346924,
0.0598350428044796,
-0.1342644840478897,
0.05671263113617897,
0.32220521569252014,
0.011663069948554039,
-0.2166978418827057,
0.2653632164001465,
0.7818455696105957,
-0.0992649495601654,
-0.1718611866235733,
0.11673589795827866,
-0.5884336233139038,
0.2082715630531311,
-0.13383300602436066,
-0.22993876039981842,
0.2374173402786255,
0.6179020404815674,
0.42798954248428345,
-0.05817819759249687,
0.031735822558403015,
-0.06839345395565033,
0.2986146807670593,
0.39980924129486084,
0.02474963665008545,
-0.3153725862503052,
-0.16264376044273376,
-0.16445596516132355,
-0.1396200805902481,
0.012508640065789223,
0.12872689962387085,
-0.149626225233078,
-0.061278849840164185,
0.049557726830244064,
0.11296244710683823,
-0.17671409249305725,
-0.36492735147476196,
0.7231637239456177,
0.011546670459210873,
0.37148168683052063,
-0.11306941509246826,
0.05163867026567459,
-0.262844979763031,
-0.20426848530769348,
0.04727676883339882,
0.31487321853637695,
-0.19293977320194244,
0.15715734660625458,
-0.14949001371860504,
-0.22761471569538116,
-0.18848615884780884,
0.24760577082633972,
0.0908743143081665,
-0.2714473009109497,
-0.23099444806575775,
0.12852230668067932,
-0.24787390232086182,
0.010283702984452248,
-0.014986440539360046,
0.024844305589795113,
-0.04832042381167412,
0.27728891372680664,
0.10548551380634308,
-0.27249735593795776,
0.599397599697113,
-0.4096090793609619,
0.10132037848234177,
0.09721054881811142,
0.2211805135011673,
0.5730562806129456,
0.022323420271277428,
-0.8656448125839233,
-0.005810191854834557,
0.08379614353179932,
-0.1317083239555359,
-0.2458972930908203,
-0.09870526939630508,
0.18038898706436157,
0.055853694677352905,
-0.3165009021759033,
-0.15917988121509552,
-0.01255801972001791,
0.13696590065956116,
-0.09018319100141525,
-0.28962263464927673
] |
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.1141662672162056,
-0.6093639731407166,
0.06223635748028755,
0.37251102924346924,
0.13730216026306152,
0.28628361225128174,
0.40662822127342224,
0.02796567976474762,
0.5614453554153442,
0.20742477476596832,
-0.05763896927237511,
0.15142212808132172,
0.473791241645813,
-0.0607357881963253,
-0.05298905074596405,
-0.04161571338772774,
0.27029040455818176,
0.24316251277923584,
0.2737343907356262,
-0.16266928613185883,
-0.20256473124027252,
0.12476552277803421,
-0.26212581992149353,
0.17187082767486572,
-0.24821080267429352,
0.248747780919075,
-0.27781224250793457,
0.030896080657839775,
-0.24042032659053802,
-0.3826126456260681,
0.3425859212875366,
-0.2952021062374115,
0.6600480079650879,
0.14926208555698395,
-0.00012319156667217612,
0.1020781621336937,
0.3273308277130127,
-0.18719422817230225,
-0.21228566765785217,
0.09153597801923752,
0.11227960139513016,
0.014388916082680225,
0.20146864652633667,
-0.0870567113161087,
-0.005721475463360548,
-0.6249673962593079,
-0.012162934057414532,
-0.16448242962360382,
0.18243996798992157,
0.0332697331905365,
0.1068648025393486,
-0.006537242326885462,
0.03515440598130226,
-0.3783899247646332,
0.20511232316493988,
-0.33389925956726074,
-0.10932483524084091,
0.322783499956131,
0.09181781858205795,
0.06594119966030121,
0.05419217795133591,
0.18775556981563568,
-0.06825390458106995,
0.12062714993953705,
0.41528257727622986,
0.2805345952510834,
0.327144980430603,
-0.0941561609506607,
0.19169765710830688,
0.1926269233226776,
0.45426997542381287,
-0.04018296301364899,
-0.33391398191452026,
-0.11438437551259995,
0.25639021396636963,
-0.15852616727352142,
0.2307872772216797,
-0.2589789628982544,
0.018375806510448456,
0.3088288903236389,
0.39133715629577637,
-0.20830202102661133,
0.14921167492866516,
0.11256057769060135,
-0.07019677013158798,
-0.049943577498197556,
-0.2336437702178955,
0.1062827780842781,
0.11876197159290314,
-0.041224412620067596,
-0.22930829226970673,
-0.16648517549037933,
0.06980288773775101,
0.08679459989070892,
-0.33133000135421753,
0.13001589477062225,
0.1641414314508438,
0.0661594346165657,
-0.10914328694343567,
0.0547853447496891,
-0.18937453627586365,
-0.026487434282898903,
0.13744929432868958,
0.33458569645881653,
-0.18037667870521545,
0.024697009474039078,
0.04442045837640762,
-0.0005220783641561866,
-0.01138828694820404,
0.2225162237882614,
0.04412923380732536,
-0.2677799463272095,
-0.09624802321195602,
-0.10686169564723969,
-0.5135746002197266,
-0.3039867579936981,
-0.11294472962617874,
-0.33932605385780334,
-0.4211427867412567,
0.22226329147815704,
-0.4232880175113678,
-0.14129024744033813,
-0.029815854504704475,
0.5755093097686768,
0.27524903416633606,
-0.16360732913017273,
0.21799977123737335,
0.3787243068218231,
-0.2972564995288849,
0.17818382382392883,
-0.1884080022573471,
0.08736328780651093,
-0.17981800436973572,
0.43884575366973877,
0.10415250808000565,
-0.42476749420166016,
0.21506598591804504,
0.09942489117383957,
0.08978558331727982,
0.06372234225273132,
-0.37704744935035706,
-0.055075906217098236,
0.340840220451355,
0.27611321210861206,
-0.08713172376155853,
0.08471062034368515,
0.3560981750488281,
-0.29212069511413574,
-0.2050967812538147,
0.0592058040201664,
-0.12360886484384537,
-0.10763317346572876,
-0.1479506939649582,
0.09176003932952881,
-0.09374965727329254,
-0.05814418941736221,
0.19964027404785156,
0.040503691881895065,
0.15049894154071808,
-0.32999616861343384,
0.0449838750064373,
-0.009383453987538815,
-0.16189050674438477,
-0.22454103827476501,
0.4479079246520996,
0.37243616580963135,
-0.7759338617324829,
-0.3368353247642517,
0.055039748549461365,
0.15568600594997406,
-0.08233692497015,
0.24277816712856293,
-0.12442269176244736,
0.13491113483905792,
-0.27099907398223877,
0.40149062871932983,
0.1220540925860405,
-0.090154729783535,
-0.1708911657333374,
0.04489390552043915,
0.0930248275399208,
0.02858610637485981,
0.23800183832645416,
-0.0986708328127861,
0.3254888951778412,
0.149747833609581,
0.3354111611843109,
-0.0001985478593269363,
0.00435493653640151,
-0.3671826124191284,
-0.1630479395389557,
-0.3921637535095215,
0.06977307796478271,
0.09562249481678009,
-0.13257268071174622,
-0.02517152577638626,
-0.1350775808095932,
-0.41437116265296936,
0.08103904128074646,
-0.248182013630867,
-0.04805604740977287,
0.02445298619568348,
0.2674899697303772,
0.3455544710159302,
0.46719714999198914,
0.08245917409658432,
-0.16733868420124054,
0.25648725032806396,
0.12916035950183868,
0.042305588722229004,
-0.12255141139030457,
-0.015737904235720634,
-0.2794286906719208,
-0.012705991044640541,
-0.04968222230672836,
-0.18181289732456207,
-0.07905995845794678,
0.01458989642560482,
-0.011876657605171204,
-0.07578481733798981,
-0.3321082592010498,
0.1303437054157257,
-0.25766849517822266,
0.20695587992668152,
-0.5300260186195374,
0.4520907998085022,
-0.28027090430259705,
-0.22286643087863922,
0.03299901261925697,
0.24889181554317474,
0.14724338054656982,
-0.21286319196224213,
0.14380212128162384,
0.10140624642372131,
-0.0003677125496324152,
-0.2585803270339966,
0.11111755669116974,
-0.18294355273246765,
0.16200321912765503,
-0.1446014940738678,
0.08512764424085617,
-0.11798390001058578,
0.25496816635131836,
0.0650632381439209,
-0.22447293996810913,
0.45913591980934143,
-0.02349206432700157,
0.30522069334983826,
-0.20298846065998077,
-0.21193484961986542,
0.11735688149929047,
-0.017866604030132294,
-0.026728816330432892,
-0.330051451921463,
-0.11730050295591354,
0.04390311613678932,
-0.16801822185516357,
-0.05418824031949043,
0.0857989713549614,
0.10690426081418991,
-0.02823321707546711,
0.05229465663433075,
-0.15526513755321503,
0.011299719102680683,
-0.29018551111221313,
0.018937883898615837,
0.08877105265855789,
-0.372099369764328,
0.48910656571388245,
0.28946423530578613,
-0.15150608122348785,
-0.2688130736351013,
-0.21404200792312622,
-0.3313252925872803,
0.05957712605595589,
-0.08403673022985458,
-0.21003775298595428,
0.15871722996234894,
-0.11572285741567612,
0.054681532084941864,
-0.22416052222251892,
0.008104750886559486,
0.07596296817064285,
0.15769776701927185,
-0.5991171598434448,
0.057236943393945694,
-0.3049147427082062,
-0.036602165549993515,
0.030859647318720818,
-0.10123052448034286,
0.04151833429932594,
-0.34873101115226746,
0.18157581984996796,
-0.11908449232578278,
-0.03779437392950058,
0.15112872421741486,
-0.0626412108540535,
0.22031138837337494,
-0.08167758584022522,
0.04887021705508232,
-0.19511371850967407,
-0.22078703343868256,
-0.3345492482185364,
-0.06908833235502243,
-0.05557383969426155,
0.30115896463394165,
0.18259158730506897,
-0.04116220772266388,
-0.12989725172519684,
-0.1396414190530777,
-0.28776732087135315,
0.3002021908760071,
-0.168894961476326,
0.15247564017772675,
-0.1127932146191597,
0.11339662224054337,
-0.13852809369564056,
-0.15316979587078094,
0.3262205421924591,
-0.03577423840761185,
-0.19494575262069702,
-0.07042766362428665,
0.09430103749036789,
-0.02988932840526104,
-0.08833297342061996,
-0.47851914167404175,
0.19022831320762634,
-0.20062975585460663,
-0.14165601134300232,
-0.19470542669296265,
-0.08397842943668365,
-0.4174037575721741,
0.41108614206314087,
0.09257393330335617,
-0.06988312304019928,
0.09429983794689178,
-0.38010212779045105,
0.06980907171964645,
0.3063393235206604,
-0.08150241523981094,
-0.2894350588321686,
0.1465221792459488,
0.009654984809458256,
-0.21569707989692688,
0.03900843858718872,
-0.3196032643318176,
-0.5543975234031677,
0.021747073158621788,
0.15951107442378998,
0.27039551734924316,
0.4036833643913269,
0.1567670851945877,
-0.10570324212312698,
-0.05331641063094139,
-0.11792033910751343,
-0.4052339196205139,
0.03280029073357582,
-0.05352111905813217,
0.21136534214019775,
-0.11476057767868042,
0.48694872856140137,
-0.32067203521728516,
0.5223791003227234,
0.38105735182762146,
-0.3383181691169739,
0.4276522397994995,
-0.11276892572641373,
0.5202957987785339,
-0.24227070808410645,
-0.14221210777759552,
0.19874538481235504,
0.05869453027844429,
0.0017601472791284323,
0.2437189519405365,
-0.09586454182863235,
0.11906613409519196,
0.06896021217107773,
0.3653152585029602,
-0.08962225914001465,
-0.2674025297164917,
0.13140487670898438,
0.030551612377166748,
-0.01604524999856949,
-0.07163818925619125,
0.3272545337677002,
-0.0920909121632576,
0.154576376080513,
0.18492145836353302,
0.3969685435295105,
0.39986348152160645,
-0.07306227833032608,
0.27124539017677307,
-0.3327038586139679,
-0.20810627937316895,
0.5384800434112549,
0.08142213523387909,
0.28049415349960327,
-0.19650261104106903,
-0.1623135507106781,
0.4398680031299591,
0.18525321781635284,
0.542348325252533,
-0.42568790912628174,
-0.3764910101890564,
0.30586305260658264,
0.32167428731918335,
-0.4337252080440521,
-0.1476145088672638,
-0.022491635754704475,
-0.045360784977674484,
-0.014992984011769295,
0.7402036786079407,
-0.47425413131713867,
-0.017762845382094383,
0.2606264352798462,
0.10666920244693756,
-0.17010651528835297,
-0.47769129276275635,
-0.5002127885818481,
-0.14443738758563995,
-0.42039918899536133,
-0.07626967132091522,
-0.20627421140670776,
0.3078438639640808,
0.10219278931617737,
0.23671847581863403,
-0.08121606707572937,
0.012986348010599613,
0.1501801759004593,
0.3022860288619995,
0.04460655897855759,
0.05259782820940018,
0.2101488560438156,
0.4190896451473236,
0.4358886480331421,
0.27209043502807617,
0.42050856351852417,
-0.13997836410999298,
-0.33202263712882996,
0.20888470113277435,
-0.0006843869923613966,
0.16122804582118988,
0.36381056904792786,
0.02995222806930542,
0.20569589734077454,
-0.16692620515823364,
0.010323358699679375,
-0.2124234139919281,
-0.3417515754699707,
0.09682752192020416,
0.06270686537027359,
0.07182436436414719,
-0.2635464668273926,
0.4906754791736603,
0.02960718236863613,
-0.14652150869369507,
-0.10244761407375336,
0.7082785367965698,
-0.003883094061166048,
0.9643499255180359,
-0.0068483236245810986,
0.951291561126709,
-0.15516763925552368,
-0.03763582184910774,
0.44086265563964844,
-0.1820308119058609,
0.4978235065937042,
-0.16123564541339874,
0.10901325196027756,
-0.4382876753807068,
-0.21741646528244019,
-0.07921434938907623,
-0.045456405729055405,
0.19187894463539124,
-0.023382747545838356,
-0.26816344261169434,
0.1553366333246231,
-0.1022789254784584,
-0.09495238959789276,
-0.0957573652267456,
-0.055362872779369354,
0.06451141089200974,
-0.4010764956474304,
-0.19228370487689972,
0.01874043419957161,
0.46266213059425354,
0.3580816090106964,
0.025602536275982857,
0.029726803302764893,
-0.3238193392753601,
-0.01151939108967781,
-0.3098013997077942,
0.046371594071388245,
0.3120688199996948,
0.10807628929615021,
0.38235536217689514,
-0.24168026447296143,
0.2194240838289261,
0.10668009519577026,
0.6348164677619934,
-0.4909476041793823,
-0.19866588711738586,
0.13144712150096893,
-0.22501689195632935,
-0.24956758320331573,
-0.1412053406238556,
-0.34027189016342163,
0.3036342263221741,
0.24554871022701263,
-0.4158504903316498,
0.26101619005203247,
0.11050143837928772,
-0.13140006363391876,
-0.16386452317237854,
0.1526334583759308,
0.009877030737698078,
-0.47593045234680176,
-0.10791616141796112,
-0.023459220305085182,
0.35085031390190125,
-0.09615753591060638,
0.05728248879313469,
0.10417941957712173,
-0.021820278838276863,
0.19862815737724304,
0.07227881252765656,
-0.12420383095741272,
-0.031902067363262177,
0.4855900704860687,
-0.16332224011421204,
0.1417822241783142,
0.3344899117946625,
0.09869136661291122,
-0.41702914237976074,
-0.028461728245019913,
-0.5361010432243347,
0.5242938995361328,
-0.36463987827301025,
-0.18970993161201477,
0.3145851194858551,
-0.17211228609085083,
0.06391388177871704,
0.014535021968185902,
0.3819755017757416,
-0.20456290245056152,
-0.28629669547080994,
-0.2601953148841858,
-0.02064233087003231,
0.38786184787750244,
-0.0625409334897995,
0.13801178336143494,
-0.11810796707868576,
0.004194709938019514,
-0.12067536264657974,
0.07014141231775284,
-0.20638614892959595,
0.1769719421863556,
-0.06977752596139908,
0.1305287778377533,
-0.034991271793842316,
-0.2045266330242157,
-0.036428406834602356,
-0.23918084800243378,
0.018126634880900383,
0.09276977181434631,
-0.018312612548470497,
-0.005997305270284414,
0.013902605511248112,
0.18154768645763397,
0.09018008410930634,
0.11116291582584381,
-0.42622631788253784,
-0.04748178645968437,
-0.06762788444757462,
-0.3948301076889038,
0.35418224334716797,
0.17563574016094208,
-0.11669547110795975,
-0.16516341269016266,
0.0495951883494854,
0.06970076262950897,
-0.056395430117845535,
0.26389166712760925,
0.12733951210975647,
0.5054331421852112,
0.2831275165081024,
-0.1307988166809082,
-0.46694666147232056,
0.15154670178890228,
0.06834796816110611,
0.3996826708316803,
0.180575892329216,
-0.09227097779512405,
0.36081695556640625,
-0.21893247961997986,
0.02893976867198944,
-0.003555102739483118,
0.1313318908214569,
0.4595068395137787,
-0.05300517380237579,
0.057794682681560516,
0.17336775362491608,
0.05633983761072159,
-0.1533014476299286,
0.09759356081485748,
0.33123472332954407,
-0.09352903068065643,
-0.038081079721450806,
0.23219776153564453,
0.21017372608184814,
0.09216227382421494,
-0.17720817029476166,
0.033709388226270676,
0.22561480104923248,
0.1871289610862732,
-0.38804566860198975,
-0.012069798074662685,
0.1033218652009964,
0.26103532314300537,
0.49015724658966064,
0.10795041918754578,
0.3249961733818054,
0.044672999531030655,
-0.10877316445112228,
0.04328254610300064,
0.04711014777421951,
0.41987738013267517,
-0.16863776743412018,
-0.6134328246116638,
0.5157349109649658,
0.2900370955467224,
0.4744555354118347,
-0.3256698548793793,
0.036298129707574844,
0.23244670033454895,
0.013147838413715363,
-0.006487271748483181,
-0.17166998982429504,
-0.03228268399834633,
-0.16261614859104156,
-0.449457585811615,
0.12969030439853668,
-0.03751000761985779,
-0.15597082674503326,
-0.030580837279558182,
0.02360730804502964,
-0.09763862937688828,
-0.005641389172524214,
-0.09764812141656876,
-0.3179892599582672,
-0.18045255541801453,
-0.32939961552619934,
0.27657145261764526,
0.23270007967948914,
0.06574364006519318,
-0.04518759250640869,
-0.11335553973913193,
-0.03200903162360191,
0.4509781301021576,
0.0384964793920517,
0.5022711753845215,
0.1259162425994873,
0.01648063212633133,
0.03369540721178055,
0.06946713477373123,
0.046382758766412735,
-0.011855749413371086,
0.21214313805103302,
-0.12749487161636353,
0.24947844445705414,
0.24082255363464355,
0.0902939960360527,
-0.10382484644651413,
-0.3525882065296173,
-0.05413864925503731,
0.576238214969635,
0.06361846625804901,
-0.10439710319042206,
-0.3979017734527588,
0.052312687039375305,
-0.08341343700885773,
0.01345335878431797,
-0.19973637163639069,
0.387174129486084,
-0.003299352014437318,
-0.1049189418554306,
0.03810190036892891,
0.33902695775032043,
0.023447996005415916,
-0.18518076837062836,
0.24326102435588837,
0.818215012550354,
-0.22009488940238953,
-0.23271825909614563,
0.1255895495414734,
-0.5277734994888306,
0.2583821713924408,
-0.1381705403327942,
-0.16598083078861237,
0.20669391751289368,
0.6418519020080566,
0.49262669682502747,
-0.04489059001207352,
-0.026389651000499725,
-0.04076533764600754,
0.2749050259590149,
0.41525107622146606,
0.04232179373502731,
-0.3399314284324646,
-0.09488151967525482,
-0.21206603944301605,
-0.16273663938045502,
-0.059730879962444305,
0.10980565845966339,
-0.04640652984380722,
-0.06074666231870651,
0.06806857883930206,
0.06998173892498016,
-0.13503102958202362,
-0.3679935336112976,
0.6232012510299683,
0.058759674429893494,
0.36268189549446106,
-0.11510810256004333,
0.025457635521888733,
-0.28043612837791443,
-0.15380506217479706,
-0.004346820991486311,
0.26396092772483826,
-0.19374041259288788,
0.14828002452850342,
-0.15942484140396118,
-0.15167637169361115,
-0.24382738769054413,
0.23025420308113098,
0.04256105795502663,
-0.18301624059677124,
-0.2047594040632248,
0.16143831610679626,
-0.2503416836261749,
0.022426007315516472,
-0.0029812329448759556,
0.02319146879017353,
-0.05041928216814995,
0.27514469623565674,
0.07465913146734238,
-0.22653596103191376,
0.6171560883522034,
-0.3164285719394684,
0.09093810617923737,
0.164737731218338,
0.21018871665000916,
0.4974496066570282,
0.043660879135131836,
-0.8163818120956421,
-0.013322309590876102,
0.07788769900798798,
-0.13949048519134521,
-0.24824056029319763,
-0.09615928679704666,
0.2267880141735077,
0.022992825135588646,
-0.28479522466659546,
-0.22235670685768127,
0.0500372014939785,
0.05270128324627876,
-0.06663892418146133,
-0.24812434613704681
] |
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.03439050167798996,
0.006200192496180534,
-0.06358009576797485,
-0.33422812819480896,
0.4808439612388611,
0.26163917779922485,
0.6042658090591431,
0.23733209073543549,
0.13709159195423126,
0.08659088611602783,
0.05403544753789902,
0.5270302891731262,
-0.15589521825313568,
0.2994628846645355,
-0.1945011168718338,
-0.08811692148447037,
0.4133821725845337,
0.09350385516881943,
-0.11563335359096527,
0.1972021460533142,
-0.4435485303401947,
0.049706246703863144,
-0.3014574348926544,
0.2807840406894684,
-0.3147513270378113,
-0.17789658904075623,
0.054533448070287704,
-0.1938542276620865,
-0.2473178207874298,
-0.2746686637401581,
-0.04921553656458855,
0.09710279852151871,
-0.022366121411323547,
0.600527822971344,
-0.00011894206545548514,
0.08269864320755005,
0.18870742619037628,
-0.08655130863189697,
0.08298543840646744,
-0.29607468843460083,
-0.18191508948802948,
-0.011541547253727913,
-0.22306102514266968,
-0.5142744779586792,
0.040685705840587616,
-0.06361547112464905,
-0.07717237621545792,
-0.26717719435691833,
0.10244949162006378,
0.24669963121414185,
0.1638299822807312,
-0.1138831302523613,
0.22092296183109283,
-0.02204878069460392,
0.04394695535302162,
0.23825377225875854,
-0.19265131652355194,
0.0769319236278534,
0.049105171114206314,
-0.35820069909095764,
0.22909872233867645,
0.6931742429733276,
-0.21425271034240723,
-0.082626111805439,
0.24929456412792206,
0.14856651425361633,
0.41321122646331787,
-0.35957685112953186,
0.36146536469459534,
-0.13661763072013855,
0.2379053831100464,
-0.15123896300792694,
-0.104380302131176,
-0.05423252284526825,
-0.0018236894393339753,
-0.25378456711769104,
-0.02323567494750023,
-0.3196379542350769,
0.0776958018541336,
-0.22969919443130493,
-0.33052706718444824,
-0.18500719964504242,
0.1285368651151657,
0.20784422755241394,
0.12311341613531113,
-0.09719859808683395,
-0.02960880659520626,
0.4492812752723694,
0.1049036756157875,
-0.32267093658447266,
-0.12460634112358093,
0.02691291831433773,
0.09808354079723358,
0.22117313742637634,
-0.22417816519737244,
-0.06977520883083344,
0.10546684265136719,
-0.022715654224157333,
-0.28656837344169617,
-0.6728147268295288,
0.01710093580186367,
-0.11549871414899826,
0.18046346306800842,
0.07850151509046555,
0.10636221617460251,
0.20729076862335205,
-0.08792590349912643,
0.3839035630226135,
0.04374159127473831,
0.049991168081760406,
-0.3903311491012573,
-0.2533303201198578,
0.18438251316547394,
-0.3990155756473541,
0.35975906252861023,
0.24726103246212006,
0.37760552763938904,
0.09367808699607849,
0.4118514955043793,
-0.01276132371276617,
0.13943608105182648,
-0.09650971740484238,
-0.023580282926559448,
0.35823553800582886,
0.24442636966705322,
-0.05046550929546356,
0.10449741780757904,
0.14741189777851105,
-0.037725649774074554,
0.2744562029838562,
-0.03996998071670532,
0.15208107233047485,
-0.5921463370323181,
-0.10537657141685486,
-0.15918441116809845,
0.06445615738630295,
0.02737456187605858,
-0.18560691177845,
0.12004096060991287,
-0.10297893732786179,
-0.01741449162364006,
-0.06256149709224701,
0.4089111387729645,
0.19146090745925903,
-0.3518825173377991,
0.11432348191738129,
0.22875186800956726,
-0.2352551519870758,
-0.12316077947616577,
0.21782319247722626,
-0.6010240912437439,
-0.18661943078041077,
-0.19353996217250824,
0.09118717163801193,
0.20307712256908417,
0.19964392483234406,
-0.27529674768447876,
-0.1346437782049179,
0.5062406659126282,
-0.40407073497772217,
0.08267828822135925,
-0.24270935356616974,
-0.2949002981185913,
-0.23645523190498352,
-0.16903379559516907,
-0.0339539460837841,
-0.04627597704529762,
-0.025684591382741928,
-0.17594294250011444,
0.3576541244983673,
0.01550973765552044,
-0.04866243898868561,
-0.10098220407962799,
0.21325333416461945,
-0.03428291156888008,
0.1602662056684494,
0.427164763212204,
-0.31456267833709717,
-0.20635849237442017,
-0.015260067768394947,
-0.22039887309074402,
-0.16166067123413086,
-0.09202215075492859,
0.09303063154220581,
0.20390455424785614,
-0.07271382212638855,
0.4399831295013428,
-0.15441395342350006,
-0.08987176418304443,
0.1785479336977005,
0.13115853071212769,
-0.046214841306209564,
0.1775304675102234,
-0.07912339270114899,
0.1281120926141739,
0.20867317914962769,
0.11113496124744415,
0.011695937253534794,
-0.0227945726364851,
-0.20689232647418976,
0.09393475204706192,
0.0991029292345047,
0.2192526012659073,
-0.02455320581793785,
0.03605704382061958,
0.08036879450082779,
-0.32553020119667053,
0.16788123548030853,
0.18034236133098602,
0.1416132003068924,
-0.2925772964954376,
-0.11960235983133316,
-0.25508370995521545,
-0.1336403638124466,
-0.1760665625333786,
0.031643256545066833,
0.05520441383123398,
-0.05400095507502556,
-0.034420717507600784,
-0.1491250842809677,
-0.16488339006900787,
-0.15275585651397705,
0.049740053713321686,
0.10933174937963486,
-0.3486707806587219,
-0.018466129899024963,
-0.21110014617443085,
-0.1441618800163269,
-0.38502368330955505,
0.013276788406074047,
0.18813416361808777,
-0.05409678444266319,
-0.2381075620651245,
0.3495652377605438,
0.13930895924568176,
0.044096771627664566,
-0.3154112994670868,
0.17560714483261108,
0.09110111743211746,
-0.033451661467552185,
-0.0013043951475992799,
0.10427001863718033,
0.18146513402462006,
-0.03480461612343788,
0.11235694587230682,
0.2557910680770874,
-0.2581355571746826,
0.3806616961956024,
-0.23958873748779297,
0.12885594367980957,
-0.08415930718183517,
-0.17669136822223663,
-0.23736631870269775,
-0.39378175139427185,
-0.14378216862678528,
-0.2950775623321533,
-0.23233135044574738,
-0.07121974974870682,
0.3053763806819916,
-0.20798008143901825,
0.5871574282646179,
-0.04098282381892204,
0.024091612547636032,
-0.005710002034902573,
0.061563000082969666,
0.2896173298358917,
0.011416795663535595,
0.10648975521326065,
0.2978290319442749,
-0.009614160284399986,
-0.22335946559906006,
0.2672613263130188,
0.1708519011735916,
0.27672380208969116,
0.204093798995018,
0.21670587360858917,
0.2447037398815155,
0.048026613891124725,
0.1485537588596344,
-0.061389464884996414,
0.016496799886226654,
-0.29990097880363464,
0.3099988102912903,
0.2844226658344269,
-0.23363542556762695,
0.09982316941022873,
-0.06604170054197311,
0.07008686661720276,
0.28239086270332336,
-0.15271733701229095,
0.05622289702296257,
-0.2700432240962982,
-0.09488841146230698,
0.3865872025489807,
0.09207642823457718,
0.43321335315704346,
-0.1842430680990219,
-0.3789013624191284,
0.24179671704769135,
-0.35465508699417114,
-0.0365537591278553,
-0.4494333267211914,
0.030626045539975166,
-0.032505933195352554,
0.08569164574146271,
-0.4606236517429352,
0.08175516873598099,
-0.16478224098682404,
-0.13556119799613953,
-0.121132992208004,
-0.5227620601654053,
0.12185568362474442,
-0.44264695048332214,
0.014803526923060417,
0.2468886375427246,
0.2771112322807312,
-0.29262223839759827,
-0.17715036869049072,
0.45425882935523987,
-0.21786580979824066,
-0.14943061769008636,
0.12586726248264313,
0.012163599953055382,
-0.039333730936050415,
-0.11803412437438965,
-0.1904158592224121,
-0.026527775451540947,
-0.1234949603676796,
0.1169080063700676,
-0.26469722390174866,
0.016314053907990456,
0.5068843364715576,
0.27591803669929504,
-0.24426092207431793,
0.14303641021251678,
-0.04893213137984276,
-0.1584293693304062,
-0.3822784125804901,
0.2083154022693634,
-0.08685959875583649,
0.08384094387292862,
0.004729610867798328,
-0.11430326104164124,
-0.003728545270860195,
0.041040848940610886,
-0.18132205307483673,
-0.2923727333545685,
-0.08111466467380524,
0.2520662248134613,
0.15513215959072113,
0.10158779472112656,
0.286132276058197,
0.4163929522037506,
-0.12338318675756454,
0.015546772629022598,
-0.2297619730234146,
-0.04077393189072609,
0.4496162533760071,
0.27504441142082214,
0.28390631079673767,
0.44892433285713196,
-0.01612991653382778,
0.29311344027519226,
-0.1320105642080307,
-0.10581408441066742,
0.45527327060699463,
-0.32816290855407715,
0.09713964909315109,
-0.4271511435508728,
-0.4983295500278473,
0.02122524194419384,
-0.34565237164497375,
-0.26921546459198,
-0.25261276960372925,
-0.19740286469459534,
-0.2074299156665802,
-0.12508270144462585,
0.27841901779174805,
-0.4862348735332489,
-0.33140140771865845,
0.1603582799434662,
0.07059601694345474,
0.3074233829975128,
0.04876506328582764,
-0.019279098138213158,
-0.4495794177055359,
-0.16887986660003662,
0.09809492528438568,
0.024483967572450638,
0.0559060201048851,
-0.33550769090652466,
-0.6632700562477112,
-0.23652207851409912,
-0.3934519588947296,
0.42766398191452026,
0.11315996944904327,
0.15297725796699524,
-0.14101237058639526,
-0.060667406767606735,
-0.05564745515584946,
0.06886571645736694,
0.7746017575263977,
-0.44157713651657104,
-0.11489983648061752,
0.3010856807231903,
-0.04762256145477295,
-0.09884575009346008,
-0.24329774081707,
-0.06724292039871216,
0.2733609080314636,
0.04728944972157478,
0.812408447265625,
0.04741748049855232,
0.0843920186161995,
0.21454596519470215,
0.062954843044281,
-0.06583312153816223,
0.02861814759671688,
-0.40605437755584717,
-0.28940078616142273,
-0.5907236933708191,
-0.020670847967267036,
0.05729472637176514,
0.21735882759094238,
0.30887851119041443,
0.18899647891521454,
0.1960790455341339,
-0.19456836581230164,
0.015450222417712212,
0.26640820503234863,
0.19868743419647217,
0.3779760003089905,
0.05605166777968407,
-0.04836764559149742,
0.12463323026895523,
0.0030192648991942406,
0.14063984155654907,
-0.22075983881950378,
-0.2776944041252136,
-0.057359520345926285,
0.04227237403392792,
0.34604090452194214,
0.22132141888141632,
0.06288785487413406,
0.09592346101999283,
0.14610250294208527,
0.25815823674201965,
-0.27591434121131897,
0.29633450508117676,
0.4933304786682129,
0.1403309553861618,
-0.4810525178909302,
-0.3202235698699951,
0.23703131079673767,
0.21850605309009552,
-0.16900992393493652,
0.3816426992416382,
0.09295284748077393,
-0.3298313617706299,
0.5882655382156372,
0.08547019213438034,
0.8382584452629089,
-0.31123292446136475,
0.05548466369509697,
-0.08506729453802109,
0.07848871499300003,
0.28673750162124634,
0.06256772577762604,
0.2233814299106598,
-0.1989949643611908,
-0.4336814880371094,
0.029441021382808685,
-0.05872458592057228,
0.34761762619018555,
0.08719217032194138,
-0.18708999454975128,
0.2699609100818634,
-0.22248661518096924,
0.5848442912101746,
-0.2539534568786621,
-0.24099195003509521,
0.21160300076007843,
-0.3743121325969696,
0.12431797385215759,
0.05664937198162079,
-0.06866149604320526,
0.0904512032866478,
0.010076311416924,
0.1401854157447815,
-0.10218416154384613,
-0.3583538830280304,
0.06752738356590271,
-0.05393962562084198,
-0.20072968304157257,
0.2325114607810974,
-0.2137071043252945,
-0.21946488320827484,
-0.06756147742271423,
0.3379041254520416,
0.30494844913482666,
0.22569140791893005,
0.0769786611199379,
0.23450155556201935,
0.44316983222961426,
0.20916718244552612,
-0.040883321315050125,
-0.1617860049009323,
-0.04702890291810036,
0.14012153446674347,
-0.28522855043411255,
0.1369483917951584,
-0.014186575077474117,
-0.24163071811199188,
-0.36424314975738525,
0.04156367480754852,
0.4323442280292511,
-0.3393743634223938,
-0.24990436434745789,
-0.15704137086868286,
-0.011291373521089554,
-0.10009307414293289,
0.0678599402308464,
-0.3800918161869049,
-0.18972113728523254,
0.4002569317817688,
-0.11459827423095703,
-0.4112878739833832,
0.12574414908885956,
0.36346912384033203,
0.08220499008893967,
0.013131731189787388,
0.5031769275665283,
-0.199539452791214,
0.01134793646633625,
-0.08634281903505325,
0.09820457547903061,
0.21586577594280243,
-0.08675037324428558,
0.02979719638824463,
0.3238883912563324,
-0.030904924497008324,
-0.15960320830345154,
0.4304634928703308,
0.05671411380171776,
0.20152553915977478,
0.07845382392406464,
-0.24326729774475098,
-0.6696435213088989,
0.4877866804599762,
0.1031508669257164,
0.2492164671421051,
0.10519205033779144,
0.3467663526535034,
-0.2948550879955292,
-0.011246440932154655,
-0.23995527625083923,
0.06492085754871368,
-0.043820712715387344,
0.31546008586883545,
0.44217216968536377,
0.02533775195479393,
-0.08960762619972229,
-0.28981414437294006,
0.20927786827087402,
0.26412904262542725,
-0.08504647761583328,
-0.21385909616947174,
-0.016767820343375206,
0.11830876022577286,
0.1053171306848526,
-0.15056505799293518,
-0.024389738216996193,
-0.3231567144393921,
-0.027443543076515198,
-0.2703392505645752,
-0.0828692689538002,
0.3389025330543518,
0.03391827642917633,
0.19236688315868378,
-0.5534643530845642,
-0.0861906185746193,
0.3065197467803955,
0.1393100917339325,
-0.1251809448003769,
-0.05673982948064804,
0.26530545949935913,
0.17761507630348206,
-0.050407640635967255,
0.09706377238035202,
-0.2915787994861603,
-0.06840800493955612,
-0.15435251593589783,
0.11561374366283417,
0.34722861647605896,
-0.18881553411483765,
0.1339828372001648,
0.056105196475982666,
0.27962836623191833,
0.13100166618824005,
-0.25989606976509094,
-0.19481432437896729,
0.3021288812160492,
0.09886659681797028,
-0.3267248570919037,
-0.1829228401184082,
0.5215920209884644,
-0.01564074493944645,
0.2411126345396042,
0.23524239659309387,
-0.04850751906633377,
0.13168765604496002,
-0.26017269492149353,
-0.017790712416172028,
0.15293481945991516,
-0.07377755641937256,
0.24698151648044586,
0.6254127025604248,
-0.11507466435432434,
0.2715166509151459,
0.29260531067848206,
0.37308067083358765,
-0.12497684359550476,
0.6644849181175232,
0.06355020403862,
0.20422020554542542,
0.15866196155548096,
0.2688656449317932,
-0.11448071897029877,
-0.08995076268911362,
0.5314692258834839,
0.13465848565101624,
-0.22350247204303741,
0.296956866979599,
0.1907867044210434,
-0.2590562105178833,
-0.0018364627612754703,
-0.22525770962238312,
-0.07754503190517426,
0.28075844049453735,
-0.21775329113006592,
-0.2554299235343933,
-0.15150205790996552,
-0.03606342524290085,
0.001720970612950623,
0.08056290447711945,
-0.057208530604839325,
0.06858670711517334,
0.6512497067451477,
0.026028620079159737,
0.05100448802113533,
0.09604483842849731,
-0.5209681987762451,
0.13529746234416962,
0.3933676481246948,
-0.1334357112646103,
-0.01800011284649372,
0.057153213769197464,
0.16420486569404602,
0.22000427544116974,
0.015519633889198303,
0.3567887842655182,
0.16927558183670044,
-0.2766987383365631,
0.16297951340675354,
-0.019590958952903748,
-0.10517759621143341,
0.2641953229904175,
0.04390478506684303,
0.32678326964378357,
0.008746081963181496,
0.10008306801319122,
0.03574598208069801,
-0.18553738296031952,
-0.10508003830909729,
0.1487797349691391,
0.1994478702545166,
0.19670583307743073,
-0.06667415797710419,
0.07766912877559662,
-0.1384182870388031,
-0.061289381235837936,
0.1662922352552414,
-0.21067622303962708,
-0.21686503291130066,
0.474101722240448,
-0.11827553808689117,
0.1831549108028412,
0.13142435252666473,
0.062266528606414795,
0.11475974321365356,
0.1901857852935791,
0.10686177760362625,
-0.18237432837486267,
-0.5617815256118774,
-0.050648752599954605,
-0.36188754439353943,
-0.14546045660972595,
-0.048325397074222565,
0.0958932489156723,
0.00018364809511695057,
-0.2958848774433136,
0.2807193994522095,
0.10119003057479858,
0.4350568354129791,
-0.48306262493133545,
-0.056659940630197525,
0.5606932640075684,
0.05398434028029442,
-0.060144100338220596,
0.020284119993448257,
0.24734269082546234,
0.10788968950510025,
-0.3471125364303589,
0.09702654927968979,
0.058661703020334244,
-0.008825927041471004,
-0.33927926421165466,
-0.17470936477184296,
-0.254141241312027,
-0.22222799062728882,
0.4715787172317505,
0.17470316588878632,
0.4249303638935089,
-0.1517660915851593,
-0.07277576625347137,
0.163743793964386,
-0.16768230497837067,
-0.016834672540426254,
0.20952291786670685,
0.23095038533210754,
0.38832345604896545,
-0.0711032897233963,
0.12801751494407654,
-0.3970898985862732,
0.0074610053561627865,
0.030202144756913185,
-0.18531084060668945,
-0.37659355998039246,
0.186921164393425,
0.25499293208122253,
0.04083411395549774,
-0.18534469604492188,
0.3607899844646454,
0.038896724581718445,
0.5180017948150635,
-0.06803087145090103,
-0.369066447019577,
0.7985037565231323,
-0.3579205274581909,
-0.6600226163864136,
0.08236005157232285,
-0.09001582860946655,
-0.14274242520332336,
0.041207607835531235,
-0.23881547152996063,
-0.06306429952383041,
0.07364088296890259,
-0.03345326706767082,
-0.34661605954170227,
0.09012815356254578,
-0.1645772010087967,
0.07983575016260147,
0.03644786402583122,
0.48609817028045654,
-0.31976738572120667,
-0.09455756843090057,
-0.24672654271125793,
-0.0632384717464447
] |
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.03439050167798996,
0.006200192496180534,
-0.06358009576797485,
-0.33422812819480896,
0.4808439612388611,
0.26163917779922485,
0.6042658090591431,
0.23733209073543549,
0.13709159195423126,
0.08659088611602783,
0.05403544753789902,
0.5270302891731262,
-0.15589521825313568,
0.2994628846645355,
-0.1945011168718338,
-0.08811692148447037,
0.4133821725845337,
0.09350385516881943,
-0.11563335359096527,
0.1972021460533142,
-0.4435485303401947,
0.049706246703863144,
-0.3014574348926544,
0.2807840406894684,
-0.3147513270378113,
-0.17789658904075623,
0.054533448070287704,
-0.1938542276620865,
-0.2473178207874298,
-0.2746686637401581,
-0.04921553656458855,
0.09710279852151871,
-0.022366121411323547,
0.600527822971344,
-0.00011894206545548514,
0.08269864320755005,
0.18870742619037628,
-0.08655130863189697,
0.08298543840646744,
-0.29607468843460083,
-0.18191508948802948,
-0.011541547253727913,
-0.22306102514266968,
-0.5142744779586792,
0.040685705840587616,
-0.06361547112464905,
-0.07717237621545792,
-0.26717719435691833,
0.10244949162006378,
0.24669963121414185,
0.1638299822807312,
-0.1138831302523613,
0.22092296183109283,
-0.02204878069460392,
0.04394695535302162,
0.23825377225875854,
-0.19265131652355194,
0.0769319236278534,
0.049105171114206314,
-0.35820069909095764,
0.22909872233867645,
0.6931742429733276,
-0.21425271034240723,
-0.082626111805439,
0.24929456412792206,
0.14856651425361633,
0.41321122646331787,
-0.35957685112953186,
0.36146536469459534,
-0.13661763072013855,
0.2379053831100464,
-0.15123896300792694,
-0.104380302131176,
-0.05423252284526825,
-0.0018236894393339753,
-0.25378456711769104,
-0.02323567494750023,
-0.3196379542350769,
0.0776958018541336,
-0.22969919443130493,
-0.33052706718444824,
-0.18500719964504242,
0.1285368651151657,
0.20784422755241394,
0.12311341613531113,
-0.09719859808683395,
-0.02960880659520626,
0.4492812752723694,
0.1049036756157875,
-0.32267093658447266,
-0.12460634112358093,
0.02691291831433773,
0.09808354079723358,
0.22117313742637634,
-0.22417816519737244,
-0.06977520883083344,
0.10546684265136719,
-0.022715654224157333,
-0.28656837344169617,
-0.6728147268295288,
0.01710093580186367,
-0.11549871414899826,
0.18046346306800842,
0.07850151509046555,
0.10636221617460251,
0.20729076862335205,
-0.08792590349912643,
0.3839035630226135,
0.04374159127473831,
0.049991168081760406,
-0.3903311491012573,
-0.2533303201198578,
0.18438251316547394,
-0.3990155756473541,
0.35975906252861023,
0.24726103246212006,
0.37760552763938904,
0.09367808699607849,
0.4118514955043793,
-0.01276132371276617,
0.13943608105182648,
-0.09650971740484238,
-0.023580282926559448,
0.35823553800582886,
0.24442636966705322,
-0.05046550929546356,
0.10449741780757904,
0.14741189777851105,
-0.037725649774074554,
0.2744562029838562,
-0.03996998071670532,
0.15208107233047485,
-0.5921463370323181,
-0.10537657141685486,
-0.15918441116809845,
0.06445615738630295,
0.02737456187605858,
-0.18560691177845,
0.12004096060991287,
-0.10297893732786179,
-0.01741449162364006,
-0.06256149709224701,
0.4089111387729645,
0.19146090745925903,
-0.3518825173377991,
0.11432348191738129,
0.22875186800956726,
-0.2352551519870758,
-0.12316077947616577,
0.21782319247722626,
-0.6010240912437439,
-0.18661943078041077,
-0.19353996217250824,
0.09118717163801193,
0.20307712256908417,
0.19964392483234406,
-0.27529674768447876,
-0.1346437782049179,
0.5062406659126282,
-0.40407073497772217,
0.08267828822135925,
-0.24270935356616974,
-0.2949002981185913,
-0.23645523190498352,
-0.16903379559516907,
-0.0339539460837841,
-0.04627597704529762,
-0.025684591382741928,
-0.17594294250011444,
0.3576541244983673,
0.01550973765552044,
-0.04866243898868561,
-0.10098220407962799,
0.21325333416461945,
-0.03428291156888008,
0.1602662056684494,
0.427164763212204,
-0.31456267833709717,
-0.20635849237442017,
-0.015260067768394947,
-0.22039887309074402,
-0.16166067123413086,
-0.09202215075492859,
0.09303063154220581,
0.20390455424785614,
-0.07271382212638855,
0.4399831295013428,
-0.15441395342350006,
-0.08987176418304443,
0.1785479336977005,
0.13115853071212769,
-0.046214841306209564,
0.1775304675102234,
-0.07912339270114899,
0.1281120926141739,
0.20867317914962769,
0.11113496124744415,
0.011695937253534794,
-0.0227945726364851,
-0.20689232647418976,
0.09393475204706192,
0.0991029292345047,
0.2192526012659073,
-0.02455320581793785,
0.03605704382061958,
0.08036879450082779,
-0.32553020119667053,
0.16788123548030853,
0.18034236133098602,
0.1416132003068924,
-0.2925772964954376,
-0.11960235983133316,
-0.25508370995521545,
-0.1336403638124466,
-0.1760665625333786,
0.031643256545066833,
0.05520441383123398,
-0.05400095507502556,
-0.034420717507600784,
-0.1491250842809677,
-0.16488339006900787,
-0.15275585651397705,
0.049740053713321686,
0.10933174937963486,
-0.3486707806587219,
-0.018466129899024963,
-0.21110014617443085,
-0.1441618800163269,
-0.38502368330955505,
0.013276788406074047,
0.18813416361808777,
-0.05409678444266319,
-0.2381075620651245,
0.3495652377605438,
0.13930895924568176,
0.044096771627664566,
-0.3154112994670868,
0.17560714483261108,
0.09110111743211746,
-0.033451661467552185,
-0.0013043951475992799,
0.10427001863718033,
0.18146513402462006,
-0.03480461612343788,
0.11235694587230682,
0.2557910680770874,
-0.2581355571746826,
0.3806616961956024,
-0.23958873748779297,
0.12885594367980957,
-0.08415930718183517,
-0.17669136822223663,
-0.23736631870269775,
-0.39378175139427185,
-0.14378216862678528,
-0.2950775623321533,
-0.23233135044574738,
-0.07121974974870682,
0.3053763806819916,
-0.20798008143901825,
0.5871574282646179,
-0.04098282381892204,
0.024091612547636032,
-0.005710002034902573,
0.061563000082969666,
0.2896173298358917,
0.011416795663535595,
0.10648975521326065,
0.2978290319442749,
-0.009614160284399986,
-0.22335946559906006,
0.2672613263130188,
0.1708519011735916,
0.27672380208969116,
0.204093798995018,
0.21670587360858917,
0.2447037398815155,
0.048026613891124725,
0.1485537588596344,
-0.061389464884996414,
0.016496799886226654,
-0.29990097880363464,
0.3099988102912903,
0.2844226658344269,
-0.23363542556762695,
0.09982316941022873,
-0.06604170054197311,
0.07008686661720276,
0.28239086270332336,
-0.15271733701229095,
0.05622289702296257,
-0.2700432240962982,
-0.09488841146230698,
0.3865872025489807,
0.09207642823457718,
0.43321335315704346,
-0.1842430680990219,
-0.3789013624191284,
0.24179671704769135,
-0.35465508699417114,
-0.0365537591278553,
-0.4494333267211914,
0.030626045539975166,
-0.032505933195352554,
0.08569164574146271,
-0.4606236517429352,
0.08175516873598099,
-0.16478224098682404,
-0.13556119799613953,
-0.121132992208004,
-0.5227620601654053,
0.12185568362474442,
-0.44264695048332214,
0.014803526923060417,
0.2468886375427246,
0.2771112322807312,
-0.29262223839759827,
-0.17715036869049072,
0.45425882935523987,
-0.21786580979824066,
-0.14943061769008636,
0.12586726248264313,
0.012163599953055382,
-0.039333730936050415,
-0.11803412437438965,
-0.1904158592224121,
-0.026527775451540947,
-0.1234949603676796,
0.1169080063700676,
-0.26469722390174866,
0.016314053907990456,
0.5068843364715576,
0.27591803669929504,
-0.24426092207431793,
0.14303641021251678,
-0.04893213137984276,
-0.1584293693304062,
-0.3822784125804901,
0.2083154022693634,
-0.08685959875583649,
0.08384094387292862,
0.004729610867798328,
-0.11430326104164124,
-0.003728545270860195,
0.041040848940610886,
-0.18132205307483673,
-0.2923727333545685,
-0.08111466467380524,
0.2520662248134613,
0.15513215959072113,
0.10158779472112656,
0.286132276058197,
0.4163929522037506,
-0.12338318675756454,
0.015546772629022598,
-0.2297619730234146,
-0.04077393189072609,
0.4496162533760071,
0.27504441142082214,
0.28390631079673767,
0.44892433285713196,
-0.01612991653382778,
0.29311344027519226,
-0.1320105642080307,
-0.10581408441066742,
0.45527327060699463,
-0.32816290855407715,
0.09713964909315109,
-0.4271511435508728,
-0.4983295500278473,
0.02122524194419384,
-0.34565237164497375,
-0.26921546459198,
-0.25261276960372925,
-0.19740286469459534,
-0.2074299156665802,
-0.12508270144462585,
0.27841901779174805,
-0.4862348735332489,
-0.33140140771865845,
0.1603582799434662,
0.07059601694345474,
0.3074233829975128,
0.04876506328582764,
-0.019279098138213158,
-0.4495794177055359,
-0.16887986660003662,
0.09809492528438568,
0.024483967572450638,
0.0559060201048851,
-0.33550769090652466,
-0.6632700562477112,
-0.23652207851409912,
-0.3934519588947296,
0.42766398191452026,
0.11315996944904327,
0.15297725796699524,
-0.14101237058639526,
-0.060667406767606735,
-0.05564745515584946,
0.06886571645736694,
0.7746017575263977,
-0.44157713651657104,
-0.11489983648061752,
0.3010856807231903,
-0.04762256145477295,
-0.09884575009346008,
-0.24329774081707,
-0.06724292039871216,
0.2733609080314636,
0.04728944972157478,
0.812408447265625,
0.04741748049855232,
0.0843920186161995,
0.21454596519470215,
0.062954843044281,
-0.06583312153816223,
0.02861814759671688,
-0.40605437755584717,
-0.28940078616142273,
-0.5907236933708191,
-0.020670847967267036,
0.05729472637176514,
0.21735882759094238,
0.30887851119041443,
0.18899647891521454,
0.1960790455341339,
-0.19456836581230164,
0.015450222417712212,
0.26640820503234863,
0.19868743419647217,
0.3779760003089905,
0.05605166777968407,
-0.04836764559149742,
0.12463323026895523,
0.0030192648991942406,
0.14063984155654907,
-0.22075983881950378,
-0.2776944041252136,
-0.057359520345926285,
0.04227237403392792,
0.34604090452194214,
0.22132141888141632,
0.06288785487413406,
0.09592346101999283,
0.14610250294208527,
0.25815823674201965,
-0.27591434121131897,
0.29633450508117676,
0.4933304786682129,
0.1403309553861618,
-0.4810525178909302,
-0.3202235698699951,
0.23703131079673767,
0.21850605309009552,
-0.16900992393493652,
0.3816426992416382,
0.09295284748077393,
-0.3298313617706299,
0.5882655382156372,
0.08547019213438034,
0.8382584452629089,
-0.31123292446136475,
0.05548466369509697,
-0.08506729453802109,
0.07848871499300003,
0.28673750162124634,
0.06256772577762604,
0.2233814299106598,
-0.1989949643611908,
-0.4336814880371094,
0.029441021382808685,
-0.05872458592057228,
0.34761762619018555,
0.08719217032194138,
-0.18708999454975128,
0.2699609100818634,
-0.22248661518096924,
0.5848442912101746,
-0.2539534568786621,
-0.24099195003509521,
0.21160300076007843,
-0.3743121325969696,
0.12431797385215759,
0.05664937198162079,
-0.06866149604320526,
0.0904512032866478,
0.010076311416924,
0.1401854157447815,
-0.10218416154384613,
-0.3583538830280304,
0.06752738356590271,
-0.05393962562084198,
-0.20072968304157257,
0.2325114607810974,
-0.2137071043252945,
-0.21946488320827484,
-0.06756147742271423,
0.3379041254520416,
0.30494844913482666,
0.22569140791893005,
0.0769786611199379,
0.23450155556201935,
0.44316983222961426,
0.20916718244552612,
-0.040883321315050125,
-0.1617860049009323,
-0.04702890291810036,
0.14012153446674347,
-0.28522855043411255,
0.1369483917951584,
-0.014186575077474117,
-0.24163071811199188,
-0.36424314975738525,
0.04156367480754852,
0.4323442280292511,
-0.3393743634223938,
-0.24990436434745789,
-0.15704137086868286,
-0.011291373521089554,
-0.10009307414293289,
0.0678599402308464,
-0.3800918161869049,
-0.18972113728523254,
0.4002569317817688,
-0.11459827423095703,
-0.4112878739833832,
0.12574414908885956,
0.36346912384033203,
0.08220499008893967,
0.013131731189787388,
0.5031769275665283,
-0.199539452791214,
0.01134793646633625,
-0.08634281903505325,
0.09820457547903061,
0.21586577594280243,
-0.08675037324428558,
0.02979719638824463,
0.3238883912563324,
-0.030904924497008324,
-0.15960320830345154,
0.4304634928703308,
0.05671411380171776,
0.20152553915977478,
0.07845382392406464,
-0.24326729774475098,
-0.6696435213088989,
0.4877866804599762,
0.1031508669257164,
0.2492164671421051,
0.10519205033779144,
0.3467663526535034,
-0.2948550879955292,
-0.011246440932154655,
-0.23995527625083923,
0.06492085754871368,
-0.043820712715387344,
0.31546008586883545,
0.44217216968536377,
0.02533775195479393,
-0.08960762619972229,
-0.28981414437294006,
0.20927786827087402,
0.26412904262542725,
-0.08504647761583328,
-0.21385909616947174,
-0.016767820343375206,
0.11830876022577286,
0.1053171306848526,
-0.15056505799293518,
-0.024389738216996193,
-0.3231567144393921,
-0.027443543076515198,
-0.2703392505645752,
-0.0828692689538002,
0.3389025330543518,
0.03391827642917633,
0.19236688315868378,
-0.5534643530845642,
-0.0861906185746193,
0.3065197467803955,
0.1393100917339325,
-0.1251809448003769,
-0.05673982948064804,
0.26530545949935913,
0.17761507630348206,
-0.050407640635967255,
0.09706377238035202,
-0.2915787994861603,
-0.06840800493955612,
-0.15435251593589783,
0.11561374366283417,
0.34722861647605896,
-0.18881553411483765,
0.1339828372001648,
0.056105196475982666,
0.27962836623191833,
0.13100166618824005,
-0.25989606976509094,
-0.19481432437896729,
0.3021288812160492,
0.09886659681797028,
-0.3267248570919037,
-0.1829228401184082,
0.5215920209884644,
-0.01564074493944645,
0.2411126345396042,
0.23524239659309387,
-0.04850751906633377,
0.13168765604496002,
-0.26017269492149353,
-0.017790712416172028,
0.15293481945991516,
-0.07377755641937256,
0.24698151648044586,
0.6254127025604248,
-0.11507466435432434,
0.2715166509151459,
0.29260531067848206,
0.37308067083358765,
-0.12497684359550476,
0.6644849181175232,
0.06355020403862,
0.20422020554542542,
0.15866196155548096,
0.2688656449317932,
-0.11448071897029877,
-0.08995076268911362,
0.5314692258834839,
0.13465848565101624,
-0.22350247204303741,
0.296956866979599,
0.1907867044210434,
-0.2590562105178833,
-0.0018364627612754703,
-0.22525770962238312,
-0.07754503190517426,
0.28075844049453735,
-0.21775329113006592,
-0.2554299235343933,
-0.15150205790996552,
-0.03606342524290085,
0.001720970612950623,
0.08056290447711945,
-0.057208530604839325,
0.06858670711517334,
0.6512497067451477,
0.026028620079159737,
0.05100448802113533,
0.09604483842849731,
-0.5209681987762451,
0.13529746234416962,
0.3933676481246948,
-0.1334357112646103,
-0.01800011284649372,
0.057153213769197464,
0.16420486569404602,
0.22000427544116974,
0.015519633889198303,
0.3567887842655182,
0.16927558183670044,
-0.2766987383365631,
0.16297951340675354,
-0.019590958952903748,
-0.10517759621143341,
0.2641953229904175,
0.04390478506684303,
0.32678326964378357,
0.008746081963181496,
0.10008306801319122,
0.03574598208069801,
-0.18553738296031952,
-0.10508003830909729,
0.1487797349691391,
0.1994478702545166,
0.19670583307743073,
-0.06667415797710419,
0.07766912877559662,
-0.1384182870388031,
-0.061289381235837936,
0.1662922352552414,
-0.21067622303962708,
-0.21686503291130066,
0.474101722240448,
-0.11827553808689117,
0.1831549108028412,
0.13142435252666473,
0.062266528606414795,
0.11475974321365356,
0.1901857852935791,
0.10686177760362625,
-0.18237432837486267,
-0.5617815256118774,
-0.050648752599954605,
-0.36188754439353943,
-0.14546045660972595,
-0.048325397074222565,
0.0958932489156723,
0.00018364809511695057,
-0.2958848774433136,
0.2807193994522095,
0.10119003057479858,
0.4350568354129791,
-0.48306262493133545,
-0.056659940630197525,
0.5606932640075684,
0.05398434028029442,
-0.060144100338220596,
0.020284119993448257,
0.24734269082546234,
0.10788968950510025,
-0.3471125364303589,
0.09702654927968979,
0.058661703020334244,
-0.008825927041471004,
-0.33927926421165466,
-0.17470936477184296,
-0.254141241312027,
-0.22222799062728882,
0.4715787172317505,
0.17470316588878632,
0.4249303638935089,
-0.1517660915851593,
-0.07277576625347137,
0.163743793964386,
-0.16768230497837067,
-0.016834672540426254,
0.20952291786670685,
0.23095038533210754,
0.38832345604896545,
-0.0711032897233963,
0.12801751494407654,
-0.3970898985862732,
0.0074610053561627865,
0.030202144756913185,
-0.18531084060668945,
-0.37659355998039246,
0.186921164393425,
0.25499293208122253,
0.04083411395549774,
-0.18534469604492188,
0.3607899844646454,
0.038896724581718445,
0.5180017948150635,
-0.06803087145090103,
-0.369066447019577,
0.7985037565231323,
-0.3579205274581909,
-0.6600226163864136,
0.08236005157232285,
-0.09001582860946655,
-0.14274242520332336,
0.041207607835531235,
-0.23881547152996063,
-0.06306429952383041,
0.07364088296890259,
-0.03345326706767082,
-0.34661605954170227,
0.09012815356254578,
-0.1645772010087967,
0.07983575016260147,
0.03644786402583122,
0.48609817028045654,
-0.31976738572120667,
-0.09455756843090057,
-0.24672654271125793,
-0.0632384717464447
] |
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.03439050167798996,
0.006200192496180534,
-0.06358009576797485,
-0.33422812819480896,
0.4808439612388611,
0.26163917779922485,
0.6042658090591431,
0.23733209073543549,
0.13709159195423126,
0.08659088611602783,
0.05403544753789902,
0.5270302891731262,
-0.15589521825313568,
0.2994628846645355,
-0.1945011168718338,
-0.08811692148447037,
0.4133821725845337,
0.09350385516881943,
-0.11563335359096527,
0.1972021460533142,
-0.4435485303401947,
0.049706246703863144,
-0.3014574348926544,
0.2807840406894684,
-0.3147513270378113,
-0.17789658904075623,
0.054533448070287704,
-0.1938542276620865,
-0.2473178207874298,
-0.2746686637401581,
-0.04921553656458855,
0.09710279852151871,
-0.022366121411323547,
0.600527822971344,
-0.00011894206545548514,
0.08269864320755005,
0.18870742619037628,
-0.08655130863189697,
0.08298543840646744,
-0.29607468843460083,
-0.18191508948802948,
-0.011541547253727913,
-0.22306102514266968,
-0.5142744779586792,
0.040685705840587616,
-0.06361547112464905,
-0.07717237621545792,
-0.26717719435691833,
0.10244949162006378,
0.24669963121414185,
0.1638299822807312,
-0.1138831302523613,
0.22092296183109283,
-0.02204878069460392,
0.04394695535302162,
0.23825377225875854,
-0.19265131652355194,
0.0769319236278534,
0.049105171114206314,
-0.35820069909095764,
0.22909872233867645,
0.6931742429733276,
-0.21425271034240723,
-0.082626111805439,
0.24929456412792206,
0.14856651425361633,
0.41321122646331787,
-0.35957685112953186,
0.36146536469459534,
-0.13661763072013855,
0.2379053831100464,
-0.15123896300792694,
-0.104380302131176,
-0.05423252284526825,
-0.0018236894393339753,
-0.25378456711769104,
-0.02323567494750023,
-0.3196379542350769,
0.0776958018541336,
-0.22969919443130493,
-0.33052706718444824,
-0.18500719964504242,
0.1285368651151657,
0.20784422755241394,
0.12311341613531113,
-0.09719859808683395,
-0.02960880659520626,
0.4492812752723694,
0.1049036756157875,
-0.32267093658447266,
-0.12460634112358093,
0.02691291831433773,
0.09808354079723358,
0.22117313742637634,
-0.22417816519737244,
-0.06977520883083344,
0.10546684265136719,
-0.022715654224157333,
-0.28656837344169617,
-0.6728147268295288,
0.01710093580186367,
-0.11549871414899826,
0.18046346306800842,
0.07850151509046555,
0.10636221617460251,
0.20729076862335205,
-0.08792590349912643,
0.3839035630226135,
0.04374159127473831,
0.049991168081760406,
-0.3903311491012573,
-0.2533303201198578,
0.18438251316547394,
-0.3990155756473541,
0.35975906252861023,
0.24726103246212006,
0.37760552763938904,
0.09367808699607849,
0.4118514955043793,
-0.01276132371276617,
0.13943608105182648,
-0.09650971740484238,
-0.023580282926559448,
0.35823553800582886,
0.24442636966705322,
-0.05046550929546356,
0.10449741780757904,
0.14741189777851105,
-0.037725649774074554,
0.2744562029838562,
-0.03996998071670532,
0.15208107233047485,
-0.5921463370323181,
-0.10537657141685486,
-0.15918441116809845,
0.06445615738630295,
0.02737456187605858,
-0.18560691177845,
0.12004096060991287,
-0.10297893732786179,
-0.01741449162364006,
-0.06256149709224701,
0.4089111387729645,
0.19146090745925903,
-0.3518825173377991,
0.11432348191738129,
0.22875186800956726,
-0.2352551519870758,
-0.12316077947616577,
0.21782319247722626,
-0.6010240912437439,
-0.18661943078041077,
-0.19353996217250824,
0.09118717163801193,
0.20307712256908417,
0.19964392483234406,
-0.27529674768447876,
-0.1346437782049179,
0.5062406659126282,
-0.40407073497772217,
0.08267828822135925,
-0.24270935356616974,
-0.2949002981185913,
-0.23645523190498352,
-0.16903379559516907,
-0.0339539460837841,
-0.04627597704529762,
-0.025684591382741928,
-0.17594294250011444,
0.3576541244983673,
0.01550973765552044,
-0.04866243898868561,
-0.10098220407962799,
0.21325333416461945,
-0.03428291156888008,
0.1602662056684494,
0.427164763212204,
-0.31456267833709717,
-0.20635849237442017,
-0.015260067768394947,
-0.22039887309074402,
-0.16166067123413086,
-0.09202215075492859,
0.09303063154220581,
0.20390455424785614,
-0.07271382212638855,
0.4399831295013428,
-0.15441395342350006,
-0.08987176418304443,
0.1785479336977005,
0.13115853071212769,
-0.046214841306209564,
0.1775304675102234,
-0.07912339270114899,
0.1281120926141739,
0.20867317914962769,
0.11113496124744415,
0.011695937253534794,
-0.0227945726364851,
-0.20689232647418976,
0.09393475204706192,
0.0991029292345047,
0.2192526012659073,
-0.02455320581793785,
0.03605704382061958,
0.08036879450082779,
-0.32553020119667053,
0.16788123548030853,
0.18034236133098602,
0.1416132003068924,
-0.2925772964954376,
-0.11960235983133316,
-0.25508370995521545,
-0.1336403638124466,
-0.1760665625333786,
0.031643256545066833,
0.05520441383123398,
-0.05400095507502556,
-0.034420717507600784,
-0.1491250842809677,
-0.16488339006900787,
-0.15275585651397705,
0.049740053713321686,
0.10933174937963486,
-0.3486707806587219,
-0.018466129899024963,
-0.21110014617443085,
-0.1441618800163269,
-0.38502368330955505,
0.013276788406074047,
0.18813416361808777,
-0.05409678444266319,
-0.2381075620651245,
0.3495652377605438,
0.13930895924568176,
0.044096771627664566,
-0.3154112994670868,
0.17560714483261108,
0.09110111743211746,
-0.033451661467552185,
-0.0013043951475992799,
0.10427001863718033,
0.18146513402462006,
-0.03480461612343788,
0.11235694587230682,
0.2557910680770874,
-0.2581355571746826,
0.3806616961956024,
-0.23958873748779297,
0.12885594367980957,
-0.08415930718183517,
-0.17669136822223663,
-0.23736631870269775,
-0.39378175139427185,
-0.14378216862678528,
-0.2950775623321533,
-0.23233135044574738,
-0.07121974974870682,
0.3053763806819916,
-0.20798008143901825,
0.5871574282646179,
-0.04098282381892204,
0.024091612547636032,
-0.005710002034902573,
0.061563000082969666,
0.2896173298358917,
0.011416795663535595,
0.10648975521326065,
0.2978290319442749,
-0.009614160284399986,
-0.22335946559906006,
0.2672613263130188,
0.1708519011735916,
0.27672380208969116,
0.204093798995018,
0.21670587360858917,
0.2447037398815155,
0.048026613891124725,
0.1485537588596344,
-0.061389464884996414,
0.016496799886226654,
-0.29990097880363464,
0.3099988102912903,
0.2844226658344269,
-0.23363542556762695,
0.09982316941022873,
-0.06604170054197311,
0.07008686661720276,
0.28239086270332336,
-0.15271733701229095,
0.05622289702296257,
-0.2700432240962982,
-0.09488841146230698,
0.3865872025489807,
0.09207642823457718,
0.43321335315704346,
-0.1842430680990219,
-0.3789013624191284,
0.24179671704769135,
-0.35465508699417114,
-0.0365537591278553,
-0.4494333267211914,
0.030626045539975166,
-0.032505933195352554,
0.08569164574146271,
-0.4606236517429352,
0.08175516873598099,
-0.16478224098682404,
-0.13556119799613953,
-0.121132992208004,
-0.5227620601654053,
0.12185568362474442,
-0.44264695048332214,
0.014803526923060417,
0.2468886375427246,
0.2771112322807312,
-0.29262223839759827,
-0.17715036869049072,
0.45425882935523987,
-0.21786580979824066,
-0.14943061769008636,
0.12586726248264313,
0.012163599953055382,
-0.039333730936050415,
-0.11803412437438965,
-0.1904158592224121,
-0.026527775451540947,
-0.1234949603676796,
0.1169080063700676,
-0.26469722390174866,
0.016314053907990456,
0.5068843364715576,
0.27591803669929504,
-0.24426092207431793,
0.14303641021251678,
-0.04893213137984276,
-0.1584293693304062,
-0.3822784125804901,
0.2083154022693634,
-0.08685959875583649,
0.08384094387292862,
0.004729610867798328,
-0.11430326104164124,
-0.003728545270860195,
0.041040848940610886,
-0.18132205307483673,
-0.2923727333545685,
-0.08111466467380524,
0.2520662248134613,
0.15513215959072113,
0.10158779472112656,
0.286132276058197,
0.4163929522037506,
-0.12338318675756454,
0.015546772629022598,
-0.2297619730234146,
-0.04077393189072609,
0.4496162533760071,
0.27504441142082214,
0.28390631079673767,
0.44892433285713196,
-0.01612991653382778,
0.29311344027519226,
-0.1320105642080307,
-0.10581408441066742,
0.45527327060699463,
-0.32816290855407715,
0.09713964909315109,
-0.4271511435508728,
-0.4983295500278473,
0.02122524194419384,
-0.34565237164497375,
-0.26921546459198,
-0.25261276960372925,
-0.19740286469459534,
-0.2074299156665802,
-0.12508270144462585,
0.27841901779174805,
-0.4862348735332489,
-0.33140140771865845,
0.1603582799434662,
0.07059601694345474,
0.3074233829975128,
0.04876506328582764,
-0.019279098138213158,
-0.4495794177055359,
-0.16887986660003662,
0.09809492528438568,
0.024483967572450638,
0.0559060201048851,
-0.33550769090652466,
-0.6632700562477112,
-0.23652207851409912,
-0.3934519588947296,
0.42766398191452026,
0.11315996944904327,
0.15297725796699524,
-0.14101237058639526,
-0.060667406767606735,
-0.05564745515584946,
0.06886571645736694,
0.7746017575263977,
-0.44157713651657104,
-0.11489983648061752,
0.3010856807231903,
-0.04762256145477295,
-0.09884575009346008,
-0.24329774081707,
-0.06724292039871216,
0.2733609080314636,
0.04728944972157478,
0.812408447265625,
0.04741748049855232,
0.0843920186161995,
0.21454596519470215,
0.062954843044281,
-0.06583312153816223,
0.02861814759671688,
-0.40605437755584717,
-0.28940078616142273,
-0.5907236933708191,
-0.020670847967267036,
0.05729472637176514,
0.21735882759094238,
0.30887851119041443,
0.18899647891521454,
0.1960790455341339,
-0.19456836581230164,
0.015450222417712212,
0.26640820503234863,
0.19868743419647217,
0.3779760003089905,
0.05605166777968407,
-0.04836764559149742,
0.12463323026895523,
0.0030192648991942406,
0.14063984155654907,
-0.22075983881950378,
-0.2776944041252136,
-0.057359520345926285,
0.04227237403392792,
0.34604090452194214,
0.22132141888141632,
0.06288785487413406,
0.09592346101999283,
0.14610250294208527,
0.25815823674201965,
-0.27591434121131897,
0.29633450508117676,
0.4933304786682129,
0.1403309553861618,
-0.4810525178909302,
-0.3202235698699951,
0.23703131079673767,
0.21850605309009552,
-0.16900992393493652,
0.3816426992416382,
0.09295284748077393,
-0.3298313617706299,
0.5882655382156372,
0.08547019213438034,
0.8382584452629089,
-0.31123292446136475,
0.05548466369509697,
-0.08506729453802109,
0.07848871499300003,
0.28673750162124634,
0.06256772577762604,
0.2233814299106598,
-0.1989949643611908,
-0.4336814880371094,
0.029441021382808685,
-0.05872458592057228,
0.34761762619018555,
0.08719217032194138,
-0.18708999454975128,
0.2699609100818634,
-0.22248661518096924,
0.5848442912101746,
-0.2539534568786621,
-0.24099195003509521,
0.21160300076007843,
-0.3743121325969696,
0.12431797385215759,
0.05664937198162079,
-0.06866149604320526,
0.0904512032866478,
0.010076311416924,
0.1401854157447815,
-0.10218416154384613,
-0.3583538830280304,
0.06752738356590271,
-0.05393962562084198,
-0.20072968304157257,
0.2325114607810974,
-0.2137071043252945,
-0.21946488320827484,
-0.06756147742271423,
0.3379041254520416,
0.30494844913482666,
0.22569140791893005,
0.0769786611199379,
0.23450155556201935,
0.44316983222961426,
0.20916718244552612,
-0.040883321315050125,
-0.1617860049009323,
-0.04702890291810036,
0.14012153446674347,
-0.28522855043411255,
0.1369483917951584,
-0.014186575077474117,
-0.24163071811199188,
-0.36424314975738525,
0.04156367480754852,
0.4323442280292511,
-0.3393743634223938,
-0.24990436434745789,
-0.15704137086868286,
-0.011291373521089554,
-0.10009307414293289,
0.0678599402308464,
-0.3800918161869049,
-0.18972113728523254,
0.4002569317817688,
-0.11459827423095703,
-0.4112878739833832,
0.12574414908885956,
0.36346912384033203,
0.08220499008893967,
0.013131731189787388,
0.5031769275665283,
-0.199539452791214,
0.01134793646633625,
-0.08634281903505325,
0.09820457547903061,
0.21586577594280243,
-0.08675037324428558,
0.02979719638824463,
0.3238883912563324,
-0.030904924497008324,
-0.15960320830345154,
0.4304634928703308,
0.05671411380171776,
0.20152553915977478,
0.07845382392406464,
-0.24326729774475098,
-0.6696435213088989,
0.4877866804599762,
0.1031508669257164,
0.2492164671421051,
0.10519205033779144,
0.3467663526535034,
-0.2948550879955292,
-0.011246440932154655,
-0.23995527625083923,
0.06492085754871368,
-0.043820712715387344,
0.31546008586883545,
0.44217216968536377,
0.02533775195479393,
-0.08960762619972229,
-0.28981414437294006,
0.20927786827087402,
0.26412904262542725,
-0.08504647761583328,
-0.21385909616947174,
-0.016767820343375206,
0.11830876022577286,
0.1053171306848526,
-0.15056505799293518,
-0.024389738216996193,
-0.3231567144393921,
-0.027443543076515198,
-0.2703392505645752,
-0.0828692689538002,
0.3389025330543518,
0.03391827642917633,
0.19236688315868378,
-0.5534643530845642,
-0.0861906185746193,
0.3065197467803955,
0.1393100917339325,
-0.1251809448003769,
-0.05673982948064804,
0.26530545949935913,
0.17761507630348206,
-0.050407640635967255,
0.09706377238035202,
-0.2915787994861603,
-0.06840800493955612,
-0.15435251593589783,
0.11561374366283417,
0.34722861647605896,
-0.18881553411483765,
0.1339828372001648,
0.056105196475982666,
0.27962836623191833,
0.13100166618824005,
-0.25989606976509094,
-0.19481432437896729,
0.3021288812160492,
0.09886659681797028,
-0.3267248570919037,
-0.1829228401184082,
0.5215920209884644,
-0.01564074493944645,
0.2411126345396042,
0.23524239659309387,
-0.04850751906633377,
0.13168765604496002,
-0.26017269492149353,
-0.017790712416172028,
0.15293481945991516,
-0.07377755641937256,
0.24698151648044586,
0.6254127025604248,
-0.11507466435432434,
0.2715166509151459,
0.29260531067848206,
0.37308067083358765,
-0.12497684359550476,
0.6644849181175232,
0.06355020403862,
0.20422020554542542,
0.15866196155548096,
0.2688656449317932,
-0.11448071897029877,
-0.08995076268911362,
0.5314692258834839,
0.13465848565101624,
-0.22350247204303741,
0.296956866979599,
0.1907867044210434,
-0.2590562105178833,
-0.0018364627612754703,
-0.22525770962238312,
-0.07754503190517426,
0.28075844049453735,
-0.21775329113006592,
-0.2554299235343933,
-0.15150205790996552,
-0.03606342524290085,
0.001720970612950623,
0.08056290447711945,
-0.057208530604839325,
0.06858670711517334,
0.6512497067451477,
0.026028620079159737,
0.05100448802113533,
0.09604483842849731,
-0.5209681987762451,
0.13529746234416962,
0.3933676481246948,
-0.1334357112646103,
-0.01800011284649372,
0.057153213769197464,
0.16420486569404602,
0.22000427544116974,
0.015519633889198303,
0.3567887842655182,
0.16927558183670044,
-0.2766987383365631,
0.16297951340675354,
-0.019590958952903748,
-0.10517759621143341,
0.2641953229904175,
0.04390478506684303,
0.32678326964378357,
0.008746081963181496,
0.10008306801319122,
0.03574598208069801,
-0.18553738296031952,
-0.10508003830909729,
0.1487797349691391,
0.1994478702545166,
0.19670583307743073,
-0.06667415797710419,
0.07766912877559662,
-0.1384182870388031,
-0.061289381235837936,
0.1662922352552414,
-0.21067622303962708,
-0.21686503291130066,
0.474101722240448,
-0.11827553808689117,
0.1831549108028412,
0.13142435252666473,
0.062266528606414795,
0.11475974321365356,
0.1901857852935791,
0.10686177760362625,
-0.18237432837486267,
-0.5617815256118774,
-0.050648752599954605,
-0.36188754439353943,
-0.14546045660972595,
-0.048325397074222565,
0.0958932489156723,
0.00018364809511695057,
-0.2958848774433136,
0.2807193994522095,
0.10119003057479858,
0.4350568354129791,
-0.48306262493133545,
-0.056659940630197525,
0.5606932640075684,
0.05398434028029442,
-0.060144100338220596,
0.020284119993448257,
0.24734269082546234,
0.10788968950510025,
-0.3471125364303589,
0.09702654927968979,
0.058661703020334244,
-0.008825927041471004,
-0.33927926421165466,
-0.17470936477184296,
-0.254141241312027,
-0.22222799062728882,
0.4715787172317505,
0.17470316588878632,
0.4249303638935089,
-0.1517660915851593,
-0.07277576625347137,
0.163743793964386,
-0.16768230497837067,
-0.016834672540426254,
0.20952291786670685,
0.23095038533210754,
0.38832345604896545,
-0.0711032897233963,
0.12801751494407654,
-0.3970898985862732,
0.0074610053561627865,
0.030202144756913185,
-0.18531084060668945,
-0.37659355998039246,
0.186921164393425,
0.25499293208122253,
0.04083411395549774,
-0.18534469604492188,
0.3607899844646454,
0.038896724581718445,
0.5180017948150635,
-0.06803087145090103,
-0.369066447019577,
0.7985037565231323,
-0.3579205274581909,
-0.6600226163864136,
0.08236005157232285,
-0.09001582860946655,
-0.14274242520332336,
0.041207607835531235,
-0.23881547152996063,
-0.06306429952383041,
0.07364088296890259,
-0.03345326706767082,
-0.34661605954170227,
0.09012815356254578,
-0.1645772010087967,
0.07983575016260147,
0.03644786402583122,
0.48609817028045654,
-0.31976738572120667,
-0.09455756843090057,
-0.24672654271125793,
-0.0632384717464447
] |
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.0835752859711647,
0.21979939937591553,
-0.03482932224869728,
-0.04238487407565117,
0.42087700963020325,
0.07306195795536041,
0.6438039541244507,
0.41798415780067444,
-0.022552840411663055,
0.339653342962265,
-0.08668669313192368,
0.39780375361442566,
-0.052184779196977615,
0.36443546414375305,
-0.2562587559223175,
-0.2477053999900818,
0.10441403836011887,
-0.07954242080450058,
0.12673655152320862,
0.2697295844554901,
-0.33005279302597046,
0.07780764997005463,
-0.39327746629714966,
0.12606854736804962,
-0.07813375443220139,
0.06238025799393654,
0.03251982480287552,
0.09537691622972488,
0.028275467455387115,
-0.36107733845710754,
0.14411641657352448,
-0.03551042079925537,
0.18996472656726837,
0.5556836724281311,
-0.00011623617319855839,
0.12328136712312698,
0.22254888713359833,
-0.12801754474639893,
-0.18916355073451996,
-0.45284798741340637,
-0.0052787973545491695,
-0.1680363565683365,
0.001736080041155219,
-0.35067638754844666,
0.1707243174314499,
0.22847704589366913,
-0.23099467158317566,
-0.25847917795181274,
0.10060708224773407,
0.36931172013282776,
0.10769011080265045,
0.09653002768754959,
-0.010720264166593552,
0.11912441998720169,
0.10851497203111649,
0.021247539669275284,
-0.3047724962234497,
0.08998321741819382,
-0.07612423598766327,
-0.1792217344045639,
-0.11379048228263855,
0.23175153136253357,
-0.07117687910795212,
0.14804181456565857,
-0.023544447496533394,
0.3106740415096283,
0.034589771181344986,
-0.046964649111032486,
0.08885298669338226,
0.06717992573976517,
0.21446940302848816,
-0.24017827212810516,
-0.46399152278900146,
-0.44429636001586914,
0.16377216577529907,
-0.32501664757728577,
0.2570497691631317,
-0.1877465546131134,
0.12323659658432007,
0.18407472968101501,
-0.1398662030696869,
0.052361875772476196,
-0.13730496168136597,
-0.14063897728919983,
-0.0923045426607132,
0.0893615335226059,
-0.03236202523112297,
0.40946945548057556,
-0.10029321163892746,
-0.11142987012863159,
0.1749086081981659,
0.051333360373973846,
-0.07852023839950562,
-0.13118083775043488,
-0.5019622445106506,
0.027814257889986038,
-0.23024757206439972,
-0.25955820083618164,
-0.3201283812522888,
-0.120002381503582,
0.01583663374185562,
-0.25173133611679077,
0.272678941488266,
0.2164974808692932,
-0.03629773110151291,
0.19965234398841858,
0.13009966909885406,
0.485177606344223,
0.23599664866924286,
0.14029844105243683,
-0.20384696125984192,
-0.09152597188949585,
0.06073421239852905,
-0.2988732159137726,
0.14961737394332886,
0.19085833430290222,
0.13883854448795319,
0.10122472047805786,
-0.42232203483581543,
-0.0214154701679945,
-0.2999313473701477,
-0.18861651420593262,
-0.030533909797668457,
0.22145606577396393,
0.20323944091796875,
0.4568885862827301,
0.1693875938653946,
0.05748028680682182,
-0.000699283555150032,
-0.14065110683441162,
-0.037125326693058014,
0.17933231592178345,
-0.301969438791275,
0.15059895813465118,
0.03997023031115532,
0.1964559257030487,
0.0814439132809639,
-0.2706572711467743,
-0.020824894309043884,
-0.29915428161621094,
-0.020320208743214607,
-0.19919146597385406,
0.09521115571260452,
0.29182806611061096,
-0.08355197310447693,
-0.10790826380252838,
0.11641386151313782,
-0.44579848647117615,
0.035215843468904495,
0.25792357325553894,
-0.25360485911369324,
-0.3207924962043762,
0.13972580432891846,
0.12860044836997986,
0.03990073874592781,
-0.052753593772649765,
0.04824134707450867,
-0.022960415109992027,
0.605643093585968,
-0.1394454836845398,
0.13514520227909088,
-0.30968740582466125,
-0.22670523822307587,
-0.016039956361055374,
-0.03327922895550728,
0.10004426538944244,
-0.5333275198936462,
-0.11848396062850952,
0.06361924856901169,
0.19419685006141663,
0.1769787222146988,
0.17553043365478516,
0.18300177156925201,
0.15833355486392975,
0.1335393637418747,
0.26690351963043213,
0.2967287003993988,
-0.3958650529384613,
0.028895145282149315,
0.2807648479938507,
-0.3185533881187439,
-0.1601908802986145,
0.3707810640335083,
-0.21733881533145905,
0.12075082957744598,
-0.10769366472959518,
0.13418026268482208,
0.01133643090724945,
-0.06573685258626938,
0.0960766077041626,
-0.03781455010175705,
-0.07014540582895279,
0.3307214379310608,
-0.018021686002612114,
0.018863702192902565,
-0.11579041182994843,
-0.15686209499835968,
-0.29330527782440186,
0.32436060905456543,
-0.026465358212590218,
0.11641816049814224,
0.13003285229206085,
0.10575670748949051,
0.5420784950256348,
0.12000086903572083,
-0.08322950452566147,
-0.22531455755233765,
0.02838384546339512,
0.31808143854141235,
-0.16832490265369415,
-0.3165954649448395,
-0.17092815041542053,
-0.43260106444358826,
0.048943884670734406,
-0.07522213459014893,
0.04720474034547806,
0.03131404146552086,
0.2542940080165863,
-0.10513302683830261,
-0.12179092317819595,
-0.4117278456687927,
0.29516538977622986,
-0.5749081969261169,
0.2464330643415451,
-0.3180004358291626,
0.07760002464056015,
0.0061798179522156715,
-0.3219509720802307,
-0.250230610370636,
0.15526731312274933,
0.17147192358970642,
-0.011288873851299286,
-0.23743121325969696,
0.665751039981842,
0.34775111079216003,
0.04634353891015053,
-0.37653398513793945,
-0.276981383562088,
-0.108500175178051,
0.241775780916214,
-0.2358047217130661,
-0.13306982815265656,
0.24574708938598633,
-0.041251711547374725,
-0.06281257420778275,
0.2938634753227234,
-0.4202154576778412,
0.5500614643096924,
-0.010936432518064976,
-0.15323637425899506,
0.0020682739559561014,
-0.25750768184661865,
-0.10373639315366745,
-0.3930050730705261,
-0.15055526793003082,
-0.3311614990234375,
0.11401958018541336,
-0.19655688107013702,
-0.18692369759082794,
-0.2932310402393341,
0.6310685276985168,
-0.053683049976825714,
-0.1708039492368698,
0.007796152960509062,
0.13579338788986206,
-0.046647943556308746,
-0.07990380376577377,
0.6231102347373962,
0.49269598722457886,
0.029492277652025223,
-0.10185668617486954,
0.25110870599746704,
0.18718498945236206,
-0.2857355773448944,
0.20482268929481506,
0.26811590790748596,
0.14197352528572083,
0.4111414849758148,
0.24564358592033386,
0.00515506649389863,
-0.22683748602867126,
-0.18386510014533997,
0.3968053460121155,
0.11953702569007874,
-0.49191248416900635,
0.023562610149383545,
-0.16491197049617767,
0.24191883206367493,
-0.20570091903209686,
-0.2267126739025116,
0.18530859053134918,
-0.5442623496055603,
-0.23491768538951874,
0.3472464382648468,
-0.33728885650634766,
0.30510252714157104,
-0.1589924395084381,
-0.39504897594451904,
0.0922144427895546,
-0.16612842679023743,
-0.07192230224609375,
-0.17821159958839417,
-0.08851880580186844,
-0.04583684355020523,
-0.12614640593528748,
-0.09722930192947388,
0.0410270132124424,
-0.16622234880924225,
-0.09439635276794434,
-0.13654237985610962,
-0.2923829257488251,
-0.027404336258769035,
-0.4529353082180023,
-0.00938460323959589,
0.4005087912082672,
0.03668947517871857,
0.18001018464565277,
-0.4637695550918579,
0.22884556651115417,
0.07759498059749603,
-0.02097424678504467,
0.03460121899843216,
0.29294684529304504,
0.006128053646534681,
-0.16404129564762115,
-0.6690230369567871,
-0.27259814739227295,
-0.30424708127975464,
0.13382890820503235,
-0.2729790210723877,
-0.16759924590587616,
0.059672627598047256,
-0.16183799505233765,
0.014235369861125946,
0.17344915866851807,
0.15143659710884094,
-0.021506326273083687,
0.01195759978145361,
0.15038564801216125,
0.014629879966378212,
0.1776953935623169,
0.12653128802776337,
0.18276827037334442,
-0.10115867108106613,
0.05922270193696022,
-0.13647273182868958,
-0.05647867172956467,
-0.09169860184192657,
0.33805322647094727,
0.09302990883588791,
-0.0017819381318986416,
0.2639891505241394,
0.2979952394962311,
-0.03633315488696098,
-0.1717989444732666,
-0.26750120520591736,
0.2465600222349167,
0.05763169750571251,
0.11982299387454987,
0.08033059537410736,
0.6318509578704834,
0.20554150640964508,
0.17527949810028076,
-0.1507173329591751,
-0.07017875462770462,
0.06589403748512268,
-0.0693153440952301,
0.018885178491473198,
-0.19038064777851105,
-0.01434601191431284,
-0.07193171232938766,
-0.37994155287742615,
-0.2754403352737427,
0.09684692323207855,
-0.14041481912136078,
-0.07464245706796646,
-0.03706188127398491,
0.00862946268171072,
0.04368047043681145,
-0.22747687995433807,
-0.05243875831365585,
-0.08824032545089722,
0.42756742238998413,
0.13278886675834656,
0.13907890021800995,
-0.07488766312599182,
-0.0587315559387207,
0.12603244185447693,
0.17999392747879028,
0.12195856124162674,
-0.3082246780395508,
-0.2348092794418335,
0.02789059281349182,
-0.2218737155199051,
0.23117631673812866,
0.3654351830482483,
0.5237160325050354,
0.10950032621622086,
-0.41890910267829895,
0.039125509560108185,
0.12440795451402664,
0.5819940567016602,
-0.2301923632621765,
-0.030865518376231194,
0.1820010095834732,
-0.158254936337471,
0.09986406564712524,
-0.1680947095155716,
-0.20261743664741516,
-0.029728153720498085,
0.26265639066696167,
0.43126198649406433,
-0.08188369125127792,
-0.0455453060567379,
0.5021077990531921,
0.22138671576976776,
-0.0002617431746330112,
-0.20037342607975006,
-0.14440709352493286,
-0.3349115252494812,
-0.24913114309310913,
-0.020763017237186432,
0.05158594623208046,
0.15748116374015808,
0.05140025168657303,
0.3127945363521576,
-0.030131569132208824,
-0.31425729393959045,
0.14049701392650604,
0.2325981855392456,
-0.04283207282423973,
-0.07765969634056091,
0.18954981863498688,
0.055975932627916336,
0.1787736415863037,
0.0804949700832367,
0.23186549544334412,
-0.49864134192466736,
-0.6792059540748596,
-0.08389853686094284,
-0.17330603301525116,
0.4837498068809509,
0.23735976219177246,
-0.2355027049779892,
0.23864418268203735,
-0.06226896867156029,
0.22225475311279297,
-0.10557433217763901,
-0.005489659961313009,
0.38264790177345276,
0.08413184434175491,
-0.31655943393707275,
-0.5406338572502136,
0.34148067235946655,
0.07956404238939285,
-0.08305159211158752,
0.09007635712623596,
0.36659735441207886,
-0.46761205792427063,
0.41900283098220825,
-0.12727077305316925,
0.5394506454467773,
0.17117944359779358,
-0.03420908749103546,
0.4204014241695404,
-0.15845473110675812,
-0.06789207458496094,
-0.06878332793712616,
0.1058088168501854,
-0.3747583329677582,
-0.20323142409324646,
-0.06291421502828598,
0.0981256365776062,
0.44577184319496155,
0.04399118945002556,
-0.023987462744116783,
0.3131876289844513,
-0.037746161222457886,
0.3181697428226471,
-0.01295959111303091,
-0.023680781945586205,
-0.12484346330165863,
-0.28908973932266235,
0.031416572630405426,
0.01702585443854332,
0.05851208046078682,
-0.33078888058662415,
0.34682363271713257,
0.1850597858428955,
-0.04455498978495598,
-0.0068803392350673676,
-0.17967413365840912,
-0.09209620952606201,
-0.03962075710296631,
0.2621529698371887,
-0.07027348130941391,
-0.20682939887046814,
0.2561676502227783,
0.23600143194198608,
0.34552469849586487,
0.1204388365149498,
0.22182351350784302,
0.29013168811798096,
0.05360134690999985,
0.3150191605091095,
0.051092904061079025,
-0.0520142987370491,
0.3549724519252777,
0.255957692861557,
-0.1892664134502411,
-0.12875957787036896,
-0.09706519544124603,
-0.15928885340690613,
-0.13698607683181763,
0.004531032871454954,
0.32540395855903625,
-0.7125180959701538,
-0.27925142645835876,
-0.14634428918361664,
0.007621387951076031,
-0.205714613199234,
0.07022291421890259,
-0.43605008721351624,
-0.321126252412796,
0.042350444942712784,
-0.24731601774692535,
-0.540981113910675,
-0.0410529263317585,
0.27236905694007874,
0.09287799149751663,
0.4236690104007721,
0.6302573084831238,
0.07445196807384491,
-0.11896093934774399,
-0.07692819833755493,
0.28152909874916077,
-0.0017073015915229917,
-0.2372875064611435,
0.3587241768836975,
0.249154195189476,
0.01252604927867651,
0.14215156435966492,
0.0894048660993576,
0.01392354629933834,
0.1374354064464569,
-0.1794731765985489,
-0.2946613132953644,
-0.23643451929092407,
0.03648046776652336,
0.23717686533927917,
0.09858164936304092,
0.18280243873596191,
0.2921201288700104,
-0.4138016998767853,
-0.16716578602790833,
-0.19800512492656708,
-0.06796654313802719,
-0.044537417590618134,
0.33950987458229065,
0.2307615876197815,
0.07579875737428665,
-0.022577377036213875,
-0.16920709609985352,
0.20930074155330658,
0.3660116493701935,
0.3369351625442505,
-0.17018570005893707,
-0.3115434944629669,
0.10452499985694885,
0.08796170353889465,
0.3199939429759979,
-0.268528014421463,
-0.06452828645706177,
-0.16549065709114075,
-0.24329130351543427,
0.13979148864746094,
0.44035935401916504,
0.009370763786137104,
0.6279395818710327,
-0.2326396256685257,
0.06180933117866516,
-0.022113457322120667,
0.19735118746757507,
-0.3701751232147217,
0.13640840351581573,
-0.17789526283740997,
0.3094801604747772,
-0.04631143808364868,
0.19478954374790192,
-0.38712629675865173,
-0.14074565470218658,
-0.1017044186592102,
0.0919172465801239,
0.16246293485164642,
-0.23298820853233337,
0.027549875900149345,
-0.22763915359973907,
0.34214329719543457,
0.5766687989234924,
-0.03660169988870621,
-0.34062352776527405,
0.26014602184295654,
0.09385459870100021,
-0.2149890810251236,
0.26047030091285706,
0.13139884173870087,
-0.34914064407348633,
0.23992188274860382,
0.2198222130537033,
0.02382577769458294,
0.273939847946167,
-0.4158228635787964,
0.09623187780380249,
0.45935848355293274,
-0.23125815391540527,
0.09330794215202332,
0.7471670508384705,
-0.07168804854154587,
0.3275980055332184,
0.2411200851202011,
0.11742394417524338,
-0.14747707545757294,
0.5122220516204834,
0.2956363558769226,
0.33134782314300537,
0.18359538912773132,
0.08737043291330338,
-0.1988353282213211,
-0.044069577008485794,
0.07180219143629074,
0.023314863443374634,
-0.28061607480049133,
-0.00103235081769526,
0.052383147180080414,
0.09938869625329971,
-0.13512887060642242,
0.006386518944054842,
0.07644600421190262,
0.07877839356660843,
-0.08532173186540604,
-0.3726900815963745,
-0.1807306408882141,
-0.07732073962688446,
-0.43519505858421326,
0.010004564188420773,
-0.0010135520715266466,
0.22390732169151306,
0.5572533011436462,
-0.06309990584850311,
0.23308013379573822,
-0.40226438641548157,
-0.12164038419723511,
-0.06716733425855637,
0.3376489579677582,
-0.43629804253578186,
0.04500681534409523,
0.19677580893039703,
0.09785035997629166,
0.34611666202545166,
-0.27364227175712585,
0.3674905002117157,
0.01587086357176304,
-0.031347520649433136,
-0.32783201336860657,
-0.27030545473098755,
-0.14794470369815826,
0.2584282457828522,
0.47701847553253174,
-0.24737589061260223,
0.16012704372406006,
0.34260040521621704,
0.07084955275058746,
-0.02141891047358513,
0.3009721636772156,
0.292106032371521,
0.1484791487455368,
-0.35368603467941284,
0.6270408034324646,
0.03427905961871147,
-0.17250323295593262,
-0.06490062922239304,
0.0291263647377491,
-0.22071169316768646,
0.015346139669418335,
0.49279195070266724,
-0.08570601046085358,
0.2625669836997986,
0.09815168380737305,
0.029404278844594955,
0.20183442533016205,
0.38943353295326233,
0.2932918667793274,
-0.4533608853816986,
-0.05368225276470184,
0.16588124632835388,
-0.34338441491127014,
-0.14135856926441193,
0.10903315246105194,
-0.15238963067531586,
-0.1043180525302887,
-0.26104000210762024,
0.10036937892436981,
-0.03623956814408302,
0.04484174773097038,
0.18436284363269806,
-0.2561531066894531,
0.2380366176366806,
-0.005734613165259361,
-0.3758709728717804,
-0.0841977596282959,
0.020967837423086166,
0.037042759358882904,
-0.3455044627189636,
-0.019041040912270546,
0.4193592071533203,
-0.1062774732708931,
-0.26120638847351074,
-0.11170515418052673,
0.3965735137462616,
0.02120799943804741,
-0.07021427899599075,
0.2049696296453476,
0.5175043344497681,
-0.21314047276973724,
0.11915948987007141,
0.0022135714534670115,
-0.35881438851356506,
-0.4568069577217102,
0.41729867458343506,
-0.07683555781841278,
0.35705700516700745,
0.03739897534251213,
0.012648168951272964,
-0.04935748875141144,
0.10370399057865143,
-0.2392888218164444,
0.03445765748620033,
-0.46730583906173706,
0.031081385910511017,
0.23423822224140167,
0.06496544182300568,
0.13972021639347076,
0.2943553626537323,
0.10556835681200027,
0.4483829438686371,
-0.1242295503616333,
-0.31011155247688293,
0.5607994794845581,
-0.3047521412372589,
-0.6528937816619873,
0.12099136412143707,
-0.17440979182720184,
0.38748276233673096,
0.09591846913099289,
-0.6975603699684143,
-0.10597806423902512,
0.32796937227249146,
-0.09646640717983246,
-0.20878203213214874,
0.1775735467672348,
0.21007947623729706,
-0.022771090269088745,
0.024789903312921524,
0.12183840572834015,
0.043675001710653305,
-0.1834021657705307,
-0.016177956014871597,
-0.07344077527523041
] |
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.0835752859711647,
0.21979939937591553,
-0.03482932224869728,
-0.04238487407565117,
0.42087700963020325,
0.07306195795536041,
0.6438039541244507,
0.41798415780067444,
-0.022552840411663055,
0.339653342962265,
-0.08668669313192368,
0.39780375361442566,
-0.052184779196977615,
0.36443546414375305,
-0.2562587559223175,
-0.2477053999900818,
0.10441403836011887,
-0.07954242080450058,
0.12673655152320862,
0.2697295844554901,
-0.33005279302597046,
0.07780764997005463,
-0.39327746629714966,
0.12606854736804962,
-0.07813375443220139,
0.06238025799393654,
0.03251982480287552,
0.09537691622972488,
0.028275467455387115,
-0.36107733845710754,
0.14411641657352448,
-0.03551042079925537,
0.18996472656726837,
0.5556836724281311,
-0.00011623617319855839,
0.12328136712312698,
0.22254888713359833,
-0.12801754474639893,
-0.18916355073451996,
-0.45284798741340637,
-0.0052787973545491695,
-0.1680363565683365,
0.001736080041155219,
-0.35067638754844666,
0.1707243174314499,
0.22847704589366913,
-0.23099467158317566,
-0.25847917795181274,
0.10060708224773407,
0.36931172013282776,
0.10769011080265045,
0.09653002768754959,
-0.010720264166593552,
0.11912441998720169,
0.10851497203111649,
0.021247539669275284,
-0.3047724962234497,
0.08998321741819382,
-0.07612423598766327,
-0.1792217344045639,
-0.11379048228263855,
0.23175153136253357,
-0.07117687910795212,
0.14804181456565857,
-0.023544447496533394,
0.3106740415096283,
0.034589771181344986,
-0.046964649111032486,
0.08885298669338226,
0.06717992573976517,
0.21446940302848816,
-0.24017827212810516,
-0.46399152278900146,
-0.44429636001586914,
0.16377216577529907,
-0.32501664757728577,
0.2570497691631317,
-0.1877465546131134,
0.12323659658432007,
0.18407472968101501,
-0.1398662030696869,
0.052361875772476196,
-0.13730496168136597,
-0.14063897728919983,
-0.0923045426607132,
0.0893615335226059,
-0.03236202523112297,
0.40946945548057556,
-0.10029321163892746,
-0.11142987012863159,
0.1749086081981659,
0.051333360373973846,
-0.07852023839950562,
-0.13118083775043488,
-0.5019622445106506,
0.027814257889986038,
-0.23024757206439972,
-0.25955820083618164,
-0.3201283812522888,
-0.120002381503582,
0.01583663374185562,
-0.25173133611679077,
0.272678941488266,
0.2164974808692932,
-0.03629773110151291,
0.19965234398841858,
0.13009966909885406,
0.485177606344223,
0.23599664866924286,
0.14029844105243683,
-0.20384696125984192,
-0.09152597188949585,
0.06073421239852905,
-0.2988732159137726,
0.14961737394332886,
0.19085833430290222,
0.13883854448795319,
0.10122472047805786,
-0.42232203483581543,
-0.0214154701679945,
-0.2999313473701477,
-0.18861651420593262,
-0.030533909797668457,
0.22145606577396393,
0.20323944091796875,
0.4568885862827301,
0.1693875938653946,
0.05748028680682182,
-0.000699283555150032,
-0.14065110683441162,
-0.037125326693058014,
0.17933231592178345,
-0.301969438791275,
0.15059895813465118,
0.03997023031115532,
0.1964559257030487,
0.0814439132809639,
-0.2706572711467743,
-0.020824894309043884,
-0.29915428161621094,
-0.020320208743214607,
-0.19919146597385406,
0.09521115571260452,
0.29182806611061096,
-0.08355197310447693,
-0.10790826380252838,
0.11641386151313782,
-0.44579848647117615,
0.035215843468904495,
0.25792357325553894,
-0.25360485911369324,
-0.3207924962043762,
0.13972580432891846,
0.12860044836997986,
0.03990073874592781,
-0.052753593772649765,
0.04824134707450867,
-0.022960415109992027,
0.605643093585968,
-0.1394454836845398,
0.13514520227909088,
-0.30968740582466125,
-0.22670523822307587,
-0.016039956361055374,
-0.03327922895550728,
0.10004426538944244,
-0.5333275198936462,
-0.11848396062850952,
0.06361924856901169,
0.19419685006141663,
0.1769787222146988,
0.17553043365478516,
0.18300177156925201,
0.15833355486392975,
0.1335393637418747,
0.26690351963043213,
0.2967287003993988,
-0.3958650529384613,
0.028895145282149315,
0.2807648479938507,
-0.3185533881187439,
-0.1601908802986145,
0.3707810640335083,
-0.21733881533145905,
0.12075082957744598,
-0.10769366472959518,
0.13418026268482208,
0.01133643090724945,
-0.06573685258626938,
0.0960766077041626,
-0.03781455010175705,
-0.07014540582895279,
0.3307214379310608,
-0.018021686002612114,
0.018863702192902565,
-0.11579041182994843,
-0.15686209499835968,
-0.29330527782440186,
0.32436060905456543,
-0.026465358212590218,
0.11641816049814224,
0.13003285229206085,
0.10575670748949051,
0.5420784950256348,
0.12000086903572083,
-0.08322950452566147,
-0.22531455755233765,
0.02838384546339512,
0.31808143854141235,
-0.16832490265369415,
-0.3165954649448395,
-0.17092815041542053,
-0.43260106444358826,
0.048943884670734406,
-0.07522213459014893,
0.04720474034547806,
0.03131404146552086,
0.2542940080165863,
-0.10513302683830261,
-0.12179092317819595,
-0.4117278456687927,
0.29516538977622986,
-0.5749081969261169,
0.2464330643415451,
-0.3180004358291626,
0.07760002464056015,
0.0061798179522156715,
-0.3219509720802307,
-0.250230610370636,
0.15526731312274933,
0.17147192358970642,
-0.011288873851299286,
-0.23743121325969696,
0.665751039981842,
0.34775111079216003,
0.04634353891015053,
-0.37653398513793945,
-0.276981383562088,
-0.108500175178051,
0.241775780916214,
-0.2358047217130661,
-0.13306982815265656,
0.24574708938598633,
-0.041251711547374725,
-0.06281257420778275,
0.2938634753227234,
-0.4202154576778412,
0.5500614643096924,
-0.010936432518064976,
-0.15323637425899506,
0.0020682739559561014,
-0.25750768184661865,
-0.10373639315366745,
-0.3930050730705261,
-0.15055526793003082,
-0.3311614990234375,
0.11401958018541336,
-0.19655688107013702,
-0.18692369759082794,
-0.2932310402393341,
0.6310685276985168,
-0.053683049976825714,
-0.1708039492368698,
0.007796152960509062,
0.13579338788986206,
-0.046647943556308746,
-0.07990380376577377,
0.6231102347373962,
0.49269598722457886,
0.029492277652025223,
-0.10185668617486954,
0.25110870599746704,
0.18718498945236206,
-0.2857355773448944,
0.20482268929481506,
0.26811590790748596,
0.14197352528572083,
0.4111414849758148,
0.24564358592033386,
0.00515506649389863,
-0.22683748602867126,
-0.18386510014533997,
0.3968053460121155,
0.11953702569007874,
-0.49191248416900635,
0.023562610149383545,
-0.16491197049617767,
0.24191883206367493,
-0.20570091903209686,
-0.2267126739025116,
0.18530859053134918,
-0.5442623496055603,
-0.23491768538951874,
0.3472464382648468,
-0.33728885650634766,
0.30510252714157104,
-0.1589924395084381,
-0.39504897594451904,
0.0922144427895546,
-0.16612842679023743,
-0.07192230224609375,
-0.17821159958839417,
-0.08851880580186844,
-0.04583684355020523,
-0.12614640593528748,
-0.09722930192947388,
0.0410270132124424,
-0.16622234880924225,
-0.09439635276794434,
-0.13654237985610962,
-0.2923829257488251,
-0.027404336258769035,
-0.4529353082180023,
-0.00938460323959589,
0.4005087912082672,
0.03668947517871857,
0.18001018464565277,
-0.4637695550918579,
0.22884556651115417,
0.07759498059749603,
-0.02097424678504467,
0.03460121899843216,
0.29294684529304504,
0.006128053646534681,
-0.16404129564762115,
-0.6690230369567871,
-0.27259814739227295,
-0.30424708127975464,
0.13382890820503235,
-0.2729790210723877,
-0.16759924590587616,
0.059672627598047256,
-0.16183799505233765,
0.014235369861125946,
0.17344915866851807,
0.15143659710884094,
-0.021506326273083687,
0.01195759978145361,
0.15038564801216125,
0.014629879966378212,
0.1776953935623169,
0.12653128802776337,
0.18276827037334442,
-0.10115867108106613,
0.05922270193696022,
-0.13647273182868958,
-0.05647867172956467,
-0.09169860184192657,
0.33805322647094727,
0.09302990883588791,
-0.0017819381318986416,
0.2639891505241394,
0.2979952394962311,
-0.03633315488696098,
-0.1717989444732666,
-0.26750120520591736,
0.2465600222349167,
0.05763169750571251,
0.11982299387454987,
0.08033059537410736,
0.6318509578704834,
0.20554150640964508,
0.17527949810028076,
-0.1507173329591751,
-0.07017875462770462,
0.06589403748512268,
-0.0693153440952301,
0.018885178491473198,
-0.19038064777851105,
-0.01434601191431284,
-0.07193171232938766,
-0.37994155287742615,
-0.2754403352737427,
0.09684692323207855,
-0.14041481912136078,
-0.07464245706796646,
-0.03706188127398491,
0.00862946268171072,
0.04368047043681145,
-0.22747687995433807,
-0.05243875831365585,
-0.08824032545089722,
0.42756742238998413,
0.13278886675834656,
0.13907890021800995,
-0.07488766312599182,
-0.0587315559387207,
0.12603244185447693,
0.17999392747879028,
0.12195856124162674,
-0.3082246780395508,
-0.2348092794418335,
0.02789059281349182,
-0.2218737155199051,
0.23117631673812866,
0.3654351830482483,
0.5237160325050354,
0.10950032621622086,
-0.41890910267829895,
0.039125509560108185,
0.12440795451402664,
0.5819940567016602,
-0.2301923632621765,
-0.030865518376231194,
0.1820010095834732,
-0.158254936337471,
0.09986406564712524,
-0.1680947095155716,
-0.20261743664741516,
-0.029728153720498085,
0.26265639066696167,
0.43126198649406433,
-0.08188369125127792,
-0.0455453060567379,
0.5021077990531921,
0.22138671576976776,
-0.0002617431746330112,
-0.20037342607975006,
-0.14440709352493286,
-0.3349115252494812,
-0.24913114309310913,
-0.020763017237186432,
0.05158594623208046,
0.15748116374015808,
0.05140025168657303,
0.3127945363521576,
-0.030131569132208824,
-0.31425729393959045,
0.14049701392650604,
0.2325981855392456,
-0.04283207282423973,
-0.07765969634056091,
0.18954981863498688,
0.055975932627916336,
0.1787736415863037,
0.0804949700832367,
0.23186549544334412,
-0.49864134192466736,
-0.6792059540748596,
-0.08389853686094284,
-0.17330603301525116,
0.4837498068809509,
0.23735976219177246,
-0.2355027049779892,
0.23864418268203735,
-0.06226896867156029,
0.22225475311279297,
-0.10557433217763901,
-0.005489659961313009,
0.38264790177345276,
0.08413184434175491,
-0.31655943393707275,
-0.5406338572502136,
0.34148067235946655,
0.07956404238939285,
-0.08305159211158752,
0.09007635712623596,
0.36659735441207886,
-0.46761205792427063,
0.41900283098220825,
-0.12727077305316925,
0.5394506454467773,
0.17117944359779358,
-0.03420908749103546,
0.4204014241695404,
-0.15845473110675812,
-0.06789207458496094,
-0.06878332793712616,
0.1058088168501854,
-0.3747583329677582,
-0.20323142409324646,
-0.06291421502828598,
0.0981256365776062,
0.44577184319496155,
0.04399118945002556,
-0.023987462744116783,
0.3131876289844513,
-0.037746161222457886,
0.3181697428226471,
-0.01295959111303091,
-0.023680781945586205,
-0.12484346330165863,
-0.28908973932266235,
0.031416572630405426,
0.01702585443854332,
0.05851208046078682,
-0.33078888058662415,
0.34682363271713257,
0.1850597858428955,
-0.04455498978495598,
-0.0068803392350673676,
-0.17967413365840912,
-0.09209620952606201,
-0.03962075710296631,
0.2621529698371887,
-0.07027348130941391,
-0.20682939887046814,
0.2561676502227783,
0.23600143194198608,
0.34552469849586487,
0.1204388365149498,
0.22182351350784302,
0.29013168811798096,
0.05360134690999985,
0.3150191605091095,
0.051092904061079025,
-0.0520142987370491,
0.3549724519252777,
0.255957692861557,
-0.1892664134502411,
-0.12875957787036896,
-0.09706519544124603,
-0.15928885340690613,
-0.13698607683181763,
0.004531032871454954,
0.32540395855903625,
-0.7125180959701538,
-0.27925142645835876,
-0.14634428918361664,
0.007621387951076031,
-0.205714613199234,
0.07022291421890259,
-0.43605008721351624,
-0.321126252412796,
0.042350444942712784,
-0.24731601774692535,
-0.540981113910675,
-0.0410529263317585,
0.27236905694007874,
0.09287799149751663,
0.4236690104007721,
0.6302573084831238,
0.07445196807384491,
-0.11896093934774399,
-0.07692819833755493,
0.28152909874916077,
-0.0017073015915229917,
-0.2372875064611435,
0.3587241768836975,
0.249154195189476,
0.01252604927867651,
0.14215156435966492,
0.0894048660993576,
0.01392354629933834,
0.1374354064464569,
-0.1794731765985489,
-0.2946613132953644,
-0.23643451929092407,
0.03648046776652336,
0.23717686533927917,
0.09858164936304092,
0.18280243873596191,
0.2921201288700104,
-0.4138016998767853,
-0.16716578602790833,
-0.19800512492656708,
-0.06796654313802719,
-0.044537417590618134,
0.33950987458229065,
0.2307615876197815,
0.07579875737428665,
-0.022577377036213875,
-0.16920709609985352,
0.20930074155330658,
0.3660116493701935,
0.3369351625442505,
-0.17018570005893707,
-0.3115434944629669,
0.10452499985694885,
0.08796170353889465,
0.3199939429759979,
-0.268528014421463,
-0.06452828645706177,
-0.16549065709114075,
-0.24329130351543427,
0.13979148864746094,
0.44035935401916504,
0.009370763786137104,
0.6279395818710327,
-0.2326396256685257,
0.06180933117866516,
-0.022113457322120667,
0.19735118746757507,
-0.3701751232147217,
0.13640840351581573,
-0.17789526283740997,
0.3094801604747772,
-0.04631143808364868,
0.19478954374790192,
-0.38712629675865173,
-0.14074565470218658,
-0.1017044186592102,
0.0919172465801239,
0.16246293485164642,
-0.23298820853233337,
0.027549875900149345,
-0.22763915359973907,
0.34214329719543457,
0.5766687989234924,
-0.03660169988870621,
-0.34062352776527405,
0.26014602184295654,
0.09385459870100021,
-0.2149890810251236,
0.26047030091285706,
0.13139884173870087,
-0.34914064407348633,
0.23992188274860382,
0.2198222130537033,
0.02382577769458294,
0.273939847946167,
-0.4158228635787964,
0.09623187780380249,
0.45935848355293274,
-0.23125815391540527,
0.09330794215202332,
0.7471670508384705,
-0.07168804854154587,
0.3275980055332184,
0.2411200851202011,
0.11742394417524338,
-0.14747707545757294,
0.5122220516204834,
0.2956363558769226,
0.33134782314300537,
0.18359538912773132,
0.08737043291330338,
-0.1988353282213211,
-0.044069577008485794,
0.07180219143629074,
0.023314863443374634,
-0.28061607480049133,
-0.00103235081769526,
0.052383147180080414,
0.09938869625329971,
-0.13512887060642242,
0.006386518944054842,
0.07644600421190262,
0.07877839356660843,
-0.08532173186540604,
-0.3726900815963745,
-0.1807306408882141,
-0.07732073962688446,
-0.43519505858421326,
0.010004564188420773,
-0.0010135520715266466,
0.22390732169151306,
0.5572533011436462,
-0.06309990584850311,
0.23308013379573822,
-0.40226438641548157,
-0.12164038419723511,
-0.06716733425855637,
0.3376489579677582,
-0.43629804253578186,
0.04500681534409523,
0.19677580893039703,
0.09785035997629166,
0.34611666202545166,
-0.27364227175712585,
0.3674905002117157,
0.01587086357176304,
-0.031347520649433136,
-0.32783201336860657,
-0.27030545473098755,
-0.14794470369815826,
0.2584282457828522,
0.47701847553253174,
-0.24737589061260223,
0.16012704372406006,
0.34260040521621704,
0.07084955275058746,
-0.02141891047358513,
0.3009721636772156,
0.292106032371521,
0.1484791487455368,
-0.35368603467941284,
0.6270408034324646,
0.03427905961871147,
-0.17250323295593262,
-0.06490062922239304,
0.0291263647377491,
-0.22071169316768646,
0.015346139669418335,
0.49279195070266724,
-0.08570601046085358,
0.2625669836997986,
0.09815168380737305,
0.029404278844594955,
0.20183442533016205,
0.38943353295326233,
0.2932918667793274,
-0.4533608853816986,
-0.05368225276470184,
0.16588124632835388,
-0.34338441491127014,
-0.14135856926441193,
0.10903315246105194,
-0.15238963067531586,
-0.1043180525302887,
-0.26104000210762024,
0.10036937892436981,
-0.03623956814408302,
0.04484174773097038,
0.18436284363269806,
-0.2561531066894531,
0.2380366176366806,
-0.005734613165259361,
-0.3758709728717804,
-0.0841977596282959,
0.020967837423086166,
0.037042759358882904,
-0.3455044627189636,
-0.019041040912270546,
0.4193592071533203,
-0.1062774732708931,
-0.26120638847351074,
-0.11170515418052673,
0.3965735137462616,
0.02120799943804741,
-0.07021427899599075,
0.2049696296453476,
0.5175043344497681,
-0.21314047276973724,
0.11915948987007141,
0.0022135714534670115,
-0.35881438851356506,
-0.4568069577217102,
0.41729867458343506,
-0.07683555781841278,
0.35705700516700745,
0.03739897534251213,
0.012648168951272964,
-0.04935748875141144,
0.10370399057865143,
-0.2392888218164444,
0.03445765748620033,
-0.46730583906173706,
0.031081385910511017,
0.23423822224140167,
0.06496544182300568,
0.13972021639347076,
0.2943553626537323,
0.10556835681200027,
0.4483829438686371,
-0.1242295503616333,
-0.31011155247688293,
0.5607994794845581,
-0.3047521412372589,
-0.6528937816619873,
0.12099136412143707,
-0.17440979182720184,
0.38748276233673096,
0.09591846913099289,
-0.6975603699684143,
-0.10597806423902512,
0.32796937227249146,
-0.09646640717983246,
-0.20878203213214874,
0.1775735467672348,
0.21007947623729706,
-0.022771090269088745,
0.024789903312921524,
0.12183840572834015,
0.043675001710653305,
-0.1834021657705307,
-0.016177956014871597,
-0.07344077527523041
] |
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.07485474646091461,
-0.14697182178497314,
0.05617265775799751,
0.7758012413978577,
0.2905219793319702,
0.32138413190841675,
-0.23171839118003845,
0.1311902552843094,
0.1942947804927826,
0.1316707581281662,
-0.15026943385601044,
0.06683548539876938,
0.23899391293525696,
0.20337438583374023,
0.13799861073493958,
0.23944874107837677,
0.40925195813179016,
-0.10221715271472931,
-0.29691430926322937,
-0.0024891216307878494,
-0.05713991820812225,
0.20132076740264893,
0.23924408853054047,
-0.04750863090157509,
-0.3708270192146301,
-0.1665404587984085,
0.08654258400201797,
0.33701008558273315,
-0.04578736796975136,
-0.3307516574859619,
0.1703149974346161,
0.25001826882362366,
-0.2806945741176605,
0.39975181221961975,
-0.00013223481073509902,
-0.2780960500240326,
0.06549128144979477,
-0.11208957433700562,
-0.480729877948761,
0.3449932336807251,
-0.21468321979045868,
0.10562034696340561,
0.18325617909431458,
-0.05147445574402809,
0.01807570829987526,
0.030572382733225822,
-0.04486842080950737,
-0.27717745304107666,
0.4946138560771942,
-0.14180897176265717,
0.009972275234758854,
0.29398930072784424,
0.054079100489616394,
0.1705435961484909,
-0.0891117975115776,
0.35200706124305725,
-0.17303290963172913,
0.2473769187927246,
-0.05670866370201111,
-0.04223672300577164,
-0.1335354596376419,
0.32717815041542053,
-0.19429224729537964,
-0.22153161466121674,
0.4750732183456421,
0.16707830131053925,
-0.22610880434513092,
-0.1015612855553627,
0.14168018102645874,
0.030004577711224556,
0.24046531319618225,
-0.44137337803840637,
-0.49014225602149963,
-0.4094579219818115,
-0.16263383626937866,
-0.26228049397468567,
0.48295679688453674,
0.11492945998907089,
0.023763298988342285,
0.2698066830635071,
-0.6267794966697693,
-0.382241815328598,
-0.07521257549524307,
0.10468510538339615,
0.2587687075138092,
-0.6426107287406921,
-0.29622018337249756,
-0.020289523527026176,
0.09609721601009369,
-0.026915360242128372,
-0.25181838870048523,
-0.2842935621738434,
-0.4094386696815491,
0.20436467230319977,
-0.2804294228553772,
-0.17062199115753174,
-0.03651200979948044,
0.6992859840393066,
0.3096769154071808,
0.026673264801502228,
0.1539708524942398,
-0.026879411190748215,
-0.38285043835639954,
0.0570359081029892,
0.4450926184654236,
0.18410956859588623,
-0.15103426575660706,
-0.30386343598365784,
0.19378311932086945,
0.2487015724182129,
0.19340309500694275,
-0.12793704867362976,
0.6235290169715881,
0.06540368497371674,
0.31581029295921326,
-0.2794090807437897,
0.10270245373249054,
-0.42677542567253113,
-0.158187597990036,
0.22385480999946594,
0.11368457973003387,
0.1270824670791626,
0.15182556211948395,
0.2743179500102997,
-0.20324717462062836,
0.23887597024440765,
-0.17414331436157227,
0.23081637918949127,
-0.11128339171409607,
-0.16446910798549652,
-0.2411804348230362,
0.020055163651704788,
-0.10284028202295303,
0.4697912335395813,
0.3572983741760254,
-0.2158573716878891,
0.15554067492485046,
0.14887984097003937,
-0.2194770723581314,
-0.2177106738090515,
-0.14139629900455475,
-0.17308901250362396,
0.2110489457845688,
0.20017516613006592,
-0.078401580452919,
0.2614494264125824,
0.04421418905258179,
0.18134360015392303,
-0.10440901666879654,
-0.01674913614988327,
-0.30258119106292725,
-0.16533365845680237,
0.23714320361614227,
-0.009331046603620052,
-0.31375107169151306,
-0.020430298522114754,
-0.38331180810928345,
-0.04067690670490265,
0.37340399622917175,
-0.06066085398197174,
0.22709789872169495,
0.3761093020439148,
-0.4323393404483795,
-0.21262690424919128,
0.118698850274086,
0.7272849082946777,
-0.07770102471113205,
-0.18090447783470154,
0.3380313217639923,
-0.06770540028810501,
-0.0976458191871643,
0.49556705355644226,
-0.0461680069565773,
0.12403996288776398,
-0.1751255989074707,
-0.00005368539859773591,
0.09213484078645706,
-0.4036756157875061,
-0.5119618773460388,
-0.0031915828585624695,
0.24356789886951447,
0.18149486184120178,
0.08188453316688538,
0.17039738595485687,
0.027678431943058968,
-0.20803409814834595,
-0.30214324593544006,
0.24575257301330566,
0.05719796568155289,
0.10074183344841003,
-0.24728848040103912,
-0.21501265466213226,
0.08342085033655167,
-0.044438257813453674,
-0.35684534907341003,
0.4231316149234772,
-0.0431622751057148,
-0.03453901410102844,
0.029222145676612854,
-0.0048337229527533054,
0.20217733085155487,
0.32845595479011536,
0.2372107356786728,
0.1297818422317505,
0.023876497521996498,
0.07289144396781921,
-0.44573667645454407,
0.12064988166093826,
0.08236905932426453,
-0.2579560875892639,
-0.03352143615484238,
-0.2511536777019501,
-0.021194886416196823,
0.13511191308498383,
-0.0782659575343132,
0.11930776387453079,
-0.09831651300191879,
-0.03230541944503784,
0.2460305541753769,
0.17170502245426178,
-0.2977084219455719,
0.864534318447113,
0.06487645953893661,
0.2302660495042801,
-0.546005129814148,
-0.06536829471588135,
0.12761732935905457,
-0.09124133735895157,
-0.32070884108543396,
-0.14510387182235718,
0.1751982569694519,
-0.21266399323940277,
-0.08147655427455902,
0.6701143383979797,
-0.017503848299384117,
0.41554325819015503,
0.038986317813396454,
0.35045120120048523,
0.2606140375137329,
0.17641352117061615,
-0.03858267143368721,
-0.011305293068289757,
0.19531084597110748,
0.003096136264503002,
-0.20791679620742798,
0.23237361013889313,
0.040125153958797455,
-0.05960185080766678,
-0.05956275388598442,
-0.11374718695878983,
0.16191673278808594,
-0.18463319540023804,
0.020550807937979698,
-0.31816333532333374,
-0.03802371770143509,
-0.20648778975009918,
0.291706919670105,
-0.023801060393452644,
-0.38078659772872925,
0.1157950833439827,
0.24473053216934204,
0.02472260780632496,
0.03209388628602028,
-0.00013692818174604326,
-0.019897473976016045,
-0.3366125226020813,
0.041021060198545456,
0.25404801964759827,
0.5070414543151855,
-0.08930423110723495,
0.06459585577249527,
0.028731519356369972,
0.0835927203297615,
-0.06301092356443405,
0.14695125818252563,
0.037238214164972305,
0.07628364115953445,
0.11653121560811996,
0.027034422382712364,
-0.00398335512727499,
-0.45549649000167847,
0.4673795998096466,
-0.12039028853178024,
0.13107435405254364,
-0.4288458824157715,
0.3027193248271942,
-0.07545734196901321,
-0.18272437155246735,
-0.04894770681858063,
0.019472992047667503,
-0.358630508184433,
-0.25531795620918274,
0.12005673348903656,
0.7634334564208984,
0.009685808792710304,
-0.034359488636255264,
-0.09738566726446152,
0.6595609784126282,
-0.13742542266845703,
0.16373243927955627,
-0.5104169845581055,
0.08529306948184967,
-0.11503705382347107,
-0.20062381029129028,
0.13179396092891693,
-0.2283475697040558,
0.336062490940094,
-0.2017660140991211,
-0.11695212870836258,
-0.3274320065975189,
0.16139863431453705,
0.16729547083377838,
0.15272679924964905,
0.16049544513225555,
-0.030452121049165726,
0.13650064170360565,
-0.04917781427502632,
0.2691923677921295,
0.026231350377202034,
-0.23777927458286285,
-0.2840474247932434,
0.040584150701761246,
0.13417185842990875,
0.038881897926330566,
-0.1139049082994461,
0.3498012125492096,
-0.032940544188022614,
-0.05417453497648239,
0.2562650144100189,
-0.16043917834758759,
0.04469776526093483,
0.14429113268852234,
0.05146351456642151,
-0.11741595715284348,
-0.2412375509738922,
0.09536916017532349,
-0.3460170328617096,
-0.8206092715263367,
0.32713955640792847,
0.018704716116189957,
-0.24292346835136414,
0.17734162509441376,
0.4334365427494049,
-0.06862523406744003,
0.2557429373264313,
-0.4300450086593628,
-0.32363468408584595,
-0.1416158229112625,
-0.1264074742794037,
-0.23158276081085205,
0.020772702991962433,
0.111052967607975,
0.10768050700426102,
0.029178453609347343,
-0.04604826867580414,
-0.20067550241947174,
0.2317097932100296,
-0.03162805363535881,
0.46529027819633484,
-0.1587827205657959,
0.2857140898704529,
0.1445433646440506,
0.16522707045078278,
0.047415487468242645,
0.08712855726480484,
0.5161064863204956,
0.1988772451877594,
0.7607294917106628,
-0.09009251743555069,
-0.18151694536209106,
-0.3419685661792755,
-0.2872554659843445,
-0.14737099409103394,
-0.0324975959956646,
0.22556649148464203,
0.2973238527774811,
-0.08421768993139267,
0.038037851452827454,
-0.14435505867004395,
-0.2730960547924042,
-0.12767212092876434,
0.046287644654512405,
0.19490008056163788,
-0.011085208505392075,
0.06302352249622345,
0.009693073108792305,
-0.25212740898132324,
0.17205750942230225,
0.309834748506546,
0.3786351978778839,
0.055716622620821,
-0.36700525879859924,
0.05773931369185448,
-0.291866660118103,
0.07476302236318588,
-0.37159445881843567,
0.20762237906455994,
-0.1661170870065689,
0.0529630072414875,
0.13803927600383759,
-0.11513867229223251,
1.0467966794967651,
0.059348538517951965,
0.204345703125,
-0.18691496551036835,
-0.3095420002937317,
-0.0777507871389389,
0.06915886700153351,
0.016184085980057716,
0.26117220520973206,
0.05951472371816635,
0.6162328720092773,
-0.1501958966255188,
-0.4283815622329712,
-0.06706046313047409,
0.21218325197696686,
-0.35200339555740356,
-0.11926020681858063,
-0.029030924662947655,
-0.00922337919473648,
-0.1950489580631256,
-0.12640708684921265,
-0.053211577236652374,
-0.03260787948966026,
0.07090365886688232,
0.17604783177375793,
-0.18670989573001862,
0.13014058768749237,
0.08166579902172089,
-0.06648217141628265,
0.40747225284576416,
-0.06748800724744797,
0.12420275807380676,
0.07306164503097534,
0.24560146033763885,
0.1384439915418625,
0.23809930682182312,
0.19989238679409027,
-0.19746443629264832,
-0.13809455931186676,
0.22152306139469147,
-0.019641069695353508,
0.3996661305427551,
-0.15747855603694916,
-0.058996204286813736,
0.1405603140592575,
-0.11382514983415604,
-0.3557964265346527,
0.1030612662434578,
0.06608333438634872,
0.049211256206035614,
-0.3060366213321686,
-0.0036100817378610373,
0.26064833998680115,
0.1160128116607666,
-0.04040572792291641,
-0.1814967691898346,
0.19624745845794678,
-0.37678369879722595,
0.2850164771080017,
0.22179852426052094,
1.1114583015441895,
-0.0965869203209877,
0.44672784209251404,
-0.019025027751922607,
-0.1858024001121521,
0.48884493112564087,
-0.4004945456981659,
0.06978028267621994,
-0.3076687455177307,
0.07054435461759567,
-0.23818476498126984,
-0.09948211908340454,
0.011401091702282429,
0.05420558527112007,
-0.026403792202472687,
0.35003742575645447,
-0.312545508146286,
0.3876652717590332,
-0.2943257689476013,
-0.030239243060350418,
-0.2995471954345703,
-0.45650795102119446,
-0.15429626405239105,
0.009506923146545887,
-0.12278411537408829,
0.06942331045866013,
0.09243006259202957,
-0.13524261116981506,
-0.07313913106918335,
0.031023526564240456,
-0.07559514045715332,
0.0435001440346241,
-0.11272559314966202,
0.046867236495018005,
0.10025180876255035,
-0.1901458203792572,
-0.1807045191526413,
0.4376669228076935,
0.5001235008239746,
0.020976461470127106,
-0.24492000043392181,
0.011641386896371841,
-0.2824944257736206,
0.025380508974194527,
-0.15005004405975342,
0.13428276777267456,
0.2004399448633194,
0.08599919080734253,
0.1513374149799347,
-0.15904413163661957,
-0.07975780963897705,
-0.11970441788434982,
-0.04146992415189743,
-0.09373189508914948,
-0.111353799700737,
-0.41458404064178467,
-0.4675276577472687,
-0.05415469780564308,
0.2668152451515198,
-0.14065882563591003,
-0.002448843326419592,
0.3070693910121918,
-0.01843671128153801,
0.07864542305469513,
-0.3082565665245056,
-0.1136913076043129,
-0.1069943830370903,
0.6052974462509155,
-0.02387816645205021,
-0.17463985085487366,
0.28373584151268005,
-0.23771695792675018,
-0.07940753549337387,
-0.17190037667751312,
-0.14769995212554932,
0.19233636558055878,
-0.48845401406288147,
0.06624937802553177,
0.06311003118753433,
-0.07605123519897461,
-0.37015455961227417,
-0.12715359032154083,
0.09420517086982727,
-0.13519303500652313,
0.02517029643058777,
-0.1850658655166626,
-0.40533408522605896,
0.09118187427520752,
0.4046015441417694,
0.26756542921066284,
0.1915951371192932,
-0.2586055099964142,
-0.3346118628978729,
0.008308006450533867,
-0.11360950022935867,
0.02933833934366703,
-0.07233446091413498,
-0.1758127063512802,
0.4042057394981384,
0.1595689058303833,
0.36287328600883484,
-0.3410281240940094,
-0.13444383442401886,
-0.08284227550029755,
-0.28985831141471863,
-0.05243910476565361,
-0.06711233407258987,
0.22080817818641663,
0.128653421998024,
-0.24249328672885895,
-0.07857125252485275,
-0.0933791846036911,
0.11156189441680908,
-0.22091881930828094,
0.1932239830493927,
0.3436003625392914,
0.08919525146484375,
0.09133006632328033,
-0.040627382695674896,
0.38025927543640137,
0.056800637394189835,
-0.11131392419338226,
0.15127621591091156,
0.15281666815280914,
-0.039967190474271774,
0.009917940013110638,
-0.3080691695213318,
-0.2685753107070923,
-0.2312733381986618,
0.13765496015548706,
0.3123864233493805,
0.02861156314611435,
0.06965526938438416,
-0.2291846126317978,
-0.19856177270412445,
0.17940130829811096,
0.4456973373889923,
0.3498792350292206,
-0.15618082880973816,
-0.1637624353170395,
0.2775179445743561,
-0.034301094710826874,
0.22831226885318756,
-0.2759069502353668,
0.3110443651676178,
-0.14429433643817902,
-0.21815267205238342,
0.21949133276939392,
0.14577524363994598,
0.0894242450594902,
0.1508740335702896,
-0.015993710607290268,
0.5966027975082397,
0.16353587806224823,
0.1562795639038086,
-0.033190373331308365,
-0.1755576878786087,
0.28588277101516724,
0.2703326344490051,
0.2711174786090851,
0.054309576749801636,
0.22974038124084473,
0.18294468522071838,
0.258928120136261,
-0.004606533795595169,
0.15493710339069366,
-0.28515687584877014,
-0.33974218368530273,
0.1565561443567276,
0.12722623348236084,
-0.19174689054489136,
0.2534335255622864,
0.007706279866397381,
0.5218214988708496,
-0.03363940119743347,
-0.5268297791481018,
-0.2592499852180481,
0.31499120593070984,
-0.23930561542510986,
-0.19209840893745422,
0.15738984942436218,
-0.04093907028436661,
0.3146926760673523,
0.300905704498291,
-0.18446092307567596,
-0.21950973570346832,
0.34855908155441284,
-0.036061666905879974,
-0.02185654453933239,
-0.18287687003612518,
-0.09299520403146744,
0.16651798784732819,
0.19115592539310455,
-0.03523600101470947,
-0.0829482451081276,
-0.1525171399116516,
0.011723765172064304,
-0.22916507720947266,
0.3340146243572235,
0.09440744668245316,
0.16145512461662292,
0.2619742155075073,
0.12462250888347626,
0.041186098009347916,
0.049162156879901886,
0.10890083014965057,
0.12432125955820084,
-0.13171331584453583,
-0.24391786754131317,
0.13014809787273407,
-0.10438721626996994,
0.08130570501089096,
-0.03056027740240097,
0.0009521705214865506,
0.5091179013252258,
-0.18644343316555023,
-0.1353563666343689,
-0.15051764249801636,
-0.04994679242372513,
-0.12390945851802826,
0.04327483847737312,
-0.23066844046115875,
-0.0394359789788723,
0.3530197739601135,
-0.09094156324863434,
0.09348641335964203,
-0.08407148718833923,
-0.021162163466215134,
0.13853880763053894,
0.6743152737617493,
0.31105953454971313,
-0.26369017362594604,
-0.17818820476531982,
0.05582905560731888,
-0.3784160017967224,
0.1127922534942627,
0.14909756183624268,
0.2689664959907532,
-0.2375582605600357,
0.09250476211309433,
-0.20277105271816254,
0.19090436398983002,
0.01639130897819996,
-0.22666685283184052,
-0.04087838903069496,
0.238892063498497,
-0.03393249586224556,
-0.10323027521371841,
-0.06015896797180176,
0.09454131126403809,
0.09010636806488037,
-0.10533594340085983,
0.4479224979877472,
0.2539941072463989,
-0.08849943429231644,
0.10335040092468262,
0.23871630430221558,
-0.6483798623085022,
-0.009517468512058258,
0.31086549162864685,
0.32986128330230713,
-0.16112364828586578,
0.07239022105932236,
-0.13246700167655945,
-0.047459740191698074,
-0.1372133493423462,
-0.1552099883556366,
-0.08791936188936234,
-0.06725854426622391,
0.2128995954990387,
-0.30414125323295593,
-0.0716678723692894,
-0.28155040740966797,
0.2846008539199829,
0.10855962336063385,
-0.1737360954284668,
-0.11527809500694275,
0.1978369951248169,
0.1536780446767807,
-0.009853181429207325,
0.3255878686904907,
0.2880614399909973,
-0.10771196335554123,
0.4771922528743744,
-0.5032346844673157,
0.1247444823384285,
0.3944433331489563,
-0.18707406520843506,
-0.022914474830031395,
0.16464205086231232,
0.25167179107666016,
0.48099616169929504,
-0.5691511631011963,
-0.6756883859634399,
0.011508245952427387,
-0.038502950221300125,
-0.19430233538150787,
-0.27860227227211,
0.5799129605293274,
-0.4410840570926666,
-0.12323155254125595,
0.004527616780251265,
0.6662642955780029,
0.3753521740436554,
-0.11917328089475632,
0.33227601647377014,
-0.09271756559610367
] |
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.3429025113582611,
-0.07095760107040405,
-0.2234124094247818,
0.1322251558303833,
0.0014155005337670445,
0.12123461067676544,
0.014974541030824184,
-0.4329249858856201,
0.1663283258676529,
0.010384000837802887,
-0.050456199795007706,
0.14463484287261963,
0.20273847877979279,
0.07673275470733643,
-0.062212374061346054,
0.2159232497215271,
-0.11128251254558563,
0.009495491161942482,
-0.38771960139274597,
-0.09594681859016418,
0.040785908699035645,
0.052570097148418427,
-0.46425676345825195,
-0.04451500251889229,
0.0981033593416214,
-0.12982751429080963,
0.007910148240625858,
-0.4901852607727051,
-0.4163925051689148,
0.36519429087638855,
-0.03290499746799469,
-0.042988065630197525,
0.4762800633907318,
-0.00011294061550870538,
-0.015029707923531532,
0.33860018849372864,
0.0055785938166081905,
-0.19534419476985931,
-0.2580166757106781,
-0.4318864643573761,
-0.4034751057624817,
-0.003309352323412895,
0.22230911254882812,
-0.18756312131881714,
0.06526679545640945,
0.17415666580200195,
0.09764602035284042,
0.19493694603443146,
0.14454291760921478,
0.22383715212345123,
0.20493781566619873,
0.2905164957046509,
-0.4031757116317749,
0.13698723912239075,
0.3619070053100586,
-0.22849169373512268,
0.6680122017860413,
0.2545556426048279,
0.48735085129737854,
0.07013659179210663,
0.1429862529039383,
0.31439489126205444,
-0.15017469227313995,
0.27161893248558044,
0.000799234549049288,
0.08263979107141495,
-0.19877088069915771,
0.003030697349458933,
0.19265694916248322,
0.6094881892204285,
0.12202668935060501,
-0.5760817527770996,
-0.1504710465669632,
-0.015856433659791946,
-0.290819376707077,
0.006096513941884041,
0.15176548063755035,
-0.01270512118935585,
0.11869794130325317,
-0.2797864079475403,
-0.5576731562614441,
-0.1758413463830948,
0.32028940320014954,
0.21982894837856293,
0.28377360105514526,
-0.15869015455245972,
-0.05961199477314949,
0.11483504623174667,
0.15833495557308197,
-0.3049240708351135,
0.2595873177051544,
-0.1861923485994339,
0.04995504766702652,
0.05248623341321945,
-0.11125237494707108,
0.01737777516245842,
0.17934125661849976,
0.11479954421520233,
0.4388839900493622,
-0.20548784732818604,
-0.21997016668319702,
-0.23147830367088318,
0.07531048357486725,
0.21653112769126892,
0.0756218284368515,
-0.031272049993276596,
-0.07908646017313004,
0.1986975073814392,
0.060207776725292206,
0.3548209071159363,
-0.22590377926826477,
0.08186906576156616,
-0.048448268324136734,
-0.33866915106773376,
-0.14331135153770447,
0.2231086641550064,
-0.31687653064727783,
0.1877763867378235,
-0.21545955538749695,
-0.0260351300239563,
-0.010540342889726162,
-0.013222748413681984,
-0.029433902353048325,
0.011092424392700195,
-0.0049993181601166725,
-0.1991402804851532,
0.23915864527225494,
-0.17272762954235077,
-0.09769056737422943,
-0.2451281100511551,
0.047184281051158905,
-0.34218695759773254,
-0.07749049365520477,
-0.010398336686193943,
-0.5276143550872803,
0.42983517050743103,
0.25476202368736267,
0.23932141065597534,
0.22547821700572968,
-0.43731486797332764,
0.19300217926502228,
-0.020710572600364685,
0.27172866463661194,
-0.02861725352704525,
-0.02381003275513649,
-0.0957150012254715,
0.0014507360756397247,
-0.06228475272655487,
-0.30666688084602356,
-0.23708847165107727,
-0.35356777906417847,
-0.3002389073371887,
0.16840770840644836,
-0.20777520537376404,
-0.08394249528646469,
-0.4613352119922638,
0.28007590770721436,
-0.20343993604183197,
-0.194963738322258,
0.2160709798336029,
0.31176286935806274,
-0.15250110626220703,
-0.2019263505935669,
0.32195737957954407,
0.35677507519721985,
0.1260174959897995,
-0.24486100673675537,
-0.16716499626636505,
0.02700074389576912,
0.018594026565551758,
0.23176829516887665,
-0.19682161509990692,
0.06611142307519913,
-0.14163880050182343,
-0.31270498037338257,
0.10760849714279175,
-0.39017608761787415,
-0.2116605043411255,
0.1747913658618927,
-0.18288350105285645,
-0.2197275310754776,
-0.031186915934085846,
0.10896729677915573,
0.06284090876579285,
-0.12084456533193588,
-0.1521589308977127,
-0.02600044570863247,
-0.21952880918979645,
-0.3192838430404663,
-0.1481102854013443,
-0.13626286387443542,
-0.4844512641429901,
-0.08429595082998276,
0.057340096682310104,
0.16307875514030457,
0.3549593985080719,
-0.002610238967463374,
-0.1355062574148178,
0.0839674100279808,
0.09624911099672318,
0.4097355306148529,
0.634218692779541,
0.2227146178483963,
-0.14829260110855103,
0.07104280591011047,
-0.41926366090774536,
0.10083156079053879,
0.11693425476551056,
0.38731878995895386,
0.15212289988994598,
-0.085022933781147,
-0.04435903578996658,
-0.19682331383228302,
-0.0004860946210101247,
-0.4259001910686493,
0.02449289709329605,
0.18848846852779388,
0.21385310590267181,
0.22349703311920166,
-0.2566775381565094,
0.09588370472192764,
-0.02949180081486702,
0.15288808941841125,
-0.6297128200531006,
0.1088109165430069,
-0.1664843112230301,
0.0939437597990036,
0.023717420175671577,
0.2124970704317093,
0.007032310124486685,
-0.2777433395385742,
0.09662361443042755,
0.32370439171791077,
-0.27746960520744324,
0.28171563148498535,
0.36971989274024963,
0.1944119930267334,
0.3049986660480499,
-0.1333852857351303,
-0.0943499505519867,
-0.14497384428977966,
-0.08895394206047058,
0.1931200474500656,
-0.21828019618988037,
0.09466730803251266,
0.011094965040683746,
-0.0022161519154906273,
0.23117567598819733,
0.11431664228439331,
0.2847476899623871,
0.07653193920850754,
-0.05141765624284744,
-0.3194248080253601,
0.17160174250602722,
-0.022642139345407486,
0.24450339376926422,
-0.08637198060750961,
-0.16928605735301971,
0.2999424934387207,
0.11817770451307297,
-0.19173437356948853,
-0.25045639276504517,
0.21264418959617615,
0.055306773632764816,
-0.034940555691719055,
0.15094195306301117,
0.3782612681388855,
0.20948119461536407,
0.3140183687210083,
0.25908252596855164,
0.20574046671390533,
0.229755237698555,
-0.2771492600440979,
0.033285047858953476,
-0.013365929014980793,
-0.097635418176651,
0.010199935175478458,
0.2610309422016144,
0.08931555598974228,
-0.2038082629442215,
0.2617337703704834,
-0.10532553493976593,
0.26620763540267944,
0.039453983306884766,
0.1391785442829132,
-0.2544876039028168,
-0.1987805962562561,
-0.27733758091926575,
-0.42563989758491516,
-0.4906129539012909,
-0.28606653213500977,
0.050332654267549515,
0.22274582087993622,
0.04361218586564064,
0.04816621541976929,
0.18027691543102264,
0.0652742013335228,
-0.37731513381004333,
0.0741535872220993,
-0.022974582388997078,
-0.271695613861084,
-0.09496384859085083,
0.12811408936977386,
0.059344176203012466,
-0.11305587738752365,
0.5370505452156067,
-0.3216627240180969,
-0.014812000095844269,
-0.5511782765388489,
-0.7157521843910217,
0.14648166298866272,
-0.18880975246429443,
0.23675650358200073,
0.3718586266040802,
-0.09062109142541885,
-0.05355609953403473,
-0.12146931886672974,
0.13720053434371948,
-0.3795279264450073,
-0.292096346616745,
-0.23721498250961304,
-0.18623162806034088,
-0.054914239794015884,
-0.16971872746944427,
-0.5078218579292297,
0.0070136357098817825,
-0.3114491105079651,
0.63857102394104,
-0.16541197896003723,
-0.0597807802259922,
0.33904922008514404,
0.050328128039836884,
-0.1282748132944107,
-0.23004403710365295,
0.07834307104349136,
-0.10047944635152817,
-0.3781207203865051,
0.12602825462818146,
-0.30466583371162415,
-0.37198665738105774,
0.3863868713378906,
0.13932636380195618,
0.4151361286640167,
-0.10586634278297424,
-0.5360230207443237,
0.08737268298864365,
-0.1337161511182785,
0.12597285211086273,
0.25949040055274963,
0.33586135506629944,
0.42464974522590637,
-0.2974678874015808,
-0.09980681538581848,
-0.13670778274536133,
-0.19377832114696503,
0.02557031437754631,
0.02907548099756241,
0.33338141441345215,
-0.13513070344924927,
0.600617527961731,
-0.04990721866488457,
0.6402546763420105,
-0.09828048199415207,
-0.015475275926291943,
0.11437365412712097,
-0.14939181506633759,
0.632347822189331,
-0.33167707920074463,
-0.3233625292778015,
0.13649612665176392,
0.03455262631177902,
0.006887235213071108,
0.1125793308019638,
0.42487964034080505,
0.09232479333877563,
-0.24681241810321808,
-0.3051476776599884,
-0.10026415437459946,
-0.14601190388202667,
-0.15580779314041138,
-0.13896062970161438,
0.027338169515132904,
0.1567370891571045,
-0.16993680596351624,
-0.12946487963199615,
0.05949902534484863,
-0.1904824674129486,
0.4983605146408081,
0.3119197189807892,
0.1762961745262146,
-0.11391684412956238,
-0.02002420462667942,
-0.32877689599990845,
0.02237994596362114,
0.13336172699928284,
0.11101534217596054,
-0.09896581619977951,
0.022776855155825615,
0.06395043432712555,
0.004519042558968067,
0.08216909319162369,
-0.26841288805007935,
-0.08768732100725174,
-0.17555345594882965,
-0.39736828207969666,
-0.07347474247217178,
0.07618803530931473,
0.1294650435447693,
0.2193843573331833,
0.522923469543457,
0.19187752902507782,
-0.437140554189682,
-0.24947082996368408,
0.4528580605983734,
-0.10363036394119263,
0.02423803135752678,
0.07748048007488251,
-0.3639131784439087,
-0.19278207421302795,
-0.14176715910434723,
-0.15612737834453583,
-0.14998237788677216,
-0.24232998490333557,
0.20023956894874573,
0.20974141359329224,
0.08045492321252823,
0.13073115050792694,
-0.02185756340622902,
-0.1100863516330719,
-0.07818961143493652,
0.17542751133441925,
0.10592658817768097,
0.1379510462284088,
0.2865152657032013,
0.5018667578697205,
0.6798104047775269,
-0.14568689465522766,
-0.09530322253704071,
0.14634153246879578,
-0.1023479774594307,
0.36244598031044006,
0.25340816378593445,
0.30156373977661133,
0.3917585611343384,
0.38399311900138855,
0.046916525810956955,
-0.13799133896827698,
0.036847073584795,
0.19822297990322113,
0.09812383353710175,
-0.15254874527454376,
-0.5134530067443848,
0.34817618131637573,
-0.24560517072677612,
0.1051677018404007,
0.25611671805381775,
0.6245751976966858,
0.11923285573720932,
-0.17024603486061096,
-0.13791298866271973,
0.7449840307235718,
0.27115771174430847,
0.18395139276981354,
0.28135961294174194,
-0.20679840445518494,
0.6587561368942261,
-0.025255795568227768,
0.12060005217790604,
0.01929478906095028,
0.14907175302505493,
-0.0277018453925848,
-0.038305286318063736,
-0.1677704155445099,
-0.3307251036167145,
0.14689545333385468,
0.33339592814445496,
0.20542044937610626,
0.8445011377334595,
0.1578492671251297,
0.20771269500255585,
0.10238014906644821,
0.10105779767036438,
-0.3259068727493286,
0.1762959063053131,
0.10654386878013611,
0.162765234708786,
-0.2111753523349762,
-0.3545362949371338,
-0.25338882207870483,
-0.2073821723461151,
-0.26535093784332275,
-0.14391669631004333,
0.15213337540626526,
0.1510452926158905,
0.15302126109600067,
-0.4044550955295563,
0.14838692545890808,
-0.11247776448726654,
0.6150484085083008,
0.006537022069096565,
-0.40307334065437317,
0.08431508392095566,
-0.08268773555755615,
-0.25172919034957886,
-0.03606649115681648,
0.032388992607593536,
0.044734060764312744,
-0.23641587793827057,
-0.30173635482788086,
-0.15462474524974823,
-0.029462503269314766,
-0.6098450422286987,
-0.13349567353725433,
0.09297623485326767,
-0.4606902599334717,
0.041983745992183685,
0.11056923866271973,
0.3218737542629242,
-0.06633497774600983,
-0.24800018966197968,
0.09487941861152649,
0.034745849668979645,
-0.15560854971408844,
-0.4615311622619629,
0.2726499140262604,
-0.09906558692455292,
-0.3219064772129059,
0.43356674909591675,
-0.09013261646032333,
-0.19812072813510895,
0.03504405915737152,
0.11761297285556793,
-0.17521607875823975,
-0.07870283722877502,
-0.2599712908267975,
0.41981568932533264,
-0.6655977368354797,
-0.07202037423849106,
-0.06026611477136612,
0.14047300815582275,
0.26961222290992737,
0.020142817869782448,
0.19319872558116913,
-0.15549041330814362,
-0.03990517556667328,
-0.0657762736082077,
-0.43664559721946716,
0.4004327356815338,
-0.43240687251091003,
-0.029674751684069633,
-0.034509968012571335,
-0.02626475878059864,
0.2608998715877533,
0.09949082136154175,
-0.31362518668174744,
0.10218427330255508,
0.0710778683423996,
0.1782093197107315,
0.12318436056375504,
-0.1891828179359436,
0.3661714196205139,
-0.30879658460617065,
-0.015416713431477547,
-0.28102272748947144,
-0.3800627291202545,
-0.11211235076189041,
-0.07063252478837967,
0.10568324476480484,
-0.03886326774954796,
0.0025965350214391947,
-0.010811868123710155,
0.026266830042004585,
-0.26353132724761963,
0.06493784487247467,
0.1543998122215271,
0.20396177470684052,
0.04494606330990791,
-0.08050207793712616,
0.21328161656856537,
0.16361728310585022,
0.002413560403510928,
-0.015584823675453663,
0.2798174023628235,
0.24353168904781342,
-0.011638376861810684,
-0.05799419805407524,
-0.12433595210313797,
-0.06052572652697563,
-0.04427793249487877,
0.1273370087146759,
-0.009481958113610744,
0.036043040454387665,
0.26484423875808716,
-0.018352139741182327,
0.20347458124160767,
-0.14047420024871826,
0.4461744427680969,
-0.04096333310008049,
0.22878649830818176,
0.29139477014541626,
0.11612728983163834,
0.10036201030015945,
-0.1521703004837036,
-0.01229816023260355,
0.1328454613685608,
0.1795765459537506,
0.11246759444475174,
0.32697123289108276,
0.5192692875862122,
-0.08695144951343536,
0.14754338562488556,
0.2571842074394226,
-0.013118105940520763,
-0.02532903105020523,
0.33260929584503174,
0.3951197862625122,
0.09557867050170898,
0.10726097226142883,
0.09866844117641449,
0.21870775520801544,
0.10122976452112198,
0.041524432599544525,
-0.09902449697256088,
0.254495233297348,
0.008600370027124882,
-0.05340278148651123,
0.21186652779579163,
-0.07292275130748749,
-0.14156703650951385,
0.08910452574491501,
0.3963586688041687,
-0.11694305390119553,
-0.0006471911910921335,
0.42328041791915894,
0.08123186975717545,
-0.11445347219705582,
-0.12308119982481003,
0.24723316729068756,
0.053145211189985275,
-0.10366863012313843,
-0.13871218264102936,
-0.06996643543243408,
0.022377658635377884,
0.030968552455306053,
0.0588696263730526,
-0.19248604774475098,
0.23924270272254944,
-0.04614383354783058,
-0.11773689836263657,
-0.12225527316331863,
0.06648871302604675,
-0.020142853260040283,
0.2105906456708908,
0.11616037786006927,
0.2627843916416168,
0.3309718668460846,
-0.30427730083465576,
0.15126414597034454,
0.44037455320358276,
0.3446226716041565,
0.07839860022068024,
0.3008100688457489,
0.24245889484882355,
0.10010969638824463,
-0.10459791868925095,
0.02810835652053356,
0.41486793756484985,
-0.038737937808036804,
0.11914250254631042,
-0.09586253017187119,
0.16890622675418854,
-0.08975618332624435,
0.572335958480835,
-0.16235578060150146,
0.11403469741344452,
-0.07978484034538269,
0.4220883548259735,
-0.13113835453987122,
0.03504789620637894,
-0.20596611499786377,
0.3387075662612915,
-0.332335889339447,
0.13306987285614014,
0.11888817697763443,
-0.005439911503344774,
-0.10032451897859573,
-0.0844215601682663,
0.10774537920951843,
0.15677303075790405,
0.4633108973503113,
0.5227733254432678,
0.0973716750741005,
-0.012158454395830631,
-0.32832300662994385,
-0.35304298996925354,
-0.08914492279291153,
-0.15847773849964142,
0.1687248945236206,
-0.10218489915132523,
0.15347954630851746,
0.11909783631563187,
0.046624161303043365,
0.10407523065805435,
-0.12263178080320358,
-0.08314529806375504,
-0.10036391019821167,
-0.019765660166740417,
-0.14047707617282867,
-0.02862766571342945,
-0.07371580600738525,
0.045700717717409134,
0.2124551236629486,
0.07544601708650589,
-0.1354750096797943,
0.04482043907046318,
0.2117481678724289,
0.3482756018638611,
-0.0373942032456398,
-0.12364232540130615,
-0.16073879599571228,
0.10377591103315353,
0.18004833161830902,
-0.12061738222837448,
-0.5101878643035889,
-0.43857428431510925,
-0.2309195101261139,
-0.2537137269973755,
0.3338181972503662,
-0.2255730777978897,
0.4225824475288391,
-0.26488563418388367,
-0.23863175511360168,
-0.33334681391716003,
0.17119401693344116,
0.15138459205627441,
0.010809595696628094,
-0.2621188759803772,
0.23013338446617126,
-0.14687500894069672,
-0.02178873121738434,
0.23127897083759308,
0.15073318779468536,
-0.09928634762763977,
-0.027318818494677544,
-0.39741382002830505,
-0.13343872129917145,
0.5408657193183899,
-0.36372849345207214,
0.29085880517959595,
-0.11502529680728912,
0.0339614637196064,
0.6897439360618591,
-0.26220041513442993,
-0.7218092679977417,
0.1165165975689888,
0.11827048659324646,
0.15737320482730865,
-0.22578760981559753,
0.3257894515991211,
-0.22513039410114288,
-0.31657710671424866,
0.01783919334411621,
0.45716941356658936,
0.13286496698856354,
-0.3172667920589447,
0.17524167895317078,
-0.14566032588481903
] |
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.15264350175857544,
-0.39081788063049316,
-0.05686843767762184,
-0.38039663434028625,
-0.053528472781181335,
-0.12343958765268326,
0.3151809573173523,
-0.0022334945388138294,
-0.3539060652256012,
0.26942917704582214,
-0.009293383918702602,
-0.04662807658314705,
0.3955133259296417,
0.23512649536132812,
0.24673844873905182,
-0.06801848858594894,
0.3274165391921997,
-0.19039781391620636,
0.24091464281082153,
-0.7290988564491272,
-0.2180362194776535,
-0.049281004816293716,
0.12126392871141434,
-0.20999938249588013,
-0.14653955399990082,
0.23080819845199585,
0.04827601835131645,
0.1814904659986496,
-0.29021722078323364,
-0.3672444224357605,
0.4538207948207855,
0.06178567185997963,
0.015986161306500435,
0.45363107323646545,
-0.00012143699859734625,
-0.03528640791773796,
0.4274774193763733,
0.03579667583107948,
-0.26102808117866516,
-0.15297526121139526,
-0.5940440893173218,
-0.23140382766723633,
0.007118119392544031,
0.07150869071483612,
-0.029064828529953957,
0.18049456179141998,
0.2290714681148529,
-0.11033912748098373,
0.04691656678915024,
0.1295335441827774,
0.14207804203033447,
0.19139721989631653,
0.03621611371636391,
-0.37785303592681885,
0.28212612867355347,
0.475995808839798,
-0.2266930192708969,
0.8752229809761047,
0.24171018600463867,
0.5030209422111511,
0.17168185114860535,
-0.06528082489967346,
0.107537642121315,
0.04306618124246597,
-0.037370555102825165,
0.10297328233718872,
0.17500023543834686,
-0.1549443006515503,
0.16222791373729706,
0.43015584349632263,
0.7702751159667969,
0.23607122898101807,
-0.47540083527565,
0.02126975916326046,
-0.012533959932625294,
-0.3896002471446991,
-0.059369806200265884,
0.3834994435310364,
0.06466403603553772,
0.09515023976564407,
-0.19794178009033203,
-0.3189469873905182,
-0.3143388032913208,
0.2806486189365387,
-0.06581831723451614,
0.4146606922149658,
-0.1366889625787735,
0.08400138467550278,
-0.02521299570798874,
0.25577595829963684,
-0.16606387495994568,
0.07322479784488678,
-0.21529440581798553,
-0.11906664073467255,
0.01508981455117464,
-0.17599651217460632,
0.08977857232093811,
0.08729240298271179,
0.07181207090616226,
0.5886428952217102,
-0.3382135331630707,
-0.12449042499065399,
-0.254632830619812,
0.08341555297374725,
0.16287794709205627,
-0.004964551888406277,
0.0689401850104332,
0.12332350015640259,
0.3434392213821411,
-0.18443571031093597,
0.3132755756378174,
-0.15800811350345612,
0.06242624670267105,
0.14616641402244568,
-0.2167900949716568,
-0.15689150989055634,
0.34826192259788513,
-0.4060588777065277,
0.22223778069019318,
-0.11245501041412354,
-0.1277005970478058,
-0.22619470953941345,
-0.17691144347190857,
-0.0030168392695486546,
0.05418924614787102,
0.1421896070241928,
-0.4768746793270111,
0.2858995795249939,
-0.18103429675102234,
-0.16085678339004517,
-0.2593807578086853,
-0.10990078002214432,
-0.1611192524433136,
-0.03405078873038292,
-0.057504456490278244,
-0.44123736023902893,
0.49181437492370605,
0.1535721868276596,
0.26453179121017456,
0.3689873218536377,
-0.117259182035923,
0.055230967700481415,
0.09563155472278595,
0.38315898180007935,
-0.12709994614124298,
0.03212697058916092,
-0.11346038430929184,
0.10482694953680038,
-0.1427418738603592,
-0.02694430574774742,
-0.19899733364582062,
-0.4819030165672302,
-0.225312277674675,
0.09541719406843185,
-0.2828344404697418,
-0.2053876668214798,
-0.628879725933075,
0.14895771443843842,
-0.34561002254486084,
-0.06654389202594757,
0.3376176655292511,
0.15094192326068878,
-0.014386621303856373,
-0.17803996801376343,
0.0957164466381073,
0.4086884558200836,
-0.016842341050505638,
-0.2962554395198822,
-0.12484879791736603,
-0.19757801294326782,
-0.017398998141288757,
0.20926311612129211,
-0.3593125343322754,
-0.045793551951646805,
0.053810566663742065,
-0.09897381067276001,
0.04497514292597771,
-0.417922705411911,
-0.15437398850917816,
0.09062062948942184,
-0.2368871420621872,
-0.23999671638011932,
0.03985338658094406,
0.08184001594781876,
0.20990365743637085,
-0.15547402203083038,
-0.17643330991268158,
0.039169181138277054,
-0.21719762682914734,
-0.2206083983182907,
-0.17835481464862823,
-0.048293061554431915,
-0.3847340941429138,
0.11118833720684052,
0.014251923188567162,
0.1173517256975174,
0.3190358579158783,
-0.1395799219608307,
-0.2348846197128296,
0.06228082627058029,
-0.13157641887664795,
0.1852911412715912,
0.7095392346382141,
-0.059031810611486435,
-0.10038141161203384,
0.22342340648174286,
-0.527783215045929,
0.16857868432998657,
0.19478517770767212,
0.25247254967689514,
0.3422008454799652,
-0.009450777433812618,
0.07559668272733688,
-0.08663103729486465,
-0.181086003780365,
-0.1649605631828308,
-0.08941961824893951,
0.246516615152359,
0.2977789640426636,
0.1671322137117386,
-0.527418315410614,
0.009059888310730457,
-0.22399918735027313,
0.15253010392189026,
-0.46466973423957825,
0.2709396481513977,
-0.04080568626523018,
0.14901471138000488,
-0.24671874940395355,
0.0117414565756917,
-0.0781422108411789,
-0.26708531379699707,
0.04792964458465576,
0.27139803767204285,
-0.18042945861816406,
0.41894999146461487,
0.4851281940937042,
0.2931006848812103,
0.34419822692871094,
-0.24791017174720764,
0.1567441076040268,
-0.04401335492730141,
-0.1111493930220604,
0.1980709284543991,
-0.2691899836063385,
0.09703516215085983,
0.18096190690994263,
-0.03142959624528885,
0.14527609944343567,
-0.11582665890455246,
0.23206941783428192,
0.015004530549049377,
-0.10417633503675461,
-0.3393951952457428,
0.05190450698137283,
0.21700812876224518,
0.286729097366333,
-0.057962577790021896,
-0.15933965146541595,
0.3818153738975525,
0.0962781235575676,
-0.5721607804298401,
-0.2647399604320526,
0.22777089476585388,
0.09363846480846405,
-0.20304197072982788,
0.13167506456375122,
0.5656306743621826,
0.35258880257606506,
0.17179988324642181,
0.2733196020126343,
0.19779618084430695,
0.09862853586673737,
-0.4801004230976105,
0.1898616999387741,
-0.01674661599099636,
-0.1267506182193756,
-0.009703967720270157,
0.16980309784412384,
-0.019927354529500008,
-0.15595485270023346,
0.06129731982946396,
0.09829631447792053,
0.21831460297107697,
0.12693580985069275,
0.0965891107916832,
-0.3688342273235321,
-0.1766268014907837,
-0.3448289632797241,
-0.295082688331604,
-0.5318111777305603,
-0.3349752724170685,
-0.01985393650829792,
0.018321169540286064,
-0.09651155769824982,
-0.08179017156362534,
0.1770533174276352,
0.17092566192150116,
-0.4175528287887573,
0.03437364846467972,
-0.03046448528766632,
-0.39748403429985046,
-0.10179229080677032,
0.036054667085409164,
-0.1647348254919052,
-0.06098724901676178,
0.5170273780822754,
-0.4658835530281067,
-0.16915033757686615,
-0.40353068709373474,
-0.5375567674636841,
0.1256885677576065,
0.059817854315042496,
0.18794168531894684,
0.16973045468330383,
0.18999360501766205,
0.0890597477555275,
0.03158862143754959,
0.16395647823810577,
-0.23397284746170044,
-0.229644775390625,
-0.2627094089984894,
-0.23791833221912384,
-0.11413972824811935,
-0.004667503293603659,
-0.401267945766449,
-0.11817506700754166,
-0.20072056353092194,
0.4642680883407593,
-0.1780480295419693,
0.03797611594200134,
0.20096734166145325,
-0.16171786189079285,
-0.06569486111402512,
-0.2549103796482086,
0.08394242078065872,
-0.14407557249069214,
-0.5398856401443481,
0.05504825338721275,
-0.214822456240654,
-0.10057822614908218,
0.3010263442993164,
0.05457610636949539,
0.2800722122192383,
0.04770759120583534,
-0.5282684564590454,
-0.01006623636931181,
-0.1690361201763153,
0.3068680763244629,
0.5019596815109253,
0.375370055437088,
0.5677353739738464,
-0.45304569602012634,
-0.007560212165117264,
0.014791055582463741,
-0.3003115653991699,
0.0370480939745903,
0.20826028287410736,
0.16500318050384521,
-0.048484984785318375,
0.4850204586982727,
-0.2723744511604309,
0.7536584734916687,
-0.13005506992340088,
0.08229956030845642,
-0.040414538234472275,
0.00843773316591978,
0.5139188170433044,
-0.4079747498035431,
-0.08114111423492432,
0.2301471084356308,
0.12414288520812988,
-0.06543255597352982,
0.025667333975434303,
0.3337322771549225,
-0.020179353654384613,
-0.17287753522396088,
-0.5013920664787292,
0.07146750390529633,
-0.11272939294576645,
-0.06972239911556244,
-0.06874691694974899,
0.12833161652088165,
0.15902969241142273,
-0.16382266581058502,
-0.07393576949834824,
0.07842448353767395,
-0.27018028497695923,
0.4493614137172699,
0.19998040795326233,
-0.008048771880567074,
-0.5328275561332703,
-0.10791076719760895,
-0.14441941678524017,
0.08932232856750488,
0.12601491808891296,
-0.001505355117842555,
-0.007838692516088486,
-0.1675853580236435,
0.12764853239059448,
-0.05046569183468819,
0.017727622762322426,
-0.3045567572116852,
-0.10777962952852249,
-0.2122403234243393,
-0.4268774092197418,
-0.005509242415428162,
-0.12259607762098312,
0.05506287142634392,
0.153602734208107,
0.4221288561820984,
0.20559801161289215,
-0.2968250811100006,
-0.25990837812423706,
0.4703333079814911,
0.09194730222225189,
-0.026870811358094215,
0.16495968401432037,
-0.33719098567962646,
-0.016204211860895157,
-0.11416859179735184,
-0.04823027923703194,
-0.38855671882629395,
-0.3450283408164978,
-0.011360122822225094,
0.29832446575164795,
0.026826390996575356,
0.13255925476551056,
-0.23469431698322296,
0.08127069473266602,
-0.18783330917358398,
-0.0034688380546867847,
0.04836578294634819,
0.2260608822107315,
0.16477908194065094,
0.5362104177474976,
0.6573820114135742,
-0.18387272953987122,
-0.22248972952365875,
0.06368518620729446,
-0.06942243129014969,
0.20161671936511993,
0.4448970854282379,
0.42416873574256897,
0.250486820936203,
0.3098897337913513,
-0.049973588436841965,
0.0536905974149704,
-0.025445884093642235,
0.07952430844306946,
0.12705270946025848,
-0.21922321617603302,
-0.39699864387512207,
0.45322728157043457,
-0.24843557178974152,
0.030803458765149117,
0.2647317945957184,
0.6452980041503906,
0.23090708255767822,
-0.16147156059741974,
-0.10408876091241837,
0.8261786699295044,
0.4181175231933594,
0.2513294517993927,
0.3437063694000244,
-0.298166424036026,
0.43822503089904785,
-0.00935403909534216,
0.00649254210293293,
-0.05544567480683327,
0.17792509496212006,
-0.01863495446741581,
-0.10227932780981064,
-0.07570138573646545,
-0.14650432765483856,
0.284598171710968,
0.18538439273834229,
0.0716179832816124,
0.7963955998420715,
0.1774626225233078,
0.1313205510377884,
0.29255038499832153,
0.14267085492610931,
-0.20624147355556488,
0.0773947611451149,
-0.07846405357122421,
0.1466265618801117,
-0.15340949594974518,
-0.11972538381814957,
-0.17705409228801727,
-0.16678887605667114,
-0.2664336860179901,
-0.054639771580696106,
0.3031913936138153,
0.011774295940995216,
0.2971503436565399,
-0.5078319907188416,
-0.12068160623311996,
-0.2457912713289261,
0.6949741244316101,
-0.0030185130890458822,
-0.13073818385601044,
0.07456308603286743,
0.13535070419311523,
-0.021277563646435738,
0.2675536572933197,
-0.11569154262542725,
0.013834619894623756,
-0.2264951765537262,
-0.5466223955154419,
-0.06053607910871506,
-0.05394363030791283,
-0.5696592926979065,
-0.15813931822776794,
0.01994042657315731,
-0.36256784200668335,
0.026528524234890938,
0.052579544484615326,
0.4546355903148651,
-0.03101186268031597,
-0.11706642806529999,
0.022926367819309235,
0.11071513593196869,
-0.105667345225811,
-0.3512171506881714,
0.05177867412567139,
-0.152631014585495,
-0.39983075857162476,
0.32131123542785645,
-0.036483705043792725,
-0.22095368802547455,
0.026542097330093384,
-0.08006786555051804,
-0.131089985370636,
-0.08112864941358566,
0.04517349228262901,
0.36838725209236145,
-0.7441092729568481,
0.06386322528123856,
-0.17490240931510925,
0.011659365147352219,
0.26765161752700806,
-0.01537499763071537,
0.009912057779729366,
0.05287930741906166,
-0.15580816566944122,
-0.012355505488812923,
-0.1575998216867447,
0.2336532026529312,
-0.36435550451278687,
0.09062124788761139,
0.17756053805351257,
-0.3076359033584595,
0.16138362884521484,
-0.06238264590501785,
-0.22644031047821045,
0.13885456323623657,
0.09806839376688004,
0.2257535308599472,
0.14070968329906464,
-0.09131370484828949,
0.26901331543922424,
-0.35360273718833923,
-0.02673419564962387,
-0.3960966169834137,
-0.2725749909877777,
-0.11628299206495285,
-0.2229144275188446,
0.18967100977897644,
-0.09104838222265244,
-0.25630056858062744,
0.10808150470256805,
-0.1417185664176941,
-0.1377776861190796,
0.21552389860153198,
0.21886681020259857,
0.217567577958107,
0.06444644927978516,
0.014909089542925358,
0.22432437539100647,
0.03606085479259491,
-0.1561959981918335,
0.14758993685245514,
0.25177648663520813,
0.33750656247138977,
-0.027280548587441444,
0.09079688042402267,
-0.15162433683872223,
-0.15144160389900208,
-0.22057880461215973,
0.13331496715545654,
-0.13220776617527008,
0.16088737547397614,
0.16465318202972412,
-0.018042486160993576,
0.21006828546524048,
-0.20774470269680023,
0.23657119274139404,
0.10066420584917068,
0.08471280336380005,
0.07049761712551117,
0.18169930577278137,
0.11102799326181412,
-0.021497145295143127,
-0.18473097681999207,
0.3753151595592499,
0.23016345500946045,
0.04689689725637436,
0.338274747133255,
0.4278499484062195,
0.010820112191140652,
0.4604399800300598,
0.1821477711200714,
0.07763154804706573,
-0.088355153799057,
0.6449828147888184,
0.5471997261047363,
0.02609201706945896,
0.27268102765083313,
0.017038289457559586,
0.22920961678028107,
0.0071518863551318645,
-0.028005899861454964,
-0.0036746449768543243,
0.15947619080543518,
0.23487935960292816,
0.0022364750038832426,
0.3667231798171997,
-0.027277465909719467,
-0.05358394980430603,
-0.06110472232103348,
0.10473493486642838,
-0.1418790966272354,
0.2086809128522873,
0.24160043895244598,
-0.01017681322991848,
-0.08555880188941956,
-0.22053168714046478,
0.17176911234855652,
0.012413362972438335,
-0.20534110069274902,
-0.3689615726470947,
0.054577019065618515,
0.2000613510608673,
0.2004268616437912,
-0.18077683448791504,
-0.2027130424976349,
0.17073054611682892,
0.06113341450691223,
-0.10067858546972275,
-0.042107176035642624,
0.26874589920043945,
-0.23983831703662872,
0.10682746022939682,
0.2622798979282379,
0.22688144445419312,
0.4346134066581726,
-0.328622430562973,
0.26404106616973877,
0.4957015812397003,
0.17932355403900146,
0.03154895827174187,
0.33716723322868347,
0.3460940420627594,
0.30190303921699524,
-0.1499715894460678,
0.19911229610443115,
0.2072296142578125,
0.044498272240161896,
0.17129871249198914,
-0.1347508281469345,
0.14570406079292297,
0.016122378408908844,
0.5959380269050598,
-0.048444006592035294,
0.04926779866218567,
-0.11223237216472626,
0.41813114285469055,
-0.05450265854597092,
0.11221404373645782,
-0.23903676867485046,
0.39245083928108215,
-0.2974777817726135,
0.25981906056404114,
0.11903262883424759,
0.03626453876495361,
-0.23353511095046997,
-0.05344047024846077,
0.04907134547829628,
0.011198591440916061,
0.5582717061042786,
0.4555211067199707,
0.08614519238471985,
-0.0428805947303772,
-0.14856353402137756,
0.00970396213233471,
-0.004738358780741692,
-0.2231493592262268,
0.08955533802509308,
-0.16045193374156952,
0.07507557421922684,
0.09480009973049164,
0.21053023636341095,
-0.03509652242064476,
-0.1206275001168251,
-0.1463165134191513,
0.09929170459508896,
0.11644443869590759,
-0.21360668540000916,
0.03449231758713722,
-0.006906159687787294,
-0.17136578261852264,
0.04824696481227875,
0.09963720291852951,
0.05671710893511772,
-0.1007901057600975,
0.17012037336826324,
0.16249977052211761,
0.14794866740703583,
-0.18199418485164642,
-0.2239576131105423,
0.19419674575328827,
0.18531499803066254,
0.13809411227703094,
-0.38463065028190613,
-0.25086385011672974,
-0.19126853346824646,
-0.412562757730484,
0.20450110733509064,
-0.21365796029567719,
0.3190740644931793,
-0.08831705152988434,
-0.12721000611782074,
-0.16039636731147766,
0.04909394308924675,
0.07885865122079849,
0.20514799654483795,
-0.11129005998373032,
-0.01652287319302559,
-0.07589321583509445,
-0.3586300015449524,
0.2597530782222748,
0.03159167617559433,
0.014924449846148491,
-0.1502951681613922,
-0.31936222314834595,
0.0743468627333641,
0.4109397530555725,
-0.33436617255210876,
0.3913284242153168,
-0.334720641374588,
0.027335522696375847,
0.5880270004272461,
-0.15753643214702606,
-0.498951256275177,
0.17429415881633759,
0.19005586206912994,
-0.17720232903957367,
-0.3052072525024414,
0.3734642565250397,
-0.033067699521780014,
-0.30529603362083435,
-0.00917412992566824,
0.4189295768737793,
0.13555791974067688,
-0.44800204038619995,
0.018124936148524284,
-0.06387589871883392
] |
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.1565997302532196,
0.09454041719436646,
0.00295068952254951,
0.0519757978618145,
-0.13645029067993164,
-0.2591089904308319,
0.4086023271083832,
0.22406497597694397,
-0.10595893114805222,
0.26768866181373596,
-0.0058868201449513435,
0.07883337885141373,
-0.15376630425453186,
0.5032161474227905,
-0.2350834310054779,
0.10643481463193893,
0.029259132221341133,
0.1519075185060501,
-0.20066888630390167,
0.07912048697471619,
-0.03760227933526039,
0.2799375653266907,
-0.22658228874206543,
-0.04477710649371147,
-0.3562314510345459,
-0.03419356420636177,
-0.21877889335155487,
0.18961775302886963,
-0.1608963906764984,
-0.32544732093811035,
0.6411890983581543,
0.032476939260959625,
0.027730384841561317,
0.7641419172286987,
-0.00012871315993834287,
0.03934714198112488,
0.46740394830703735,
-0.18515408039093018,
-0.3570636808872223,
-0.2890092134475708,
0.35207605361938477,
-0.07479478418827057,
0.47891366481781006,
-0.12173041701316833,
-0.05356926470994949,
0.36816859245300293,
-0.35716691613197327,
-0.28292375802993774,
0.3377830386161804,
0.2963618040084839,
0.08195790648460388,
0.5929397940635681,
-0.1577766090631485,
-0.051014211028814316,
-0.0935966894030571,
0.6183964014053345,
-0.28038692474365234,
0.6484383940696716,
0.43518751859664917,
-0.1534273624420166,
-0.11851054430007935,
-0.08087078481912613,
0.11256197839975357,
0.10811139643192291,
-0.12653997540473938,
0.049116890877485275,
-0.12125788629055023,
-0.2817673087120056,
0.18828415870666504,
-0.04349641129374504,
0.42786905169487,
-0.3348487913608551,
-0.3669346570968628,
0.29185950756073,
-0.13226620852947235,
-0.30394402146339417,
0.43144726753234863,
-0.09469722956418991,
-0.4797497093677521,
0.24646195769309998,
-0.5746461749076843,
0.180381178855896,
-0.095984548330307,
0.18898463249206543,
-0.32904309034347534,
0.013924180530011654,
-0.0037793770898133516,
0.07569785416126251,
-0.08330962061882019,
-0.07591928541660309,
0.07755041867494583,
0.21807554364204407,
0.11248989403247833,
0.21054688096046448,
0.019203921779990196,
-0.18259474635124207,
0.004288810305297375,
0.2666107714176178,
0.24720525741577148,
0.4240630567073822,
-0.18247659504413605,
-0.12257473170757294,
0.09414812177419662,
0.19864261150360107,
0.02979249134659767,
0.41495344042778015,
0.17679043114185333,
0.32871708273887634,
0.4472733736038208,
-0.031427621841430664,
-0.0349339097738266,
0.21398086845874786,
0.2701268792152405,
-0.21947166323661804,
0.08743225783109665,
-0.05996733531355858,
0.1236560270190239,
-0.48844659328460693,
-0.24302086234092712,
0.3342881500720978,
-0.22558380663394928,
0.013031098060309887,
0.29213789105415344,
0.23757405579090118,
0.08711165189743042,
0.19623850286006927,
0.16213726997375488,
0.4079703688621521,
-0.11785952001810074,
0.3706066310405731,
-0.10396291315555573,
-0.11246433109045029,
-0.13226105272769928,
0.19034339487552643,
0.538564920425415,
-0.047180235385894775,
0.41671496629714966,
-0.007027617190033197,
0.5418525338172913,
-0.07364239543676376,
0.030018744990229607,
-0.022493842989206314,
0.19875380396842957,
0.515885055065155,
-0.23142507672309875,
-0.04309479519724846,
0.23183870315551758,
-0.16801521182060242,
-0.2934476137161255,
0.1876368224620819,
-0.036553755402565,
-0.3601264953613281,
-0.1811523735523224,
-0.03283308818936348,
-0.2402830272912979,
0.004948029760271311,
0.4045211970806122,
-0.4238608181476593,
0.17298978567123413,
0.015731118619441986,
0.012633061036467552,
-0.2405940741300583,
0.004309446085244417,
0.09559263288974762,
0.32552433013916016,
0.5624173879623413,
-0.12838420271873474,
-0.04054541885852814,
0.09093058854341507,
0.056035079061985016,
0.3275007903575897,
0.3229970335960388,
-0.21749213337898254,
-0.07976627349853516,
-0.12281051278114319,
-0.15186116099357605,
0.3863774538040161,
-0.5328122973442078,
-0.2762472331523895,
0.31000444293022156,
0.1289287656545639,
-0.16965892910957336,
-0.14274422824382782,
-0.2081097960472107,
0.12035633623600006,
0.12683357298374176,
0.3403027653694153,
0.03396940603852272,
-0.14049021899700165,
-0.025244032964110374,
-0.37126681208610535,
-0.23001626133918762,
0.0015915881376713514,
0.01333435159176588,
0.02561049535870552,
0.16001296043395996,
0.16676437854766846,
-0.4279126822948456,
0.13110026717185974,
-0.051847491413354874,
-0.10381019860506058,
0.052733164280653,
0.48860493302345276,
-0.4241812229156494,
0.06365156173706055,
0.227682426571846,
-0.18369948863983154,
0.30353018641471863,
-0.07845239341259003,
0.31364455819129944,
-0.1373228281736374,
-0.058841414749622345,
-0.5334229469299316,
0.4065411686897278,
-0.018878642469644547,
-0.12672825157642365,
-0.12202495336532593,
0.04482264444231987,
0.3527235686779022,
0.11355503648519516,
-0.17422544956207275,
0.0604519285261631,
-0.11823637783527374,
0.10452380776405334,
0.34069180488586426,
-0.019403185695409775,
-0.406343549489975,
-0.4013935923576355,
-0.14910036325454712,
-0.028607835993170738,
0.011514748446643353,
-0.2519133388996124,
-0.38541221618652344,
0.24798129498958588,
0.05697120353579521,
-0.22442041337490082,
0.23058275878429413,
0.08168578147888184,
0.29543402791023254,
-0.016209224238991737,
0.03677021339535713,
0.00039679562905803323,
-0.18492211401462555,
-0.03391389548778534,
0.009830618277192116,
0.3970494270324707,
-0.031692225486040115,
0.16998183727264404,
-0.17502328753471375,
0.1441202163696289,
0.40024271607398987,
0.03101135604083538,
-0.15849997103214264,
-0.27366113662719727,
0.30453237891197205,
-0.004911907948553562,
0.5264108777046204,
0.05164491757750511,
-0.11319832503795624,
-0.019890518859028816,
-0.2378450334072113,
-0.15690359473228455,
0.06675175577402115,
0.3204011619091034,
0.2629229426383972,
-0.013487841002643108,
0.2638954222202301,
0.003394926432520151,
0.5038726329803467,
-0.12402420490980148,
0.1816549152135849,
0.13843195140361786,
-0.2771652340888977,
-0.31225061416625977,
0.04014846682548523,
-0.18180465698242188,
-0.09601717442274094,
0.23778338730335236,
0.250798761844635,
-0.0702296793460846,
-0.2175702303647995,
-0.21249166131019592,
-0.11062248051166534,
0.3328879475593567,
-0.22707325220108032,
0.24567663669586182,
-0.149220272898674,
0.19995591044425964,
-0.1773369014263153,
-0.2198432981967926,
-0.10610558837652206,
-0.2637876570224762,
-0.03785713389515877,
0.2395728975534439,
-0.040709517896175385,
0.23504967987537384,
-0.31719234585762024,
0.45997220277786255,
0.15770523250102997,
-0.6352953910827637,
-0.26297223567962646,
-0.1444389522075653,
-0.3395792841911316,
-0.07766349613666534,
0.32561996579170227,
-0.3727455139160156,
0.18438075482845306,
-0.482120543718338,
0.012367788702249527,
0.16150344908237457,
-0.47314396500587463,
0.2949296534061432,
0.13542763888835907,
0.5952250957489014,
-0.045918624848127365,
0.15083365142345428,
-0.19222602248191833,
-0.33440038561820984,
0.4108142554759979,
-0.31922224164009094,
-0.33658164739608765,
0.05477909743785858,
0.007266766857355833,
-0.1681361198425293,
-0.5058832168579102,
-0.30632954835891724,
-0.31480827927589417,
-0.05334961414337158,
0.19180098176002502,
0.050112344324588776,
0.14432770013809204,
0.3339986503124237,
0.4101504385471344,
-0.004436594434082508,
0.20733845233917236,
0.0507003590464592,
-0.010028987191617489,
-0.4861392080783844,
0.23715455830097198,
-0.3061429560184479,
-0.36150944232940674,
-0.1987365335226059,
-0.052923042327165604,
0.3845672309398651,
0.18407772481441498,
-0.558275043964386,
-0.29095765948295593,
-0.17779217660427094,
0.4546242356300354,
0.1030157059431076,
-0.046817485243082047,
0.2920680642127991,
0.04220383241772652,
0.03650108724832535,
-0.027070533484220505,
-0.3199702799320221,
0.28811895847320557,
0.023783208802342415,
0.30608245730400085,
-0.023914294317364693,
0.18030963838100433,
-0.03055492788553238,
0.7351323962211609,
0.19585320353507996,
-0.24084998667240143,
0.39190673828125,
0.18050964176654816,
0.37439581751823425,
-0.4311838150024414,
-0.2628125548362732,
0.2902440130710602,
0.03689567372202873,
-0.44686004519462585,
0.02809334173798561,
0.03275197744369507,
-0.7290298342704773,
-0.2692885398864746,
0.002175538334995508,
-0.1888217180967331,
-0.2501920461654663,
0.27224355936050415,
-0.2999303340911865,
0.3638344705104828,
-0.08397512882947922,
0.07558993250131607,
-0.07109128683805466,
-0.022998085245490074,
0.004649792797863483,
0.28359454870224,
-0.03938314691185951,
0.05367016792297363,
-0.13169842958450317,
-0.4243859052658081,
-0.45438241958618164,
0.2604159712791443,
0.18150541186332703,
0.7051236629486084,
-0.3466792404651642,
-0.28446274995803833,
0.08267121762037277,
-0.012800046242773533,
0.1547461599111557,
0.18881697952747345,
-0.27126172184944153,
0.24395352602005005,
-0.335961252450943,
-0.4482177793979645,
-0.25164973735809326,
0.03708852827548981,
0.3414700925350189,
0.1930961310863495,
0.4407695233821869,
0.07027803361415863,
-0.09867802262306213,
0.1657220423221588,
0.13496968150138855,
0.07601480931043625,
-0.0748339369893074,
-0.3867754340171814,
-0.4530230164527893,
-0.37257900834083557,
0.3067517876625061,
-0.05647614598274231,
0.11854835599660873,
-0.17792364954948425,
0.0036995364353060722,
0.17224730551242828,
-0.021883511915802956,
-0.05728384107351303,
0.3491224944591522,
0.02320731431245804,
-0.15631364285945892,
0.09276184439659119,
-0.023924317210912704,
0.16093362867832184,
0.04875366762280464,
0.10744882375001907,
-0.06942133605480194,
0.2719094753265381,
0.2726918160915375,
-0.06429649889469147,
0.003599705873057246,
0.4597562551498413,
-0.007834730669856071,
-0.26119303703308105,
-0.00982982013374567,
-0.09111732989549637,
-0.16983172297477722,
0.28748494386672974,
-0.018848000094294548,
-0.051939964294433594,
-0.05422907695174217,
0.203280508518219,
-0.034970562905073166,
0.0481022447347641,
-0.0859210193157196,
0.4281372129917145,
-0.06710425764322281,
0.012687234207987785,
0.27424752712249756,
0.17840063571929932,
0.9760034680366516,
-0.04344886168837547,
0.05646543949842453,
0.17950670421123505,
0.021545888856053352,
-0.2822629511356354,
0.2678415775299072,
-0.051539625972509384,
-0.19638225436210632,
0.23892082273960114,
0.0208766870200634,
-0.3305763006210327,
0.25635257363319397,
-0.14275895059108734,
-0.2644147276878357,
0.07216434180736542,
-0.4716963768005371,
0.20732228457927704,
0.09745678305625916,
-0.07848933339118958,
-0.32238322496414185,
0.007412261795252562,
0.04529717192053795,
0.09264056384563446,
0.11557376384735107,
0.6465581059455872,
-0.16744625568389893,
0.10426811873912811,
-0.45890191197395325,
-0.3181270360946655,
-0.33724579215049744,
-0.07504100352525711,
-0.3058592677116394,
0.1702500581741333,
0.4338039755821228,
-0.6257210969924927,
-0.12607242166996002,
0.2802773714065552,
0.5041137337684631,
0.2558198869228363,
-0.3557372987270355,
-0.023459535092115402,
-0.20543557405471802,
0.08400657773017883,
0.4423814117908478,
-0.10813150554895401,
0.12122716009616852,
-0.13896220922470093,
-0.37165066599845886,
-0.2003156542778015,
-0.1685025840997696,
-0.32243964076042175,
0.3863140046596527,
0.10033632814884186,
-0.008643989451229572,
-0.210942342877388,
0.23049396276474,
-0.13335980474948883,
-0.034041035920381546,
-0.01591590791940689,
0.046045828610658646,
0.08328156918287277,
0.06043032556772232,
0.37734687328338623,
-0.09589312970638275,
-0.18466606736183167,
-0.13656404614448547,
0.09561862796545029,
-0.03830942511558533,
-0.1852356493473053,
0.312359482049942,
-0.08220956474542618,
-0.03995845466852188,
-0.09552289545536041,
0.10177429020404816,
-0.302992582321167,
-0.1660037487745285,
0.056776806712150574,
-0.16003645956516266,
-0.3582678735256195,
-0.20829229056835175,
0.5189054608345032,
0.30254048109054565,
0.21233609318733215,
0.006827440112829208,
-0.19373388588428497,
-0.6883788704872131,
0.1580582708120346,
0.13932597637176514,
0.23347987234592438,
-0.050198692828416824,
0.39765313267707825,
0.09559492021799088,
-0.08192252367734909,
-0.11546610295772552,
-0.07779335975646973,
-0.42336177825927734,
0.09480538964271545,
0.09106908738613129,
-0.18755905330181122,
0.34721580147743225,
-0.1100250631570816,
-0.05269496887922287,
0.044653020799160004,
0.024698449298739433,
-0.09282229840755463,
-0.04537642374634743,
0.1755247563123703,
0.02061990648508072,
-0.36552637815475464,
0.17060866951942444,
-0.041536327451467514,
0.11996607482433319,
-0.15344059467315674,
-0.0975070521235466,
-0.03717370703816414,
-0.004948536865413189,
-0.08059122413396835,
-0.24905472993850708,
0.16809293627738953,
-0.05594363436102867,
0.16643743216991425,
0.021386193111538887,
0.315187007188797,
-0.04941127076745033,
0.11043047904968262,
0.014966803602874279,
-0.1250571757555008,
0.16893865168094635,
0.2227521538734436,
-0.2050156593322754,
0.080527164041996,
0.015767691656947136,
-0.1730947494506836,
-0.017868271097540855,
-0.022092852741479874,
0.4400378465652466,
0.0800032913684845,
-0.1780276894569397,
0.10113648325204849,
0.440335750579834,
0.06419181078672409,
-0.018031612038612366,
-0.06141086295247078,
0.19835418462753296,
0.1625598520040512,
-0.0008158661657944322,
0.4802030622959137,
0.06418926268815994,
-0.3462337851524353,
0.45278239250183105,
-0.0038469021674245596,
0.18124988675117493,
-0.06621456891298294,
-0.0012348099844530225,
-0.029139069840312004,
-0.05325992777943611,
0.3174808621406555,
0.1411479413509369,
-0.18720068037509918,
0.16617858409881592,
-0.08766534179449081,
-0.09365106374025345,
-0.09329665452241898,
-0.24776481091976166,
0.25968503952026367,
0.0540899783372879,
-0.17134429514408112,
0.24992966651916504,
-0.3742424249649048,
0.1550910323858261,
-0.0024955999106168747,
-0.1267188936471939,
0.6321108341217041,
-0.4966110289096832,
-0.31187567114830017,
-0.3651081621646881,
-0.04073239490389824,
-0.10912305116653442,
-0.12330109626054764,
-0.2257377952337265,
-0.06333953142166138,
0.1475432813167572,
0.04067250341176987,
0.01315882708877325,
0.17047946155071259,
0.2608257234096527,
0.11692386120557785,
-0.2754317820072174,
-0.43483784794807434,
-0.05348361283540726,
0.10396532714366913,
0.08752938359975815,
-0.020004812628030777,
0.5283891558647156,
0.20620720088481903,
-0.28274136781692505,
-0.2568254768848419,
0.4794694483280182,
0.5924418568611145,
0.39144372940063477,
0.08834674954414368,
-0.20706893503665924,
-0.22086267173290253,
0.031134290620684624,
-0.3435669243335724,
0.2105429321527481,
0.13870356976985931,
-0.09177332371473312,
0.022551920264959335,
0.021067289635539055,
-0.0827917605638504,
0.03287271782755852,
-0.13485649228096008,
0.1390838325023651,
-0.07596885412931442,
0.32647499442100525,
-0.025333693251013756,
0.04350193217396736,
0.02439788728952408,
0.1339571475982666,
-0.2487526684999466,
0.39291152358055115,
0.08334128558635712,
0.0035573611967265606,
0.17698144912719727,
0.04381386563181877,
-0.013007835485041142,
-0.06831634789705276,
0.47707614302635193,
0.379443496465683,
0.3073863983154297,
-0.23296260833740234,
-0.23394618928432465,
-0.17142453789710999,
0.17979620397090912,
0.13343960046768188,
0.37757012248039246,
-0.07776754349470139,
0.17236913740634918,
0.14740796387195587,
0.14936436712741852,
0.0007748756906948984,
-0.22886306047439575,
0.00707940524443984,
-0.040341831743717194,
-0.2509400248527527,
0.07985938340425491,
-0.5340791940689087,
-0.15187078714370728,
0.09360435605049133,
-0.3492441773414612,
0.3774879574775696,
-0.25180426239967346,
-0.08027119934558868,
0.014089144766330719,
-0.2566491365432739,
0.19460004568099976,
-0.026912424713373184,
0.22618697583675385,
0.3685009777545929,
0.4666381776332855,
0.18969500064849854,
-0.21339088678359985,
-0.16799356043338776,
-0.3907407820224762,
0.10599574446678162,
0.045764170587062836,
-0.23440700769424438,
0.21045859158039093,
-0.2749534547328949,
-0.03445567190647125,
-0.18378503620624542,
0.4403218924999237,
0.1964017152786255,
-0.2830713987350464,
0.3341462016105652,
-0.16894516348838806,
-0.2094666212797165,
-0.19000467658042908,
0.12341764569282532,
0.4776775538921356,
-0.06163249909877777,
0.23712672293186188,
-0.28272131085395813,
-0.18462355434894562,
0.522576093673706,
-0.2278444617986679,
-0.015275340527296066,
-0.07484499365091324,
-0.024468040093779564,
-0.1231946274638176,
-0.0727069303393364,
-0.31738415360450745,
-0.10970412939786911,
-0.061961326748132706,
-0.1095769852399826,
-0.4085153341293335,
0.31549957394599915,
0.2680286467075348,
-0.057043954730033875,
-0.04131751134991646,
0.5945864319801331,
-0.14248628914356232,
0.012222636491060257,
-0.004241728223860264,
-0.07613538950681686
] |
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.1595422327518463,
0.08368664979934692,
0.008074183017015457,
0.05419432371854782,
-0.06059148162603378,
-0.25328269600868225,
0.43223145604133606,
0.32108592987060547,
0.06659077852964401,
0.2115703672170639,
-0.024156246334314346,
0.10391579568386078,
-0.19237197935581207,
0.49519965052604675,
-0.21587349474430084,
0.13591820001602173,
0.055279441177845,
0.19342774152755737,
-0.13184183835983276,
0.08386018872261047,
-0.09596642106771469,
0.24996034801006317,
-0.2564116418361664,
-0.04104285687208176,
-0.30229783058166504,
-0.024599721655249596,
-0.1487213522195816,
0.18303264677524567,
-0.1826661378145218,
-0.36032965779304504,
0.6797199249267578,
0.019989416003227234,
-0.000931731890887022,
0.6896492838859558,
-0.00012576000881381333,
0.027079302817583084,
0.5052764415740967,
-0.18094149231910706,
-0.4039546549320221,
-0.33205053210258484,
0.15198823809623718,
0.0037364379968494177,
0.34486305713653564,
-0.13040581345558167,
-0.05944342538714409,
0.4255079925060272,
-0.2692722976207733,
-0.38869425654411316,
0.25371766090393066,
0.3457772731781006,
0.08616259694099426,
0.6625933647155762,
-0.1529206484556198,
-0.07385630160570145,
-0.09133859723806381,
0.7564922571182251,
-0.2964874505996704,
0.616054356098175,
0.39824971556663513,
-0.15299347043037415,
-0.08901281654834747,
-0.03706344589591026,
0.12386230379343033,
0.20788030326366425,
-0.19369545578956604,
0.10462214052677155,
-0.18562179803848267,
-0.31240972876548767,
0.12736152112483978,
-0.040723856538534164,
0.3077146112918854,
-0.29308146238327026,
-0.4210141897201538,
0.264011949300766,
-0.1962427794933319,
-0.4216316342353821,
0.4477260708808899,
-0.03210651874542236,
-0.5543993711471558,
0.14411330223083496,
-0.6164286732673645,
0.359910786151886,
-0.0956345945596695,
0.19370193779468536,
-0.2613515257835388,
-0.08602374792098999,
-0.12195253372192383,
0.10394450277090073,
-0.0689692348241806,
-0.10675375908613205,
-0.095020592212677,
0.11584389209747314,
0.08932410180568695,
0.2673541307449341,
0.04170587286353111,
-0.21206650137901306,
0.07456610351800919,
0.2886239290237427,
0.1956859827041626,
0.45949459075927734,
-0.2210509032011032,
-0.09700796753168106,
0.07518510520458221,
0.185852512717247,
0.04222923889756203,
0.3725647032260895,
0.1567060798406601,
0.36910784244537354,
0.40904176235198975,
0.0981970950961113,
-0.12366989254951477,
0.14232514798641205,
0.22340229153633118,
-0.22436052560806274,
0.14639653265476227,
0.01688440516591072,
0.1898580640554428,
-0.4522971510887146,
-0.28176137804985046,
0.3050578832626343,
-0.1572922021150589,
0.03351021558046341,
0.3083815574645996,
0.2298792004585266,
0.09248028695583344,
0.1790279597043991,
0.1544676125049591,
0.31625211238861084,
-0.2177804559469223,
0.24948418140411377,
-0.07182987779378891,
-0.09283801168203354,
-0.15755940973758698,
0.22927320003509521,
0.549232542514801,
0.039638325572013855,
0.40598824620246887,
0.017001913860440254,
0.596901535987854,
-0.0530269593000412,
0.08457311242818832,
-0.08202666789293289,
0.22962787747383118,
0.4612747132778168,
-0.26232975721359253,
0.0007761995657347143,
0.2538803219795227,
-0.1570121794939041,
-0.30969148874282837,
0.071657694876194,
0.025491828098893166,
-0.3389892280101776,
-0.19037048518657684,
-0.004122615326195955,
-0.23627027869224548,
0.044088900089263916,
0.30629706382751465,
-0.4115737974643707,
0.23501214385032654,
-0.03392539545893669,
0.06666959077119827,
-0.29796314239501953,
0.033408720046281815,
0.09072428941726685,
0.2940313518047333,
0.5816890001296997,
0.032018788158893585,
-0.05871257558465004,
0.08722236752510071,
0.17036649584770203,
0.32226258516311646,
0.3197821080684662,
-0.27119845151901245,
-0.08010729402303696,
-0.20098958909511566,
-0.21222418546676636,
0.46042928099632263,
-0.5281283855438232,
-0.22052712738513947,
0.3383588492870331,
0.1630101352930069,
-0.04699362441897392,
-0.024037599563598633,
-0.17793679237365723,
0.12301576137542725,
0.025045251473784447,
0.3560110926628113,
0.020115448161959648,
-0.14397573471069336,
-0.05072755366563797,
-0.30509933829307556,
-0.20969143509864807,
-0.03265305235981941,
-0.052001290023326874,
-0.012500724755227566,
0.14782164990901947,
0.1682518571615219,
-0.355397492647171,
0.13168686628341675,
-0.0926360934972763,
-0.10036822408437729,
-0.02656487561762333,
0.4984476864337921,
-0.4364662766456604,
-0.003353370586410165,
0.1779424101114273,
-0.14666613936424255,
0.31576013565063477,
-0.06520134955644608,
0.3325464129447937,
-0.12679117918014526,
-0.07860974222421646,
-0.4938026964664459,
0.3182770311832428,
-0.09209375083446503,
-0.14166276156902313,
-0.08799447864294052,
0.13500918447971344,
0.3590693473815918,
0.11580880731344223,
-0.20306390523910522,
0.19767779111862183,
-0.16743065416812897,
0.06740820407867432,
0.1798965036869049,
-0.11732006072998047,
-0.33187490701675415,
-0.3938654959201813,
-0.17561636865139008,
-0.043793972581624985,
-0.05761292204260826,
-0.23176604509353638,
-0.3719639778137207,
0.2077532261610031,
0.0961102619767189,
-0.16597995162010193,
0.10208358615636826,
0.06583700329065323,
0.27482908964157104,
0.07116413116455078,
0.00567045109346509,
0.013898682780563831,
-0.13402299582958221,
0.0324421301484108,
-0.05866343528032303,
0.5032771825790405,
0.01610240712761879,
0.1436363309621811,
-0.11915384978055954,
0.0993642807006836,
0.3589841425418854,
0.046263884752988815,
-0.2223188281059265,
-0.2488672137260437,
0.30262109637260437,
0.08158284425735474,
0.4269852042198181,
0.12820038199424744,
-0.14952309429645538,
0.02082769013941288,
0.020804837346076965,
-0.16235512495040894,
0.034799087792634964,
0.2654784619808197,
0.27462366223335266,
-0.028559325262904167,
0.27430227398872375,
-0.048757970333099365,
0.6123738884925842,
-0.12883548438549042,
0.16228558123111725,
0.08334428817033768,
-0.27826374769210815,
-0.2611790895462036,
0.09429283440113068,
-0.1272590160369873,
-0.1881011575460434,
0.16841554641723633,
0.2399555742740631,
-0.028327088803052902,
-0.24380280077457428,
-0.22515171766281128,
-0.1123572438955307,
0.2600668966770172,
-0.31672099232673645,
0.30921119451522827,
-0.165723979473114,
0.16264832019805908,
-0.22436672449111938,
-0.19491474330425262,
0.033977407962083817,
-0.21563288569450378,
-0.11140689253807068,
0.3362266719341278,
-0.04295080527663231,
0.24929237365722656,
-0.35986632108688354,
0.37891119718551636,
0.12707224488258362,
-0.6568132042884827,
-0.2761151194572449,
-0.049391984939575195,
-0.3580280840396881,
-0.07832671701908112,
0.3884335458278656,
-0.39230233430862427,
0.22307509183883667,
-0.4847135543823242,
-0.008307813666760921,
0.1642361432313919,
-0.49763503670692444,
0.244846373796463,
0.10522270947694778,
0.5596272945404053,
0.008848820813000202,
0.08865687251091003,
-0.23890292644500732,
-0.4123893082141876,
0.4063132405281067,
-0.26314204931259155,
-0.3811517655849457,
0.0973343476653099,
-0.0332760289311409,
-0.23520348966121674,
-0.5069956183433533,
-0.3434547483921051,
-0.26405444741249084,
-0.06903119385242462,
0.30378732085227966,
0.08826327323913574,
0.11016904562711716,
0.458525151014328,
0.40804871916770935,
-0.0020045624114573,
0.12820401787757874,
0.04671601578593254,
-0.07915616780519485,
-0.580621063709259,
0.29879075288772583,
-0.32131877541542053,
-0.30687129497528076,
-0.23980990052223206,
-0.12181895971298218,
0.40346649289131165,
0.2295234054327011,
-0.445657879114151,
-0.1923152506351471,
-0.1911015808582306,
0.44253477454185486,
0.1964615434408188,
0.009047289378941059,
0.2945616543292999,
0.007989419624209404,
0.002994953654706478,
-0.017132308334112167,
-0.25132790207862854,
0.2703385055065155,
0.10974559932947159,
0.3167889714241028,
0.003734830766916275,
0.2698604166507721,
0.037968531250953674,
0.6234941482543945,
0.312641441822052,
-0.23715053498744965,
0.36459845304489136,
0.1278413087129593,
0.4174310863018036,
-0.5137653946876526,
-0.3205946683883667,
0.3046327531337738,
-0.024383004754781723,
-0.4611193835735321,
-0.052329082041978836,
0.01290685310959816,
-0.6639070510864258,
-0.193910613656044,
0.016218731179833412,
-0.12644433975219727,
-0.3065946400165558,
0.279947966337204,
-0.22778990864753723,
0.32355499267578125,
-0.0602760873734951,
0.06507128477096558,
-0.17724807560443878,
-0.018254490569233894,
-0.023235831409692764,
0.2895422577857971,
0.04581242427229881,
0.07012512534856796,
-0.0966772809624672,
-0.39186200499534607,
-0.4547608494758606,
0.24722479283809662,
0.24363203346729279,
0.6850367784500122,
-0.2653807997703552,
-0.2727940082550049,
-0.012528524734079838,
0.015639739111065865,
0.008544083684682846,
0.23887820541858673,
-0.23277850449085236,
0.26906174421310425,
-0.3548615276813507,
-0.4105353057384491,
-0.22299198806285858,
-0.011319017969071865,
0.4066482484340668,
0.14725841581821442,
0.49679940938949585,
0.08193287253379822,
-0.14099228382110596,
0.2631056308746338,
0.1353672593832016,
0.055580150336027145,
0.03632977977395058,
-0.44706591963768005,
-0.38372811675071716,
-0.33552685379981995,
0.29882022738456726,
0.059284865856170654,
0.049351874738931656,
-0.1205604299902916,
-0.005728710442781448,
0.13241349160671234,
-0.019162792712450027,
0.0592210553586483,
0.37177520990371704,
-0.03193112090229988,
-0.09581640362739563,
0.09432662278413773,
-0.1094135195016861,
0.019468989223241806,
-0.01919957622885704,
0.16495278477668762,
0.011049763299524784,
0.06870965659618378,
0.20909596979618073,
-0.041629765182733536,
0.018017688766121864,
0.4032597243785858,
-0.08496639132499695,
-0.32522448897361755,
-0.0046239555813372135,
-0.06745722144842148,
-0.2609461843967438,
0.3393782079219818,
0.059050872921943665,
-0.028967615216970444,
-0.13176052272319794,
0.10667826235294342,
0.005407692864537239,
-0.030933573842048645,
-0.06704777479171753,
0.5506901741027832,
-0.02202031761407852,
-0.04178028553724289,
0.22688031196594238,
0.16521738469600677,
0.8252401351928711,
0.06444430351257324,
0.10214206576347351,
0.24965785443782806,
0.0548897348344326,
-0.19104520976543427,
0.3437012732028961,
0.016283854842185974,
-0.130666583776474,
0.26281169056892395,
0.005952337756752968,
-0.31692269444465637,
0.3387089669704437,
-0.12932100892066956,
-0.24768489599227905,
0.10913094133138657,
-0.37521082162857056,
0.3533780872821808,
0.06859751790761948,
-0.034446679055690765,
-0.3180186152458191,
-0.05508926138281822,
-0.011092090979218483,
0.11565548181533813,
0.11046510934829712,
0.596985399723053,
-0.09077723324298859,
0.05943458527326584,
-0.47128012776374817,
-0.32458266615867615,
-0.3380562365055084,
-0.04600588232278824,
-0.3487532436847687,
0.1952669769525528,
0.3555603623390198,
-0.5530382990837097,
-0.0638662576675415,
0.18386498093605042,
0.4580513536930084,
0.22211523354053497,
-0.33603405952453613,
-0.04483815282583237,
-0.08726545423269272,
0.1277051568031311,
0.4157731235027313,
-0.18991608917713165,
0.1803596466779709,
-0.07805398851633072,
-0.29371902346611023,
-0.22604767978191376,
-0.1601121574640274,
-0.34290504455566406,
0.39902782440185547,
0.08023598790168762,
0.06684847176074982,
-0.2352941781282425,
0.1735437661409378,
-0.14135676622390747,
0.0017308429814875126,
-0.024589721113443375,
0.060165081173181534,
0.011042360216379166,
0.0504644438624382,
0.3054957389831543,
-0.15860573947429657,
-0.18892453610897064,
-0.13475072383880615,
0.07679607719182968,
-0.03776559978723526,
-0.15416879951953888,
0.3368024230003357,
-0.23170310258865356,
-0.059079114347696304,
-0.10620839893817902,
0.18894624710083008,
-0.25157439708709717,
-0.2681213617324829,
0.08377433568239212,
-0.1097014993429184,
-0.3355261981487274,
-0.188918799161911,
0.5555796027183533,
0.2536104619503021,
0.14496971666812897,
0.06758507341146469,
-0.21992704272270203,
-0.6909093856811523,
0.14233316481113434,
0.04761742800474167,
0.2239871472120285,
-0.03853224962949753,
0.3672913908958435,
0.040475763380527496,
-0.17014025151729584,
-0.13037416338920593,
-0.17467549443244934,
-0.36406296491622925,
0.08017012476921082,
0.1796460747718811,
-0.13696454465389252,
0.3592992126941681,
-0.08911434561014175,
-0.015051739290356636,
0.055410489439964294,
0.005698263179510832,
-0.10878340154886246,
-0.10233939439058304,
0.1610950380563736,
-0.02099260315299034,
-0.34369346499443054,
0.22498100996017456,
0.0064686560072004795,
0.08985326439142227,
-0.24503688514232635,
-0.07616904377937317,
0.01710502617061138,
-0.017608460038900375,
-0.06699821352958679,
-0.31501084566116333,
0.12127713114023209,
0.012703681364655495,
0.161385178565979,
-0.011731981299817562,
0.29358887672424316,
-0.02300228923559189,
0.11981368809938431,
0.00018487483612261713,
-0.075052410364151,
0.1143966093659401,
0.23723892867565155,
-0.24273966252803802,
0.14282739162445068,
0.029105233028531075,
-0.19740790128707886,
-0.05497594177722931,
-0.04334073141217232,
0.3361029624938965,
0.1295175999403,
-0.1475604623556137,
0.07667835056781769,
0.3650749623775482,
0.07515918463468552,
-0.019595198333263397,
-0.025722375139594078,
0.10183309763669968,
0.1505986750125885,
0.022836856544017792,
0.5174663066864014,
0.023122569546103477,
-0.34358423948287964,
0.5378302931785583,
-0.07494453340768814,
0.22763608396053314,
-0.10151028633117676,
0.10557837784290314,
-0.04024026542901993,
-0.030313760042190552,
0.2926291525363922,
0.10186890512704849,
-0.18417543172836304,
0.20633140206336975,
-0.0679175928235054,
-0.12822429835796356,
-0.14122720062732697,
-0.18888190388679504,
0.28978267312049866,
-0.01435387134552002,
-0.1397298276424408,
0.15683071315288544,
-0.3757254183292389,
0.09371501207351685,
0.15007136762142181,
-0.05785675719380379,
0.5642966032028198,
-0.5855811238288879,
-0.2829948961734772,
-0.3944425880908966,
-0.14394311606884003,
-0.07905077934265137,
-0.16226230561733246,
-0.22227925062179565,
-0.015267199836671352,
0.08449903130531311,
0.05220949277281761,
0.032179128378629684,
0.20104731619358063,
0.3205498456954956,
0.1275770366191864,
-0.2623801529407501,
-0.33414629101753235,
-0.05279259756207466,
0.08784887939691544,
0.09494879096746445,
-0.02026618830859661,
0.5610432028770447,
0.23456211388111115,
-0.24237944185733795,
-0.20022355020046234,
0.47218766808509827,
0.5895763635635376,
0.3786366283893585,
0.1227319985628128,
-0.19510430097579956,
-0.22944597899913788,
0.012983215972781181,
-0.3257730007171631,
0.2213950902223587,
0.12427224963903427,
-0.01316396426409483,
-0.053253743797540665,
0.05742364749312401,
-0.07164669781923294,
0.007535609882324934,
-0.14398762583732605,
0.0037620477378368378,
-0.1829032003879547,
0.44682496786117554,
-0.09854372590780258,
0.09385031461715698,
0.051418740302324295,
0.155465230345726,
-0.24136078357696533,
0.2823244333267212,
0.08885768800973892,
0.05735323950648308,
0.20492291450500488,
0.11411052197217941,
0.002820192836225033,
-0.061785321682691574,
0.44796517491340637,
0.23571671545505524,
0.21317659318447113,
-0.22734445333480835,
-0.18074047565460205,
-0.18360117077827454,
0.1141180768609047,
0.1576027125120163,
0.2857300341129303,
-0.11369398236274719,
0.22414995729923248,
0.1839514523744583,
0.07126497477293015,
-0.04945700988173485,
-0.30807918310165405,
0.0026937955990433693,
-0.04280367121100426,
-0.2135600596666336,
-0.012730339542031288,
-0.4230504333972931,
-0.18993884325027466,
0.09159798175096512,
-0.4213809072971344,
0.3242902159690857,
-0.24750949442386627,
-0.0484456792473793,
0.04069774970412254,
-0.24192078411579132,
0.18704840540885925,
-0.10467296093702316,
0.25839152932167053,
0.4208632707595825,
0.4123573303222656,
0.12196637690067291,
-0.28010401129722595,
-0.2073027342557907,
-0.3272327780723572,
0.10925466567277908,
0.15121379494667053,
-0.2796408236026764,
0.3367857336997986,
-0.24442651867866516,
0.038639381527900696,
-0.24676792323589325,
0.390726774930954,
0.19720162451267242,
-0.38326817750930786,
0.3099580705165863,
-0.1385190784931183,
-0.28704723715782166,
-0.1150682345032692,
0.04468408599495888,
0.5041114091873169,
-0.11775727570056915,
0.2682074308395386,
-0.25250813364982605,
-0.16203977167606354,
0.5046148300170898,
-0.43645790219306946,
-0.0934121161699295,
-0.029393479228019714,
0.05014486238360405,
-0.1696915328502655,
-0.048945166170597076,
-0.3520064949989319,
-0.05491437017917633,
-0.012023656629025936,
-0.10737653821706772,
-0.3854920566082001,
0.3357226550579071,
0.22343190014362335,
-0.03219892084598541,
-0.04044560715556145,
0.7254135608673096,
-0.2031802088022232,
-0.025389861315488815,
0.043090835213661194,
-0.07357334345579147
] |
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.21295084059238434,
0.08236498385667801,
0.02384120412170887,
0.09466218203306198,
0.049615420401096344,
-0.19082441926002502,
0.38125523924827576,
0.31044313311576843,
0.05058375373482704,
0.22537113726139069,
0.13752444088459015,
0.11011480540037155,
-0.18604980409145355,
0.6575946807861328,
-0.11238294839859009,
0.15623413026332855,
0.06747852265834808,
0.2533711791038513,
-0.026602061465382576,
0.1312379688024521,
-0.12005855143070221,
0.26802536845207214,
-0.24322457611560822,
-0.0653257742524147,
-0.23362626135349274,
-0.007685874588787556,
-0.15736879408359528,
0.22698719799518585,
-0.18694938719272614,
-0.5005517601966858,
0.7258079051971436,
-0.05969494581222534,
-0.011777139268815517,
0.6850963830947876,
-0.00012768027954734862,
0.04602895677089691,
0.5900765657424927,
-0.13112448155879974,
-0.2848139703273773,
-0.2090541422367096,
0.12253250181674957,
-0.009903905913233757,
0.4425724148750305,
-0.05848568677902222,
-0.0636175125837326,
0.42321303486824036,
-0.38443273305892944,
-0.4504120945930481,
0.30817723274230957,
0.34122583270072937,
0.08565615862607956,
0.6891779899597168,
-0.1833493709564209,
-0.06472697108983994,
-0.15570713579654694,
0.7216375470161438,
-0.273509681224823,
0.5735638737678528,
0.4503452479839325,
-0.12010257691144943,
-0.06787845492362976,
-0.10771500319242477,
0.11484076827764511,
0.18800035119056702,
-0.122489333152771,
0.02248505689203739,
-0.09368567913770676,
-0.18824037909507751,
0.13830076158046722,
-0.07370156794786453,
0.324982613325119,
-0.2547631859779358,
-0.3429167568683624,
0.18587437272071838,
-0.1495690792798996,
-0.5330843329429626,
0.51463383436203,
-0.1113535538315773,
-0.4768414795398712,
0.19159799814224243,
-0.5451621413230896,
0.2967487871646881,
-0.0748954713344574,
0.1553913950920105,
-0.3125764727592468,
-0.0832715854048729,
-0.10468655079603195,
0.11072444915771484,
-0.0891970545053482,
-0.0674922987818718,
0.09891841560602188,
0.17871436476707458,
-0.007631674874573946,
0.28727856278419495,
0.10704745352268219,
-0.2111828625202179,
0.014470446854829788,
0.39947420358657837,
0.17871053516864777,
0.4556690454483032,
-0.25141817331314087,
-0.07275279611349106,
0.12223118543624878,
0.12186755985021591,
-0.008882232941687107,
0.38635167479515076,
0.21461912989616394,
0.23066318035125732,
0.37584197521209717,
0.02321747876703739,
-0.08103588968515396,
0.141519695520401,
0.22081975638866425,
-0.2816312611103058,
0.28228864073753357,
-0.03218623250722885,
0.14620360732078552,
-0.4389747381210327,
-0.09227105230093002,
0.22294065356254578,
-0.06820216774940491,
0.016792001202702522,
0.23276737332344055,
0.2272418588399887,
0.1824130415916443,
0.15234903991222382,
0.09443008899688721,
0.42983028292655945,
-0.17783527076244354,
0.27267366647720337,
-0.08764573186635971,
-0.1687573492527008,
-0.153764009475708,
0.19565117359161377,
0.4986809492111206,
-0.15370459854602814,
0.45613017678260803,
-0.005797836929559708,
0.6063703298568726,
-0.03109867498278618,
0.020663850009441376,
-0.0275876447558403,
0.2237471044063568,
0.45273420214653015,
-0.26693180203437805,
-0.02317282371222973,
0.3080403208732605,
-0.22730718553066254,
-0.32173413038253784,
0.049948759377002716,
0.10058461874723434,
-0.4410422444343567,
-0.21975909173488617,
-0.018829580396413803,
-0.2830902338027954,
-0.01069366093724966,
0.2729877233505249,
-0.48640185594558716,
0.20794279873371124,
0.0007706154137849808,
0.06493491679430008,
-0.2876133620738983,
0.10681720077991486,
0.10759277641773224,
0.20905230939388275,
0.5335056781768799,
0.019547704607248306,
-0.04795926436781883,
0.07985380291938782,
0.07931798696517944,
0.285722941160202,
0.3176197409629822,
-0.2670464515686035,
-0.09587100893259048,
-0.1992756724357605,
-0.19474205374717712,
0.42576754093170166,
-0.5156857371330261,
-0.17742986977100372,
0.3740009367465973,
0.15634196996688843,
-0.19855724275112152,
-0.049448926001787186,
-0.26841428875923157,
0.06577218323945999,
0.09862248599529266,
0.240213081240654,
0.056743621826171875,
-0.16658876836299896,
0.06019316613674164,
-0.3022296130657196,
-0.2904706597328186,
-0.021046210080385208,
0.033827267587184906,
0.024978477507829666,
0.1769678145647049,
0.19980588555335999,
-0.4017610251903534,
0.11792939901351929,
-0.0926959216594696,
-0.11643525958061218,
0.020585214719176292,
0.5448550581932068,
-0.38643988966941833,
-0.003612854517996311,
0.19993723928928375,
-0.032769739627838135,
0.3577798902988434,
-0.0780034139752388,
0.20455482602119446,
-0.14009492099285126,
-0.020907333120703697,
-0.5408802628517151,
0.3800974190235138,
-0.09910188615322113,
-0.0528336837887764,
-0.11798565089702606,
0.060911182314157486,
0.3830111622810364,
0.1435607522726059,
-0.24020864069461823,
0.06536483019590378,
-0.07747497409582138,
0.09466508030891418,
0.290998637676239,
-0.08611371368169785,
-0.32879185676574707,
-0.4251502454280853,
-0.15633393824100494,
-0.023316366598010063,
0.004896839614957571,
-0.22420945763587952,
-0.4006008803844452,
0.21714845299720764,
0.08867450803518295,
-0.14165712893009186,
0.07461299002170563,
0.09536183625459671,
0.23191650211811066,
0.028280556201934814,
-0.005821441300213337,
0.011978555470705032,
-0.18691743910312653,
-0.03538468852639198,
0.01479362789541483,
0.4722611606121063,
0.029820449650287628,
0.08339875936508179,
-0.15918810665607452,
0.1093277633190155,
0.35306620597839355,
0.023485573008656502,
-0.1824236363172531,
-0.3159003257751465,
0.2667005956172943,
0.031715866178274155,
0.588888943195343,
0.1291598379611969,
-0.14106114208698273,
-0.10752753913402557,
-0.05082115903496742,
-0.15997248888015747,
-0.001790566137060523,
0.18705017864704132,
0.22710107266902924,
-0.015888476744294167,
0.2266933172941208,
-0.11016655713319778,
0.553196132183075,
-0.15857945382595062,
0.07493415474891663,
0.18165065348148346,
-0.2237861454486847,
-0.30287081003189087,
0.1822274774312973,
-0.1517622321844101,
-0.011957310140132904,
0.14674609899520874,
0.22637684643268585,
-0.059296730905771255,
-0.23833203315734863,
-0.21996265649795532,
-0.06923679262399673,
0.18346676230430603,
-0.3558003604412079,
0.240716353058815,
-0.1439509242773056,
0.0936436727643013,
-0.3681104779243469,
-0.21255363523960114,
0.0038103300612419844,
-0.25374940037727356,
-0.12566576898097992,
0.25704747438430786,
0.01670527644455433,
0.21248947083950043,
-0.30557191371917725,
0.4417040944099426,
0.11034717410802841,
-0.6165690422058105,
-0.23074860870838165,
-0.04218040034174919,
-0.28746142983436584,
-0.11028333008289337,
0.34401413798332214,
-0.42519474029541016,
0.14426228404045105,
-0.5436751246452332,
-0.010643431916832924,
0.20997703075408936,
-0.5716854333877563,
0.361041396856308,
0.1101279929280281,
0.5630653500556946,
0.09088978171348572,
0.13597837090492249,
-0.08333569020032883,
-0.3285454511642456,
0.39074504375457764,
-0.28110429644584656,
-0.3202840983867645,
0.11164585500955582,
-0.05928751453757286,
-0.23867055773735046,
-0.48340821266174316,
-0.22417502105236053,
-0.17322175204753876,
-0.048670243471860886,
0.2961145341396332,
0.08135105669498444,
0.06921517848968506,
0.43724873661994934,
0.3239244818687439,
-0.0071030049584805965,
0.08791621774435043,
0.049215011298656464,
-0.032304443418979645,
-0.6007463335990906,
0.2518292963504791,
-0.23728449642658234,
-0.28545302152633667,
-0.15979453921318054,
-0.08642644435167313,
0.4862287938594818,
0.09819342195987701,
-0.39986249804496765,
-0.1802985966205597,
-0.12120231986045837,
0.49781858921051025,
0.17718619108200073,
-0.09013094753026962,
0.31635263562202454,
0.02466234564781189,
0.049382489174604416,
-0.057371824979782104,
-0.2262755036354065,
0.18441244959831238,
-0.00437528733164072,
0.314506858587265,
0.017887137830257416,
0.22936509549617767,
-0.07370241731405258,
0.672205924987793,
0.2346593588590622,
-0.26088008284568787,
0.3040288984775543,
0.09127943962812424,
0.3293501138687134,
-0.45123958587646484,
-0.20178382098674774,
0.2601117789745331,
0.024302009493112564,
-0.47628840804100037,
-0.043738409876823425,
0.024765733629465103,
-0.6657320857048035,
-0.13949723541736603,
0.17448575794696808,
-0.1548580527305603,
-0.18061023950576782,
0.25037434697151184,
-0.29515743255615234,
0.3791857957839966,
-0.09469814598560333,
0.11344137042760849,
-0.13528533279895782,
-0.031215427443385124,
-0.01091512106359005,
0.33985912799835205,
-0.1045142337679863,
0.042121805250644684,
-0.12971550226211548,
-0.4960710108280182,
-0.3819332420825958,
0.23054732382297516,
0.21823854744434357,
0.6499727964401245,
-0.21021491289138794,
-0.364165335893631,
0.024985671043395996,
0.04654369503259659,
0.09636484831571579,
0.17627786099910736,
-0.23801590502262115,
0.27217352390289307,
-0.37350401282310486,
-0.4916272759437561,
-0.2925334870815277,
0.025582611560821533,
0.40434515476226807,
0.07840053737163544,
0.5375288724899292,
0.12646403908729553,
-0.12717892229557037,
0.13428398966789246,
0.11026692390441895,
0.09292183071374893,
-0.03757568448781967,
-0.45432811975479126,
-0.4238274097442627,
-0.3833254277706146,
0.31483325362205505,
0.019740350544452667,
0.03449881449341774,
-0.20984825491905212,
0.024978283792734146,
0.031226573511958122,
0.01653861626982689,
-0.0720837339758873,
0.39441388845443726,
0.02235206961631775,
-0.13451597094535828,
0.09044381976127625,
-0.08835851401090622,
0.0729420855641365,
-0.02017584629356861,
0.14702415466308594,
0.11288498342037201,
0.09449223428964615,
0.1423826515674591,
-0.11684415489435196,
-0.03568306937813759,
0.45736756920814514,
-0.03838152810931206,
-0.19472213089466095,
0.10691332072019577,
-0.10834217071533203,
-0.2660883069038391,
0.21292540431022644,
0.012190554291009903,
-0.0684785470366478,
-0.0959034413099289,
0.13708294928073883,
0.022637860849499702,
-0.0034934459254145622,
-0.09942420572042465,
0.4119970500469208,
-0.05516992509365082,
-0.029877226799726486,
0.36515188217163086,
0.1775614619255066,
0.8157601952552795,
-0.00866618100553751,
0.06927763670682907,
0.2503993511199951,
-0.0209908839315176,
-0.34508016705513,
0.5113015174865723,
-0.040165599435567856,
-0.2692534625530243,
0.2452152967453003,
-0.014184453524649143,
-0.36030781269073486,
0.31927865743637085,
-0.12704479694366455,
-0.2522833049297333,
0.003698674961924553,
-0.4036070704460144,
0.327836275100708,
0.06436673551797867,
-0.12360215932130814,
-0.35938724875450134,
-0.03458719700574875,
-0.14254777133464813,
0.08362559229135513,
0.12839579582214355,
0.6133266687393188,
-0.11067929863929749,
0.07679305225610733,
-0.37904495000839233,
-0.319816529750824,
-0.3265845775604248,
-0.06535622477531433,
-0.27352800965309143,
0.20314325392246246,
0.49235236644744873,
-0.4473855197429657,
-0.007633635774254799,
0.18971295654773712,
0.5910067558288574,
0.21510115265846252,
-0.3710514307022095,
-0.02413574419915676,
0.09597661346197128,
0.018728002905845642,
0.39187556505203247,
-0.1623624861240387,
0.13908685743808746,
-0.04677256941795349,
-0.3181009590625763,
-0.199957013130188,
-0.24352046847343445,
-0.33898040652275085,
0.3941817283630371,
0.0037320589181035757,
-0.09338279068470001,
-0.30953890085220337,
0.13876082003116608,
-0.1527010053396225,
0.07070650905370712,
-0.03479663282632828,
0.04512162134051323,
0.007147604133933783,
0.09959502518177032,
0.32695668935775757,
-0.07984180748462677,
-0.20072931051254272,
-0.11528795957565308,
0.03909382224082947,
-0.05778563395142555,
-0.1012965738773346,
0.38049477338790894,
-0.11017213761806488,
-0.005504454951733351,
-0.11181671917438507,
0.15054018795490265,
-0.20896150171756744,
-0.24609939754009247,
0.0759304016828537,
-0.11049657315015793,
-0.3170502781867981,
-0.09751752018928528,
0.5581839084625244,
0.2994672358036041,
0.15949805080890656,
0.051262106746435165,
-0.1069934293627739,
-0.670662522315979,
0.1032543033361435,
0.06696933507919312,
0.21338112652301788,
0.014642979018390179,
0.4575366973876953,
-0.010357121005654335,
-0.21442309021949768,
-0.12200741469860077,
-0.08851876854896545,
-0.37799185514450073,
0.05714334547519684,
0.06815643608570099,
-0.07522176951169968,
0.35187622904777527,
-0.16780529916286469,
-0.030530616641044617,
0.025039415806531906,
-0.049674857407808304,
-0.0900232121348381,
-0.04621659964323044,
0.1742309331893921,
0.04842919483780861,
-0.3221479654312134,
0.31578606367111206,
0.006481923628598452,
0.1183682531118393,
-0.11517121642827988,
0.0057882284745574,
-0.08561557531356812,
0.014218758791685104,
-0.08096938580274582,
-0.2023143172264099,
0.0976981371641159,
-0.11701799184083939,
0.0960860475897789,
-0.09269280731678009,
0.3523992896080017,
-0.08898559212684631,
0.1439664661884308,
-0.055491331964731216,
-0.04779759794473648,
0.2524559199810028,
0.26997509598731995,
-0.20415562391281128,
0.16875101625919342,
0.030309410765767097,
-0.28957629203796387,
0.017219943925738335,
0.06558258086442947,
0.3042152523994446,
0.08053965121507645,
-0.2911086976528168,
0.12011770904064178,
0.294872522354126,
0.07223457098007202,
0.04547340050339699,
-0.012031160295009613,
-0.12173717468976974,
0.16137981414794922,
-0.015614686533808708,
0.49487072229385376,
0.20025989413261414,
-0.3090689182281494,
0.40067049860954285,
-0.03242696821689606,
0.3457435071468353,
-0.030457625165581703,
0.055967751890420914,
-0.005586717743426561,
-0.029682662338018417,
0.2638402581214905,
0.19787561893463135,
-0.12670914828777313,
0.1102813333272934,
-0.1203785091638565,
-0.08202476799488068,
-0.04440434277057648,
-0.2603597342967987,
0.3358688950538635,
-0.05842925235629082,
-0.10321960598230362,
0.2719578444957733,
-0.33370378613471985,
0.11023793369531631,
0.06331058591604233,
-0.002089652931317687,
0.6600572466850281,
-0.6151896119117737,
-0.3002285659313202,
-0.3712921440601349,
-0.17743045091629028,
-0.06519660353660583,
-0.1714659035205841,
-0.3542008101940155,
0.05013963580131531,
0.04438140615820885,
0.06222165375947952,
-0.06412793695926666,
0.25484156608581543,
0.32293424010276794,
0.1223638728260994,
-0.20197567343711853,
-0.4548485577106476,
-0.06044632941484451,
0.0894835814833641,
0.0883827731013298,
-0.05646342411637306,
0.5304107069969177,
0.1447066217660904,
-0.31502020359039307,
-0.12226651608943939,
0.539900541305542,
0.6615060567855835,
0.28592294454574585,
0.09713804721832275,
-0.25609925389289856,
-0.2292700856924057,
0.009942184202373028,
-0.2649984359741211,
0.12559418380260468,
0.15156792104244232,
0.10816045105457306,
-0.058122362941503525,
0.058435194194316864,
-0.041793081909418106,
0.04283658042550087,
-0.14702056348323822,
0.06761418282985687,
-0.1739848107099533,
0.3367728590965271,
-0.035660140216350555,
0.15515688061714172,
0.002647523069754243,
0.19357319176197052,
-0.23814763128757477,
0.3953498303890228,
0.13320282101631165,
0.08254031836986542,
0.17719826102256775,
0.1677246391773224,
-0.0010881698690354824,
0.06688063591718674,
0.5126705169677734,
0.2918177843093872,
0.15037468075752258,
-0.18541263043880463,
-0.28787127137184143,
-0.19384147226810455,
0.13870005309581757,
0.16636969149112701,
0.2949789762496948,
-0.04888424649834633,
0.18594495952129364,
0.12059789150953293,
0.08942486345767975,
-0.011965988203883171,
-0.1441289633512497,
-0.12153839319944382,
-0.13357719779014587,
-0.1835172176361084,
-0.02500431425869465,
-0.3701709806919098,
-0.1906796544790268,
0.014999625273048878,
-0.3371477723121643,
0.35247355699539185,
-0.14099034667015076,
-0.06371957063674927,
-0.05437282845377922,
-0.21873530745506287,
0.17819613218307495,
-0.2250034064054489,
0.2600576877593994,
0.3480684459209442,
0.32724618911743164,
0.16481097042560577,
-0.3105277717113495,
-0.11078937351703644,
-0.40635448694229126,
0.023759327828884125,
0.18056634068489075,
-0.3148145079612732,
0.3108046054840088,
-0.21335363388061523,
-0.027485666796565056,
-0.23380018770694733,
0.26573213934898376,
0.17443230748176575,
-0.34078675508499146,
0.1513766050338745,
-0.13942530751228333,
-0.2918333113193512,
-0.08409624546766281,
0.16672170162200928,
0.4874754250049591,
-0.11432860046625137,
0.2222248911857605,
-0.16199131309986115,
-0.2502764165401459,
0.4320523142814636,
-0.31461301445961,
-0.03567880019545555,
0.017135756090283394,
-0.030336393043398857,
-0.23457325994968414,
-0.05236976966261864,
-0.3275544047355652,
-0.05477948859333992,
-0.07552003860473633,
-0.1453132927417755,
-0.40742263197898865,
0.3302374482154846,
0.24674789607524872,
-0.029241254553198814,
-0.07922754436731339,
0.6571493148803711,
-0.1429576575756073,
0.004196410533040762,
-0.0779268741607666,
-0.033836133778095245
] |
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.06302601844072342,
-0.05598887428641319,
-0.05370459705591202,
0.10702980309724808,
0.0235678069293499,
0.16932448744773865,
0.3407929241657257,
0.10250890254974365,
-0.1445973813533783,
-0.16507552564144135,
0.08257517218589783,
0.3592205047607422,
0.047547597438097,
0.022965682670474052,
0.1957676261663437,
-0.22672049701213837,
0.09677009284496307,
0.14181400835514069,
-0.016017859801650047,
-0.15531186759471893,
-0.34047937393188477,
0.2601728141307831,
-0.3286115229129791,
0.3037527799606323,
-0.24053584039211273,
-0.21402423083782196,
-0.1296742707490921,
0.3539069890975952,
-0.4259348511695862,
-0.2638634145259857,
0.21498502790927887,
0.17327764630317688,
-0.15612386167049408,
0.19875982403755188,
-0.00011244768393225968,
0.0061699929647147655,
0.2945781946182251,
-0.18925289809703827,
-0.17909230291843414,
0.021083388477563858,
-0.3679368197917938,
-0.17750458419322968,
0.028906086459755898,
-0.35336029529571533,
0.19100263714790344,
-0.32744887471199036,
0.036587271839380264,
-0.15655741095542908,
0.5122280120849609,
0.19034340977668762,
0.15557730197906494,
0.023027144372463226,
0.13952115178108215,
-0.18158994615077972,
-0.16110314428806305,
0.571494996547699,
-0.24545814096927643,
-0.11392015963792801,
0.04088398441672325,
0.11853379756212234,
0.0628221184015274,
0.21830816566944122,
0.09054258465766907,
-0.11169090121984482,
0.46554356813430786,
-0.0411250963807106,
-0.2104082703590393,
-0.538992166519165,
0.09714784473180771,
0.28544777631759644,
0.5018539428710938,
-0.26400789618492126,
-0.25954604148864746,
-0.25309816002845764,
-0.18307065963745117,
-0.14830870926380157,
-0.13075070083141327,
0.3472190797328949,
-0.37249556183815,
-0.010221963748335838,
-0.31856632232666016,
-0.2991985082626343,
-0.26646170020103455,
-0.3025459051132202,
0.14885416626930237,
0.3738003671169281,
-0.15064945816993713,
0.14002524316310883,
0.04731767252087593,
0.12097679078578949,
-0.06525995582342148,
-0.22757385671138763,
0.028453323990106583,
0.4920312166213989,
0.033474504947662354,
-0.14789612591266632,
0.2251163125038147,
0.0053132325410842896,
0.4009974002838135,
0.22510656714439392,
-0.0026089539751410484,
-0.266342431306839,
0.07310818135738373,
0.19786103069782257,
0.35880470275878906,
-0.20315659046173096,
0.369966596364975,
0.0002883477136492729,
0.06916660815477371,
0.014731739647686481,
0.2263578325510025,
-0.1669274866580963,
0.16841119527816772,
-0.3830893039703369,
0.04494162276387215,
0.037932105362415314,
0.3937675952911377,
-0.1123330146074295,
-0.09585317224264145,
0.041417885571718216,
-0.1373913437128067,
-0.3935706913471222,
0.05582445487380028,
0.04933445528149605,
0.2171516716480255,
-0.0029185786843299866,
-0.08906155824661255,
-0.10216599702835083,
-0.12448527663946152,
-0.2616608738899231,
-0.2409769892692566,
0.2836475074291229,
-0.18666741251945496,
0.17430542409420013,
-0.19422055780887604,
-0.20254643261432648,
0.3773418664932251,
0.20094799995422363,
0.26534557342529297,
0.14258645474910736,
0.10700137168169022,
0.18380413949489594,
0.13371220231056213,
0.2818726897239685,
-0.035308994352817535,
0.17374107241630554,
0.2208315134048462,
0.03797104209661484,
-0.30280858278274536,
0.021115873008966446,
-0.4155864119529724,
-0.38428449630737305,
0.04517179727554321,
0.10549954324960709,
-0.2765238583087921,
0.1617230772972107,
-0.20132972300052643,
0.33486437797546387,
0.054600514471530914,
-0.11717221140861511,
0.09207187592983246,
0.010470887646079063,
-0.03906862065196037,
-0.5046523213386536,
0.3123728632926941,
0.456910103559494,
-0.4068640470504761,
-0.147086039185524,
-0.19765672087669373,
-0.23949119448661804,
-0.014220096170902252,
0.017831293866038322,
-0.3050231337547302,
0.40718039870262146,
-0.20980443060398102,
0.4111054837703705,
0.5502249002456665,
-0.026427047327160835,
0.2617901563644409,
0.4143199026584625,
0.24409858882427216,
0.0400959849357605,
0.19678109884262085,
-0.365397572517395,
0.12812545895576477,
-0.17263157665729523,
-0.2287610024213791,
0.10942500084638596,
-0.12042000889778137,
-0.2198891043663025,
0.09268125891685486,
0.0025509342085570097,
-0.12289353460073471,
-0.17690204083919525,
-0.11595126241445541,
0.013555835001170635,
0.010281236842274666,
0.19566333293914795,
0.40946707129478455,
-0.2382921427488327,
0.14610019326210022,
0.3196187913417816,
0.30913811922073364,
-0.19955028593540192,
0.22278638184070587,
0.057503942400217056,
-0.6098822951316833,
-0.08887380361557007,
0.019350960850715637,
0.10566284507513046,
-0.16841930150985718,
-0.2631373107433319,
-0.39379778504371643,
0.07140384614467621,
-0.24209801852703094,
-0.2368244081735611,
0.11458039283752441,
-0.09829528629779816,
0.27838727831840515,
-0.18276090919971466,
-0.3041555881500244,
-0.017916232347488403,
-0.02067437209188938,
0.07759805768728256,
-0.6391501426696777,
0.19063198566436768,
-0.03630189225077629,
0.15592245757579803,
-0.05304690822958946,
0.04594432935118675,
0.06311874836683273,
-0.23247645795345306,
0.17147508263587952,
0.4587950110435486,
0.4186861217021942,
-0.033392902463674545,
-0.06339985132217407,
0.3129432499408722,
-0.034199535846710205,
-0.026127584278583527,
0.30358198285102844,
-0.04394041746854782,
0.165085569024086,
0.05736691132187843,
-0.335843950510025,
0.43239453434944153,
-0.2407270073890686,
0.33305811882019043,
0.2003156840801239,
0.020713893696665764,
0.15678444504737854,
0.19186271727085114,
-0.16068385541439056,
-0.11378743499517441,
-0.25596871972084045,
0.2064647674560547,
0.3144344091415405,
0.08097883313894272,
-0.29166314005851746,
0.4554886519908905,
0.5633223652839661,
-0.326016366481781,
-0.2243342101573944,
0.019281882792711258,
0.019523410126566887,
-0.37285277247428894,
-0.06733868271112442,
0.3394283056259155,
0.5309391617774963,
0.02498745173215866,
0.17431221902370453,
0.08868531882762909,
-0.26710599660873413,
-0.2269400805234909,
0.41968896985054016,
0.07941862940788269,
0.061002980917692184,
0.06512640416622162,
-0.500226616859436,
-0.26578134298324585,
-0.34898126125335693,
-0.15418818593025208,
0.2562902867794037,
0.21850843727588654,
-0.3675776720046997,
0.28024888038635254,
0.06447722017765045,
0.12093499302864075,
-0.2625289559364319,
-0.1141393706202507,
-0.27506619691848755,
-0.5612821578979492,
0.04269188642501831,
-0.029997793957591057,
-0.08988887071609497,
0.04500860348343849,
0.03528498113155365,
0.2285890132188797,
-0.02470359392464161,
0.17709289491176605,
-0.300034761428833,
-0.1925521343946457,
-0.02623811736702919,
0.10838453471660614,
-0.004430391360074282,
0.019843121990561485,
0.21941325068473816,
-0.1660427302122116,
0.11929840594530106,
-0.26695138216018677,
-0.37010371685028076,
0.2968110740184784,
-0.4268537163734436,
0.28549924492836,
0.7126975059509277,
0.34220367670059204,
0.04949773848056793,
-0.23329010605812073,
0.05046415328979492,
-0.14689137041568756,
-0.2825327217578888,
-0.2010699063539505,
-0.10710462182760239,
0.0724872499704361,
-0.3547920286655426,
-0.5272270441055298,
0.03417247533798218,
-0.20805633068084717,
0.24928875267505646,
-0.05738874152302742,
0.25173962116241455,
0.2855531871318817,
0.20628668367862701,
0.24444440007209778,
0.0874435156583786,
0.16485781967639923,
-0.16097605228424072,
-0.3166236877441406,
0.28561660647392273,
-0.48654037714004517,
-0.15366265177726746,
0.10324651747941971,
-0.0922757238149643,
0.46346864104270935,
-0.036910347640514374,
-0.10640639066696167,
-0.37019962072372437,
-0.11865513771772385,
0.04247063025832176,
0.01869693584740162,
0.38416895270347595,
0.16901542246341705,
-0.027305835857987404,
0.025608796626329422,
-0.3647846281528473,
-0.10001400113105774,
0.055191975086927414,
-0.34730738401412964,
0.1823517382144928,
0.060892313718795776,
0.41554999351501465,
-0.07044842839241028,
0.6626817584037781,
0.33342573046684265,
0.040707506239414215,
-0.05795106664299965,
-0.11775550991296768,
0.48179662227630615,
-0.019930195063352585,
-0.1661500781774521,
0.07487087696790695,
0.1015368103981018,
-0.1329636573791504,
0.09534302353858948,
0.09037261456251144,
0.09375084191560745,
0.14870144426822662,
-0.02741466462612152,
-0.26318731904029846,
-0.35217544436454773,
0.12544655799865723,
0.21026313304901123,
0.27742522954940796,
-0.07122676819562912,
0.2989461123943329,
-0.19032451510429382,
0.1821182817220688,
-0.25480395555496216,
0.4908549189567566,
0.6145687699317932,
0.08277596533298492,
-0.3357670307159424,
-0.1644795686006546,
-0.34406280517578125,
0.13100257515907288,
-0.007412429433315992,
-0.08518429845571518,
-0.09274356067180634,
-0.12339603155851364,
0.14148153364658356,
-0.1461154818534851,
0.41383734345436096,
-0.34779617190361023,
-0.19352807104587555,
0.15258227288722992,
-0.01632150262594223,
-0.17387902736663818,
0.0659220963716507,
-0.15772244334220886,
0.29363346099853516,
0.1764199584722519,
0.0440504252910614,
-0.5996689200401306,
-0.49800148606300354,
0.1934526115655899,
0.010828571394085884,
-0.20418135821819305,
0.12988127768039703,
-0.15110506117343903,
-0.6448941230773926,
-0.0861663669347763,
-0.13225555419921875,
0.18498994410037994,
0.054524973034858704,
-0.17930744588375092,
0.3947928249835968,
0.13125988841056824,
0.12182243913412094,
0.15209878981113434,
0.46954724192619324,
0.3066176772117615,
-0.11204670369625092,
-0.20649170875549316,
0.07654127478599548,
0.1102181077003479,
0.020254462957382202,
0.3572824001312256,
-0.14492526650428772,
-0.24036182463169098,
-0.002213643165305257,
-0.280056357383728,
0.5578083395957947,
0.29270368814468384,
-0.19023485481739044,
0.03479362651705742,
-0.14908945560455322,
-0.13576899468898773,
-0.23948705196380615,
0.0017743561184033751,
0.3852314054965973,
-0.3035713732242584,
-0.30608323216438293,
-0.869811475276947,
0.4335881769657135,
0.3480955958366394,
-0.2058621346950531,
0.34832626581192017,
0.3761310875415802,
-0.24766749143600464,
0.0583864264190197,
0.38353243470191956,
0.7816469073295593,
0.43720361590385437,
0.23352454602718353,
0.4435303807258606,
-0.2188878208398819,
0.5801466107368469,
0.05651453509926796,
-0.07854174822568893,
-0.4775752127170563,
0.004559254739433527,
-0.21903292834758759,
-0.16594377160072327,
0.25114649534225464,
0.38878369331359863,
-0.21797439455986023,
0.1936330497264862,
-0.18722130358219147,
0.067707359790802,
-0.16185040771961212,
0.22551825642585754,
-0.1253628432750702,
-0.09130211174488068,
-0.2029476761817932,
0.1133401021361351,
0.05698476359248161,
-0.003909663297235966,
-0.04604553431272507,
-0.2679024934768677,
0.06449509412050247,
-0.41966426372528076,
-0.36844930052757263,
-0.06099580228328705,
0.30795520544052124,
0.06724241375923157,
0.24745923280715942,
-0.22703109681606293,
0.38865411281585693,
0.12021542340517044,
0.2785611152648926,
-0.06698215007781982,
-0.12096482515335083,
0.17906497418880463,
-0.17073702812194824,
0.015560279600322247,
-0.15390382707118988,
0.16772374510765076,
0.41689997911453247,
0.096980981528759,
-0.0540141724050045,
0.05655547231435776,
-0.15893304347991943,
-0.08833485096693039,
-0.47503727674484253,
0.18106317520141602,
-0.23704570531845093,
-0.5176572799682617,
-0.11484450846910477,
0.08287270367145538,
-0.2824344038963318,
-0.07623057067394257,
0.05548924207687378,
0.2443854957818985,
-0.2320573329925537,
0.29360243678092957,
-0.3023996353149414,
-0.022481463849544525,
0.04890760779380798,
-0.23020093142986298,
0.08625973761081696,
0.03687252104282379,
0.26180458068847656,
0.011296326294541359,
-0.13818222284317017,
-0.3272832930088043,
0.20004020631313324,
0.5726198554039001,
-0.6263510584831238,
0.25644049048423767,
0.2468700259923935,
0.1769988238811493,
0.15484069287776947,
0.17776095867156982,
-0.18418940901756287,
0.34372931718826294,
-0.21179549396038055,
-0.3027583062648773,
0.032109200954437256,
0.30651241540908813,
-0.22231309115886688,
0.2031896561384201,
0.02340123988687992,
-0.01578621007502079,
0.19777469336986542,
0.11794579029083252,
-0.29932424426078796,
0.11516793072223663,
0.1789739727973938,
0.03591495007276535,
0.20885677635669708,
0.015479887835681438,
0.10032796859741211,
0.07520937919616699,
0.0038777778390794992,
-0.05265389382839203,
-0.3928082585334778,
-0.11687352508306503,
-0.21869073808193207,
0.18305806815624237,
-0.028858615085482597,
-0.1877182573080063,
0.14997760951519012,
0.166844442486763,
-0.4248853623867035,
-0.05393482744693756,
0.3341395854949951,
-0.03730802237987518,
0.055167801678180695,
0.27432000637054443,
0.13238899409770966,
0.15287043154239655,
-0.17300839722156525,
-0.15095467865467072,
0.13436250388622284,
0.42465415596961975,
0.22463098168373108,
0.24329859018325806,
-0.22409693896770477,
-0.08632539212703705,
-0.15762671828269958,
0.48609986901283264,
0.24949437379837036,
-0.08477014303207397,
0.32805678248405457,
0.12166343629360199,
0.08732475340366364,
-0.40625789761543274,
0.4440461993217468,
0.4752526581287384,
-0.01796473003923893,
0.23641160130500793,
-0.05184874311089516,
0.09444170445203781,
-0.0688726156949997,
-0.1788320094347,
0.15370862185955048,
0.04254094138741493,
0.15134716033935547,
0.3643050789833069,
0.15706227719783783,
0.2181692123413086,
-0.05423816666007042,
-0.24688266217708588,
0.5586364269256592,
-0.0006457976414822042,
0.3511783182621002,
0.7551181316375732,
-0.0354597344994545,
0.12356474995613098,
0.2820720672607422,
0.05672023817896843,
0.10680373758077621,
0.10888087749481201,
0.023995084688067436,
0.2393903136253357,
0.0669957622885704,
-0.012341191992163658,
0.2862537205219269,
-0.16195647418498993,
-0.02698996476829052,
0.2715645134449005,
0.048706501722335815,
0.1325717717409134,
-0.02620920166373253,
0.2715277075767517,
-0.06002150848507881,
0.10209640860557556,
-0.2493348866701126,
0.23156872391700745,
0.0015934095717966557,
-0.2097301185131073,
-0.45648279786109924,
-0.2576330900192261,
-0.18726105988025665,
-0.08493141084909439,
0.060574524104595184,
-0.41154223680496216,
0.3470728397369385,
-0.3500342071056366,
0.280744343996048,
0.023073069751262665,
0.4015863239765167,
0.011521216481924057,
0.05620601400732994,
-0.04867924377322197,
0.039203885942697525,
0.1939411610364914,
-0.07024181634187698,
0.2330794781446457,
0.4043900966644287,
0.4464852511882782,
0.25247204303741455,
0.0869971439242363,
-0.1364697515964508,
-0.13093042373657227,
-0.049408551305532455,
0.0036354961339384317,
0.15377968549728394,
-0.30439507961273193,
-0.18001990020275116,
0.22088932991027832,
0.1544552892446518,
-0.0029643946327269077,
-0.038885749876499176,
0.19890251755714417,
0.07924065738916397,
-0.1073252484202385,
0.5643261671066284,
-0.2565627098083496,
-0.1210433691740036,
-0.007953710854053497,
0.09752189368009567,
-0.35013076663017273,
-0.3489464223384857,
0.2783760726451874,
0.2449500858783722,
0.05251176282763481,
-0.36149105429649353,
0.08282002806663513,
-0.03641344606876373,
0.5925097465515137,
0.021375924348831177,
0.042279042303562164,
-0.1893228441476822,
-0.26087942719459534,
-0.4184705913066864,
-0.1952398717403412,
-0.01207625400274992,
-0.3624284863471985,
0.12394057214260101,
0.2639782726764679,
0.05118509382009506,
0.04532068595290184,
-0.11077729612588882,
0.006659344770014286,
-0.06471406668424606,
0.30012020468711853,
-0.24985158443450928,
-0.13998660445213318,
0.0974661260843277,
0.12805727124214172,
-0.11263320595026016,
-0.007093801628798246,
0.10195662826299667,
-0.01054294966161251,
-0.02535529062151909,
-0.0875791683793068,
0.12690220773220062,
0.3288877010345459,
0.33557891845703125,
-0.1888045072555542,
0.24490736424922943,
0.23538552224636078,
-0.0825098380446434,
-0.2910902798175812,
-0.23829619586467743,
0.16945676505565643,
-0.37288209795951843,
0.4929945766925812,
-0.016186492517590523,
0.17973482608795166,
-0.0702204704284668,
-0.21983353793621063,
-0.2998580038547516,
0.2033129334449768,
0.08259808272123337,
-0.09411061555147171,
-0.23726144433021545,
0.24534757435321808,
-0.4747851490974426,
-0.02093646489083767,
0.2546733617782593,
0.32331183552742004,
-0.12943734228610992,
0.06689871847629547,
-0.08583363145589828,
-0.3203432857990265,
0.48120152950286865,
-0.20443838834762573,
-0.3090691864490509,
-0.12414956837892532,
0.05938371270895004,
0.021744636818766594,
-0.3169501721858978,
-0.585250198841095,
-0.06435347348451614,
0.2532247304916382,
-0.11136823892593384,
-0.1404603272676468,
0.12807562947273254,
0.04938402399420738,
-0.2989429533481598,
-0.14534562826156616,
0.1923637092113495,
0.170942485332489,
-0.30891159176826477,
0.18242156505584717,
-0.17368386685848236
] |
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.17848221957683563,
-0.08218145370483398,
-0.13477660715579987,
0.2026105672121048,
0.10430475324392319,
0.43210211396217346,
0.07421441376209259,
-0.09254395961761475,
-0.12975098192691803,
0.12960994243621826,
0.2071549892425537,
0.014975609257817268,
0.10097161680459976,
0.3126718997955322,
0.03194790706038475,
0.2020217627286911,
0.08146122843027115,
-0.12701548635959625,
-0.18600191175937653,
-0.35094884037971497,
0.120445616543293,
-0.20264048874378204,
0.24741855263710022,
-0.3214331269264221,
-0.07153840363025665,
-0.09570002555847168,
0.31538861989974976,
-0.3801506757736206,
-0.3472016155719757,
0.39363670349121094,
0.21358837187290192,
-0.11848799884319305,
0.15078763663768768,
-0.00010648414172464982,
0.031335022300481796,
0.43088725209236145,
-0.18483230471611023,
-0.19259846210479736,
0.2388117015361786,
-0.20639783143997192,
-0.24352185428142548,
0.04021283611655235,
-0.3196239173412323,
0.09195493906736374,
-0.28300565481185913,
0.10822135210037231,
-0.047415219247341156,
0.39472833275794983,
0.20656763017177582,
0.25248244404792786,
0.01811792328953743,
0.05140237510204315,
-0.29377156496047974,
-0.021461956202983856,
0.3528164327144623,
-0.25510847568511963,
0.11145522445440292,
0.18929006159305573,
-0.017819033935666084,
-0.22241438925266266,
0.3152564465999603,
0.06035815551877022,
-0.2014649510383606,
0.5262852311134338,
-0.09146001935005188,
0.1253804713487625,
-0.3355514109134674,
0.23067457973957062,
0.19552339613437653,
0.653007447719574,
-0.28807225823402405,
-0.33906233310699463,
-0.15878017246723175,
-0.015997353941202164,
-0.1725628823041916,
-0.11068335175514221,
0.14561592042446136,
-0.4438185393810272,
0.09858211874961853,
-0.3290770351886749,
-0.2995273172855377,
-0.3381352722644806,
-0.18937796354293823,
0.10415350645780563,
0.3985576331615448,
-0.14672257006168365,
0.028783002868294716,
-0.07981013506650925,
-0.06371064484119415,
0.06064277142286301,
-0.051468659192323685,
-0.06203122064471245,
0.47951650619506836,
0.047522347420454025,
-0.05710664391517639,
0.39132821559906006,
0.3072204887866974,
0.48490849137306213,
0.3319513201713562,
0.06475336104631424,
-0.12495710700750351,
0.04821397736668587,
0.12198127806186676,
0.16885684430599213,
-0.09521229565143585,
0.26252710819244385,
-0.19813944399356842,
0.1932671219110489,
0.07168887555599213,
0.2193525731563568,
-0.18510447442531586,
0.16516384482383728,
-0.41401389241218567,
0.09602688252925873,
-0.13826428353786469,
0.3235102891921997,
-0.21935619413852692,
-0.04785951226949692,
0.0212954543530941,
0.15417081117630005,
-0.23298022150993347,
0.0033717830665409565,
0.1460006833076477,
0.09775455296039581,
-0.02940889075398445,
-0.02674134634435177,
-0.08247727155685425,
-0.1639435887336731,
-0.017776401713490486,
-0.3367516100406647,
0.22821778059005737,
-0.2819629907608032,
0.21590623259544373,
-0.23834453523159027,
-0.10508371144533157,
0.36398476362228394,
0.2932415008544922,
0.26006880402565,
0.37622883915901184,
-0.11562904715538025,
0.20625005662441254,
0.14413870871067047,
0.2639550268650055,
-0.30725207924842834,
0.1014632061123848,
0.1514817327260971,
0.09764108806848526,
-0.21210962533950806,
0.02225225232541561,
-0.33755698800086975,
-0.406891405582428,
0.03315611928701401,
0.1558644026517868,
-0.2776871919631958,
-0.05171665921807289,
-0.05283419042825699,
0.44353416562080383,
0.1255672425031662,
-0.1862483024597168,
0.043944936245679855,
0.001106688636355102,
-0.06437389552593231,
-0.4972919821739197,
0.31035637855529785,
0.4556654393672943,
-0.3002094626426697,
-0.20153725147247314,
-0.0556296780705452,
-0.25889721512794495,
0.18018858134746552,
0.18005113303661346,
-0.23380312323570251,
0.11578205227851868,
-0.29903799295425415,
0.24529588222503662,
0.40099602937698364,
-0.03050505742430687,
0.1852114200592041,
0.2886865735054016,
0.2408437877893448,
-0.04560299962759018,
0.22818495333194733,
-0.16717718541622162,
-0.12021759152412415,
-0.19614259898662567,
-0.1287868320941925,
-0.07713454961776733,
0.04933715984225273,
-0.13976556062698364,
-0.10344007611274719,
-0.07113020867109299,
-0.07051914185285568,
-0.11752573400735855,
-0.168305903673172,
0.05475994572043419,
0.09533523768186569,
0.10155414044857025,
0.3932323157787323,
-0.23459413647651672,
0.12852509319782257,
0.34670746326446533,
0.4189896285533905,
-0.12886227667331696,
0.07942090928554535,
0.056518375873565674,
-0.6715268492698669,
-0.04660484939813614,
0.013109283521771431,
0.2423955500125885,
-0.18822064995765686,
-0.24850799143314362,
-0.4149157702922821,
0.00289446534588933,
-0.04663831740617752,
-0.2650401294231415,
0.1491553783416748,
-0.011379148811101913,
0.1515473574399948,
-0.1366385966539383,
-0.19816021621227264,
-0.07850933074951172,
-0.028241897001862526,
0.011772637255489826,
-0.40731582045555115,
0.12641286849975586,
-0.03086024895310402,
0.05494873598217964,
0.06609375774860382,
0.12116458266973495,
0.1455516219139099,
0.01273944042623043,
0.23027564585208893,
0.3799112141132355,
0.21935874223709106,
0.05449436232447624,
0.11662827432155609,
0.36714303493499756,
-0.11923971027135849,
0.09653975069522858,
0.26406919956207275,
-0.08311229199171066,
0.14383035898208618,
-0.0361759290099144,
-0.3096536099910736,
0.29353591799736023,
0.1455041766166687,
0.16450677812099457,
0.19826573133468628,
-0.0875329077243805,
0.12342085689306259,
0.11117535084486008,
-0.14373840391635895,
-0.10316052287817001,
-0.2327033132314682,
0.15119096636772156,
0.41418421268463135,
0.09494077414274216,
-0.37834227085113525,
0.4364839792251587,
0.24601870775222778,
-0.2534932494163513,
-0.18842008709907532,
0.14345169067382812,
0.09206449240446091,
-0.4229133129119873,
-0.0424715131521225,
-0.00898465421050787,
0.4792381525039673,
0.18189366161823273,
0.23705421388149261,
0.10933005809783936,
-0.2840777635574341,
-0.37408897280693054,
0.2590412497520447,
-0.006726627703756094,
-0.0551692470908165,
0.024030936881899834,
-0.1259058713912964,
-0.2680931091308594,
-0.2931373715400696,
-0.010391446761786938,
0.06463301926851273,
0.24185143411159515,
-0.424681156873703,
0.15127916634082794,
0.013872731477022171,
-0.048858799040317535,
-0.2073211818933487,
-0.132053405046463,
-0.36771541833877563,
-0.5768342614173889,
0.06485353410243988,
0.0012630103155970573,
-0.2023102045059204,
0.09996234625577927,
-0.12996536493301392,
0.3149817883968353,
0.0695008784532547,
0.28841739892959595,
-0.35008466243743896,
-0.2509900629520416,
0.0356566347181797,
0.15217112004756927,
-0.004658695310354233,
-0.10697109252214432,
0.3328806459903717,
-0.11148965358734131,
0.06817392259836197,
-0.4380568563938141,
-0.5030032992362976,
0.17673224210739136,
-0.33952596783638,
0.3017331659793854,
0.5701351761817932,
0.4036960005760193,
0.056524600833654404,
-0.08302289247512817,
0.09479837864637375,
-0.17775295674800873,
-0.24369700253009796,
-0.2531808614730835,
-0.16253730654716492,
0.08252608776092529,
-0.34328824281692505,
-0.3473721444606781,
-0.034179214388132095,
-0.27821239829063416,
0.2322392463684082,
0.08113478124141693,
0.14934618771076202,
0.4569230079650879,
0.11859777569770813,
0.16026657819747925,
0.046369146555662155,
0.14831885695457458,
-0.2061442881822586,
-0.36140161752700806,
0.3522816300392151,
-0.37193563580513,
-0.2803907096385956,
0.018698863685131073,
0.0436759889125824,
0.40631628036499023,
-0.026120733469724655,
-0.20846985280513763,
-0.43752411007881165,
-0.09881547093391418,
0.2255108505487442,
0.07955958694219589,
0.4632647633552551,
0.17542272806167603,
-0.1288137435913086,
-0.16906516253948212,
-0.3697240948677063,
-0.14382117986679077,
0.0056056189350783825,
-0.5320706963539124,
0.1350744068622589,
0.11612635850906372,
0.20165559649467468,
-0.13737234473228455,
0.6183990836143494,
0.18341155350208282,
-0.03933292627334595,
0.0863247811794281,
-0.23570148646831512,
0.6174340844154358,
-0.14255711436271667,
-0.05198422074317932,
0.1715782731771469,
0.04551735892891884,
-0.0295404102653265,
0.20160731673240662,
0.1906786859035492,
0.02522372640669346,
0.04899223521351814,
-0.05911191925406456,
-0.0439600795507431,
-0.37562742829322815,
0.0385446660220623,
0.25685611367225647,
0.18771840631961823,
-0.014530687592923641,
0.1676349639892578,
-0.27169495820999146,
0.007592536974698305,
-0.1225031390786171,
0.4069197177886963,
0.45166370272636414,
0.16845464706420898,
-0.23813539743423462,
0.018700705841183662,
-0.4803556203842163,
0.28030890226364136,
-0.04824037477374077,
-0.0525970421731472,
-0.17322292923927307,
-0.2888438403606415,
0.12352776527404785,
-0.08844854682683945,
0.29024738073349,
-0.29352837800979614,
-0.2524643540382385,
0.17431773245334625,
0.11875144392251968,
-0.37808388471603394,
-0.015643397346138954,
-0.12833712995052338,
0.2648368775844574,
0.2669675648212433,
0.09264831244945526,
-0.5838432312011719,
-0.4488576650619507,
0.0871468186378479,
0.03397221118211746,
-0.09441500157117844,
0.0418098084628582,
-0.2512209415435791,
-0.6246234774589539,
-0.03165261447429657,
-0.13254545629024506,
0.06766099482774734,
-0.08960065990686417,
-0.20216268301010132,
0.35164114832878113,
0.21784794330596924,
0.17411573231220245,
0.13694453239440918,
0.34815502166748047,
0.18630550801753998,
0.058536987751722336,
-0.11715823411941528,
0.03576047345995903,
0.2629088759422302,
0.15641236305236816,
0.3872843086719513,
-0.24500201642513275,
-0.15561848878860474,
-0.0913924053311348,
-0.24306493997573853,
0.5037792921066284,
0.4062498211860657,
-0.1907998025417328,
0.10119911283254623,
-0.06806281208992004,
-0.05767156183719635,
-0.22235514223575592,
-0.04980102553963661,
0.2901688516139984,
-0.17594774067401886,
-0.3967421352863312,
-0.8526323437690735,
0.5501235723495483,
0.22215089201927185,
-0.35092583298683167,
0.12337666749954224,
0.38643166422843933,
-0.25406476855278015,
-0.1042572632431984,
0.2390332818031311,
0.9269063472747803,
0.46659836173057556,
0.3813879191875458,
0.5670028924942017,
-0.019357671961188316,
0.3943979740142822,
0.2751504182815552,
-0.08544573187828064,
-0.5506340265274048,
-0.11212943494319916,
-0.14181503653526306,
-0.11993354558944702,
0.11939290165901184,
0.3322310149669647,
-0.07280614227056503,
0.2612597644329071,
-0.24027429521083832,
0.11520769447088242,
-0.12837526202201843,
-0.01138280425220728,
-0.19960802793502808,
-0.08779354393482208,
-0.3388987183570862,
0.20315741002559662,
0.08033902943134308,
-0.027808282524347305,
-0.11159896105527878,
-0.21379567682743073,
0.03834053501486778,
-0.3241896331310272,
-0.3365112841129303,
-0.011234855279326439,
0.16630671918392181,
0.12326527386903763,
0.18985816836357117,
-0.11643733084201813,
0.19515134394168854,
0.062034837901592255,
0.3750988245010376,
-0.06631070375442505,
-0.27110785245895386,
0.14843399822711945,
-0.15166674554347992,
0.032264094799757004,
-0.07261457294225693,
0.20966659486293793,
0.5035308599472046,
-0.015519384294748306,
-0.16644777357578278,
0.07060793042182922,
-0.03751898929476738,
-0.049599871039390564,
-0.5324881672859192,
0.003784688888117671,
-0.30569949746131897,
-0.5237842202186584,
-0.2686622142791748,
-0.05526786670088768,
-0.18284110724925995,
-0.10468651354312897,
0.12078769505023956,
0.2544158101081848,
0.04145374894142151,
0.29857972264289856,
-0.1615927666425705,
-0.010248031467199326,
0.013082275167107582,
0.05469927936792374,
-0.08946895599365234,
0.05767371505498886,
0.32354387640953064,
0.05547207593917847,
-0.31410494446754456,
-0.31132057309150696,
-0.002712483052164316,
0.5453394055366516,
-0.5239102840423584,
0.12505558133125305,
0.42242246866226196,
0.1855461448431015,
0.03523033857345581,
0.2699258327484131,
-0.11505085974931717,
0.10455815494060516,
-0.10198049247264862,
-0.24708667397499084,
-0.276698499917984,
0.395705908536911,
-0.2152261734008789,
0.28962281346321106,
-0.04203920438885689,
-0.001226065680384636,
0.21286804974079132,
-0.06500386446714401,
-0.40698423981666565,
-0.06392042338848114,
0.20351368188858032,
-0.03132178261876106,
0.35736095905303955,
0.02835039794445038,
0.16423125565052032,
0.09974268823862076,
0.061715155839920044,
-0.10781564563512802,
-0.45562049746513367,
-0.17327605187892914,
-0.16205991804599762,
0.1470469832420349,
-0.08217264711856842,
-0.19665274024009705,
0.27910280227661133,
0.0727941244840622,
-0.34318453073501587,
-0.0373162142932415,
0.49236392974853516,
0.09392234683036804,
-0.015170788392424583,
0.2618497908115387,
0.04403338581323624,
0.15816517174243927,
0.14475461840629578,
-0.04781841114163399,
0.2307637482881546,
0.2744840979576111,
0.1432127058506012,
0.07818467170000076,
-0.389254629611969,
-0.11418361961841583,
0.3225950598716736,
0.5643664002418518,
0.23075178265571594,
-0.007493258453905582,
0.21254034340381622,
0.11366907507181168,
-0.012727906927466393,
-0.17723073065280914,
0.3757173418998718,
0.3366526961326599,
-0.14396725594997406,
0.12916326522827148,
0.08737137168645859,
0.1960114687681198,
-0.2959814667701721,
-0.13628274202346802,
-0.0016902604838833213,
0.0013865955406799912,
0.19355422258377075,
0.2963780164718628,
0.11718062311410904,
0.023216020315885544,
-0.029949642717838287,
-0.16306030750274658,
0.4087219834327698,
-0.12788274884223938,
0.03093927539885044,
0.47379639744758606,
-0.0006789405597373843,
0.04577116668224335,
0.3533283472061157,
0.23772083222866058,
0.0006736029754392803,
0.16270811855793,
0.02244466543197632,
0.13935621082782745,
0.06143596023321152,
-0.037376511842012405,
-0.005246524699032307,
-0.283975213766098,
0.01580769009888172,
0.30370229482650757,
0.03544067218899727,
0.08365204930305481,
0.05501766502857208,
0.3576852083206177,
0.26737940311431885,
0.07826530188322067,
-0.17516672611236572,
0.2874325215816498,
-0.02908233366906643,
-0.3568982779979706,
-0.2810840606689453,
-0.23414340615272522,
-0.05688188597559929,
-0.20312990248203278,
-0.05602448433637619,
-0.3469703197479248,
0.39625486731529236,
-0.284295916557312,
0.33177024126052856,
-0.02628977783024311,
0.25268319249153137,
0.030821572989225388,
0.21388362348079681,
0.01918245665729046,
0.10566983371973038,
0.34387877583503723,
-0.09203844517469406,
0.3848396837711334,
0.4586823880672455,
0.6834431886672974,
0.23319564759731293,
0.2456311136484146,
-0.11297135055065155,
-0.18201573193073273,
-0.03387103229761124,
-0.03876432031393051,
0.18520332872867584,
-0.11104386299848557,
-0.1605178713798523,
0.29984673857688904,
0.18130025267601013,
-0.06756241619586945,
0.15903636813163757,
0.1981126368045807,
0.14917349815368652,
-0.12069400399923325,
0.46739694476127625,
-0.16421668231487274,
-0.2568281292915344,
-0.16327407956123352,
0.20033298432826996,
-0.34647151827812195,
-0.14833992719650269,
0.2493663877248764,
0.2265755981206894,
0.09908691793680191,
-0.27464011311531067,
0.1339312046766281,
0.12539102137088776,
0.7037279605865479,
0.13804110884666443,
0.05449337884783745,
-0.07642241567373276,
-0.18340197205543518,
-0.5739237070083618,
-0.17663322389125824,
0.11146935075521469,
-0.45779916644096375,
0.014780282974243164,
-0.02847863920032978,
0.17493094503879547,
-0.057686835527420044,
-0.022851554676890373,
-0.05760299786925316,
0.08306573331356049,
0.052093032747507095,
-0.34599652886390686,
-0.04294808954000473,
-0.01652473770081997,
0.055800940841436386,
-0.045508064329624176,
-0.03073168359696865,
0.07581708580255508,
-0.0435289666056633,
0.09064031392335892,
-0.04884061962366104,
0.28201228380203247,
0.14648345112800598,
0.3140295445919037,
-0.048904553055763245,
0.20109136402606964,
0.4074595868587494,
-0.1519564837217331,
-0.32344555854797363,
-0.3913860023021698,
-0.06761360168457031,
-0.3365265429019928,
0.42398619651794434,
-0.020409606397151947,
0.03503073751926422,
-0.05162721499800682,
-0.4418331980705261,
-0.1930156946182251,
0.3930759131908417,
0.09236012399196625,
-0.18007080256938934,
-0.17328579723834991,
0.24957169592380524,
-0.29526689648628235,
-0.21622781455516815,
0.038936685770750046,
0.299243688583374,
-0.08709846436977386,
-0.017105763778090477,
-0.04397660121321678,
-0.5386337637901306,
0.7789409756660461,
-0.28154996037483215,
-0.27078723907470703,
-0.1414674073457718,
0.17809665203094482,
-0.06995154172182083,
-0.2371911257505417,
-0.6841177940368652,
0.11797497421503067,
0.18550732731819153,
0.07755258679389954,
-0.22214533388614655,
0.22765883803367615,
-0.18036137521266937,
-0.27494174242019653,
-0.16461285948753357,
0.22494320571422577,
0.14349021017551422,
-0.2990717589855194,
-0.05709879845380783,
-0.23723430931568146
] |
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.15727351605892181,
-0.5049940943717957,
0.006041008047759533,
0.530024528503418,
0.5585092306137085,
0.04716859757900238,
0.0790681391954422,
0.2601296305656433,
0.39253175258636475,
0.11795011162757874,
-0.025012431666254997,
-0.2572222948074341,
-0.33554312586784363,
0.35029521584510803,
0.07988391071557999,
-0.16710633039474487,
0.04809673875570297,
-0.00933915376663208,
-0.49065104126930237,
0.08144194632768631,
-0.2567533254623413,
-0.05833778157830238,
0.0235447958111763,
-0.34964948892593384,
-0.3608572483062744,
0.07815966755151749,
0.080222949385643,
0.06284508854150772,
0.015036629512906075,
-0.00040838491986505687,
0.027330951765179634,
-0.07058252394199371,
0.1996219903230667,
0.44507116079330444,
-0.00012403004802763462,
0.09557138383388519,
0.10588585585355759,
-0.3430505692958832,
-0.011349653825163841,
-0.020235201343894005,
-0.040181487798690796,
-0.1584911346435547,
0.17591121792793274,
-0.09605619311332703,
-0.12496613711118698,
0.1642036885023117,
0.05707641318440437,
-0.1192680075764656,
0.6155759692192078,
0.03770546615123749,
0.08119755238294601,
0.15577368438243866,
-0.1867881864309311,
0.1391715109348297,
0.09970549494028091,
0.17155130207538605,
0.06137096509337425,
0.1924707144498825,
-0.1117648258805275,
0.08047356456518173,
-0.020597433671355247,
0.32961365580558777,
-0.15510167181491852,
-0.1606423556804657,
0.3712904453277588,
-0.029682321473956108,
0.0977146252989769,
-0.49639585614204407,
0.06988455355167389,
0.22780710458755493,
0.33270931243896484,
-0.18467384576797485,
-0.28159892559051514,
-0.23767445981502533,
-0.266490638256073,
-0.29817503690719604,
0.035622719675302505,
0.3874959945678711,
-0.16271238029003143,
0.19529074430465698,
-0.5647273659706116,
-0.35832443833351135,
-0.11733058840036392,
-0.07937978953123093,
0.017093082889914513,
-0.14799128472805023,
-0.11177436262369156,
0.0931016057729721,
0.38867682218551636,
-0.17482730746269226,
-0.38573989272117615,
0.0535055473446846,
0.12446682900190353,
0.20218199491500854,
-0.4465102255344391,
-0.27542468905448914,
-0.09813300520181656,
-0.012656868435442448,
0.5197059512138367,
0.06968275457620621,
-0.08406475186347961,
0.14355015754699707,
0.3678044080734253,
-0.012457698583602905,
0.25592920184135437,
0.22445698082447052,
-0.357942134141922,
-0.02269279770553112,
0.3058364987373352,
0.15482307970523834,
0.06663620471954346,
-0.09808142483234406,
-0.048378922045230865,
-0.10398274660110474,
-0.11875362694263458,
-0.2178415209054947,
0.19384317100048065,
-0.24720776081085205,
0.1151958480477333,
-0.10141788423061371,
-0.003414647188037634,
0.14570556581020355,
-0.07070567458868027,
0.5723402500152588,
-0.10757812112569809,
0.24478773772716522,
-0.05470646172761917,
0.13190805912017822,
-0.4047709107398987,
0.01996220089495182,
-0.17323048412799835,
0.1808793544769287,
-0.2549781799316406,
0.3128545880317688,
0.3761705160140991,
0.10773511976003647,
0.38844430446624756,
-0.12955516576766968,
0.06677766144275665,
-0.07200600951910019,
0.020099973306059837,
-0.3184750974178314,
0.07431448251008987,
0.41209766268730164,
0.051430314779281616,
0.10466790944337845,
0.05255696550011635,
0.29782530665397644,
-0.21429908275604248,
0.30478155612945557,
-0.1877877116203308,
-0.3000199794769287,
0.46475061774253845,
0.026090534403920174,
-0.31931072473526,
0.2963610589504242,
-0.5062667727470398,
0.23296506702899933,
0.1344285011291504,
0.21492044627666473,
0.026302088052034378,
0.06527042388916016,
-0.3889720141887665,
-0.09688771516084671,
0.4445868730545044,
0.7276215553283691,
-0.08710110932588577,
-0.37357574701309204,
0.2625153064727783,
-0.09192156046628952,
0.09987393021583557,
0.6178463101387024,
-0.014416352845728397,
0.026505114510655403,
0.006340461317449808,
-0.3365341126918793,
0.09796182066202164,
-0.14028309285640717,
-0.3693690598011017,
0.24711114168167114,
-0.20831651985645294,
0.17370262742042542,
0.2634877860546112,
0.1960666924715042,
-0.15709000825881958,
0.12543119490146637,
-0.01424239668995142,
0.4411000907421112,
0.026819195598363876,
0.24726121127605438,
-0.13989679515361786,
-0.531604528427124,
0.12084762752056122,
0.2106398046016693,
0.22566519677639008,
0.057256605476140976,
-0.15098313987255096,
0.5526142716407776,
0.08866754174232483,
-0.1365780383348465,
0.14130930602550507,
0.46710580587387085,
-0.044081930071115494,
-0.17227067053318024,
-0.013389857485890388,
0.032729506492614746,
-0.5094334483146667,
0.20024511218070984,
-0.2553113102912903,
0.03257373347878456,
-0.10795661807060242,
-0.01012969296425581,
0.048686109483242035,
-0.09302319586277008,
0.10282298922538757,
-0.1937772035598755,
-0.09281586110591888,
-0.302776038646698,
0.18680840730667114,
-0.07716486603021622,
-0.05797998979687691,
0.16186994314193726,
0.05336855724453926,
0.2806984484195709,
-0.6293312907218933,
-0.18641431629657745,
0.08767013251781464,
-0.08233991265296936,
0.05092228949069977,
0.08699033409357071,
-0.057171232998371124,
-0.07526201009750366,
0.11553819477558136,
0.1845788210630417,
0.06813988834619522,
0.022121122106909752,
-0.2876884341239929,
0.5894079804420471,
0.2645474076271057,
-0.2151780128479004,
0.18737545609474182,
0.05682380497455597,
0.0807608813047409,
-0.016798339784145355,
-0.22811268270015717,
0.2756059169769287,
0.0014028020668774843,
0.3533551096916199,
0.06751852482557297,
-0.2433747798204422,
-0.015374414622783661,
-0.2704690992832184,
-0.0966259092092514,
-0.31890854239463806,
0.19481927156448364,
0.3701256215572357,
0.2904992699623108,
0.3180950880050659,
-0.10975521802902222,
-0.6400544047355652,
0.4141545295715332,
0.028523556888103485,
0.011982174590229988,
0.1240229606628418,
-0.4441154897212982,
-0.044127896428108215,
-0.10439742356538773,
-0.42976972460746765,
0.20829494297504425,
0.2234405130147934,
-0.02863198146224022,
0.15743686258792877,
0.45329686999320984,
-0.038356341421604156,
0.15972736477851868,
0.3495745062828064,
0.22938716411590576,
-0.02172219567000866,
0.0718993991613388,
-0.15233637392520905,
-0.13772916793823242,
0.14743909239768982,
0.04160928353667259,
-0.28683361411094666,
-0.39082372188568115,
0.04969804733991623,
-0.10450772196054459,
-0.18144163489341736,
-0.22128693759441376,
0.24574214220046997,
-0.46828922629356384,
0.140582874417305,
-0.024312559515237808,
0.18286098539829254,
-0.07907694578170776,
0.12983521819114685,
0.1344473958015442,
0.4491243362426758,
0.2074006050825119,
-0.3838278353214264,
0.039886780083179474,
0.021066471934318542,
0.02687836065888405,
-0.019807172939181328,
0.15810580551624298,
-0.187271386384964,
0.21344460546970367,
0.10740954428911209,
-0.2879980504512787,
0.08814938366413116,
-0.10725300014019012,
0.25092533230781555,
-0.10202656686306,
0.3402297794818878,
-0.11454308778047562,
0.17284464836120605,
0.1816578209400177,
0.047417737543582916,
-0.10805187374353409,
-0.17352573573589325,
-0.0394926518201828,
0.096226766705513,
0.05922774225473404,
0.38141533732414246,
-0.2071722149848938,
-0.16165924072265625,
-0.06306403875350952,
-0.41138389706611633,
0.5235691070556641,
0.10853874683380127,
-0.014470018446445465,
0.3826693296432495,
0.2527727782726288,
0.05536039173603058,
-0.23236696422100067,
0.24397605657577515,
-0.04540446773171425,
-0.1866937279701233,
0.41612061858177185,
-0.024893969297409058,
-0.20298723876476288,
0.10085620731115341,
-0.11281523108482361,
0.1596013754606247,
0.27322012186050415,
-0.5897431373596191,
-0.026685958728194237,
-0.20097750425338745,
-0.33031925559043884,
-0.0016956889303401113,
0.19105039536952972,
0.21520502865314484,
-0.3849993944168091,
0.056703902781009674,
0.10275323688983917,
-0.05411843582987785,
0.10806168615818024,
-0.021793952211737633,
0.31860819458961487,
0.13368162512779236,
0.5374342203140259,
-0.07030992209911346,
0.8954893350601196,
0.08737382292747498,
0.23482444882392883,
0.059182070195674896,
0.012793838046491146,
0.18766364455223083,
-0.12136393040418625,
0.03188151866197586,
-0.10254326462745667,
-0.11589796841144562,
-0.17615631222724915,
0.23530107736587524,
-0.009106531739234924,
0.14027372002601624,
-0.2111802101135254,
-0.1160716637969017,
0.20837396383285522,
-0.34716346859931946,
0.37692922353744507,
0.027289574965834618,
0.08529766649007797,
-0.06752143055200577,
-0.06316644698381424,
0.023664651438593864,
-0.23260550200939178,
0.04978545755147934,
0.09128738939762115,
0.25842446088790894,
0.16410976648330688,
-0.13996544480323792,
-0.037738922983407974,
-0.6823824644088745,
0.0472896583378315,
-0.16285006701946259,
0.07054861634969711,
-0.011833448894321918,
-0.3628759980201721,
-0.10110597312450409,
0.14956936240196228,
0.7003593444824219,
0.20931333303451538,
-0.09929520636796951,
-0.15137071907520294,
-0.6746304631233215,
-0.38329851627349854,
0.008756274357438087,
-0.19946347177028656,
-0.14594948291778564,
0.13363875448703766,
0.33630236983299255,
-0.29804563522338867,
-0.19550392031669617,
0.14031022787094116,
0.22183559834957123,
-0.2850460112094879,
-0.18150508403778076,
-0.4925505220890045,
-0.006113880313932896,
-0.43703511357307434,
0.11374717205762863,
0.34733301401138306,
0.08877617865800858,
-0.1772838681936264,
0.06353296339511871,
-0.04171806573867798,
-0.041482049971818924,
0.395468145608902,
-0.007947812788188457,
0.25316402316093445,
0.005848920438438654,
-0.05065339431166649,
0.11097659915685654,
0.09961988031864166,
-0.007508883252739906,
0.6166414022445679,
0.2945857048034668,
-0.246039479970932,
0.19506870210170746,
0.22993454337120056,
0.49921226501464844,
0.2186104655265808,
-0.07312710583209991,
0.060115087777376175,
0.18478526175022125,
0.33941423892974854,
-0.4147127866744995,
0.3623576760292053,
-0.05751478672027588,
-0.10004789382219315,
-0.2485269010066986,
-0.26423975825309753,
0.5508935451507568,
0.2732253074645996,
0.16027919948101044,
-0.06582098454236984,
-0.09296999126672745,
-0.32202523946762085,
0.282257080078125,
0.1427028626203537,
0.9183750152587891,
-0.23077958822250366,
0.4209945499897003,
0.09391739219427109,
0.3291245400905609,
0.49199050664901733,
-0.32099974155426025,
0.2628660798072815,
-0.18502360582351685,
-0.3845912516117096,
0.054186854511499405,
-0.24255980551242828,
-0.089582659304142,
0.20866449177265167,
-0.10838054120540619,
0.5269131064414978,
0.003924558870494366,
0.05590527132153511,
-0.035893213003873825,
0.21785210072994232,
0.04800005629658699,
-0.5682692527770996,
-0.39844006299972534,
-0.03150974214076996,
0.018268084153532982,
0.05490538850426674,
-0.09108284115791321,
0.01964251883327961,
0.30008310079574585,
-0.29666876792907715,
0.09157611429691315,
0.04705842584371567,
-0.6259853839874268,
-0.06201982870697975,
-0.13735443353652954,
0.04000045359134674,
0.26743119955062866,
0.13791429996490479,
-0.07572750002145767,
0.39677152037620544,
-0.19718341529369354,
-0.13525362312793732,
-0.2323116809129715,
-0.028518853709101677,
-0.23190568387508392,
0.13666769862174988,
0.297268271446228,
0.08818839490413666,
-0.07165056467056274,
0.090535469353199,
-0.04240431636571884,
0.005208697635680437,
-0.06771747767925262,
-0.32985377311706543,
-0.13585729897022247,
-0.24937768280506134,
-0.20009759068489075,
-0.0352991446852684,
-0.006112358532845974,
0.16818766295909882,
0.02407471090555191,
-0.014476630836725235,
-0.22601377964019775,
0.16625960171222687,
0.1755405217409134,
-0.4944985508918762,
-0.19151754677295685,
0.6306121349334717,
0.058146897703409195,
-0.13181030750274658,
0.3846063017845154,
0.2682064175605774,
0.015631841495633125,
-0.1055135503411293,
-0.08018414676189423,
0.4531792402267456,
-0.4024275541305542,
0.2040717750787735,
0.13347458839416504,
-0.16697917878627777,
-0.23008768260478973,
0.1760568469762802,
0.07834677398204803,
-0.2996075451374054,
0.039556439965963364,
-0.07674290984869003,
-0.6522595882415771,
0.5526910424232483,
-0.16008368134498596,
0.1457233726978302,
0.22107389569282532,
0.009824096225202084,
-0.10010197758674622,
0.3121787905693054,
-0.17713235318660736,
-0.12391874939203262,
-0.2733040452003479,
0.02650083601474762,
0.15477225184440613,
-0.16643977165222168,
0.2666916847229004,
0.16077286005020142,
-0.07165361940860748,
0.18320220708847046,
-0.2298358678817749,
-0.14425751566886902,
-0.008323106914758682,
0.18109411001205444,
-0.012728291563689709,
0.09242548793554306,
-0.027355993166565895,
-0.006377761717885733,
0.012505905702710152,
-0.17346958816051483,
0.6875866055488586,
0.06993680447340012,
0.18867671489715576,
0.08078600466251373,
0.09897644817829132,
0.02517976611852646,
-0.3838268518447876,
0.12728124856948853,
0.0643446147441864,
0.12450601905584335,
0.3593577444553375,
0.04593955725431442,
0.04126623645424843,
-0.003615595167502761,
-0.4344595968723297,
-0.011933950707316399,
0.44887933135032654,
-0.13604559004306793,
-0.0200095996260643,
-0.0839235782623291,
-0.2861667275428772,
0.2059270441532135,
0.06951945275068283,
0.1605730652809143,
-0.2592911720275879,
-0.0067387530580163,
0.14794166386127472,
0.06309491395950317,
-0.07582622766494751,
0.006252494640648365,
0.12690035998821259,
-0.3414561152458191,
0.010448561981320381,
0.6033744812011719,
0.16430635750293732,
0.043260250240564346,
0.06448633223772049,
0.12934216856956482,
0.29711833596229553,
0.048873238265514374,
0.07112767547369003,
0.06000335514545441,
0.01652762107551098,
0.022348064929246902,
0.3840656578540802,
0.44986632466316223,
0.429099440574646,
0.1533198207616806,
-0.01520138792693615,
0.27117568254470825,
-0.6284019947052002,
0.22733174264431,
-0.1653490960597992,
-0.508974015712738,
-0.32483941316604614,
0.42847779393196106,
-0.21222811937332153,
0.1208934634923935,
-0.47001931071281433,
0.0007581295794807374,
0.34118974208831787,
-0.18159843981266022,
-0.23548702895641327,
0.20560809969902039,
-0.2333945482969284,
-0.162502259016037,
0.20383451879024506,
-0.041027192026376724,
-0.24419789016246796,
0.30381008982658386,
0.05284309387207031,
-0.36026260256767273,
0.23834523558616638,
0.20095795392990112,
-0.09193850308656693,
0.1840364634990692,
-0.040934011340141296,
0.3867102861404419,
-0.010936140082776546,
-0.34428462386131287,
0.08566070348024368,
0.16586527228355408,
0.13663356006145477,
-0.03885619342327118,
0.09826332330703735,
0.09759803116321564,
0.03750062361359596,
-0.09688028693199158,
-0.013248848728835583,
0.2822807729244232,
0.002381725236773491,
-0.1933211237192154,
0.189729243516922,
0.17482875287532806,
0.526070237159729,
0.027139147743582726,
0.0026785440277308226,
-0.023129146546125412,
-0.0301114059984684,
0.007850341498851776,
0.13321015238761902,
-0.408309668302536,
0.11059393733739853,
0.32159483432769775,
0.012032633647322655,
-0.22426477074623108,
0.13609926402568817,
-0.5450912117958069,
0.11930351704359055,
0.3821798264980316,
-0.32175371050834656,
0.09505334496498108,
0.10023702681064606,
-0.0032946825958788395,
-0.22482049465179443,
0.686481237411499,
0.11666040122509003,
0.08426114171743393,
-0.5442633628845215,
0.18974317610263824,
-0.19600774347782135,
0.028715647757053375,
-0.06128488853573799,
0.3867133855819702,
0.14481110870838165,
0.24283644556999207,
-0.036457862704992294,
0.178419828414917,
-0.4886813461780548,
-0.08894652128219604,
-0.3430790603160858,
-0.15445160865783691,
-0.1451513171195984,
-0.1504172384738922,
-0.4410768151283264,
0.3365361988544464,
0.14525556564331055,
-0.17598478496074677,
0.07398954778909683,
-0.127693772315979,
-0.22321094572544098,
-0.11746134608983994,
-0.0170424897223711,
-0.0372450165450573,
0.31462782621383667,
0.21628795564174652,
0.10405171662569046,
0.16226713359355927,
-0.1483355611562729,
-0.18568195402622223,
-0.19421720504760742,
-0.036261044442653656,
-0.24063393473625183,
-0.2403411567211151,
-0.03477922081947327,
0.24314269423484802,
-0.27452611923217773,
0.052601780742406845,
-0.2590019702911377,
0.07304171472787857,
-0.01462126150727272,
-0.30162230134010315,
0.09456615149974823,
-0.12221278995275497,
0.08139333128929138,
0.262631356716156,
0.17979282140731812,
0.38551685214042664,
-0.20103304088115692,
-0.062267523258924484,
-0.17282891273498535,
-0.02521943487226963,
0.4078333377838135,
-0.2210167497396469,
-0.16230423748493195,
-0.2203921228647232,
0.2522365152835846,
-0.1805431842803955,
-0.07965221256017685,
-0.5692530274391174,
0.25798946619033813,
0.04816814512014389,
0.15227161347866058,
-0.3700551390647888,
0.4148760735988617,
-0.0936189815402031,
-0.11562508344650269,
-0.20932739973068237,
0.13172784447669983,
-0.014187312684953213,
-0.15151795744895935,
-0.25112223625183105,
-0.3791787624359131
] |
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.15187662839889526,
-0.5147151947021484,
0.0332164391875267,
0.4974523186683655,
0.5210767388343811,
0.013915249146521091,
0.1180272251367569,
0.23573319613933563,
0.4079457223415375,
0.18799634277820587,
0.007619801908731461,
-0.20288428664207458,
-0.2850470542907715,
0.34070277214050293,
0.08864250034093857,
-0.10324905812740326,
0.0532817542552948,
0.08662480115890503,
-0.5714515447616577,
0.05235046520829201,
-0.27374136447906494,
-0.01612706109881401,
0.01597220078110695,
-0.3641575872898102,
-0.3886536955833435,
0.16008836030960083,
0.062486935406923294,
0.11862444132566452,
-0.009863600134849548,
-0.07142075896263123,
0.14281243085861206,
-0.03939509391784668,
0.17701680958271027,
0.43724924325942993,
-0.0001269821950700134,
0.10796476900577545,
0.1380944401025772,
-0.31482261419296265,
-0.030641162768006325,
-0.032229647040367126,
-0.004192236345261335,
-0.20592842996120453,
0.28096121549606323,
-0.17894034087657928,
-0.15039430558681488,
0.12923917174339294,
-0.004396798554807901,
-0.17683006823062897,
0.6732685565948486,
0.0866888165473938,
0.058953363448381424,
0.15354076027870178,
-0.24523906409740448,
0.16674374043941498,
0.1576341837644577,
0.19760829210281372,
0.0586230605840683,
0.1164000853896141,
-0.10491646081209183,
0.10343214124441147,
0.03046075999736786,
0.3367859125137329,
-0.2480972856283188,
-0.1271039843559265,
0.41234517097473145,
0.0033178639132529497,
0.01760558970272541,
-0.4697832763195038,
0.10207787901163101,
0.2507305145263672,
0.40734124183654785,
-0.22392308712005615,
-0.21384423971176147,
-0.2794691026210785,
-0.3462491035461426,
-0.2446087896823883,
0.1370270997285843,
0.3081843852996826,
-0.14336933195590973,
0.2112530916929245,
-0.5356807708740234,
-0.3474312126636505,
-0.11709511280059814,
-0.039161503314971924,
0.06109469756484032,
-0.14115265011787415,
-0.11476855725049973,
0.11860798299312592,
0.43614497780799866,
-0.16695494949817657,
-0.33585819602012634,
-0.00038617858081124723,
0.17075161635875702,
0.22306789457798004,
-0.5019466876983643,
-0.31632480025291443,
-0.06577301025390625,
-0.10572598874568939,
0.4721100330352783,
0.12158498913049698,
-0.07960930466651917,
0.09369949996471405,
0.32990899682044983,
0.009158761240541935,
0.28490176796913147,
0.15744638442993164,
-0.3003254532814026,
-0.0072961896657943726,
0.2969492971897125,
0.1490689367055893,
0.1434299498796463,
-0.11053269356489182,
-0.03337974101305008,
-0.05073798447847366,
-0.20474925637245178,
-0.25915467739105225,
0.284585177898407,
-0.2782021462917328,
0.07945917546749115,
-0.08929987251758575,
-0.034310176968574524,
0.17012648284435272,
-0.06992358714342117,
0.5180569291114807,
-0.0827050432562828,
0.3102356493473053,
-0.0071105631068348885,
0.13159720599651337,
-0.43387389183044434,
0.014577124267816544,
-0.19418014585971832,
0.2515984773635864,
-0.22401992976665497,
0.33229032158851624,
0.41166746616363525,
0.049928274005651474,
0.37970420718193054,
-0.09566880017518997,
0.06745827198028564,
-0.07631231844425201,
0.07966405898332596,
-0.3235809803009033,
0.1239139661192894,
0.4826916456222534,
0.035579051822423935,
0.19510714709758759,
0.07251692563295364,
0.17660300433635712,
-0.21363212168216705,
0.3968870937824249,
-0.23073025047779083,
-0.28839606046676636,
0.36309710144996643,
0.005372785031795502,
-0.4209287464618683,
0.2904182970523834,
-0.5321799516677856,
0.26642921566963196,
0.12232881039381027,
0.20218421518802643,
0.055763572454452515,
0.07896725833415985,
-0.3984467089176178,
-0.08628059923648834,
0.48739391565322876,
0.8010213375091553,
-0.1476055532693863,
-0.39311161637306213,
0.13294346630573273,
-0.1004580557346344,
0.1959773302078247,
0.5725107789039612,
-0.014280102215707302,
0.014847717247903347,
-0.014455961063504219,
-0.21403516829013824,
0.07092579454183578,
-0.14157749712467194,
-0.35443416237831116,
0.28426995873451233,
-0.17089644074440002,
0.17428316175937653,
0.25948643684387207,
0.24584077298641205,
-0.092685267329216,
0.1357041895389557,
-0.10187876969575882,
0.37446701526641846,
0.06811358779668808,
0.22523514926433563,
-0.12717938423156738,
-0.5379964113235474,
0.2040785849094391,
0.21697036921977997,
0.20226332545280457,
0.0872880220413208,
-0.1350937932729721,
0.6384110450744629,
0.02384447492659092,
-0.12332247197628021,
0.15025527775287628,
0.5214671492576599,
-0.02977219596505165,
-0.0962149128317833,
-0.010851818136870861,
-0.06479314714670181,
-0.500604510307312,
0.1989263892173767,
-0.05867917835712433,
0.044442273676395416,
-0.10483566671609879,
0.0006818209658376873,
0.05736276134848595,
-0.1273258775472641,
0.09570010751485825,
-0.17718595266342163,
-0.121193066239357,
-0.2916911840438843,
0.15145434439182281,
-0.1347028613090515,
-0.09034713357686996,
0.14886195957660675,
-0.058407071977853775,
0.29728448390960693,
-0.6091176867485046,
-0.10886797308921814,
0.11029219627380371,
-0.12348645180463791,
0.025996139273047447,
0.12480422854423523,
-0.08821520209312439,
-0.08458496630191803,
0.10677903145551682,
0.2415027916431427,
0.11241970956325531,
0.017839482054114342,
-0.2222638875246048,
0.6307317614555359,
0.24343115091323853,
-0.31277045607566833,
0.12051310390233994,
0.06976691633462906,
0.1251269280910492,
0.02526094764471054,
-0.17859598994255066,
0.19503948092460632,
-0.13313740491867065,
0.34845900535583496,
0.005856869276612997,
-0.2301434427499771,
-0.03587997704744339,
-0.24957650899887085,
-0.1238650530576706,
-0.31752046942710876,
0.22977103292942047,
0.3747280240058899,
0.3159516453742981,
0.38226255774497986,
-0.1301639974117279,
-0.6248892545700073,
0.43184444308280945,
-0.0019922726787626743,
0.007369606290012598,
0.14880627393722534,
-0.4452287256717682,
-0.08009255677461624,
-0.0596904493868351,
-0.37476417422294617,
0.2052788883447647,
0.22007620334625244,
-0.013583144173026085,
0.1306920200586319,
0.40825188159942627,
-0.05133704096078873,
0.162749245762825,
0.34937557578086853,
0.14887391030788422,
-0.05484486743807793,
-0.03126000985503197,
-0.15415999293327332,
-0.19042132794857025,
0.2100084275007248,
0.02700997330248356,
-0.25558722019195557,
-0.4284454882144928,
0.05460088700056076,
-0.18637853860855103,
-0.15334562957286835,
-0.19714395701885223,
0.20541492104530334,
-0.49467819929122925,
0.11873634904623032,
-0.015110759995877743,
0.17512834072113037,
-0.06624365597963333,
0.15097729861736298,
0.19968006014823914,
0.4412364363670349,
0.19188140332698822,
-0.4602296054363251,
-0.005720658227801323,
0.0038940496742725372,
0.029223483055830002,
-0.056787192821502686,
0.1562751978635788,
-0.10571091622114182,
0.20353862643241882,
0.08142754435539246,
-0.2594139873981476,
0.06312909722328186,
-0.11288664489984512,
0.2416178584098816,
-0.13432618975639343,
0.3047713041305542,
-0.09086991101503372,
0.20145386457443237,
0.18460291624069214,
0.0711599811911583,
-0.10574252158403397,
-0.1495922952890396,
-0.032635487616062164,
0.14212289452552795,
0.09933116286993027,
0.39767739176750183,
-0.3058061897754669,
-0.2062704861164093,
-0.0010529225692152977,
-0.3736867308616638,
0.4215452969074249,
0.10117962211370468,
-0.00649233115836978,
0.35713064670562744,
0.27699196338653564,
0.08486256748437881,
-0.19523796439170837,
0.295611709356308,
-0.09051019698381424,
-0.20001320540905,
0.43553704023361206,
0.020141560584306717,
-0.22682562470436096,
0.20559793710708618,
-0.04645019769668579,
0.19572274386882782,
0.25651946663856506,
-0.6173765063285828,
-0.0449291467666626,
-0.24506625533103943,
-0.3239591419696808,
-0.052718449383974075,
0.22975480556488037,
0.29153189063072205,
-0.33308082818984985,
0.0619429312646389,
0.04141812026500702,
-0.12229391187429428,
0.09637337923049927,
-0.0428844653069973,
0.2026365101337433,
0.20029710233211517,
0.5743063688278198,
-0.09091493487358093,
0.9312595129013062,
0.12410616129636765,
0.18048837780952454,
0.07552839815616608,
-0.0374019593000412,
0.25255274772644043,
-0.13143649697303772,
0.015397458337247372,
-0.11865630000829697,
-0.005834921263158321,
-0.14307035505771637,
0.26577284932136536,
-0.02550370991230011,
0.197500541806221,
-0.24316997826099396,
0.044230442494153976,
0.1530369073152542,
-0.2962439954280853,
0.3551987409591675,
-0.006710426416248083,
0.12537440657615662,
-0.040326472371816635,
-0.025874853134155273,
0.010809041559696198,
-0.24129506945610046,
0.012306425720453262,
0.15309324860572815,
0.24567237496376038,
0.19573143124580383,
-0.1906873732805252,
-0.07605452835559845,
-0.6258146166801453,
0.0005809755530208349,
-0.196940079331398,
0.09938599169254303,
-0.05860448256134987,
-0.34891289472579956,
-0.02770337462425232,
0.1523524671792984,
0.6768872141838074,
0.25320568680763245,
-0.17298977077007294,
-0.14874275028705597,
-0.7294564843177795,
-0.40251651406288147,
-0.00959619041532278,
-0.22916054725646973,
-0.12381534278392792,
0.07380952686071396,
0.3609039783477783,
-0.3914927840232849,
-0.29161736369132996,
0.07330641150474548,
0.25568026304244995,
-0.2727659344673157,
-0.15386663377285004,
-0.5318118333816528,
-0.09207246452569962,
-0.4376601576805115,
0.05520431697368622,
0.3393109440803528,
0.08707235753536224,
-0.19919352233409882,
0.041029565036296844,
-0.01859533041715622,
-0.09400659054517746,
0.4132981300354004,
-0.04334650933742523,
0.2744605243206024,
-0.0019244616851210594,
-0.013677124865353107,
0.17320865392684937,
0.11165596544742584,
-0.019367346540093422,
0.6520434021949768,
0.31407296657562256,
-0.1921580284833908,
0.19880834221839905,
0.2186891734600067,
0.48262155055999756,
0.2193186730146408,
-0.13577106595039368,
0.12315355986356735,
0.13721276819705963,
0.2870836555957794,
-0.46728697419166565,
0.38374486565589905,
0.009191802702844143,
-0.09021882712841034,
-0.1464427411556244,
-0.3138224184513092,
0.5189355611801147,
0.32233718037605286,
0.15450195968151093,
-0.09944568574428558,
0.0033903010189533234,
-0.2873595952987671,
0.1786356419324875,
0.10930319875478745,
0.9667981266975403,
-0.2780707776546478,
0.4263838231563568,
0.09635178744792938,
0.31568118929862976,
0.6530100107192993,
-0.28190863132476807,
0.21292880177497864,
-0.1729736030101776,
-0.37702903151512146,
0.0020608105696737766,
-0.2352295219898224,
-0.026804903522133827,
0.21675874292850494,
-0.07668054103851318,
0.49030253291130066,
0.024577336385846138,
0.2099645733833313,
-0.025812575593590736,
0.21987566351890564,
0.12256865203380585,
-0.5316358804702759,
-0.36665239930152893,
-0.04115379601716995,
-0.033070046454668045,
0.023753652349114418,
-0.014827674254775047,
0.02827734872698784,
0.2234192043542862,
-0.3717512786388397,
0.09538920968770981,
0.05725758895277977,
-0.475497841835022,
-0.034423258155584335,
-0.11708272248506546,
0.018239013850688934,
0.3291781544685364,
0.21114030480384827,
-0.08042382448911667,
0.3448340892791748,
-0.22168117761611938,
-0.21695536375045776,
-0.3277769982814789,
-0.022613385692238808,
-0.2501811981201172,
0.18602797389030457,
0.2770848870277405,
0.07318977266550064,
-0.09088601917028427,
0.14340439438819885,
-0.029025781899690628,
-0.02907632105052471,
-0.05415002256631851,
-0.2843362092971802,
-0.08970537781715393,
-0.2674398720264435,
-0.20328892767429352,
0.0334840789437294,
0.028473129495978355,
0.18634210526943207,
0.00867236778140068,
0.05323458090424538,
-0.20109763741493225,
0.15198680758476257,
0.12267789244651794,
-0.49706363677978516,
-0.16831664741039276,
0.623340368270874,
0.08270377665758133,
-0.05501605197787285,
0.4000043272972107,
0.23619182407855988,
-0.02428594045341015,
-0.11131224036216736,
-0.10814549773931503,
0.3746098279953003,
-0.3981401026248932,
0.1701202690601349,
0.14485223591327667,
-0.1961878389120102,
-0.2891499698162079,
0.13200895488262177,
0.030323760583996773,
-0.2681393623352051,
-0.0012037246488034725,
-0.014727339148521423,
-0.5990897417068481,
0.5723326206207275,
-0.15696287155151367,
0.22246937453746796,
0.21935215592384338,
0.013669542968273163,
-0.17396028339862823,
0.23256491124629974,
-0.16299313306808472,
-0.0749225914478302,
-0.30243343114852905,
0.05094518885016441,
0.18448537588119507,
-0.1453208327293396,
0.24247920513153076,
0.09739643335342407,
-0.08831387758255005,
0.13873577117919922,
-0.20381860435009003,
-0.11814029514789581,
0.03855053707957268,
0.20561598241329193,
0.010196239687502384,
0.034521155059337616,
-0.056713178753852844,
-0.03008793108165264,
-0.04459204897284508,
-0.21337540447711945,
0.6652670502662659,
0.055938538163900375,
0.1515234261751175,
0.2013329714536667,
0.10880717635154724,
0.029384344816207886,
-0.4303303360939026,
0.14006227254867554,
0.01572796143591404,
0.16910900175571442,
0.25046008825302124,
0.08288457989692688,
0.10037000477313995,
-0.031039219349622726,
-0.4541807472705841,
0.062914177775383,
0.4600507915019989,
-0.17204178869724274,
-0.08075578510761261,
-0.08805198967456818,
-0.23820464313030243,
0.21629707515239716,
0.07308763265609741,
0.24686048924922943,
-0.26933932304382324,
-0.0418192483484745,
0.16381874680519104,
0.023993901908397675,
-0.08638685196638107,
-0.025183919817209244,
0.09913529455661774,
-0.31052151322364807,
0.0191546231508255,
0.6123442649841309,
0.1744196116924286,
0.05662734434008598,
0.0871606096625328,
0.10889675468206406,
0.30702316761016846,
0.1072295680642128,
0.091531902551651,
0.1431957632303238,
-0.037750210613012314,
0.0073171453550457954,
0.26314547657966614,
0.4207814931869507,
0.3498208224773407,
0.22864435613155365,
-0.03360900282859802,
0.3077249228954315,
-0.573945164680481,
0.22163431346416473,
-0.2341080605983734,
-0.49700185656547546,
-0.3280583620071411,
0.4078509211540222,
-0.17678748071193695,
0.045470669865608215,
-0.49193620681762695,
0.09693166613578796,
0.26204320788383484,
-0.15572859346866608,
-0.2288411557674408,
0.1897573620080948,
-0.19932059943675995,
-0.14960739016532898,
0.1461619734764099,
-0.000746880192309618,
-0.3564026653766632,
0.2511367201805115,
0.052833471447229385,
-0.3649168312549591,
0.32658034563064575,
0.12205852568149567,
-0.10097740590572357,
0.1410531848669052,
-0.05282542482018471,
0.40611526370048523,
-0.08527930825948715,
-0.2893260717391968,
0.05627550929784775,
0.14396516978740692,
0.10410625487565994,
0.02131831645965576,
0.11774463206529617,
0.06370954215526581,
0.030446840450167656,
-0.08800244331359863,
-0.017703309655189514,
0.2320956140756607,
-0.018174679949879646,
-0.11799559742212296,
0.20107051730155945,
0.08625194430351257,
0.48856210708618164,
0.0414116270840168,
-0.041204169392585754,
-0.007316448725759983,
-0.1223621591925621,
-0.006367882248014212,
0.10909265279769897,
-0.45977669954299927,
0.1422397494316101,
0.2558189630508423,
0.026440391317009926,
-0.21834678947925568,
0.15295733511447906,
-0.5634791851043701,
-0.0025337389670312405,
0.3973645269870758,
-0.23949669301509857,
0.08164826035499573,
0.05703863129019737,
-0.012404483743011951,
-0.2247115820646286,
0.7063220739364624,
0.14932532608509064,
0.10099559277296066,
-0.49046236276626587,
0.08786942064762115,
-0.2523312568664551,
0.011696659959852695,
-0.056479934602975845,
0.3043070137500763,
0.1508430689573288,
0.2124759554862976,
-0.056298866868019104,
0.22392332553863525,
-0.508144199848175,
-0.07571250200271606,
-0.31260091066360474,
-0.18423539400100708,
-0.09842019528150558,
-0.15483435988426208,
-0.4467170238494873,
0.2984541952610016,
0.1048930287361145,
-0.16870804131031036,
0.09458080679178238,
-0.10092073678970337,
-0.23752853274345398,
-0.07834022492170334,
0.057241491973400116,
-0.0377935916185379,
0.32250019907951355,
0.23684482276439667,
0.12221973389387131,
0.2072189599275589,
-0.16052691638469696,
-0.1555768996477127,
-0.14739565551280975,
-0.09276264160871506,
-0.25736483931541443,
-0.21156741678714752,
-0.07414054870605469,
0.2012787163257599,
-0.30871206521987915,
0.07079210132360458,
-0.2480507791042328,
0.07432226091623306,
-0.0339074432849884,
-0.22583892941474915,
0.06301835179328918,
-0.11844502389431,
-0.00501238601282239,
0.2903840243816376,
0.12959285080432892,
0.3474193215370178,
-0.1978289633989334,
0.01905786618590355,
-0.17499315738677979,
-0.060022346675395966,
0.4449536204338074,
-0.23499701917171478,
-0.12134619057178497,
-0.2829073667526245,
0.22633783519268036,
-0.09860722720623016,
-0.1131579652428627,
-0.5062598586082458,
0.19411228597164154,
0.05723214149475098,
0.16763964295387268,
-0.4304612874984741,
0.4660096764564514,
-0.13169384002685547,
-0.11425881832838058,
-0.2120938003063202,
0.19248183071613312,
0.009714716114103794,
-0.08529753983020782,
-0.1749819666147232,
-0.4122217893600464
] |
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.12737514078617096,
-0.35116562247276306,
-0.017932644113898277,
0.35360872745513916,
0.47600245475769043,
0.08871346712112427,
0.7330296635627747,
0.38043493032455444,
0.06552495807409286,
-0.0380423478782177,
-0.111153244972229,
0.3819507658481598,
-0.23296910524368286,
-0.33393433690071106,
0.03510892763733864,
-0.5614942312240601,
0.2225799858570099,
-0.09982758015394211,
-0.28079819679260254,
-0.06134718284010887,
-0.24313423037528992,
0.03548915311694145,
-0.21849742531776428,
-0.10849645733833313,
-0.5479354858398438,
0.044095996767282486,
-0.019555551931262016,
-0.07656887918710709,
-0.06229947507381439,
-0.13918043673038483,
0.12234672904014587,
-0.17449654638767242,
0.4444533586502075,
0.7012934684753418,
-0.00012770107423420995,
0.07030182331800461,
0.36427220702171326,
-0.17377832531929016,
0.04999925196170807,
-0.16101369261741638,
0.04004685580730438,
-0.2573828101158142,
0.07277636975049973,
-0.09468337148427963,
-0.22349399328231812,
-0.17084543406963348,
0.09591034799814224,
-0.17902971804141998,
-0.028141869232058525,
0.41916894912719727,
0.07712996751070023,
0.27901116013526917,
0.24666103720664978,
0.13863056898117065,
0.22781161963939667,
0.5182864665985107,
-0.2734379470348358,
-0.05611717700958252,
0.22615034878253937,
0.37547779083251953,
0.12400452792644501,
0.5647348761558533,
-0.2913348972797394,
-0.036233801394701004,
0.26694509387016296,
0.12900516390800476,
-0.10145501792430878,
-0.314005583524704,
0.04915720224380493,
0.08946330100297928,
0.42194420099258423,
-0.1494392454624176,
-0.08077910542488098,
-0.1436641365289688,
-0.14397795498371124,
-0.12738043069839478,
0.04059102386236191,
0.2803194522857666,
-0.07184098660945892,
-0.18723826110363007,
-0.539242684841156,
0.30529189109802246,
-0.14862369000911713,
0.2131589651107788,
-0.2805241644382477,
-0.0034206677228212357,
-0.13816316425800323,
0.2928087115287781,
-0.047119300812482834,
-0.11271274834871292,
0.19308078289031982,
-0.12341479957103729,
0.1300756186246872,
-0.009825528599321842,
-0.14363200962543488,
-0.053490735590457916,
-0.38959938287734985,
-0.31501221656799316,
-0.20014798641204834,
-0.1602649688720703,
0.16648538410663605,
0.13927580416202545,
-0.11639551818370819,
0.12807093560695648,
0.18263286352157593,
0.2680342197418213,
0.10578285157680511,
0.32070258259773254,
-0.085892453789711,
-0.2895815670490265,
-0.04691935330629349,
0.0877332016825676,
-0.29622682929039,
-0.4357525408267975,
0.1545342057943344,
0.32529687881469727,
0.24522154033184052,
0.06874307245016098,
0.12985509634017944,
-0.32394087314605713,
-0.10892301052808762,
-0.009586540050804615,
0.07522505521774292,
0.2850382328033447,
-0.11867921054363251,
0.24390484392642975,
0.48048296570777893,
0.39720281958580017,
-0.15381810069084167,
0.06956271827220917,
0.025072576478123665,
0.03152092918753624,
-0.44049566984176636,
-0.28569865226745605,
0.15340976417064667,
-0.11777324229478836,
0.10007024556398392,
0.037431828677654266,
0.04641568288207054,
0.10069649666547775,
0.07349668443202972,
-0.18586984276771545,
0.6246294975280762,
0.14764700829982758,
-0.19447416067123413,
0.2767931818962097,
0.270906537771225,
0.5297801494598389,
-0.304298460483551,
0.25653156638145447,
-0.5095698833465576,
0.065252885222435,
-0.023091433569788933,
-0.014543901197612286,
0.2186548262834549,
-0.020721858367323875,
-0.2121620923280716,
0.015829231590032578,
0.592312216758728,
-0.08367802947759628,
0.27348771691322327,
-0.5791622996330261,
0.09496430307626724,
-0.19133509695529938,
0.0341525562107563,
0.06366927176713943,
-0.20471520721912384,
-0.05235873907804489,
0.38634389638900757,
0.09194979816675186,
0.31545889377593994,
0.16028234362602234,
0.05108339339494705,
0.07987046986818314,
-0.225352942943573,
-0.23505039513111115,
0.3363233506679535,
-0.3768564462661743,
0.09203807264566422,
-0.01769321784377098,
0.09387896209955215,
-0.06380388885736465,
0.11201920360326767,
0.3361777365207672,
0.03260112181305885,
-0.12800149619579315,
0.029448654502630234,
0.1963149607181549,
-0.16618236899375916,
0.1402868926525116,
0.07735977321863174,
0.1913028061389923,
0.1933746337890625,
0.03500613570213318,
-0.01568373665213585,
0.20765338838100433,
-0.2216716706752777,
0.17757616937160492,
-0.05428053066134453,
-0.0747133418917656,
0.07117719948291779,
0.040378037840127945,
-0.3698902428150177,
-0.012196831405162811,
-0.04746969789266586,
0.1864665299654007,
-0.23310033977031708,
-0.04872112721204758,
0.023635009303689003,
0.08221708983182907,
0.05827915668487549,
0.047924596816301346,
0.0049781715497374535,
-0.1919565051794052,
-0.18220600485801697,
-0.13902734220027924,
-0.0032421820797026157,
0.09221033751964569,
-0.2094767987728119,
-0.2617241442203522,
-0.052343688905239105,
-0.12324901670217514,
0.17830416560173035,
0.058837827295064926,
-0.35903677344322205,
0.051025453954935074,
0.019273776561021805,
-0.36533042788505554,
-0.2013598531484604,
0.17339256405830383,
0.26766902208328247,
-0.09962092339992523,
-0.04223461076617241,
0.19160310924053192,
0.06328868865966797,
0.1146329939365387,
-0.5482741594314575,
0.0834660679101944,
0.17784197628498077,
-0.24697020649909973,
0.2043912559747696,
0.2162797600030899,
0.14853379130363464,
-0.2755032777786255,
-0.19603493809700012,
0.43878665566444397,
0.16041062772274017,
0.3159129023551941,
-0.3300256133079529,
0.11610186100006104,
-0.07264672964811325,
-0.03940204530954361,
-0.19063358008861542,
-0.040808115154504776,
-0.27728158235549927,
0.07302392274141312,
-0.1318594217300415,
0.012982288375496864,
-0.45691895484924316,
-0.04493600130081177,
0.29626211524009705,
0.08876395225524902,
0.1758720725774765,
-0.0012163631618022919,
-0.3998461067676544,
0.21331210434436798,
0.17712657153606415,
-0.6013535261154175,
0.2978383004665375,
-0.00436173053458333,
0.18920734524726868,
-0.10501883924007416,
0.09558358788490295,
-0.1625431478023529,
0.24844472110271454,
0.11404215544462204,
0.09074815362691879,
-0.19946475327014923,
0.14185214042663574,
-0.10792585462331772,
0.02684636600315571,
0.026369821280241013,
-0.140628844499588,
-0.23369300365447998,
-0.3589506447315216,
0.27138257026672363,
-0.16618312895298004,
-0.13451862335205078,
-0.40185463428497314,
-0.2621859610080719,
0.03605636954307556,
-0.07400504499673843,
-0.08233371376991272,
0.1507578194141388,
0.18556810915470123,
0.19043487310409546,
0.2634179890155792,
-0.1818944662809372,
0.37431609630584717,
-0.41302919387817383,
-0.03535478934645653,
-0.07500974833965302,
-0.2867960035800934,
-0.09916486591100693,
0.08965590596199036,
-0.5234113335609436,
0.09148448705673218,
-0.2289898842573166,
-0.09319096803665161,
-0.250175803899765,
0.013548125512897968,
0.14182229340076447,
-0.2678501605987549,
-0.28500300645828247,
0.308591365814209,
0.1939285695552826,
-0.14248229563236237,
0.04066231846809387,
0.2663511037826538,
0.010307513177394867,
0.04690111428499222,
0.15378358960151672,
-0.08961997926235199,
0.11656028032302856,
-0.06329821795225143,
-0.17674081027507782,
-0.09661802649497986,
-0.07506143301725388,
-0.07041662931442261,
-0.021759675815701485,
0.06337695568799973,
0.3462585210800171,
0.37218356132507324,
-0.08989036083221436,
-0.052042409777641296,
0.035609036684036255,
0.06296498328447342,
-0.39768779277801514,
0.5225028991699219,
-0.22615419328212738,
-0.36082586646080017,
0.11920181661844254,
0.023855721578001976,
0.06514710932970047,
0.48626869916915894,
0.06052284687757492,
0.049731604754924774,
0.011782478541135788,
-0.07894466072320938,
0.25259289145469666,
0.22119715809822083,
0.35102036595344543,
-0.09112486988306046,
0.01916578784584999,
-0.16470715403556824,
0.015416686423122883,
-0.10187187790870667,
-0.06325501948595047,
0.6088862419128418,
0.1850840449333191,
0.2399427741765976,
0.09925858676433563,
0.6996651291847229,
-0.06113724410533905,
-0.7380952835083008,
0.21680672466754913,
-0.2425099015235901,
0.1921670287847519,
-0.11812160909175873,
-0.3539586663246155,
0.3988560438156128,
-0.20941969752311707,
0.06437364965677261,
-0.08596715331077576,
-0.024906951934099197,
-0.2391577512025833,
-0.09022432565689087,
0.3573607802391052,
-0.3172069191932678,
-0.15857398509979248,
0.4044302701950073,
-0.14470256865024567,
0.27637311816215515,
-0.23134253919124603,
0.3245902359485626,
-0.26092609763145447,
-0.21379277110099792,
0.060056984424591064,
0.44877177476882935,
0.13851357996463776,
0.04172460362315178,
-0.3342844247817993,
-0.21669700741767883,
-0.14322705566883087,
0.35682761669158936,
0.11957734078168869,
0.5672699809074402,
-0.09803595393896103,
-0.07446511834859848,
0.10155639052391052,
0.24136953055858612,
0.8307592272758484,
0.045557230710983276,
-0.0904591903090477,
0.15144191682338715,
-0.34783491492271423,
-0.45497825741767883,
-0.102229043841362,
-0.051417913287878036,
0.09068144112825394,
0.17169053852558136,
0.12038647383451462,
-0.09105323255062103,
-0.18333399295806885,
-0.005832506809383631,
0.19555510580539703,
-0.055124957114458084,
0.03471889719367027,
-0.22691141068935394,
0.05875765159726143,
-0.12964999675750732,
-0.15528330206871033,
0.22118236124515533,
0.029675418511033058,
0.00516205420717597,
-0.3081282079219818,
-0.3262302577495575,
-0.1266998052597046,
0.18248215317726135,
-0.1330121010541916,
0.4110669791698456,
0.09925137460231781,
-0.17808538675308228,
0.07690707594156265,
0.5561061501502991,
0.4184044897556305,
-0.03893916308879852,
-0.11877360939979553,
0.08064387738704681,
0.2931108772754669,
0.10643281042575836,
0.3002045154571533,
0.32082387804985046,
-0.06187281012535095,
-0.43966391682624817,
-0.22684866189956665,
-0.1938147395849228,
-0.33053264021873474,
0.3972931206226349,
0.4080631732940674,
0.09893536567687988,
-0.49535563588142395,
-0.49217092990875244,
0.3861899673938751,
0.29371947050094604,
0.19583043456077576,
0.20459184050559998,
-0.5417590737342834,
-0.40096724033355713,
0.07817858457565308,
0.46624189615249634,
0.8556229472160339,
-0.0370788499712944,
0.3702828288078308,
0.03156561404466629,
0.010807035490870476,
0.17210228741168976,
-0.001889070263132453,
0.4117945730686188,
-0.35428154468536377,
0.13928939402103424,
-0.1648537963628769,
-0.31254979968070984,
0.2525227963924408,
-0.06020328402519226,
-0.2439698874950409,
0.04253644496202469,
-0.3494715094566345,
0.19361983239650726,
-0.12569352984428406,
-0.08285321295261383,
-0.04982635751366615,
-0.471417635679245,
0.18787378072738647,
0.015452072955667973,
-0.08251318335533142,
0.26173895597457886,
0.11116104573011398,
-0.16362063586711884,
-0.3798603415489197,
0.06169583275914192,
-0.07622244954109192,
-0.015011891722679138,
-0.24596944451332092,
-0.16324317455291748,
-0.024310344830155373,
-0.7298661470413208,
0.058679886162281036,
0.4961579442024231,
0.3345544934272766,
-0.160566508769989,
-0.04783676192164421,
0.13964155316352844,
0.44384729862213135,
0.16290026903152466,
-0.0990171730518341,
-0.3401840925216675,
0.28534069657325745,
0.0973755419254303,
0.18433213233947754,
0.10863812267780304,
0.06814854592084885,
0.21052049100399017,
-0.5777892470359802,
0.03725123777985573,
0.3060290813446045,
-0.3449511229991913,
-0.3229847550392151,
-0.19845038652420044,
0.04918491840362549,
0.03816332668066025,
0.028618456795811653,
0.12448917329311371,
-0.03890300542116165,
0.20724327862262726,
-0.041512202471494675,
-0.22646154463291168,
0.13288986682891846,
0.45233115553855896,
0.11298368126153946,
-0.3500462770462036,
0.39075642824172974,
0.35495880246162415,
-0.04477781802415848,
-0.0437438078224659,
0.4166940748691559,
0.635319173336029,
-0.34569671750068665,
0.09949755668640137,
-0.10271666198968887,
-0.1569867730140686,
-0.011073690839111805,
0.5430943965911865,
-0.23431749641895294,
-0.13097791373729706,
-0.23895752429962158,
-0.04081762582063675,
-0.43089377880096436,
0.010813401080667973,
-0.3162982165813446,
0.45663073658943176,
-0.043222445994615555,
0.3627101182937622,
0.21050584316253662,
-0.18734930455684662,
-0.14413583278656006,
-0.25864914059638977,
0.17235061526298523,
0.36793357133865356,
-0.24718241393566132,
0.2187611609697342,
-0.126958429813385,
-0.1220230832695961,
-0.03625234216451645,
0.026031319051980972,
-0.24973955750465393,
-0.033390723168849945,
-0.05767792835831642,
0.1773061901330948,
0.06661427766084671,
-0.11354031413793564,
-0.07354700565338135,
-0.17366941273212433,
-0.1385808140039444,
-0.2681722044944763,
-0.0377182736992836,
0.1109214499592781,
-0.11599929630756378,
0.3531613349914551,
-0.17836593091487885,
0.23122578859329224,
0.3186763525009155,
-0.27000051736831665,
-0.10262239724397659,
0.03587157279253006,
0.2229628711938858,
0.060050833970308304,
0.004531959071755409,
-0.061556655913591385,
-0.27723655104637146,
0.11259152740240097,
0.16520315408706665,
0.25497496128082275,
0.20461730659008026,
-0.09999668598175049,
0.10917840152978897,
-0.04380663484334946,
0.20418405532836914,
0.10125570744276047,
-0.17187079787254333,
-0.0508287288248539,
0.06037340685725212,
-0.007623378187417984,
0.10062166303396225,
0.14499929547309875,
0.03886914625763893,
0.1252809762954712,
-0.08346397429704666,
0.275578111410141,
0.06655873358249664,
0.31139472126960754,
-0.3705076575279236,
0.04514239355921745,
0.41785621643066406,
-0.24107322096824646,
0.23508600890636444,
0.46401476860046387,
0.014799953438341618,
0.19304950535297394,
0.29070472717285156,
0.1093434989452362,
-0.11870165169239044,
0.32269638776779175,
0.39451682567596436,
0.8204314112663269,
0.5895959138870239,
0.08376955986022949,
0.27460289001464844,
0.09925687313079834,
-0.15360723435878754,
-0.20725123584270477,
0.23582398891448975,
0.39196836948394775,
0.018867086619138718,
0.18569326400756836,
-0.24079905450344086,
-0.4871237874031067,
0.2258823961019516,
0.12177469581365585,
-0.19461774826049805,
-0.0822235494852066,
-0.6648060083389282,
0.011875391006469727,
0.13582637906074524,
-0.1866595447063446,
-0.17971548438072205,
-0.050137732177972794,
0.22059080004692078,
0.259753555059433,
-0.10322070121765137,
-0.16091257333755493,
-0.17247425019741058,
0.0691012591123581,
0.03752928599715233,
-0.007329888176172972,
0.16975699365139008,
-0.13684619963169098,
0.16176092624664307,
0.24482418596744537,
0.1969079226255417,
0.28495338559150696,
0.4870798885822296,
-0.1681717336177826,
-0.15989352762699127,
-0.0105538135394454,
-0.1923658847808838,
0.08990129828453064,
0.06671170145273209,
0.031533826142549515,
-0.1532077044248581,
-0.014956250786781311,
0.008462578989565372,
0.03862797096371651,
0.031460441648960114,
-0.09408104419708252,
-0.2182597517967224,
0.16762492060661316,
0.3055749535560608,
-0.36377716064453125,
-0.149092897772789,
-0.0998985692858696,
-0.24665600061416626,
-0.34831011295318604,
-0.2655346989631653,
0.5327387452125549,
0.02789606899023056,
0.1280096471309662,
0.14216767251491547,
-0.0421595498919487,
0.048785898834466934,
0.15741202235221863,
-0.12155666947364807,
0.07757695764303207,
-0.15409377217292786,
0.1359657198190689,
-0.08580520004034042,
0.03191034495830536,
0.1184747964143753,
-0.3834478557109833,
-0.018849456682801247,
-0.03916439414024353,
0.24254173040390015,
0.0646749958395958,
0.20209015905857086,
-0.09834744036197662,
0.4987446963787079,
0.6146570444107056,
-0.1336156725883484,
-0.14148077368736267,
-0.13041949272155762,
0.37065139412879944,
0.07330852001905441,
-0.0774654895067215,
0.021921269595623016,
0.1024273931980133,
0.006506839767098427,
-0.3420654237270355,
-0.25549036264419556,
-0.019982242956757545,
0.3041453957557678,
0.35128292441368103,
0.09328830987215042,
0.32031315565109253,
-0.01922059804201126,
0.04841003194451332,
-0.24113398790359497,
0.050415195524692535,
-0.1276012361049652,
0.009670786559581757,
-0.022802725434303284,
0.5810166001319885,
-0.22440192103385925,
-0.05934266746044159,
-0.413650244474411,
0.42902642488479614,
0.09053132683038712,
-0.33885475993156433,
-0.08051957935094833,
0.3583999574184418,
-0.31732064485549927,
-0.2010880708694458,
0.22619470953941345,
0.4100223481655121,
0.15136000514030457,
0.19435739517211914,
-0.5254405736923218,
-0.4069116413593292,
0.44720226526260376,
-0.4417078197002411,
-0.5069124698638916,
0.02907452918589115,
-0.31339389085769653,
0.06790432333946228,
0.49642300605773926,
-0.4710500240325928,
-0.14913417398929596,
0.0015055608237162232,
-0.08082758635282516,
-0.09160450100898743,
-0.09819380193948746,
0.2610398828983307,
0.015110877342522144,
-0.2518463730812073,
0.17900733649730682,
0.1764504462480545,
-0.022816073149442673,
-0.42041611671447754,
-0.27535995841026306
] |
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.12737514078617096,
-0.35116562247276306,
-0.017932644113898277,
0.35360872745513916,
0.47600245475769043,
0.08871346712112427,
0.7330296635627747,
0.38043493032455444,
0.06552495807409286,
-0.0380423478782177,
-0.111153244972229,
0.3819507658481598,
-0.23296910524368286,
-0.33393433690071106,
0.03510892763733864,
-0.5614942312240601,
0.2225799858570099,
-0.09982758015394211,
-0.28079819679260254,
-0.06134718284010887,
-0.24313423037528992,
0.03548915311694145,
-0.21849742531776428,
-0.10849645733833313,
-0.5479354858398438,
0.044095996767282486,
-0.019555551931262016,
-0.07656887918710709,
-0.06229947507381439,
-0.13918043673038483,
0.12234672904014587,
-0.17449654638767242,
0.4444533586502075,
0.7012934684753418,
-0.00012770107423420995,
0.07030182331800461,
0.36427220702171326,
-0.17377832531929016,
0.04999925196170807,
-0.16101369261741638,
0.04004685580730438,
-0.2573828101158142,
0.07277636975049973,
-0.09468337148427963,
-0.22349399328231812,
-0.17084543406963348,
0.09591034799814224,
-0.17902971804141998,
-0.028141869232058525,
0.41916894912719727,
0.07712996751070023,
0.27901116013526917,
0.24666103720664978,
0.13863056898117065,
0.22781161963939667,
0.5182864665985107,
-0.2734379470348358,
-0.05611717700958252,
0.22615034878253937,
0.37547779083251953,
0.12400452792644501,
0.5647348761558533,
-0.2913348972797394,
-0.036233801394701004,
0.26694509387016296,
0.12900516390800476,
-0.10145501792430878,
-0.314005583524704,
0.04915720224380493,
0.08946330100297928,
0.42194420099258423,
-0.1494392454624176,
-0.08077910542488098,
-0.1436641365289688,
-0.14397795498371124,
-0.12738043069839478,
0.04059102386236191,
0.2803194522857666,
-0.07184098660945892,
-0.18723826110363007,
-0.539242684841156,
0.30529189109802246,
-0.14862369000911713,
0.2131589651107788,
-0.2805241644382477,
-0.0034206677228212357,
-0.13816316425800323,
0.2928087115287781,
-0.047119300812482834,
-0.11271274834871292,
0.19308078289031982,
-0.12341479957103729,
0.1300756186246872,
-0.009825528599321842,
-0.14363200962543488,
-0.053490735590457916,
-0.38959938287734985,
-0.31501221656799316,
-0.20014798641204834,
-0.1602649688720703,
0.16648538410663605,
0.13927580416202545,
-0.11639551818370819,
0.12807093560695648,
0.18263286352157593,
0.2680342197418213,
0.10578285157680511,
0.32070258259773254,
-0.085892453789711,
-0.2895815670490265,
-0.04691935330629349,
0.0877332016825676,
-0.29622682929039,
-0.4357525408267975,
0.1545342057943344,
0.32529687881469727,
0.24522154033184052,
0.06874307245016098,
0.12985509634017944,
-0.32394087314605713,
-0.10892301052808762,
-0.009586540050804615,
0.07522505521774292,
0.2850382328033447,
-0.11867921054363251,
0.24390484392642975,
0.48048296570777893,
0.39720281958580017,
-0.15381810069084167,
0.06956271827220917,
0.025072576478123665,
0.03152092918753624,
-0.44049566984176636,
-0.28569865226745605,
0.15340976417064667,
-0.11777324229478836,
0.10007024556398392,
0.037431828677654266,
0.04641568288207054,
0.10069649666547775,
0.07349668443202972,
-0.18586984276771545,
0.6246294975280762,
0.14764700829982758,
-0.19447416067123413,
0.2767931818962097,
0.270906537771225,
0.5297801494598389,
-0.304298460483551,
0.25653156638145447,
-0.5095698833465576,
0.065252885222435,
-0.023091433569788933,
-0.014543901197612286,
0.2186548262834549,
-0.020721858367323875,
-0.2121620923280716,
0.015829231590032578,
0.592312216758728,
-0.08367802947759628,
0.27348771691322327,
-0.5791622996330261,
0.09496430307626724,
-0.19133509695529938,
0.0341525562107563,
0.06366927176713943,
-0.20471520721912384,
-0.05235873907804489,
0.38634389638900757,
0.09194979816675186,
0.31545889377593994,
0.16028234362602234,
0.05108339339494705,
0.07987046986818314,
-0.225352942943573,
-0.23505039513111115,
0.3363233506679535,
-0.3768564462661743,
0.09203807264566422,
-0.01769321784377098,
0.09387896209955215,
-0.06380388885736465,
0.11201920360326767,
0.3361777365207672,
0.03260112181305885,
-0.12800149619579315,
0.029448654502630234,
0.1963149607181549,
-0.16618236899375916,
0.1402868926525116,
0.07735977321863174,
0.1913028061389923,
0.1933746337890625,
0.03500613570213318,
-0.01568373665213585,
0.20765338838100433,
-0.2216716706752777,
0.17757616937160492,
-0.05428053066134453,
-0.0747133418917656,
0.07117719948291779,
0.040378037840127945,
-0.3698902428150177,
-0.012196831405162811,
-0.04746969789266586,
0.1864665299654007,
-0.23310033977031708,
-0.04872112721204758,
0.023635009303689003,
0.08221708983182907,
0.05827915668487549,
0.047924596816301346,
0.0049781715497374535,
-0.1919565051794052,
-0.18220600485801697,
-0.13902734220027924,
-0.0032421820797026157,
0.09221033751964569,
-0.2094767987728119,
-0.2617241442203522,
-0.052343688905239105,
-0.12324901670217514,
0.17830416560173035,
0.058837827295064926,
-0.35903677344322205,
0.051025453954935074,
0.019273776561021805,
-0.36533042788505554,
-0.2013598531484604,
0.17339256405830383,
0.26766902208328247,
-0.09962092339992523,
-0.04223461076617241,
0.19160310924053192,
0.06328868865966797,
0.1146329939365387,
-0.5482741594314575,
0.0834660679101944,
0.17784197628498077,
-0.24697020649909973,
0.2043912559747696,
0.2162797600030899,
0.14853379130363464,
-0.2755032777786255,
-0.19603493809700012,
0.43878665566444397,
0.16041062772274017,
0.3159129023551941,
-0.3300256133079529,
0.11610186100006104,
-0.07264672964811325,
-0.03940204530954361,
-0.19063358008861542,
-0.040808115154504776,
-0.27728158235549927,
0.07302392274141312,
-0.1318594217300415,
0.012982288375496864,
-0.45691895484924316,
-0.04493600130081177,
0.29626211524009705,
0.08876395225524902,
0.1758720725774765,
-0.0012163631618022919,
-0.3998461067676544,
0.21331210434436798,
0.17712657153606415,
-0.6013535261154175,
0.2978383004665375,
-0.00436173053458333,
0.18920734524726868,
-0.10501883924007416,
0.09558358788490295,
-0.1625431478023529,
0.24844472110271454,
0.11404215544462204,
0.09074815362691879,
-0.19946475327014923,
0.14185214042663574,
-0.10792585462331772,
0.02684636600315571,
0.026369821280241013,
-0.140628844499588,
-0.23369300365447998,
-0.3589506447315216,
0.27138257026672363,
-0.16618312895298004,
-0.13451862335205078,
-0.40185463428497314,
-0.2621859610080719,
0.03605636954307556,
-0.07400504499673843,
-0.08233371376991272,
0.1507578194141388,
0.18556810915470123,
0.19043487310409546,
0.2634179890155792,
-0.1818944662809372,
0.37431609630584717,
-0.41302919387817383,
-0.03535478934645653,
-0.07500974833965302,
-0.2867960035800934,
-0.09916486591100693,
0.08965590596199036,
-0.5234113335609436,
0.09148448705673218,
-0.2289898842573166,
-0.09319096803665161,
-0.250175803899765,
0.013548125512897968,
0.14182229340076447,
-0.2678501605987549,
-0.28500300645828247,
0.308591365814209,
0.1939285695552826,
-0.14248229563236237,
0.04066231846809387,
0.2663511037826538,
0.010307513177394867,
0.04690111428499222,
0.15378358960151672,
-0.08961997926235199,
0.11656028032302856,
-0.06329821795225143,
-0.17674081027507782,
-0.09661802649497986,
-0.07506143301725388,
-0.07041662931442261,
-0.021759675815701485,
0.06337695568799973,
0.3462585210800171,
0.37218356132507324,
-0.08989036083221436,
-0.052042409777641296,
0.035609036684036255,
0.06296498328447342,
-0.39768779277801514,
0.5225028991699219,
-0.22615419328212738,
-0.36082586646080017,
0.11920181661844254,
0.023855721578001976,
0.06514710932970047,
0.48626869916915894,
0.06052284687757492,
0.049731604754924774,
0.011782478541135788,
-0.07894466072320938,
0.25259289145469666,
0.22119715809822083,
0.35102036595344543,
-0.09112486988306046,
0.01916578784584999,
-0.16470715403556824,
0.015416686423122883,
-0.10187187790870667,
-0.06325501948595047,
0.6088862419128418,
0.1850840449333191,
0.2399427741765976,
0.09925858676433563,
0.6996651291847229,
-0.06113724410533905,
-0.7380952835083008,
0.21680672466754913,
-0.2425099015235901,
0.1921670287847519,
-0.11812160909175873,
-0.3539586663246155,
0.3988560438156128,
-0.20941969752311707,
0.06437364965677261,
-0.08596715331077576,
-0.024906951934099197,
-0.2391577512025833,
-0.09022432565689087,
0.3573607802391052,
-0.3172069191932678,
-0.15857398509979248,
0.4044302701950073,
-0.14470256865024567,
0.27637311816215515,
-0.23134253919124603,
0.3245902359485626,
-0.26092609763145447,
-0.21379277110099792,
0.060056984424591064,
0.44877177476882935,
0.13851357996463776,
0.04172460362315178,
-0.3342844247817993,
-0.21669700741767883,
-0.14322705566883087,
0.35682761669158936,
0.11957734078168869,
0.5672699809074402,
-0.09803595393896103,
-0.07446511834859848,
0.10155639052391052,
0.24136953055858612,
0.8307592272758484,
0.045557230710983276,
-0.0904591903090477,
0.15144191682338715,
-0.34783491492271423,
-0.45497825741767883,
-0.102229043841362,
-0.051417913287878036,
0.09068144112825394,
0.17169053852558136,
0.12038647383451462,
-0.09105323255062103,
-0.18333399295806885,
-0.005832506809383631,
0.19555510580539703,
-0.055124957114458084,
0.03471889719367027,
-0.22691141068935394,
0.05875765159726143,
-0.12964999675750732,
-0.15528330206871033,
0.22118236124515533,
0.029675418511033058,
0.00516205420717597,
-0.3081282079219818,
-0.3262302577495575,
-0.1266998052597046,
0.18248215317726135,
-0.1330121010541916,
0.4110669791698456,
0.09925137460231781,
-0.17808538675308228,
0.07690707594156265,
0.5561061501502991,
0.4184044897556305,
-0.03893916308879852,
-0.11877360939979553,
0.08064387738704681,
0.2931108772754669,
0.10643281042575836,
0.3002045154571533,
0.32082387804985046,
-0.06187281012535095,
-0.43966391682624817,
-0.22684866189956665,
-0.1938147395849228,
-0.33053264021873474,
0.3972931206226349,
0.4080631732940674,
0.09893536567687988,
-0.49535563588142395,
-0.49217092990875244,
0.3861899673938751,
0.29371947050094604,
0.19583043456077576,
0.20459184050559998,
-0.5417590737342834,
-0.40096724033355713,
0.07817858457565308,
0.46624189615249634,
0.8556229472160339,
-0.0370788499712944,
0.3702828288078308,
0.03156561404466629,
0.010807035490870476,
0.17210228741168976,
-0.001889070263132453,
0.4117945730686188,
-0.35428154468536377,
0.13928939402103424,
-0.1648537963628769,
-0.31254979968070984,
0.2525227963924408,
-0.06020328402519226,
-0.2439698874950409,
0.04253644496202469,
-0.3494715094566345,
0.19361983239650726,
-0.12569352984428406,
-0.08285321295261383,
-0.04982635751366615,
-0.471417635679245,
0.18787378072738647,
0.015452072955667973,
-0.08251318335533142,
0.26173895597457886,
0.11116104573011398,
-0.16362063586711884,
-0.3798603415489197,
0.06169583275914192,
-0.07622244954109192,
-0.015011891722679138,
-0.24596944451332092,
-0.16324317455291748,
-0.024310344830155373,
-0.7298661470413208,
0.058679886162281036,
0.4961579442024231,
0.3345544934272766,
-0.160566508769989,
-0.04783676192164421,
0.13964155316352844,
0.44384729862213135,
0.16290026903152466,
-0.0990171730518341,
-0.3401840925216675,
0.28534069657325745,
0.0973755419254303,
0.18433213233947754,
0.10863812267780304,
0.06814854592084885,
0.21052049100399017,
-0.5777892470359802,
0.03725123777985573,
0.3060290813446045,
-0.3449511229991913,
-0.3229847550392151,
-0.19845038652420044,
0.04918491840362549,
0.03816332668066025,
0.028618456795811653,
0.12448917329311371,
-0.03890300542116165,
0.20724327862262726,
-0.041512202471494675,
-0.22646154463291168,
0.13288986682891846,
0.45233115553855896,
0.11298368126153946,
-0.3500462770462036,
0.39075642824172974,
0.35495880246162415,
-0.04477781802415848,
-0.0437438078224659,
0.4166940748691559,
0.635319173336029,
-0.34569671750068665,
0.09949755668640137,
-0.10271666198968887,
-0.1569867730140686,
-0.011073690839111805,
0.5430943965911865,
-0.23431749641895294,
-0.13097791373729706,
-0.23895752429962158,
-0.04081762582063675,
-0.43089377880096436,
0.010813401080667973,
-0.3162982165813446,
0.45663073658943176,
-0.043222445994615555,
0.3627101182937622,
0.21050584316253662,
-0.18734930455684662,
-0.14413583278656006,
-0.25864914059638977,
0.17235061526298523,
0.36793357133865356,
-0.24718241393566132,
0.2187611609697342,
-0.126958429813385,
-0.1220230832695961,
-0.03625234216451645,
0.026031319051980972,
-0.24973955750465393,
-0.033390723168849945,
-0.05767792835831642,
0.1773061901330948,
0.06661427766084671,
-0.11354031413793564,
-0.07354700565338135,
-0.17366941273212433,
-0.1385808140039444,
-0.2681722044944763,
-0.0377182736992836,
0.1109214499592781,
-0.11599929630756378,
0.3531613349914551,
-0.17836593091487885,
0.23122578859329224,
0.3186763525009155,
-0.27000051736831665,
-0.10262239724397659,
0.03587157279253006,
0.2229628711938858,
0.060050833970308304,
0.004531959071755409,
-0.061556655913591385,
-0.27723655104637146,
0.11259152740240097,
0.16520315408706665,
0.25497496128082275,
0.20461730659008026,
-0.09999668598175049,
0.10917840152978897,
-0.04380663484334946,
0.20418405532836914,
0.10125570744276047,
-0.17187079787254333,
-0.0508287288248539,
0.06037340685725212,
-0.007623378187417984,
0.10062166303396225,
0.14499929547309875,
0.03886914625763893,
0.1252809762954712,
-0.08346397429704666,
0.275578111410141,
0.06655873358249664,
0.31139472126960754,
-0.3705076575279236,
0.04514239355921745,
0.41785621643066406,
-0.24107322096824646,
0.23508600890636444,
0.46401476860046387,
0.014799953438341618,
0.19304950535297394,
0.29070472717285156,
0.1093434989452362,
-0.11870165169239044,
0.32269638776779175,
0.39451682567596436,
0.8204314112663269,
0.5895959138870239,
0.08376955986022949,
0.27460289001464844,
0.09925687313079834,
-0.15360723435878754,
-0.20725123584270477,
0.23582398891448975,
0.39196836948394775,
0.018867086619138718,
0.18569326400756836,
-0.24079905450344086,
-0.4871237874031067,
0.2258823961019516,
0.12177469581365585,
-0.19461774826049805,
-0.0822235494852066,
-0.6648060083389282,
0.011875391006469727,
0.13582637906074524,
-0.1866595447063446,
-0.17971548438072205,
-0.050137732177972794,
0.22059080004692078,
0.259753555059433,
-0.10322070121765137,
-0.16091257333755493,
-0.17247425019741058,
0.0691012591123581,
0.03752928599715233,
-0.007329888176172972,
0.16975699365139008,
-0.13684619963169098,
0.16176092624664307,
0.24482418596744537,
0.1969079226255417,
0.28495338559150696,
0.4870798885822296,
-0.1681717336177826,
-0.15989352762699127,
-0.0105538135394454,
-0.1923658847808838,
0.08990129828453064,
0.06671170145273209,
0.031533826142549515,
-0.1532077044248581,
-0.014956250786781311,
0.008462578989565372,
0.03862797096371651,
0.031460441648960114,
-0.09408104419708252,
-0.2182597517967224,
0.16762492060661316,
0.3055749535560608,
-0.36377716064453125,
-0.149092897772789,
-0.0998985692858696,
-0.24665600061416626,
-0.34831011295318604,
-0.2655346989631653,
0.5327387452125549,
0.02789606899023056,
0.1280096471309662,
0.14216767251491547,
-0.0421595498919487,
0.048785898834466934,
0.15741202235221863,
-0.12155666947364807,
0.07757695764303207,
-0.15409377217292786,
0.1359657198190689,
-0.08580520004034042,
0.03191034495830536,
0.1184747964143753,
-0.3834478557109833,
-0.018849456682801247,
-0.03916439414024353,
0.24254173040390015,
0.0646749958395958,
0.20209015905857086,
-0.09834744036197662,
0.4987446963787079,
0.6146570444107056,
-0.1336156725883484,
-0.14148077368736267,
-0.13041949272155762,
0.37065139412879944,
0.07330852001905441,
-0.0774654895067215,
0.021921269595623016,
0.1024273931980133,
0.006506839767098427,
-0.3420654237270355,
-0.25549036264419556,
-0.019982242956757545,
0.3041453957557678,
0.35128292441368103,
0.09328830987215042,
0.32031315565109253,
-0.01922059804201126,
0.04841003194451332,
-0.24113398790359497,
0.050415195524692535,
-0.1276012361049652,
0.009670786559581757,
-0.022802725434303284,
0.5810166001319885,
-0.22440192103385925,
-0.05934266746044159,
-0.413650244474411,
0.42902642488479614,
0.09053132683038712,
-0.33885475993156433,
-0.08051957935094833,
0.3583999574184418,
-0.31732064485549927,
-0.2010880708694458,
0.22619470953941345,
0.4100223481655121,
0.15136000514030457,
0.19435739517211914,
-0.5254405736923218,
-0.4069116413593292,
0.44720226526260376,
-0.4417078197002411,
-0.5069124698638916,
0.02907452918589115,
-0.31339389085769653,
0.06790432333946228,
0.49642300605773926,
-0.4710500240325928,
-0.14913417398929596,
0.0015055608237162232,
-0.08082758635282516,
-0.09160450100898743,
-0.09819380193948746,
0.2610398828983307,
0.015110877342522144,
-0.2518463730812073,
0.17900733649730682,
0.1764504462480545,
-0.022816073149442673,
-0.42041611671447754,
-0.27535995841026306
] |
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.12737514078617096,
-0.35116562247276306,
-0.017932644113898277,
0.35360872745513916,
0.47600245475769043,
0.08871346712112427,
0.7330296635627747,
0.38043493032455444,
0.06552495807409286,
-0.0380423478782177,
-0.111153244972229,
0.3819507658481598,
-0.23296910524368286,
-0.33393433690071106,
0.03510892763733864,
-0.5614942312240601,
0.2225799858570099,
-0.09982758015394211,
-0.28079819679260254,
-0.06134718284010887,
-0.24313423037528992,
0.03548915311694145,
-0.21849742531776428,
-0.10849645733833313,
-0.5479354858398438,
0.044095996767282486,
-0.019555551931262016,
-0.07656887918710709,
-0.06229947507381439,
-0.13918043673038483,
0.12234672904014587,
-0.17449654638767242,
0.4444533586502075,
0.7012934684753418,
-0.00012770107423420995,
0.07030182331800461,
0.36427220702171326,
-0.17377832531929016,
0.04999925196170807,
-0.16101369261741638,
0.04004685580730438,
-0.2573828101158142,
0.07277636975049973,
-0.09468337148427963,
-0.22349399328231812,
-0.17084543406963348,
0.09591034799814224,
-0.17902971804141998,
-0.028141869232058525,
0.41916894912719727,
0.07712996751070023,
0.27901116013526917,
0.24666103720664978,
0.13863056898117065,
0.22781161963939667,
0.5182864665985107,
-0.2734379470348358,
-0.05611717700958252,
0.22615034878253937,
0.37547779083251953,
0.12400452792644501,
0.5647348761558533,
-0.2913348972797394,
-0.036233801394701004,
0.26694509387016296,
0.12900516390800476,
-0.10145501792430878,
-0.314005583524704,
0.04915720224380493,
0.08946330100297928,
0.42194420099258423,
-0.1494392454624176,
-0.08077910542488098,
-0.1436641365289688,
-0.14397795498371124,
-0.12738043069839478,
0.04059102386236191,
0.2803194522857666,
-0.07184098660945892,
-0.18723826110363007,
-0.539242684841156,
0.30529189109802246,
-0.14862369000911713,
0.2131589651107788,
-0.2805241644382477,
-0.0034206677228212357,
-0.13816316425800323,
0.2928087115287781,
-0.047119300812482834,
-0.11271274834871292,
0.19308078289031982,
-0.12341479957103729,
0.1300756186246872,
-0.009825528599321842,
-0.14363200962543488,
-0.053490735590457916,
-0.38959938287734985,
-0.31501221656799316,
-0.20014798641204834,
-0.1602649688720703,
0.16648538410663605,
0.13927580416202545,
-0.11639551818370819,
0.12807093560695648,
0.18263286352157593,
0.2680342197418213,
0.10578285157680511,
0.32070258259773254,
-0.085892453789711,
-0.2895815670490265,
-0.04691935330629349,
0.0877332016825676,
-0.29622682929039,
-0.4357525408267975,
0.1545342057943344,
0.32529687881469727,
0.24522154033184052,
0.06874307245016098,
0.12985509634017944,
-0.32394087314605713,
-0.10892301052808762,
-0.009586540050804615,
0.07522505521774292,
0.2850382328033447,
-0.11867921054363251,
0.24390484392642975,
0.48048296570777893,
0.39720281958580017,
-0.15381810069084167,
0.06956271827220917,
0.025072576478123665,
0.03152092918753624,
-0.44049566984176636,
-0.28569865226745605,
0.15340976417064667,
-0.11777324229478836,
0.10007024556398392,
0.037431828677654266,
0.04641568288207054,
0.10069649666547775,
0.07349668443202972,
-0.18586984276771545,
0.6246294975280762,
0.14764700829982758,
-0.19447416067123413,
0.2767931818962097,
0.270906537771225,
0.5297801494598389,
-0.304298460483551,
0.25653156638145447,
-0.5095698833465576,
0.065252885222435,
-0.023091433569788933,
-0.014543901197612286,
0.2186548262834549,
-0.020721858367323875,
-0.2121620923280716,
0.015829231590032578,
0.592312216758728,
-0.08367802947759628,
0.27348771691322327,
-0.5791622996330261,
0.09496430307626724,
-0.19133509695529938,
0.0341525562107563,
0.06366927176713943,
-0.20471520721912384,
-0.05235873907804489,
0.38634389638900757,
0.09194979816675186,
0.31545889377593994,
0.16028234362602234,
0.05108339339494705,
0.07987046986818314,
-0.225352942943573,
-0.23505039513111115,
0.3363233506679535,
-0.3768564462661743,
0.09203807264566422,
-0.01769321784377098,
0.09387896209955215,
-0.06380388885736465,
0.11201920360326767,
0.3361777365207672,
0.03260112181305885,
-0.12800149619579315,
0.029448654502630234,
0.1963149607181549,
-0.16618236899375916,
0.1402868926525116,
0.07735977321863174,
0.1913028061389923,
0.1933746337890625,
0.03500613570213318,
-0.01568373665213585,
0.20765338838100433,
-0.2216716706752777,
0.17757616937160492,
-0.05428053066134453,
-0.0747133418917656,
0.07117719948291779,
0.040378037840127945,
-0.3698902428150177,
-0.012196831405162811,
-0.04746969789266586,
0.1864665299654007,
-0.23310033977031708,
-0.04872112721204758,
0.023635009303689003,
0.08221708983182907,
0.05827915668487549,
0.047924596816301346,
0.0049781715497374535,
-0.1919565051794052,
-0.18220600485801697,
-0.13902734220027924,
-0.0032421820797026157,
0.09221033751964569,
-0.2094767987728119,
-0.2617241442203522,
-0.052343688905239105,
-0.12324901670217514,
0.17830416560173035,
0.058837827295064926,
-0.35903677344322205,
0.051025453954935074,
0.019273776561021805,
-0.36533042788505554,
-0.2013598531484604,
0.17339256405830383,
0.26766902208328247,
-0.09962092339992523,
-0.04223461076617241,
0.19160310924053192,
0.06328868865966797,
0.1146329939365387,
-0.5482741594314575,
0.0834660679101944,
0.17784197628498077,
-0.24697020649909973,
0.2043912559747696,
0.2162797600030899,
0.14853379130363464,
-0.2755032777786255,
-0.19603493809700012,
0.43878665566444397,
0.16041062772274017,
0.3159129023551941,
-0.3300256133079529,
0.11610186100006104,
-0.07264672964811325,
-0.03940204530954361,
-0.19063358008861542,
-0.040808115154504776,
-0.27728158235549927,
0.07302392274141312,
-0.1318594217300415,
0.012982288375496864,
-0.45691895484924316,
-0.04493600130081177,
0.29626211524009705,
0.08876395225524902,
0.1758720725774765,
-0.0012163631618022919,
-0.3998461067676544,
0.21331210434436798,
0.17712657153606415,
-0.6013535261154175,
0.2978383004665375,
-0.00436173053458333,
0.18920734524726868,
-0.10501883924007416,
0.09558358788490295,
-0.1625431478023529,
0.24844472110271454,
0.11404215544462204,
0.09074815362691879,
-0.19946475327014923,
0.14185214042663574,
-0.10792585462331772,
0.02684636600315571,
0.026369821280241013,
-0.140628844499588,
-0.23369300365447998,
-0.3589506447315216,
0.27138257026672363,
-0.16618312895298004,
-0.13451862335205078,
-0.40185463428497314,
-0.2621859610080719,
0.03605636954307556,
-0.07400504499673843,
-0.08233371376991272,
0.1507578194141388,
0.18556810915470123,
0.19043487310409546,
0.2634179890155792,
-0.1818944662809372,
0.37431609630584717,
-0.41302919387817383,
-0.03535478934645653,
-0.07500974833965302,
-0.2867960035800934,
-0.09916486591100693,
0.08965590596199036,
-0.5234113335609436,
0.09148448705673218,
-0.2289898842573166,
-0.09319096803665161,
-0.250175803899765,
0.013548125512897968,
0.14182229340076447,
-0.2678501605987549,
-0.28500300645828247,
0.308591365814209,
0.1939285695552826,
-0.14248229563236237,
0.04066231846809387,
0.2663511037826538,
0.010307513177394867,
0.04690111428499222,
0.15378358960151672,
-0.08961997926235199,
0.11656028032302856,
-0.06329821795225143,
-0.17674081027507782,
-0.09661802649497986,
-0.07506143301725388,
-0.07041662931442261,
-0.021759675815701485,
0.06337695568799973,
0.3462585210800171,
0.37218356132507324,
-0.08989036083221436,
-0.052042409777641296,
0.035609036684036255,
0.06296498328447342,
-0.39768779277801514,
0.5225028991699219,
-0.22615419328212738,
-0.36082586646080017,
0.11920181661844254,
0.023855721578001976,
0.06514710932970047,
0.48626869916915894,
0.06052284687757492,
0.049731604754924774,
0.011782478541135788,
-0.07894466072320938,
0.25259289145469666,
0.22119715809822083,
0.35102036595344543,
-0.09112486988306046,
0.01916578784584999,
-0.16470715403556824,
0.015416686423122883,
-0.10187187790870667,
-0.06325501948595047,
0.6088862419128418,
0.1850840449333191,
0.2399427741765976,
0.09925858676433563,
0.6996651291847229,
-0.06113724410533905,
-0.7380952835083008,
0.21680672466754913,
-0.2425099015235901,
0.1921670287847519,
-0.11812160909175873,
-0.3539586663246155,
0.3988560438156128,
-0.20941969752311707,
0.06437364965677261,
-0.08596715331077576,
-0.024906951934099197,
-0.2391577512025833,
-0.09022432565689087,
0.3573607802391052,
-0.3172069191932678,
-0.15857398509979248,
0.4044302701950073,
-0.14470256865024567,
0.27637311816215515,
-0.23134253919124603,
0.3245902359485626,
-0.26092609763145447,
-0.21379277110099792,
0.060056984424591064,
0.44877177476882935,
0.13851357996463776,
0.04172460362315178,
-0.3342844247817993,
-0.21669700741767883,
-0.14322705566883087,
0.35682761669158936,
0.11957734078168869,
0.5672699809074402,
-0.09803595393896103,
-0.07446511834859848,
0.10155639052391052,
0.24136953055858612,
0.8307592272758484,
0.045557230710983276,
-0.0904591903090477,
0.15144191682338715,
-0.34783491492271423,
-0.45497825741767883,
-0.102229043841362,
-0.051417913287878036,
0.09068144112825394,
0.17169053852558136,
0.12038647383451462,
-0.09105323255062103,
-0.18333399295806885,
-0.005832506809383631,
0.19555510580539703,
-0.055124957114458084,
0.03471889719367027,
-0.22691141068935394,
0.05875765159726143,
-0.12964999675750732,
-0.15528330206871033,
0.22118236124515533,
0.029675418511033058,
0.00516205420717597,
-0.3081282079219818,
-0.3262302577495575,
-0.1266998052597046,
0.18248215317726135,
-0.1330121010541916,
0.4110669791698456,
0.09925137460231781,
-0.17808538675308228,
0.07690707594156265,
0.5561061501502991,
0.4184044897556305,
-0.03893916308879852,
-0.11877360939979553,
0.08064387738704681,
0.2931108772754669,
0.10643281042575836,
0.3002045154571533,
0.32082387804985046,
-0.06187281012535095,
-0.43966391682624817,
-0.22684866189956665,
-0.1938147395849228,
-0.33053264021873474,
0.3972931206226349,
0.4080631732940674,
0.09893536567687988,
-0.49535563588142395,
-0.49217092990875244,
0.3861899673938751,
0.29371947050094604,
0.19583043456077576,
0.20459184050559998,
-0.5417590737342834,
-0.40096724033355713,
0.07817858457565308,
0.46624189615249634,
0.8556229472160339,
-0.0370788499712944,
0.3702828288078308,
0.03156561404466629,
0.010807035490870476,
0.17210228741168976,
-0.001889070263132453,
0.4117945730686188,
-0.35428154468536377,
0.13928939402103424,
-0.1648537963628769,
-0.31254979968070984,
0.2525227963924408,
-0.06020328402519226,
-0.2439698874950409,
0.04253644496202469,
-0.3494715094566345,
0.19361983239650726,
-0.12569352984428406,
-0.08285321295261383,
-0.04982635751366615,
-0.471417635679245,
0.18787378072738647,
0.015452072955667973,
-0.08251318335533142,
0.26173895597457886,
0.11116104573011398,
-0.16362063586711884,
-0.3798603415489197,
0.06169583275914192,
-0.07622244954109192,
-0.015011891722679138,
-0.24596944451332092,
-0.16324317455291748,
-0.024310344830155373,
-0.7298661470413208,
0.058679886162281036,
0.4961579442024231,
0.3345544934272766,
-0.160566508769989,
-0.04783676192164421,
0.13964155316352844,
0.44384729862213135,
0.16290026903152466,
-0.0990171730518341,
-0.3401840925216675,
0.28534069657325745,
0.0973755419254303,
0.18433213233947754,
0.10863812267780304,
0.06814854592084885,
0.21052049100399017,
-0.5777892470359802,
0.03725123777985573,
0.3060290813446045,
-0.3449511229991913,
-0.3229847550392151,
-0.19845038652420044,
0.04918491840362549,
0.03816332668066025,
0.028618456795811653,
0.12448917329311371,
-0.03890300542116165,
0.20724327862262726,
-0.041512202471494675,
-0.22646154463291168,
0.13288986682891846,
0.45233115553855896,
0.11298368126153946,
-0.3500462770462036,
0.39075642824172974,
0.35495880246162415,
-0.04477781802415848,
-0.0437438078224659,
0.4166940748691559,
0.635319173336029,
-0.34569671750068665,
0.09949755668640137,
-0.10271666198968887,
-0.1569867730140686,
-0.011073690839111805,
0.5430943965911865,
-0.23431749641895294,
-0.13097791373729706,
-0.23895752429962158,
-0.04081762582063675,
-0.43089377880096436,
0.010813401080667973,
-0.3162982165813446,
0.45663073658943176,
-0.043222445994615555,
0.3627101182937622,
0.21050584316253662,
-0.18734930455684662,
-0.14413583278656006,
-0.25864914059638977,
0.17235061526298523,
0.36793357133865356,
-0.24718241393566132,
0.2187611609697342,
-0.126958429813385,
-0.1220230832695961,
-0.03625234216451645,
0.026031319051980972,
-0.24973955750465393,
-0.033390723168849945,
-0.05767792835831642,
0.1773061901330948,
0.06661427766084671,
-0.11354031413793564,
-0.07354700565338135,
-0.17366941273212433,
-0.1385808140039444,
-0.2681722044944763,
-0.0377182736992836,
0.1109214499592781,
-0.11599929630756378,
0.3531613349914551,
-0.17836593091487885,
0.23122578859329224,
0.3186763525009155,
-0.27000051736831665,
-0.10262239724397659,
0.03587157279253006,
0.2229628711938858,
0.060050833970308304,
0.004531959071755409,
-0.061556655913591385,
-0.27723655104637146,
0.11259152740240097,
0.16520315408706665,
0.25497496128082275,
0.20461730659008026,
-0.09999668598175049,
0.10917840152978897,
-0.04380663484334946,
0.20418405532836914,
0.10125570744276047,
-0.17187079787254333,
-0.0508287288248539,
0.06037340685725212,
-0.007623378187417984,
0.10062166303396225,
0.14499929547309875,
0.03886914625763893,
0.1252809762954712,
-0.08346397429704666,
0.275578111410141,
0.06655873358249664,
0.31139472126960754,
-0.3705076575279236,
0.04514239355921745,
0.41785621643066406,
-0.24107322096824646,
0.23508600890636444,
0.46401476860046387,
0.014799953438341618,
0.19304950535297394,
0.29070472717285156,
0.1093434989452362,
-0.11870165169239044,
0.32269638776779175,
0.39451682567596436,
0.8204314112663269,
0.5895959138870239,
0.08376955986022949,
0.27460289001464844,
0.09925687313079834,
-0.15360723435878754,
-0.20725123584270477,
0.23582398891448975,
0.39196836948394775,
0.018867086619138718,
0.18569326400756836,
-0.24079905450344086,
-0.4871237874031067,
0.2258823961019516,
0.12177469581365585,
-0.19461774826049805,
-0.0822235494852066,
-0.6648060083389282,
0.011875391006469727,
0.13582637906074524,
-0.1866595447063446,
-0.17971548438072205,
-0.050137732177972794,
0.22059080004692078,
0.259753555059433,
-0.10322070121765137,
-0.16091257333755493,
-0.17247425019741058,
0.0691012591123581,
0.03752928599715233,
-0.007329888176172972,
0.16975699365139008,
-0.13684619963169098,
0.16176092624664307,
0.24482418596744537,
0.1969079226255417,
0.28495338559150696,
0.4870798885822296,
-0.1681717336177826,
-0.15989352762699127,
-0.0105538135394454,
-0.1923658847808838,
0.08990129828453064,
0.06671170145273209,
0.031533826142549515,
-0.1532077044248581,
-0.014956250786781311,
0.008462578989565372,
0.03862797096371651,
0.031460441648960114,
-0.09408104419708252,
-0.2182597517967224,
0.16762492060661316,
0.3055749535560608,
-0.36377716064453125,
-0.149092897772789,
-0.0998985692858696,
-0.24665600061416626,
-0.34831011295318604,
-0.2655346989631653,
0.5327387452125549,
0.02789606899023056,
0.1280096471309662,
0.14216767251491547,
-0.0421595498919487,
0.048785898834466934,
0.15741202235221863,
-0.12155666947364807,
0.07757695764303207,
-0.15409377217292786,
0.1359657198190689,
-0.08580520004034042,
0.03191034495830536,
0.1184747964143753,
-0.3834478557109833,
-0.018849456682801247,
-0.03916439414024353,
0.24254173040390015,
0.0646749958395958,
0.20209015905857086,
-0.09834744036197662,
0.4987446963787079,
0.6146570444107056,
-0.1336156725883484,
-0.14148077368736267,
-0.13041949272155762,
0.37065139412879944,
0.07330852001905441,
-0.0774654895067215,
0.021921269595623016,
0.1024273931980133,
0.006506839767098427,
-0.3420654237270355,
-0.25549036264419556,
-0.019982242956757545,
0.3041453957557678,
0.35128292441368103,
0.09328830987215042,
0.32031315565109253,
-0.01922059804201126,
0.04841003194451332,
-0.24113398790359497,
0.050415195524692535,
-0.1276012361049652,
0.009670786559581757,
-0.022802725434303284,
0.5810166001319885,
-0.22440192103385925,
-0.05934266746044159,
-0.413650244474411,
0.42902642488479614,
0.09053132683038712,
-0.33885475993156433,
-0.08051957935094833,
0.3583999574184418,
-0.31732064485549927,
-0.2010880708694458,
0.22619470953941345,
0.4100223481655121,
0.15136000514030457,
0.19435739517211914,
-0.5254405736923218,
-0.4069116413593292,
0.44720226526260376,
-0.4417078197002411,
-0.5069124698638916,
0.02907452918589115,
-0.31339389085769653,
0.06790432333946228,
0.49642300605773926,
-0.4710500240325928,
-0.14913417398929596,
0.0015055608237162232,
-0.08082758635282516,
-0.09160450100898743,
-0.09819380193948746,
0.2610398828983307,
0.015110877342522144,
-0.2518463730812073,
0.17900733649730682,
0.1764504462480545,
-0.022816073149442673,
-0.42041611671447754,
-0.27535995841026306
] |
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.12737514078617096,
-0.35116562247276306,
-0.017932644113898277,
0.35360872745513916,
0.47600245475769043,
0.08871346712112427,
0.7330296635627747,
0.38043493032455444,
0.06552495807409286,
-0.0380423478782177,
-0.111153244972229,
0.3819507658481598,
-0.23296910524368286,
-0.33393433690071106,
0.03510892763733864,
-0.5614942312240601,
0.2225799858570099,
-0.09982758015394211,
-0.28079819679260254,
-0.06134718284010887,
-0.24313423037528992,
0.03548915311694145,
-0.21849742531776428,
-0.10849645733833313,
-0.5479354858398438,
0.044095996767282486,
-0.019555551931262016,
-0.07656887918710709,
-0.06229947507381439,
-0.13918043673038483,
0.12234672904014587,
-0.17449654638767242,
0.4444533586502075,
0.7012934684753418,
-0.00012770107423420995,
0.07030182331800461,
0.36427220702171326,
-0.17377832531929016,
0.04999925196170807,
-0.16101369261741638,
0.04004685580730438,
-0.2573828101158142,
0.07277636975049973,
-0.09468337148427963,
-0.22349399328231812,
-0.17084543406963348,
0.09591034799814224,
-0.17902971804141998,
-0.028141869232058525,
0.41916894912719727,
0.07712996751070023,
0.27901116013526917,
0.24666103720664978,
0.13863056898117065,
0.22781161963939667,
0.5182864665985107,
-0.2734379470348358,
-0.05611717700958252,
0.22615034878253937,
0.37547779083251953,
0.12400452792644501,
0.5647348761558533,
-0.2913348972797394,
-0.036233801394701004,
0.26694509387016296,
0.12900516390800476,
-0.10145501792430878,
-0.314005583524704,
0.04915720224380493,
0.08946330100297928,
0.42194420099258423,
-0.1494392454624176,
-0.08077910542488098,
-0.1436641365289688,
-0.14397795498371124,
-0.12738043069839478,
0.04059102386236191,
0.2803194522857666,
-0.07184098660945892,
-0.18723826110363007,
-0.539242684841156,
0.30529189109802246,
-0.14862369000911713,
0.2131589651107788,
-0.2805241644382477,
-0.0034206677228212357,
-0.13816316425800323,
0.2928087115287781,
-0.047119300812482834,
-0.11271274834871292,
0.19308078289031982,
-0.12341479957103729,
0.1300756186246872,
-0.009825528599321842,
-0.14363200962543488,
-0.053490735590457916,
-0.38959938287734985,
-0.31501221656799316,
-0.20014798641204834,
-0.1602649688720703,
0.16648538410663605,
0.13927580416202545,
-0.11639551818370819,
0.12807093560695648,
0.18263286352157593,
0.2680342197418213,
0.10578285157680511,
0.32070258259773254,
-0.085892453789711,
-0.2895815670490265,
-0.04691935330629349,
0.0877332016825676,
-0.29622682929039,
-0.4357525408267975,
0.1545342057943344,
0.32529687881469727,
0.24522154033184052,
0.06874307245016098,
0.12985509634017944,
-0.32394087314605713,
-0.10892301052808762,
-0.009586540050804615,
0.07522505521774292,
0.2850382328033447,
-0.11867921054363251,
0.24390484392642975,
0.48048296570777893,
0.39720281958580017,
-0.15381810069084167,
0.06956271827220917,
0.025072576478123665,
0.03152092918753624,
-0.44049566984176636,
-0.28569865226745605,
0.15340976417064667,
-0.11777324229478836,
0.10007024556398392,
0.037431828677654266,
0.04641568288207054,
0.10069649666547775,
0.07349668443202972,
-0.18586984276771545,
0.6246294975280762,
0.14764700829982758,
-0.19447416067123413,
0.2767931818962097,
0.270906537771225,
0.5297801494598389,
-0.304298460483551,
0.25653156638145447,
-0.5095698833465576,
0.065252885222435,
-0.023091433569788933,
-0.014543901197612286,
0.2186548262834549,
-0.020721858367323875,
-0.2121620923280716,
0.015829231590032578,
0.592312216758728,
-0.08367802947759628,
0.27348771691322327,
-0.5791622996330261,
0.09496430307626724,
-0.19133509695529938,
0.0341525562107563,
0.06366927176713943,
-0.20471520721912384,
-0.05235873907804489,
0.38634389638900757,
0.09194979816675186,
0.31545889377593994,
0.16028234362602234,
0.05108339339494705,
0.07987046986818314,
-0.225352942943573,
-0.23505039513111115,
0.3363233506679535,
-0.3768564462661743,
0.09203807264566422,
-0.01769321784377098,
0.09387896209955215,
-0.06380388885736465,
0.11201920360326767,
0.3361777365207672,
0.03260112181305885,
-0.12800149619579315,
0.029448654502630234,
0.1963149607181549,
-0.16618236899375916,
0.1402868926525116,
0.07735977321863174,
0.1913028061389923,
0.1933746337890625,
0.03500613570213318,
-0.01568373665213585,
0.20765338838100433,
-0.2216716706752777,
0.17757616937160492,
-0.05428053066134453,
-0.0747133418917656,
0.07117719948291779,
0.040378037840127945,
-0.3698902428150177,
-0.012196831405162811,
-0.04746969789266586,
0.1864665299654007,
-0.23310033977031708,
-0.04872112721204758,
0.023635009303689003,
0.08221708983182907,
0.05827915668487549,
0.047924596816301346,
0.0049781715497374535,
-0.1919565051794052,
-0.18220600485801697,
-0.13902734220027924,
-0.0032421820797026157,
0.09221033751964569,
-0.2094767987728119,
-0.2617241442203522,
-0.052343688905239105,
-0.12324901670217514,
0.17830416560173035,
0.058837827295064926,
-0.35903677344322205,
0.051025453954935074,
0.019273776561021805,
-0.36533042788505554,
-0.2013598531484604,
0.17339256405830383,
0.26766902208328247,
-0.09962092339992523,
-0.04223461076617241,
0.19160310924053192,
0.06328868865966797,
0.1146329939365387,
-0.5482741594314575,
0.0834660679101944,
0.17784197628498077,
-0.24697020649909973,
0.2043912559747696,
0.2162797600030899,
0.14853379130363464,
-0.2755032777786255,
-0.19603493809700012,
0.43878665566444397,
0.16041062772274017,
0.3159129023551941,
-0.3300256133079529,
0.11610186100006104,
-0.07264672964811325,
-0.03940204530954361,
-0.19063358008861542,
-0.040808115154504776,
-0.27728158235549927,
0.07302392274141312,
-0.1318594217300415,
0.012982288375496864,
-0.45691895484924316,
-0.04493600130081177,
0.29626211524009705,
0.08876395225524902,
0.1758720725774765,
-0.0012163631618022919,
-0.3998461067676544,
0.21331210434436798,
0.17712657153606415,
-0.6013535261154175,
0.2978383004665375,
-0.00436173053458333,
0.18920734524726868,
-0.10501883924007416,
0.09558358788490295,
-0.1625431478023529,
0.24844472110271454,
0.11404215544462204,
0.09074815362691879,
-0.19946475327014923,
0.14185214042663574,
-0.10792585462331772,
0.02684636600315571,
0.026369821280241013,
-0.140628844499588,
-0.23369300365447998,
-0.3589506447315216,
0.27138257026672363,
-0.16618312895298004,
-0.13451862335205078,
-0.40185463428497314,
-0.2621859610080719,
0.03605636954307556,
-0.07400504499673843,
-0.08233371376991272,
0.1507578194141388,
0.18556810915470123,
0.19043487310409546,
0.2634179890155792,
-0.1818944662809372,
0.37431609630584717,
-0.41302919387817383,
-0.03535478934645653,
-0.07500974833965302,
-0.2867960035800934,
-0.09916486591100693,
0.08965590596199036,
-0.5234113335609436,
0.09148448705673218,
-0.2289898842573166,
-0.09319096803665161,
-0.250175803899765,
0.013548125512897968,
0.14182229340076447,
-0.2678501605987549,
-0.28500300645828247,
0.308591365814209,
0.1939285695552826,
-0.14248229563236237,
0.04066231846809387,
0.2663511037826538,
0.010307513177394867,
0.04690111428499222,
0.15378358960151672,
-0.08961997926235199,
0.11656028032302856,
-0.06329821795225143,
-0.17674081027507782,
-0.09661802649497986,
-0.07506143301725388,
-0.07041662931442261,
-0.021759675815701485,
0.06337695568799973,
0.3462585210800171,
0.37218356132507324,
-0.08989036083221436,
-0.052042409777641296,
0.035609036684036255,
0.06296498328447342,
-0.39768779277801514,
0.5225028991699219,
-0.22615419328212738,
-0.36082586646080017,
0.11920181661844254,
0.023855721578001976,
0.06514710932970047,
0.48626869916915894,
0.06052284687757492,
0.049731604754924774,
0.011782478541135788,
-0.07894466072320938,
0.25259289145469666,
0.22119715809822083,
0.35102036595344543,
-0.09112486988306046,
0.01916578784584999,
-0.16470715403556824,
0.015416686423122883,
-0.10187187790870667,
-0.06325501948595047,
0.6088862419128418,
0.1850840449333191,
0.2399427741765976,
0.09925858676433563,
0.6996651291847229,
-0.06113724410533905,
-0.7380952835083008,
0.21680672466754913,
-0.2425099015235901,
0.1921670287847519,
-0.11812160909175873,
-0.3539586663246155,
0.3988560438156128,
-0.20941969752311707,
0.06437364965677261,
-0.08596715331077576,
-0.024906951934099197,
-0.2391577512025833,
-0.09022432565689087,
0.3573607802391052,
-0.3172069191932678,
-0.15857398509979248,
0.4044302701950073,
-0.14470256865024567,
0.27637311816215515,
-0.23134253919124603,
0.3245902359485626,
-0.26092609763145447,
-0.21379277110099792,
0.060056984424591064,
0.44877177476882935,
0.13851357996463776,
0.04172460362315178,
-0.3342844247817993,
-0.21669700741767883,
-0.14322705566883087,
0.35682761669158936,
0.11957734078168869,
0.5672699809074402,
-0.09803595393896103,
-0.07446511834859848,
0.10155639052391052,
0.24136953055858612,
0.8307592272758484,
0.045557230710983276,
-0.0904591903090477,
0.15144191682338715,
-0.34783491492271423,
-0.45497825741767883,
-0.102229043841362,
-0.051417913287878036,
0.09068144112825394,
0.17169053852558136,
0.12038647383451462,
-0.09105323255062103,
-0.18333399295806885,
-0.005832506809383631,
0.19555510580539703,
-0.055124957114458084,
0.03471889719367027,
-0.22691141068935394,
0.05875765159726143,
-0.12964999675750732,
-0.15528330206871033,
0.22118236124515533,
0.029675418511033058,
0.00516205420717597,
-0.3081282079219818,
-0.3262302577495575,
-0.1266998052597046,
0.18248215317726135,
-0.1330121010541916,
0.4110669791698456,
0.09925137460231781,
-0.17808538675308228,
0.07690707594156265,
0.5561061501502991,
0.4184044897556305,
-0.03893916308879852,
-0.11877360939979553,
0.08064387738704681,
0.2931108772754669,
0.10643281042575836,
0.3002045154571533,
0.32082387804985046,
-0.06187281012535095,
-0.43966391682624817,
-0.22684866189956665,
-0.1938147395849228,
-0.33053264021873474,
0.3972931206226349,
0.4080631732940674,
0.09893536567687988,
-0.49535563588142395,
-0.49217092990875244,
0.3861899673938751,
0.29371947050094604,
0.19583043456077576,
0.20459184050559998,
-0.5417590737342834,
-0.40096724033355713,
0.07817858457565308,
0.46624189615249634,
0.8556229472160339,
-0.0370788499712944,
0.3702828288078308,
0.03156561404466629,
0.010807035490870476,
0.17210228741168976,
-0.001889070263132453,
0.4117945730686188,
-0.35428154468536377,
0.13928939402103424,
-0.1648537963628769,
-0.31254979968070984,
0.2525227963924408,
-0.06020328402519226,
-0.2439698874950409,
0.04253644496202469,
-0.3494715094566345,
0.19361983239650726,
-0.12569352984428406,
-0.08285321295261383,
-0.04982635751366615,
-0.471417635679245,
0.18787378072738647,
0.015452072955667973,
-0.08251318335533142,
0.26173895597457886,
0.11116104573011398,
-0.16362063586711884,
-0.3798603415489197,
0.06169583275914192,
-0.07622244954109192,
-0.015011891722679138,
-0.24596944451332092,
-0.16324317455291748,
-0.024310344830155373,
-0.7298661470413208,
0.058679886162281036,
0.4961579442024231,
0.3345544934272766,
-0.160566508769989,
-0.04783676192164421,
0.13964155316352844,
0.44384729862213135,
0.16290026903152466,
-0.0990171730518341,
-0.3401840925216675,
0.28534069657325745,
0.0973755419254303,
0.18433213233947754,
0.10863812267780304,
0.06814854592084885,
0.21052049100399017,
-0.5777892470359802,
0.03725123777985573,
0.3060290813446045,
-0.3449511229991913,
-0.3229847550392151,
-0.19845038652420044,
0.04918491840362549,
0.03816332668066025,
0.028618456795811653,
0.12448917329311371,
-0.03890300542116165,
0.20724327862262726,
-0.041512202471494675,
-0.22646154463291168,
0.13288986682891846,
0.45233115553855896,
0.11298368126153946,
-0.3500462770462036,
0.39075642824172974,
0.35495880246162415,
-0.04477781802415848,
-0.0437438078224659,
0.4166940748691559,
0.635319173336029,
-0.34569671750068665,
0.09949755668640137,
-0.10271666198968887,
-0.1569867730140686,
-0.011073690839111805,
0.5430943965911865,
-0.23431749641895294,
-0.13097791373729706,
-0.23895752429962158,
-0.04081762582063675,
-0.43089377880096436,
0.010813401080667973,
-0.3162982165813446,
0.45663073658943176,
-0.043222445994615555,
0.3627101182937622,
0.21050584316253662,
-0.18734930455684662,
-0.14413583278656006,
-0.25864914059638977,
0.17235061526298523,
0.36793357133865356,
-0.24718241393566132,
0.2187611609697342,
-0.126958429813385,
-0.1220230832695961,
-0.03625234216451645,
0.026031319051980972,
-0.24973955750465393,
-0.033390723168849945,
-0.05767792835831642,
0.1773061901330948,
0.06661427766084671,
-0.11354031413793564,
-0.07354700565338135,
-0.17366941273212433,
-0.1385808140039444,
-0.2681722044944763,
-0.0377182736992836,
0.1109214499592781,
-0.11599929630756378,
0.3531613349914551,
-0.17836593091487885,
0.23122578859329224,
0.3186763525009155,
-0.27000051736831665,
-0.10262239724397659,
0.03587157279253006,
0.2229628711938858,
0.060050833970308304,
0.004531959071755409,
-0.061556655913591385,
-0.27723655104637146,
0.11259152740240097,
0.16520315408706665,
0.25497496128082275,
0.20461730659008026,
-0.09999668598175049,
0.10917840152978897,
-0.04380663484334946,
0.20418405532836914,
0.10125570744276047,
-0.17187079787254333,
-0.0508287288248539,
0.06037340685725212,
-0.007623378187417984,
0.10062166303396225,
0.14499929547309875,
0.03886914625763893,
0.1252809762954712,
-0.08346397429704666,
0.275578111410141,
0.06655873358249664,
0.31139472126960754,
-0.3705076575279236,
0.04514239355921745,
0.41785621643066406,
-0.24107322096824646,
0.23508600890636444,
0.46401476860046387,
0.014799953438341618,
0.19304950535297394,
0.29070472717285156,
0.1093434989452362,
-0.11870165169239044,
0.32269638776779175,
0.39451682567596436,
0.8204314112663269,
0.5895959138870239,
0.08376955986022949,
0.27460289001464844,
0.09925687313079834,
-0.15360723435878754,
-0.20725123584270477,
0.23582398891448975,
0.39196836948394775,
0.018867086619138718,
0.18569326400756836,
-0.24079905450344086,
-0.4871237874031067,
0.2258823961019516,
0.12177469581365585,
-0.19461774826049805,
-0.0822235494852066,
-0.6648060083389282,
0.011875391006469727,
0.13582637906074524,
-0.1866595447063446,
-0.17971548438072205,
-0.050137732177972794,
0.22059080004692078,
0.259753555059433,
-0.10322070121765137,
-0.16091257333755493,
-0.17247425019741058,
0.0691012591123581,
0.03752928599715233,
-0.007329888176172972,
0.16975699365139008,
-0.13684619963169098,
0.16176092624664307,
0.24482418596744537,
0.1969079226255417,
0.28495338559150696,
0.4870798885822296,
-0.1681717336177826,
-0.15989352762699127,
-0.0105538135394454,
-0.1923658847808838,
0.08990129828453064,
0.06671170145273209,
0.031533826142549515,
-0.1532077044248581,
-0.014956250786781311,
0.008462578989565372,
0.03862797096371651,
0.031460441648960114,
-0.09408104419708252,
-0.2182597517967224,
0.16762492060661316,
0.3055749535560608,
-0.36377716064453125,
-0.149092897772789,
-0.0998985692858696,
-0.24665600061416626,
-0.34831011295318604,
-0.2655346989631653,
0.5327387452125549,
0.02789606899023056,
0.1280096471309662,
0.14216767251491547,
-0.0421595498919487,
0.048785898834466934,
0.15741202235221863,
-0.12155666947364807,
0.07757695764303207,
-0.15409377217292786,
0.1359657198190689,
-0.08580520004034042,
0.03191034495830536,
0.1184747964143753,
-0.3834478557109833,
-0.018849456682801247,
-0.03916439414024353,
0.24254173040390015,
0.0646749958395958,
0.20209015905857086,
-0.09834744036197662,
0.4987446963787079,
0.6146570444107056,
-0.1336156725883484,
-0.14148077368736267,
-0.13041949272155762,
0.37065139412879944,
0.07330852001905441,
-0.0774654895067215,
0.021921269595623016,
0.1024273931980133,
0.006506839767098427,
-0.3420654237270355,
-0.25549036264419556,
-0.019982242956757545,
0.3041453957557678,
0.35128292441368103,
0.09328830987215042,
0.32031315565109253,
-0.01922059804201126,
0.04841003194451332,
-0.24113398790359497,
0.050415195524692535,
-0.1276012361049652,
0.009670786559581757,
-0.022802725434303284,
0.5810166001319885,
-0.22440192103385925,
-0.05934266746044159,
-0.413650244474411,
0.42902642488479614,
0.09053132683038712,
-0.33885475993156433,
-0.08051957935094833,
0.3583999574184418,
-0.31732064485549927,
-0.2010880708694458,
0.22619470953941345,
0.4100223481655121,
0.15136000514030457,
0.19435739517211914,
-0.5254405736923218,
-0.4069116413593292,
0.44720226526260376,
-0.4417078197002411,
-0.5069124698638916,
0.02907452918589115,
-0.31339389085769653,
0.06790432333946228,
0.49642300605773926,
-0.4710500240325928,
-0.14913417398929596,
0.0015055608237162232,
-0.08082758635282516,
-0.09160450100898743,
-0.09819380193948746,
0.2610398828983307,
0.015110877342522144,
-0.2518463730812073,
0.17900733649730682,
0.1764504462480545,
-0.022816073149442673,
-0.42041611671447754,
-0.27535995841026306
] |
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.12737514078617096,
-0.35116562247276306,
-0.017932644113898277,
0.35360872745513916,
0.47600245475769043,
0.08871346712112427,
0.7330296635627747,
0.38043493032455444,
0.06552495807409286,
-0.0380423478782177,
-0.111153244972229,
0.3819507658481598,
-0.23296910524368286,
-0.33393433690071106,
0.03510892763733864,
-0.5614942312240601,
0.2225799858570099,
-0.09982758015394211,
-0.28079819679260254,
-0.06134718284010887,
-0.24313423037528992,
0.03548915311694145,
-0.21849742531776428,
-0.10849645733833313,
-0.5479354858398438,
0.044095996767282486,
-0.019555551931262016,
-0.07656887918710709,
-0.06229947507381439,
-0.13918043673038483,
0.12234672904014587,
-0.17449654638767242,
0.4444533586502075,
0.7012934684753418,
-0.00012770107423420995,
0.07030182331800461,
0.36427220702171326,
-0.17377832531929016,
0.04999925196170807,
-0.16101369261741638,
0.04004685580730438,
-0.2573828101158142,
0.07277636975049973,
-0.09468337148427963,
-0.22349399328231812,
-0.17084543406963348,
0.09591034799814224,
-0.17902971804141998,
-0.028141869232058525,
0.41916894912719727,
0.07712996751070023,
0.27901116013526917,
0.24666103720664978,
0.13863056898117065,
0.22781161963939667,
0.5182864665985107,
-0.2734379470348358,
-0.05611717700958252,
0.22615034878253937,
0.37547779083251953,
0.12400452792644501,
0.5647348761558533,
-0.2913348972797394,
-0.036233801394701004,
0.26694509387016296,
0.12900516390800476,
-0.10145501792430878,
-0.314005583524704,
0.04915720224380493,
0.08946330100297928,
0.42194420099258423,
-0.1494392454624176,
-0.08077910542488098,
-0.1436641365289688,
-0.14397795498371124,
-0.12738043069839478,
0.04059102386236191,
0.2803194522857666,
-0.07184098660945892,
-0.18723826110363007,
-0.539242684841156,
0.30529189109802246,
-0.14862369000911713,
0.2131589651107788,
-0.2805241644382477,
-0.0034206677228212357,
-0.13816316425800323,
0.2928087115287781,
-0.047119300812482834,
-0.11271274834871292,
0.19308078289031982,
-0.12341479957103729,
0.1300756186246872,
-0.009825528599321842,
-0.14363200962543488,
-0.053490735590457916,
-0.38959938287734985,
-0.31501221656799316,
-0.20014798641204834,
-0.1602649688720703,
0.16648538410663605,
0.13927580416202545,
-0.11639551818370819,
0.12807093560695648,
0.18263286352157593,
0.2680342197418213,
0.10578285157680511,
0.32070258259773254,
-0.085892453789711,
-0.2895815670490265,
-0.04691935330629349,
0.0877332016825676,
-0.29622682929039,
-0.4357525408267975,
0.1545342057943344,
0.32529687881469727,
0.24522154033184052,
0.06874307245016098,
0.12985509634017944,
-0.32394087314605713,
-0.10892301052808762,
-0.009586540050804615,
0.07522505521774292,
0.2850382328033447,
-0.11867921054363251,
0.24390484392642975,
0.48048296570777893,
0.39720281958580017,
-0.15381810069084167,
0.06956271827220917,
0.025072576478123665,
0.03152092918753624,
-0.44049566984176636,
-0.28569865226745605,
0.15340976417064667,
-0.11777324229478836,
0.10007024556398392,
0.037431828677654266,
0.04641568288207054,
0.10069649666547775,
0.07349668443202972,
-0.18586984276771545,
0.6246294975280762,
0.14764700829982758,
-0.19447416067123413,
0.2767931818962097,
0.270906537771225,
0.5297801494598389,
-0.304298460483551,
0.25653156638145447,
-0.5095698833465576,
0.065252885222435,
-0.023091433569788933,
-0.014543901197612286,
0.2186548262834549,
-0.020721858367323875,
-0.2121620923280716,
0.015829231590032578,
0.592312216758728,
-0.08367802947759628,
0.27348771691322327,
-0.5791622996330261,
0.09496430307626724,
-0.19133509695529938,
0.0341525562107563,
0.06366927176713943,
-0.20471520721912384,
-0.05235873907804489,
0.38634389638900757,
0.09194979816675186,
0.31545889377593994,
0.16028234362602234,
0.05108339339494705,
0.07987046986818314,
-0.225352942943573,
-0.23505039513111115,
0.3363233506679535,
-0.3768564462661743,
0.09203807264566422,
-0.01769321784377098,
0.09387896209955215,
-0.06380388885736465,
0.11201920360326767,
0.3361777365207672,
0.03260112181305885,
-0.12800149619579315,
0.029448654502630234,
0.1963149607181549,
-0.16618236899375916,
0.1402868926525116,
0.07735977321863174,
0.1913028061389923,
0.1933746337890625,
0.03500613570213318,
-0.01568373665213585,
0.20765338838100433,
-0.2216716706752777,
0.17757616937160492,
-0.05428053066134453,
-0.0747133418917656,
0.07117719948291779,
0.040378037840127945,
-0.3698902428150177,
-0.012196831405162811,
-0.04746969789266586,
0.1864665299654007,
-0.23310033977031708,
-0.04872112721204758,
0.023635009303689003,
0.08221708983182907,
0.05827915668487549,
0.047924596816301346,
0.0049781715497374535,
-0.1919565051794052,
-0.18220600485801697,
-0.13902734220027924,
-0.0032421820797026157,
0.09221033751964569,
-0.2094767987728119,
-0.2617241442203522,
-0.052343688905239105,
-0.12324901670217514,
0.17830416560173035,
0.058837827295064926,
-0.35903677344322205,
0.051025453954935074,
0.019273776561021805,
-0.36533042788505554,
-0.2013598531484604,
0.17339256405830383,
0.26766902208328247,
-0.09962092339992523,
-0.04223461076617241,
0.19160310924053192,
0.06328868865966797,
0.1146329939365387,
-0.5482741594314575,
0.0834660679101944,
0.17784197628498077,
-0.24697020649909973,
0.2043912559747696,
0.2162797600030899,
0.14853379130363464,
-0.2755032777786255,
-0.19603493809700012,
0.43878665566444397,
0.16041062772274017,
0.3159129023551941,
-0.3300256133079529,
0.11610186100006104,
-0.07264672964811325,
-0.03940204530954361,
-0.19063358008861542,
-0.040808115154504776,
-0.27728158235549927,
0.07302392274141312,
-0.1318594217300415,
0.012982288375496864,
-0.45691895484924316,
-0.04493600130081177,
0.29626211524009705,
0.08876395225524902,
0.1758720725774765,
-0.0012163631618022919,
-0.3998461067676544,
0.21331210434436798,
0.17712657153606415,
-0.6013535261154175,
0.2978383004665375,
-0.00436173053458333,
0.18920734524726868,
-0.10501883924007416,
0.09558358788490295,
-0.1625431478023529,
0.24844472110271454,
0.11404215544462204,
0.09074815362691879,
-0.19946475327014923,
0.14185214042663574,
-0.10792585462331772,
0.02684636600315571,
0.026369821280241013,
-0.140628844499588,
-0.23369300365447998,
-0.3589506447315216,
0.27138257026672363,
-0.16618312895298004,
-0.13451862335205078,
-0.40185463428497314,
-0.2621859610080719,
0.03605636954307556,
-0.07400504499673843,
-0.08233371376991272,
0.1507578194141388,
0.18556810915470123,
0.19043487310409546,
0.2634179890155792,
-0.1818944662809372,
0.37431609630584717,
-0.41302919387817383,
-0.03535478934645653,
-0.07500974833965302,
-0.2867960035800934,
-0.09916486591100693,
0.08965590596199036,
-0.5234113335609436,
0.09148448705673218,
-0.2289898842573166,
-0.09319096803665161,
-0.250175803899765,
0.013548125512897968,
0.14182229340076447,
-0.2678501605987549,
-0.28500300645828247,
0.308591365814209,
0.1939285695552826,
-0.14248229563236237,
0.04066231846809387,
0.2663511037826538,
0.010307513177394867,
0.04690111428499222,
0.15378358960151672,
-0.08961997926235199,
0.11656028032302856,
-0.06329821795225143,
-0.17674081027507782,
-0.09661802649497986,
-0.07506143301725388,
-0.07041662931442261,
-0.021759675815701485,
0.06337695568799973,
0.3462585210800171,
0.37218356132507324,
-0.08989036083221436,
-0.052042409777641296,
0.035609036684036255,
0.06296498328447342,
-0.39768779277801514,
0.5225028991699219,
-0.22615419328212738,
-0.36082586646080017,
0.11920181661844254,
0.023855721578001976,
0.06514710932970047,
0.48626869916915894,
0.06052284687757492,
0.049731604754924774,
0.011782478541135788,
-0.07894466072320938,
0.25259289145469666,
0.22119715809822083,
0.35102036595344543,
-0.09112486988306046,
0.01916578784584999,
-0.16470715403556824,
0.015416686423122883,
-0.10187187790870667,
-0.06325501948595047,
0.6088862419128418,
0.1850840449333191,
0.2399427741765976,
0.09925858676433563,
0.6996651291847229,
-0.06113724410533905,
-0.7380952835083008,
0.21680672466754913,
-0.2425099015235901,
0.1921670287847519,
-0.11812160909175873,
-0.3539586663246155,
0.3988560438156128,
-0.20941969752311707,
0.06437364965677261,
-0.08596715331077576,
-0.024906951934099197,
-0.2391577512025833,
-0.09022432565689087,
0.3573607802391052,
-0.3172069191932678,
-0.15857398509979248,
0.4044302701950073,
-0.14470256865024567,
0.27637311816215515,
-0.23134253919124603,
0.3245902359485626,
-0.26092609763145447,
-0.21379277110099792,
0.060056984424591064,
0.44877177476882935,
0.13851357996463776,
0.04172460362315178,
-0.3342844247817993,
-0.21669700741767883,
-0.14322705566883087,
0.35682761669158936,
0.11957734078168869,
0.5672699809074402,
-0.09803595393896103,
-0.07446511834859848,
0.10155639052391052,
0.24136953055858612,
0.8307592272758484,
0.045557230710983276,
-0.0904591903090477,
0.15144191682338715,
-0.34783491492271423,
-0.45497825741767883,
-0.102229043841362,
-0.051417913287878036,
0.09068144112825394,
0.17169053852558136,
0.12038647383451462,
-0.09105323255062103,
-0.18333399295806885,
-0.005832506809383631,
0.19555510580539703,
-0.055124957114458084,
0.03471889719367027,
-0.22691141068935394,
0.05875765159726143,
-0.12964999675750732,
-0.15528330206871033,
0.22118236124515533,
0.029675418511033058,
0.00516205420717597,
-0.3081282079219818,
-0.3262302577495575,
-0.1266998052597046,
0.18248215317726135,
-0.1330121010541916,
0.4110669791698456,
0.09925137460231781,
-0.17808538675308228,
0.07690707594156265,
0.5561061501502991,
0.4184044897556305,
-0.03893916308879852,
-0.11877360939979553,
0.08064387738704681,
0.2931108772754669,
0.10643281042575836,
0.3002045154571533,
0.32082387804985046,
-0.06187281012535095,
-0.43966391682624817,
-0.22684866189956665,
-0.1938147395849228,
-0.33053264021873474,
0.3972931206226349,
0.4080631732940674,
0.09893536567687988,
-0.49535563588142395,
-0.49217092990875244,
0.3861899673938751,
0.29371947050094604,
0.19583043456077576,
0.20459184050559998,
-0.5417590737342834,
-0.40096724033355713,
0.07817858457565308,
0.46624189615249634,
0.8556229472160339,
-0.0370788499712944,
0.3702828288078308,
0.03156561404466629,
0.010807035490870476,
0.17210228741168976,
-0.001889070263132453,
0.4117945730686188,
-0.35428154468536377,
0.13928939402103424,
-0.1648537963628769,
-0.31254979968070984,
0.2525227963924408,
-0.06020328402519226,
-0.2439698874950409,
0.04253644496202469,
-0.3494715094566345,
0.19361983239650726,
-0.12569352984428406,
-0.08285321295261383,
-0.04982635751366615,
-0.471417635679245,
0.18787378072738647,
0.015452072955667973,
-0.08251318335533142,
0.26173895597457886,
0.11116104573011398,
-0.16362063586711884,
-0.3798603415489197,
0.06169583275914192,
-0.07622244954109192,
-0.015011891722679138,
-0.24596944451332092,
-0.16324317455291748,
-0.024310344830155373,
-0.7298661470413208,
0.058679886162281036,
0.4961579442024231,
0.3345544934272766,
-0.160566508769989,
-0.04783676192164421,
0.13964155316352844,
0.44384729862213135,
0.16290026903152466,
-0.0990171730518341,
-0.3401840925216675,
0.28534069657325745,
0.0973755419254303,
0.18433213233947754,
0.10863812267780304,
0.06814854592084885,
0.21052049100399017,
-0.5777892470359802,
0.03725123777985573,
0.3060290813446045,
-0.3449511229991913,
-0.3229847550392151,
-0.19845038652420044,
0.04918491840362549,
0.03816332668066025,
0.028618456795811653,
0.12448917329311371,
-0.03890300542116165,
0.20724327862262726,
-0.041512202471494675,
-0.22646154463291168,
0.13288986682891846,
0.45233115553855896,
0.11298368126153946,
-0.3500462770462036,
0.39075642824172974,
0.35495880246162415,
-0.04477781802415848,
-0.0437438078224659,
0.4166940748691559,
0.635319173336029,
-0.34569671750068665,
0.09949755668640137,
-0.10271666198968887,
-0.1569867730140686,
-0.011073690839111805,
0.5430943965911865,
-0.23431749641895294,
-0.13097791373729706,
-0.23895752429962158,
-0.04081762582063675,
-0.43089377880096436,
0.010813401080667973,
-0.3162982165813446,
0.45663073658943176,
-0.043222445994615555,
0.3627101182937622,
0.21050584316253662,
-0.18734930455684662,
-0.14413583278656006,
-0.25864914059638977,
0.17235061526298523,
0.36793357133865356,
-0.24718241393566132,
0.2187611609697342,
-0.126958429813385,
-0.1220230832695961,
-0.03625234216451645,
0.026031319051980972,
-0.24973955750465393,
-0.033390723168849945,
-0.05767792835831642,
0.1773061901330948,
0.06661427766084671,
-0.11354031413793564,
-0.07354700565338135,
-0.17366941273212433,
-0.1385808140039444,
-0.2681722044944763,
-0.0377182736992836,
0.1109214499592781,
-0.11599929630756378,
0.3531613349914551,
-0.17836593091487885,
0.23122578859329224,
0.3186763525009155,
-0.27000051736831665,
-0.10262239724397659,
0.03587157279253006,
0.2229628711938858,
0.060050833970308304,
0.004531959071755409,
-0.061556655913591385,
-0.27723655104637146,
0.11259152740240097,
0.16520315408706665,
0.25497496128082275,
0.20461730659008026,
-0.09999668598175049,
0.10917840152978897,
-0.04380663484334946,
0.20418405532836914,
0.10125570744276047,
-0.17187079787254333,
-0.0508287288248539,
0.06037340685725212,
-0.007623378187417984,
0.10062166303396225,
0.14499929547309875,
0.03886914625763893,
0.1252809762954712,
-0.08346397429704666,
0.275578111410141,
0.06655873358249664,
0.31139472126960754,
-0.3705076575279236,
0.04514239355921745,
0.41785621643066406,
-0.24107322096824646,
0.23508600890636444,
0.46401476860046387,
0.014799953438341618,
0.19304950535297394,
0.29070472717285156,
0.1093434989452362,
-0.11870165169239044,
0.32269638776779175,
0.39451682567596436,
0.8204314112663269,
0.5895959138870239,
0.08376955986022949,
0.27460289001464844,
0.09925687313079834,
-0.15360723435878754,
-0.20725123584270477,
0.23582398891448975,
0.39196836948394775,
0.018867086619138718,
0.18569326400756836,
-0.24079905450344086,
-0.4871237874031067,
0.2258823961019516,
0.12177469581365585,
-0.19461774826049805,
-0.0822235494852066,
-0.6648060083389282,
0.011875391006469727,
0.13582637906074524,
-0.1866595447063446,
-0.17971548438072205,
-0.050137732177972794,
0.22059080004692078,
0.259753555059433,
-0.10322070121765137,
-0.16091257333755493,
-0.17247425019741058,
0.0691012591123581,
0.03752928599715233,
-0.007329888176172972,
0.16975699365139008,
-0.13684619963169098,
0.16176092624664307,
0.24482418596744537,
0.1969079226255417,
0.28495338559150696,
0.4870798885822296,
-0.1681717336177826,
-0.15989352762699127,
-0.0105538135394454,
-0.1923658847808838,
0.08990129828453064,
0.06671170145273209,
0.031533826142549515,
-0.1532077044248581,
-0.014956250786781311,
0.008462578989565372,
0.03862797096371651,
0.031460441648960114,
-0.09408104419708252,
-0.2182597517967224,
0.16762492060661316,
0.3055749535560608,
-0.36377716064453125,
-0.149092897772789,
-0.0998985692858696,
-0.24665600061416626,
-0.34831011295318604,
-0.2655346989631653,
0.5327387452125549,
0.02789606899023056,
0.1280096471309662,
0.14216767251491547,
-0.0421595498919487,
0.048785898834466934,
0.15741202235221863,
-0.12155666947364807,
0.07757695764303207,
-0.15409377217292786,
0.1359657198190689,
-0.08580520004034042,
0.03191034495830536,
0.1184747964143753,
-0.3834478557109833,
-0.018849456682801247,
-0.03916439414024353,
0.24254173040390015,
0.0646749958395958,
0.20209015905857086,
-0.09834744036197662,
0.4987446963787079,
0.6146570444107056,
-0.1336156725883484,
-0.14148077368736267,
-0.13041949272155762,
0.37065139412879944,
0.07330852001905441,
-0.0774654895067215,
0.021921269595623016,
0.1024273931980133,
0.006506839767098427,
-0.3420654237270355,
-0.25549036264419556,
-0.019982242956757545,
0.3041453957557678,
0.35128292441368103,
0.09328830987215042,
0.32031315565109253,
-0.01922059804201126,
0.04841003194451332,
-0.24113398790359497,
0.050415195524692535,
-0.1276012361049652,
0.009670786559581757,
-0.022802725434303284,
0.5810166001319885,
-0.22440192103385925,
-0.05934266746044159,
-0.413650244474411,
0.42902642488479614,
0.09053132683038712,
-0.33885475993156433,
-0.08051957935094833,
0.3583999574184418,
-0.31732064485549927,
-0.2010880708694458,
0.22619470953941345,
0.4100223481655121,
0.15136000514030457,
0.19435739517211914,
-0.5254405736923218,
-0.4069116413593292,
0.44720226526260376,
-0.4417078197002411,
-0.5069124698638916,
0.02907452918589115,
-0.31339389085769653,
0.06790432333946228,
0.49642300605773926,
-0.4710500240325928,
-0.14913417398929596,
0.0015055608237162232,
-0.08082758635282516,
-0.09160450100898743,
-0.09819380193948746,
0.2610398828983307,
0.015110877342522144,
-0.2518463730812073,
0.17900733649730682,
0.1764504462480545,
-0.022816073149442673,
-0.42041611671447754,
-0.27535995841026306
] |
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.12737514078617096,
-0.35116562247276306,
-0.017932644113898277,
0.35360872745513916,
0.47600245475769043,
0.08871346712112427,
0.7330296635627747,
0.38043493032455444,
0.06552495807409286,
-0.0380423478782177,
-0.111153244972229,
0.3819507658481598,
-0.23296910524368286,
-0.33393433690071106,
0.03510892763733864,
-0.5614942312240601,
0.2225799858570099,
-0.09982758015394211,
-0.28079819679260254,
-0.06134718284010887,
-0.24313423037528992,
0.03548915311694145,
-0.21849742531776428,
-0.10849645733833313,
-0.5479354858398438,
0.044095996767282486,
-0.019555551931262016,
-0.07656887918710709,
-0.06229947507381439,
-0.13918043673038483,
0.12234672904014587,
-0.17449654638767242,
0.4444533586502075,
0.7012934684753418,
-0.00012770107423420995,
0.07030182331800461,
0.36427220702171326,
-0.17377832531929016,
0.04999925196170807,
-0.16101369261741638,
0.04004685580730438,
-0.2573828101158142,
0.07277636975049973,
-0.09468337148427963,
-0.22349399328231812,
-0.17084543406963348,
0.09591034799814224,
-0.17902971804141998,
-0.028141869232058525,
0.41916894912719727,
0.07712996751070023,
0.27901116013526917,
0.24666103720664978,
0.13863056898117065,
0.22781161963939667,
0.5182864665985107,
-0.2734379470348358,
-0.05611717700958252,
0.22615034878253937,
0.37547779083251953,
0.12400452792644501,
0.5647348761558533,
-0.2913348972797394,
-0.036233801394701004,
0.26694509387016296,
0.12900516390800476,
-0.10145501792430878,
-0.314005583524704,
0.04915720224380493,
0.08946330100297928,
0.42194420099258423,
-0.1494392454624176,
-0.08077910542488098,
-0.1436641365289688,
-0.14397795498371124,
-0.12738043069839478,
0.04059102386236191,
0.2803194522857666,
-0.07184098660945892,
-0.18723826110363007,
-0.539242684841156,
0.30529189109802246,
-0.14862369000911713,
0.2131589651107788,
-0.2805241644382477,
-0.0034206677228212357,
-0.13816316425800323,
0.2928087115287781,
-0.047119300812482834,
-0.11271274834871292,
0.19308078289031982,
-0.12341479957103729,
0.1300756186246872,
-0.009825528599321842,
-0.14363200962543488,
-0.053490735590457916,
-0.38959938287734985,
-0.31501221656799316,
-0.20014798641204834,
-0.1602649688720703,
0.16648538410663605,
0.13927580416202545,
-0.11639551818370819,
0.12807093560695648,
0.18263286352157593,
0.2680342197418213,
0.10578285157680511,
0.32070258259773254,
-0.085892453789711,
-0.2895815670490265,
-0.04691935330629349,
0.0877332016825676,
-0.29622682929039,
-0.4357525408267975,
0.1545342057943344,
0.32529687881469727,
0.24522154033184052,
0.06874307245016098,
0.12985509634017944,
-0.32394087314605713,
-0.10892301052808762,
-0.009586540050804615,
0.07522505521774292,
0.2850382328033447,
-0.11867921054363251,
0.24390484392642975,
0.48048296570777893,
0.39720281958580017,
-0.15381810069084167,
0.06956271827220917,
0.025072576478123665,
0.03152092918753624,
-0.44049566984176636,
-0.28569865226745605,
0.15340976417064667,
-0.11777324229478836,
0.10007024556398392,
0.037431828677654266,
0.04641568288207054,
0.10069649666547775,
0.07349668443202972,
-0.18586984276771545,
0.6246294975280762,
0.14764700829982758,
-0.19447416067123413,
0.2767931818962097,
0.270906537771225,
0.5297801494598389,
-0.304298460483551,
0.25653156638145447,
-0.5095698833465576,
0.065252885222435,
-0.023091433569788933,
-0.014543901197612286,
0.2186548262834549,
-0.020721858367323875,
-0.2121620923280716,
0.015829231590032578,
0.592312216758728,
-0.08367802947759628,
0.27348771691322327,
-0.5791622996330261,
0.09496430307626724,
-0.19133509695529938,
0.0341525562107563,
0.06366927176713943,
-0.20471520721912384,
-0.05235873907804489,
0.38634389638900757,
0.09194979816675186,
0.31545889377593994,
0.16028234362602234,
0.05108339339494705,
0.07987046986818314,
-0.225352942943573,
-0.23505039513111115,
0.3363233506679535,
-0.3768564462661743,
0.09203807264566422,
-0.01769321784377098,
0.09387896209955215,
-0.06380388885736465,
0.11201920360326767,
0.3361777365207672,
0.03260112181305885,
-0.12800149619579315,
0.029448654502630234,
0.1963149607181549,
-0.16618236899375916,
0.1402868926525116,
0.07735977321863174,
0.1913028061389923,
0.1933746337890625,
0.03500613570213318,
-0.01568373665213585,
0.20765338838100433,
-0.2216716706752777,
0.17757616937160492,
-0.05428053066134453,
-0.0747133418917656,
0.07117719948291779,
0.040378037840127945,
-0.3698902428150177,
-0.012196831405162811,
-0.04746969789266586,
0.1864665299654007,
-0.23310033977031708,
-0.04872112721204758,
0.023635009303689003,
0.08221708983182907,
0.05827915668487549,
0.047924596816301346,
0.0049781715497374535,
-0.1919565051794052,
-0.18220600485801697,
-0.13902734220027924,
-0.0032421820797026157,
0.09221033751964569,
-0.2094767987728119,
-0.2617241442203522,
-0.052343688905239105,
-0.12324901670217514,
0.17830416560173035,
0.058837827295064926,
-0.35903677344322205,
0.051025453954935074,
0.019273776561021805,
-0.36533042788505554,
-0.2013598531484604,
0.17339256405830383,
0.26766902208328247,
-0.09962092339992523,
-0.04223461076617241,
0.19160310924053192,
0.06328868865966797,
0.1146329939365387,
-0.5482741594314575,
0.0834660679101944,
0.17784197628498077,
-0.24697020649909973,
0.2043912559747696,
0.2162797600030899,
0.14853379130363464,
-0.2755032777786255,
-0.19603493809700012,
0.43878665566444397,
0.16041062772274017,
0.3159129023551941,
-0.3300256133079529,
0.11610186100006104,
-0.07264672964811325,
-0.03940204530954361,
-0.19063358008861542,
-0.040808115154504776,
-0.27728158235549927,
0.07302392274141312,
-0.1318594217300415,
0.012982288375496864,
-0.45691895484924316,
-0.04493600130081177,
0.29626211524009705,
0.08876395225524902,
0.1758720725774765,
-0.0012163631618022919,
-0.3998461067676544,
0.21331210434436798,
0.17712657153606415,
-0.6013535261154175,
0.2978383004665375,
-0.00436173053458333,
0.18920734524726868,
-0.10501883924007416,
0.09558358788490295,
-0.1625431478023529,
0.24844472110271454,
0.11404215544462204,
0.09074815362691879,
-0.19946475327014923,
0.14185214042663574,
-0.10792585462331772,
0.02684636600315571,
0.026369821280241013,
-0.140628844499588,
-0.23369300365447998,
-0.3589506447315216,
0.27138257026672363,
-0.16618312895298004,
-0.13451862335205078,
-0.40185463428497314,
-0.2621859610080719,
0.03605636954307556,
-0.07400504499673843,
-0.08233371376991272,
0.1507578194141388,
0.18556810915470123,
0.19043487310409546,
0.2634179890155792,
-0.1818944662809372,
0.37431609630584717,
-0.41302919387817383,
-0.03535478934645653,
-0.07500974833965302,
-0.2867960035800934,
-0.09916486591100693,
0.08965590596199036,
-0.5234113335609436,
0.09148448705673218,
-0.2289898842573166,
-0.09319096803665161,
-0.250175803899765,
0.013548125512897968,
0.14182229340076447,
-0.2678501605987549,
-0.28500300645828247,
0.308591365814209,
0.1939285695552826,
-0.14248229563236237,
0.04066231846809387,
0.2663511037826538,
0.010307513177394867,
0.04690111428499222,
0.15378358960151672,
-0.08961997926235199,
0.11656028032302856,
-0.06329821795225143,
-0.17674081027507782,
-0.09661802649497986,
-0.07506143301725388,
-0.07041662931442261,
-0.021759675815701485,
0.06337695568799973,
0.3462585210800171,
0.37218356132507324,
-0.08989036083221436,
-0.052042409777641296,
0.035609036684036255,
0.06296498328447342,
-0.39768779277801514,
0.5225028991699219,
-0.22615419328212738,
-0.36082586646080017,
0.11920181661844254,
0.023855721578001976,
0.06514710932970047,
0.48626869916915894,
0.06052284687757492,
0.049731604754924774,
0.011782478541135788,
-0.07894466072320938,
0.25259289145469666,
0.22119715809822083,
0.35102036595344543,
-0.09112486988306046,
0.01916578784584999,
-0.16470715403556824,
0.015416686423122883,
-0.10187187790870667,
-0.06325501948595047,
0.6088862419128418,
0.1850840449333191,
0.2399427741765976,
0.09925858676433563,
0.6996651291847229,
-0.06113724410533905,
-0.7380952835083008,
0.21680672466754913,
-0.2425099015235901,
0.1921670287847519,
-0.11812160909175873,
-0.3539586663246155,
0.3988560438156128,
-0.20941969752311707,
0.06437364965677261,
-0.08596715331077576,
-0.024906951934099197,
-0.2391577512025833,
-0.09022432565689087,
0.3573607802391052,
-0.3172069191932678,
-0.15857398509979248,
0.4044302701950073,
-0.14470256865024567,
0.27637311816215515,
-0.23134253919124603,
0.3245902359485626,
-0.26092609763145447,
-0.21379277110099792,
0.060056984424591064,
0.44877177476882935,
0.13851357996463776,
0.04172460362315178,
-0.3342844247817993,
-0.21669700741767883,
-0.14322705566883087,
0.35682761669158936,
0.11957734078168869,
0.5672699809074402,
-0.09803595393896103,
-0.07446511834859848,
0.10155639052391052,
0.24136953055858612,
0.8307592272758484,
0.045557230710983276,
-0.0904591903090477,
0.15144191682338715,
-0.34783491492271423,
-0.45497825741767883,
-0.102229043841362,
-0.051417913287878036,
0.09068144112825394,
0.17169053852558136,
0.12038647383451462,
-0.09105323255062103,
-0.18333399295806885,
-0.005832506809383631,
0.19555510580539703,
-0.055124957114458084,
0.03471889719367027,
-0.22691141068935394,
0.05875765159726143,
-0.12964999675750732,
-0.15528330206871033,
0.22118236124515533,
0.029675418511033058,
0.00516205420717597,
-0.3081282079219818,
-0.3262302577495575,
-0.1266998052597046,
0.18248215317726135,
-0.1330121010541916,
0.4110669791698456,
0.09925137460231781,
-0.17808538675308228,
0.07690707594156265,
0.5561061501502991,
0.4184044897556305,
-0.03893916308879852,
-0.11877360939979553,
0.08064387738704681,
0.2931108772754669,
0.10643281042575836,
0.3002045154571533,
0.32082387804985046,
-0.06187281012535095,
-0.43966391682624817,
-0.22684866189956665,
-0.1938147395849228,
-0.33053264021873474,
0.3972931206226349,
0.4080631732940674,
0.09893536567687988,
-0.49535563588142395,
-0.49217092990875244,
0.3861899673938751,
0.29371947050094604,
0.19583043456077576,
0.20459184050559998,
-0.5417590737342834,
-0.40096724033355713,
0.07817858457565308,
0.46624189615249634,
0.8556229472160339,
-0.0370788499712944,
0.3702828288078308,
0.03156561404466629,
0.010807035490870476,
0.17210228741168976,
-0.001889070263132453,
0.4117945730686188,
-0.35428154468536377,
0.13928939402103424,
-0.1648537963628769,
-0.31254979968070984,
0.2525227963924408,
-0.06020328402519226,
-0.2439698874950409,
0.04253644496202469,
-0.3494715094566345,
0.19361983239650726,
-0.12569352984428406,
-0.08285321295261383,
-0.04982635751366615,
-0.471417635679245,
0.18787378072738647,
0.015452072955667973,
-0.08251318335533142,
0.26173895597457886,
0.11116104573011398,
-0.16362063586711884,
-0.3798603415489197,
0.06169583275914192,
-0.07622244954109192,
-0.015011891722679138,
-0.24596944451332092,
-0.16324317455291748,
-0.024310344830155373,
-0.7298661470413208,
0.058679886162281036,
0.4961579442024231,
0.3345544934272766,
-0.160566508769989,
-0.04783676192164421,
0.13964155316352844,
0.44384729862213135,
0.16290026903152466,
-0.0990171730518341,
-0.3401840925216675,
0.28534069657325745,
0.0973755419254303,
0.18433213233947754,
0.10863812267780304,
0.06814854592084885,
0.21052049100399017,
-0.5777892470359802,
0.03725123777985573,
0.3060290813446045,
-0.3449511229991913,
-0.3229847550392151,
-0.19845038652420044,
0.04918491840362549,
0.03816332668066025,
0.028618456795811653,
0.12448917329311371,
-0.03890300542116165,
0.20724327862262726,
-0.041512202471494675,
-0.22646154463291168,
0.13288986682891846,
0.45233115553855896,
0.11298368126153946,
-0.3500462770462036,
0.39075642824172974,
0.35495880246162415,
-0.04477781802415848,
-0.0437438078224659,
0.4166940748691559,
0.635319173336029,
-0.34569671750068665,
0.09949755668640137,
-0.10271666198968887,
-0.1569867730140686,
-0.011073690839111805,
0.5430943965911865,
-0.23431749641895294,
-0.13097791373729706,
-0.23895752429962158,
-0.04081762582063675,
-0.43089377880096436,
0.010813401080667973,
-0.3162982165813446,
0.45663073658943176,
-0.043222445994615555,
0.3627101182937622,
0.21050584316253662,
-0.18734930455684662,
-0.14413583278656006,
-0.25864914059638977,
0.17235061526298523,
0.36793357133865356,
-0.24718241393566132,
0.2187611609697342,
-0.126958429813385,
-0.1220230832695961,
-0.03625234216451645,
0.026031319051980972,
-0.24973955750465393,
-0.033390723168849945,
-0.05767792835831642,
0.1773061901330948,
0.06661427766084671,
-0.11354031413793564,
-0.07354700565338135,
-0.17366941273212433,
-0.1385808140039444,
-0.2681722044944763,
-0.0377182736992836,
0.1109214499592781,
-0.11599929630756378,
0.3531613349914551,
-0.17836593091487885,
0.23122578859329224,
0.3186763525009155,
-0.27000051736831665,
-0.10262239724397659,
0.03587157279253006,
0.2229628711938858,
0.060050833970308304,
0.004531959071755409,
-0.061556655913591385,
-0.27723655104637146,
0.11259152740240097,
0.16520315408706665,
0.25497496128082275,
0.20461730659008026,
-0.09999668598175049,
0.10917840152978897,
-0.04380663484334946,
0.20418405532836914,
0.10125570744276047,
-0.17187079787254333,
-0.0508287288248539,
0.06037340685725212,
-0.007623378187417984,
0.10062166303396225,
0.14499929547309875,
0.03886914625763893,
0.1252809762954712,
-0.08346397429704666,
0.275578111410141,
0.06655873358249664,
0.31139472126960754,
-0.3705076575279236,
0.04514239355921745,
0.41785621643066406,
-0.24107322096824646,
0.23508600890636444,
0.46401476860046387,
0.014799953438341618,
0.19304950535297394,
0.29070472717285156,
0.1093434989452362,
-0.11870165169239044,
0.32269638776779175,
0.39451682567596436,
0.8204314112663269,
0.5895959138870239,
0.08376955986022949,
0.27460289001464844,
0.09925687313079834,
-0.15360723435878754,
-0.20725123584270477,
0.23582398891448975,
0.39196836948394775,
0.018867086619138718,
0.18569326400756836,
-0.24079905450344086,
-0.4871237874031067,
0.2258823961019516,
0.12177469581365585,
-0.19461774826049805,
-0.0822235494852066,
-0.6648060083389282,
0.011875391006469727,
0.13582637906074524,
-0.1866595447063446,
-0.17971548438072205,
-0.050137732177972794,
0.22059080004692078,
0.259753555059433,
-0.10322070121765137,
-0.16091257333755493,
-0.17247425019741058,
0.0691012591123581,
0.03752928599715233,
-0.007329888176172972,
0.16975699365139008,
-0.13684619963169098,
0.16176092624664307,
0.24482418596744537,
0.1969079226255417,
0.28495338559150696,
0.4870798885822296,
-0.1681717336177826,
-0.15989352762699127,
-0.0105538135394454,
-0.1923658847808838,
0.08990129828453064,
0.06671170145273209,
0.031533826142549515,
-0.1532077044248581,
-0.014956250786781311,
0.008462578989565372,
0.03862797096371651,
0.031460441648960114,
-0.09408104419708252,
-0.2182597517967224,
0.16762492060661316,
0.3055749535560608,
-0.36377716064453125,
-0.149092897772789,
-0.0998985692858696,
-0.24665600061416626,
-0.34831011295318604,
-0.2655346989631653,
0.5327387452125549,
0.02789606899023056,
0.1280096471309662,
0.14216767251491547,
-0.0421595498919487,
0.048785898834466934,
0.15741202235221863,
-0.12155666947364807,
0.07757695764303207,
-0.15409377217292786,
0.1359657198190689,
-0.08580520004034042,
0.03191034495830536,
0.1184747964143753,
-0.3834478557109833,
-0.018849456682801247,
-0.03916439414024353,
0.24254173040390015,
0.0646749958395958,
0.20209015905857086,
-0.09834744036197662,
0.4987446963787079,
0.6146570444107056,
-0.1336156725883484,
-0.14148077368736267,
-0.13041949272155762,
0.37065139412879944,
0.07330852001905441,
-0.0774654895067215,
0.021921269595623016,
0.1024273931980133,
0.006506839767098427,
-0.3420654237270355,
-0.25549036264419556,
-0.019982242956757545,
0.3041453957557678,
0.35128292441368103,
0.09328830987215042,
0.32031315565109253,
-0.01922059804201126,
0.04841003194451332,
-0.24113398790359497,
0.050415195524692535,
-0.1276012361049652,
0.009670786559581757,
-0.022802725434303284,
0.5810166001319885,
-0.22440192103385925,
-0.05934266746044159,
-0.413650244474411,
0.42902642488479614,
0.09053132683038712,
-0.33885475993156433,
-0.08051957935094833,
0.3583999574184418,
-0.31732064485549927,
-0.2010880708694458,
0.22619470953941345,
0.4100223481655121,
0.15136000514030457,
0.19435739517211914,
-0.5254405736923218,
-0.4069116413593292,
0.44720226526260376,
-0.4417078197002411,
-0.5069124698638916,
0.02907452918589115,
-0.31339389085769653,
0.06790432333946228,
0.49642300605773926,
-0.4710500240325928,
-0.14913417398929596,
0.0015055608237162232,
-0.08082758635282516,
-0.09160450100898743,
-0.09819380193948746,
0.2610398828983307,
0.015110877342522144,
-0.2518463730812073,
0.17900733649730682,
0.1764504462480545,
-0.022816073149442673,
-0.42041611671447754,
-0.27535995841026306
] |
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.12737514078617096,
-0.35116562247276306,
-0.017932644113898277,
0.35360872745513916,
0.47600245475769043,
0.08871346712112427,
0.7330296635627747,
0.38043493032455444,
0.06552495807409286,
-0.0380423478782177,
-0.111153244972229,
0.3819507658481598,
-0.23296910524368286,
-0.33393433690071106,
0.03510892763733864,
-0.5614942312240601,
0.2225799858570099,
-0.09982758015394211,
-0.28079819679260254,
-0.06134718284010887,
-0.24313423037528992,
0.03548915311694145,
-0.21849742531776428,
-0.10849645733833313,
-0.5479354858398438,
0.044095996767282486,
-0.019555551931262016,
-0.07656887918710709,
-0.06229947507381439,
-0.13918043673038483,
0.12234672904014587,
-0.17449654638767242,
0.4444533586502075,
0.7012934684753418,
-0.00012770107423420995,
0.07030182331800461,
0.36427220702171326,
-0.17377832531929016,
0.04999925196170807,
-0.16101369261741638,
0.04004685580730438,
-0.2573828101158142,
0.07277636975049973,
-0.09468337148427963,
-0.22349399328231812,
-0.17084543406963348,
0.09591034799814224,
-0.17902971804141998,
-0.028141869232058525,
0.41916894912719727,
0.07712996751070023,
0.27901116013526917,
0.24666103720664978,
0.13863056898117065,
0.22781161963939667,
0.5182864665985107,
-0.2734379470348358,
-0.05611717700958252,
0.22615034878253937,
0.37547779083251953,
0.12400452792644501,
0.5647348761558533,
-0.2913348972797394,
-0.036233801394701004,
0.26694509387016296,
0.12900516390800476,
-0.10145501792430878,
-0.314005583524704,
0.04915720224380493,
0.08946330100297928,
0.42194420099258423,
-0.1494392454624176,
-0.08077910542488098,
-0.1436641365289688,
-0.14397795498371124,
-0.12738043069839478,
0.04059102386236191,
0.2803194522857666,
-0.07184098660945892,
-0.18723826110363007,
-0.539242684841156,
0.30529189109802246,
-0.14862369000911713,
0.2131589651107788,
-0.2805241644382477,
-0.0034206677228212357,
-0.13816316425800323,
0.2928087115287781,
-0.047119300812482834,
-0.11271274834871292,
0.19308078289031982,
-0.12341479957103729,
0.1300756186246872,
-0.009825528599321842,
-0.14363200962543488,
-0.053490735590457916,
-0.38959938287734985,
-0.31501221656799316,
-0.20014798641204834,
-0.1602649688720703,
0.16648538410663605,
0.13927580416202545,
-0.11639551818370819,
0.12807093560695648,
0.18263286352157593,
0.2680342197418213,
0.10578285157680511,
0.32070258259773254,
-0.085892453789711,
-0.2895815670490265,
-0.04691935330629349,
0.0877332016825676,
-0.29622682929039,
-0.4357525408267975,
0.1545342057943344,
0.32529687881469727,
0.24522154033184052,
0.06874307245016098,
0.12985509634017944,
-0.32394087314605713,
-0.10892301052808762,
-0.009586540050804615,
0.07522505521774292,
0.2850382328033447,
-0.11867921054363251,
0.24390484392642975,
0.48048296570777893,
0.39720281958580017,
-0.15381810069084167,
0.06956271827220917,
0.025072576478123665,
0.03152092918753624,
-0.44049566984176636,
-0.28569865226745605,
0.15340976417064667,
-0.11777324229478836,
0.10007024556398392,
0.037431828677654266,
0.04641568288207054,
0.10069649666547775,
0.07349668443202972,
-0.18586984276771545,
0.6246294975280762,
0.14764700829982758,
-0.19447416067123413,
0.2767931818962097,
0.270906537771225,
0.5297801494598389,
-0.304298460483551,
0.25653156638145447,
-0.5095698833465576,
0.065252885222435,
-0.023091433569788933,
-0.014543901197612286,
0.2186548262834549,
-0.020721858367323875,
-0.2121620923280716,
0.015829231590032578,
0.592312216758728,
-0.08367802947759628,
0.27348771691322327,
-0.5791622996330261,
0.09496430307626724,
-0.19133509695529938,
0.0341525562107563,
0.06366927176713943,
-0.20471520721912384,
-0.05235873907804489,
0.38634389638900757,
0.09194979816675186,
0.31545889377593994,
0.16028234362602234,
0.05108339339494705,
0.07987046986818314,
-0.225352942943573,
-0.23505039513111115,
0.3363233506679535,
-0.3768564462661743,
0.09203807264566422,
-0.01769321784377098,
0.09387896209955215,
-0.06380388885736465,
0.11201920360326767,
0.3361777365207672,
0.03260112181305885,
-0.12800149619579315,
0.029448654502630234,
0.1963149607181549,
-0.16618236899375916,
0.1402868926525116,
0.07735977321863174,
0.1913028061389923,
0.1933746337890625,
0.03500613570213318,
-0.01568373665213585,
0.20765338838100433,
-0.2216716706752777,
0.17757616937160492,
-0.05428053066134453,
-0.0747133418917656,
0.07117719948291779,
0.040378037840127945,
-0.3698902428150177,
-0.012196831405162811,
-0.04746969789266586,
0.1864665299654007,
-0.23310033977031708,
-0.04872112721204758,
0.023635009303689003,
0.08221708983182907,
0.05827915668487549,
0.047924596816301346,
0.0049781715497374535,
-0.1919565051794052,
-0.18220600485801697,
-0.13902734220027924,
-0.0032421820797026157,
0.09221033751964569,
-0.2094767987728119,
-0.2617241442203522,
-0.052343688905239105,
-0.12324901670217514,
0.17830416560173035,
0.058837827295064926,
-0.35903677344322205,
0.051025453954935074,
0.019273776561021805,
-0.36533042788505554,
-0.2013598531484604,
0.17339256405830383,
0.26766902208328247,
-0.09962092339992523,
-0.04223461076617241,
0.19160310924053192,
0.06328868865966797,
0.1146329939365387,
-0.5482741594314575,
0.0834660679101944,
0.17784197628498077,
-0.24697020649909973,
0.2043912559747696,
0.2162797600030899,
0.14853379130363464,
-0.2755032777786255,
-0.19603493809700012,
0.43878665566444397,
0.16041062772274017,
0.3159129023551941,
-0.3300256133079529,
0.11610186100006104,
-0.07264672964811325,
-0.03940204530954361,
-0.19063358008861542,
-0.040808115154504776,
-0.27728158235549927,
0.07302392274141312,
-0.1318594217300415,
0.012982288375496864,
-0.45691895484924316,
-0.04493600130081177,
0.29626211524009705,
0.08876395225524902,
0.1758720725774765,
-0.0012163631618022919,
-0.3998461067676544,
0.21331210434436798,
0.17712657153606415,
-0.6013535261154175,
0.2978383004665375,
-0.00436173053458333,
0.18920734524726868,
-0.10501883924007416,
0.09558358788490295,
-0.1625431478023529,
0.24844472110271454,
0.11404215544462204,
0.09074815362691879,
-0.19946475327014923,
0.14185214042663574,
-0.10792585462331772,
0.02684636600315571,
0.026369821280241013,
-0.140628844499588,
-0.23369300365447998,
-0.3589506447315216,
0.27138257026672363,
-0.16618312895298004,
-0.13451862335205078,
-0.40185463428497314,
-0.2621859610080719,
0.03605636954307556,
-0.07400504499673843,
-0.08233371376991272,
0.1507578194141388,
0.18556810915470123,
0.19043487310409546,
0.2634179890155792,
-0.1818944662809372,
0.37431609630584717,
-0.41302919387817383,
-0.03535478934645653,
-0.07500974833965302,
-0.2867960035800934,
-0.09916486591100693,
0.08965590596199036,
-0.5234113335609436,
0.09148448705673218,
-0.2289898842573166,
-0.09319096803665161,
-0.250175803899765,
0.013548125512897968,
0.14182229340076447,
-0.2678501605987549,
-0.28500300645828247,
0.308591365814209,
0.1939285695552826,
-0.14248229563236237,
0.04066231846809387,
0.2663511037826538,
0.010307513177394867,
0.04690111428499222,
0.15378358960151672,
-0.08961997926235199,
0.11656028032302856,
-0.06329821795225143,
-0.17674081027507782,
-0.09661802649497986,
-0.07506143301725388,
-0.07041662931442261,
-0.021759675815701485,
0.06337695568799973,
0.3462585210800171,
0.37218356132507324,
-0.08989036083221436,
-0.052042409777641296,
0.035609036684036255,
0.06296498328447342,
-0.39768779277801514,
0.5225028991699219,
-0.22615419328212738,
-0.36082586646080017,
0.11920181661844254,
0.023855721578001976,
0.06514710932970047,
0.48626869916915894,
0.06052284687757492,
0.049731604754924774,
0.011782478541135788,
-0.07894466072320938,
0.25259289145469666,
0.22119715809822083,
0.35102036595344543,
-0.09112486988306046,
0.01916578784584999,
-0.16470715403556824,
0.015416686423122883,
-0.10187187790870667,
-0.06325501948595047,
0.6088862419128418,
0.1850840449333191,
0.2399427741765976,
0.09925858676433563,
0.6996651291847229,
-0.06113724410533905,
-0.7380952835083008,
0.21680672466754913,
-0.2425099015235901,
0.1921670287847519,
-0.11812160909175873,
-0.3539586663246155,
0.3988560438156128,
-0.20941969752311707,
0.06437364965677261,
-0.08596715331077576,
-0.024906951934099197,
-0.2391577512025833,
-0.09022432565689087,
0.3573607802391052,
-0.3172069191932678,
-0.15857398509979248,
0.4044302701950073,
-0.14470256865024567,
0.27637311816215515,
-0.23134253919124603,
0.3245902359485626,
-0.26092609763145447,
-0.21379277110099792,
0.060056984424591064,
0.44877177476882935,
0.13851357996463776,
0.04172460362315178,
-0.3342844247817993,
-0.21669700741767883,
-0.14322705566883087,
0.35682761669158936,
0.11957734078168869,
0.5672699809074402,
-0.09803595393896103,
-0.07446511834859848,
0.10155639052391052,
0.24136953055858612,
0.8307592272758484,
0.045557230710983276,
-0.0904591903090477,
0.15144191682338715,
-0.34783491492271423,
-0.45497825741767883,
-0.102229043841362,
-0.051417913287878036,
0.09068144112825394,
0.17169053852558136,
0.12038647383451462,
-0.09105323255062103,
-0.18333399295806885,
-0.005832506809383631,
0.19555510580539703,
-0.055124957114458084,
0.03471889719367027,
-0.22691141068935394,
0.05875765159726143,
-0.12964999675750732,
-0.15528330206871033,
0.22118236124515533,
0.029675418511033058,
0.00516205420717597,
-0.3081282079219818,
-0.3262302577495575,
-0.1266998052597046,
0.18248215317726135,
-0.1330121010541916,
0.4110669791698456,
0.09925137460231781,
-0.17808538675308228,
0.07690707594156265,
0.5561061501502991,
0.4184044897556305,
-0.03893916308879852,
-0.11877360939979553,
0.08064387738704681,
0.2931108772754669,
0.10643281042575836,
0.3002045154571533,
0.32082387804985046,
-0.06187281012535095,
-0.43966391682624817,
-0.22684866189956665,
-0.1938147395849228,
-0.33053264021873474,
0.3972931206226349,
0.4080631732940674,
0.09893536567687988,
-0.49535563588142395,
-0.49217092990875244,
0.3861899673938751,
0.29371947050094604,
0.19583043456077576,
0.20459184050559998,
-0.5417590737342834,
-0.40096724033355713,
0.07817858457565308,
0.46624189615249634,
0.8556229472160339,
-0.0370788499712944,
0.3702828288078308,
0.03156561404466629,
0.010807035490870476,
0.17210228741168976,
-0.001889070263132453,
0.4117945730686188,
-0.35428154468536377,
0.13928939402103424,
-0.1648537963628769,
-0.31254979968070984,
0.2525227963924408,
-0.06020328402519226,
-0.2439698874950409,
0.04253644496202469,
-0.3494715094566345,
0.19361983239650726,
-0.12569352984428406,
-0.08285321295261383,
-0.04982635751366615,
-0.471417635679245,
0.18787378072738647,
0.015452072955667973,
-0.08251318335533142,
0.26173895597457886,
0.11116104573011398,
-0.16362063586711884,
-0.3798603415489197,
0.06169583275914192,
-0.07622244954109192,
-0.015011891722679138,
-0.24596944451332092,
-0.16324317455291748,
-0.024310344830155373,
-0.7298661470413208,
0.058679886162281036,
0.4961579442024231,
0.3345544934272766,
-0.160566508769989,
-0.04783676192164421,
0.13964155316352844,
0.44384729862213135,
0.16290026903152466,
-0.0990171730518341,
-0.3401840925216675,
0.28534069657325745,
0.0973755419254303,
0.18433213233947754,
0.10863812267780304,
0.06814854592084885,
0.21052049100399017,
-0.5777892470359802,
0.03725123777985573,
0.3060290813446045,
-0.3449511229991913,
-0.3229847550392151,
-0.19845038652420044,
0.04918491840362549,
0.03816332668066025,
0.028618456795811653,
0.12448917329311371,
-0.03890300542116165,
0.20724327862262726,
-0.041512202471494675,
-0.22646154463291168,
0.13288986682891846,
0.45233115553855896,
0.11298368126153946,
-0.3500462770462036,
0.39075642824172974,
0.35495880246162415,
-0.04477781802415848,
-0.0437438078224659,
0.4166940748691559,
0.635319173336029,
-0.34569671750068665,
0.09949755668640137,
-0.10271666198968887,
-0.1569867730140686,
-0.011073690839111805,
0.5430943965911865,
-0.23431749641895294,
-0.13097791373729706,
-0.23895752429962158,
-0.04081762582063675,
-0.43089377880096436,
0.010813401080667973,
-0.3162982165813446,
0.45663073658943176,
-0.043222445994615555,
0.3627101182937622,
0.21050584316253662,
-0.18734930455684662,
-0.14413583278656006,
-0.25864914059638977,
0.17235061526298523,
0.36793357133865356,
-0.24718241393566132,
0.2187611609697342,
-0.126958429813385,
-0.1220230832695961,
-0.03625234216451645,
0.026031319051980972,
-0.24973955750465393,
-0.033390723168849945,
-0.05767792835831642,
0.1773061901330948,
0.06661427766084671,
-0.11354031413793564,
-0.07354700565338135,
-0.17366941273212433,
-0.1385808140039444,
-0.2681722044944763,
-0.0377182736992836,
0.1109214499592781,
-0.11599929630756378,
0.3531613349914551,
-0.17836593091487885,
0.23122578859329224,
0.3186763525009155,
-0.27000051736831665,
-0.10262239724397659,
0.03587157279253006,
0.2229628711938858,
0.060050833970308304,
0.004531959071755409,
-0.061556655913591385,
-0.27723655104637146,
0.11259152740240097,
0.16520315408706665,
0.25497496128082275,
0.20461730659008026,
-0.09999668598175049,
0.10917840152978897,
-0.04380663484334946,
0.20418405532836914,
0.10125570744276047,
-0.17187079787254333,
-0.0508287288248539,
0.06037340685725212,
-0.007623378187417984,
0.10062166303396225,
0.14499929547309875,
0.03886914625763893,
0.1252809762954712,
-0.08346397429704666,
0.275578111410141,
0.06655873358249664,
0.31139472126960754,
-0.3705076575279236,
0.04514239355921745,
0.41785621643066406,
-0.24107322096824646,
0.23508600890636444,
0.46401476860046387,
0.014799953438341618,
0.19304950535297394,
0.29070472717285156,
0.1093434989452362,
-0.11870165169239044,
0.32269638776779175,
0.39451682567596436,
0.8204314112663269,
0.5895959138870239,
0.08376955986022949,
0.27460289001464844,
0.09925687313079834,
-0.15360723435878754,
-0.20725123584270477,
0.23582398891448975,
0.39196836948394775,
0.018867086619138718,
0.18569326400756836,
-0.24079905450344086,
-0.4871237874031067,
0.2258823961019516,
0.12177469581365585,
-0.19461774826049805,
-0.0822235494852066,
-0.6648060083389282,
0.011875391006469727,
0.13582637906074524,
-0.1866595447063446,
-0.17971548438072205,
-0.050137732177972794,
0.22059080004692078,
0.259753555059433,
-0.10322070121765137,
-0.16091257333755493,
-0.17247425019741058,
0.0691012591123581,
0.03752928599715233,
-0.007329888176172972,
0.16975699365139008,
-0.13684619963169098,
0.16176092624664307,
0.24482418596744537,
0.1969079226255417,
0.28495338559150696,
0.4870798885822296,
-0.1681717336177826,
-0.15989352762699127,
-0.0105538135394454,
-0.1923658847808838,
0.08990129828453064,
0.06671170145273209,
0.031533826142549515,
-0.1532077044248581,
-0.014956250786781311,
0.008462578989565372,
0.03862797096371651,
0.031460441648960114,
-0.09408104419708252,
-0.2182597517967224,
0.16762492060661316,
0.3055749535560608,
-0.36377716064453125,
-0.149092897772789,
-0.0998985692858696,
-0.24665600061416626,
-0.34831011295318604,
-0.2655346989631653,
0.5327387452125549,
0.02789606899023056,
0.1280096471309662,
0.14216767251491547,
-0.0421595498919487,
0.048785898834466934,
0.15741202235221863,
-0.12155666947364807,
0.07757695764303207,
-0.15409377217292786,
0.1359657198190689,
-0.08580520004034042,
0.03191034495830536,
0.1184747964143753,
-0.3834478557109833,
-0.018849456682801247,
-0.03916439414024353,
0.24254173040390015,
0.0646749958395958,
0.20209015905857086,
-0.09834744036197662,
0.4987446963787079,
0.6146570444107056,
-0.1336156725883484,
-0.14148077368736267,
-0.13041949272155762,
0.37065139412879944,
0.07330852001905441,
-0.0774654895067215,
0.021921269595623016,
0.1024273931980133,
0.006506839767098427,
-0.3420654237270355,
-0.25549036264419556,
-0.019982242956757545,
0.3041453957557678,
0.35128292441368103,
0.09328830987215042,
0.32031315565109253,
-0.01922059804201126,
0.04841003194451332,
-0.24113398790359497,
0.050415195524692535,
-0.1276012361049652,
0.009670786559581757,
-0.022802725434303284,
0.5810166001319885,
-0.22440192103385925,
-0.05934266746044159,
-0.413650244474411,
0.42902642488479614,
0.09053132683038712,
-0.33885475993156433,
-0.08051957935094833,
0.3583999574184418,
-0.31732064485549927,
-0.2010880708694458,
0.22619470953941345,
0.4100223481655121,
0.15136000514030457,
0.19435739517211914,
-0.5254405736923218,
-0.4069116413593292,
0.44720226526260376,
-0.4417078197002411,
-0.5069124698638916,
0.02907452918589115,
-0.31339389085769653,
0.06790432333946228,
0.49642300605773926,
-0.4710500240325928,
-0.14913417398929596,
0.0015055608237162232,
-0.08082758635282516,
-0.09160450100898743,
-0.09819380193948746,
0.2610398828983307,
0.015110877342522144,
-0.2518463730812073,
0.17900733649730682,
0.1764504462480545,
-0.022816073149442673,
-0.42041611671447754,
-0.27535995841026306
] |
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.12737514078617096,
-0.35116562247276306,
-0.017932644113898277,
0.35360872745513916,
0.47600245475769043,
0.08871346712112427,
0.7330296635627747,
0.38043493032455444,
0.06552495807409286,
-0.0380423478782177,
-0.111153244972229,
0.3819507658481598,
-0.23296910524368286,
-0.33393433690071106,
0.03510892763733864,
-0.5614942312240601,
0.2225799858570099,
-0.09982758015394211,
-0.28079819679260254,
-0.06134718284010887,
-0.24313423037528992,
0.03548915311694145,
-0.21849742531776428,
-0.10849645733833313,
-0.5479354858398438,
0.044095996767282486,
-0.019555551931262016,
-0.07656887918710709,
-0.06229947507381439,
-0.13918043673038483,
0.12234672904014587,
-0.17449654638767242,
0.4444533586502075,
0.7012934684753418,
-0.00012770107423420995,
0.07030182331800461,
0.36427220702171326,
-0.17377832531929016,
0.04999925196170807,
-0.16101369261741638,
0.04004685580730438,
-0.2573828101158142,
0.07277636975049973,
-0.09468337148427963,
-0.22349399328231812,
-0.17084543406963348,
0.09591034799814224,
-0.17902971804141998,
-0.028141869232058525,
0.41916894912719727,
0.07712996751070023,
0.27901116013526917,
0.24666103720664978,
0.13863056898117065,
0.22781161963939667,
0.5182864665985107,
-0.2734379470348358,
-0.05611717700958252,
0.22615034878253937,
0.37547779083251953,
0.12400452792644501,
0.5647348761558533,
-0.2913348972797394,
-0.036233801394701004,
0.26694509387016296,
0.12900516390800476,
-0.10145501792430878,
-0.314005583524704,
0.04915720224380493,
0.08946330100297928,
0.42194420099258423,
-0.1494392454624176,
-0.08077910542488098,
-0.1436641365289688,
-0.14397795498371124,
-0.12738043069839478,
0.04059102386236191,
0.2803194522857666,
-0.07184098660945892,
-0.18723826110363007,
-0.539242684841156,
0.30529189109802246,
-0.14862369000911713,
0.2131589651107788,
-0.2805241644382477,
-0.0034206677228212357,
-0.13816316425800323,
0.2928087115287781,
-0.047119300812482834,
-0.11271274834871292,
0.19308078289031982,
-0.12341479957103729,
0.1300756186246872,
-0.009825528599321842,
-0.14363200962543488,
-0.053490735590457916,
-0.38959938287734985,
-0.31501221656799316,
-0.20014798641204834,
-0.1602649688720703,
0.16648538410663605,
0.13927580416202545,
-0.11639551818370819,
0.12807093560695648,
0.18263286352157593,
0.2680342197418213,
0.10578285157680511,
0.32070258259773254,
-0.085892453789711,
-0.2895815670490265,
-0.04691935330629349,
0.0877332016825676,
-0.29622682929039,
-0.4357525408267975,
0.1545342057943344,
0.32529687881469727,
0.24522154033184052,
0.06874307245016098,
0.12985509634017944,
-0.32394087314605713,
-0.10892301052808762,
-0.009586540050804615,
0.07522505521774292,
0.2850382328033447,
-0.11867921054363251,
0.24390484392642975,
0.48048296570777893,
0.39720281958580017,
-0.15381810069084167,
0.06956271827220917,
0.025072576478123665,
0.03152092918753624,
-0.44049566984176636,
-0.28569865226745605,
0.15340976417064667,
-0.11777324229478836,
0.10007024556398392,
0.037431828677654266,
0.04641568288207054,
0.10069649666547775,
0.07349668443202972,
-0.18586984276771545,
0.6246294975280762,
0.14764700829982758,
-0.19447416067123413,
0.2767931818962097,
0.270906537771225,
0.5297801494598389,
-0.304298460483551,
0.25653156638145447,
-0.5095698833465576,
0.065252885222435,
-0.023091433569788933,
-0.014543901197612286,
0.2186548262834549,
-0.020721858367323875,
-0.2121620923280716,
0.015829231590032578,
0.592312216758728,
-0.08367802947759628,
0.27348771691322327,
-0.5791622996330261,
0.09496430307626724,
-0.19133509695529938,
0.0341525562107563,
0.06366927176713943,
-0.20471520721912384,
-0.05235873907804489,
0.38634389638900757,
0.09194979816675186,
0.31545889377593994,
0.16028234362602234,
0.05108339339494705,
0.07987046986818314,
-0.225352942943573,
-0.23505039513111115,
0.3363233506679535,
-0.3768564462661743,
0.09203807264566422,
-0.01769321784377098,
0.09387896209955215,
-0.06380388885736465,
0.11201920360326767,
0.3361777365207672,
0.03260112181305885,
-0.12800149619579315,
0.029448654502630234,
0.1963149607181549,
-0.16618236899375916,
0.1402868926525116,
0.07735977321863174,
0.1913028061389923,
0.1933746337890625,
0.03500613570213318,
-0.01568373665213585,
0.20765338838100433,
-0.2216716706752777,
0.17757616937160492,
-0.05428053066134453,
-0.0747133418917656,
0.07117719948291779,
0.040378037840127945,
-0.3698902428150177,
-0.012196831405162811,
-0.04746969789266586,
0.1864665299654007,
-0.23310033977031708,
-0.04872112721204758,
0.023635009303689003,
0.08221708983182907,
0.05827915668487549,
0.047924596816301346,
0.0049781715497374535,
-0.1919565051794052,
-0.18220600485801697,
-0.13902734220027924,
-0.0032421820797026157,
0.09221033751964569,
-0.2094767987728119,
-0.2617241442203522,
-0.052343688905239105,
-0.12324901670217514,
0.17830416560173035,
0.058837827295064926,
-0.35903677344322205,
0.051025453954935074,
0.019273776561021805,
-0.36533042788505554,
-0.2013598531484604,
0.17339256405830383,
0.26766902208328247,
-0.09962092339992523,
-0.04223461076617241,
0.19160310924053192,
0.06328868865966797,
0.1146329939365387,
-0.5482741594314575,
0.0834660679101944,
0.17784197628498077,
-0.24697020649909973,
0.2043912559747696,
0.2162797600030899,
0.14853379130363464,
-0.2755032777786255,
-0.19603493809700012,
0.43878665566444397,
0.16041062772274017,
0.3159129023551941,
-0.3300256133079529,
0.11610186100006104,
-0.07264672964811325,
-0.03940204530954361,
-0.19063358008861542,
-0.040808115154504776,
-0.27728158235549927,
0.07302392274141312,
-0.1318594217300415,
0.012982288375496864,
-0.45691895484924316,
-0.04493600130081177,
0.29626211524009705,
0.08876395225524902,
0.1758720725774765,
-0.0012163631618022919,
-0.3998461067676544,
0.21331210434436798,
0.17712657153606415,
-0.6013535261154175,
0.2978383004665375,
-0.00436173053458333,
0.18920734524726868,
-0.10501883924007416,
0.09558358788490295,
-0.1625431478023529,
0.24844472110271454,
0.11404215544462204,
0.09074815362691879,
-0.19946475327014923,
0.14185214042663574,
-0.10792585462331772,
0.02684636600315571,
0.026369821280241013,
-0.140628844499588,
-0.23369300365447998,
-0.3589506447315216,
0.27138257026672363,
-0.16618312895298004,
-0.13451862335205078,
-0.40185463428497314,
-0.2621859610080719,
0.03605636954307556,
-0.07400504499673843,
-0.08233371376991272,
0.1507578194141388,
0.18556810915470123,
0.19043487310409546,
0.2634179890155792,
-0.1818944662809372,
0.37431609630584717,
-0.41302919387817383,
-0.03535478934645653,
-0.07500974833965302,
-0.2867960035800934,
-0.09916486591100693,
0.08965590596199036,
-0.5234113335609436,
0.09148448705673218,
-0.2289898842573166,
-0.09319096803665161,
-0.250175803899765,
0.013548125512897968,
0.14182229340076447,
-0.2678501605987549,
-0.28500300645828247,
0.308591365814209,
0.1939285695552826,
-0.14248229563236237,
0.04066231846809387,
0.2663511037826538,
0.010307513177394867,
0.04690111428499222,
0.15378358960151672,
-0.08961997926235199,
0.11656028032302856,
-0.06329821795225143,
-0.17674081027507782,
-0.09661802649497986,
-0.07506143301725388,
-0.07041662931442261,
-0.021759675815701485,
0.06337695568799973,
0.3462585210800171,
0.37218356132507324,
-0.08989036083221436,
-0.052042409777641296,
0.035609036684036255,
0.06296498328447342,
-0.39768779277801514,
0.5225028991699219,
-0.22615419328212738,
-0.36082586646080017,
0.11920181661844254,
0.023855721578001976,
0.06514710932970047,
0.48626869916915894,
0.06052284687757492,
0.049731604754924774,
0.011782478541135788,
-0.07894466072320938,
0.25259289145469666,
0.22119715809822083,
0.35102036595344543,
-0.09112486988306046,
0.01916578784584999,
-0.16470715403556824,
0.015416686423122883,
-0.10187187790870667,
-0.06325501948595047,
0.6088862419128418,
0.1850840449333191,
0.2399427741765976,
0.09925858676433563,
0.6996651291847229,
-0.06113724410533905,
-0.7380952835083008,
0.21680672466754913,
-0.2425099015235901,
0.1921670287847519,
-0.11812160909175873,
-0.3539586663246155,
0.3988560438156128,
-0.20941969752311707,
0.06437364965677261,
-0.08596715331077576,
-0.024906951934099197,
-0.2391577512025833,
-0.09022432565689087,
0.3573607802391052,
-0.3172069191932678,
-0.15857398509979248,
0.4044302701950073,
-0.14470256865024567,
0.27637311816215515,
-0.23134253919124603,
0.3245902359485626,
-0.26092609763145447,
-0.21379277110099792,
0.060056984424591064,
0.44877177476882935,
0.13851357996463776,
0.04172460362315178,
-0.3342844247817993,
-0.21669700741767883,
-0.14322705566883087,
0.35682761669158936,
0.11957734078168869,
0.5672699809074402,
-0.09803595393896103,
-0.07446511834859848,
0.10155639052391052,
0.24136953055858612,
0.8307592272758484,
0.045557230710983276,
-0.0904591903090477,
0.15144191682338715,
-0.34783491492271423,
-0.45497825741767883,
-0.102229043841362,
-0.051417913287878036,
0.09068144112825394,
0.17169053852558136,
0.12038647383451462,
-0.09105323255062103,
-0.18333399295806885,
-0.005832506809383631,
0.19555510580539703,
-0.055124957114458084,
0.03471889719367027,
-0.22691141068935394,
0.05875765159726143,
-0.12964999675750732,
-0.15528330206871033,
0.22118236124515533,
0.029675418511033058,
0.00516205420717597,
-0.3081282079219818,
-0.3262302577495575,
-0.1266998052597046,
0.18248215317726135,
-0.1330121010541916,
0.4110669791698456,
0.09925137460231781,
-0.17808538675308228,
0.07690707594156265,
0.5561061501502991,
0.4184044897556305,
-0.03893916308879852,
-0.11877360939979553,
0.08064387738704681,
0.2931108772754669,
0.10643281042575836,
0.3002045154571533,
0.32082387804985046,
-0.06187281012535095,
-0.43966391682624817,
-0.22684866189956665,
-0.1938147395849228,
-0.33053264021873474,
0.3972931206226349,
0.4080631732940674,
0.09893536567687988,
-0.49535563588142395,
-0.49217092990875244,
0.3861899673938751,
0.29371947050094604,
0.19583043456077576,
0.20459184050559998,
-0.5417590737342834,
-0.40096724033355713,
0.07817858457565308,
0.46624189615249634,
0.8556229472160339,
-0.0370788499712944,
0.3702828288078308,
0.03156561404466629,
0.010807035490870476,
0.17210228741168976,
-0.001889070263132453,
0.4117945730686188,
-0.35428154468536377,
0.13928939402103424,
-0.1648537963628769,
-0.31254979968070984,
0.2525227963924408,
-0.06020328402519226,
-0.2439698874950409,
0.04253644496202469,
-0.3494715094566345,
0.19361983239650726,
-0.12569352984428406,
-0.08285321295261383,
-0.04982635751366615,
-0.471417635679245,
0.18787378072738647,
0.015452072955667973,
-0.08251318335533142,
0.26173895597457886,
0.11116104573011398,
-0.16362063586711884,
-0.3798603415489197,
0.06169583275914192,
-0.07622244954109192,
-0.015011891722679138,
-0.24596944451332092,
-0.16324317455291748,
-0.024310344830155373,
-0.7298661470413208,
0.058679886162281036,
0.4961579442024231,
0.3345544934272766,
-0.160566508769989,
-0.04783676192164421,
0.13964155316352844,
0.44384729862213135,
0.16290026903152466,
-0.0990171730518341,
-0.3401840925216675,
0.28534069657325745,
0.0973755419254303,
0.18433213233947754,
0.10863812267780304,
0.06814854592084885,
0.21052049100399017,
-0.5777892470359802,
0.03725123777985573,
0.3060290813446045,
-0.3449511229991913,
-0.3229847550392151,
-0.19845038652420044,
0.04918491840362549,
0.03816332668066025,
0.028618456795811653,
0.12448917329311371,
-0.03890300542116165,
0.20724327862262726,
-0.041512202471494675,
-0.22646154463291168,
0.13288986682891846,
0.45233115553855896,
0.11298368126153946,
-0.3500462770462036,
0.39075642824172974,
0.35495880246162415,
-0.04477781802415848,
-0.0437438078224659,
0.4166940748691559,
0.635319173336029,
-0.34569671750068665,
0.09949755668640137,
-0.10271666198968887,
-0.1569867730140686,
-0.011073690839111805,
0.5430943965911865,
-0.23431749641895294,
-0.13097791373729706,
-0.23895752429962158,
-0.04081762582063675,
-0.43089377880096436,
0.010813401080667973,
-0.3162982165813446,
0.45663073658943176,
-0.043222445994615555,
0.3627101182937622,
0.21050584316253662,
-0.18734930455684662,
-0.14413583278656006,
-0.25864914059638977,
0.17235061526298523,
0.36793357133865356,
-0.24718241393566132,
0.2187611609697342,
-0.126958429813385,
-0.1220230832695961,
-0.03625234216451645,
0.026031319051980972,
-0.24973955750465393,
-0.033390723168849945,
-0.05767792835831642,
0.1773061901330948,
0.06661427766084671,
-0.11354031413793564,
-0.07354700565338135,
-0.17366941273212433,
-0.1385808140039444,
-0.2681722044944763,
-0.0377182736992836,
0.1109214499592781,
-0.11599929630756378,
0.3531613349914551,
-0.17836593091487885,
0.23122578859329224,
0.3186763525009155,
-0.27000051736831665,
-0.10262239724397659,
0.03587157279253006,
0.2229628711938858,
0.060050833970308304,
0.004531959071755409,
-0.061556655913591385,
-0.27723655104637146,
0.11259152740240097,
0.16520315408706665,
0.25497496128082275,
0.20461730659008026,
-0.09999668598175049,
0.10917840152978897,
-0.04380663484334946,
0.20418405532836914,
0.10125570744276047,
-0.17187079787254333,
-0.0508287288248539,
0.06037340685725212,
-0.007623378187417984,
0.10062166303396225,
0.14499929547309875,
0.03886914625763893,
0.1252809762954712,
-0.08346397429704666,
0.275578111410141,
0.06655873358249664,
0.31139472126960754,
-0.3705076575279236,
0.04514239355921745,
0.41785621643066406,
-0.24107322096824646,
0.23508600890636444,
0.46401476860046387,
0.014799953438341618,
0.19304950535297394,
0.29070472717285156,
0.1093434989452362,
-0.11870165169239044,
0.32269638776779175,
0.39451682567596436,
0.8204314112663269,
0.5895959138870239,
0.08376955986022949,
0.27460289001464844,
0.09925687313079834,
-0.15360723435878754,
-0.20725123584270477,
0.23582398891448975,
0.39196836948394775,
0.018867086619138718,
0.18569326400756836,
-0.24079905450344086,
-0.4871237874031067,
0.2258823961019516,
0.12177469581365585,
-0.19461774826049805,
-0.0822235494852066,
-0.6648060083389282,
0.011875391006469727,
0.13582637906074524,
-0.1866595447063446,
-0.17971548438072205,
-0.050137732177972794,
0.22059080004692078,
0.259753555059433,
-0.10322070121765137,
-0.16091257333755493,
-0.17247425019741058,
0.0691012591123581,
0.03752928599715233,
-0.007329888176172972,
0.16975699365139008,
-0.13684619963169098,
0.16176092624664307,
0.24482418596744537,
0.1969079226255417,
0.28495338559150696,
0.4870798885822296,
-0.1681717336177826,
-0.15989352762699127,
-0.0105538135394454,
-0.1923658847808838,
0.08990129828453064,
0.06671170145273209,
0.031533826142549515,
-0.1532077044248581,
-0.014956250786781311,
0.008462578989565372,
0.03862797096371651,
0.031460441648960114,
-0.09408104419708252,
-0.2182597517967224,
0.16762492060661316,
0.3055749535560608,
-0.36377716064453125,
-0.149092897772789,
-0.0998985692858696,
-0.24665600061416626,
-0.34831011295318604,
-0.2655346989631653,
0.5327387452125549,
0.02789606899023056,
0.1280096471309662,
0.14216767251491547,
-0.0421595498919487,
0.048785898834466934,
0.15741202235221863,
-0.12155666947364807,
0.07757695764303207,
-0.15409377217292786,
0.1359657198190689,
-0.08580520004034042,
0.03191034495830536,
0.1184747964143753,
-0.3834478557109833,
-0.018849456682801247,
-0.03916439414024353,
0.24254173040390015,
0.0646749958395958,
0.20209015905857086,
-0.09834744036197662,
0.4987446963787079,
0.6146570444107056,
-0.1336156725883484,
-0.14148077368736267,
-0.13041949272155762,
0.37065139412879944,
0.07330852001905441,
-0.0774654895067215,
0.021921269595623016,
0.1024273931980133,
0.006506839767098427,
-0.3420654237270355,
-0.25549036264419556,
-0.019982242956757545,
0.3041453957557678,
0.35128292441368103,
0.09328830987215042,
0.32031315565109253,
-0.01922059804201126,
0.04841003194451332,
-0.24113398790359497,
0.050415195524692535,
-0.1276012361049652,
0.009670786559581757,
-0.022802725434303284,
0.5810166001319885,
-0.22440192103385925,
-0.05934266746044159,
-0.413650244474411,
0.42902642488479614,
0.09053132683038712,
-0.33885475993156433,
-0.08051957935094833,
0.3583999574184418,
-0.31732064485549927,
-0.2010880708694458,
0.22619470953941345,
0.4100223481655121,
0.15136000514030457,
0.19435739517211914,
-0.5254405736923218,
-0.4069116413593292,
0.44720226526260376,
-0.4417078197002411,
-0.5069124698638916,
0.02907452918589115,
-0.31339389085769653,
0.06790432333946228,
0.49642300605773926,
-0.4710500240325928,
-0.14913417398929596,
0.0015055608237162232,
-0.08082758635282516,
-0.09160450100898743,
-0.09819380193948746,
0.2610398828983307,
0.015110877342522144,
-0.2518463730812073,
0.17900733649730682,
0.1764504462480545,
-0.022816073149442673,
-0.42041611671447754,
-0.27535995841026306
] |
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.12737514078617096,
-0.35116562247276306,
-0.017932644113898277,
0.35360872745513916,
0.47600245475769043,
0.08871346712112427,
0.7330296635627747,
0.38043493032455444,
0.06552495807409286,
-0.0380423478782177,
-0.111153244972229,
0.3819507658481598,
-0.23296910524368286,
-0.33393433690071106,
0.03510892763733864,
-0.5614942312240601,
0.2225799858570099,
-0.09982758015394211,
-0.28079819679260254,
-0.06134718284010887,
-0.24313423037528992,
0.03548915311694145,
-0.21849742531776428,
-0.10849645733833313,
-0.5479354858398438,
0.044095996767282486,
-0.019555551931262016,
-0.07656887918710709,
-0.06229947507381439,
-0.13918043673038483,
0.12234672904014587,
-0.17449654638767242,
0.4444533586502075,
0.7012934684753418,
-0.00012770107423420995,
0.07030182331800461,
0.36427220702171326,
-0.17377832531929016,
0.04999925196170807,
-0.16101369261741638,
0.04004685580730438,
-0.2573828101158142,
0.07277636975049973,
-0.09468337148427963,
-0.22349399328231812,
-0.17084543406963348,
0.09591034799814224,
-0.17902971804141998,
-0.028141869232058525,
0.41916894912719727,
0.07712996751070023,
0.27901116013526917,
0.24666103720664978,
0.13863056898117065,
0.22781161963939667,
0.5182864665985107,
-0.2734379470348358,
-0.05611717700958252,
0.22615034878253937,
0.37547779083251953,
0.12400452792644501,
0.5647348761558533,
-0.2913348972797394,
-0.036233801394701004,
0.26694509387016296,
0.12900516390800476,
-0.10145501792430878,
-0.314005583524704,
0.04915720224380493,
0.08946330100297928,
0.42194420099258423,
-0.1494392454624176,
-0.08077910542488098,
-0.1436641365289688,
-0.14397795498371124,
-0.12738043069839478,
0.04059102386236191,
0.2803194522857666,
-0.07184098660945892,
-0.18723826110363007,
-0.539242684841156,
0.30529189109802246,
-0.14862369000911713,
0.2131589651107788,
-0.2805241644382477,
-0.0034206677228212357,
-0.13816316425800323,
0.2928087115287781,
-0.047119300812482834,
-0.11271274834871292,
0.19308078289031982,
-0.12341479957103729,
0.1300756186246872,
-0.009825528599321842,
-0.14363200962543488,
-0.053490735590457916,
-0.38959938287734985,
-0.31501221656799316,
-0.20014798641204834,
-0.1602649688720703,
0.16648538410663605,
0.13927580416202545,
-0.11639551818370819,
0.12807093560695648,
0.18263286352157593,
0.2680342197418213,
0.10578285157680511,
0.32070258259773254,
-0.085892453789711,
-0.2895815670490265,
-0.04691935330629349,
0.0877332016825676,
-0.29622682929039,
-0.4357525408267975,
0.1545342057943344,
0.32529687881469727,
0.24522154033184052,
0.06874307245016098,
0.12985509634017944,
-0.32394087314605713,
-0.10892301052808762,
-0.009586540050804615,
0.07522505521774292,
0.2850382328033447,
-0.11867921054363251,
0.24390484392642975,
0.48048296570777893,
0.39720281958580017,
-0.15381810069084167,
0.06956271827220917,
0.025072576478123665,
0.03152092918753624,
-0.44049566984176636,
-0.28569865226745605,
0.15340976417064667,
-0.11777324229478836,
0.10007024556398392,
0.037431828677654266,
0.04641568288207054,
0.10069649666547775,
0.07349668443202972,
-0.18586984276771545,
0.6246294975280762,
0.14764700829982758,
-0.19447416067123413,
0.2767931818962097,
0.270906537771225,
0.5297801494598389,
-0.304298460483551,
0.25653156638145447,
-0.5095698833465576,
0.065252885222435,
-0.023091433569788933,
-0.014543901197612286,
0.2186548262834549,
-0.020721858367323875,
-0.2121620923280716,
0.015829231590032578,
0.592312216758728,
-0.08367802947759628,
0.27348771691322327,
-0.5791622996330261,
0.09496430307626724,
-0.19133509695529938,
0.0341525562107563,
0.06366927176713943,
-0.20471520721912384,
-0.05235873907804489,
0.38634389638900757,
0.09194979816675186,
0.31545889377593994,
0.16028234362602234,
0.05108339339494705,
0.07987046986818314,
-0.225352942943573,
-0.23505039513111115,
0.3363233506679535,
-0.3768564462661743,
0.09203807264566422,
-0.01769321784377098,
0.09387896209955215,
-0.06380388885736465,
0.11201920360326767,
0.3361777365207672,
0.03260112181305885,
-0.12800149619579315,
0.029448654502630234,
0.1963149607181549,
-0.16618236899375916,
0.1402868926525116,
0.07735977321863174,
0.1913028061389923,
0.1933746337890625,
0.03500613570213318,
-0.01568373665213585,
0.20765338838100433,
-0.2216716706752777,
0.17757616937160492,
-0.05428053066134453,
-0.0747133418917656,
0.07117719948291779,
0.040378037840127945,
-0.3698902428150177,
-0.012196831405162811,
-0.04746969789266586,
0.1864665299654007,
-0.23310033977031708,
-0.04872112721204758,
0.023635009303689003,
0.08221708983182907,
0.05827915668487549,
0.047924596816301346,
0.0049781715497374535,
-0.1919565051794052,
-0.18220600485801697,
-0.13902734220027924,
-0.0032421820797026157,
0.09221033751964569,
-0.2094767987728119,
-0.2617241442203522,
-0.052343688905239105,
-0.12324901670217514,
0.17830416560173035,
0.058837827295064926,
-0.35903677344322205,
0.051025453954935074,
0.019273776561021805,
-0.36533042788505554,
-0.2013598531484604,
0.17339256405830383,
0.26766902208328247,
-0.09962092339992523,
-0.04223461076617241,
0.19160310924053192,
0.06328868865966797,
0.1146329939365387,
-0.5482741594314575,
0.0834660679101944,
0.17784197628498077,
-0.24697020649909973,
0.2043912559747696,
0.2162797600030899,
0.14853379130363464,
-0.2755032777786255,
-0.19603493809700012,
0.43878665566444397,
0.16041062772274017,
0.3159129023551941,
-0.3300256133079529,
0.11610186100006104,
-0.07264672964811325,
-0.03940204530954361,
-0.19063358008861542,
-0.040808115154504776,
-0.27728158235549927,
0.07302392274141312,
-0.1318594217300415,
0.012982288375496864,
-0.45691895484924316,
-0.04493600130081177,
0.29626211524009705,
0.08876395225524902,
0.1758720725774765,
-0.0012163631618022919,
-0.3998461067676544,
0.21331210434436798,
0.17712657153606415,
-0.6013535261154175,
0.2978383004665375,
-0.00436173053458333,
0.18920734524726868,
-0.10501883924007416,
0.09558358788490295,
-0.1625431478023529,
0.24844472110271454,
0.11404215544462204,
0.09074815362691879,
-0.19946475327014923,
0.14185214042663574,
-0.10792585462331772,
0.02684636600315571,
0.026369821280241013,
-0.140628844499588,
-0.23369300365447998,
-0.3589506447315216,
0.27138257026672363,
-0.16618312895298004,
-0.13451862335205078,
-0.40185463428497314,
-0.2621859610080719,
0.03605636954307556,
-0.07400504499673843,
-0.08233371376991272,
0.1507578194141388,
0.18556810915470123,
0.19043487310409546,
0.2634179890155792,
-0.1818944662809372,
0.37431609630584717,
-0.41302919387817383,
-0.03535478934645653,
-0.07500974833965302,
-0.2867960035800934,
-0.09916486591100693,
0.08965590596199036,
-0.5234113335609436,
0.09148448705673218,
-0.2289898842573166,
-0.09319096803665161,
-0.250175803899765,
0.013548125512897968,
0.14182229340076447,
-0.2678501605987549,
-0.28500300645828247,
0.308591365814209,
0.1939285695552826,
-0.14248229563236237,
0.04066231846809387,
0.2663511037826538,
0.010307513177394867,
0.04690111428499222,
0.15378358960151672,
-0.08961997926235199,
0.11656028032302856,
-0.06329821795225143,
-0.17674081027507782,
-0.09661802649497986,
-0.07506143301725388,
-0.07041662931442261,
-0.021759675815701485,
0.06337695568799973,
0.3462585210800171,
0.37218356132507324,
-0.08989036083221436,
-0.052042409777641296,
0.035609036684036255,
0.06296498328447342,
-0.39768779277801514,
0.5225028991699219,
-0.22615419328212738,
-0.36082586646080017,
0.11920181661844254,
0.023855721578001976,
0.06514710932970047,
0.48626869916915894,
0.06052284687757492,
0.049731604754924774,
0.011782478541135788,
-0.07894466072320938,
0.25259289145469666,
0.22119715809822083,
0.35102036595344543,
-0.09112486988306046,
0.01916578784584999,
-0.16470715403556824,
0.015416686423122883,
-0.10187187790870667,
-0.06325501948595047,
0.6088862419128418,
0.1850840449333191,
0.2399427741765976,
0.09925858676433563,
0.6996651291847229,
-0.06113724410533905,
-0.7380952835083008,
0.21680672466754913,
-0.2425099015235901,
0.1921670287847519,
-0.11812160909175873,
-0.3539586663246155,
0.3988560438156128,
-0.20941969752311707,
0.06437364965677261,
-0.08596715331077576,
-0.024906951934099197,
-0.2391577512025833,
-0.09022432565689087,
0.3573607802391052,
-0.3172069191932678,
-0.15857398509979248,
0.4044302701950073,
-0.14470256865024567,
0.27637311816215515,
-0.23134253919124603,
0.3245902359485626,
-0.26092609763145447,
-0.21379277110099792,
0.060056984424591064,
0.44877177476882935,
0.13851357996463776,
0.04172460362315178,
-0.3342844247817993,
-0.21669700741767883,
-0.14322705566883087,
0.35682761669158936,
0.11957734078168869,
0.5672699809074402,
-0.09803595393896103,
-0.07446511834859848,
0.10155639052391052,
0.24136953055858612,
0.8307592272758484,
0.045557230710983276,
-0.0904591903090477,
0.15144191682338715,
-0.34783491492271423,
-0.45497825741767883,
-0.102229043841362,
-0.051417913287878036,
0.09068144112825394,
0.17169053852558136,
0.12038647383451462,
-0.09105323255062103,
-0.18333399295806885,
-0.005832506809383631,
0.19555510580539703,
-0.055124957114458084,
0.03471889719367027,
-0.22691141068935394,
0.05875765159726143,
-0.12964999675750732,
-0.15528330206871033,
0.22118236124515533,
0.029675418511033058,
0.00516205420717597,
-0.3081282079219818,
-0.3262302577495575,
-0.1266998052597046,
0.18248215317726135,
-0.1330121010541916,
0.4110669791698456,
0.09925137460231781,
-0.17808538675308228,
0.07690707594156265,
0.5561061501502991,
0.4184044897556305,
-0.03893916308879852,
-0.11877360939979553,
0.08064387738704681,
0.2931108772754669,
0.10643281042575836,
0.3002045154571533,
0.32082387804985046,
-0.06187281012535095,
-0.43966391682624817,
-0.22684866189956665,
-0.1938147395849228,
-0.33053264021873474,
0.3972931206226349,
0.4080631732940674,
0.09893536567687988,
-0.49535563588142395,
-0.49217092990875244,
0.3861899673938751,
0.29371947050094604,
0.19583043456077576,
0.20459184050559998,
-0.5417590737342834,
-0.40096724033355713,
0.07817858457565308,
0.46624189615249634,
0.8556229472160339,
-0.0370788499712944,
0.3702828288078308,
0.03156561404466629,
0.010807035490870476,
0.17210228741168976,
-0.001889070263132453,
0.4117945730686188,
-0.35428154468536377,
0.13928939402103424,
-0.1648537963628769,
-0.31254979968070984,
0.2525227963924408,
-0.06020328402519226,
-0.2439698874950409,
0.04253644496202469,
-0.3494715094566345,
0.19361983239650726,
-0.12569352984428406,
-0.08285321295261383,
-0.04982635751366615,
-0.471417635679245,
0.18787378072738647,
0.015452072955667973,
-0.08251318335533142,
0.26173895597457886,
0.11116104573011398,
-0.16362063586711884,
-0.3798603415489197,
0.06169583275914192,
-0.07622244954109192,
-0.015011891722679138,
-0.24596944451332092,
-0.16324317455291748,
-0.024310344830155373,
-0.7298661470413208,
0.058679886162281036,
0.4961579442024231,
0.3345544934272766,
-0.160566508769989,
-0.04783676192164421,
0.13964155316352844,
0.44384729862213135,
0.16290026903152466,
-0.0990171730518341,
-0.3401840925216675,
0.28534069657325745,
0.0973755419254303,
0.18433213233947754,
0.10863812267780304,
0.06814854592084885,
0.21052049100399017,
-0.5777892470359802,
0.03725123777985573,
0.3060290813446045,
-0.3449511229991913,
-0.3229847550392151,
-0.19845038652420044,
0.04918491840362549,
0.03816332668066025,
0.028618456795811653,
0.12448917329311371,
-0.03890300542116165,
0.20724327862262726,
-0.041512202471494675,
-0.22646154463291168,
0.13288986682891846,
0.45233115553855896,
0.11298368126153946,
-0.3500462770462036,
0.39075642824172974,
0.35495880246162415,
-0.04477781802415848,
-0.0437438078224659,
0.4166940748691559,
0.635319173336029,
-0.34569671750068665,
0.09949755668640137,
-0.10271666198968887,
-0.1569867730140686,
-0.011073690839111805,
0.5430943965911865,
-0.23431749641895294,
-0.13097791373729706,
-0.23895752429962158,
-0.04081762582063675,
-0.43089377880096436,
0.010813401080667973,
-0.3162982165813446,
0.45663073658943176,
-0.043222445994615555,
0.3627101182937622,
0.21050584316253662,
-0.18734930455684662,
-0.14413583278656006,
-0.25864914059638977,
0.17235061526298523,
0.36793357133865356,
-0.24718241393566132,
0.2187611609697342,
-0.126958429813385,
-0.1220230832695961,
-0.03625234216451645,
0.026031319051980972,
-0.24973955750465393,
-0.033390723168849945,
-0.05767792835831642,
0.1773061901330948,
0.06661427766084671,
-0.11354031413793564,
-0.07354700565338135,
-0.17366941273212433,
-0.1385808140039444,
-0.2681722044944763,
-0.0377182736992836,
0.1109214499592781,
-0.11599929630756378,
0.3531613349914551,
-0.17836593091487885,
0.23122578859329224,
0.3186763525009155,
-0.27000051736831665,
-0.10262239724397659,
0.03587157279253006,
0.2229628711938858,
0.060050833970308304,
0.004531959071755409,
-0.061556655913591385,
-0.27723655104637146,
0.11259152740240097,
0.16520315408706665,
0.25497496128082275,
0.20461730659008026,
-0.09999668598175049,
0.10917840152978897,
-0.04380663484334946,
0.20418405532836914,
0.10125570744276047,
-0.17187079787254333,
-0.0508287288248539,
0.06037340685725212,
-0.007623378187417984,
0.10062166303396225,
0.14499929547309875,
0.03886914625763893,
0.1252809762954712,
-0.08346397429704666,
0.275578111410141,
0.06655873358249664,
0.31139472126960754,
-0.3705076575279236,
0.04514239355921745,
0.41785621643066406,
-0.24107322096824646,
0.23508600890636444,
0.46401476860046387,
0.014799953438341618,
0.19304950535297394,
0.29070472717285156,
0.1093434989452362,
-0.11870165169239044,
0.32269638776779175,
0.39451682567596436,
0.8204314112663269,
0.5895959138870239,
0.08376955986022949,
0.27460289001464844,
0.09925687313079834,
-0.15360723435878754,
-0.20725123584270477,
0.23582398891448975,
0.39196836948394775,
0.018867086619138718,
0.18569326400756836,
-0.24079905450344086,
-0.4871237874031067,
0.2258823961019516,
0.12177469581365585,
-0.19461774826049805,
-0.0822235494852066,
-0.6648060083389282,
0.011875391006469727,
0.13582637906074524,
-0.1866595447063446,
-0.17971548438072205,
-0.050137732177972794,
0.22059080004692078,
0.259753555059433,
-0.10322070121765137,
-0.16091257333755493,
-0.17247425019741058,
0.0691012591123581,
0.03752928599715233,
-0.007329888176172972,
0.16975699365139008,
-0.13684619963169098,
0.16176092624664307,
0.24482418596744537,
0.1969079226255417,
0.28495338559150696,
0.4870798885822296,
-0.1681717336177826,
-0.15989352762699127,
-0.0105538135394454,
-0.1923658847808838,
0.08990129828453064,
0.06671170145273209,
0.031533826142549515,
-0.1532077044248581,
-0.014956250786781311,
0.008462578989565372,
0.03862797096371651,
0.031460441648960114,
-0.09408104419708252,
-0.2182597517967224,
0.16762492060661316,
0.3055749535560608,
-0.36377716064453125,
-0.149092897772789,
-0.0998985692858696,
-0.24665600061416626,
-0.34831011295318604,
-0.2655346989631653,
0.5327387452125549,
0.02789606899023056,
0.1280096471309662,
0.14216767251491547,
-0.0421595498919487,
0.048785898834466934,
0.15741202235221863,
-0.12155666947364807,
0.07757695764303207,
-0.15409377217292786,
0.1359657198190689,
-0.08580520004034042,
0.03191034495830536,
0.1184747964143753,
-0.3834478557109833,
-0.018849456682801247,
-0.03916439414024353,
0.24254173040390015,
0.0646749958395958,
0.20209015905857086,
-0.09834744036197662,
0.4987446963787079,
0.6146570444107056,
-0.1336156725883484,
-0.14148077368736267,
-0.13041949272155762,
0.37065139412879944,
0.07330852001905441,
-0.0774654895067215,
0.021921269595623016,
0.1024273931980133,
0.006506839767098427,
-0.3420654237270355,
-0.25549036264419556,
-0.019982242956757545,
0.3041453957557678,
0.35128292441368103,
0.09328830987215042,
0.32031315565109253,
-0.01922059804201126,
0.04841003194451332,
-0.24113398790359497,
0.050415195524692535,
-0.1276012361049652,
0.009670786559581757,
-0.022802725434303284,
0.5810166001319885,
-0.22440192103385925,
-0.05934266746044159,
-0.413650244474411,
0.42902642488479614,
0.09053132683038712,
-0.33885475993156433,
-0.08051957935094833,
0.3583999574184418,
-0.31732064485549927,
-0.2010880708694458,
0.22619470953941345,
0.4100223481655121,
0.15136000514030457,
0.19435739517211914,
-0.5254405736923218,
-0.4069116413593292,
0.44720226526260376,
-0.4417078197002411,
-0.5069124698638916,
0.02907452918589115,
-0.31339389085769653,
0.06790432333946228,
0.49642300605773926,
-0.4710500240325928,
-0.14913417398929596,
0.0015055608237162232,
-0.08082758635282516,
-0.09160450100898743,
-0.09819380193948746,
0.2610398828983307,
0.015110877342522144,
-0.2518463730812073,
0.17900733649730682,
0.1764504462480545,
-0.022816073149442673,
-0.42041611671447754,
-0.27535995841026306
] |
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.047096025198698044,
-0.37092748284339905,
-0.03963596001267433,
0.27061203122138977,
0.23185200989246368,
-0.05729660764336586,
0.24660848081111908,
0.11494968086481094,
-0.04178229719400406,
0.19841821491718292,
0.17326201498508453,
0.1642705500125885,
-0.11991792172193527,
0.36888185143470764,
0.1807008683681488,
0.13822759687900543,
-0.08521217852830887,
-0.12966525554656982,
-0.3972432315349579,
0.29834941029548645,
0.13171163201332092,
0.1694650799036026,
0.37293368577957153,
0.4860753118991852,
-0.5674235820770264,
-0.027585037052631378,
0.24089959263801575,
-0.08200608193874359,
-0.23197618126869202,
-0.5787138938903809,
0.0741453468799591,
0.13434845209121704,
0.1837681233882904,
0.17994172871112823,
-0.0001180599065264687,
0.14495304226875305,
0.4684005081653595,
0.20608174800872803,
-0.6819634437561035,
-0.08562353998422623,
-0.1658635288476944,
-0.12799042463302612,
0.32081320881843567,
-0.06907768547534943,
0.13178707659244537,
-0.2993813455104828,
0.28404369950294495,
-0.3241889178752899,
0.14001378417015076,
0.4661124348640442,
0.17689348757266998,
0.22324815392494202,
0.03552770987153053,
0.29634928703308105,
0.22461934387683868,
0.305703729391098,
-0.06427442282438278,
0.022516926750540733,
0.24906393885612488,
0.5164732933044434,
-0.046682704240083694,
0.3044886589050293,
-0.10971279442310333,
-0.3461032807826996,
0.1512938141822815,
0.18338796496391296,
0.19945482909679413,
-0.21522943675518036,
0.13400618731975555,
0.013458536937832832,
0.5597182512283325,
-0.4376446306705475,
-0.1601393222808838,
-0.23998095095157623,
-0.13393330574035645,
-0.14320389926433563,
0.22944124042987823,
0.12060593068599701,
-0.28087323904037476,
0.49994030594825745,
-0.3562498390674591,
-0.3182743191719055,
-0.26853951811790466,
-0.07081758975982666,
-0.010250541381537914,
-0.15288786590099335,
-0.25060728192329407,
0.16574518382549286,
-0.18275725841522217,
0.21577946841716766,
-0.0832352563738823,
-0.2934994399547577,
-0.06984750181436539,
-0.17877539992332458,
0.0691014751791954,
-0.09062480181455612,
-0.005032945889979601,
-0.14601413905620575,
-0.09501013904809952,
-0.028815321624279022,
-0.002384570660069585,
-0.010043151676654816,
0.3453405201435089,
0.07665115594863892,
0.463783860206604,
0.07261370122432709,
0.39333468675613403,
0.17095671594142914,
-0.024700481444597244,
0.12677957117557526,
0.3316880166530609,
-0.30637580156326294,
0.31643015146255493,
0.24137139320373535,
0.16708017885684967,
-0.30058571696281433,
0.1296255886554718,
-0.3068227171897888,
-0.07293494045734406,
0.09004408866167068,
-0.018239406868815422,
0.09324193745851517,
0.0036980726290494204,
0.1688583344221115,
0.13657522201538086,
-0.08519496768712997,
0.16724488139152527,
0.027933545410633087,
0.21860568225383759,
0.06391529738903046,
-0.10075508803129196,
0.06873200833797455,
-0.19207072257995605,
-0.020260734483599663,
-0.02449103258550167,
-0.14603067934513092,
0.11555216461420059,
0.06594405323266983,
0.20694835484027863,
-0.10516974329948425,
-0.15312595665454865,
-0.05238558351993561,
0.16006004810333252,
0.517122745513916,
-0.426157146692276,
0.2639129161834717,
0.057180143892765045,
-0.07984940707683563,
-0.12116426974534988,
0.382771760225296,
-0.013048000633716583,
-0.4193394184112549,
0.14403535425662994,
0.0797206461429596,
-0.19256529211997986,
0.1210361048579216,
-0.38395920395851135,
-0.1830465942621231,
0.02285238541662693,
-0.17182235419750214,
0.235808327794075,
-0.2428782880306244,
0.01012606080621481,
-0.22724561393260956,
-0.04578670114278793,
0.16082505881786346,
-0.19476941227912903,
-0.10694559663534164,
-0.14894773066043854,
-0.4786725640296936,
0.7286791205406189,
-0.12854278087615967,
0.049499429762363434,
0.4333667457103729,
-0.2160496860742569,
-0.39628851413726807,
0.4247331917285919,
-0.2746760845184326,
-0.2605844736099243,
0.36152324080467224,
-0.4956049919128418,
0.4633190631866455,
0.324558824300766,
0.19806721806526184,
0.0893634632229805,
-0.029773904010653496,
0.1201324537396431,
-0.3002183139324188,
0.22003716230392456,
0.20710274577140808,
-0.23946477472782135,
-0.19029510021209717,
-0.08403532207012177,
0.12568913400173187,
-0.09782002866268158,
0.05463546887040138,
-0.00027758770738728344,
0.043917324393987656,
0.3048694431781769,
0.15351170301437378,
0.028401793912053108,
-0.21911709010601044,
0.1361132115125656,
0.23741959035396576,
-0.19281724095344543,
-0.0950852483510971,
-0.14314740896224976,
-0.032736148685216904,
-0.26587235927581787,
-0.036848392337560654,
-0.4485420882701874,
-0.20928077399730682,
0.05028972774744034,
0.211127370595932,
0.02560693398118019,
-0.287352591753006,
0.002661587670445442,
0.23006030917167664,
0.14674346148967743,
0.28932827711105347,
-0.2135196328163147,
0.43157392740249634,
-0.49243631958961487,
0.16444890201091766,
0.13828735053539276,
-0.17062614858150482,
0.1656695157289505,
-0.02453669346868992,
-0.042452145367860794,
0.038051821291446686,
-0.2710111737251282,
0.16867917776107788,
-0.036004308611154556,
0.28867775201797485,
-0.02695695497095585,
0.15265600383281708,
-0.24258196353912354,
0.22721177339553833,
0.07270795851945877,
0.003559085773304105,
-0.009656236506998539,
0.1620015799999237,
-0.09828140586614609,
0.12193373590707779,
0.010062414221465588,
-0.06822066009044647,
0.061216313391923904,
0.12398777157068253,
-0.0029772024136036634,
-0.0025334875099360943,
-0.24584224820137024,
0.32531389594078064,
-0.2929026484489441,
-0.20202669501304626,
-0.09938377141952515,
-0.24074335396289825,
0.16800940036773682,
0.2397516369819641,
-0.24459823966026306,
0.19811494648456573,
0.5945558547973633,
-0.11429449170827866,
-0.06739864498376846,
0.33409056067466736,
0.11194093525409698,
-0.07845272123813629,
0.13709701597690582,
0.0903344601392746,
0.10730579495429993,
0.16419589519500732,
0.1526741087436676,
0.017344880849123,
0.12431004643440247,
-0.006975297350436449,
0.2460540384054184,
0.11793234199285507,
-0.326817125082016,
0.006792469881474972,
-0.22915636003017426,
-0.16775043308734894,
-0.1305985301733017,
0.12328963726758957,
-0.4932425916194916,
-0.021622145548462868,
-0.326293021440506,
0.03183434531092644,
-0.2363896667957306,
-0.34830060601234436,
-0.6054055690765381,
-0.06292254477739334,
-0.1207660660147667,
-0.3933292627334595,
0.2839479148387909,
0.0013737519038841128,
-0.273899644613266,
-0.14144745469093323,
0.16268645226955414,
0.3985840678215027,
-0.024408966302871704,
0.18131430447101593,
-0.5563156604766846,
0.3898976147174835,
-0.3940705358982086,
0.05587216839194298,
-0.107417531311512,
0.1637449711561203,
0.3210858404636383,
-0.3589545786380768,
-0.06865320354700089,
-0.29845595359802246,
-0.03290482237935066,
0.15030334889888763,
-0.12438496947288513,
0.384601354598999,
0.18362943828105927,
0.14463689923286438,
0.19302819669246674,
-0.16981124877929688,
-0.11400017887353897,
-0.2072126865386963,
-0.051615115255117416,
-0.20441702008247375,
0.23381905257701874,
0.1644960194826126,
-0.34449970722198486,
-0.31775790452957153,
-0.2811037600040436,
-0.28520530462265015,
0.13959752023220062,
-0.22663091123104095,
0.3257316052913666,
-0.3604024052619934,
-0.025816213339567184,
0.24548256397247314,
-0.35155901312828064,
0.5465461015701294,
0.10426260530948639,
-0.747580349445343,
-0.21749937534332275,
0.030295098200440407,
-0.05975905433297157,
-0.2551206350326538,
0.45367780327796936,
-0.2607751786708832,
-0.0767369419336319,
-0.7462232112884521,
0.06605690717697144,
-0.237944096326828,
-0.1159115880727768,
0.3059661090373993,
-0.05383721739053726,
0.14639733731746674,
0.19313624501228333,
-0.06125243753194809,
0.05396527051925659,
0.12448355555534363,
0.027982449159026146,
-0.4099285304546356,
0.3065110743045807,
0.2965651750564575,
0.18939121067523956,
0.08222108334302902,
0.2465163916349411,
0.28100401163101196,
0.0852203369140625,
-0.2378200739622116,
-0.08673630654811859,
0.714214026927948,
-0.34174197912216187,
-0.17895156145095825,
0.12404519319534302,
0.05561705306172371,
-0.3776140511035919,
0.1220378428697586,
-0.10018081963062286,
0.3989616632461548,
0.1636795997619629,
0.14447371661663055,
0.049113716930150986,
-0.36928147077560425,
0.054710034281015396,
0.09965342283248901,
-0.020087823271751404,
-0.06517405062913895,
0.05062227323651314,
0.23218756914138794,
0.07438694685697556,
0.07260877639055252,
0.608934223651886,
0.25980135798454285,
0.359244704246521,
-0.38708940148353577,
-0.35521969199180603,
-0.5714662671089172,
-0.1087384819984436,
0.16925466060638428,
0.04363621026277542,
-0.4236886501312256,
-0.07805578410625458,
0.30020979046821594,
0.045775312930345535,
0.4229608178138733,
0.10642186552286148,
-0.06761038303375244,
-0.20873180031776428,
0.0002408517466392368,
0.18995249271392822,
0.08412207663059235,
-0.2580265402793884,
0.21304593980312347,
0.44006431102752686,
-0.2385072261095047,
-0.34296974539756775,
-0.23654095828533173,
0.30878615379333496,
-0.22442741692066193,
-0.08917352557182312,
-0.2934216558933258,
-0.36901944875717163,
-0.07882897555828094,
-0.20059004426002502,
-0.008790392428636551,
0.17154638469219208,
0.11334007978439331,
-0.5838227868080139,
-0.33571723103523254,
0.38126304745674133,
0.35731780529022217,
0.034692954272031784,
-0.29636290669441223,
0.07732435315847397,
-0.2547169029712677,
-0.2744427025318146,
0.15039925277233124,
0.6171967387199402,
0.44917047023773193,
0.22726412117481232,
0.32255467772483826,
-0.03420243039727211,
0.012865564785897732,
-0.2113778442144394,
0.21601617336273193,
0.28029751777648926,
-0.2634665071964264,
0.010541734285652637,
-0.046608053147792816,
0.26328063011169434,
-0.1785396933555603,
0.12417320907115936,
0.44594016671180725,
0.18686780333518982,
-0.23183917999267578,
-0.30952104926109314,
0.023062152788043022,
0.07844225317239761,
0.02689686417579651,
0.36049991846084595,
0.14836423099040985,
-0.1881169080734253,
-0.04620669409632683,
0.0034312631469219923,
1.1015574932098389,
-0.13733673095703125,
0.2609902322292328,
0.28777042031288147,
-0.33026570081710815,
0.3510974943637848,
0.12818244099617004,
0.013673054985702038,
-0.13115303218364716,
-0.03545144572854042,
0.06439915299415588,
-0.28902706503868103,
0.18843863904476166,
-0.04902735725045204,
-0.12707696855068207,
-0.04288697987794876,
0.0215853750705719,
-0.04151067137718201,
0.08006183058023453,
0.10239075869321823,
-0.2160448431968689,
0.10608440637588501,
-0.2881343960762024,
0.019207341596484184,
-0.02654127962887287,
-0.0139210419729352,
-0.11744605004787445,
0.03613491356372833,
0.15228742361068726,
-0.32082924246788025,
-0.16449448466300964,
-0.35274413228034973,
0.5632613301277161,
-0.11097902059555054,
0.026469970121979713,
0.12260603159666061,
-0.052787452936172485,
0.3851514756679535,
0.021864086389541626,
0.2955079972743988,
0.09290216863155365,
-0.4084981083869934,
-0.08878952264785767,
0.10002486407756805,
0.13085559010505676,
0.015294293873012066,
0.17414331436157227,
-0.08003928512334824,
-0.38217464089393616,
0.1858171969652176,
-0.029614828526973724,
-0.38014087080955505,
0.25918617844581604,
-0.22203218936920166,
0.1948300153017044,
-0.39544546604156494,
0.04777614399790764,
0.07200414687395096,
-0.17367078363895416,
0.05087697133421898,
0.09756913036108017,
0.30218520760536194,
-0.20647622644901276,
0.2860214412212372,
-0.3368218243122101,
-0.6666277647018433,
-0.22602874040603638,
0.17955352365970612,
0.1741955578327179,
-0.05067184194922447,
0.22912591695785522,
-0.0015557666774839163,
-0.43764981627464294,
-0.10270307958126068,
0.1720992773771286,
-0.004859226755797863,
-0.11718815565109253,
0.13237455487251282,
0.238643079996109,
-0.058131225407123566,
-0.3001345694065094,
0.3246009945869446,
-0.0627131313085556,
0.021099276840686798,
-0.4857231080532074,
-0.03629680350422859,
-0.4227105677127838,
0.22735311090946198,
-0.15134719014167786,
0.40599173307418823,
0.11914420872926712,
-0.03222234919667244,
0.03612768277525902,
-0.2973766326904297,
-0.2570328414440155,
-0.3470444977283478,
-0.29687830805778503,
-0.013698698952794075,
0.19119220972061157,
0.07638780027627945,
0.3403458297252655,
0.1696930229663849,
0.026236455887556076,
0.03716776892542839,
-0.2174254208803177,
-0.1059134379029274,
0.15651634335517883,
0.17494525015354156,
-0.11610908806324005,
0.3147474229335785,
-0.07863620668649673,
-0.057707399129867554,
0.12121530622243881,
0.17808671295642853,
0.6493930220603943,
0.39848899841308594,
0.05859385058283806,
0.050742749124765396,
0.13232159614562988,
0.14962142705917358,
-0.05321656912565231,
0.1916859894990921,
0.005091111175715923,
0.0918295830488205,
-0.10485261678695679,
-0.03152851015329361,
-0.3787102699279785,
-0.10210072994232178,
0.4027526080608368,
0.2205822765827179,
0.311481237411499,
0.4311886429786682,
0.4334315061569214,
-0.05587642639875412,
0.08689109981060028,
-0.0006714888149872422,
0.21638312935829163,
0.16819068789482117,
-0.08636599779129028,
-0.3955235183238983,
-0.14281779527664185,
0.08187563717365265,
0.22499258816242218,
0.010131853632628918,
-0.3440752625465393,
-0.26735615730285645,
-0.20521417260169983,
0.33944547176361084,
-0.08005562424659729,
-0.06609848141670227,
0.5081415176391602,
0.061802998185157776,
0.25501468777656555,
-0.19327576458454132,
-0.19699953496456146,
0.08771107345819473,
-0.3469740152359009,
0.24660420417785645,
0.38248389959335327,
0.29744985699653625,
-0.15636810660362244,
-0.10224466025829315,
-0.06365567445755005,
0.1238488256931305,
0.1860051304101944,
-0.03629806265234947,
-0.1381462961435318,
0.08023716509342194,
0.034901659935712814,
0.41413629055023193,
-0.16232310235500336,
-0.0629572719335556,
0.11446329206228256,
-0.24828729033470154,
-0.08624056726694107,
0.10893284529447556,
0.07797747105360031,
-0.14258094131946564,
-0.2707243859767914,
0.1697162389755249,
-0.1490851193666458,
-0.01063249260187149,
-0.09391061216592789,
-0.019294247031211853,
0.03040316328406334,
0.04674059525132179,
-0.15838700532913208,
-0.03555481880903244,
0.07075399160385132,
-0.23469111323356628,
-0.27395954728126526,
-0.20871424674987793,
0.0997999981045723,
-0.08737417310476303,
-0.013681893236935139,
-0.0403725691139698,
0.4138679504394531,
0.45203739404678345,
0.3165358603000641,
0.4676985740661621,
0.24508337676525116,
0.5179721117019653,
0.022056441754102707,
-0.1365848183631897,
0.028026290237903595,
-0.2476312816143036,
0.4332347810268402,
-0.020804597064852715,
-0.1089085191488266,
0.3140864670276642,
0.09205565601587296,
-0.036075372248888016,
0.11274490505456924,
-0.0555475689470768,
0.21304093301296234,
-0.32427042722702026,
0.7055277228355408,
0.028298240154981613,
-0.20221303403377533,
-0.21350623667240143,
0.017481734976172447,
-0.5186849236488342,
-0.020528340712189674,
0.17429308593273163,
-0.13701242208480835,
0.033314917236566544,
-0.4020622968673706,
0.07291543483734131,
0.14469774067401886,
0.4893353283405304,
0.6453391909599304,
0.3660605251789093,
-0.15328772366046906,
-0.09840839356184006,
-0.1929561346769333,
0.2629055380821228,
0.15719416737556458,
0.04018586874008179,
-0.03002198040485382,
-0.18382786214351654,
-0.004146108869463205,
0.3262834846973419,
0.15421567857265472,
-0.24455824494361877,
-0.5066198110580444,
-0.04456261917948723,
0.010671977885067463,
0.06876938790082932,
0.39766475558280945,
0.2572368085384369,
-0.1642967015504837,
-0.0032927857246249914,
0.5116845369338989,
-0.26118913292884827,
-0.015458249486982822,
0.11912128329277039,
0.3817168176174164,
-0.1467205286026001,
-0.2076237052679062,
0.012719005346298218,
0.20665960013866425,
-0.06408118456602097,
0.02476113848388195,
-0.38282617926597595,
-0.03049965389072895,
0.032875899225473404,
-0.1318734586238861,
-0.0021374437492340803,
-0.2604812681674957,
0.42608022689819336,
-0.019415738061070442,
-0.0970737636089325,
-0.3136410117149353,
0.14242102205753326,
0.15749967098236084,
0.17517603933811188,
0.23021745681762695,
-0.1871318519115448,
-0.2503662705421448,
-0.03902371600270271,
0.2734518349170685,
0.27031299471855164,
0.3504103124141693,
-0.05745192989706993,
-0.13967357575893402,
-0.1904398798942566,
0.35957711935043335,
-0.15502578020095825,
-0.21103918552398682,
-0.11846321076154709,
0.2866292893886566,
0.16838844120502472,
-0.19353541731834412,
-0.5391814112663269,
-0.029688913375139236,
0.2199973613023758,
-0.23673638701438904,
0.14198574423789978,
0.08748339861631393,
-0.3980548679828644,
0.28259754180908203,
-0.019119201228022575,
0.4385918080806732,
-0.2042134553194046,
0.3405643701553345,
-0.12988854944705963,
-0.5378352403640747
] |
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.05412515252828598,
-0.4283032715320587,
-0.017841104418039322,
0.18631984293460846,
0.1776287704706192,
-0.1547812521457672,
0.3838963210582733,
0.16160008311271667,
0.06724230945110321,
0.2444252222776413,
0.19078323245048523,
0.30530649423599243,
-0.14255928993225098,
0.28497546911239624,
0.26102393865585327,
0.14178869128227234,
-0.07240651547908783,
0.02288234792649746,
-0.4255489408969879,
0.10764074325561523,
-0.00899980217218399,
0.11102598905563354,
0.19963900744915009,
0.4757939279079437,
-0.6451056003570557,
-0.09693398326635361,
0.21992480754852295,
0.06825502216815948,
-0.15046662092208862,
-0.518028736114502,
-0.0038765997160226107,
0.1959686428308487,
-0.07114783674478531,
0.21872565150260925,
-0.00011078464740421623,
0.11144483089447021,
0.5583913326263428,
0.1802082061767578,
-0.5341903567314148,
-0.14948955178260803,
-0.0687197893857956,
-0.24119481444358826,
0.3232273459434509,
-0.13856375217437744,
-0.1318151354789734,
-0.26323211193084717,
0.27149471640586853,
-0.3419898748397827,
0.3885953426361084,
0.29798731207847595,
0.21856577694416046,
0.23838795721530914,
0.010733392089605331,
0.24307548999786377,
0.12540613114833832,
0.24164877831935883,
0.03767687454819679,
-0.04286830872297287,
-0.04291090741753578,
0.3080662786960602,
-0.20364251732826233,
0.42865443229675293,
-0.082623191177845,
-0.28041377663612366,
0.02629048191010952,
0.14172519743442535,
0.1627260446548462,
-0.3487532436847687,
0.009764213114976883,
0.09935756027698517,
0.26547521352767944,
-0.4483451545238495,
-0.10971546173095703,
-0.3162623345851898,
-0.09637503325939178,
-0.11715845763683319,
0.18483959138393402,
0.14460380375385284,
-0.17128406465053558,
0.38092222809791565,
-0.19024553894996643,
-0.25244706869125366,
-0.22951476275920868,
-0.07340926676988602,
-0.1247815266251564,
0.019961843267083168,
-0.320853590965271,
0.24826140701770782,
-0.22182174026966095,
0.2160467803478241,
-0.18572986125946045,
-0.21653154492378235,
-0.12456540763378143,
-0.0516972690820694,
-0.06147710606455803,
0.005703653208911419,
0.11515476554632187,
-0.09116494655609131,
-0.011602911166846752,
-0.12483567744493484,
-0.2013799399137497,
0.06203619763255119,
0.2232736498117447,
0.19189174473285675,
0.4884246289730072,
0.08791931718587875,
0.5125947594642639,
0.2814556062221527,
0.1908000409603119,
-0.0421321801841259,
0.09053083509206772,
-0.2021927684545517,
0.30889156460762024,
0.17086446285247803,
0.28888627886772156,
-0.23289375007152557,
0.28665098547935486,
-0.09002344310283661,
-0.06496889144182205,
0.14310598373413086,
-0.061183493584394455,
0.07108941674232483,
-0.023485327139496803,
0.24194486439228058,
0.015370534732937813,
-0.11411146074533463,
0.37815219163894653,
-0.05020824447274208,
0.06269354373216629,
-0.007013482041656971,
-0.19760681688785553,
0.026109840720891953,
-0.3317318260669708,
0.035512927919626236,
-0.10246506333351135,
-0.04998958110809326,
0.06741984188556671,
0.09769117087125778,
0.1535893678665161,
-0.10751424729824066,
-0.12621153891086578,
-0.057666972279548645,
0.4185284674167633,
0.48102590441703796,
-0.2644612193107605,
0.2954939901828766,
0.19435426592826843,
-0.2578785717487335,
-0.13231177628040314,
0.19529201090335846,
0.07714147865772247,
-0.2959939241409302,
0.11129996180534363,
0.1830357313156128,
-0.30675745010375977,
0.32343366742134094,
-0.21313782036304474,
0.026549693197011948,
-0.0012508321087807417,
-0.1195104792714119,
0.23571889102458954,
-0.16988518834114075,
-0.017430616542696953,
-0.2179441899061203,
0.18051116168498993,
0.36437806487083435,
-0.22290349006652832,
-0.10527513176202774,
-0.07719895243644714,
-0.421150267124176,
0.32745540142059326,
-0.23250098526477814,
0.16440193355083466,
0.33669036626815796,
-0.39369162917137146,
-0.3250599503517151,
0.4573608338832855,
-0.3337569832801819,
-0.1708878129720688,
0.2365003079175949,
-0.40482109785079956,
0.4652932584285736,
0.20766982436180115,
0.004300687927752733,
-0.005994809325784445,
0.0376351997256279,
0.1742015928030014,
-0.1800452023744583,
0.30517396330833435,
0.1302231401205063,
-0.22910088300704956,
-0.04510137438774109,
-0.15151599049568176,
-0.0034162946976721287,
-0.09589012712240219,
-0.025933796539902687,
-0.016993779689073563,
-0.11716209352016449,
0.42997506260871887,
0.2623738944530487,
0.07724792510271072,
-0.23616689443588257,
0.24081739783287048,
0.2613837718963623,
-0.06856455653905869,
-0.04811938479542732,
-0.06348157674074173,
0.006226713303476572,
-0.1658298373222351,
0.05443985015153885,
-0.311594694852829,
-0.22199858725070953,
0.15071378648281097,
0.1317090392112732,
-0.16920238733291626,
-0.30262094736099243,
0.16070272028446198,
0.2380983531475067,
0.11329971998929977,
0.3026779592037201,
-0.11984613537788391,
0.5206785798072815,
-0.3534441590309143,
0.08849456906318665,
-0.1319672167301178,
-0.062194786965847015,
0.25743770599365234,
-0.12813806533813477,
-0.0756491869688034,
0.2081563025712967,
-0.09341035783290863,
0.16713447868824005,
0.03816698491573334,
0.4232924282550812,
-0.004345274530351162,
0.11832044273614883,
-0.3124949336051941,
0.05007098987698555,
0.009798703715205193,
-0.004703626502305269,
0.08957160264253616,
0.14204466342926025,
-0.1465669572353363,
0.14718025922775269,
0.03844866529107094,
-0.08872499316930771,
0.17212679982185364,
0.15069705247879028,
-0.0438552089035511,
0.0488443523645401,
-0.12275112420320511,
0.19883811473846436,
-0.47113338112831116,
-0.30364903807640076,
-0.2785584628582001,
-0.17136485874652863,
0.30331164598464966,
0.11840741336345673,
-0.30357781052589417,
0.23796886205673218,
0.7682507038116455,
-0.030136853456497192,
0.020550137385725975,
0.06579117476940155,
-0.25291287899017334,
0.01815706677734852,
0.11027288436889648,
0.20936338603496552,
0.1760624349117279,
0.2615463137626648,
0.20013335347175598,
0.050806377083063126,
0.0062754200771451,
0.012690404430031776,
0.2241543084383011,
0.06510932743549347,
-0.22925376892089844,
0.08695004880428314,
-0.08512818068265915,
-0.2262379229068756,
-0.2331651747226715,
0.27963972091674805,
-0.5140916109085083,
-0.19451895356178284,
-0.3919096291065216,
0.018217433243989944,
-0.23537445068359375,
-0.40331390500068665,
-0.5682979822158813,
-0.09719472378492355,
-0.09389960020780563,
-0.39500710368156433,
0.35449379682540894,
-0.04934515431523323,
-0.25135520100593567,
0.05669626221060753,
0.31905925273895264,
0.2767201066017151,
0.02841641940176487,
0.17181682586669922,
-0.45148706436157227,
0.26307961344718933,
-0.40420615673065186,
0.05427881330251694,
-0.2848894000053406,
0.12470383942127228,
0.3621220290660858,
-0.21162299811840057,
-0.07180046290159225,
-0.2785494029521942,
-0.058709703385829926,
0.22191475331783295,
-0.23495937883853912,
0.5601464509963989,
0.3041001856327057,
0.04969687759876251,
0.24474933743476868,
-0.10819453746080399,
0.09881173074245453,
-0.33492666482925415,
-0.04223227873444557,
-0.23069436848163605,
0.16633765399456024,
0.18852055072784424,
-0.30573779344558716,
-0.2492799460887909,
-0.35926541686058044,
-0.3399184048175812,
0.2599511742591858,
-0.21321804821491241,
0.2335207611322403,
-0.15119637548923492,
-0.11237526684999466,
0.13762691617012024,
-0.3935934007167816,
0.4972853660583496,
-0.0881853997707367,
-0.6302130818367004,
-0.1551143378019333,
-0.12440438568592072,
-0.09082318842411041,
-0.16545841097831726,
0.11361765116453171,
-0.2327755242586136,
-0.22507551312446594,
-0.5604440569877625,
-0.2937107980251312,
-0.2211570143699646,
-0.1356341391801834,
0.2647368907928467,
0.34018152952194214,
0.17375881969928741,
0.11552000790834427,
-0.12176298350095749,
-0.07755361497402191,
-0.09467660635709763,
0.08919758349657059,
-0.3017317056655884,
0.20184007287025452,
0.23144543170928955,
0.15251600742340088,
0.030849767848849297,
0.13161727786064148,
0.37697869539260864,
0.12318260967731476,
-0.2599918842315674,
-0.1977272629737854,
0.9344842433929443,
-0.3076799809932709,
-0.1384754329919815,
-0.014909342862665653,
0.12179640680551529,
-0.31357473134994507,
0.13717757165431976,
-0.029571132734417915,
0.42887642979621887,
0.17466379702091217,
0.013524373061954975,
-0.14032737910747528,
-0.47023478150367737,
-0.08770845830440521,
0.007916572503745556,
-0.10618412494659424,
-0.038294777274131775,
0.024190247058868408,
0.22700856626033783,
0.10133180022239685,
-0.007808913476765156,
0.48619982600212097,
0.33218497037887573,
0.3255206346511841,
-0.2572871446609497,
-0.3790225088596344,
-0.44886162877082825,
-0.1084597110748291,
-0.1151636615395546,
-0.01706005446612835,
-0.2848508358001709,
-0.30790647864341736,
0.3015509843826294,
0.11099284887313843,
0.48755112290382385,
-0.0799734964966774,
0.07365549355745316,
-0.047707993537187576,
0.03994135558605194,
-0.05949029326438904,
-0.004463087301701307,
-0.23068362474441528,
0.22399580478668213,
0.3898354768753052,
-0.06655916571617126,
-0.2347535789012909,
-0.2896490693092346,
0.3323347270488739,
-0.16473615169525146,
-0.21187537908554077,
-0.34694769978523254,
-0.49390751123428345,
0.05545921251177788,
-0.07080049812793732,
0.1633123904466629,
0.19895438849925995,
-0.029854118824005127,
-0.4865509271621704,
-0.4637317955493927,
0.28019049763679504,
0.11292972415685654,
0.03387869894504547,
-0.07506119459867477,
0.2129460722208023,
-0.2921408414840698,
-0.21566888689994812,
0.31725046038627625,
0.5881595015525818,
0.06885673105716705,
0.2073204666376114,
0.07943935692310333,
0.08810959756374359,
0.020972840487957,
-0.27854108810424805,
0.3618937134742737,
0.27274978160858154,
-0.2944971024990082,
0.025618547573685646,
-0.20366749167442322,
0.2632230222225189,
-0.2290896326303482,
0.042934998869895935,
0.3444986045360565,
0.21179184317588806,
-0.17901554703712463,
-0.30186590552330017,
0.09613924473524094,
-0.041125547140836716,
-0.12968680262565613,
0.31084325909614563,
0.2002137005329132,
-0.3194749355316162,
0.045675523579120636,
-0.13751661777496338,
0.9276251196861267,
-0.049197882413864136,
0.2219361513853073,
0.2238161265850067,
-0.22332537174224854,
0.39597630500793457,
0.04470297321677208,
0.13506147265434265,
-0.2658403217792511,
-0.15783190727233887,
0.10124289989471436,
-0.2373303323984146,
-0.009509816765785217,
0.034193698316812515,
-0.14836297929286957,
0.03928814083337784,
0.014529739506542683,
-0.047416847199201584,
-0.08733294159173965,
0.18599385023117065,
-0.15578311681747437,
0.04788338392972946,
-0.4868287146091461,
0.08106014877557755,
0.16701635718345642,
-0.05334741994738579,
-0.04476507753133774,
0.03768882527947426,
0.4169226586818695,
-0.3255186080932617,
-0.033693600445985794,
-0.2197086662054062,
0.23139658570289612,
-0.1718173772096634,
0.13135896623134613,
0.023282088339328766,
-0.19013872742652893,
0.22004033625125885,
-0.009853992611169815,
0.5313000679016113,
0.2272985726594925,
-0.3040037155151367,
0.24541890621185303,
0.14607982337474823,
-0.06698902696371078,
0.10923931002616882,
0.35095545649528503,
0.08251519501209259,
-0.42825523018836975,
0.23404361307621002,
-0.04617885500192642,
-0.28307124972343445,
0.07510558515787125,
-0.055565740913152695,
0.18815948069095612,
-0.30634212493896484,
0.16820146143436432,
0.10038255155086517,
-0.04738997295498848,
0.04654894769191742,
0.1458730697631836,
0.3736650049686432,
-0.35566744208335876,
0.35970136523246765,
-0.24779430031776428,
-0.6420058608055115,
-0.07257534563541412,
-0.0022322575096040964,
0.14102326333522797,
0.13218040764331818,
0.12114770710468292,
0.05310269817709923,
-0.30382418632507324,
-0.18326885998249054,
0.08491870015859604,
0.24308080971240997,
0.07850375771522522,
0.1308673471212387,
0.3694797158241272,
-0.02327847294509411,
-0.09234141558408737,
0.10555081069469452,
-0.117514967918396,
-0.04384330287575722,
-0.5810169577598572,
-0.17203104496002197,
-0.291728138923645,
0.23438020050525665,
-0.17262116074562073,
0.3928423225879669,
0.33715710043907166,
-0.06971397995948792,
0.10003136843442917,
-0.04857289046049118,
-0.366517037153244,
-0.3736622631549835,
-0.1796022653579712,
0.11793224513530731,
0.28224095702171326,
0.06902904063463211,
0.3685358762741089,
0.019837474450469017,
0.13144074380397797,
-0.09386327117681503,
-0.23406587541103363,
-0.21576879918575287,
0.11629465967416763,
0.11492770910263062,
-0.15050622820854187,
0.3382871150970459,
-0.11926949769258499,
-0.16583171486854553,
0.2831535041332245,
0.0107908109202981,
0.8302776217460632,
0.3805101811885834,
-0.050356604158878326,
0.07972346246242523,
0.036544423550367355,
0.09402671456336975,
-0.014363407157361507,
0.1291988044977188,
0.03947680816054344,
-0.11257899552583694,
-0.002794939326122403,
-0.07288091629743576,
-0.4296859800815582,
-0.06183714419603348,
0.44535237550735474,
0.20219124853610992,
0.1739315241575241,
0.5326746106147766,
0.19151537120342255,
-0.054660286754369736,
-0.12564833462238312,
-0.2378995567560196,
0.4046914875507355,
0.0986349955201149,
-0.07698953151702881,
-0.40257808566093445,
-0.11531496047973633,
0.19525577127933502,
0.06094175949692726,
0.08513067662715912,
-0.1067545935511589,
-0.34989219903945923,
0.07278842478990555,
0.3925573229789734,
0.0188670102506876,
-0.07153358310461044,
0.4490742087364197,
0.1405651867389679,
0.1830880045890808,
-0.35225003957748413,
-0.12748582661151886,
0.060280755162239075,
-0.35313087701797485,
0.1583716869354248,
0.4669976830482483,
0.1810620129108429,
-0.12161602079868317,
0.02504045143723488,
0.17498433589935303,
0.19757573306560516,
0.23225586116313934,
-0.11985369771718979,
-0.03343208134174347,
0.10307443886995316,
0.09932009875774384,
0.2516612708568573,
-0.24585893750190735,
-0.06709519773721695,
-0.037725839763879776,
0.033049680292606354,
-0.23899877071380615,
0.13590683043003082,
0.0128855649381876,
-0.1712246984243393,
-0.18697649240493774,
0.10096967220306396,
0.0068519385531544685,
0.018596183508634567,
-0.1414889097213745,
-0.1694045215845108,
0.20642408728599548,
-0.07986795902252197,
-0.059356626123189926,
-0.03376972675323486,
0.10822239518165588,
-0.167575865983963,
-0.26680582761764526,
-0.17477299273014069,
0.07263671606779099,
-0.01655668392777443,
0.14556542038917542,
-0.11150038242340088,
0.4508195221424103,
0.35212209820747375,
0.2865579426288605,
0.3099735677242279,
0.18528050184249878,
0.3356393575668335,
0.013408822007477283,
-0.12033729255199432,
-0.07648293673992157,
-0.33536309003829956,
0.3160898685455322,
-0.012912582606077194,
-0.24479611217975616,
0.19271636009216309,
0.23309782147407532,
-0.10978322476148605,
0.07183676213026047,
-0.02392571046948433,
0.08178400248289108,
-0.22763334214687347,
0.6042560338973999,
0.1579877883195877,
-0.21048912405967712,
-0.252617210149765,
-0.02163345366716385,
-0.6160030961036682,
-0.11306494474411011,
0.4817125201225281,
-0.08999329060316086,
-0.028804093599319458,
-0.5377420783042908,
0.13226202130317688,
0.11687909066677094,
0.2316969782114029,
0.4534964859485626,
0.3030889630317688,
0.022323256358504295,
0.005322617944329977,
-0.2670535445213318,
0.3397334814071655,
0.09744759649038315,
-0.1241302341222763,
-0.15888269245624542,
-0.11525930464267731,
0.02004488743841648,
0.1332343965768814,
0.2141837477684021,
-0.07673093676567078,
-0.46199092268943787,
-0.20512628555297852,
-0.04483145847916603,
0.036786846816539764,
0.3576843738555908,
0.1559448093175888,
-0.022283878177404404,
-0.0010506295366212726,
0.2269449234008789,
-0.2366587221622467,
0.09212637692689896,
0.3040313422679901,
0.3641933500766754,
-0.029160749167203903,
-0.1873096376657486,
0.2222924828529358,
0.28100770711898804,
0.06031694635748863,
-0.09356857091188431,
-0.19791285693645477,
-0.15836448967456818,
0.04544365778565407,
-0.31710541248321533,
0.028160177171230316,
-0.12404698878526688,
0.4336727559566498,
-0.022671598941087723,
-0.2668974697589874,
-0.2442457228899002,
0.040740273892879486,
0.2229069173336029,
0.04358778893947601,
0.3966623842716217,
-0.04393863305449486,
-0.14201466739177704,
-0.008474965579807758,
0.15399321913719177,
0.34632760286331177,
0.25882935523986816,
-0.07580587267875671,
-0.04595327749848366,
-0.2183856964111328,
0.2991536557674408,
-0.3736027181148529,
-0.3177957832813263,
-0.1893790364265442,
0.38146305084228516,
0.09585016965866089,
-0.18711678683757782,
-0.5491600036621094,
-0.10380878299474716,
0.24569255113601685,
-0.18859310448169708,
0.13009968400001526,
0.14239177107810974,
-0.354887992143631,
0.2615862488746643,
-0.04093686118721962,
0.2532682716846466,
-0.056530363857746124,
0.20772956311702728,
-0.07196298986673355,
-0.5686923265457153
] |
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.1825570911169052,
0.1823851466178894,
-0.04003103822469711,
0.2590484619140625,
0.0813780203461647,
0.1336376667022705,
0.4580341875553131,
0.012254521250724792,
0.1864633411169052,
0.07412854582071304,
-0.06345562636852264,
-0.011226741597056389,
-0.1087961420416832,
0.15729273855686188,
-0.03236179053783417,
-0.028251171112060547,
0.14535057544708252,
0.048068806529045105,
0.03199739754199982,
0.13964581489562988,
-0.405230849981308,
-0.007120975758880377,
-0.23793615400791168,
0.10736636817455292,
-0.2231619954109192,
0.27834394574165344,
-0.015726491808891296,
0.39082881808280945,
-0.03380283713340759,
-0.23501825332641602,
0.2101651132106781,
0.36248573660850525,
0.6620944142341614,
0.24535299837589264,
-0.00011262849875492975,
-0.0484502874314785,
0.042043186724185944,
-0.020131828263401985,
0.20681922137737274,
0.2423870712518692,
0.13413847982883453,
-0.045187074691057205,
0.004125458188354969,
-0.10666897147893906,
-0.16983704268932343,
0.20000268518924713,
-0.06542990356683731,
-0.3538348972797394,
0.11399807780981064,
0.4263346195220947,
0.18719588220119476,
0.24746236205101013,
-0.18068772554397583,
-0.010653744451701641,
0.5910392999649048,
0.04759823530912399,
-0.12615948915481567,
0.1927935779094696,
0.29002419114112854,
-0.44280532002449036,
0.21414141356945038,
0.16098226606845856,
-0.226858451962471,
0.0855403020977974,
0.38182690739631653,
-0.16326357424259186,
-0.12995696067810059,
-0.2830389738082886,
0.1584060937166214,
0.00005307537503540516,
0.7270634174346924,
-0.16924333572387695,
-0.30099228024482727,
-0.0341043695807457,
0.13930882513523102,
-0.26716941595077515,
0.22750508785247803,
0.3365987539291382,
-0.050527121871709824,
0.07535825669765472,
-0.23470008373260498,
-0.16715088486671448,
-0.44340085983276367,
0.13589578866958618,
0.17750507593154907,
-0.22929832339286804,
-0.08493313193321228,
0.22970882058143616,
0.09066370129585266,
-0.1301722377538681,
0.35443300008773804,
0.12944373488426208,
0.041961729526519775,
0.25176000595092773,
-0.46714821457862854,
0.3360508978366852,
0.20927438139915466,
0.29802194237709045,
-0.03202706202864647,
0.27795010805130005,
-0.13617126643657684,
-0.21062752604484558,
0.20189836621284485,
0.1250198632478714,
0.17727436125278473,
-0.05427384003996849,
0.15196064114570618,
0.24112750589847565,
0.1375093311071396,
-0.022511063143610954,
0.04024319723248482,
-0.11744088679552078,
-0.49004867672920227,
-0.6061119437217712,
0.11520854383707047,
0.24548174440860748,
0.30733659863471985,
-0.0892673060297966,
-0.3613360524177551,
0.11647601425647736,
0.11813557147979736,
0.06809933483600616,
0.20681898295879364,
0.4097331464290619,
0.2663404047489166,
0.011945225298404694,
0.3739323914051056,
0.2714996933937073,
-0.06286460906267166,
-0.025799883529543877,
-0.08621241897344589,
0.004246249794960022,
-0.24589845538139343,
-0.049845580011606216,
0.42578721046447754,
-0.34425854682922363,
-0.11349939554929733,
0.11736315488815308,
0.03534415736794472,
-0.12134968489408493,
0.0494542196393013,
-0.018772143870592117,
0.11645972728729248,
0.4388580918312073,
0.2584182322025299,
0.03499714285135269,
0.14504335820674896,
-0.18511928617954254,
-0.02827743999660015,
0.236441969871521,
-0.1324140727519989,
-0.3404768407344818,
-0.1883571743965149,
0.10112971067428589,
0.017073964700102806,
0.049913886934518814,
-0.21830621361732483,
-0.13303667306900024,
0.12284969538450241,
-0.01846083253622055,
0.14428822696208954,
-0.10070231556892395,
-0.2660652995109558,
-0.33979490399360657,
-0.10151435434818268,
0.831439197063446,
-0.5272637605667114,
0.14024010300636292,
-0.11474518477916718,
-0.3047669529914856,
0.10724993050098419,
0.33119720220565796,
-0.07649996131658554,
0.11135618388652802,
-0.21448294818401337,
0.15164579451084137,
-0.1357123702764511,
-0.36808520555496216,
-0.17889684438705444,
0.3780059814453125,
-0.017754195258021355,
-0.10367991030216217,
0.243734210729599,
-0.03900797665119171,
0.044486138969659805,
-0.20335638523101807,
-0.08980152010917664,
0.13412828743457794,
0.13846130669116974,
0.2605629563331604,
0.22497494518756866,
0.0075678336434066296,
0.23220953345298767,
0.31242290139198303,
0.05534474924206734,
-0.06275084614753723,
0.29186710715293884,
-0.2186995893716812,
0.18955236673355103,
-0.3010885715484619,
0.22454576194286346,
0.4166681170463562,
0.11581961065530777,
0.30919742584228516,
0.0332210473716259,
-0.23222291469573975,
-0.4455738663673401,
0.2652016282081604,
0.30548208951950073,
-0.12395830452442169,
0.046902723610401154,
-0.2565838396549225,
-0.1502390056848526,
0.2109268456697464,
-0.3883989155292511,
0.11677076667547226,
0.08991146087646484,
0.2979709804058075,
-0.17740240693092346,
-0.320898175239563,
0.03454112261533737,
0.05634499713778496,
-0.24442991614341736,
-0.11113449186086655,
-0.15343260765075684,
0.03845883905887604,
-0.30667033791542053,
0.018042219802737236,
0.20494382083415985,
-0.014822148717939854,
0.4157698154449463,
-0.07438017427921295,
0.0026424098759889603,
0.3591325581073761,
0.2803247272968292,
-0.036778390407562256,
0.0367964468896389,
0.09830942004919052,
-0.226127490401268,
0.07714414596557617,
0.12725774943828583,
-0.009582010097801685,
0.09168653190135956,
-0.10252314060926437,
-0.025553790852427483,
0.1265099197626114,
-0.22595010697841644,
0.00411235261708498,
-0.2879074215888977,
0.1314649134874344,
-0.009617738425731659,
0.02488372102379799,
-0.024605808779597282,
-0.21992652118206024,
0.35938093066215515,
0.509636640548706,
-0.32853540778160095,
-0.04535827785730362,
-0.10262961685657501,
-0.051507387310266495,
0.27939268946647644,
-0.1505599021911621,
-0.13286170363426208,
0.0687069296836853,
0.09919100999832153,
0.28524383902549744,
0.197903573513031,
0.22638249397277832,
0.43857404589653015,
0.06445952504873276,
-0.1653028130531311,
0.052950773388147354,
0.20327651500701904,
-0.052806656807661057,
0.14838601648807526,
-0.33531004190444946,
0.07930485904216766,
0.26033496856689453,
-0.29921022057533264,
0.12752613425254822,
-0.3775516748428345,
-0.14033342897891998,
0.14408698678016663,
0.3369530141353607,
-0.5138479471206665,
-0.13262996077537537,
-0.014959173277020454,
-0.13346071541309357,
0.11050901561975479,
-0.31558096408843994,
-0.2831479609012604,
0.01302754133939743,
-0.2013537734746933,
0.16264142096042633,
-0.273262619972229,
-0.1256408393383026,
-0.4015873968601227,
0.057359691709280014,
0.2376943826675415,
-0.003173091681674123,
-0.021724846214056015,
0.0865616500377655,
-0.023845527321100235,
0.014601881615817547,
0.49329566955566406,
-0.282974511384964,
0.43707337975502014,
-0.12667077779769897,
0.3814791440963745,
-0.2898304760456085,
0.10609053075313568,
-0.247593492269516,
-0.33447399735450745,
0.32037490606307983,
0.24623413383960724,
0.09838900715112686,
-0.02624513767659664,
-0.20588068664073944,
0.11958619952201843,
-0.12245867401361465,
-0.08116360008716583,
0.1755107194185257,
0.3042164146900177,
-0.5918184518814087,
-0.2506392002105713,
-0.15341530740261078,
-0.20429271459579468,
-0.35339510440826416,
0.2209896743297577,
0.1355350762605667,
0.31105437874794006,
0.20728610455989838,
-0.1218603104352951,
0.053025614470243454,
0.043456219136714935,
0.3111530840396881,
-0.3197953402996063,
-0.09646189957857132,
0.013731667771935463,
-0.15026594698429108,
-0.5285492539405823,
0.22050663828849792,
0.3835147023200989,
-0.12172222137451172,
0.10918422043323517,
-0.11583898216485977,
0.1251097023487091,
-0.21409806609153748,
0.2546708881855011,
-0.22828784584999084,
0.16625820100307465,
0.1928662657737732,
0.07349172234535217,
0.08055673539638519,
-0.16946622729301453,
-0.09909417480230331,
-0.34508997201919556,
-0.24387535452842712,
-0.26461073756217957,
0.1542905867099762,
0.333039790391922,
-0.13151422142982483,
0.21499387919902802,
0.34262093901634216,
0.22642606496810913,
0.4461936354637146,
-0.1276845484972,
0.431676983833313,
0.28185197710990906,
-0.6437911987304688,
0.15215790271759033,
-0.1861303299665451,
-0.05307263508439064,
0.36015957593917847,
-0.07771116495132446,
0.02947266399860382,
-0.15745535492897034,
0.05830611288547516,
-0.3378964066505432,
-0.21079275012016296,
-0.007261446211487055,
-0.25675615668296814,
0.2782018184661865,
-0.14798952639102936,
0.00729667441919446,
-0.28088417649269104,
-0.0628952905535698,
0.00547166308388114,
0.5689313411712646,
0.11677451431751251,
-0.061601486057043076,
-0.3760634660720825,
0.007870914414525032,
-0.48560255765914917,
0.26964718103408813,
0.062452465295791626,
0.609194278717041,
-0.15552616119384766,
0.03150325268507004,
0.14377819001674652,
0.10852577537298203,
0.901046097278595,
-0.4391021132469177,
0.27638885378837585,
0.24810054898262024,
0.11669385433197021,
-0.2631775140762329,
-0.21154141426086426,
-0.2682221829891205,
0.06743516027927399,
-0.013137292116880417,
0.30300721526145935,
0.011896380223333836,
-0.39370378851890564,
0.033997539430856705,
-0.15305139124393463,
-0.07940886169672012,
-0.4198119640350342,
-0.25355225801467896,
-0.18152344226837158,
-0.37714919447898865,
-0.10418163239955902,
0.23979423940181732,
0.163442924618721,
-0.2563316822052002,
0.24971717596054077,
-0.02241070382297039,
0.288222074508667,
0.11481187492609024,
-0.04067469388246536,
0.10160727053880692,
0.3072131872177124,
0.07862698286771774,
-0.08094605803489685,
0.12363231927156448,
0.2123340368270874,
0.5588173866271973,
-0.026124360039830208,
-0.36479902267456055,
-0.11076738685369492,
-0.0270075760781765,
0.48489469289779663,
0.08459767699241638,
-0.15330393612384796,
0.10140515118837357,
-0.2211102843284607,
-0.05864468961954117,
-0.3480154573917389,
0.0739530697464943,
0.2731055021286011,
-0.05154263228178024,
0.05953611433506012,
-0.21576136350631714,
0.3164066672325134,
0.17232654988765717,
-0.19433709979057312,
-0.0005694972351193428,
0.14229919016361237,
-0.2947746217250824,
-0.09350652247667313,
0.051075782626867294,
0.502305269241333,
-0.29400670528411865,
0.2797783613204956,
0.1955997347831726,
-0.16591055691242218,
-0.0711432620882988,
0.2135722041130066,
-0.08469624072313309,
-0.4017238914966583,
-0.3005032539367676,
-0.013430112972855568,
-0.10526709258556366,
-0.005474497564136982,
0.1585412323474884,
0.0849551409482956,
0.040023695677518845,
-0.09241444617509842,
0.3835967779159546,
0.031760625541210175,
0.05969305336475372,
-0.20207540690898895,
-0.24410486221313477,
0.10191043466329575,
0.15196867287158966,
-0.13610020279884338,
-0.023572472855448723,
-0.131158709526062,
0.01354366447776556,
0.15342453122138977,
0.02391842007637024,
-0.3978714346885681,
0.28555580973625183,
-0.3279966413974762,
0.010729544796049595,
-0.13602356612682343,
0.09473980963230133,
0.5240969657897949,
0.4402706027030945,
-0.006493385881185532,
0.14545460045337677,
-0.2531164884567261,
-0.2666570842266083,
0.15409359335899353,
-0.2917834520339966,
-0.2915794551372528,
-0.023664703592658043,
0.25473663210868835,
0.021281221881508827,
-0.3019714653491974,
-0.19220398366451263,
-0.03317756578326225,
-0.24326898157596588,
-0.06305961310863495,
0.4675464630126953,
0.11878694593906403,
-0.5070376396179199,
-0.16829389333724976,
-0.2320503145456314,
-0.05840040743350983,
0.0715506374835968,
0.1030866801738739,
0.15286172926425934,
-0.1085437685251236,
0.06198245286941528,
-0.27451902627944946,
-0.26996421813964844,
0.06998230516910553,
0.4720025062561035,
-0.2750084698200226,
0.1021837666630745,
0.5445803999900818,
0.4029547870159149,
-0.16026072204113007,
-0.24238744378089905,
0.08464669436216354,
0.08002913743257523,
-0.21358874440193176,
0.0007553104660473764,
0.3120196759700775,
0.045267246663570404,
0.42067673802375793,
0.06798279285430908,
0.2228616178035736,
-0.4020855128765106,
0.1897781938314438,
-0.4625520408153534,
-0.11029934883117676,
-0.08787958323955536,
-0.1858241707086563,
0.312094509601593,
0.09340938180685043,
-0.1442580670118332,
0.03031269833445549,
-0.23342265188694,
-0.29327473044395447,
0.11278598010540009,
-0.002598602557554841,
0.11875805258750916,
0.4522459805011749,
-0.22970905900001526,
-0.0856507271528244,
-0.021958444267511368,
0.06365711241960526,
-0.14817753434181213,
-0.17814184725284576,
-0.20583891868591309,
0.003955224063247442,
0.11139517277479172,
0.18786470592021942,
-0.33875060081481934,
0.08584076166152954,
-0.54035484790802,
-0.2182607650756836,
-0.1620229184627533,
0.20662888884544373,
0.29495829343795776,
-0.11388129740953445,
0.4738370478153229,
0.0064517538994550705,
-0.014876222237944603,
0.021233873441815376,
0.19102808833122253,
-0.19150955975055695,
0.08594752848148346,
-0.3789152503013611,
0.4132499098777771,
0.02589324489235878,
-0.08544839918613434,
-0.3049197793006897,
0.24929122626781464,
0.24214065074920654,
0.17750513553619385,
0.13646769523620605,
-0.2938653826713562,
0.045284368097782135,
0.12577524781227112,
0.5298550724983215,
0.09405386447906494,
-0.31138214468955994,
0.03052789717912674,
0.14044655859470367,
0.20375463366508484,
-0.3257118761539459,
-0.15713509917259216,
-0.26508408784866333,
-0.11846097558736801,
-0.06244703754782677,
0.11541694402694702,
0.011267448775470257,
-0.34119802713394165,
-0.08927713334560394,
-0.11548864096403122,
0.29706013202667236,
0.22717803716659546,
-0.09396518766880035,
0.544129490852356,
0.0009059013100340962,
-0.029702546074986458,
0.3708812892436981,
0.549860417842865,
0.050036802887916565,
0.4243814945220947,
0.19492965936660767,
-0.10301113873720169,
-0.1730053573846817,
0.026519766077399254,
-0.005095122382044792,
-0.7224719524383545,
0.19037577509880066,
-0.08952489495277405,
-0.015327654778957367,
0.007098503410816193,
-0.18461960554122925,
0.4962289035320282,
-0.11423006653785706,
-0.017531367018818855,
-0.38817182183265686,
0.15122061967849731,
-0.2028815597295761,
-0.16554054617881775,
-0.4238615334033966,
0.0989476665854454,
-0.08774839341640472,
-0.020538149401545525,
-0.12521636486053467,
-0.2460024356842041,
0.0037853149697184563,
0.22845809161663055,
-0.03257928416132927,
-0.21356502175331116,
0.34927138686180115,
0.25295135378837585,
-0.1378229409456253,
-0.38743653893470764,
-0.0780467763543129,
-0.05778665840625763,
0.12036643177270889,
0.13293270766735077,
0.02223414182662964,
0.6245725750923157,
0.3318484425544739,
-0.05589454993605614,
-0.012673655524849892,
0.012963559478521347,
-0.03145916387438774,
-0.035633545368909836,
0.38662615418434143,
-0.21388040482997894,
0.3700493574142456,
0.34041404724121094,
0.09749654680490494,
-0.05886458605527878,
-0.06138582527637482,
0.0397348590195179,
-0.1048278957605362,
-0.08498881757259369,
-0.03841378912329674,
-0.3763241171836853,
-0.25856003165245056,
-0.16248604655265808,
0.10234689712524414,
-0.08691509813070297,
-0.022329188883304596,
0.6900109052658081,
0.15030673146247864,
0.34198930859565735,
-0.33782756328582764,
0.06619603931903839,
0.029575077816843987,
0.4036605656147003,
0.47015807032585144,
0.07601282745599747,
-0.4037770628929138,
-0.0799950510263443,
-0.4968744218349457,
0.0621395967900753,
0.1211795061826706,
-0.1317167431116104,
0.17922812700271606,
-0.1361558884382248,
-0.013323133811354637,
-0.198521688580513,
-0.05734341964125633,
0.02972549758851528,
0.024238696321845055,
0.32170814275741577,
-0.008683606050908566,
-0.10772500187158585,
0.2655580937862396,
-0.06722390651702881,
0.14263081550598145,
-0.5638713836669922,
0.06713905930519104,
-0.221501886844635,
0.057566288858652115,
-0.4719407558441162,
0.08981998264789581,
0.1238536387681961,
0.1396857500076294,
0.24312764406204224,
0.015566209331154823,
0.3771502375602722,
-0.004346196074038744,
0.19138021767139435,
-0.5739655494689941,
0.0678086206316948,
-0.17265170812606812,
0.14340674877166748,
-0.135325089097023,
-0.025137199088931084,
-0.2696664035320282,
0.07280107587575912,
-0.09839770197868347,
0.11882511526346207,
-0.04688745364546776,
0.15276166796684265,
-0.051272518932819366,
0.12824289500713348,
-0.18334315717220306,
-0.04164702817797661,
0.2216355949640274,
-0.14370980858802795,
-0.18954461812973022,
0.3802648186683655,
-0.32337743043899536,
-0.3723747432231903,
0.46831777691841125,
-0.26504164934158325,
-0.25128820538520813,
0.013105539605021477,
0.3566478490829468,
-0.1201091781258583,
-0.16656732559204102,
-0.14391833543777466,
0.36254140734672546,
0.17249201238155365,
-0.004814753774553537,
-0.3380489945411682,
0.47139671444892883,
-0.20368441939353943,
-0.18481408059597015,
0.03641436621546745,
0.42348921298980713,
-0.008435610681772232,
-0.20798005163669586,
0.03416341170668602,
-0.11512692272663116
] |
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.1825570911169052,
0.1823851466178894,
-0.04003103822469711,
0.2590484619140625,
0.0813780203461647,
0.1336376667022705,
0.4580341875553131,
0.012254521250724792,
0.1864633411169052,
0.07412854582071304,
-0.06345562636852264,
-0.011226741597056389,
-0.1087961420416832,
0.15729273855686188,
-0.03236179053783417,
-0.028251171112060547,
0.14535057544708252,
0.048068806529045105,
0.03199739754199982,
0.13964581489562988,
-0.405230849981308,
-0.007120975758880377,
-0.23793615400791168,
0.10736636817455292,
-0.2231619954109192,
0.27834394574165344,
-0.015726491808891296,
0.39082881808280945,
-0.03380283713340759,
-0.23501825332641602,
0.2101651132106781,
0.36248573660850525,
0.6620944142341614,
0.24535299837589264,
-0.00011262849875492975,
-0.0484502874314785,
0.042043186724185944,
-0.020131828263401985,
0.20681922137737274,
0.2423870712518692,
0.13413847982883453,
-0.045187074691057205,
0.004125458188354969,
-0.10666897147893906,
-0.16983704268932343,
0.20000268518924713,
-0.06542990356683731,
-0.3538348972797394,
0.11399807780981064,
0.4263346195220947,
0.18719588220119476,
0.24746236205101013,
-0.18068772554397583,
-0.010653744451701641,
0.5910392999649048,
0.04759823530912399,
-0.12615948915481567,
0.1927935779094696,
0.29002419114112854,
-0.44280532002449036,
0.21414141356945038,
0.16098226606845856,
-0.226858451962471,
0.0855403020977974,
0.38182690739631653,
-0.16326357424259186,
-0.12995696067810059,
-0.2830389738082886,
0.1584060937166214,
0.00005307537503540516,
0.7270634174346924,
-0.16924333572387695,
-0.30099228024482727,
-0.0341043695807457,
0.13930882513523102,
-0.26716941595077515,
0.22750508785247803,
0.3365987539291382,
-0.050527121871709824,
0.07535825669765472,
-0.23470008373260498,
-0.16715088486671448,
-0.44340085983276367,
0.13589578866958618,
0.17750507593154907,
-0.22929832339286804,
-0.08493313193321228,
0.22970882058143616,
0.09066370129585266,
-0.1301722377538681,
0.35443300008773804,
0.12944373488426208,
0.041961729526519775,
0.25176000595092773,
-0.46714821457862854,
0.3360508978366852,
0.20927438139915466,
0.29802194237709045,
-0.03202706202864647,
0.27795010805130005,
-0.13617126643657684,
-0.21062752604484558,
0.20189836621284485,
0.1250198632478714,
0.17727436125278473,
-0.05427384003996849,
0.15196064114570618,
0.24112750589847565,
0.1375093311071396,
-0.022511063143610954,
0.04024319723248482,
-0.11744088679552078,
-0.49004867672920227,
-0.6061119437217712,
0.11520854383707047,
0.24548174440860748,
0.30733659863471985,
-0.0892673060297966,
-0.3613360524177551,
0.11647601425647736,
0.11813557147979736,
0.06809933483600616,
0.20681898295879364,
0.4097331464290619,
0.2663404047489166,
0.011945225298404694,
0.3739323914051056,
0.2714996933937073,
-0.06286460906267166,
-0.025799883529543877,
-0.08621241897344589,
0.004246249794960022,
-0.24589845538139343,
-0.049845580011606216,
0.42578721046447754,
-0.34425854682922363,
-0.11349939554929733,
0.11736315488815308,
0.03534415736794472,
-0.12134968489408493,
0.0494542196393013,
-0.018772143870592117,
0.11645972728729248,
0.4388580918312073,
0.2584182322025299,
0.03499714285135269,
0.14504335820674896,
-0.18511928617954254,
-0.02827743999660015,
0.236441969871521,
-0.1324140727519989,
-0.3404768407344818,
-0.1883571743965149,
0.10112971067428589,
0.017073964700102806,
0.049913886934518814,
-0.21830621361732483,
-0.13303667306900024,
0.12284969538450241,
-0.01846083253622055,
0.14428822696208954,
-0.10070231556892395,
-0.2660652995109558,
-0.33979490399360657,
-0.10151435434818268,
0.831439197063446,
-0.5272637605667114,
0.14024010300636292,
-0.11474518477916718,
-0.3047669529914856,
0.10724993050098419,
0.33119720220565796,
-0.07649996131658554,
0.11135618388652802,
-0.21448294818401337,
0.15164579451084137,
-0.1357123702764511,
-0.36808520555496216,
-0.17889684438705444,
0.3780059814453125,
-0.017754195258021355,
-0.10367991030216217,
0.243734210729599,
-0.03900797665119171,
0.044486138969659805,
-0.20335638523101807,
-0.08980152010917664,
0.13412828743457794,
0.13846130669116974,
0.2605629563331604,
0.22497494518756866,
0.0075678336434066296,
0.23220953345298767,
0.31242290139198303,
0.05534474924206734,
-0.06275084614753723,
0.29186710715293884,
-0.2186995893716812,
0.18955236673355103,
-0.3010885715484619,
0.22454576194286346,
0.4166681170463562,
0.11581961065530777,
0.30919742584228516,
0.0332210473716259,
-0.23222291469573975,
-0.4455738663673401,
0.2652016282081604,
0.30548208951950073,
-0.12395830452442169,
0.046902723610401154,
-0.2565838396549225,
-0.1502390056848526,
0.2109268456697464,
-0.3883989155292511,
0.11677076667547226,
0.08991146087646484,
0.2979709804058075,
-0.17740240693092346,
-0.320898175239563,
0.03454112261533737,
0.05634499713778496,
-0.24442991614341736,
-0.11113449186086655,
-0.15343260765075684,
0.03845883905887604,
-0.30667033791542053,
0.018042219802737236,
0.20494382083415985,
-0.014822148717939854,
0.4157698154449463,
-0.07438017427921295,
0.0026424098759889603,
0.3591325581073761,
0.2803247272968292,
-0.036778390407562256,
0.0367964468896389,
0.09830942004919052,
-0.226127490401268,
0.07714414596557617,
0.12725774943828583,
-0.009582010097801685,
0.09168653190135956,
-0.10252314060926437,
-0.025553790852427483,
0.1265099197626114,
-0.22595010697841644,
0.00411235261708498,
-0.2879074215888977,
0.1314649134874344,
-0.009617738425731659,
0.02488372102379799,
-0.024605808779597282,
-0.21992652118206024,
0.35938093066215515,
0.509636640548706,
-0.32853540778160095,
-0.04535827785730362,
-0.10262961685657501,
-0.051507387310266495,
0.27939268946647644,
-0.1505599021911621,
-0.13286170363426208,
0.0687069296836853,
0.09919100999832153,
0.28524383902549744,
0.197903573513031,
0.22638249397277832,
0.43857404589653015,
0.06445952504873276,
-0.1653028130531311,
0.052950773388147354,
0.20327651500701904,
-0.052806656807661057,
0.14838601648807526,
-0.33531004190444946,
0.07930485904216766,
0.26033496856689453,
-0.29921022057533264,
0.12752613425254822,
-0.3775516748428345,
-0.14033342897891998,
0.14408698678016663,
0.3369530141353607,
-0.5138479471206665,
-0.13262996077537537,
-0.014959173277020454,
-0.13346071541309357,
0.11050901561975479,
-0.31558096408843994,
-0.2831479609012604,
0.01302754133939743,
-0.2013537734746933,
0.16264142096042633,
-0.273262619972229,
-0.1256408393383026,
-0.4015873968601227,
0.057359691709280014,
0.2376943826675415,
-0.003173091681674123,
-0.021724846214056015,
0.0865616500377655,
-0.023845527321100235,
0.014601881615817547,
0.49329566955566406,
-0.282974511384964,
0.43707337975502014,
-0.12667077779769897,
0.3814791440963745,
-0.2898304760456085,
0.10609053075313568,
-0.247593492269516,
-0.33447399735450745,
0.32037490606307983,
0.24623413383960724,
0.09838900715112686,
-0.02624513767659664,
-0.20588068664073944,
0.11958619952201843,
-0.12245867401361465,
-0.08116360008716583,
0.1755107194185257,
0.3042164146900177,
-0.5918184518814087,
-0.2506392002105713,
-0.15341530740261078,
-0.20429271459579468,
-0.35339510440826416,
0.2209896743297577,
0.1355350762605667,
0.31105437874794006,
0.20728610455989838,
-0.1218603104352951,
0.053025614470243454,
0.043456219136714935,
0.3111530840396881,
-0.3197953402996063,
-0.09646189957857132,
0.013731667771935463,
-0.15026594698429108,
-0.5285492539405823,
0.22050663828849792,
0.3835147023200989,
-0.12172222137451172,
0.10918422043323517,
-0.11583898216485977,
0.1251097023487091,
-0.21409806609153748,
0.2546708881855011,
-0.22828784584999084,
0.16625820100307465,
0.1928662657737732,
0.07349172234535217,
0.08055673539638519,
-0.16946622729301453,
-0.09909417480230331,
-0.34508997201919556,
-0.24387535452842712,
-0.26461073756217957,
0.1542905867099762,
0.333039790391922,
-0.13151422142982483,
0.21499387919902802,
0.34262093901634216,
0.22642606496810913,
0.4461936354637146,
-0.1276845484972,
0.431676983833313,
0.28185197710990906,
-0.6437911987304688,
0.15215790271759033,
-0.1861303299665451,
-0.05307263508439064,
0.36015957593917847,
-0.07771116495132446,
0.02947266399860382,
-0.15745535492897034,
0.05830611288547516,
-0.3378964066505432,
-0.21079275012016296,
-0.007261446211487055,
-0.25675615668296814,
0.2782018184661865,
-0.14798952639102936,
0.00729667441919446,
-0.28088417649269104,
-0.0628952905535698,
0.00547166308388114,
0.5689313411712646,
0.11677451431751251,
-0.061601486057043076,
-0.3760634660720825,
0.007870914414525032,
-0.48560255765914917,
0.26964718103408813,
0.062452465295791626,
0.609194278717041,
-0.15552616119384766,
0.03150325268507004,
0.14377819001674652,
0.10852577537298203,
0.901046097278595,
-0.4391021132469177,
0.27638885378837585,
0.24810054898262024,
0.11669385433197021,
-0.2631775140762329,
-0.21154141426086426,
-0.2682221829891205,
0.06743516027927399,
-0.013137292116880417,
0.30300721526145935,
0.011896380223333836,
-0.39370378851890564,
0.033997539430856705,
-0.15305139124393463,
-0.07940886169672012,
-0.4198119640350342,
-0.25355225801467896,
-0.18152344226837158,
-0.37714919447898865,
-0.10418163239955902,
0.23979423940181732,
0.163442924618721,
-0.2563316822052002,
0.24971717596054077,
-0.02241070382297039,
0.288222074508667,
0.11481187492609024,
-0.04067469388246536,
0.10160727053880692,
0.3072131872177124,
0.07862698286771774,
-0.08094605803489685,
0.12363231927156448,
0.2123340368270874,
0.5588173866271973,
-0.026124360039830208,
-0.36479902267456055,
-0.11076738685369492,
-0.0270075760781765,
0.48489469289779663,
0.08459767699241638,
-0.15330393612384796,
0.10140515118837357,
-0.2211102843284607,
-0.05864468961954117,
-0.3480154573917389,
0.0739530697464943,
0.2731055021286011,
-0.05154263228178024,
0.05953611433506012,
-0.21576136350631714,
0.3164066672325134,
0.17232654988765717,
-0.19433709979057312,
-0.0005694972351193428,
0.14229919016361237,
-0.2947746217250824,
-0.09350652247667313,
0.051075782626867294,
0.502305269241333,
-0.29400670528411865,
0.2797783613204956,
0.1955997347831726,
-0.16591055691242218,
-0.0711432620882988,
0.2135722041130066,
-0.08469624072313309,
-0.4017238914966583,
-0.3005032539367676,
-0.013430112972855568,
-0.10526709258556366,
-0.005474497564136982,
0.1585412323474884,
0.0849551409482956,
0.040023695677518845,
-0.09241444617509842,
0.3835967779159546,
0.031760625541210175,
0.05969305336475372,
-0.20207540690898895,
-0.24410486221313477,
0.10191043466329575,
0.15196867287158966,
-0.13610020279884338,
-0.023572472855448723,
-0.131158709526062,
0.01354366447776556,
0.15342453122138977,
0.02391842007637024,
-0.3978714346885681,
0.28555580973625183,
-0.3279966413974762,
0.010729544796049595,
-0.13602356612682343,
0.09473980963230133,
0.5240969657897949,
0.4402706027030945,
-0.006493385881185532,
0.14545460045337677,
-0.2531164884567261,
-0.2666570842266083,
0.15409359335899353,
-0.2917834520339966,
-0.2915794551372528,
-0.023664703592658043,
0.25473663210868835,
0.021281221881508827,
-0.3019714653491974,
-0.19220398366451263,
-0.03317756578326225,
-0.24326898157596588,
-0.06305961310863495,
0.4675464630126953,
0.11878694593906403,
-0.5070376396179199,
-0.16829389333724976,
-0.2320503145456314,
-0.05840040743350983,
0.0715506374835968,
0.1030866801738739,
0.15286172926425934,
-0.1085437685251236,
0.06198245286941528,
-0.27451902627944946,
-0.26996421813964844,
0.06998230516910553,
0.4720025062561035,
-0.2750084698200226,
0.1021837666630745,
0.5445803999900818,
0.4029547870159149,
-0.16026072204113007,
-0.24238744378089905,
0.08464669436216354,
0.08002913743257523,
-0.21358874440193176,
0.0007553104660473764,
0.3120196759700775,
0.045267246663570404,
0.42067673802375793,
0.06798279285430908,
0.2228616178035736,
-0.4020855128765106,
0.1897781938314438,
-0.4625520408153534,
-0.11029934883117676,
-0.08787958323955536,
-0.1858241707086563,
0.312094509601593,
0.09340938180685043,
-0.1442580670118332,
0.03031269833445549,
-0.23342265188694,
-0.29327473044395447,
0.11278598010540009,
-0.002598602557554841,
0.11875805258750916,
0.4522459805011749,
-0.22970905900001526,
-0.0856507271528244,
-0.021958444267511368,
0.06365711241960526,
-0.14817753434181213,
-0.17814184725284576,
-0.20583891868591309,
0.003955224063247442,
0.11139517277479172,
0.18786470592021942,
-0.33875060081481934,
0.08584076166152954,
-0.54035484790802,
-0.2182607650756836,
-0.1620229184627533,
0.20662888884544373,
0.29495829343795776,
-0.11388129740953445,
0.4738370478153229,
0.0064517538994550705,
-0.014876222237944603,
0.021233873441815376,
0.19102808833122253,
-0.19150955975055695,
0.08594752848148346,
-0.3789152503013611,
0.4132499098777771,
0.02589324489235878,
-0.08544839918613434,
-0.3049197793006897,
0.24929122626781464,
0.24214065074920654,
0.17750513553619385,
0.13646769523620605,
-0.2938653826713562,
0.045284368097782135,
0.12577524781227112,
0.5298550724983215,
0.09405386447906494,
-0.31138214468955994,
0.03052789717912674,
0.14044655859470367,
0.20375463366508484,
-0.3257118761539459,
-0.15713509917259216,
-0.26508408784866333,
-0.11846097558736801,
-0.06244703754782677,
0.11541694402694702,
0.011267448775470257,
-0.34119802713394165,
-0.08927713334560394,
-0.11548864096403122,
0.29706013202667236,
0.22717803716659546,
-0.09396518766880035,
0.544129490852356,
0.0009059013100340962,
-0.029702546074986458,
0.3708812892436981,
0.549860417842865,
0.050036802887916565,
0.4243814945220947,
0.19492965936660767,
-0.10301113873720169,
-0.1730053573846817,
0.026519766077399254,
-0.005095122382044792,
-0.7224719524383545,
0.19037577509880066,
-0.08952489495277405,
-0.015327654778957367,
0.007098503410816193,
-0.18461960554122925,
0.4962289035320282,
-0.11423006653785706,
-0.017531367018818855,
-0.38817182183265686,
0.15122061967849731,
-0.2028815597295761,
-0.16554054617881775,
-0.4238615334033966,
0.0989476665854454,
-0.08774839341640472,
-0.020538149401545525,
-0.12521636486053467,
-0.2460024356842041,
0.0037853149697184563,
0.22845809161663055,
-0.03257928416132927,
-0.21356502175331116,
0.34927138686180115,
0.25295135378837585,
-0.1378229409456253,
-0.38743653893470764,
-0.0780467763543129,
-0.05778665840625763,
0.12036643177270889,
0.13293270766735077,
0.02223414182662964,
0.6245725750923157,
0.3318484425544739,
-0.05589454993605614,
-0.012673655524849892,
0.012963559478521347,
-0.03145916387438774,
-0.035633545368909836,
0.38662615418434143,
-0.21388040482997894,
0.3700493574142456,
0.34041404724121094,
0.09749654680490494,
-0.05886458605527878,
-0.06138582527637482,
0.0397348590195179,
-0.1048278957605362,
-0.08498881757259369,
-0.03841378912329674,
-0.3763241171836853,
-0.25856003165245056,
-0.16248604655265808,
0.10234689712524414,
-0.08691509813070297,
-0.022329188883304596,
0.6900109052658081,
0.15030673146247864,
0.34198930859565735,
-0.33782756328582764,
0.06619603931903839,
0.029575077816843987,
0.4036605656147003,
0.47015807032585144,
0.07601282745599747,
-0.4037770628929138,
-0.0799950510263443,
-0.4968744218349457,
0.0621395967900753,
0.1211795061826706,
-0.1317167431116104,
0.17922812700271606,
-0.1361558884382248,
-0.013323133811354637,
-0.198521688580513,
-0.05734341964125633,
0.02972549758851528,
0.024238696321845055,
0.32170814275741577,
-0.008683606050908566,
-0.10772500187158585,
0.2655580937862396,
-0.06722390651702881,
0.14263081550598145,
-0.5638713836669922,
0.06713905930519104,
-0.221501886844635,
0.057566288858652115,
-0.4719407558441162,
0.08981998264789581,
0.1238536387681961,
0.1396857500076294,
0.24312764406204224,
0.015566209331154823,
0.3771502375602722,
-0.004346196074038744,
0.19138021767139435,
-0.5739655494689941,
0.0678086206316948,
-0.17265170812606812,
0.14340674877166748,
-0.135325089097023,
-0.025137199088931084,
-0.2696664035320282,
0.07280107587575912,
-0.09839770197868347,
0.11882511526346207,
-0.04688745364546776,
0.15276166796684265,
-0.051272518932819366,
0.12824289500713348,
-0.18334315717220306,
-0.04164702817797661,
0.2216355949640274,
-0.14370980858802795,
-0.18954461812973022,
0.3802648186683655,
-0.32337743043899536,
-0.3723747432231903,
0.46831777691841125,
-0.26504164934158325,
-0.25128820538520813,
0.013105539605021477,
0.3566478490829468,
-0.1201091781258583,
-0.16656732559204102,
-0.14391833543777466,
0.36254140734672546,
0.17249201238155365,
-0.004814753774553537,
-0.3380489945411682,
0.47139671444892883,
-0.20368441939353943,
-0.18481408059597015,
0.03641436621546745,
0.42348921298980713,
-0.008435610681772232,
-0.20798005163669586,
0.03416341170668602,
-0.11512692272663116
] |
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.1825570911169052,
0.1823851466178894,
-0.04003103822469711,
0.2590484619140625,
0.0813780203461647,
0.1336376667022705,
0.4580341875553131,
0.012254521250724792,
0.1864633411169052,
0.07412854582071304,
-0.06345562636852264,
-0.011226741597056389,
-0.1087961420416832,
0.15729273855686188,
-0.03236179053783417,
-0.028251171112060547,
0.14535057544708252,
0.048068806529045105,
0.03199739754199982,
0.13964581489562988,
-0.405230849981308,
-0.007120975758880377,
-0.23793615400791168,
0.10736636817455292,
-0.2231619954109192,
0.27834394574165344,
-0.015726491808891296,
0.39082881808280945,
-0.03380283713340759,
-0.23501825332641602,
0.2101651132106781,
0.36248573660850525,
0.6620944142341614,
0.24535299837589264,
-0.00011262849875492975,
-0.0484502874314785,
0.042043186724185944,
-0.020131828263401985,
0.20681922137737274,
0.2423870712518692,
0.13413847982883453,
-0.045187074691057205,
0.004125458188354969,
-0.10666897147893906,
-0.16983704268932343,
0.20000268518924713,
-0.06542990356683731,
-0.3538348972797394,
0.11399807780981064,
0.4263346195220947,
0.18719588220119476,
0.24746236205101013,
-0.18068772554397583,
-0.010653744451701641,
0.5910392999649048,
0.04759823530912399,
-0.12615948915481567,
0.1927935779094696,
0.29002419114112854,
-0.44280532002449036,
0.21414141356945038,
0.16098226606845856,
-0.226858451962471,
0.0855403020977974,
0.38182690739631653,
-0.16326357424259186,
-0.12995696067810059,
-0.2830389738082886,
0.1584060937166214,
0.00005307537503540516,
0.7270634174346924,
-0.16924333572387695,
-0.30099228024482727,
-0.0341043695807457,
0.13930882513523102,
-0.26716941595077515,
0.22750508785247803,
0.3365987539291382,
-0.050527121871709824,
0.07535825669765472,
-0.23470008373260498,
-0.16715088486671448,
-0.44340085983276367,
0.13589578866958618,
0.17750507593154907,
-0.22929832339286804,
-0.08493313193321228,
0.22970882058143616,
0.09066370129585266,
-0.1301722377538681,
0.35443300008773804,
0.12944373488426208,
0.041961729526519775,
0.25176000595092773,
-0.46714821457862854,
0.3360508978366852,
0.20927438139915466,
0.29802194237709045,
-0.03202706202864647,
0.27795010805130005,
-0.13617126643657684,
-0.21062752604484558,
0.20189836621284485,
0.1250198632478714,
0.17727436125278473,
-0.05427384003996849,
0.15196064114570618,
0.24112750589847565,
0.1375093311071396,
-0.022511063143610954,
0.04024319723248482,
-0.11744088679552078,
-0.49004867672920227,
-0.6061119437217712,
0.11520854383707047,
0.24548174440860748,
0.30733659863471985,
-0.0892673060297966,
-0.3613360524177551,
0.11647601425647736,
0.11813557147979736,
0.06809933483600616,
0.20681898295879364,
0.4097331464290619,
0.2663404047489166,
0.011945225298404694,
0.3739323914051056,
0.2714996933937073,
-0.06286460906267166,
-0.025799883529543877,
-0.08621241897344589,
0.004246249794960022,
-0.24589845538139343,
-0.049845580011606216,
0.42578721046447754,
-0.34425854682922363,
-0.11349939554929733,
0.11736315488815308,
0.03534415736794472,
-0.12134968489408493,
0.0494542196393013,
-0.018772143870592117,
0.11645972728729248,
0.4388580918312073,
0.2584182322025299,
0.03499714285135269,
0.14504335820674896,
-0.18511928617954254,
-0.02827743999660015,
0.236441969871521,
-0.1324140727519989,
-0.3404768407344818,
-0.1883571743965149,
0.10112971067428589,
0.017073964700102806,
0.049913886934518814,
-0.21830621361732483,
-0.13303667306900024,
0.12284969538450241,
-0.01846083253622055,
0.14428822696208954,
-0.10070231556892395,
-0.2660652995109558,
-0.33979490399360657,
-0.10151435434818268,
0.831439197063446,
-0.5272637605667114,
0.14024010300636292,
-0.11474518477916718,
-0.3047669529914856,
0.10724993050098419,
0.33119720220565796,
-0.07649996131658554,
0.11135618388652802,
-0.21448294818401337,
0.15164579451084137,
-0.1357123702764511,
-0.36808520555496216,
-0.17889684438705444,
0.3780059814453125,
-0.017754195258021355,
-0.10367991030216217,
0.243734210729599,
-0.03900797665119171,
0.044486138969659805,
-0.20335638523101807,
-0.08980152010917664,
0.13412828743457794,
0.13846130669116974,
0.2605629563331604,
0.22497494518756866,
0.0075678336434066296,
0.23220953345298767,
0.31242290139198303,
0.05534474924206734,
-0.06275084614753723,
0.29186710715293884,
-0.2186995893716812,
0.18955236673355103,
-0.3010885715484619,
0.22454576194286346,
0.4166681170463562,
0.11581961065530777,
0.30919742584228516,
0.0332210473716259,
-0.23222291469573975,
-0.4455738663673401,
0.2652016282081604,
0.30548208951950073,
-0.12395830452442169,
0.046902723610401154,
-0.2565838396549225,
-0.1502390056848526,
0.2109268456697464,
-0.3883989155292511,
0.11677076667547226,
0.08991146087646484,
0.2979709804058075,
-0.17740240693092346,
-0.320898175239563,
0.03454112261533737,
0.05634499713778496,
-0.24442991614341736,
-0.11113449186086655,
-0.15343260765075684,
0.03845883905887604,
-0.30667033791542053,
0.018042219802737236,
0.20494382083415985,
-0.014822148717939854,
0.4157698154449463,
-0.07438017427921295,
0.0026424098759889603,
0.3591325581073761,
0.2803247272968292,
-0.036778390407562256,
0.0367964468896389,
0.09830942004919052,
-0.226127490401268,
0.07714414596557617,
0.12725774943828583,
-0.009582010097801685,
0.09168653190135956,
-0.10252314060926437,
-0.025553790852427483,
0.1265099197626114,
-0.22595010697841644,
0.00411235261708498,
-0.2879074215888977,
0.1314649134874344,
-0.009617738425731659,
0.02488372102379799,
-0.024605808779597282,
-0.21992652118206024,
0.35938093066215515,
0.509636640548706,
-0.32853540778160095,
-0.04535827785730362,
-0.10262961685657501,
-0.051507387310266495,
0.27939268946647644,
-0.1505599021911621,
-0.13286170363426208,
0.0687069296836853,
0.09919100999832153,
0.28524383902549744,
0.197903573513031,
0.22638249397277832,
0.43857404589653015,
0.06445952504873276,
-0.1653028130531311,
0.052950773388147354,
0.20327651500701904,
-0.052806656807661057,
0.14838601648807526,
-0.33531004190444946,
0.07930485904216766,
0.26033496856689453,
-0.29921022057533264,
0.12752613425254822,
-0.3775516748428345,
-0.14033342897891998,
0.14408698678016663,
0.3369530141353607,
-0.5138479471206665,
-0.13262996077537537,
-0.014959173277020454,
-0.13346071541309357,
0.11050901561975479,
-0.31558096408843994,
-0.2831479609012604,
0.01302754133939743,
-0.2013537734746933,
0.16264142096042633,
-0.273262619972229,
-0.1256408393383026,
-0.4015873968601227,
0.057359691709280014,
0.2376943826675415,
-0.003173091681674123,
-0.021724846214056015,
0.0865616500377655,
-0.023845527321100235,
0.014601881615817547,
0.49329566955566406,
-0.282974511384964,
0.43707337975502014,
-0.12667077779769897,
0.3814791440963745,
-0.2898304760456085,
0.10609053075313568,
-0.247593492269516,
-0.33447399735450745,
0.32037490606307983,
0.24623413383960724,
0.09838900715112686,
-0.02624513767659664,
-0.20588068664073944,
0.11958619952201843,
-0.12245867401361465,
-0.08116360008716583,
0.1755107194185257,
0.3042164146900177,
-0.5918184518814087,
-0.2506392002105713,
-0.15341530740261078,
-0.20429271459579468,
-0.35339510440826416,
0.2209896743297577,
0.1355350762605667,
0.31105437874794006,
0.20728610455989838,
-0.1218603104352951,
0.053025614470243454,
0.043456219136714935,
0.3111530840396881,
-0.3197953402996063,
-0.09646189957857132,
0.013731667771935463,
-0.15026594698429108,
-0.5285492539405823,
0.22050663828849792,
0.3835147023200989,
-0.12172222137451172,
0.10918422043323517,
-0.11583898216485977,
0.1251097023487091,
-0.21409806609153748,
0.2546708881855011,
-0.22828784584999084,
0.16625820100307465,
0.1928662657737732,
0.07349172234535217,
0.08055673539638519,
-0.16946622729301453,
-0.09909417480230331,
-0.34508997201919556,
-0.24387535452842712,
-0.26461073756217957,
0.1542905867099762,
0.333039790391922,
-0.13151422142982483,
0.21499387919902802,
0.34262093901634216,
0.22642606496810913,
0.4461936354637146,
-0.1276845484972,
0.431676983833313,
0.28185197710990906,
-0.6437911987304688,
0.15215790271759033,
-0.1861303299665451,
-0.05307263508439064,
0.36015957593917847,
-0.07771116495132446,
0.02947266399860382,
-0.15745535492897034,
0.05830611288547516,
-0.3378964066505432,
-0.21079275012016296,
-0.007261446211487055,
-0.25675615668296814,
0.2782018184661865,
-0.14798952639102936,
0.00729667441919446,
-0.28088417649269104,
-0.0628952905535698,
0.00547166308388114,
0.5689313411712646,
0.11677451431751251,
-0.061601486057043076,
-0.3760634660720825,
0.007870914414525032,
-0.48560255765914917,
0.26964718103408813,
0.062452465295791626,
0.609194278717041,
-0.15552616119384766,
0.03150325268507004,
0.14377819001674652,
0.10852577537298203,
0.901046097278595,
-0.4391021132469177,
0.27638885378837585,
0.24810054898262024,
0.11669385433197021,
-0.2631775140762329,
-0.21154141426086426,
-0.2682221829891205,
0.06743516027927399,
-0.013137292116880417,
0.30300721526145935,
0.011896380223333836,
-0.39370378851890564,
0.033997539430856705,
-0.15305139124393463,
-0.07940886169672012,
-0.4198119640350342,
-0.25355225801467896,
-0.18152344226837158,
-0.37714919447898865,
-0.10418163239955902,
0.23979423940181732,
0.163442924618721,
-0.2563316822052002,
0.24971717596054077,
-0.02241070382297039,
0.288222074508667,
0.11481187492609024,
-0.04067469388246536,
0.10160727053880692,
0.3072131872177124,
0.07862698286771774,
-0.08094605803489685,
0.12363231927156448,
0.2123340368270874,
0.5588173866271973,
-0.026124360039830208,
-0.36479902267456055,
-0.11076738685369492,
-0.0270075760781765,
0.48489469289779663,
0.08459767699241638,
-0.15330393612384796,
0.10140515118837357,
-0.2211102843284607,
-0.05864468961954117,
-0.3480154573917389,
0.0739530697464943,
0.2731055021286011,
-0.05154263228178024,
0.05953611433506012,
-0.21576136350631714,
0.3164066672325134,
0.17232654988765717,
-0.19433709979057312,
-0.0005694972351193428,
0.14229919016361237,
-0.2947746217250824,
-0.09350652247667313,
0.051075782626867294,
0.502305269241333,
-0.29400670528411865,
0.2797783613204956,
0.1955997347831726,
-0.16591055691242218,
-0.0711432620882988,
0.2135722041130066,
-0.08469624072313309,
-0.4017238914966583,
-0.3005032539367676,
-0.013430112972855568,
-0.10526709258556366,
-0.005474497564136982,
0.1585412323474884,
0.0849551409482956,
0.040023695677518845,
-0.09241444617509842,
0.3835967779159546,
0.031760625541210175,
0.05969305336475372,
-0.20207540690898895,
-0.24410486221313477,
0.10191043466329575,
0.15196867287158966,
-0.13610020279884338,
-0.023572472855448723,
-0.131158709526062,
0.01354366447776556,
0.15342453122138977,
0.02391842007637024,
-0.3978714346885681,
0.28555580973625183,
-0.3279966413974762,
0.010729544796049595,
-0.13602356612682343,
0.09473980963230133,
0.5240969657897949,
0.4402706027030945,
-0.006493385881185532,
0.14545460045337677,
-0.2531164884567261,
-0.2666570842266083,
0.15409359335899353,
-0.2917834520339966,
-0.2915794551372528,
-0.023664703592658043,
0.25473663210868835,
0.021281221881508827,
-0.3019714653491974,
-0.19220398366451263,
-0.03317756578326225,
-0.24326898157596588,
-0.06305961310863495,
0.4675464630126953,
0.11878694593906403,
-0.5070376396179199,
-0.16829389333724976,
-0.2320503145456314,
-0.05840040743350983,
0.0715506374835968,
0.1030866801738739,
0.15286172926425934,
-0.1085437685251236,
0.06198245286941528,
-0.27451902627944946,
-0.26996421813964844,
0.06998230516910553,
0.4720025062561035,
-0.2750084698200226,
0.1021837666630745,
0.5445803999900818,
0.4029547870159149,
-0.16026072204113007,
-0.24238744378089905,
0.08464669436216354,
0.08002913743257523,
-0.21358874440193176,
0.0007553104660473764,
0.3120196759700775,
0.045267246663570404,
0.42067673802375793,
0.06798279285430908,
0.2228616178035736,
-0.4020855128765106,
0.1897781938314438,
-0.4625520408153534,
-0.11029934883117676,
-0.08787958323955536,
-0.1858241707086563,
0.312094509601593,
0.09340938180685043,
-0.1442580670118332,
0.03031269833445549,
-0.23342265188694,
-0.29327473044395447,
0.11278598010540009,
-0.002598602557554841,
0.11875805258750916,
0.4522459805011749,
-0.22970905900001526,
-0.0856507271528244,
-0.021958444267511368,
0.06365711241960526,
-0.14817753434181213,
-0.17814184725284576,
-0.20583891868591309,
0.003955224063247442,
0.11139517277479172,
0.18786470592021942,
-0.33875060081481934,
0.08584076166152954,
-0.54035484790802,
-0.2182607650756836,
-0.1620229184627533,
0.20662888884544373,
0.29495829343795776,
-0.11388129740953445,
0.4738370478153229,
0.0064517538994550705,
-0.014876222237944603,
0.021233873441815376,
0.19102808833122253,
-0.19150955975055695,
0.08594752848148346,
-0.3789152503013611,
0.4132499098777771,
0.02589324489235878,
-0.08544839918613434,
-0.3049197793006897,
0.24929122626781464,
0.24214065074920654,
0.17750513553619385,
0.13646769523620605,
-0.2938653826713562,
0.045284368097782135,
0.12577524781227112,
0.5298550724983215,
0.09405386447906494,
-0.31138214468955994,
0.03052789717912674,
0.14044655859470367,
0.20375463366508484,
-0.3257118761539459,
-0.15713509917259216,
-0.26508408784866333,
-0.11846097558736801,
-0.06244703754782677,
0.11541694402694702,
0.011267448775470257,
-0.34119802713394165,
-0.08927713334560394,
-0.11548864096403122,
0.29706013202667236,
0.22717803716659546,
-0.09396518766880035,
0.544129490852356,
0.0009059013100340962,
-0.029702546074986458,
0.3708812892436981,
0.549860417842865,
0.050036802887916565,
0.4243814945220947,
0.19492965936660767,
-0.10301113873720169,
-0.1730053573846817,
0.026519766077399254,
-0.005095122382044792,
-0.7224719524383545,
0.19037577509880066,
-0.08952489495277405,
-0.015327654778957367,
0.007098503410816193,
-0.18461960554122925,
0.4962289035320282,
-0.11423006653785706,
-0.017531367018818855,
-0.38817182183265686,
0.15122061967849731,
-0.2028815597295761,
-0.16554054617881775,
-0.4238615334033966,
0.0989476665854454,
-0.08774839341640472,
-0.020538149401545525,
-0.12521636486053467,
-0.2460024356842041,
0.0037853149697184563,
0.22845809161663055,
-0.03257928416132927,
-0.21356502175331116,
0.34927138686180115,
0.25295135378837585,
-0.1378229409456253,
-0.38743653893470764,
-0.0780467763543129,
-0.05778665840625763,
0.12036643177270889,
0.13293270766735077,
0.02223414182662964,
0.6245725750923157,
0.3318484425544739,
-0.05589454993605614,
-0.012673655524849892,
0.012963559478521347,
-0.03145916387438774,
-0.035633545368909836,
0.38662615418434143,
-0.21388040482997894,
0.3700493574142456,
0.34041404724121094,
0.09749654680490494,
-0.05886458605527878,
-0.06138582527637482,
0.0397348590195179,
-0.1048278957605362,
-0.08498881757259369,
-0.03841378912329674,
-0.3763241171836853,
-0.25856003165245056,
-0.16248604655265808,
0.10234689712524414,
-0.08691509813070297,
-0.022329188883304596,
0.6900109052658081,
0.15030673146247864,
0.34198930859565735,
-0.33782756328582764,
0.06619603931903839,
0.029575077816843987,
0.4036605656147003,
0.47015807032585144,
0.07601282745599747,
-0.4037770628929138,
-0.0799950510263443,
-0.4968744218349457,
0.0621395967900753,
0.1211795061826706,
-0.1317167431116104,
0.17922812700271606,
-0.1361558884382248,
-0.013323133811354637,
-0.198521688580513,
-0.05734341964125633,
0.02972549758851528,
0.024238696321845055,
0.32170814275741577,
-0.008683606050908566,
-0.10772500187158585,
0.2655580937862396,
-0.06722390651702881,
0.14263081550598145,
-0.5638713836669922,
0.06713905930519104,
-0.221501886844635,
0.057566288858652115,
-0.4719407558441162,
0.08981998264789581,
0.1238536387681961,
0.1396857500076294,
0.24312764406204224,
0.015566209331154823,
0.3771502375602722,
-0.004346196074038744,
0.19138021767139435,
-0.5739655494689941,
0.0678086206316948,
-0.17265170812606812,
0.14340674877166748,
-0.135325089097023,
-0.025137199088931084,
-0.2696664035320282,
0.07280107587575912,
-0.09839770197868347,
0.11882511526346207,
-0.04688745364546776,
0.15276166796684265,
-0.051272518932819366,
0.12824289500713348,
-0.18334315717220306,
-0.04164702817797661,
0.2216355949640274,
-0.14370980858802795,
-0.18954461812973022,
0.3802648186683655,
-0.32337743043899536,
-0.3723747432231903,
0.46831777691841125,
-0.26504164934158325,
-0.25128820538520813,
0.013105539605021477,
0.3566478490829468,
-0.1201091781258583,
-0.16656732559204102,
-0.14391833543777466,
0.36254140734672546,
0.17249201238155365,
-0.004814753774553537,
-0.3380489945411682,
0.47139671444892883,
-0.20368441939353943,
-0.18481408059597015,
0.03641436621546745,
0.42348921298980713,
-0.008435610681772232,
-0.20798005163669586,
0.03416341170668602,
-0.11512692272663116
] |
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.25912442803382874,
-0.11358871310949326,
-0.036389466375112534,
0.2228231281042099,
0.041789501905441284,
0.041484441608190536,
0.05358162894845009,
0.31405580043792725,
-0.17314375936985016,
0.05045941099524498,
-0.29817402362823486,
0.09690873324871063,
-0.11128225922584534,
-0.040644459426403046,
0.10654106736183167,
-0.3713722825050354,
0.06335990875959396,
0.20324109494686127,
0.0054921857081353664,
-0.013291076757013798,
-0.06974606961011887,
0.45423853397369385,
-0.3286396265029907,
-0.013906702399253845,
-0.09688155353069305,
-0.260873019695282,
-0.060152728110551834,
-0.11549438536167145,
-0.2918643653392792,
-0.46600180864334106,
0.1471928060054779,
-0.07642440497875214,
0.09291388839483261,
0.3895765244960785,
-0.00011437090142862871,
-0.08653507381677628,
0.36810415983200073,
-0.13962972164154053,
-0.20889808237552643,
-0.4318644106388092,
0.15410493314266205,
-0.13698847591876984,
-0.09956349432468414,
-0.11221641302108765,
-0.06622429192066193,
-0.19790682196617126,
0.03988294675946236,
-0.3098418116569519,
0.2915134131908417,
0.31866219639778137,
0.23412153124809265,
0.18703202903270721,
0.23477767407894135,
-0.041816290467977524,
0.20497529208660126,
-0.00165874557569623,
-0.1434950977563858,
0.20946450531482697,
0.1850299835205078,
0.07412689179182053,
-0.17729462683200836,
0.5136581063270569,
-0.31657716631889343,
-0.08392219990491867,
0.09197516739368439,
-0.15538248419761658,
-0.0313265360891819,
-0.40217480063438416,
0.1798989623785019,
-0.06131037697196007,
0.4357357621192932,
-0.3616386651992798,
-0.24223168194293976,
-0.27174410223960876,
0.1527155339717865,
-0.23318316042423248,
0.26473021507263184,
0.3108147978782654,
-0.2944636642932892,
0.1316216140985489,
0.09264346212148666,
-0.21175146102905273,
-0.014171256683766842,
0.1655198335647583,
0.05735141038894653,
0.2916789650917053,
-0.2994026243686676,
-0.1460859179496765,
0.35021287202835083,
-0.1967080980539322,
-0.24856247007846832,
0.04742128401994705,
-0.08520214259624481,
0.24255487322807312,
-0.06517698615789413,
-0.022183360531926155,
0.16320686042308807,
0.1580071896314621,
-0.038769546896219254,
0.016518844291567802,
-0.1195855438709259,
0.226120263338089,
-0.17951512336730957,
0.22162628173828125,
-0.014147432520985603,
0.17899122834205627,
0.24173545837402344,
-0.020095275714993477,
0.2245754599571228,
0.4123169779777527,
0.01203849632292986,
0.00003397699038032442,
-0.07607082277536392,
-0.19488327205181122,
-0.4148891568183899,
-0.05483757331967354,
0.5135284662246704,
-0.2739717662334442,
-0.15554973483085632,
0.05543098971247673,
-0.07868146151304245,
-0.22092969715595245,
0.09622101485729218,
0.41372206807136536,
-0.1246659979224205,
-0.010580300353467464,
0.12739945948123932,
0.32440346479415894,
-0.22933317720890045,
-0.20256006717681885,
0.011585396714508533,
0.21795465052127838,
-0.04691328853368759,
0.14438475668430328,
0.2509666383266449,
-0.46308356523513794,
0.5074707269668579,
0.004960136953741312,
0.17022757232189178,
0.1916874349117279,
-0.07640047371387482,
-0.09053673595190048,
-0.09383892267942429,
0.3047250509262085,
-0.043741755187511444,
0.15940187871456146,
0.21300780773162842,
-0.03781619295477867,
-0.2543686032295227,
0.011781143955886364,
0.031125450506806374,
-0.21736039221286774,
-0.06825176626443863,
0.18231767416000366,
-0.31909748911857605,
-0.055439990013837814,
-0.19163630902767181,
0.23300109803676605,
0.1791098415851593,
-0.49663832783699036,
-0.045690882951021194,
0.033926695585250854,
-0.5319356918334961,
-0.013548781163990498,
0.05971844866871834,
0.4067557156085968,
-0.07273449003696442,
-0.2927670180797577,
-0.08419214189052582,
0.0253013726323843,
0.1555551439523697,
0.1164545938372612,
-0.03888753056526184,
0.029149821028113365,
-0.27821049094200134,
0.3276977241039276,
0.34542933106422424,
-0.5265831351280212,
-0.4309077560901642,
0.13371743261814117,
0.11854076385498047,
0.26250171661376953,
0.3312529921531677,
-0.23310470581054688,
0.24697062373161316,
-0.20047339797019958,
0.17132651805877686,
0.3000827431678772,
0.19032354652881622,
-0.10057322680950165,
-0.18912343680858612,
-0.14640915393829346,
-0.03144054487347603,
0.09461115300655365,
-0.1408829540014267,
0.16751274466514587,
-0.0015276712365448475,
-0.00044801790500059724,
0.19748371839523315,
0.07622675597667694,
0.06795260310173035,
0.25162437558174133,
0.23343026638031006,
0.055891092866659164,
0.05650396645069122,
-0.4098464846611023,
0.08384714275598526,
0.03775334730744362,
-0.32536229491233826,
0.42536237835884094,
-0.4172179400920868,
-0.135989248752594,
-0.23523102700710297,
-0.09957912564277649,
-0.24117696285247803,
-0.14336618781089783,
0.15815305709838867,
0.26741281151771545,
0.17963500320911407,
0.31494206190109253,
-0.2450622320175171,
-0.0018468291964381933,
0.17783322930335999,
-0.02701258286833763,
-0.6278399229049683,
0.08613064140081406,
-0.21380706131458282,
-0.11137503385543823,
0.37072232365608215,
0.2790822386741638,
0.15637050569057465,
-0.11812107264995575,
-0.08054298907518387,
0.22130893170833588,
-0.06357846409082413,
0.3369646370410919,
-0.40500974655151367,
0.1184292733669281,
0.12250376492738724,
-0.3153546154499054,
0.38484349846839905,
0.15099118649959564,
0.12453433126211166,
-0.055124711245298386,
0.3454688489437103,
0.1909192055463791,
0.21360640227794647,
0.14525145292282104,
0.1701563447713852,
0.08414653688669205,
0.4480591118335724,
0.1295614242553711,
-0.22462594509124756,
-0.31095606088638306,
0.4079636037349701,
-0.26855558156967163,
0.5072843432426453,
0.02076694183051586,
-0.31803014874458313,
0.007370504084974527,
0.5209943056106567,
-0.054514382034540176,
0.18443292379379272,
0.12430817633867264,
-0.3222736120223999,
-0.16832059621810913,
0.25621917843818665,
0.1419636607170105,
0.4471820890903473,
0.12860478460788727,
0.07792248576879501,
0.19606629014015198,
0.06277290731668472,
-0.34355244040489197,
0.27048662304878235,
0.030535591766238213,
0.07069499790668488,
0.27703455090522766,
0.09566173702478409,
0.04864531010389328,
-0.5301119089126587,
-0.032714176923036575,
-0.13799451291561127,
0.1653427928686142,
-0.12182764708995819,
0.016171319410204887,
-0.30997511744499207,
-0.5472099184989929,
-0.17640280723571777,
-0.2263452112674713,
-0.36137720942497253,
-0.18436315655708313,
0.07602809369564056,
0.2584051191806793,
0.08065691590309143,
0.34669604897499084,
0.17661729454994202,
0.06512367725372314,
-0.1550278663635254,
-0.18369774520397186,
-0.2633354961872101,
-0.025706922635436058,
-0.12935802340507507,
0.07394270598888397,
0.3326384127140045,
0.23199528455734253,
0.21944469213485718,
-0.12480314821004868,
-0.03895101323723793,
-0.25868189334869385,
-0.17832674086093903,
0.21452882885932922,
-0.20758476853370667,
0.17263492941856384,
0.14714430272579193,
0.14034636318683624,
-0.025121834129095078,
-0.36831697821617126,
0.21502071619033813,
0.005519334692507982,
-0.08204229921102524,
0.17850714921951294,
-0.1032174676656723,
0.01659817062318325,
-0.158272385597229,
-0.2487449049949646,
-0.23420514166355133,
-0.5632390975952148,
0.023703601211309433,
0.03599375858902931,
0.15429642796516418,
0.6405218839645386,
-0.023309417068958282,
0.22337955236434937,
-0.18661907315254211,
0.4464223384857178,
-0.1898084431886673,
-0.26545846462249756,
0.37014180421829224,
-0.31331121921539307,
-0.3851194679737091,
0.08323840796947479,
0.07411711663007736,
0.5423161387443542,
-0.164180189371109,
-0.47791606187820435,
-0.04790153726935387,
-0.2519606351852417,
-0.09080065041780472,
-0.027399597689509392,
0.12352299690246582,
0.3727434277534485,
0.1244204193353653,
-0.05586414784193039,
-0.15446320176124573,
-0.11275596171617508,
-0.21203868091106415,
0.030363304540514946,
0.11034344136714935,
0.11733931303024292,
0.39382120966911316,
0.03643280267715454,
0.5581879019737244,
0.18936294317245483,
0.07860913872718811,
0.5083712935447693,
0.20568154752254486,
0.4620286524295807,
-0.1761787235736847,
-0.5006487965583801,
-0.06455472856760025,
-0.010614270344376564,
0.07822299003601074,
0.30122771859169006,
0.05825447291135788,
-0.22257457673549652,
-0.4180656671524048,
-0.34516459703445435,
-0.13734467327594757,
-0.21261674165725708,
-0.026440296322107315,
-0.20758898556232452,
0.31922799348831177,
0.16266807913780212,
0.04134400933980942,
0.05739102512598038,
-0.017887376248836517,
0.2042735517024994,
0.09716061502695084,
0.07311943918466568,
-0.006309435237199068,
-0.3482367694377899,
-0.21479998528957367,
-0.6190565824508667,
0.398236483335495,
0.05910739675164223,
0.2502113878726959,
-0.11258797347545624,
0.026482529938220978,
0.04502987116575241,
-0.009493200108408928,
0.3792361617088318,
-0.08854300528764725,
0.029673175886273384,
0.27199849486351013,
0.044300712645053864,
-0.4352828860282898,
0.051928963512182236,
-0.24492597579956055,
0.11435817927122116,
-0.06596075743436813,
0.20737393200397491,
-0.19989009201526642,
-0.05381493642926216,
0.19536827504634857,
0.2936965227127075,
0.1380237489938736,
-0.09314556419849396,
-0.4292460083961487,
-0.44696468114852905,
-0.4218347668647766,
-0.06415215879678726,
0.09730737656354904,
0.25054123997688293,
0.2945305109024048,
0.2912117540836334,
0.26191818714141846,
-0.029073873534798622,
0.15676911175251007,
-0.0027871238999068737,
0.02682599425315857,
0.2493477612733841,
0.01580335944890976,
0.19504232704639435,
-0.005200421437621117,
-0.1470479816198349,
0.5904422998428345,
0.0382179319858551,
-0.3190022110939026,
-0.12213002145290375,
0.15565091371536255,
0.09097721427679062,
0.35107532143592834,
-0.1618373841047287,
0.23598012328147888,
0.183256134390831,
-0.08828650414943695,
-0.12493081390857697,
-0.1221577450633049,
0.3541414737701416,
0.20380334556102753,
-0.15670838952064514,
-0.4649762511253357,
0.22406403720378876,
-0.08672896027565002,
0.014409559778869152,
0.20861952006816864,
0.14586922526359558,
-0.21548856794834137,
0.5865092873573303,
-0.3359625041484833,
0.9864445328712463,
0.19009295105934143,
0.1509925127029419,
0.5796772837638855,
0.28524330258369446,
0.27367982268333435,
-0.025348324328660965,
0.27040043473243713,
0.12706159055233002,
-0.23836056888103485,
-0.06375925987958908,
-0.05243953317403793,
0.4439465403556824,
-0.162819042801857,
-0.4471863806247711,
0.19753500819206238,
0.13809072971343994,
-0.19307397305965424,
-0.08882138878107071,
0.15024639666080475,
-0.30724436044692993,
-0.37264230847358704,
-0.7613897323608398,
0.16294169425964355,
-0.08925575762987137,
0.43591901659965515,
-0.03293644264340401,
-0.0648278221487999,
0.01070708129554987,
-0.4352568984031677,
-0.35131314396858215,
0.19514784216880798,
-0.221455916762352,
0.08132568746805191,
-0.20432643592357635,
0.04010365158319473,
0.3659396171569824,
0.2889259159564972,
0.1460966020822525,
0.28899672627449036,
-0.2387261986732483,
0.10645892471075058,
-0.13227170705795288,
-0.38241758942604065,
0.17194853723049164,
0.1419316679239273,
0.2849148213863373,
-0.2990048825740814,
-0.16119620203971863,
0.20494213700294495,
-0.056914765387773514,
0.015096215531229973,
0.044152192771434784,
0.006155656650662422,
-0.030720442533493042,
-0.11245819926261902,
-0.5855569243431091,
0.07068219780921936,
-0.055304884910583496,
-0.13818730413913727,
0.13583946228027344,
0.02430819161236286,
-0.43255311250686646,
0.02526625245809555,
-0.16992229223251343,
-0.10663017630577087,
-0.07931879907846451,
0.5607016086578369,
0.1880020946264267,
-0.16987070441246033,
0.3974302113056183,
0.3162399232387543,
-0.23941022157669067,
-0.1771649569272995,
-0.09588829427957535,
-0.33060890436172485,
-0.40937310457229614,
-0.04270227998495102,
0.3858550190925598,
-0.1172359511256218,
-0.2525813579559326,
0.30716004967689514,
-0.06190568953752518,
-0.009678121656179428,
-0.08388933539390564,
-0.29286155104637146,
-0.1446075588464737,
0.4782176911830902,
0.009146383963525295,
-0.17945823073387146,
0.14406967163085938,
-0.06868892908096313,
0.07563655078411102,
0.21577267348766327,
-0.32668983936309814,
0.15659074485301971,
-0.07235417515039444,
0.2035769820213318,
0.3105819821357727,
0.0021457145921885967,
0.2390635907649994,
0.050242479890584946,
0.14709320664405823,
0.16374318301677704,
-0.22157011926174164,
-0.2032015323638916,
0.02239438146352768,
0.1006707176566124,
0.10467520356178284,
-0.016841232776641846,
0.19039440155029297,
-0.08430235087871552,
-0.20970787107944489,
-0.1461956799030304,
-0.007435282692313194,
0.3898078501224518,
-0.008741596713662148,
0.03507280722260475,
-0.17861038446426392,
0.030735298991203308,
0.17901946604251862,
0.00015598908066749573,
-0.17178094387054443,
-0.14069435000419617,
0.13622897863388062,
0.01798691786825657,
-0.11187659204006195,
-0.08561274409294128,
-0.03974313661456108,
0.1052895188331604,
0.0032100302632898092,
-0.0333007350564003,
0.24143913388252258,
-0.14798672497272491,
0.11532542109489441,
0.22412022948265076,
0.2735118269920349,
0.20418065786361694,
-0.17303024232387543,
-0.025972530245780945,
0.37894800305366516,
0.13464193046092987,
-0.5750601291656494,
-0.12943622469902039,
0.22369498014450073,
-0.16345658898353577,
0.1694570630788803,
0.1812383383512497,
0.24792559444904327,
0.0049994029104709625,
0.24873065948486328,
0.07014727592468262,
0.4369538128376007,
-0.09821376204490662,
0.3608635663986206,
0.055013447999954224,
0.17381997406482697,
-0.08352117985486984,
0.10916522145271301,
0.18098054826259613,
0.24757446348667145,
0.3581094443798065,
-0.5064559578895569,
0.23998130857944489,
0.12215682119131088,
-0.031216520816087723,
0.13071344792842865,
-0.2954685688018799,
0.11784589290618896,
0.5222582817077637,
0.09294366091489792,
0.0833180844783783,
-0.13043788075447083,
0.27337464690208435,
-0.1937643587589264,
-0.07021895051002502,
0.06822045892477036,
0.24201984703540802,
0.012638982385396957,
0.1243283674120903,
0.08297352492809296,
-0.14135007560253143,
-0.08922576159238815,
-0.16058918833732605,
0.11493221670389175,
-0.11064387112855911,
0.0178371574729681,
-0.09270291030406952,
-0.13889271020889282,
-0.12947167456150055,
0.0077097066678106785,
-0.0036965326871722937,
0.007039428222924471,
-0.1362714171409607,
0.3819723427295685,
0.040279362350702286,
0.013498998247087002,
0.05457107722759247,
0.5289000868797302,
0.6157763004302979,
0.22252705693244934,
0.15397772192955017,
0.22918419539928436,
-0.3454717695713043,
-0.04072496294975281,
-0.022172437980771065,
0.2495705634355545,
0.2581285238265991,
0.31745845079421997,
0.19135023653507233,
0.10217345505952835,
-0.19083264470100403,
-0.12477986514568329,
0.3226776421070099,
0.11486279219388962,
-0.2692883014678955,
0.10786578059196472,
-0.6182481050491333,
-0.019206590950489044,
-0.25062096118927,
0.02131306380033493,
-0.759990394115448,
0.08910006284713745,
0.4706358313560486,
-0.08878456801176071,
0.03275442495942116,
-0.2252698689699173,
0.0818886086344719,
-0.04470809921622276,
0.343486487865448,
0.35295751690864563,
0.21423766016960144,
0.018144795671105385,
-0.32781556248664856,
-0.7539104223251343,
0.132627934217453,
0.09544514864683151,
0.10851390659809113,
-0.1816551238298416,
-0.07984466105699539,
0.3282209634780884,
0.32363367080688477,
-0.14855873584747314,
0.0536656454205513,
-0.22191138565540314,
-0.3084178864955902,
-0.1348038911819458,
0.015472578816115856,
-0.07750438153743744,
0.2150859385728836,
-0.15142139792442322,
-0.32067209482192993,
-0.16706623136997223,
-0.35723769664764404,
0.0848187729716301,
-0.05128591135144234,
-0.029792089015245438,
-0.3333076238632202,
-0.09775768965482712,
0.08510057628154755,
0.20585235953330994,
0.3144369125366211,
-0.2552303075790405,
-0.15018832683563232,
-0.16131384670734406,
-0.26322439312934875,
-0.08876756578683853,
0.30321240425109863,
0.03553362935781479,
0.5683207511901855,
-0.2828614115715027,
0.0654950737953186,
-0.3003045916557312,
0.5356611609458923,
0.09828498959541321,
0.004089460242539644,
-0.2274111807346344,
0.345927894115448,
-0.164419025182724,
0.1881951242685318,
-0.006711866706609726,
0.03184569254517555,
-0.061673492193222046,
0.11456994712352753,
-0.48132771253585815,
-0.32610321044921875,
0.6847338676452637,
-0.502578616142273,
-0.2505764663219452,
0.12680193781852722,
0.3253101110458374,
0.1369982659816742,
-0.3709212839603424,
-0.6134666800498962,
0.1257459819316864,
0.16148404777050018,
0.1585961878299713,
-0.10426588356494904,
0.19002790749073029,
-0.3713201880455017,
-0.21885880827903748,
-0.07576550543308258,
0.26583951711654663,
0.296059787273407,
-0.19479575753211975,
0.20116285979747772,
-0.2912433445453644
] |
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.3421066403388977,
0.04719279333949089,
-0.10626477003097534,
0.06201721727848053,
0.20045500993728638,
0.17774423956871033,
0.17687447369098663,
0.3401964008808136,
0.13733333349227905,
0.09211837500333786,
0.41052380204200745,
0.3346934914588928,
0.01600063592195511,
0.30764612555503845,
0.11132040619850159,
-0.33708688616752625,
0.05565062537789345,
0.07522193342447281,
-0.19471871852874756,
-0.2001762092113495,
-0.13208435475826263,
0.10374298691749573,
-0.2725183963775635,
-0.07011584937572479,
-0.14883549511432648,
0.10703843832015991,
0.12277796864509583,
-0.019670063629746437,
-0.19260218739509583,
-0.18620073795318604,
0.06802210956811905,
-0.0362134650349617,
0.228033646941185,
0.10794313997030258,
-0.0001084146206267178,
0.08063138276338577,
0.5717445611953735,
-0.158380389213562,
-0.4590221047401428,
-0.13032189011573792,
-0.08136408776044846,
-0.3462578058242798,
0.2564504146575928,
-0.3715744614601135,
-0.3347843885421753,
-0.025639494881033897,
0.3187549412250519,
-0.5857160687446594,
0.24128824472427368,
0.14796167612075806,
0.21826858818531036,
-0.07421106100082397,
0.35153505206108093,
-0.0048848288133740425,
0.41059747338294983,
0.21860653162002563,
-0.03604956343770027,
-0.12430758029222488,
0.010662873275578022,
0.02496490254998207,
0.06061766296625137,
0.4618475139141083,
0.04728573188185692,
-0.11424743384122849,
0.30397331714630127,
-0.3094906508922577,
0.26568448543548584,
-0.37311604619026184,
0.42296892404556274,
0.2541320025920868,
1.0161632299423218,
-0.11970152705907822,
0.09952079504728317,
0.10506673902273178,
0.00407438213005662,
0.12878164649009705,
0.24283640086650848,
0.20053517818450928,
-0.36427250504493713,
-0.07967925071716309,
0.1134934052824974,
-0.28304359316825867,
-0.33567896485328674,
0.34555792808532715,
-0.10172896087169647,
0.5368954539299011,
0.10903745144605637,
0.14164304733276367,
-0.1509755402803421,
-0.18528860807418823,
0.07730144262313843,
-0.07077997177839279,
0.10307736694812775,
0.35414132475852966,
-0.09304476529359818,
0.13513459265232086,
0.24577969312667847,
0.17513279616832733,
0.044339779764413834,
-0.09479636698961258,
-0.27976420521736145,
0.19170087575912476,
0.36852023005485535,
0.046187203377485275,
0.0220660213381052,
0.03235359117388725,
0.35566282272338867,
-0.18493086099624634,
0.20503871142864227,
-0.03057311289012432,
0.007939697243273258,
0.06664779782295227,
-0.05862119793891907,
-0.3365756571292877,
-0.6453835368156433,
0.23251670598983765,
-0.0009588935063220561,
-0.13675165176391602,
0.19234158098697662,
0.1587267518043518,
-0.35408374667167664,
-0.2998664677143097,
-0.005748695228248835,
0.2017250657081604,
0.15220433473587036,
0.20511914789676666,
0.2833251953125,
-0.08672615140676498,
-0.34171074628829956,
-0.3844316601753235,
-0.04664032161235809,
0.2829635739326477,
-0.45934876799583435,
0.07805224508047104,
0.20936237275600433,
0.10678642243146896,
0.37506863474845886,
-0.035514865070581436,
-0.043999817222356796,
0.04252694919705391,
0.1307712197303772,
0.07883495092391968,
-0.13859890401363373,
0.1594754457473755,
0.14901892840862274,
0.24700047075748444,
0.19990386068820953,
-0.22246719896793365,
-0.052218303084373474,
0.001683768699876964,
-0.09037399291992188,
-0.19051870703697205,
-0.18565566837787628,
0.17176078259944916,
0.12278025597333908,
0.1018856018781662,
0.04582648351788521,
0.34137988090515137,
0.17139998078346252,
-0.22588802874088287,
0.14366485178470612,
-0.007509700022637844,
-0.1345752328634262,
-0.09188730269670486,
0.3624589145183563,
0.3725726306438446,
-0.6563616991043091,
0.10404695570468903,
-0.049563657492399216,
0.18776835501194,
0.14370030164718628,
-0.27950048446655273,
-0.2813876271247864,
0.42379844188690186,
-0.09352006763219833,
-0.10077210515737534,
0.3089173436164856,
-0.2708929479122162,
0.08159114420413971,
0.19684267044067383,
0.06733454763889313,
-0.28226137161254883,
0.23710134625434875,
-0.11235344409942627,
0.042296480387449265,
0.16245485842227936,
0.11410892009735107,
0.16634432971477509,
0.11646034568548203,
-0.07022513449192047,
-0.21967580914497375,
-0.12229473888874054,
-0.043154094368219376,
0.11727076768875122,
0.2665441930294037,
-0.11958009749650955,
0.1249019131064415,
0.5266058444976807,
0.3261624276638031,
-0.26325488090515137,
0.07642453163862228,
0.5432158708572388,
-0.3122917115688324,
0.0806591659784317,
0.1918928176164627,
-0.05547497794032097,
-0.04989985004067421,
0.18091338872909546,
-0.23919455707073212,
0.4039112627506256,
0.07905777543783188,
-0.005386069882661104,
-0.26680734753608704,
-0.05302821099758148,
-0.23602880537509918,
-0.42836451530456543,
0.21149246394634247,
0.04665564000606537,
-0.03551913797855377,
0.25308600068092346,
0.05293507128953934,
-0.09003499150276184,
-0.2782236635684967,
-0.13893719017505646,
-0.8122124671936035,
0.2934660017490387,
-0.2860761880874634,
-0.08008112013339996,
-0.08755972981452942,
0.020255668088793755,
0.06395132839679718,
-0.12363414466381073,
-0.28677913546562195,
0.1009153500199318,
0.18732766807079315,
0.03720075637102127,
-0.011949276551604271,
0.16449421644210815,
0.12202999740839005,
-0.26482799649238586,
0.3166709840297699,
0.3054232895374298,
0.11994049698114395,
0.01796865649521351,
-0.20191487669944763,
0.11080817133188248,
0.047732919454574585,
0.3355245590209961,
0.07278665900230408,
0.26858946681022644,
0.18518298864364624,
0.16804777085781097,
-0.15628165006637573,
-0.15916423499584198,
0.30215656757354736,
0.4226677417755127,
0.18189774453639984,
-0.14570322632789612,
0.03703907132148743,
0.07721632719039917,
0.4515742361545563,
0.10484345257282257,
-0.09222416579723358,
-0.1263715624809265,
-0.30541038513183594,
-0.0594790056347847,
0.4833452105522156,
-0.17912428081035614,
-0.016023041680455208,
0.27910590171813965,
-0.016197167336940765,
0.07711897045373917,
-0.1511853188276291,
-0.11755354702472687,
0.4446227252483368,
0.07232616096735,
0.5178589820861816,
-0.025720344856381416,
-0.12441656738519669,
-0.18681871891021729,
-0.19084113836288452,
-0.2879425287246704,
-0.12341443449258804,
0.2847411036491394,
-0.3124692440032959,
0.2768905460834503,
-0.4178832173347473,
-0.5642527937889099,
-0.2084294706583023,
0.4299703538417816,
-0.34802451729774475,
-0.3430694341659546,
-0.06800801306962967,
0.07788620889186859,
-0.02291121706366539,
0.2500191330909729,
0.1072104275226593,
-0.035542286932468414,
0.2320450097322464,
0.007474174257367849,
-0.22167734801769257,
-0.5956386923789978,
-0.4356401562690735,
0.0326632596552372,
0.28232601284980774,
0.03737521916627884,
0.12722940742969513,
-0.15690608322620392,
-0.06724181026220322,
-0.1452949047088623,
-0.4021958112716675,
0.3414442837238312,
-0.0869845300912857,
-0.008464028127491474,
0.11665326356887817,
0.42721864581108093,
-0.1959812194108963,
-0.09505845606327057,
0.3098008930683136,
0.11520156264305115,
-0.14765003323554993,
-0.06926611810922623,
-0.08467258512973785,
-0.062362320721149445,
-0.030823450535535812,
-0.43830201029777527,
-0.15058502554893494,
-0.32733821868896484,
-0.1820000559091568,
0.16898347437381744,
0.13323545455932617,
0.35230720043182373,
0.26457706093788147,
0.2091483771800995,
0.32835954427719116,
0.09546129405498505,
-0.09655757248401642,
-0.15933705866336823,
0.21701852977275848,
-0.3185725808143616,
-0.3167465329170227,
0.10404250025749207,
-0.14131319522857666,
0.23050634562969208,
0.11354032158851624,
-0.14633023738861084,
0.06803181767463684,
0.1159728467464447,
0.020054498687386513,
-0.10132033377885818,
0.3257167935371399,
0.7469018697738647,
-0.012623937800526619,
-0.001666548545472324,
-0.0988115519285202,
0.04782557487487793,
0.030737994238734245,
-0.43680423498153687,
0.34731775522232056,
0.17779219150543213,
0.5277687311172485,
-0.07014786452054977,
0.7515987753868103,
0.11483536660671234,
0.11667931079864502,
0.13216544687747955,
-0.07526091486215591,
0.06618605554103851,
-0.27247270941734314,
-0.18845969438552856,
0.29278141260147095,
0.0403268039226532,
-0.30309081077575684,
0.38984349370002747,
-0.12770190834999084,
-0.2598911225795746,
-0.43877696990966797,
0.07504778355360031,
0.0016000522300601006,
-0.24473896622657776,
-0.03760610893368721,
-0.37500521540641785,
0.3839122951030731,
-0.09530287981033325,
0.3992147147655487,
-0.08024546504020691,
-0.07314226031303406,
0.05920042097568512,
0.21968598663806915,
-0.09824588894844055,
0.13422372937202454,
-0.1730974167585373,
-0.24974942207336426,
-0.39932626485824585,
0.2461433857679367,
0.0012101938482373953,
0.14361731708049774,
-0.2927529513835907,
0.007916961796581745,
0.2831738293170929,
0.008745066821575165,
0.5200993418693542,
-0.6470434665679932,
-0.09738248586654663,
0.3353390395641327,
0.19218041002750397,
-0.6571788191795349,
-0.14138734340667725,
-0.18767741322517395,
0.27711716294288635,
0.3285014033317566,
-0.0478474386036396,
-0.332219660282135,
-0.15135812759399414,
0.2680897116661072,
0.04856894165277481,
-0.09909893572330475,
0.051520127803087234,
-0.24175819754600525,
-0.1433175802230835,
-0.3353152871131897,
-0.06578249484300613,
-0.09969418495893478,
0.1351073533296585,
0.10023951530456543,
0.21499647200107574,
0.08130349218845367,
0.026218364015221596,
-0.14487823843955994,
0.20501381158828735,
0.12260501086711884,
0.13836455345153809,
-0.2560671269893646,
0.10371240228414536,
0.48064759373664856,
-0.026589035987854004,
-0.10802468657493591,
0.1851126104593277,
-0.20795349776744843,
0.17263804376125336,
-0.21509242057800293,
0.14550818502902985,
0.16041050851345062,
-0.12064599245786667,
-0.23936378955841064,
0.03647962212562561,
-0.2542998790740967,
-0.046465497463941574,
0.05284279212355614,
0.20871564745903015,
0.08100207895040512,
-0.12740053236484528,
-0.4575786888599396,
0.560918927192688,
0.18852940201759338,
-0.07297087460756302,
0.2990115284919739,
-0.015665097162127495,
-0.430636465549469,
0.4052891433238983,
0.43294385075569153,
0.8635663986206055,
0.02991625852882862,
0.013999133370816708,
0.1714198738336563,
0.16713599860668182,
0.6254858374595642,
-0.5466776490211487,
0.20916442573070526,
-0.281289666891098,
0.31988802552223206,
-0.09525518119335175,
0.06537745147943497,
0.39573290944099426,
0.14318518340587616,
-0.22217018902301788,
0.35360613465309143,
-0.01738533191382885,
0.07415881007909775,
0.05659627914428711,
0.3767169713973999,
0.1265334039926529,
-0.3078528046607971,
-0.11752896755933762,
0.12139663100242615,
-0.18236219882965088,
0.2824687361717224,
-0.24982158839702606,
-0.012538871727883816,
-0.014507371932268143,
-0.244923934340477,
-0.4107002317905426,
0.09119312465190887,
-0.22418326139450073,
0.4608556032180786,
-0.34230324625968933,
-0.4593057930469513,
0.2506963014602661,
0.22680866718292236,
0.2354615479707718,
0.36966562271118164,
-0.37355026602745056,
0.20016756653785706,
0.015004532411694527,
-0.2361067235469818,
-0.07618848234415054,
0.041097208857536316,
0.386656254529953,
-0.1922805905342102,
-0.39226803183555603,
0.2118116021156311,
-0.1738399714231491,
-0.09788399189710617,
-0.29128608107566833,
-0.31771883368492126,
0.31883251667022705,
0.2502020001411438,
0.12403418123722076,
0.17259125411510468,
-0.08605661243200302,
-0.1338624209165573,
0.11980459839105606,
-0.2841421961784363,
0.010103791020810604,
0.00868886336684227,
0.08827618509531021,
-0.08681812882423401,
0.030908634886145592,
0.25715139508247375,
0.1876174360513687,
0.017261769622564316,
0.5952084064483643,
0.37850531935691833,
-0.21947510540485382,
-0.26590627431869507,
0.17860841751098633,
-0.22924330830574036,
-0.06068922206759453,
-0.2634165287017822,
0.1508059948682785,
0.09231764823198318,
-0.057126618921756744,
0.10292088240385056,
-0.015743911266326904,
-0.14091016352176666,
-0.007175784558057785,
-0.2680371105670929,
-0.020958488807082176,
0.02229999750852585,
-0.16380959749221802,
-0.0015580152394250035,
0.18830519914627075,
0.1332460641860962,
0.2853650152683258,
-0.2360226809978485,
-0.27911674976348877,
-0.2388353794813156,
-0.022319361567497253,
0.045321106910705566,
0.41371333599090576,
-0.01664041541516781,
-0.23604752123355865,
-0.038738369941711426,
0.1452319473028183,
-0.2301059514284134,
-0.2452722191810608,
-0.17255038022994995,
-0.04683484509587288,
0.12900717556476593,
-0.03978462517261505,
-0.18745756149291992,
0.13585394620895386,
-0.3403600752353668,
-0.29250508546829224,
-0.20412957668304443,
-0.13163819909095764,
-0.1293068379163742,
-0.024285631254315376,
0.22228863835334778,
-0.10420917719602585,
0.3449907898902893,
-0.2877996861934662,
0.0879831612110138,
0.03487571328878403,
0.29383137822151184,
0.05117115005850792,
0.24954849481582642,
0.4168611466884613,
-0.1764676719903946,
-0.5602070689201355,
0.18304529786109924,
-0.22114598751068115,
0.1743839830160141,
0.16332194209098816,
-0.08280208706855774,
-0.048011112958192825,
0.029965469613671303,
-0.021473566070199013,
0.026401694864034653,
-0.0819888785481453,
-0.03023334965109825,
0.13558773696422577,
0.20455144345760345,
-0.2827223539352417,
0.12395703047513962,
0.422098308801651,
-0.033097319304943085,
0.09618958085775375,
0.026279063895344734,
0.2615513801574707,
-0.05342176556587219,
0.17466238141059875,
0.04105696454644203,
0.016863875091075897,
-0.04344804957509041,
0.26398882269859314,
0.09460685402154922,
0.08114726841449738,
0.11606112122535706,
-0.1200716644525528,
0.04641953855752945,
0.13107292354106903,
0.3746131658554077,
0.10712651908397675,
0.06603597104549408,
0.10081599652767181,
0.216569185256958,
-0.22537603974342346,
-0.14098671078681946,
0.3062993586063385,
-0.10277515649795532,
-0.020908145233988762,
0.022877244278788567,
-0.06457270681858063,
0.07485640048980713,
0.1480168104171753,
-0.06374992430210114,
-0.31802287697792053,
0.13867245614528656,
-0.07772714644670486,
-0.1830138862133026,
-0.6274289488792419,
-0.2322813719511032,
0.05465104430913925,
-0.01765858195722103,
0.08908945322036743,
-0.08369693905115128,
-0.1092471331357956,
0.20269763469696045,
-0.03502576798200607,
-0.23063644766807556,
0.6797721982002258,
-0.06164853274822235,
0.044697582721710205,
-0.05517617613077164,
0.2520870566368103,
-0.21323475241661072,
-0.07124549895524979,
-0.1705532819032669,
-0.00184009806253016,
0.15782515704631805,
0.21092885732650757,
-0.4701043367385864,
-0.1439928412437439,
-0.0009011344518512487,
0.018944112583994865,
-0.05917779356241226,
0.0006442827288992703,
0.06300149112939835,
-0.037797294557094574,
0.294050931930542,
0.10967091470956802,
-0.08980167657136917,
-0.19844262301921844,
0.21691648662090302,
-0.007182060740888119,
-0.020038114860653877,
-0.24845506250858307,
0.004518262110650539,
0.10421206057071686,
-0.1066088154911995,
0.11462504416704178,
-0.5152722597122192,
0.04132688790559769,
0.2593996524810791,
0.38845953345298767,
-0.1085285097360611,
-0.22299575805664062,
0.08364369720220566,
-0.3275440037250519,
0.5394178628921509,
0.08417364954948425,
0.1905832439661026,
-0.11804763972759247,
-0.2930147647857666,
-0.29509666562080383,
0.005453574005514383,
-0.16959434747695923,
-0.3680242598056793,
-0.12039530277252197,
0.3059186339378357,
0.39280399680137634,
0.24459411203861237,
0.1168808564543724,
-0.2535529136657715,
-0.12980498373508453,
0.26505929231643677,
-0.1438632756471634,
-0.15893006324768066,
-0.07328233122825623,
0.04924123361706734,
-0.22518853843212128,
-0.17736820876598358,
0.08320578932762146,
-0.019430875778198242,
0.07522574812173843,
-0.22762097418308258,
-0.14735698699951172,
0.3186531364917755,
-0.43477770686149597,
0.25957685708999634,
0.02589532919228077,
0.5472241640090942,
0.02913188748061657,
-0.04227258265018463,
-0.16555677354335785,
0.22283847630023956,
-0.045000266283750534,
0.49142101407051086,
0.061620693653821945,
0.22850871086120605,
-0.21550072729587555,
-0.31885021924972534,
-0.34525763988494873,
0.6317009329795837,
0.03209638223052025,
-0.05509943515062332,
-0.2490805685520172,
-0.05867006629705429,
-0.22949929535388947,
0.29232853651046753,
-0.11924563348293304,
0.06629280745983124,
-0.03665190935134888,
0.18673370778560638,
-0.3581699728965759,
-0.23673096299171448,
0.33841896057128906,
-0.4211324453353882,
-0.335680216550827,
-0.18971435725688934,
0.0682089775800705,
-0.14943353831768036,
0.29298871755599976,
-0.10573398321866989,
-0.015354366041719913,
0.26347002387046814,
-0.13522709906101227,
-0.016723742708563805,
0.0001431076816515997,
0.05985728278756142,
0.1573977768421173,
-0.24589870870113373,
-0.40447190403938293,
-0.19432933628559113,
-0.060325395315885544,
-0.37993159890174866,
-0.24929291009902954
] |
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.3421066403388977,
0.04719279333949089,
-0.10626477003097534,
0.06201721727848053,
0.20045500993728638,
0.17774423956871033,
0.17687447369098663,
0.3401964008808136,
0.13733333349227905,
0.09211837500333786,
0.41052380204200745,
0.3346934914588928,
0.01600063592195511,
0.30764612555503845,
0.11132040619850159,
-0.33708688616752625,
0.05565062537789345,
0.07522193342447281,
-0.19471871852874756,
-0.2001762092113495,
-0.13208435475826263,
0.10374298691749573,
-0.2725183963775635,
-0.07011584937572479,
-0.14883549511432648,
0.10703843832015991,
0.12277796864509583,
-0.019670063629746437,
-0.19260218739509583,
-0.18620073795318604,
0.06802210956811905,
-0.0362134650349617,
0.228033646941185,
0.10794313997030258,
-0.0001084146206267178,
0.08063138276338577,
0.5717445611953735,
-0.158380389213562,
-0.4590221047401428,
-0.13032189011573792,
-0.08136408776044846,
-0.3462578058242798,
0.2564504146575928,
-0.3715744614601135,
-0.3347843885421753,
-0.025639494881033897,
0.3187549412250519,
-0.5857160687446594,
0.24128824472427368,
0.14796167612075806,
0.21826858818531036,
-0.07421106100082397,
0.35153505206108093,
-0.0048848288133740425,
0.41059747338294983,
0.21860653162002563,
-0.03604956343770027,
-0.12430758029222488,
0.010662873275578022,
0.02496490254998207,
0.06061766296625137,
0.4618475139141083,
0.04728573188185692,
-0.11424743384122849,
0.30397331714630127,
-0.3094906508922577,
0.26568448543548584,
-0.37311604619026184,
0.42296892404556274,
0.2541320025920868,
1.0161632299423218,
-0.11970152705907822,
0.09952079504728317,
0.10506673902273178,
0.00407438213005662,
0.12878164649009705,
0.24283640086650848,
0.20053517818450928,
-0.36427250504493713,
-0.07967925071716309,
0.1134934052824974,
-0.28304359316825867,
-0.33567896485328674,
0.34555792808532715,
-0.10172896087169647,
0.5368954539299011,
0.10903745144605637,
0.14164304733276367,
-0.1509755402803421,
-0.18528860807418823,
0.07730144262313843,
-0.07077997177839279,
0.10307736694812775,
0.35414132475852966,
-0.09304476529359818,
0.13513459265232086,
0.24577969312667847,
0.17513279616832733,
0.044339779764413834,
-0.09479636698961258,
-0.27976420521736145,
0.19170087575912476,
0.36852023005485535,
0.046187203377485275,
0.0220660213381052,
0.03235359117388725,
0.35566282272338867,
-0.18493086099624634,
0.20503871142864227,
-0.03057311289012432,
0.007939697243273258,
0.06664779782295227,
-0.05862119793891907,
-0.3365756571292877,
-0.6453835368156433,
0.23251670598983765,
-0.0009588935063220561,
-0.13675165176391602,
0.19234158098697662,
0.1587267518043518,
-0.35408374667167664,
-0.2998664677143097,
-0.005748695228248835,
0.2017250657081604,
0.15220433473587036,
0.20511914789676666,
0.2833251953125,
-0.08672615140676498,
-0.34171074628829956,
-0.3844316601753235,
-0.04664032161235809,
0.2829635739326477,
-0.45934876799583435,
0.07805224508047104,
0.20936237275600433,
0.10678642243146896,
0.37506863474845886,
-0.035514865070581436,
-0.043999817222356796,
0.04252694919705391,
0.1307712197303772,
0.07883495092391968,
-0.13859890401363373,
0.1594754457473755,
0.14901892840862274,
0.24700047075748444,
0.19990386068820953,
-0.22246719896793365,
-0.052218303084373474,
0.001683768699876964,
-0.09037399291992188,
-0.19051870703697205,
-0.18565566837787628,
0.17176078259944916,
0.12278025597333908,
0.1018856018781662,
0.04582648351788521,
0.34137988090515137,
0.17139998078346252,
-0.22588802874088287,
0.14366485178470612,
-0.007509700022637844,
-0.1345752328634262,
-0.09188730269670486,
0.3624589145183563,
0.3725726306438446,
-0.6563616991043091,
0.10404695570468903,
-0.049563657492399216,
0.18776835501194,
0.14370030164718628,
-0.27950048446655273,
-0.2813876271247864,
0.42379844188690186,
-0.09352006763219833,
-0.10077210515737534,
0.3089173436164856,
-0.2708929479122162,
0.08159114420413971,
0.19684267044067383,
0.06733454763889313,
-0.28226137161254883,
0.23710134625434875,
-0.11235344409942627,
0.042296480387449265,
0.16245485842227936,
0.11410892009735107,
0.16634432971477509,
0.11646034568548203,
-0.07022513449192047,
-0.21967580914497375,
-0.12229473888874054,
-0.043154094368219376,
0.11727076768875122,
0.2665441930294037,
-0.11958009749650955,
0.1249019131064415,
0.5266058444976807,
0.3261624276638031,
-0.26325488090515137,
0.07642453163862228,
0.5432158708572388,
-0.3122917115688324,
0.0806591659784317,
0.1918928176164627,
-0.05547497794032097,
-0.04989985004067421,
0.18091338872909546,
-0.23919455707073212,
0.4039112627506256,
0.07905777543783188,
-0.005386069882661104,
-0.26680734753608704,
-0.05302821099758148,
-0.23602880537509918,
-0.42836451530456543,
0.21149246394634247,
0.04665564000606537,
-0.03551913797855377,
0.25308600068092346,
0.05293507128953934,
-0.09003499150276184,
-0.2782236635684967,
-0.13893719017505646,
-0.8122124671936035,
0.2934660017490387,
-0.2860761880874634,
-0.08008112013339996,
-0.08755972981452942,
0.020255668088793755,
0.06395132839679718,
-0.12363414466381073,
-0.28677913546562195,
0.1009153500199318,
0.18732766807079315,
0.03720075637102127,
-0.011949276551604271,
0.16449421644210815,
0.12202999740839005,
-0.26482799649238586,
0.3166709840297699,
0.3054232895374298,
0.11994049698114395,
0.01796865649521351,
-0.20191487669944763,
0.11080817133188248,
0.047732919454574585,
0.3355245590209961,
0.07278665900230408,
0.26858946681022644,
0.18518298864364624,
0.16804777085781097,
-0.15628165006637573,
-0.15916423499584198,
0.30215656757354736,
0.4226677417755127,
0.18189774453639984,
-0.14570322632789612,
0.03703907132148743,
0.07721632719039917,
0.4515742361545563,
0.10484345257282257,
-0.09222416579723358,
-0.1263715624809265,
-0.30541038513183594,
-0.0594790056347847,
0.4833452105522156,
-0.17912428081035614,
-0.016023041680455208,
0.27910590171813965,
-0.016197167336940765,
0.07711897045373917,
-0.1511853188276291,
-0.11755354702472687,
0.4446227252483368,
0.07232616096735,
0.5178589820861816,
-0.025720344856381416,
-0.12441656738519669,
-0.18681871891021729,
-0.19084113836288452,
-0.2879425287246704,
-0.12341443449258804,
0.2847411036491394,
-0.3124692440032959,
0.2768905460834503,
-0.4178832173347473,
-0.5642527937889099,
-0.2084294706583023,
0.4299703538417816,
-0.34802451729774475,
-0.3430694341659546,
-0.06800801306962967,
0.07788620889186859,
-0.02291121706366539,
0.2500191330909729,
0.1072104275226593,
-0.035542286932468414,
0.2320450097322464,
0.007474174257367849,
-0.22167734801769257,
-0.5956386923789978,
-0.4356401562690735,
0.0326632596552372,
0.28232601284980774,
0.03737521916627884,
0.12722940742969513,
-0.15690608322620392,
-0.06724181026220322,
-0.1452949047088623,
-0.4021958112716675,
0.3414442837238312,
-0.0869845300912857,
-0.008464028127491474,
0.11665326356887817,
0.42721864581108093,
-0.1959812194108963,
-0.09505845606327057,
0.3098008930683136,
0.11520156264305115,
-0.14765003323554993,
-0.06926611810922623,
-0.08467258512973785,
-0.062362320721149445,
-0.030823450535535812,
-0.43830201029777527,
-0.15058502554893494,
-0.32733821868896484,
-0.1820000559091568,
0.16898347437381744,
0.13323545455932617,
0.35230720043182373,
0.26457706093788147,
0.2091483771800995,
0.32835954427719116,
0.09546129405498505,
-0.09655757248401642,
-0.15933705866336823,
0.21701852977275848,
-0.3185725808143616,
-0.3167465329170227,
0.10404250025749207,
-0.14131319522857666,
0.23050634562969208,
0.11354032158851624,
-0.14633023738861084,
0.06803181767463684,
0.1159728467464447,
0.020054498687386513,
-0.10132033377885818,
0.3257167935371399,
0.7469018697738647,
-0.012623937800526619,
-0.001666548545472324,
-0.0988115519285202,
0.04782557487487793,
0.030737994238734245,
-0.43680423498153687,
0.34731775522232056,
0.17779219150543213,
0.5277687311172485,
-0.07014786452054977,
0.7515987753868103,
0.11483536660671234,
0.11667931079864502,
0.13216544687747955,
-0.07526091486215591,
0.06618605554103851,
-0.27247270941734314,
-0.18845969438552856,
0.29278141260147095,
0.0403268039226532,
-0.30309081077575684,
0.38984349370002747,
-0.12770190834999084,
-0.2598911225795746,
-0.43877696990966797,
0.07504778355360031,
0.0016000522300601006,
-0.24473896622657776,
-0.03760610893368721,
-0.37500521540641785,
0.3839122951030731,
-0.09530287981033325,
0.3992147147655487,
-0.08024546504020691,
-0.07314226031303406,
0.05920042097568512,
0.21968598663806915,
-0.09824588894844055,
0.13422372937202454,
-0.1730974167585373,
-0.24974942207336426,
-0.39932626485824585,
0.2461433857679367,
0.0012101938482373953,
0.14361731708049774,
-0.2927529513835907,
0.007916961796581745,
0.2831738293170929,
0.008745066821575165,
0.5200993418693542,
-0.6470434665679932,
-0.09738248586654663,
0.3353390395641327,
0.19218041002750397,
-0.6571788191795349,
-0.14138734340667725,
-0.18767741322517395,
0.27711716294288635,
0.3285014033317566,
-0.0478474386036396,
-0.332219660282135,
-0.15135812759399414,
0.2680897116661072,
0.04856894165277481,
-0.09909893572330475,
0.051520127803087234,
-0.24175819754600525,
-0.1433175802230835,
-0.3353152871131897,
-0.06578249484300613,
-0.09969418495893478,
0.1351073533296585,
0.10023951530456543,
0.21499647200107574,
0.08130349218845367,
0.026218364015221596,
-0.14487823843955994,
0.20501381158828735,
0.12260501086711884,
0.13836455345153809,
-0.2560671269893646,
0.10371240228414536,
0.48064759373664856,
-0.026589035987854004,
-0.10802468657493591,
0.1851126104593277,
-0.20795349776744843,
0.17263804376125336,
-0.21509242057800293,
0.14550818502902985,
0.16041050851345062,
-0.12064599245786667,
-0.23936378955841064,
0.03647962212562561,
-0.2542998790740967,
-0.046465497463941574,
0.05284279212355614,
0.20871564745903015,
0.08100207895040512,
-0.12740053236484528,
-0.4575786888599396,
0.560918927192688,
0.18852940201759338,
-0.07297087460756302,
0.2990115284919739,
-0.015665097162127495,
-0.430636465549469,
0.4052891433238983,
0.43294385075569153,
0.8635663986206055,
0.02991625852882862,
0.013999133370816708,
0.1714198738336563,
0.16713599860668182,
0.6254858374595642,
-0.5466776490211487,
0.20916442573070526,
-0.281289666891098,
0.31988802552223206,
-0.09525518119335175,
0.06537745147943497,
0.39573290944099426,
0.14318518340587616,
-0.22217018902301788,
0.35360613465309143,
-0.01738533191382885,
0.07415881007909775,
0.05659627914428711,
0.3767169713973999,
0.1265334039926529,
-0.3078528046607971,
-0.11752896755933762,
0.12139663100242615,
-0.18236219882965088,
0.2824687361717224,
-0.24982158839702606,
-0.012538871727883816,
-0.014507371932268143,
-0.244923934340477,
-0.4107002317905426,
0.09119312465190887,
-0.22418326139450073,
0.4608556032180786,
-0.34230324625968933,
-0.4593057930469513,
0.2506963014602661,
0.22680866718292236,
0.2354615479707718,
0.36966562271118164,
-0.37355026602745056,
0.20016756653785706,
0.015004532411694527,
-0.2361067235469818,
-0.07618848234415054,
0.041097208857536316,
0.386656254529953,
-0.1922805905342102,
-0.39226803183555603,
0.2118116021156311,
-0.1738399714231491,
-0.09788399189710617,
-0.29128608107566833,
-0.31771883368492126,
0.31883251667022705,
0.2502020001411438,
0.12403418123722076,
0.17259125411510468,
-0.08605661243200302,
-0.1338624209165573,
0.11980459839105606,
-0.2841421961784363,
0.010103791020810604,
0.00868886336684227,
0.08827618509531021,
-0.08681812882423401,
0.030908634886145592,
0.25715139508247375,
0.1876174360513687,
0.017261769622564316,
0.5952084064483643,
0.37850531935691833,
-0.21947510540485382,
-0.26590627431869507,
0.17860841751098633,
-0.22924330830574036,
-0.06068922206759453,
-0.2634165287017822,
0.1508059948682785,
0.09231764823198318,
-0.057126618921756744,
0.10292088240385056,
-0.015743911266326904,
-0.14091016352176666,
-0.007175784558057785,
-0.2680371105670929,
-0.020958488807082176,
0.02229999750852585,
-0.16380959749221802,
-0.0015580152394250035,
0.18830519914627075,
0.1332460641860962,
0.2853650152683258,
-0.2360226809978485,
-0.27911674976348877,
-0.2388353794813156,
-0.022319361567497253,
0.045321106910705566,
0.41371333599090576,
-0.01664041541516781,
-0.23604752123355865,
-0.038738369941711426,
0.1452319473028183,
-0.2301059514284134,
-0.2452722191810608,
-0.17255038022994995,
-0.04683484509587288,
0.12900717556476593,
-0.03978462517261505,
-0.18745756149291992,
0.13585394620895386,
-0.3403600752353668,
-0.29250508546829224,
-0.20412957668304443,
-0.13163819909095764,
-0.1293068379163742,
-0.024285631254315376,
0.22228863835334778,
-0.10420917719602585,
0.3449907898902893,
-0.2877996861934662,
0.0879831612110138,
0.03487571328878403,
0.29383137822151184,
0.05117115005850792,
0.24954849481582642,
0.4168611466884613,
-0.1764676719903946,
-0.5602070689201355,
0.18304529786109924,
-0.22114598751068115,
0.1743839830160141,
0.16332194209098816,
-0.08280208706855774,
-0.048011112958192825,
0.029965469613671303,
-0.021473566070199013,
0.026401694864034653,
-0.0819888785481453,
-0.03023334965109825,
0.13558773696422577,
0.20455144345760345,
-0.2827223539352417,
0.12395703047513962,
0.422098308801651,
-0.033097319304943085,
0.09618958085775375,
0.026279063895344734,
0.2615513801574707,
-0.05342176556587219,
0.17466238141059875,
0.04105696454644203,
0.016863875091075897,
-0.04344804957509041,
0.26398882269859314,
0.09460685402154922,
0.08114726841449738,
0.11606112122535706,
-0.1200716644525528,
0.04641953855752945,
0.13107292354106903,
0.3746131658554077,
0.10712651908397675,
0.06603597104549408,
0.10081599652767181,
0.216569185256958,
-0.22537603974342346,
-0.14098671078681946,
0.3062993586063385,
-0.10277515649795532,
-0.020908145233988762,
0.022877244278788567,
-0.06457270681858063,
0.07485640048980713,
0.1480168104171753,
-0.06374992430210114,
-0.31802287697792053,
0.13867245614528656,
-0.07772714644670486,
-0.1830138862133026,
-0.6274289488792419,
-0.2322813719511032,
0.05465104430913925,
-0.01765858195722103,
0.08908945322036743,
-0.08369693905115128,
-0.1092471331357956,
0.20269763469696045,
-0.03502576798200607,
-0.23063644766807556,
0.6797721982002258,
-0.06164853274822235,
0.044697582721710205,
-0.05517617613077164,
0.2520870566368103,
-0.21323475241661072,
-0.07124549895524979,
-0.1705532819032669,
-0.00184009806253016,
0.15782515704631805,
0.21092885732650757,
-0.4701043367385864,
-0.1439928412437439,
-0.0009011344518512487,
0.018944112583994865,
-0.05917779356241226,
0.0006442827288992703,
0.06300149112939835,
-0.037797294557094574,
0.294050931930542,
0.10967091470956802,
-0.08980167657136917,
-0.19844262301921844,
0.21691648662090302,
-0.007182060740888119,
-0.020038114860653877,
-0.24845506250858307,
0.004518262110650539,
0.10421206057071686,
-0.1066088154911995,
0.11462504416704178,
-0.5152722597122192,
0.04132688790559769,
0.2593996524810791,
0.38845953345298767,
-0.1085285097360611,
-0.22299575805664062,
0.08364369720220566,
-0.3275440037250519,
0.5394178628921509,
0.08417364954948425,
0.1905832439661026,
-0.11804763972759247,
-0.2930147647857666,
-0.29509666562080383,
0.005453574005514383,
-0.16959434747695923,
-0.3680242598056793,
-0.12039530277252197,
0.3059186339378357,
0.39280399680137634,
0.24459411203861237,
0.1168808564543724,
-0.2535529136657715,
-0.12980498373508453,
0.26505929231643677,
-0.1438632756471634,
-0.15893006324768066,
-0.07328233122825623,
0.04924123361706734,
-0.22518853843212128,
-0.17736820876598358,
0.08320578932762146,
-0.019430875778198242,
0.07522574812173843,
-0.22762097418308258,
-0.14735698699951172,
0.3186531364917755,
-0.43477770686149597,
0.25957685708999634,
0.02589532919228077,
0.5472241640090942,
0.02913188748061657,
-0.04227258265018463,
-0.16555677354335785,
0.22283847630023956,
-0.045000266283750534,
0.49142101407051086,
0.061620693653821945,
0.22850871086120605,
-0.21550072729587555,
-0.31885021924972534,
-0.34525763988494873,
0.6317009329795837,
0.03209638223052025,
-0.05509943515062332,
-0.2490805685520172,
-0.05867006629705429,
-0.22949929535388947,
0.29232853651046753,
-0.11924563348293304,
0.06629280745983124,
-0.03665190935134888,
0.18673370778560638,
-0.3581699728965759,
-0.23673096299171448,
0.33841896057128906,
-0.4211324453353882,
-0.335680216550827,
-0.18971435725688934,
0.0682089775800705,
-0.14943353831768036,
0.29298871755599976,
-0.10573398321866989,
-0.015354366041719913,
0.26347002387046814,
-0.13522709906101227,
-0.016723742708563805,
0.0001431076816515997,
0.05985728278756142,
0.1573977768421173,
-0.24589870870113373,
-0.40447190403938293,
-0.19432933628559113,
-0.060325395315885544,
-0.37993159890174866,
-0.24929291009902954
] |
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 <[email protected]>
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 <[email protected]>
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.3421066403388977,
0.04719279333949089,
-0.10626477003097534,
0.06201721727848053,
0.20045500993728638,
0.17774423956871033,
0.17687447369098663,
0.3401964008808136,
0.13733333349227905,
0.09211837500333786,
0.41052380204200745,
0.3346934914588928,
0.01600063592195511,
0.30764612555503845,
0.11132040619850159,
-0.33708688616752625,
0.05565062537789345,
0.07522193342447281,
-0.19471871852874756,
-0.2001762092113495,
-0.13208435475826263,
0.10374298691749573,
-0.2725183963775635,
-0.07011584937572479,
-0.14883549511432648,
0.10703843832015991,
0.12277796864509583,
-0.019670063629746437,
-0.19260218739509583,
-0.18620073795318604,
0.06802210956811905,
-0.0362134650349617,
0.228033646941185,
0.10794313997030258,
-0.0001084146206267178,
0.08063138276338577,
0.5717445611953735,
-0.158380389213562,
-0.4590221047401428,
-0.13032189011573792,
-0.08136408776044846,
-0.3462578058242798,
0.2564504146575928,
-0.3715744614601135,
-0.3347843885421753,
-0.025639494881033897,
0.3187549412250519,
-0.5857160687446594,
0.24128824472427368,
0.14796167612075806,
0.21826858818531036,
-0.07421106100082397,
0.35153505206108093,
-0.0048848288133740425,
0.41059747338294983,
0.21860653162002563,
-0.03604956343770027,
-0.12430758029222488,
0.010662873275578022,
0.02496490254998207,
0.06061766296625137,
0.4618475139141083,
0.04728573188185692,
-0.11424743384122849,
0.30397331714630127,
-0.3094906508922577,
0.26568448543548584,
-0.37311604619026184,
0.42296892404556274,
0.2541320025920868,
1.0161632299423218,
-0.11970152705907822,
0.09952079504728317,
0.10506673902273178,
0.00407438213005662,
0.12878164649009705,
0.24283640086650848,
0.20053517818450928,
-0.36427250504493713,
-0.07967925071716309,
0.1134934052824974,
-0.28304359316825867,
-0.33567896485328674,
0.34555792808532715,
-0.10172896087169647,
0.5368954539299011,
0.10903745144605637,
0.14164304733276367,
-0.1509755402803421,
-0.18528860807418823,
0.07730144262313843,
-0.07077997177839279,
0.10307736694812775,
0.35414132475852966,
-0.09304476529359818,
0.13513459265232086,
0.24577969312667847,
0.17513279616832733,
0.044339779764413834,
-0.09479636698961258,
-0.27976420521736145,
0.19170087575912476,
0.36852023005485535,
0.046187203377485275,
0.0220660213381052,
0.03235359117388725,
0.35566282272338867,
-0.18493086099624634,
0.20503871142864227,
-0.03057311289012432,
0.007939697243273258,
0.06664779782295227,
-0.05862119793891907,
-0.3365756571292877,
-0.6453835368156433,
0.23251670598983765,
-0.0009588935063220561,
-0.13675165176391602,
0.19234158098697662,
0.1587267518043518,
-0.35408374667167664,
-0.2998664677143097,
-0.005748695228248835,
0.2017250657081604,
0.15220433473587036,
0.20511914789676666,
0.2833251953125,
-0.08672615140676498,
-0.34171074628829956,
-0.3844316601753235,
-0.04664032161235809,
0.2829635739326477,
-0.45934876799583435,
0.07805224508047104,
0.20936237275600433,
0.10678642243146896,
0.37506863474845886,
-0.035514865070581436,
-0.043999817222356796,
0.04252694919705391,
0.1307712197303772,
0.07883495092391968,
-0.13859890401363373,
0.1594754457473755,
0.14901892840862274,
0.24700047075748444,
0.19990386068820953,
-0.22246719896793365,
-0.052218303084373474,
0.001683768699876964,
-0.09037399291992188,
-0.19051870703697205,
-0.18565566837787628,
0.17176078259944916,
0.12278025597333908,
0.1018856018781662,
0.04582648351788521,
0.34137988090515137,
0.17139998078346252,
-0.22588802874088287,
0.14366485178470612,
-0.007509700022637844,
-0.1345752328634262,
-0.09188730269670486,
0.3624589145183563,
0.3725726306438446,
-0.6563616991043091,
0.10404695570468903,
-0.049563657492399216,
0.18776835501194,
0.14370030164718628,
-0.27950048446655273,
-0.2813876271247864,
0.42379844188690186,
-0.09352006763219833,
-0.10077210515737534,
0.3089173436164856,
-0.2708929479122162,
0.08159114420413971,
0.19684267044067383,
0.06733454763889313,
-0.28226137161254883,
0.23710134625434875,
-0.11235344409942627,
0.042296480387449265,
0.16245485842227936,
0.11410892009735107,
0.16634432971477509,
0.11646034568548203,
-0.07022513449192047,
-0.21967580914497375,
-0.12229473888874054,
-0.043154094368219376,
0.11727076768875122,
0.2665441930294037,
-0.11958009749650955,
0.1249019131064415,
0.5266058444976807,
0.3261624276638031,
-0.26325488090515137,
0.07642453163862228,
0.5432158708572388,
-0.3122917115688324,
0.0806591659784317,
0.1918928176164627,
-0.05547497794032097,
-0.04989985004067421,
0.18091338872909546,
-0.23919455707073212,
0.4039112627506256,
0.07905777543783188,
-0.005386069882661104,
-0.26680734753608704,
-0.05302821099758148,
-0.23602880537509918,
-0.42836451530456543,
0.21149246394634247,
0.04665564000606537,
-0.03551913797855377,
0.25308600068092346,
0.05293507128953934,
-0.09003499150276184,
-0.2782236635684967,
-0.13893719017505646,
-0.8122124671936035,
0.2934660017490387,
-0.2860761880874634,
-0.08008112013339996,
-0.08755972981452942,
0.020255668088793755,
0.06395132839679718,
-0.12363414466381073,
-0.28677913546562195,
0.1009153500199318,
0.18732766807079315,
0.03720075637102127,
-0.011949276551604271,
0.16449421644210815,
0.12202999740839005,
-0.26482799649238586,
0.3166709840297699,
0.3054232895374298,
0.11994049698114395,
0.01796865649521351,
-0.20191487669944763,
0.11080817133188248,
0.047732919454574585,
0.3355245590209961,
0.07278665900230408,
0.26858946681022644,
0.18518298864364624,
0.16804777085781097,
-0.15628165006637573,
-0.15916423499584198,
0.30215656757354736,
0.4226677417755127,
0.18189774453639984,
-0.14570322632789612,
0.03703907132148743,
0.07721632719039917,
0.4515742361545563,
0.10484345257282257,
-0.09222416579723358,
-0.1263715624809265,
-0.30541038513183594,
-0.0594790056347847,
0.4833452105522156,
-0.17912428081035614,
-0.016023041680455208,
0.27910590171813965,
-0.016197167336940765,
0.07711897045373917,
-0.1511853188276291,
-0.11755354702472687,
0.4446227252483368,
0.07232616096735,
0.5178589820861816,
-0.025720344856381416,
-0.12441656738519669,
-0.18681871891021729,
-0.19084113836288452,
-0.2879425287246704,
-0.12341443449258804,
0.2847411036491394,
-0.3124692440032959,
0.2768905460834503,
-0.4178832173347473,
-0.5642527937889099,
-0.2084294706583023,
0.4299703538417816,
-0.34802451729774475,
-0.3430694341659546,
-0.06800801306962967,
0.07788620889186859,
-0.02291121706366539,
0.2500191330909729,
0.1072104275226593,
-0.035542286932468414,
0.2320450097322464,
0.007474174257367849,
-0.22167734801769257,
-0.5956386923789978,
-0.4356401562690735,
0.0326632596552372,
0.28232601284980774,
0.03737521916627884,
0.12722940742969513,
-0.15690608322620392,
-0.06724181026220322,
-0.1452949047088623,
-0.4021958112716675,
0.3414442837238312,
-0.0869845300912857,
-0.008464028127491474,
0.11665326356887817,
0.42721864581108093,
-0.1959812194108963,
-0.09505845606327057,
0.3098008930683136,
0.11520156264305115,
-0.14765003323554993,
-0.06926611810922623,
-0.08467258512973785,
-0.062362320721149445,
-0.030823450535535812,
-0.43830201029777527,
-0.15058502554893494,
-0.32733821868896484,
-0.1820000559091568,
0.16898347437381744,
0.13323545455932617,
0.35230720043182373,
0.26457706093788147,
0.2091483771800995,
0.32835954427719116,
0.09546129405498505,
-0.09655757248401642,
-0.15933705866336823,
0.21701852977275848,
-0.3185725808143616,
-0.3167465329170227,
0.10404250025749207,
-0.14131319522857666,
0.23050634562969208,
0.11354032158851624,
-0.14633023738861084,
0.06803181767463684,
0.1159728467464447,
0.020054498687386513,
-0.10132033377885818,
0.3257167935371399,
0.7469018697738647,
-0.012623937800526619,
-0.001666548545472324,
-0.0988115519285202,
0.04782557487487793,
0.030737994238734245,
-0.43680423498153687,
0.34731775522232056,
0.17779219150543213,
0.5277687311172485,
-0.07014786452054977,
0.7515987753868103,
0.11483536660671234,
0.11667931079864502,
0.13216544687747955,
-0.07526091486215591,
0.06618605554103851,
-0.27247270941734314,
-0.18845969438552856,
0.29278141260147095,
0.0403268039226532,
-0.30309081077575684,
0.38984349370002747,
-0.12770190834999084,
-0.2598911225795746,
-0.43877696990966797,
0.07504778355360031,
0.0016000522300601006,
-0.24473896622657776,
-0.03760610893368721,
-0.37500521540641785,
0.3839122951030731,
-0.09530287981033325,
0.3992147147655487,
-0.08024546504020691,
-0.07314226031303406,
0.05920042097568512,
0.21968598663806915,
-0.09824588894844055,
0.13422372937202454,
-0.1730974167585373,
-0.24974942207336426,
-0.39932626485824585,
0.2461433857679367,
0.0012101938482373953,
0.14361731708049774,
-0.2927529513835907,
0.007916961796581745,
0.2831738293170929,
0.008745066821575165,
0.5200993418693542,
-0.6470434665679932,
-0.09738248586654663,
0.3353390395641327,
0.19218041002750397,
-0.6571788191795349,
-0.14138734340667725,
-0.18767741322517395,
0.27711716294288635,
0.3285014033317566,
-0.0478474386036396,
-0.332219660282135,
-0.15135812759399414,
0.2680897116661072,
0.04856894165277481,
-0.09909893572330475,
0.051520127803087234,
-0.24175819754600525,
-0.1433175802230835,
-0.3353152871131897,
-0.06578249484300613,
-0.09969418495893478,
0.1351073533296585,
0.10023951530456543,
0.21499647200107574,
0.08130349218845367,
0.026218364015221596,
-0.14487823843955994,
0.20501381158828735,
0.12260501086711884,
0.13836455345153809,
-0.2560671269893646,
0.10371240228414536,
0.48064759373664856,
-0.026589035987854004,
-0.10802468657493591,
0.1851126104593277,
-0.20795349776744843,
0.17263804376125336,
-0.21509242057800293,
0.14550818502902985,
0.16041050851345062,
-0.12064599245786667,
-0.23936378955841064,
0.03647962212562561,
-0.2542998790740967,
-0.046465497463941574,
0.05284279212355614,
0.20871564745903015,
0.08100207895040512,
-0.12740053236484528,
-0.4575786888599396,
0.560918927192688,
0.18852940201759338,
-0.07297087460756302,
0.2990115284919739,
-0.015665097162127495,
-0.430636465549469,
0.4052891433238983,
0.43294385075569153,
0.8635663986206055,
0.02991625852882862,
0.013999133370816708,
0.1714198738336563,
0.16713599860668182,
0.6254858374595642,
-0.5466776490211487,
0.20916442573070526,
-0.281289666891098,
0.31988802552223206,
-0.09525518119335175,
0.06537745147943497,
0.39573290944099426,
0.14318518340587616,
-0.22217018902301788,
0.35360613465309143,
-0.01738533191382885,
0.07415881007909775,
0.05659627914428711,
0.3767169713973999,
0.1265334039926529,
-0.3078528046607971,
-0.11752896755933762,
0.12139663100242615,
-0.18236219882965088,
0.2824687361717224,
-0.24982158839702606,
-0.012538871727883816,
-0.014507371932268143,
-0.244923934340477,
-0.4107002317905426,
0.09119312465190887,
-0.22418326139450073,
0.4608556032180786,
-0.34230324625968933,
-0.4593057930469513,
0.2506963014602661,
0.22680866718292236,
0.2354615479707718,
0.36966562271118164,
-0.37355026602745056,
0.20016756653785706,
0.015004532411694527,
-0.2361067235469818,
-0.07618848234415054,
0.041097208857536316,
0.386656254529953,
-0.1922805905342102,
-0.39226803183555603,
0.2118116021156311,
-0.1738399714231491,
-0.09788399189710617,
-0.29128608107566833,
-0.31771883368492126,
0.31883251667022705,
0.2502020001411438,
0.12403418123722076,
0.17259125411510468,
-0.08605661243200302,
-0.1338624209165573,
0.11980459839105606,
-0.2841421961784363,
0.010103791020810604,
0.00868886336684227,
0.08827618509531021,
-0.08681812882423401,
0.030908634886145592,
0.25715139508247375,
0.1876174360513687,
0.017261769622564316,
0.5952084064483643,
0.37850531935691833,
-0.21947510540485382,
-0.26590627431869507,
0.17860841751098633,
-0.22924330830574036,
-0.06068922206759453,
-0.2634165287017822,
0.1508059948682785,
0.09231764823198318,
-0.057126618921756744,
0.10292088240385056,
-0.015743911266326904,
-0.14091016352176666,
-0.007175784558057785,
-0.2680371105670929,
-0.020958488807082176,
0.02229999750852585,
-0.16380959749221802,
-0.0015580152394250035,
0.18830519914627075,
0.1332460641860962,
0.2853650152683258,
-0.2360226809978485,
-0.27911674976348877,
-0.2388353794813156,
-0.022319361567497253,
0.045321106910705566,
0.41371333599090576,
-0.01664041541516781,
-0.23604752123355865,
-0.038738369941711426,
0.1452319473028183,
-0.2301059514284134,
-0.2452722191810608,
-0.17255038022994995,
-0.04683484509587288,
0.12900717556476593,
-0.03978462517261505,
-0.18745756149291992,
0.13585394620895386,
-0.3403600752353668,
-0.29250508546829224,
-0.20412957668304443,
-0.13163819909095764,
-0.1293068379163742,
-0.024285631254315376,
0.22228863835334778,
-0.10420917719602585,
0.3449907898902893,
-0.2877996861934662,
0.0879831612110138,
0.03487571328878403,
0.29383137822151184,
0.05117115005850792,
0.24954849481582642,
0.4168611466884613,
-0.1764676719903946,
-0.5602070689201355,
0.18304529786109924,
-0.22114598751068115,
0.1743839830160141,
0.16332194209098816,
-0.08280208706855774,
-0.048011112958192825,
0.029965469613671303,
-0.021473566070199013,
0.026401694864034653,
-0.0819888785481453,
-0.03023334965109825,
0.13558773696422577,
0.20455144345760345,
-0.2827223539352417,
0.12395703047513962,
0.422098308801651,
-0.033097319304943085,
0.09618958085775375,
0.026279063895344734,
0.2615513801574707,
-0.05342176556587219,
0.17466238141059875,
0.04105696454644203,
0.016863875091075897,
-0.04344804957509041,
0.26398882269859314,
0.09460685402154922,
0.08114726841449738,
0.11606112122535706,
-0.1200716644525528,
0.04641953855752945,
0.13107292354106903,
0.3746131658554077,
0.10712651908397675,
0.06603597104549408,
0.10081599652767181,
0.216569185256958,
-0.22537603974342346,
-0.14098671078681946,
0.3062993586063385,
-0.10277515649795532,
-0.020908145233988762,
0.022877244278788567,
-0.06457270681858063,
0.07485640048980713,
0.1480168104171753,
-0.06374992430210114,
-0.31802287697792053,
0.13867245614528656,
-0.07772714644670486,
-0.1830138862133026,
-0.6274289488792419,
-0.2322813719511032,
0.05465104430913925,
-0.01765858195722103,
0.08908945322036743,
-0.08369693905115128,
-0.1092471331357956,
0.20269763469696045,
-0.03502576798200607,
-0.23063644766807556,
0.6797721982002258,
-0.06164853274822235,
0.044697582721710205,
-0.05517617613077164,
0.2520870566368103,
-0.21323475241661072,
-0.07124549895524979,
-0.1705532819032669,
-0.00184009806253016,
0.15782515704631805,
0.21092885732650757,
-0.4701043367385864,
-0.1439928412437439,
-0.0009011344518512487,
0.018944112583994865,
-0.05917779356241226,
0.0006442827288992703,
0.06300149112939835,
-0.037797294557094574,
0.294050931930542,
0.10967091470956802,
-0.08980167657136917,
-0.19844262301921844,
0.21691648662090302,
-0.007182060740888119,
-0.020038114860653877,
-0.24845506250858307,
0.004518262110650539,
0.10421206057071686,
-0.1066088154911995,
0.11462504416704178,
-0.5152722597122192,
0.04132688790559769,
0.2593996524810791,
0.38845953345298767,
-0.1085285097360611,
-0.22299575805664062,
0.08364369720220566,
-0.3275440037250519,
0.5394178628921509,
0.08417364954948425,
0.1905832439661026,
-0.11804763972759247,
-0.2930147647857666,
-0.29509666562080383,
0.005453574005514383,
-0.16959434747695923,
-0.3680242598056793,
-0.12039530277252197,
0.3059186339378357,
0.39280399680137634,
0.24459411203861237,
0.1168808564543724,
-0.2535529136657715,
-0.12980498373508453,
0.26505929231643677,
-0.1438632756471634,
-0.15893006324768066,
-0.07328233122825623,
0.04924123361706734,
-0.22518853843212128,
-0.17736820876598358,
0.08320578932762146,
-0.019430875778198242,
0.07522574812173843,
-0.22762097418308258,
-0.14735698699951172,
0.3186531364917755,
-0.43477770686149597,
0.25957685708999634,
0.02589532919228077,
0.5472241640090942,
0.02913188748061657,
-0.04227258265018463,
-0.16555677354335785,
0.22283847630023956,
-0.045000266283750534,
0.49142101407051086,
0.061620693653821945,
0.22850871086120605,
-0.21550072729587555,
-0.31885021924972534,
-0.34525763988494873,
0.6317009329795837,
0.03209638223052025,
-0.05509943515062332,
-0.2490805685520172,
-0.05867006629705429,
-0.22949929535388947,
0.29232853651046753,
-0.11924563348293304,
0.06629280745983124,
-0.03665190935134888,
0.18673370778560638,
-0.3581699728965759,
-0.23673096299171448,
0.33841896057128906,
-0.4211324453353882,
-0.335680216550827,
-0.18971435725688934,
0.0682089775800705,
-0.14943353831768036,
0.29298871755599976,
-0.10573398321866989,
-0.015354366041719913,
0.26347002387046814,
-0.13522709906101227,
-0.016723742708563805,
0.0001431076816515997,
0.05985728278756142,
0.1573977768421173,
-0.24589870870113373,
-0.40447190403938293,
-0.19432933628559113,
-0.060325395315885544,
-0.37993159890174866,
-0.24929291009902954
] |
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.3421066403388977,
0.04719279333949089,
-0.10626477003097534,
0.06201721727848053,
0.20045500993728638,
0.17774423956871033,
0.17687447369098663,
0.3401964008808136,
0.13733333349227905,
0.09211837500333786,
0.41052380204200745,
0.3346934914588928,
0.01600063592195511,
0.30764612555503845,
0.11132040619850159,
-0.33708688616752625,
0.05565062537789345,
0.07522193342447281,
-0.19471871852874756,
-0.2001762092113495,
-0.13208435475826263,
0.10374298691749573,
-0.2725183963775635,
-0.07011584937572479,
-0.14883549511432648,
0.10703843832015991,
0.12277796864509583,
-0.019670063629746437,
-0.19260218739509583,
-0.18620073795318604,
0.06802210956811905,
-0.0362134650349617,
0.228033646941185,
0.10794313997030258,
-0.0001084146206267178,
0.08063138276338577,
0.5717445611953735,
-0.158380389213562,
-0.4590221047401428,
-0.13032189011573792,
-0.08136408776044846,
-0.3462578058242798,
0.2564504146575928,
-0.3715744614601135,
-0.3347843885421753,
-0.025639494881033897,
0.3187549412250519,
-0.5857160687446594,
0.24128824472427368,
0.14796167612075806,
0.21826858818531036,
-0.07421106100082397,
0.35153505206108093,
-0.0048848288133740425,
0.41059747338294983,
0.21860653162002563,
-0.03604956343770027,
-0.12430758029222488,
0.010662873275578022,
0.02496490254998207,
0.06061766296625137,
0.4618475139141083,
0.04728573188185692,
-0.11424743384122849,
0.30397331714630127,
-0.3094906508922577,
0.26568448543548584,
-0.37311604619026184,
0.42296892404556274,
0.2541320025920868,
1.0161632299423218,
-0.11970152705907822,
0.09952079504728317,
0.10506673902273178,
0.00407438213005662,
0.12878164649009705,
0.24283640086650848,
0.20053517818450928,
-0.36427250504493713,
-0.07967925071716309,
0.1134934052824974,
-0.28304359316825867,
-0.33567896485328674,
0.34555792808532715,
-0.10172896087169647,
0.5368954539299011,
0.10903745144605637,
0.14164304733276367,
-0.1509755402803421,
-0.18528860807418823,
0.07730144262313843,
-0.07077997177839279,
0.10307736694812775,
0.35414132475852966,
-0.09304476529359818,
0.13513459265232086,
0.24577969312667847,
0.17513279616832733,
0.044339779764413834,
-0.09479636698961258,
-0.27976420521736145,
0.19170087575912476,
0.36852023005485535,
0.046187203377485275,
0.0220660213381052,
0.03235359117388725,
0.35566282272338867,
-0.18493086099624634,
0.20503871142864227,
-0.03057311289012432,
0.007939697243273258,
0.06664779782295227,
-0.05862119793891907,
-0.3365756571292877,
-0.6453835368156433,
0.23251670598983765,
-0.0009588935063220561,
-0.13675165176391602,
0.19234158098697662,
0.1587267518043518,
-0.35408374667167664,
-0.2998664677143097,
-0.005748695228248835,
0.2017250657081604,
0.15220433473587036,
0.20511914789676666,
0.2833251953125,
-0.08672615140676498,
-0.34171074628829956,
-0.3844316601753235,
-0.04664032161235809,
0.2829635739326477,
-0.45934876799583435,
0.07805224508047104,
0.20936237275600433,
0.10678642243146896,
0.37506863474845886,
-0.035514865070581436,
-0.043999817222356796,
0.04252694919705391,
0.1307712197303772,
0.07883495092391968,
-0.13859890401363373,
0.1594754457473755,
0.14901892840862274,
0.24700047075748444,
0.19990386068820953,
-0.22246719896793365,
-0.052218303084373474,
0.001683768699876964,
-0.09037399291992188,
-0.19051870703697205,
-0.18565566837787628,
0.17176078259944916,
0.12278025597333908,
0.1018856018781662,
0.04582648351788521,
0.34137988090515137,
0.17139998078346252,
-0.22588802874088287,
0.14366485178470612,
-0.007509700022637844,
-0.1345752328634262,
-0.09188730269670486,
0.3624589145183563,
0.3725726306438446,
-0.6563616991043091,
0.10404695570468903,
-0.049563657492399216,
0.18776835501194,
0.14370030164718628,
-0.27950048446655273,
-0.2813876271247864,
0.42379844188690186,
-0.09352006763219833,
-0.10077210515737534,
0.3089173436164856,
-0.2708929479122162,
0.08159114420413971,
0.19684267044067383,
0.06733454763889313,
-0.28226137161254883,
0.23710134625434875,
-0.11235344409942627,
0.042296480387449265,
0.16245485842227936,
0.11410892009735107,
0.16634432971477509,
0.11646034568548203,
-0.07022513449192047,
-0.21967580914497375,
-0.12229473888874054,
-0.043154094368219376,
0.11727076768875122,
0.2665441930294037,
-0.11958009749650955,
0.1249019131064415,
0.5266058444976807,
0.3261624276638031,
-0.26325488090515137,
0.07642453163862228,
0.5432158708572388,
-0.3122917115688324,
0.0806591659784317,
0.1918928176164627,
-0.05547497794032097,
-0.04989985004067421,
0.18091338872909546,
-0.23919455707073212,
0.4039112627506256,
0.07905777543783188,
-0.005386069882661104,
-0.26680734753608704,
-0.05302821099758148,
-0.23602880537509918,
-0.42836451530456543,
0.21149246394634247,
0.04665564000606537,
-0.03551913797855377,
0.25308600068092346,
0.05293507128953934,
-0.09003499150276184,
-0.2782236635684967,
-0.13893719017505646,
-0.8122124671936035,
0.2934660017490387,
-0.2860761880874634,
-0.08008112013339996,
-0.08755972981452942,
0.020255668088793755,
0.06395132839679718,
-0.12363414466381073,
-0.28677913546562195,
0.1009153500199318,
0.18732766807079315,
0.03720075637102127,
-0.011949276551604271,
0.16449421644210815,
0.12202999740839005,
-0.26482799649238586,
0.3166709840297699,
0.3054232895374298,
0.11994049698114395,
0.01796865649521351,
-0.20191487669944763,
0.11080817133188248,
0.047732919454574585,
0.3355245590209961,
0.07278665900230408,
0.26858946681022644,
0.18518298864364624,
0.16804777085781097,
-0.15628165006637573,
-0.15916423499584198,
0.30215656757354736,
0.4226677417755127,
0.18189774453639984,
-0.14570322632789612,
0.03703907132148743,
0.07721632719039917,
0.4515742361545563,
0.10484345257282257,
-0.09222416579723358,
-0.1263715624809265,
-0.30541038513183594,
-0.0594790056347847,
0.4833452105522156,
-0.17912428081035614,
-0.016023041680455208,
0.27910590171813965,
-0.016197167336940765,
0.07711897045373917,
-0.1511853188276291,
-0.11755354702472687,
0.4446227252483368,
0.07232616096735,
0.5178589820861816,
-0.025720344856381416,
-0.12441656738519669,
-0.18681871891021729,
-0.19084113836288452,
-0.2879425287246704,
-0.12341443449258804,
0.2847411036491394,
-0.3124692440032959,
0.2768905460834503,
-0.4178832173347473,
-0.5642527937889099,
-0.2084294706583023,
0.4299703538417816,
-0.34802451729774475,
-0.3430694341659546,
-0.06800801306962967,
0.07788620889186859,
-0.02291121706366539,
0.2500191330909729,
0.1072104275226593,
-0.035542286932468414,
0.2320450097322464,
0.007474174257367849,
-0.22167734801769257,
-0.5956386923789978,
-0.4356401562690735,
0.0326632596552372,
0.28232601284980774,
0.03737521916627884,
0.12722940742969513,
-0.15690608322620392,
-0.06724181026220322,
-0.1452949047088623,
-0.4021958112716675,
0.3414442837238312,
-0.0869845300912857,
-0.008464028127491474,
0.11665326356887817,
0.42721864581108093,
-0.1959812194108963,
-0.09505845606327057,
0.3098008930683136,
0.11520156264305115,
-0.14765003323554993,
-0.06926611810922623,
-0.08467258512973785,
-0.062362320721149445,
-0.030823450535535812,
-0.43830201029777527,
-0.15058502554893494,
-0.32733821868896484,
-0.1820000559091568,
0.16898347437381744,
0.13323545455932617,
0.35230720043182373,
0.26457706093788147,
0.2091483771800995,
0.32835954427719116,
0.09546129405498505,
-0.09655757248401642,
-0.15933705866336823,
0.21701852977275848,
-0.3185725808143616,
-0.3167465329170227,
0.10404250025749207,
-0.14131319522857666,
0.23050634562969208,
0.11354032158851624,
-0.14633023738861084,
0.06803181767463684,
0.1159728467464447,
0.020054498687386513,
-0.10132033377885818,
0.3257167935371399,
0.7469018697738647,
-0.012623937800526619,
-0.001666548545472324,
-0.0988115519285202,
0.04782557487487793,
0.030737994238734245,
-0.43680423498153687,
0.34731775522232056,
0.17779219150543213,
0.5277687311172485,
-0.07014786452054977,
0.7515987753868103,
0.11483536660671234,
0.11667931079864502,
0.13216544687747955,
-0.07526091486215591,
0.06618605554103851,
-0.27247270941734314,
-0.18845969438552856,
0.29278141260147095,
0.0403268039226532,
-0.30309081077575684,
0.38984349370002747,
-0.12770190834999084,
-0.2598911225795746,
-0.43877696990966797,
0.07504778355360031,
0.0016000522300601006,
-0.24473896622657776,
-0.03760610893368721,
-0.37500521540641785,
0.3839122951030731,
-0.09530287981033325,
0.3992147147655487,
-0.08024546504020691,
-0.07314226031303406,
0.05920042097568512,
0.21968598663806915,
-0.09824588894844055,
0.13422372937202454,
-0.1730974167585373,
-0.24974942207336426,
-0.39932626485824585,
0.2461433857679367,
0.0012101938482373953,
0.14361731708049774,
-0.2927529513835907,
0.007916961796581745,
0.2831738293170929,
0.008745066821575165,
0.5200993418693542,
-0.6470434665679932,
-0.09738248586654663,
0.3353390395641327,
0.19218041002750397,
-0.6571788191795349,
-0.14138734340667725,
-0.18767741322517395,
0.27711716294288635,
0.3285014033317566,
-0.0478474386036396,
-0.332219660282135,
-0.15135812759399414,
0.2680897116661072,
0.04856894165277481,
-0.09909893572330475,
0.051520127803087234,
-0.24175819754600525,
-0.1433175802230835,
-0.3353152871131897,
-0.06578249484300613,
-0.09969418495893478,
0.1351073533296585,
0.10023951530456543,
0.21499647200107574,
0.08130349218845367,
0.026218364015221596,
-0.14487823843955994,
0.20501381158828735,
0.12260501086711884,
0.13836455345153809,
-0.2560671269893646,
0.10371240228414536,
0.48064759373664856,
-0.026589035987854004,
-0.10802468657493591,
0.1851126104593277,
-0.20795349776744843,
0.17263804376125336,
-0.21509242057800293,
0.14550818502902985,
0.16041050851345062,
-0.12064599245786667,
-0.23936378955841064,
0.03647962212562561,
-0.2542998790740967,
-0.046465497463941574,
0.05284279212355614,
0.20871564745903015,
0.08100207895040512,
-0.12740053236484528,
-0.4575786888599396,
0.560918927192688,
0.18852940201759338,
-0.07297087460756302,
0.2990115284919739,
-0.015665097162127495,
-0.430636465549469,
0.4052891433238983,
0.43294385075569153,
0.8635663986206055,
0.02991625852882862,
0.013999133370816708,
0.1714198738336563,
0.16713599860668182,
0.6254858374595642,
-0.5466776490211487,
0.20916442573070526,
-0.281289666891098,
0.31988802552223206,
-0.09525518119335175,
0.06537745147943497,
0.39573290944099426,
0.14318518340587616,
-0.22217018902301788,
0.35360613465309143,
-0.01738533191382885,
0.07415881007909775,
0.05659627914428711,
0.3767169713973999,
0.1265334039926529,
-0.3078528046607971,
-0.11752896755933762,
0.12139663100242615,
-0.18236219882965088,
0.2824687361717224,
-0.24982158839702606,
-0.012538871727883816,
-0.014507371932268143,
-0.244923934340477,
-0.4107002317905426,
0.09119312465190887,
-0.22418326139450073,
0.4608556032180786,
-0.34230324625968933,
-0.4593057930469513,
0.2506963014602661,
0.22680866718292236,
0.2354615479707718,
0.36966562271118164,
-0.37355026602745056,
0.20016756653785706,
0.015004532411694527,
-0.2361067235469818,
-0.07618848234415054,
0.041097208857536316,
0.386656254529953,
-0.1922805905342102,
-0.39226803183555603,
0.2118116021156311,
-0.1738399714231491,
-0.09788399189710617,
-0.29128608107566833,
-0.31771883368492126,
0.31883251667022705,
0.2502020001411438,
0.12403418123722076,
0.17259125411510468,
-0.08605661243200302,
-0.1338624209165573,
0.11980459839105606,
-0.2841421961784363,
0.010103791020810604,
0.00868886336684227,
0.08827618509531021,
-0.08681812882423401,
0.030908634886145592,
0.25715139508247375,
0.1876174360513687,
0.017261769622564316,
0.5952084064483643,
0.37850531935691833,
-0.21947510540485382,
-0.26590627431869507,
0.17860841751098633,
-0.22924330830574036,
-0.06068922206759453,
-0.2634165287017822,
0.1508059948682785,
0.09231764823198318,
-0.057126618921756744,
0.10292088240385056,
-0.015743911266326904,
-0.14091016352176666,
-0.007175784558057785,
-0.2680371105670929,
-0.020958488807082176,
0.02229999750852585,
-0.16380959749221802,
-0.0015580152394250035,
0.18830519914627075,
0.1332460641860962,
0.2853650152683258,
-0.2360226809978485,
-0.27911674976348877,
-0.2388353794813156,
-0.022319361567497253,
0.045321106910705566,
0.41371333599090576,
-0.01664041541516781,
-0.23604752123355865,
-0.038738369941711426,
0.1452319473028183,
-0.2301059514284134,
-0.2452722191810608,
-0.17255038022994995,
-0.04683484509587288,
0.12900717556476593,
-0.03978462517261505,
-0.18745756149291992,
0.13585394620895386,
-0.3403600752353668,
-0.29250508546829224,
-0.20412957668304443,
-0.13163819909095764,
-0.1293068379163742,
-0.024285631254315376,
0.22228863835334778,
-0.10420917719602585,
0.3449907898902893,
-0.2877996861934662,
0.0879831612110138,
0.03487571328878403,
0.29383137822151184,
0.05117115005850792,
0.24954849481582642,
0.4168611466884613,
-0.1764676719903946,
-0.5602070689201355,
0.18304529786109924,
-0.22114598751068115,
0.1743839830160141,
0.16332194209098816,
-0.08280208706855774,
-0.048011112958192825,
0.029965469613671303,
-0.021473566070199013,
0.026401694864034653,
-0.0819888785481453,
-0.03023334965109825,
0.13558773696422577,
0.20455144345760345,
-0.2827223539352417,
0.12395703047513962,
0.422098308801651,
-0.033097319304943085,
0.09618958085775375,
0.026279063895344734,
0.2615513801574707,
-0.05342176556587219,
0.17466238141059875,
0.04105696454644203,
0.016863875091075897,
-0.04344804957509041,
0.26398882269859314,
0.09460685402154922,
0.08114726841449738,
0.11606112122535706,
-0.1200716644525528,
0.04641953855752945,
0.13107292354106903,
0.3746131658554077,
0.10712651908397675,
0.06603597104549408,
0.10081599652767181,
0.216569185256958,
-0.22537603974342346,
-0.14098671078681946,
0.3062993586063385,
-0.10277515649795532,
-0.020908145233988762,
0.022877244278788567,
-0.06457270681858063,
0.07485640048980713,
0.1480168104171753,
-0.06374992430210114,
-0.31802287697792053,
0.13867245614528656,
-0.07772714644670486,
-0.1830138862133026,
-0.6274289488792419,
-0.2322813719511032,
0.05465104430913925,
-0.01765858195722103,
0.08908945322036743,
-0.08369693905115128,
-0.1092471331357956,
0.20269763469696045,
-0.03502576798200607,
-0.23063644766807556,
0.6797721982002258,
-0.06164853274822235,
0.044697582721710205,
-0.05517617613077164,
0.2520870566368103,
-0.21323475241661072,
-0.07124549895524979,
-0.1705532819032669,
-0.00184009806253016,
0.15782515704631805,
0.21092885732650757,
-0.4701043367385864,
-0.1439928412437439,
-0.0009011344518512487,
0.018944112583994865,
-0.05917779356241226,
0.0006442827288992703,
0.06300149112939835,
-0.037797294557094574,
0.294050931930542,
0.10967091470956802,
-0.08980167657136917,
-0.19844262301921844,
0.21691648662090302,
-0.007182060740888119,
-0.020038114860653877,
-0.24845506250858307,
0.004518262110650539,
0.10421206057071686,
-0.1066088154911995,
0.11462504416704178,
-0.5152722597122192,
0.04132688790559769,
0.2593996524810791,
0.38845953345298767,
-0.1085285097360611,
-0.22299575805664062,
0.08364369720220566,
-0.3275440037250519,
0.5394178628921509,
0.08417364954948425,
0.1905832439661026,
-0.11804763972759247,
-0.2930147647857666,
-0.29509666562080383,
0.005453574005514383,
-0.16959434747695923,
-0.3680242598056793,
-0.12039530277252197,
0.3059186339378357,
0.39280399680137634,
0.24459411203861237,
0.1168808564543724,
-0.2535529136657715,
-0.12980498373508453,
0.26505929231643677,
-0.1438632756471634,
-0.15893006324768066,
-0.07328233122825623,
0.04924123361706734,
-0.22518853843212128,
-0.17736820876598358,
0.08320578932762146,
-0.019430875778198242,
0.07522574812173843,
-0.22762097418308258,
-0.14735698699951172,
0.3186531364917755,
-0.43477770686149597,
0.25957685708999634,
0.02589532919228077,
0.5472241640090942,
0.02913188748061657,
-0.04227258265018463,
-0.16555677354335785,
0.22283847630023956,
-0.045000266283750534,
0.49142101407051086,
0.061620693653821945,
0.22850871086120605,
-0.21550072729587555,
-0.31885021924972534,
-0.34525763988494873,
0.6317009329795837,
0.03209638223052025,
-0.05509943515062332,
-0.2490805685520172,
-0.05867006629705429,
-0.22949929535388947,
0.29232853651046753,
-0.11924563348293304,
0.06629280745983124,
-0.03665190935134888,
0.18673370778560638,
-0.3581699728965759,
-0.23673096299171448,
0.33841896057128906,
-0.4211324453353882,
-0.335680216550827,
-0.18971435725688934,
0.0682089775800705,
-0.14943353831768036,
0.29298871755599976,
-0.10573398321866989,
-0.015354366041719913,
0.26347002387046814,
-0.13522709906101227,
-0.016723742708563805,
0.0001431076816515997,
0.05985728278756142,
0.1573977768421173,
-0.24589870870113373,
-0.40447190403938293,
-0.19432933628559113,
-0.060325395315885544,
-0.37993159890174866,
-0.24929291009902954
] |
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 <[email protected]>
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 <[email protected]>
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.3421066403388977,
0.04719279333949089,
-0.10626477003097534,
0.06201721727848053,
0.20045500993728638,
0.17774423956871033,
0.17687447369098663,
0.3401964008808136,
0.13733333349227905,
0.09211837500333786,
0.41052380204200745,
0.3346934914588928,
0.01600063592195511,
0.30764612555503845,
0.11132040619850159,
-0.33708688616752625,
0.05565062537789345,
0.07522193342447281,
-0.19471871852874756,
-0.2001762092113495,
-0.13208435475826263,
0.10374298691749573,
-0.2725183963775635,
-0.07011584937572479,
-0.14883549511432648,
0.10703843832015991,
0.12277796864509583,
-0.019670063629746437,
-0.19260218739509583,
-0.18620073795318604,
0.06802210956811905,
-0.0362134650349617,
0.228033646941185,
0.10794313997030258,
-0.0001084146206267178,
0.08063138276338577,
0.5717445611953735,
-0.158380389213562,
-0.4590221047401428,
-0.13032189011573792,
-0.08136408776044846,
-0.3462578058242798,
0.2564504146575928,
-0.3715744614601135,
-0.3347843885421753,
-0.025639494881033897,
0.3187549412250519,
-0.5857160687446594,
0.24128824472427368,
0.14796167612075806,
0.21826858818531036,
-0.07421106100082397,
0.35153505206108093,
-0.0048848288133740425,
0.41059747338294983,
0.21860653162002563,
-0.03604956343770027,
-0.12430758029222488,
0.010662873275578022,
0.02496490254998207,
0.06061766296625137,
0.4618475139141083,
0.04728573188185692,
-0.11424743384122849,
0.30397331714630127,
-0.3094906508922577,
0.26568448543548584,
-0.37311604619026184,
0.42296892404556274,
0.2541320025920868,
1.0161632299423218,
-0.11970152705907822,
0.09952079504728317,
0.10506673902273178,
0.00407438213005662,
0.12878164649009705,
0.24283640086650848,
0.20053517818450928,
-0.36427250504493713,
-0.07967925071716309,
0.1134934052824974,
-0.28304359316825867,
-0.33567896485328674,
0.34555792808532715,
-0.10172896087169647,
0.5368954539299011,
0.10903745144605637,
0.14164304733276367,
-0.1509755402803421,
-0.18528860807418823,
0.07730144262313843,
-0.07077997177839279,
0.10307736694812775,
0.35414132475852966,
-0.09304476529359818,
0.13513459265232086,
0.24577969312667847,
0.17513279616832733,
0.044339779764413834,
-0.09479636698961258,
-0.27976420521736145,
0.19170087575912476,
0.36852023005485535,
0.046187203377485275,
0.0220660213381052,
0.03235359117388725,
0.35566282272338867,
-0.18493086099624634,
0.20503871142864227,
-0.03057311289012432,
0.007939697243273258,
0.06664779782295227,
-0.05862119793891907,
-0.3365756571292877,
-0.6453835368156433,
0.23251670598983765,
-0.0009588935063220561,
-0.13675165176391602,
0.19234158098697662,
0.1587267518043518,
-0.35408374667167664,
-0.2998664677143097,
-0.005748695228248835,
0.2017250657081604,
0.15220433473587036,
0.20511914789676666,
0.2833251953125,
-0.08672615140676498,
-0.34171074628829956,
-0.3844316601753235,
-0.04664032161235809,
0.2829635739326477,
-0.45934876799583435,
0.07805224508047104,
0.20936237275600433,
0.10678642243146896,
0.37506863474845886,
-0.035514865070581436,
-0.043999817222356796,
0.04252694919705391,
0.1307712197303772,
0.07883495092391968,
-0.13859890401363373,
0.1594754457473755,
0.14901892840862274,
0.24700047075748444,
0.19990386068820953,
-0.22246719896793365,
-0.052218303084373474,
0.001683768699876964,
-0.09037399291992188,
-0.19051870703697205,
-0.18565566837787628,
0.17176078259944916,
0.12278025597333908,
0.1018856018781662,
0.04582648351788521,
0.34137988090515137,
0.17139998078346252,
-0.22588802874088287,
0.14366485178470612,
-0.007509700022637844,
-0.1345752328634262,
-0.09188730269670486,
0.3624589145183563,
0.3725726306438446,
-0.6563616991043091,
0.10404695570468903,
-0.049563657492399216,
0.18776835501194,
0.14370030164718628,
-0.27950048446655273,
-0.2813876271247864,
0.42379844188690186,
-0.09352006763219833,
-0.10077210515737534,
0.3089173436164856,
-0.2708929479122162,
0.08159114420413971,
0.19684267044067383,
0.06733454763889313,
-0.28226137161254883,
0.23710134625434875,
-0.11235344409942627,
0.042296480387449265,
0.16245485842227936,
0.11410892009735107,
0.16634432971477509,
0.11646034568548203,
-0.07022513449192047,
-0.21967580914497375,
-0.12229473888874054,
-0.043154094368219376,
0.11727076768875122,
0.2665441930294037,
-0.11958009749650955,
0.1249019131064415,
0.5266058444976807,
0.3261624276638031,
-0.26325488090515137,
0.07642453163862228,
0.5432158708572388,
-0.3122917115688324,
0.0806591659784317,
0.1918928176164627,
-0.05547497794032097,
-0.04989985004067421,
0.18091338872909546,
-0.23919455707073212,
0.4039112627506256,
0.07905777543783188,
-0.005386069882661104,
-0.26680734753608704,
-0.05302821099758148,
-0.23602880537509918,
-0.42836451530456543,
0.21149246394634247,
0.04665564000606537,
-0.03551913797855377,
0.25308600068092346,
0.05293507128953934,
-0.09003499150276184,
-0.2782236635684967,
-0.13893719017505646,
-0.8122124671936035,
0.2934660017490387,
-0.2860761880874634,
-0.08008112013339996,
-0.08755972981452942,
0.020255668088793755,
0.06395132839679718,
-0.12363414466381073,
-0.28677913546562195,
0.1009153500199318,
0.18732766807079315,
0.03720075637102127,
-0.011949276551604271,
0.16449421644210815,
0.12202999740839005,
-0.26482799649238586,
0.3166709840297699,
0.3054232895374298,
0.11994049698114395,
0.01796865649521351,
-0.20191487669944763,
0.11080817133188248,
0.047732919454574585,
0.3355245590209961,
0.07278665900230408,
0.26858946681022644,
0.18518298864364624,
0.16804777085781097,
-0.15628165006637573,
-0.15916423499584198,
0.30215656757354736,
0.4226677417755127,
0.18189774453639984,
-0.14570322632789612,
0.03703907132148743,
0.07721632719039917,
0.4515742361545563,
0.10484345257282257,
-0.09222416579723358,
-0.1263715624809265,
-0.30541038513183594,
-0.0594790056347847,
0.4833452105522156,
-0.17912428081035614,
-0.016023041680455208,
0.27910590171813965,
-0.016197167336940765,
0.07711897045373917,
-0.1511853188276291,
-0.11755354702472687,
0.4446227252483368,
0.07232616096735,
0.5178589820861816,
-0.025720344856381416,
-0.12441656738519669,
-0.18681871891021729,
-0.19084113836288452,
-0.2879425287246704,
-0.12341443449258804,
0.2847411036491394,
-0.3124692440032959,
0.2768905460834503,
-0.4178832173347473,
-0.5642527937889099,
-0.2084294706583023,
0.4299703538417816,
-0.34802451729774475,
-0.3430694341659546,
-0.06800801306962967,
0.07788620889186859,
-0.02291121706366539,
0.2500191330909729,
0.1072104275226593,
-0.035542286932468414,
0.2320450097322464,
0.007474174257367849,
-0.22167734801769257,
-0.5956386923789978,
-0.4356401562690735,
0.0326632596552372,
0.28232601284980774,
0.03737521916627884,
0.12722940742969513,
-0.15690608322620392,
-0.06724181026220322,
-0.1452949047088623,
-0.4021958112716675,
0.3414442837238312,
-0.0869845300912857,
-0.008464028127491474,
0.11665326356887817,
0.42721864581108093,
-0.1959812194108963,
-0.09505845606327057,
0.3098008930683136,
0.11520156264305115,
-0.14765003323554993,
-0.06926611810922623,
-0.08467258512973785,
-0.062362320721149445,
-0.030823450535535812,
-0.43830201029777527,
-0.15058502554893494,
-0.32733821868896484,
-0.1820000559091568,
0.16898347437381744,
0.13323545455932617,
0.35230720043182373,
0.26457706093788147,
0.2091483771800995,
0.32835954427719116,
0.09546129405498505,
-0.09655757248401642,
-0.15933705866336823,
0.21701852977275848,
-0.3185725808143616,
-0.3167465329170227,
0.10404250025749207,
-0.14131319522857666,
0.23050634562969208,
0.11354032158851624,
-0.14633023738861084,
0.06803181767463684,
0.1159728467464447,
0.020054498687386513,
-0.10132033377885818,
0.3257167935371399,
0.7469018697738647,
-0.012623937800526619,
-0.001666548545472324,
-0.0988115519285202,
0.04782557487487793,
0.030737994238734245,
-0.43680423498153687,
0.34731775522232056,
0.17779219150543213,
0.5277687311172485,
-0.07014786452054977,
0.7515987753868103,
0.11483536660671234,
0.11667931079864502,
0.13216544687747955,
-0.07526091486215591,
0.06618605554103851,
-0.27247270941734314,
-0.18845969438552856,
0.29278141260147095,
0.0403268039226532,
-0.30309081077575684,
0.38984349370002747,
-0.12770190834999084,
-0.2598911225795746,
-0.43877696990966797,
0.07504778355360031,
0.0016000522300601006,
-0.24473896622657776,
-0.03760610893368721,
-0.37500521540641785,
0.3839122951030731,
-0.09530287981033325,
0.3992147147655487,
-0.08024546504020691,
-0.07314226031303406,
0.05920042097568512,
0.21968598663806915,
-0.09824588894844055,
0.13422372937202454,
-0.1730974167585373,
-0.24974942207336426,
-0.39932626485824585,
0.2461433857679367,
0.0012101938482373953,
0.14361731708049774,
-0.2927529513835907,
0.007916961796581745,
0.2831738293170929,
0.008745066821575165,
0.5200993418693542,
-0.6470434665679932,
-0.09738248586654663,
0.3353390395641327,
0.19218041002750397,
-0.6571788191795349,
-0.14138734340667725,
-0.18767741322517395,
0.27711716294288635,
0.3285014033317566,
-0.0478474386036396,
-0.332219660282135,
-0.15135812759399414,
0.2680897116661072,
0.04856894165277481,
-0.09909893572330475,
0.051520127803087234,
-0.24175819754600525,
-0.1433175802230835,
-0.3353152871131897,
-0.06578249484300613,
-0.09969418495893478,
0.1351073533296585,
0.10023951530456543,
0.21499647200107574,
0.08130349218845367,
0.026218364015221596,
-0.14487823843955994,
0.20501381158828735,
0.12260501086711884,
0.13836455345153809,
-0.2560671269893646,
0.10371240228414536,
0.48064759373664856,
-0.026589035987854004,
-0.10802468657493591,
0.1851126104593277,
-0.20795349776744843,
0.17263804376125336,
-0.21509242057800293,
0.14550818502902985,
0.16041050851345062,
-0.12064599245786667,
-0.23936378955841064,
0.03647962212562561,
-0.2542998790740967,
-0.046465497463941574,
0.05284279212355614,
0.20871564745903015,
0.08100207895040512,
-0.12740053236484528,
-0.4575786888599396,
0.560918927192688,
0.18852940201759338,
-0.07297087460756302,
0.2990115284919739,
-0.015665097162127495,
-0.430636465549469,
0.4052891433238983,
0.43294385075569153,
0.8635663986206055,
0.02991625852882862,
0.013999133370816708,
0.1714198738336563,
0.16713599860668182,
0.6254858374595642,
-0.5466776490211487,
0.20916442573070526,
-0.281289666891098,
0.31988802552223206,
-0.09525518119335175,
0.06537745147943497,
0.39573290944099426,
0.14318518340587616,
-0.22217018902301788,
0.35360613465309143,
-0.01738533191382885,
0.07415881007909775,
0.05659627914428711,
0.3767169713973999,
0.1265334039926529,
-0.3078528046607971,
-0.11752896755933762,
0.12139663100242615,
-0.18236219882965088,
0.2824687361717224,
-0.24982158839702606,
-0.012538871727883816,
-0.014507371932268143,
-0.244923934340477,
-0.4107002317905426,
0.09119312465190887,
-0.22418326139450073,
0.4608556032180786,
-0.34230324625968933,
-0.4593057930469513,
0.2506963014602661,
0.22680866718292236,
0.2354615479707718,
0.36966562271118164,
-0.37355026602745056,
0.20016756653785706,
0.015004532411694527,
-0.2361067235469818,
-0.07618848234415054,
0.041097208857536316,
0.386656254529953,
-0.1922805905342102,
-0.39226803183555603,
0.2118116021156311,
-0.1738399714231491,
-0.09788399189710617,
-0.29128608107566833,
-0.31771883368492126,
0.31883251667022705,
0.2502020001411438,
0.12403418123722076,
0.17259125411510468,
-0.08605661243200302,
-0.1338624209165573,
0.11980459839105606,
-0.2841421961784363,
0.010103791020810604,
0.00868886336684227,
0.08827618509531021,
-0.08681812882423401,
0.030908634886145592,
0.25715139508247375,
0.1876174360513687,
0.017261769622564316,
0.5952084064483643,
0.37850531935691833,
-0.21947510540485382,
-0.26590627431869507,
0.17860841751098633,
-0.22924330830574036,
-0.06068922206759453,
-0.2634165287017822,
0.1508059948682785,
0.09231764823198318,
-0.057126618921756744,
0.10292088240385056,
-0.015743911266326904,
-0.14091016352176666,
-0.007175784558057785,
-0.2680371105670929,
-0.020958488807082176,
0.02229999750852585,
-0.16380959749221802,
-0.0015580152394250035,
0.18830519914627075,
0.1332460641860962,
0.2853650152683258,
-0.2360226809978485,
-0.27911674976348877,
-0.2388353794813156,
-0.022319361567497253,
0.045321106910705566,
0.41371333599090576,
-0.01664041541516781,
-0.23604752123355865,
-0.038738369941711426,
0.1452319473028183,
-0.2301059514284134,
-0.2452722191810608,
-0.17255038022994995,
-0.04683484509587288,
0.12900717556476593,
-0.03978462517261505,
-0.18745756149291992,
0.13585394620895386,
-0.3403600752353668,
-0.29250508546829224,
-0.20412957668304443,
-0.13163819909095764,
-0.1293068379163742,
-0.024285631254315376,
0.22228863835334778,
-0.10420917719602585,
0.3449907898902893,
-0.2877996861934662,
0.0879831612110138,
0.03487571328878403,
0.29383137822151184,
0.05117115005850792,
0.24954849481582642,
0.4168611466884613,
-0.1764676719903946,
-0.5602070689201355,
0.18304529786109924,
-0.22114598751068115,
0.1743839830160141,
0.16332194209098816,
-0.08280208706855774,
-0.048011112958192825,
0.029965469613671303,
-0.021473566070199013,
0.026401694864034653,
-0.0819888785481453,
-0.03023334965109825,
0.13558773696422577,
0.20455144345760345,
-0.2827223539352417,
0.12395703047513962,
0.422098308801651,
-0.033097319304943085,
0.09618958085775375,
0.026279063895344734,
0.2615513801574707,
-0.05342176556587219,
0.17466238141059875,
0.04105696454644203,
0.016863875091075897,
-0.04344804957509041,
0.26398882269859314,
0.09460685402154922,
0.08114726841449738,
0.11606112122535706,
-0.1200716644525528,
0.04641953855752945,
0.13107292354106903,
0.3746131658554077,
0.10712651908397675,
0.06603597104549408,
0.10081599652767181,
0.216569185256958,
-0.22537603974342346,
-0.14098671078681946,
0.3062993586063385,
-0.10277515649795532,
-0.020908145233988762,
0.022877244278788567,
-0.06457270681858063,
0.07485640048980713,
0.1480168104171753,
-0.06374992430210114,
-0.31802287697792053,
0.13867245614528656,
-0.07772714644670486,
-0.1830138862133026,
-0.6274289488792419,
-0.2322813719511032,
0.05465104430913925,
-0.01765858195722103,
0.08908945322036743,
-0.08369693905115128,
-0.1092471331357956,
0.20269763469696045,
-0.03502576798200607,
-0.23063644766807556,
0.6797721982002258,
-0.06164853274822235,
0.044697582721710205,
-0.05517617613077164,
0.2520870566368103,
-0.21323475241661072,
-0.07124549895524979,
-0.1705532819032669,
-0.00184009806253016,
0.15782515704631805,
0.21092885732650757,
-0.4701043367385864,
-0.1439928412437439,
-0.0009011344518512487,
0.018944112583994865,
-0.05917779356241226,
0.0006442827288992703,
0.06300149112939835,
-0.037797294557094574,
0.294050931930542,
0.10967091470956802,
-0.08980167657136917,
-0.19844262301921844,
0.21691648662090302,
-0.007182060740888119,
-0.020038114860653877,
-0.24845506250858307,
0.004518262110650539,
0.10421206057071686,
-0.1066088154911995,
0.11462504416704178,
-0.5152722597122192,
0.04132688790559769,
0.2593996524810791,
0.38845953345298767,
-0.1085285097360611,
-0.22299575805664062,
0.08364369720220566,
-0.3275440037250519,
0.5394178628921509,
0.08417364954948425,
0.1905832439661026,
-0.11804763972759247,
-0.2930147647857666,
-0.29509666562080383,
0.005453574005514383,
-0.16959434747695923,
-0.3680242598056793,
-0.12039530277252197,
0.3059186339378357,
0.39280399680137634,
0.24459411203861237,
0.1168808564543724,
-0.2535529136657715,
-0.12980498373508453,
0.26505929231643677,
-0.1438632756471634,
-0.15893006324768066,
-0.07328233122825623,
0.04924123361706734,
-0.22518853843212128,
-0.17736820876598358,
0.08320578932762146,
-0.019430875778198242,
0.07522574812173843,
-0.22762097418308258,
-0.14735698699951172,
0.3186531364917755,
-0.43477770686149597,
0.25957685708999634,
0.02589532919228077,
0.5472241640090942,
0.02913188748061657,
-0.04227258265018463,
-0.16555677354335785,
0.22283847630023956,
-0.045000266283750534,
0.49142101407051086,
0.061620693653821945,
0.22850871086120605,
-0.21550072729587555,
-0.31885021924972534,
-0.34525763988494873,
0.6317009329795837,
0.03209638223052025,
-0.05509943515062332,
-0.2490805685520172,
-0.05867006629705429,
-0.22949929535388947,
0.29232853651046753,
-0.11924563348293304,
0.06629280745983124,
-0.03665190935134888,
0.18673370778560638,
-0.3581699728965759,
-0.23673096299171448,
0.33841896057128906,
-0.4211324453353882,
-0.335680216550827,
-0.18971435725688934,
0.0682089775800705,
-0.14943353831768036,
0.29298871755599976,
-0.10573398321866989,
-0.015354366041719913,
0.26347002387046814,
-0.13522709906101227,
-0.016723742708563805,
0.0001431076816515997,
0.05985728278756142,
0.1573977768421173,
-0.24589870870113373,
-0.40447190403938293,
-0.19432933628559113,
-0.060325395315885544,
-0.37993159890174866,
-0.24929291009902954
] |
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.3421066403388977,
0.04719279333949089,
-0.10626477003097534,
0.06201721727848053,
0.20045500993728638,
0.17774423956871033,
0.17687447369098663,
0.3401964008808136,
0.13733333349227905,
0.09211837500333786,
0.41052380204200745,
0.3346934914588928,
0.01600063592195511,
0.30764612555503845,
0.11132040619850159,
-0.33708688616752625,
0.05565062537789345,
0.07522193342447281,
-0.19471871852874756,
-0.2001762092113495,
-0.13208435475826263,
0.10374298691749573,
-0.2725183963775635,
-0.07011584937572479,
-0.14883549511432648,
0.10703843832015991,
0.12277796864509583,
-0.019670063629746437,
-0.19260218739509583,
-0.18620073795318604,
0.06802210956811905,
-0.0362134650349617,
0.228033646941185,
0.10794313997030258,
-0.0001084146206267178,
0.08063138276338577,
0.5717445611953735,
-0.158380389213562,
-0.4590221047401428,
-0.13032189011573792,
-0.08136408776044846,
-0.3462578058242798,
0.2564504146575928,
-0.3715744614601135,
-0.3347843885421753,
-0.025639494881033897,
0.3187549412250519,
-0.5857160687446594,
0.24128824472427368,
0.14796167612075806,
0.21826858818531036,
-0.07421106100082397,
0.35153505206108093,
-0.0048848288133740425,
0.41059747338294983,
0.21860653162002563,
-0.03604956343770027,
-0.12430758029222488,
0.010662873275578022,
0.02496490254998207,
0.06061766296625137,
0.4618475139141083,
0.04728573188185692,
-0.11424743384122849,
0.30397331714630127,
-0.3094906508922577,
0.26568448543548584,
-0.37311604619026184,
0.42296892404556274,
0.2541320025920868,
1.0161632299423218,
-0.11970152705907822,
0.09952079504728317,
0.10506673902273178,
0.00407438213005662,
0.12878164649009705,
0.24283640086650848,
0.20053517818450928,
-0.36427250504493713,
-0.07967925071716309,
0.1134934052824974,
-0.28304359316825867,
-0.33567896485328674,
0.34555792808532715,
-0.10172896087169647,
0.5368954539299011,
0.10903745144605637,
0.14164304733276367,
-0.1509755402803421,
-0.18528860807418823,
0.07730144262313843,
-0.07077997177839279,
0.10307736694812775,
0.35414132475852966,
-0.09304476529359818,
0.13513459265232086,
0.24577969312667847,
0.17513279616832733,
0.044339779764413834,
-0.09479636698961258,
-0.27976420521736145,
0.19170087575912476,
0.36852023005485535,
0.046187203377485275,
0.0220660213381052,
0.03235359117388725,
0.35566282272338867,
-0.18493086099624634,
0.20503871142864227,
-0.03057311289012432,
0.007939697243273258,
0.06664779782295227,
-0.05862119793891907,
-0.3365756571292877,
-0.6453835368156433,
0.23251670598983765,
-0.0009588935063220561,
-0.13675165176391602,
0.19234158098697662,
0.1587267518043518,
-0.35408374667167664,
-0.2998664677143097,
-0.005748695228248835,
0.2017250657081604,
0.15220433473587036,
0.20511914789676666,
0.2833251953125,
-0.08672615140676498,
-0.34171074628829956,
-0.3844316601753235,
-0.04664032161235809,
0.2829635739326477,
-0.45934876799583435,
0.07805224508047104,
0.20936237275600433,
0.10678642243146896,
0.37506863474845886,
-0.035514865070581436,
-0.043999817222356796,
0.04252694919705391,
0.1307712197303772,
0.07883495092391968,
-0.13859890401363373,
0.1594754457473755,
0.14901892840862274,
0.24700047075748444,
0.19990386068820953,
-0.22246719896793365,
-0.052218303084373474,
0.001683768699876964,
-0.09037399291992188,
-0.19051870703697205,
-0.18565566837787628,
0.17176078259944916,
0.12278025597333908,
0.1018856018781662,
0.04582648351788521,
0.34137988090515137,
0.17139998078346252,
-0.22588802874088287,
0.14366485178470612,
-0.007509700022637844,
-0.1345752328634262,
-0.09188730269670486,
0.3624589145183563,
0.3725726306438446,
-0.6563616991043091,
0.10404695570468903,
-0.049563657492399216,
0.18776835501194,
0.14370030164718628,
-0.27950048446655273,
-0.2813876271247864,
0.42379844188690186,
-0.09352006763219833,
-0.10077210515737534,
0.3089173436164856,
-0.2708929479122162,
0.08159114420413971,
0.19684267044067383,
0.06733454763889313,
-0.28226137161254883,
0.23710134625434875,
-0.11235344409942627,
0.042296480387449265,
0.16245485842227936,
0.11410892009735107,
0.16634432971477509,
0.11646034568548203,
-0.07022513449192047,
-0.21967580914497375,
-0.12229473888874054,
-0.043154094368219376,
0.11727076768875122,
0.2665441930294037,
-0.11958009749650955,
0.1249019131064415,
0.5266058444976807,
0.3261624276638031,
-0.26325488090515137,
0.07642453163862228,
0.5432158708572388,
-0.3122917115688324,
0.0806591659784317,
0.1918928176164627,
-0.05547497794032097,
-0.04989985004067421,
0.18091338872909546,
-0.23919455707073212,
0.4039112627506256,
0.07905777543783188,
-0.005386069882661104,
-0.26680734753608704,
-0.05302821099758148,
-0.23602880537509918,
-0.42836451530456543,
0.21149246394634247,
0.04665564000606537,
-0.03551913797855377,
0.25308600068092346,
0.05293507128953934,
-0.09003499150276184,
-0.2782236635684967,
-0.13893719017505646,
-0.8122124671936035,
0.2934660017490387,
-0.2860761880874634,
-0.08008112013339996,
-0.08755972981452942,
0.020255668088793755,
0.06395132839679718,
-0.12363414466381073,
-0.28677913546562195,
0.1009153500199318,
0.18732766807079315,
0.03720075637102127,
-0.011949276551604271,
0.16449421644210815,
0.12202999740839005,
-0.26482799649238586,
0.3166709840297699,
0.3054232895374298,
0.11994049698114395,
0.01796865649521351,
-0.20191487669944763,
0.11080817133188248,
0.047732919454574585,
0.3355245590209961,
0.07278665900230408,
0.26858946681022644,
0.18518298864364624,
0.16804777085781097,
-0.15628165006637573,
-0.15916423499584198,
0.30215656757354736,
0.4226677417755127,
0.18189774453639984,
-0.14570322632789612,
0.03703907132148743,
0.07721632719039917,
0.4515742361545563,
0.10484345257282257,
-0.09222416579723358,
-0.1263715624809265,
-0.30541038513183594,
-0.0594790056347847,
0.4833452105522156,
-0.17912428081035614,
-0.016023041680455208,
0.27910590171813965,
-0.016197167336940765,
0.07711897045373917,
-0.1511853188276291,
-0.11755354702472687,
0.4446227252483368,
0.07232616096735,
0.5178589820861816,
-0.025720344856381416,
-0.12441656738519669,
-0.18681871891021729,
-0.19084113836288452,
-0.2879425287246704,
-0.12341443449258804,
0.2847411036491394,
-0.3124692440032959,
0.2768905460834503,
-0.4178832173347473,
-0.5642527937889099,
-0.2084294706583023,
0.4299703538417816,
-0.34802451729774475,
-0.3430694341659546,
-0.06800801306962967,
0.07788620889186859,
-0.02291121706366539,
0.2500191330909729,
0.1072104275226593,
-0.035542286932468414,
0.2320450097322464,
0.007474174257367849,
-0.22167734801769257,
-0.5956386923789978,
-0.4356401562690735,
0.0326632596552372,
0.28232601284980774,
0.03737521916627884,
0.12722940742969513,
-0.15690608322620392,
-0.06724181026220322,
-0.1452949047088623,
-0.4021958112716675,
0.3414442837238312,
-0.0869845300912857,
-0.008464028127491474,
0.11665326356887817,
0.42721864581108093,
-0.1959812194108963,
-0.09505845606327057,
0.3098008930683136,
0.11520156264305115,
-0.14765003323554993,
-0.06926611810922623,
-0.08467258512973785,
-0.062362320721149445,
-0.030823450535535812,
-0.43830201029777527,
-0.15058502554893494,
-0.32733821868896484,
-0.1820000559091568,
0.16898347437381744,
0.13323545455932617,
0.35230720043182373,
0.26457706093788147,
0.2091483771800995,
0.32835954427719116,
0.09546129405498505,
-0.09655757248401642,
-0.15933705866336823,
0.21701852977275848,
-0.3185725808143616,
-0.3167465329170227,
0.10404250025749207,
-0.14131319522857666,
0.23050634562969208,
0.11354032158851624,
-0.14633023738861084,
0.06803181767463684,
0.1159728467464447,
0.020054498687386513,
-0.10132033377885818,
0.3257167935371399,
0.7469018697738647,
-0.012623937800526619,
-0.001666548545472324,
-0.0988115519285202,
0.04782557487487793,
0.030737994238734245,
-0.43680423498153687,
0.34731775522232056,
0.17779219150543213,
0.5277687311172485,
-0.07014786452054977,
0.7515987753868103,
0.11483536660671234,
0.11667931079864502,
0.13216544687747955,
-0.07526091486215591,
0.06618605554103851,
-0.27247270941734314,
-0.18845969438552856,
0.29278141260147095,
0.0403268039226532,
-0.30309081077575684,
0.38984349370002747,
-0.12770190834999084,
-0.2598911225795746,
-0.43877696990966797,
0.07504778355360031,
0.0016000522300601006,
-0.24473896622657776,
-0.03760610893368721,
-0.37500521540641785,
0.3839122951030731,
-0.09530287981033325,
0.3992147147655487,
-0.08024546504020691,
-0.07314226031303406,
0.05920042097568512,
0.21968598663806915,
-0.09824588894844055,
0.13422372937202454,
-0.1730974167585373,
-0.24974942207336426,
-0.39932626485824585,
0.2461433857679367,
0.0012101938482373953,
0.14361731708049774,
-0.2927529513835907,
0.007916961796581745,
0.2831738293170929,
0.008745066821575165,
0.5200993418693542,
-0.6470434665679932,
-0.09738248586654663,
0.3353390395641327,
0.19218041002750397,
-0.6571788191795349,
-0.14138734340667725,
-0.18767741322517395,
0.27711716294288635,
0.3285014033317566,
-0.0478474386036396,
-0.332219660282135,
-0.15135812759399414,
0.2680897116661072,
0.04856894165277481,
-0.09909893572330475,
0.051520127803087234,
-0.24175819754600525,
-0.1433175802230835,
-0.3353152871131897,
-0.06578249484300613,
-0.09969418495893478,
0.1351073533296585,
0.10023951530456543,
0.21499647200107574,
0.08130349218845367,
0.026218364015221596,
-0.14487823843955994,
0.20501381158828735,
0.12260501086711884,
0.13836455345153809,
-0.2560671269893646,
0.10371240228414536,
0.48064759373664856,
-0.026589035987854004,
-0.10802468657493591,
0.1851126104593277,
-0.20795349776744843,
0.17263804376125336,
-0.21509242057800293,
0.14550818502902985,
0.16041050851345062,
-0.12064599245786667,
-0.23936378955841064,
0.03647962212562561,
-0.2542998790740967,
-0.046465497463941574,
0.05284279212355614,
0.20871564745903015,
0.08100207895040512,
-0.12740053236484528,
-0.4575786888599396,
0.560918927192688,
0.18852940201759338,
-0.07297087460756302,
0.2990115284919739,
-0.015665097162127495,
-0.430636465549469,
0.4052891433238983,
0.43294385075569153,
0.8635663986206055,
0.02991625852882862,
0.013999133370816708,
0.1714198738336563,
0.16713599860668182,
0.6254858374595642,
-0.5466776490211487,
0.20916442573070526,
-0.281289666891098,
0.31988802552223206,
-0.09525518119335175,
0.06537745147943497,
0.39573290944099426,
0.14318518340587616,
-0.22217018902301788,
0.35360613465309143,
-0.01738533191382885,
0.07415881007909775,
0.05659627914428711,
0.3767169713973999,
0.1265334039926529,
-0.3078528046607971,
-0.11752896755933762,
0.12139663100242615,
-0.18236219882965088,
0.2824687361717224,
-0.24982158839702606,
-0.012538871727883816,
-0.014507371932268143,
-0.244923934340477,
-0.4107002317905426,
0.09119312465190887,
-0.22418326139450073,
0.4608556032180786,
-0.34230324625968933,
-0.4593057930469513,
0.2506963014602661,
0.22680866718292236,
0.2354615479707718,
0.36966562271118164,
-0.37355026602745056,
0.20016756653785706,
0.015004532411694527,
-0.2361067235469818,
-0.07618848234415054,
0.041097208857536316,
0.386656254529953,
-0.1922805905342102,
-0.39226803183555603,
0.2118116021156311,
-0.1738399714231491,
-0.09788399189710617,
-0.29128608107566833,
-0.31771883368492126,
0.31883251667022705,
0.2502020001411438,
0.12403418123722076,
0.17259125411510468,
-0.08605661243200302,
-0.1338624209165573,
0.11980459839105606,
-0.2841421961784363,
0.010103791020810604,
0.00868886336684227,
0.08827618509531021,
-0.08681812882423401,
0.030908634886145592,
0.25715139508247375,
0.1876174360513687,
0.017261769622564316,
0.5952084064483643,
0.37850531935691833,
-0.21947510540485382,
-0.26590627431869507,
0.17860841751098633,
-0.22924330830574036,
-0.06068922206759453,
-0.2634165287017822,
0.1508059948682785,
0.09231764823198318,
-0.057126618921756744,
0.10292088240385056,
-0.015743911266326904,
-0.14091016352176666,
-0.007175784558057785,
-0.2680371105670929,
-0.020958488807082176,
0.02229999750852585,
-0.16380959749221802,
-0.0015580152394250035,
0.18830519914627075,
0.1332460641860962,
0.2853650152683258,
-0.2360226809978485,
-0.27911674976348877,
-0.2388353794813156,
-0.022319361567497253,
0.045321106910705566,
0.41371333599090576,
-0.01664041541516781,
-0.23604752123355865,
-0.038738369941711426,
0.1452319473028183,
-0.2301059514284134,
-0.2452722191810608,
-0.17255038022994995,
-0.04683484509587288,
0.12900717556476593,
-0.03978462517261505,
-0.18745756149291992,
0.13585394620895386,
-0.3403600752353668,
-0.29250508546829224,
-0.20412957668304443,
-0.13163819909095764,
-0.1293068379163742,
-0.024285631254315376,
0.22228863835334778,
-0.10420917719602585,
0.3449907898902893,
-0.2877996861934662,
0.0879831612110138,
0.03487571328878403,
0.29383137822151184,
0.05117115005850792,
0.24954849481582642,
0.4168611466884613,
-0.1764676719903946,
-0.5602070689201355,
0.18304529786109924,
-0.22114598751068115,
0.1743839830160141,
0.16332194209098816,
-0.08280208706855774,
-0.048011112958192825,
0.029965469613671303,
-0.021473566070199013,
0.026401694864034653,
-0.0819888785481453,
-0.03023334965109825,
0.13558773696422577,
0.20455144345760345,
-0.2827223539352417,
0.12395703047513962,
0.422098308801651,
-0.033097319304943085,
0.09618958085775375,
0.026279063895344734,
0.2615513801574707,
-0.05342176556587219,
0.17466238141059875,
0.04105696454644203,
0.016863875091075897,
-0.04344804957509041,
0.26398882269859314,
0.09460685402154922,
0.08114726841449738,
0.11606112122535706,
-0.1200716644525528,
0.04641953855752945,
0.13107292354106903,
0.3746131658554077,
0.10712651908397675,
0.06603597104549408,
0.10081599652767181,
0.216569185256958,
-0.22537603974342346,
-0.14098671078681946,
0.3062993586063385,
-0.10277515649795532,
-0.020908145233988762,
0.022877244278788567,
-0.06457270681858063,
0.07485640048980713,
0.1480168104171753,
-0.06374992430210114,
-0.31802287697792053,
0.13867245614528656,
-0.07772714644670486,
-0.1830138862133026,
-0.6274289488792419,
-0.2322813719511032,
0.05465104430913925,
-0.01765858195722103,
0.08908945322036743,
-0.08369693905115128,
-0.1092471331357956,
0.20269763469696045,
-0.03502576798200607,
-0.23063644766807556,
0.6797721982002258,
-0.06164853274822235,
0.044697582721710205,
-0.05517617613077164,
0.2520870566368103,
-0.21323475241661072,
-0.07124549895524979,
-0.1705532819032669,
-0.00184009806253016,
0.15782515704631805,
0.21092885732650757,
-0.4701043367385864,
-0.1439928412437439,
-0.0009011344518512487,
0.018944112583994865,
-0.05917779356241226,
0.0006442827288992703,
0.06300149112939835,
-0.037797294557094574,
0.294050931930542,
0.10967091470956802,
-0.08980167657136917,
-0.19844262301921844,
0.21691648662090302,
-0.007182060740888119,
-0.020038114860653877,
-0.24845506250858307,
0.004518262110650539,
0.10421206057071686,
-0.1066088154911995,
0.11462504416704178,
-0.5152722597122192,
0.04132688790559769,
0.2593996524810791,
0.38845953345298767,
-0.1085285097360611,
-0.22299575805664062,
0.08364369720220566,
-0.3275440037250519,
0.5394178628921509,
0.08417364954948425,
0.1905832439661026,
-0.11804763972759247,
-0.2930147647857666,
-0.29509666562080383,
0.005453574005514383,
-0.16959434747695923,
-0.3680242598056793,
-0.12039530277252197,
0.3059186339378357,
0.39280399680137634,
0.24459411203861237,
0.1168808564543724,
-0.2535529136657715,
-0.12980498373508453,
0.26505929231643677,
-0.1438632756471634,
-0.15893006324768066,
-0.07328233122825623,
0.04924123361706734,
-0.22518853843212128,
-0.17736820876598358,
0.08320578932762146,
-0.019430875778198242,
0.07522574812173843,
-0.22762097418308258,
-0.14735698699951172,
0.3186531364917755,
-0.43477770686149597,
0.25957685708999634,
0.02589532919228077,
0.5472241640090942,
0.02913188748061657,
-0.04227258265018463,
-0.16555677354335785,
0.22283847630023956,
-0.045000266283750534,
0.49142101407051086,
0.061620693653821945,
0.22850871086120605,
-0.21550072729587555,
-0.31885021924972534,
-0.34525763988494873,
0.6317009329795837,
0.03209638223052025,
-0.05509943515062332,
-0.2490805685520172,
-0.05867006629705429,
-0.22949929535388947,
0.29232853651046753,
-0.11924563348293304,
0.06629280745983124,
-0.03665190935134888,
0.18673370778560638,
-0.3581699728965759,
-0.23673096299171448,
0.33841896057128906,
-0.4211324453353882,
-0.335680216550827,
-0.18971435725688934,
0.0682089775800705,
-0.14943353831768036,
0.29298871755599976,
-0.10573398321866989,
-0.015354366041719913,
0.26347002387046814,
-0.13522709906101227,
-0.016723742708563805,
0.0001431076816515997,
0.05985728278756142,
0.1573977768421173,
-0.24589870870113373,
-0.40447190403938293,
-0.19432933628559113,
-0.060325395315885544,
-0.37993159890174866,
-0.24929291009902954
] |
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.3421066403388977,
0.04719279333949089,
-0.10626477003097534,
0.06201721727848053,
0.20045500993728638,
0.17774423956871033,
0.17687447369098663,
0.3401964008808136,
0.13733333349227905,
0.09211837500333786,
0.41052380204200745,
0.3346934914588928,
0.01600063592195511,
0.30764612555503845,
0.11132040619850159,
-0.33708688616752625,
0.05565062537789345,
0.07522193342447281,
-0.19471871852874756,
-0.2001762092113495,
-0.13208435475826263,
0.10374298691749573,
-0.2725183963775635,
-0.07011584937572479,
-0.14883549511432648,
0.10703843832015991,
0.12277796864509583,
-0.019670063629746437,
-0.19260218739509583,
-0.18620073795318604,
0.06802210956811905,
-0.0362134650349617,
0.228033646941185,
0.10794313997030258,
-0.0001084146206267178,
0.08063138276338577,
0.5717445611953735,
-0.158380389213562,
-0.4590221047401428,
-0.13032189011573792,
-0.08136408776044846,
-0.3462578058242798,
0.2564504146575928,
-0.3715744614601135,
-0.3347843885421753,
-0.025639494881033897,
0.3187549412250519,
-0.5857160687446594,
0.24128824472427368,
0.14796167612075806,
0.21826858818531036,
-0.07421106100082397,
0.35153505206108093,
-0.0048848288133740425,
0.41059747338294983,
0.21860653162002563,
-0.03604956343770027,
-0.12430758029222488,
0.010662873275578022,
0.02496490254998207,
0.06061766296625137,
0.4618475139141083,
0.04728573188185692,
-0.11424743384122849,
0.30397331714630127,
-0.3094906508922577,
0.26568448543548584,
-0.37311604619026184,
0.42296892404556274,
0.2541320025920868,
1.0161632299423218,
-0.11970152705907822,
0.09952079504728317,
0.10506673902273178,
0.00407438213005662,
0.12878164649009705,
0.24283640086650848,
0.20053517818450928,
-0.36427250504493713,
-0.07967925071716309,
0.1134934052824974,
-0.28304359316825867,
-0.33567896485328674,
0.34555792808532715,
-0.10172896087169647,
0.5368954539299011,
0.10903745144605637,
0.14164304733276367,
-0.1509755402803421,
-0.18528860807418823,
0.07730144262313843,
-0.07077997177839279,
0.10307736694812775,
0.35414132475852966,
-0.09304476529359818,
0.13513459265232086,
0.24577969312667847,
0.17513279616832733,
0.044339779764413834,
-0.09479636698961258,
-0.27976420521736145,
0.19170087575912476,
0.36852023005485535,
0.046187203377485275,
0.0220660213381052,
0.03235359117388725,
0.35566282272338867,
-0.18493086099624634,
0.20503871142864227,
-0.03057311289012432,
0.007939697243273258,
0.06664779782295227,
-0.05862119793891907,
-0.3365756571292877,
-0.6453835368156433,
0.23251670598983765,
-0.0009588935063220561,
-0.13675165176391602,
0.19234158098697662,
0.1587267518043518,
-0.35408374667167664,
-0.2998664677143097,
-0.005748695228248835,
0.2017250657081604,
0.15220433473587036,
0.20511914789676666,
0.2833251953125,
-0.08672615140676498,
-0.34171074628829956,
-0.3844316601753235,
-0.04664032161235809,
0.2829635739326477,
-0.45934876799583435,
0.07805224508047104,
0.20936237275600433,
0.10678642243146896,
0.37506863474845886,
-0.035514865070581436,
-0.043999817222356796,
0.04252694919705391,
0.1307712197303772,
0.07883495092391968,
-0.13859890401363373,
0.1594754457473755,
0.14901892840862274,
0.24700047075748444,
0.19990386068820953,
-0.22246719896793365,
-0.052218303084373474,
0.001683768699876964,
-0.09037399291992188,
-0.19051870703697205,
-0.18565566837787628,
0.17176078259944916,
0.12278025597333908,
0.1018856018781662,
0.04582648351788521,
0.34137988090515137,
0.17139998078346252,
-0.22588802874088287,
0.14366485178470612,
-0.007509700022637844,
-0.1345752328634262,
-0.09188730269670486,
0.3624589145183563,
0.3725726306438446,
-0.6563616991043091,
0.10404695570468903,
-0.049563657492399216,
0.18776835501194,
0.14370030164718628,
-0.27950048446655273,
-0.2813876271247864,
0.42379844188690186,
-0.09352006763219833,
-0.10077210515737534,
0.3089173436164856,
-0.2708929479122162,
0.08159114420413971,
0.19684267044067383,
0.06733454763889313,
-0.28226137161254883,
0.23710134625434875,
-0.11235344409942627,
0.042296480387449265,
0.16245485842227936,
0.11410892009735107,
0.16634432971477509,
0.11646034568548203,
-0.07022513449192047,
-0.21967580914497375,
-0.12229473888874054,
-0.043154094368219376,
0.11727076768875122,
0.2665441930294037,
-0.11958009749650955,
0.1249019131064415,
0.5266058444976807,
0.3261624276638031,
-0.26325488090515137,
0.07642453163862228,
0.5432158708572388,
-0.3122917115688324,
0.0806591659784317,
0.1918928176164627,
-0.05547497794032097,
-0.04989985004067421,
0.18091338872909546,
-0.23919455707073212,
0.4039112627506256,
0.07905777543783188,
-0.005386069882661104,
-0.26680734753608704,
-0.05302821099758148,
-0.23602880537509918,
-0.42836451530456543,
0.21149246394634247,
0.04665564000606537,
-0.03551913797855377,
0.25308600068092346,
0.05293507128953934,
-0.09003499150276184,
-0.2782236635684967,
-0.13893719017505646,
-0.8122124671936035,
0.2934660017490387,
-0.2860761880874634,
-0.08008112013339996,
-0.08755972981452942,
0.020255668088793755,
0.06395132839679718,
-0.12363414466381073,
-0.28677913546562195,
0.1009153500199318,
0.18732766807079315,
0.03720075637102127,
-0.011949276551604271,
0.16449421644210815,
0.12202999740839005,
-0.26482799649238586,
0.3166709840297699,
0.3054232895374298,
0.11994049698114395,
0.01796865649521351,
-0.20191487669944763,
0.11080817133188248,
0.047732919454574585,
0.3355245590209961,
0.07278665900230408,
0.26858946681022644,
0.18518298864364624,
0.16804777085781097,
-0.15628165006637573,
-0.15916423499584198,
0.30215656757354736,
0.4226677417755127,
0.18189774453639984,
-0.14570322632789612,
0.03703907132148743,
0.07721632719039917,
0.4515742361545563,
0.10484345257282257,
-0.09222416579723358,
-0.1263715624809265,
-0.30541038513183594,
-0.0594790056347847,
0.4833452105522156,
-0.17912428081035614,
-0.016023041680455208,
0.27910590171813965,
-0.016197167336940765,
0.07711897045373917,
-0.1511853188276291,
-0.11755354702472687,
0.4446227252483368,
0.07232616096735,
0.5178589820861816,
-0.025720344856381416,
-0.12441656738519669,
-0.18681871891021729,
-0.19084113836288452,
-0.2879425287246704,
-0.12341443449258804,
0.2847411036491394,
-0.3124692440032959,
0.2768905460834503,
-0.4178832173347473,
-0.5642527937889099,
-0.2084294706583023,
0.4299703538417816,
-0.34802451729774475,
-0.3430694341659546,
-0.06800801306962967,
0.07788620889186859,
-0.02291121706366539,
0.2500191330909729,
0.1072104275226593,
-0.035542286932468414,
0.2320450097322464,
0.007474174257367849,
-0.22167734801769257,
-0.5956386923789978,
-0.4356401562690735,
0.0326632596552372,
0.28232601284980774,
0.03737521916627884,
0.12722940742969513,
-0.15690608322620392,
-0.06724181026220322,
-0.1452949047088623,
-0.4021958112716675,
0.3414442837238312,
-0.0869845300912857,
-0.008464028127491474,
0.11665326356887817,
0.42721864581108093,
-0.1959812194108963,
-0.09505845606327057,
0.3098008930683136,
0.11520156264305115,
-0.14765003323554993,
-0.06926611810922623,
-0.08467258512973785,
-0.062362320721149445,
-0.030823450535535812,
-0.43830201029777527,
-0.15058502554893494,
-0.32733821868896484,
-0.1820000559091568,
0.16898347437381744,
0.13323545455932617,
0.35230720043182373,
0.26457706093788147,
0.2091483771800995,
0.32835954427719116,
0.09546129405498505,
-0.09655757248401642,
-0.15933705866336823,
0.21701852977275848,
-0.3185725808143616,
-0.3167465329170227,
0.10404250025749207,
-0.14131319522857666,
0.23050634562969208,
0.11354032158851624,
-0.14633023738861084,
0.06803181767463684,
0.1159728467464447,
0.020054498687386513,
-0.10132033377885818,
0.3257167935371399,
0.7469018697738647,
-0.012623937800526619,
-0.001666548545472324,
-0.0988115519285202,
0.04782557487487793,
0.030737994238734245,
-0.43680423498153687,
0.34731775522232056,
0.17779219150543213,
0.5277687311172485,
-0.07014786452054977,
0.7515987753868103,
0.11483536660671234,
0.11667931079864502,
0.13216544687747955,
-0.07526091486215591,
0.06618605554103851,
-0.27247270941734314,
-0.18845969438552856,
0.29278141260147095,
0.0403268039226532,
-0.30309081077575684,
0.38984349370002747,
-0.12770190834999084,
-0.2598911225795746,
-0.43877696990966797,
0.07504778355360031,
0.0016000522300601006,
-0.24473896622657776,
-0.03760610893368721,
-0.37500521540641785,
0.3839122951030731,
-0.09530287981033325,
0.3992147147655487,
-0.08024546504020691,
-0.07314226031303406,
0.05920042097568512,
0.21968598663806915,
-0.09824588894844055,
0.13422372937202454,
-0.1730974167585373,
-0.24974942207336426,
-0.39932626485824585,
0.2461433857679367,
0.0012101938482373953,
0.14361731708049774,
-0.2927529513835907,
0.007916961796581745,
0.2831738293170929,
0.008745066821575165,
0.5200993418693542,
-0.6470434665679932,
-0.09738248586654663,
0.3353390395641327,
0.19218041002750397,
-0.6571788191795349,
-0.14138734340667725,
-0.18767741322517395,
0.27711716294288635,
0.3285014033317566,
-0.0478474386036396,
-0.332219660282135,
-0.15135812759399414,
0.2680897116661072,
0.04856894165277481,
-0.09909893572330475,
0.051520127803087234,
-0.24175819754600525,
-0.1433175802230835,
-0.3353152871131897,
-0.06578249484300613,
-0.09969418495893478,
0.1351073533296585,
0.10023951530456543,
0.21499647200107574,
0.08130349218845367,
0.026218364015221596,
-0.14487823843955994,
0.20501381158828735,
0.12260501086711884,
0.13836455345153809,
-0.2560671269893646,
0.10371240228414536,
0.48064759373664856,
-0.026589035987854004,
-0.10802468657493591,
0.1851126104593277,
-0.20795349776744843,
0.17263804376125336,
-0.21509242057800293,
0.14550818502902985,
0.16041050851345062,
-0.12064599245786667,
-0.23936378955841064,
0.03647962212562561,
-0.2542998790740967,
-0.046465497463941574,
0.05284279212355614,
0.20871564745903015,
0.08100207895040512,
-0.12740053236484528,
-0.4575786888599396,
0.560918927192688,
0.18852940201759338,
-0.07297087460756302,
0.2990115284919739,
-0.015665097162127495,
-0.430636465549469,
0.4052891433238983,
0.43294385075569153,
0.8635663986206055,
0.02991625852882862,
0.013999133370816708,
0.1714198738336563,
0.16713599860668182,
0.6254858374595642,
-0.5466776490211487,
0.20916442573070526,
-0.281289666891098,
0.31988802552223206,
-0.09525518119335175,
0.06537745147943497,
0.39573290944099426,
0.14318518340587616,
-0.22217018902301788,
0.35360613465309143,
-0.01738533191382885,
0.07415881007909775,
0.05659627914428711,
0.3767169713973999,
0.1265334039926529,
-0.3078528046607971,
-0.11752896755933762,
0.12139663100242615,
-0.18236219882965088,
0.2824687361717224,
-0.24982158839702606,
-0.012538871727883816,
-0.014507371932268143,
-0.244923934340477,
-0.4107002317905426,
0.09119312465190887,
-0.22418326139450073,
0.4608556032180786,
-0.34230324625968933,
-0.4593057930469513,
0.2506963014602661,
0.22680866718292236,
0.2354615479707718,
0.36966562271118164,
-0.37355026602745056,
0.20016756653785706,
0.015004532411694527,
-0.2361067235469818,
-0.07618848234415054,
0.041097208857536316,
0.386656254529953,
-0.1922805905342102,
-0.39226803183555603,
0.2118116021156311,
-0.1738399714231491,
-0.09788399189710617,
-0.29128608107566833,
-0.31771883368492126,
0.31883251667022705,
0.2502020001411438,
0.12403418123722076,
0.17259125411510468,
-0.08605661243200302,
-0.1338624209165573,
0.11980459839105606,
-0.2841421961784363,
0.010103791020810604,
0.00868886336684227,
0.08827618509531021,
-0.08681812882423401,
0.030908634886145592,
0.25715139508247375,
0.1876174360513687,
0.017261769622564316,
0.5952084064483643,
0.37850531935691833,
-0.21947510540485382,
-0.26590627431869507,
0.17860841751098633,
-0.22924330830574036,
-0.06068922206759453,
-0.2634165287017822,
0.1508059948682785,
0.09231764823198318,
-0.057126618921756744,
0.10292088240385056,
-0.015743911266326904,
-0.14091016352176666,
-0.007175784558057785,
-0.2680371105670929,
-0.020958488807082176,
0.02229999750852585,
-0.16380959749221802,
-0.0015580152394250035,
0.18830519914627075,
0.1332460641860962,
0.2853650152683258,
-0.2360226809978485,
-0.27911674976348877,
-0.2388353794813156,
-0.022319361567497253,
0.045321106910705566,
0.41371333599090576,
-0.01664041541516781,
-0.23604752123355865,
-0.038738369941711426,
0.1452319473028183,
-0.2301059514284134,
-0.2452722191810608,
-0.17255038022994995,
-0.04683484509587288,
0.12900717556476593,
-0.03978462517261505,
-0.18745756149291992,
0.13585394620895386,
-0.3403600752353668,
-0.29250508546829224,
-0.20412957668304443,
-0.13163819909095764,
-0.1293068379163742,
-0.024285631254315376,
0.22228863835334778,
-0.10420917719602585,
0.3449907898902893,
-0.2877996861934662,
0.0879831612110138,
0.03487571328878403,
0.29383137822151184,
0.05117115005850792,
0.24954849481582642,
0.4168611466884613,
-0.1764676719903946,
-0.5602070689201355,
0.18304529786109924,
-0.22114598751068115,
0.1743839830160141,
0.16332194209098816,
-0.08280208706855774,
-0.048011112958192825,
0.029965469613671303,
-0.021473566070199013,
0.026401694864034653,
-0.0819888785481453,
-0.03023334965109825,
0.13558773696422577,
0.20455144345760345,
-0.2827223539352417,
0.12395703047513962,
0.422098308801651,
-0.033097319304943085,
0.09618958085775375,
0.026279063895344734,
0.2615513801574707,
-0.05342176556587219,
0.17466238141059875,
0.04105696454644203,
0.016863875091075897,
-0.04344804957509041,
0.26398882269859314,
0.09460685402154922,
0.08114726841449738,
0.11606112122535706,
-0.1200716644525528,
0.04641953855752945,
0.13107292354106903,
0.3746131658554077,
0.10712651908397675,
0.06603597104549408,
0.10081599652767181,
0.216569185256958,
-0.22537603974342346,
-0.14098671078681946,
0.3062993586063385,
-0.10277515649795532,
-0.020908145233988762,
0.022877244278788567,
-0.06457270681858063,
0.07485640048980713,
0.1480168104171753,
-0.06374992430210114,
-0.31802287697792053,
0.13867245614528656,
-0.07772714644670486,
-0.1830138862133026,
-0.6274289488792419,
-0.2322813719511032,
0.05465104430913925,
-0.01765858195722103,
0.08908945322036743,
-0.08369693905115128,
-0.1092471331357956,
0.20269763469696045,
-0.03502576798200607,
-0.23063644766807556,
0.6797721982002258,
-0.06164853274822235,
0.044697582721710205,
-0.05517617613077164,
0.2520870566368103,
-0.21323475241661072,
-0.07124549895524979,
-0.1705532819032669,
-0.00184009806253016,
0.15782515704631805,
0.21092885732650757,
-0.4701043367385864,
-0.1439928412437439,
-0.0009011344518512487,
0.018944112583994865,
-0.05917779356241226,
0.0006442827288992703,
0.06300149112939835,
-0.037797294557094574,
0.294050931930542,
0.10967091470956802,
-0.08980167657136917,
-0.19844262301921844,
0.21691648662090302,
-0.007182060740888119,
-0.020038114860653877,
-0.24845506250858307,
0.004518262110650539,
0.10421206057071686,
-0.1066088154911995,
0.11462504416704178,
-0.5152722597122192,
0.04132688790559769,
0.2593996524810791,
0.38845953345298767,
-0.1085285097360611,
-0.22299575805664062,
0.08364369720220566,
-0.3275440037250519,
0.5394178628921509,
0.08417364954948425,
0.1905832439661026,
-0.11804763972759247,
-0.2930147647857666,
-0.29509666562080383,
0.005453574005514383,
-0.16959434747695923,
-0.3680242598056793,
-0.12039530277252197,
0.3059186339378357,
0.39280399680137634,
0.24459411203861237,
0.1168808564543724,
-0.2535529136657715,
-0.12980498373508453,
0.26505929231643677,
-0.1438632756471634,
-0.15893006324768066,
-0.07328233122825623,
0.04924123361706734,
-0.22518853843212128,
-0.17736820876598358,
0.08320578932762146,
-0.019430875778198242,
0.07522574812173843,
-0.22762097418308258,
-0.14735698699951172,
0.3186531364917755,
-0.43477770686149597,
0.25957685708999634,
0.02589532919228077,
0.5472241640090942,
0.02913188748061657,
-0.04227258265018463,
-0.16555677354335785,
0.22283847630023956,
-0.045000266283750534,
0.49142101407051086,
0.061620693653821945,
0.22850871086120605,
-0.21550072729587555,
-0.31885021924972534,
-0.34525763988494873,
0.6317009329795837,
0.03209638223052025,
-0.05509943515062332,
-0.2490805685520172,
-0.05867006629705429,
-0.22949929535388947,
0.29232853651046753,
-0.11924563348293304,
0.06629280745983124,
-0.03665190935134888,
0.18673370778560638,
-0.3581699728965759,
-0.23673096299171448,
0.33841896057128906,
-0.4211324453353882,
-0.335680216550827,
-0.18971435725688934,
0.0682089775800705,
-0.14943353831768036,
0.29298871755599976,
-0.10573398321866989,
-0.015354366041719913,
0.26347002387046814,
-0.13522709906101227,
-0.016723742708563805,
0.0001431076816515997,
0.05985728278756142,
0.1573977768421173,
-0.24589870870113373,
-0.40447190403938293,
-0.19432933628559113,
-0.060325395315885544,
-0.37993159890174866,
-0.24929291009902954
] |
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.3421066403388977,
0.04719279333949089,
-0.10626477003097534,
0.06201721727848053,
0.20045500993728638,
0.17774423956871033,
0.17687447369098663,
0.3401964008808136,
0.13733333349227905,
0.09211837500333786,
0.41052380204200745,
0.3346934914588928,
0.01600063592195511,
0.30764612555503845,
0.11132040619850159,
-0.33708688616752625,
0.05565062537789345,
0.07522193342447281,
-0.19471871852874756,
-0.2001762092113495,
-0.13208435475826263,
0.10374298691749573,
-0.2725183963775635,
-0.07011584937572479,
-0.14883549511432648,
0.10703843832015991,
0.12277796864509583,
-0.019670063629746437,
-0.19260218739509583,
-0.18620073795318604,
0.06802210956811905,
-0.0362134650349617,
0.228033646941185,
0.10794313997030258,
-0.0001084146206267178,
0.08063138276338577,
0.5717445611953735,
-0.158380389213562,
-0.4590221047401428,
-0.13032189011573792,
-0.08136408776044846,
-0.3462578058242798,
0.2564504146575928,
-0.3715744614601135,
-0.3347843885421753,
-0.025639494881033897,
0.3187549412250519,
-0.5857160687446594,
0.24128824472427368,
0.14796167612075806,
0.21826858818531036,
-0.07421106100082397,
0.35153505206108093,
-0.0048848288133740425,
0.41059747338294983,
0.21860653162002563,
-0.03604956343770027,
-0.12430758029222488,
0.010662873275578022,
0.02496490254998207,
0.06061766296625137,
0.4618475139141083,
0.04728573188185692,
-0.11424743384122849,
0.30397331714630127,
-0.3094906508922577,
0.26568448543548584,
-0.37311604619026184,
0.42296892404556274,
0.2541320025920868,
1.0161632299423218,
-0.11970152705907822,
0.09952079504728317,
0.10506673902273178,
0.00407438213005662,
0.12878164649009705,
0.24283640086650848,
0.20053517818450928,
-0.36427250504493713,
-0.07967925071716309,
0.1134934052824974,
-0.28304359316825867,
-0.33567896485328674,
0.34555792808532715,
-0.10172896087169647,
0.5368954539299011,
0.10903745144605637,
0.14164304733276367,
-0.1509755402803421,
-0.18528860807418823,
0.07730144262313843,
-0.07077997177839279,
0.10307736694812775,
0.35414132475852966,
-0.09304476529359818,
0.13513459265232086,
0.24577969312667847,
0.17513279616832733,
0.044339779764413834,
-0.09479636698961258,
-0.27976420521736145,
0.19170087575912476,
0.36852023005485535,
0.046187203377485275,
0.0220660213381052,
0.03235359117388725,
0.35566282272338867,
-0.18493086099624634,
0.20503871142864227,
-0.03057311289012432,
0.007939697243273258,
0.06664779782295227,
-0.05862119793891907,
-0.3365756571292877,
-0.6453835368156433,
0.23251670598983765,
-0.0009588935063220561,
-0.13675165176391602,
0.19234158098697662,
0.1587267518043518,
-0.35408374667167664,
-0.2998664677143097,
-0.005748695228248835,
0.2017250657081604,
0.15220433473587036,
0.20511914789676666,
0.2833251953125,
-0.08672615140676498,
-0.34171074628829956,
-0.3844316601753235,
-0.04664032161235809,
0.2829635739326477,
-0.45934876799583435,
0.07805224508047104,
0.20936237275600433,
0.10678642243146896,
0.37506863474845886,
-0.035514865070581436,
-0.043999817222356796,
0.04252694919705391,
0.1307712197303772,
0.07883495092391968,
-0.13859890401363373,
0.1594754457473755,
0.14901892840862274,
0.24700047075748444,
0.19990386068820953,
-0.22246719896793365,
-0.052218303084373474,
0.001683768699876964,
-0.09037399291992188,
-0.19051870703697205,
-0.18565566837787628,
0.17176078259944916,
0.12278025597333908,
0.1018856018781662,
0.04582648351788521,
0.34137988090515137,
0.17139998078346252,
-0.22588802874088287,
0.14366485178470612,
-0.007509700022637844,
-0.1345752328634262,
-0.09188730269670486,
0.3624589145183563,
0.3725726306438446,
-0.6563616991043091,
0.10404695570468903,
-0.049563657492399216,
0.18776835501194,
0.14370030164718628,
-0.27950048446655273,
-0.2813876271247864,
0.42379844188690186,
-0.09352006763219833,
-0.10077210515737534,
0.3089173436164856,
-0.2708929479122162,
0.08159114420413971,
0.19684267044067383,
0.06733454763889313,
-0.28226137161254883,
0.23710134625434875,
-0.11235344409942627,
0.042296480387449265,
0.16245485842227936,
0.11410892009735107,
0.16634432971477509,
0.11646034568548203,
-0.07022513449192047,
-0.21967580914497375,
-0.12229473888874054,
-0.043154094368219376,
0.11727076768875122,
0.2665441930294037,
-0.11958009749650955,
0.1249019131064415,
0.5266058444976807,
0.3261624276638031,
-0.26325488090515137,
0.07642453163862228,
0.5432158708572388,
-0.3122917115688324,
0.0806591659784317,
0.1918928176164627,
-0.05547497794032097,
-0.04989985004067421,
0.18091338872909546,
-0.23919455707073212,
0.4039112627506256,
0.07905777543783188,
-0.005386069882661104,
-0.26680734753608704,
-0.05302821099758148,
-0.23602880537509918,
-0.42836451530456543,
0.21149246394634247,
0.04665564000606537,
-0.03551913797855377,
0.25308600068092346,
0.05293507128953934,
-0.09003499150276184,
-0.2782236635684967,
-0.13893719017505646,
-0.8122124671936035,
0.2934660017490387,
-0.2860761880874634,
-0.08008112013339996,
-0.08755972981452942,
0.020255668088793755,
0.06395132839679718,
-0.12363414466381073,
-0.28677913546562195,
0.1009153500199318,
0.18732766807079315,
0.03720075637102127,
-0.011949276551604271,
0.16449421644210815,
0.12202999740839005,
-0.26482799649238586,
0.3166709840297699,
0.3054232895374298,
0.11994049698114395,
0.01796865649521351,
-0.20191487669944763,
0.11080817133188248,
0.047732919454574585,
0.3355245590209961,
0.07278665900230408,
0.26858946681022644,
0.18518298864364624,
0.16804777085781097,
-0.15628165006637573,
-0.15916423499584198,
0.30215656757354736,
0.4226677417755127,
0.18189774453639984,
-0.14570322632789612,
0.03703907132148743,
0.07721632719039917,
0.4515742361545563,
0.10484345257282257,
-0.09222416579723358,
-0.1263715624809265,
-0.30541038513183594,
-0.0594790056347847,
0.4833452105522156,
-0.17912428081035614,
-0.016023041680455208,
0.27910590171813965,
-0.016197167336940765,
0.07711897045373917,
-0.1511853188276291,
-0.11755354702472687,
0.4446227252483368,
0.07232616096735,
0.5178589820861816,
-0.025720344856381416,
-0.12441656738519669,
-0.18681871891021729,
-0.19084113836288452,
-0.2879425287246704,
-0.12341443449258804,
0.2847411036491394,
-0.3124692440032959,
0.2768905460834503,
-0.4178832173347473,
-0.5642527937889099,
-0.2084294706583023,
0.4299703538417816,
-0.34802451729774475,
-0.3430694341659546,
-0.06800801306962967,
0.07788620889186859,
-0.02291121706366539,
0.2500191330909729,
0.1072104275226593,
-0.035542286932468414,
0.2320450097322464,
0.007474174257367849,
-0.22167734801769257,
-0.5956386923789978,
-0.4356401562690735,
0.0326632596552372,
0.28232601284980774,
0.03737521916627884,
0.12722940742969513,
-0.15690608322620392,
-0.06724181026220322,
-0.1452949047088623,
-0.4021958112716675,
0.3414442837238312,
-0.0869845300912857,
-0.008464028127491474,
0.11665326356887817,
0.42721864581108093,
-0.1959812194108963,
-0.09505845606327057,
0.3098008930683136,
0.11520156264305115,
-0.14765003323554993,
-0.06926611810922623,
-0.08467258512973785,
-0.062362320721149445,
-0.030823450535535812,
-0.43830201029777527,
-0.15058502554893494,
-0.32733821868896484,
-0.1820000559091568,
0.16898347437381744,
0.13323545455932617,
0.35230720043182373,
0.26457706093788147,
0.2091483771800995,
0.32835954427719116,
0.09546129405498505,
-0.09655757248401642,
-0.15933705866336823,
0.21701852977275848,
-0.3185725808143616,
-0.3167465329170227,
0.10404250025749207,
-0.14131319522857666,
0.23050634562969208,
0.11354032158851624,
-0.14633023738861084,
0.06803181767463684,
0.1159728467464447,
0.020054498687386513,
-0.10132033377885818,
0.3257167935371399,
0.7469018697738647,
-0.012623937800526619,
-0.001666548545472324,
-0.0988115519285202,
0.04782557487487793,
0.030737994238734245,
-0.43680423498153687,
0.34731775522232056,
0.17779219150543213,
0.5277687311172485,
-0.07014786452054977,
0.7515987753868103,
0.11483536660671234,
0.11667931079864502,
0.13216544687747955,
-0.07526091486215591,
0.06618605554103851,
-0.27247270941734314,
-0.18845969438552856,
0.29278141260147095,
0.0403268039226532,
-0.30309081077575684,
0.38984349370002747,
-0.12770190834999084,
-0.2598911225795746,
-0.43877696990966797,
0.07504778355360031,
0.0016000522300601006,
-0.24473896622657776,
-0.03760610893368721,
-0.37500521540641785,
0.3839122951030731,
-0.09530287981033325,
0.3992147147655487,
-0.08024546504020691,
-0.07314226031303406,
0.05920042097568512,
0.21968598663806915,
-0.09824588894844055,
0.13422372937202454,
-0.1730974167585373,
-0.24974942207336426,
-0.39932626485824585,
0.2461433857679367,
0.0012101938482373953,
0.14361731708049774,
-0.2927529513835907,
0.007916961796581745,
0.2831738293170929,
0.008745066821575165,
0.5200993418693542,
-0.6470434665679932,
-0.09738248586654663,
0.3353390395641327,
0.19218041002750397,
-0.6571788191795349,
-0.14138734340667725,
-0.18767741322517395,
0.27711716294288635,
0.3285014033317566,
-0.0478474386036396,
-0.332219660282135,
-0.15135812759399414,
0.2680897116661072,
0.04856894165277481,
-0.09909893572330475,
0.051520127803087234,
-0.24175819754600525,
-0.1433175802230835,
-0.3353152871131897,
-0.06578249484300613,
-0.09969418495893478,
0.1351073533296585,
0.10023951530456543,
0.21499647200107574,
0.08130349218845367,
0.026218364015221596,
-0.14487823843955994,
0.20501381158828735,
0.12260501086711884,
0.13836455345153809,
-0.2560671269893646,
0.10371240228414536,
0.48064759373664856,
-0.026589035987854004,
-0.10802468657493591,
0.1851126104593277,
-0.20795349776744843,
0.17263804376125336,
-0.21509242057800293,
0.14550818502902985,
0.16041050851345062,
-0.12064599245786667,
-0.23936378955841064,
0.03647962212562561,
-0.2542998790740967,
-0.046465497463941574,
0.05284279212355614,
0.20871564745903015,
0.08100207895040512,
-0.12740053236484528,
-0.4575786888599396,
0.560918927192688,
0.18852940201759338,
-0.07297087460756302,
0.2990115284919739,
-0.015665097162127495,
-0.430636465549469,
0.4052891433238983,
0.43294385075569153,
0.8635663986206055,
0.02991625852882862,
0.013999133370816708,
0.1714198738336563,
0.16713599860668182,
0.6254858374595642,
-0.5466776490211487,
0.20916442573070526,
-0.281289666891098,
0.31988802552223206,
-0.09525518119335175,
0.06537745147943497,
0.39573290944099426,
0.14318518340587616,
-0.22217018902301788,
0.35360613465309143,
-0.01738533191382885,
0.07415881007909775,
0.05659627914428711,
0.3767169713973999,
0.1265334039926529,
-0.3078528046607971,
-0.11752896755933762,
0.12139663100242615,
-0.18236219882965088,
0.2824687361717224,
-0.24982158839702606,
-0.012538871727883816,
-0.014507371932268143,
-0.244923934340477,
-0.4107002317905426,
0.09119312465190887,
-0.22418326139450073,
0.4608556032180786,
-0.34230324625968933,
-0.4593057930469513,
0.2506963014602661,
0.22680866718292236,
0.2354615479707718,
0.36966562271118164,
-0.37355026602745056,
0.20016756653785706,
0.015004532411694527,
-0.2361067235469818,
-0.07618848234415054,
0.041097208857536316,
0.386656254529953,
-0.1922805905342102,
-0.39226803183555603,
0.2118116021156311,
-0.1738399714231491,
-0.09788399189710617,
-0.29128608107566833,
-0.31771883368492126,
0.31883251667022705,
0.2502020001411438,
0.12403418123722076,
0.17259125411510468,
-0.08605661243200302,
-0.1338624209165573,
0.11980459839105606,
-0.2841421961784363,
0.010103791020810604,
0.00868886336684227,
0.08827618509531021,
-0.08681812882423401,
0.030908634886145592,
0.25715139508247375,
0.1876174360513687,
0.017261769622564316,
0.5952084064483643,
0.37850531935691833,
-0.21947510540485382,
-0.26590627431869507,
0.17860841751098633,
-0.22924330830574036,
-0.06068922206759453,
-0.2634165287017822,
0.1508059948682785,
0.09231764823198318,
-0.057126618921756744,
0.10292088240385056,
-0.015743911266326904,
-0.14091016352176666,
-0.007175784558057785,
-0.2680371105670929,
-0.020958488807082176,
0.02229999750852585,
-0.16380959749221802,
-0.0015580152394250035,
0.18830519914627075,
0.1332460641860962,
0.2853650152683258,
-0.2360226809978485,
-0.27911674976348877,
-0.2388353794813156,
-0.022319361567497253,
0.045321106910705566,
0.41371333599090576,
-0.01664041541516781,
-0.23604752123355865,
-0.038738369941711426,
0.1452319473028183,
-0.2301059514284134,
-0.2452722191810608,
-0.17255038022994995,
-0.04683484509587288,
0.12900717556476593,
-0.03978462517261505,
-0.18745756149291992,
0.13585394620895386,
-0.3403600752353668,
-0.29250508546829224,
-0.20412957668304443,
-0.13163819909095764,
-0.1293068379163742,
-0.024285631254315376,
0.22228863835334778,
-0.10420917719602585,
0.3449907898902893,
-0.2877996861934662,
0.0879831612110138,
0.03487571328878403,
0.29383137822151184,
0.05117115005850792,
0.24954849481582642,
0.4168611466884613,
-0.1764676719903946,
-0.5602070689201355,
0.18304529786109924,
-0.22114598751068115,
0.1743839830160141,
0.16332194209098816,
-0.08280208706855774,
-0.048011112958192825,
0.029965469613671303,
-0.021473566070199013,
0.026401694864034653,
-0.0819888785481453,
-0.03023334965109825,
0.13558773696422577,
0.20455144345760345,
-0.2827223539352417,
0.12395703047513962,
0.422098308801651,
-0.033097319304943085,
0.09618958085775375,
0.026279063895344734,
0.2615513801574707,
-0.05342176556587219,
0.17466238141059875,
0.04105696454644203,
0.016863875091075897,
-0.04344804957509041,
0.26398882269859314,
0.09460685402154922,
0.08114726841449738,
0.11606112122535706,
-0.1200716644525528,
0.04641953855752945,
0.13107292354106903,
0.3746131658554077,
0.10712651908397675,
0.06603597104549408,
0.10081599652767181,
0.216569185256958,
-0.22537603974342346,
-0.14098671078681946,
0.3062993586063385,
-0.10277515649795532,
-0.020908145233988762,
0.022877244278788567,
-0.06457270681858063,
0.07485640048980713,
0.1480168104171753,
-0.06374992430210114,
-0.31802287697792053,
0.13867245614528656,
-0.07772714644670486,
-0.1830138862133026,
-0.6274289488792419,
-0.2322813719511032,
0.05465104430913925,
-0.01765858195722103,
0.08908945322036743,
-0.08369693905115128,
-0.1092471331357956,
0.20269763469696045,
-0.03502576798200607,
-0.23063644766807556,
0.6797721982002258,
-0.06164853274822235,
0.044697582721710205,
-0.05517617613077164,
0.2520870566368103,
-0.21323475241661072,
-0.07124549895524979,
-0.1705532819032669,
-0.00184009806253016,
0.15782515704631805,
0.21092885732650757,
-0.4701043367385864,
-0.1439928412437439,
-0.0009011344518512487,
0.018944112583994865,
-0.05917779356241226,
0.0006442827288992703,
0.06300149112939835,
-0.037797294557094574,
0.294050931930542,
0.10967091470956802,
-0.08980167657136917,
-0.19844262301921844,
0.21691648662090302,
-0.007182060740888119,
-0.020038114860653877,
-0.24845506250858307,
0.004518262110650539,
0.10421206057071686,
-0.1066088154911995,
0.11462504416704178,
-0.5152722597122192,
0.04132688790559769,
0.2593996524810791,
0.38845953345298767,
-0.1085285097360611,
-0.22299575805664062,
0.08364369720220566,
-0.3275440037250519,
0.5394178628921509,
0.08417364954948425,
0.1905832439661026,
-0.11804763972759247,
-0.2930147647857666,
-0.29509666562080383,
0.005453574005514383,
-0.16959434747695923,
-0.3680242598056793,
-0.12039530277252197,
0.3059186339378357,
0.39280399680137634,
0.24459411203861237,
0.1168808564543724,
-0.2535529136657715,
-0.12980498373508453,
0.26505929231643677,
-0.1438632756471634,
-0.15893006324768066,
-0.07328233122825623,
0.04924123361706734,
-0.22518853843212128,
-0.17736820876598358,
0.08320578932762146,
-0.019430875778198242,
0.07522574812173843,
-0.22762097418308258,
-0.14735698699951172,
0.3186531364917755,
-0.43477770686149597,
0.25957685708999634,
0.02589532919228077,
0.5472241640090942,
0.02913188748061657,
-0.04227258265018463,
-0.16555677354335785,
0.22283847630023956,
-0.045000266283750534,
0.49142101407051086,
0.061620693653821945,
0.22850871086120605,
-0.21550072729587555,
-0.31885021924972534,
-0.34525763988494873,
0.6317009329795837,
0.03209638223052025,
-0.05509943515062332,
-0.2490805685520172,
-0.05867006629705429,
-0.22949929535388947,
0.29232853651046753,
-0.11924563348293304,
0.06629280745983124,
-0.03665190935134888,
0.18673370778560638,
-0.3581699728965759,
-0.23673096299171448,
0.33841896057128906,
-0.4211324453353882,
-0.335680216550827,
-0.18971435725688934,
0.0682089775800705,
-0.14943353831768036,
0.29298871755599976,
-0.10573398321866989,
-0.015354366041719913,
0.26347002387046814,
-0.13522709906101227,
-0.016723742708563805,
0.0001431076816515997,
0.05985728278756142,
0.1573977768421173,
-0.24589870870113373,
-0.40447190403938293,
-0.19432933628559113,
-0.060325395315885544,
-0.37993159890174866,
-0.24929291009902954
] |
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.27735987305641174,
-0.14240624010562897,
-0.009712575934827328,
0.2224387377500534,
0.2347681224346161,
0.12864670157432556,
-0.03142669051885605,
-0.08363279700279236,
-0.04452681913971901,
0.04259513318538666,
0.07567697763442993,
0.35082700848579407,
0.06566647440195084,
0.2150925248861313,
0.18949668109416962,
0.2755100727081299,
0.3028120696544647,
0.2871474027633667,
-0.3395666480064392,
-0.11875329166650772,
-0.22478069365024567,
-0.12712298333644867,
0.003454510821029544,
-0.29153478145599365,
-0.18111306428909302,
-0.2847267985343933,
-0.10517925769090652,
0.011285933665931225,
0.11921098083257675,
0.12824952602386475,
0.14725306630134583,
0.11708998680114746,
0.2598932087421417,
0.32083263993263245,
-0.00012003982556052506,
0.006559006404131651,
-0.2820395231246948,
-0.09815549850463867,
-0.317129909992218,
-0.14831097424030304,
0.00406918628141284,
-0.1686498522758484,
0.01257951371371746,
-0.3187101185321808,
0.01671130396425724,
-0.05775728449225426,
-0.1532118171453476,
-0.20478862524032593,
0.5439521670341492,
-0.2619331479072571,
0.10759453475475311,
-0.07455623894929886,
-0.18759402632713318,
0.05358600988984108,
-0.263737291097641,
0.32248419523239136,
0.16352427005767822,
0.04922749102115631,
-0.01661510020494461,
0.3577505648136139,
0.007664210628718138,
0.26261112093925476,
-0.2154630571603775,
-0.25762826204299927,
0.3756665885448456,
-0.011946956627070904,
0.1762695461511612,
-0.3532518148422241,
0.15661346912384033,
-0.06553106755018234,
0.7306801080703735,
-0.41830092668533325,
-0.21837042272090912,
-0.2186259925365448,
0.14460234344005585,
-0.12942293286323547,
0.14989428222179413,
0.2500555217266083,
-0.009655280038714409,
0.1328630894422531,
-0.5013386607170105,
-0.7865977883338928,
-0.09614744037389755,
0.09071958810091019,
0.05138019099831581,
-0.548475444316864,
0.007486836984753609,
0.1316182017326355,
0.1669691801071167,
0.3084481358528137,
0.4444078207015991,
-0.26089128851890564,
-0.24271538853645325,
0.10328289866447449,
-0.29034027457237244,
-0.30801963806152344,
-0.32479238510131836,
0.18504193425178528,
-0.041348375380039215,
0.22324691712856293,
0.08514074236154556,
-0.08969511091709137,
-0.25815942883491516,
0.1403542459011078,
0.19319447875022888,
0.29766467213630676,
0.10339456796646118,
0.20719461143016815,
0.06409800797700882,
0.0867730900645256,
-0.2276674509048462,
-0.055546682327985764,
0.20996618270874023,
0.11168703436851501,
0.6322053074836731,
-0.3062039315700531,
0.2605333626270294,
0.018100706860423088,
0.057566601783037186,
0.11730965971946716,
0.13012470304965973,
-0.03814131021499634,
-0.18217326700687408,
0.3218333423137665,
0.10125155746936798,
0.10706505179405212,
0.1898791342973709,
0.24064911901950836,
-0.055998433381319046,
-0.13122987747192383,
-0.17087972164154053,
-0.07950277626514435,
-0.3020848333835602,
0.386260449886322,
0.07387442886829376,
0.005374521017074585,
0.11036921292543411,
0.48390331864356995,
-0.4521855413913727,
-0.15698331594467163,
0.00934641808271408,
-0.18236157298088074,
0.36486712098121643,
0.1807541698217392,
0.13290008902549744,
0.19297580420970917,
-0.07670050114393234,
-0.025980863720178604,
-0.050621192902326584,
0.7035810947418213,
-0.3622857630252838,
-0.11673817783594131,
0.031743571162223816,
0.12887565791606903,
-0.09978105872869492,
0.11891912668943405,
-0.6574719548225403,
0.19570110738277435,
0.10903872549533844,
-0.2294832170009613,
0.23262444138526917,
0.06446994096040726,
-0.3933757543563843,
-0.19553512334823608,
-0.060075026005506516,
0.2446703314781189,
-0.3517107367515564,
-0.13309557735919952,
0.1671469807624817,
-0.21639961004257202,
-0.05629441887140274,
0.16038024425506592,
-0.27723491191864014,
0.21077746152877808,
-0.34160831570625305,
-0.3182988166809082,
0.5734577775001526,
0.12379024177789688,
-0.4386877715587616,
0.137653648853302,
-0.0473179928958416,
-0.08549828827381134,
-0.03384595364332199,
0.5759632587432861,
0.08870644122362137,
-0.12185166031122208,
-0.4468070864677429,
0.2835898697376251,
0.09143084287643433,
0.09933308511972427,
-0.00009419927664566785,
-0.17192211747169495,
0.24466407299041748,
-0.31387996673583984,
-0.10988259315490723,
0.4869319200515747,
0.29135122895240784,
0.4426921010017395,
0.3346465229988098,
0.05464691296219826,
0.12267639487981796,
0.42058610916137695,
-0.14442743360996246,
0.03634526953101158,
-0.18893387913703918,
0.1604403406381607,
-0.605027437210083,
-0.02830635756254196,
0.1515420377254486,
-0.5714519619941711,
0.42656707763671875,
-0.09662848711013794,
-0.0594579242169857,
-0.2061413824558258,
-0.08250618726015091,
0.056584905833005905,
-0.0742594376206398,
0.054046109318733215,
-0.07023174315690994,
-0.16912022233009338,
-0.2333439737558365,
0.45659247040748596,
-0.07458104938268661,
0.10198036581277847,
-0.6434776782989502,
0.41207224130630493,
0.14481399953365326,
-0.18760697543621063,
-0.28970304131507874,
-0.07700440287590027,
0.20228242874145508,
0.015842784196138382,
-0.16047286987304688,
0.37946033477783203,
0.1969829946756363,
0.36936601996421814,
-0.07243573665618896,
0.19691438972949982,
0.027586162090301514,
-0.03662946820259094,
0.0015107542276382446,
-0.13201981782913208,
0.17837345600128174,
-0.08495906740427017,
-0.13141097128391266,
-0.02517029456794262,
-0.17624104022979736,
0.05672426149249077,
0.06934574991464615,
-0.1900813728570938,
0.0065396432764828205,
-0.3226762115955353,
-0.012901967391371727,
-0.23111200332641602,
-0.2205687165260315,
0.19445107877254486,
0.3617492914199829,
0.1074928343296051,
-0.19668270647525787,
-0.17285379767417908,
0.28079065680503845,
-0.2587948143482208,
-0.04645484685897827,
0.04439346119761467,
-0.27435019612312317,
0.009504002518951893,
-0.12609423696994781,
0.5707715153694153,
0.18910132348537445,
0.10612043738365173,
0.07778463512659073,
0.17420141398906708,
0.1364915519952774,
-0.023219909518957138,
0.024552425369620323,
0.03539393097162247,
0.5409007668495178,
0.2572125196456909,
-0.00643508043140173,
0.08573045581579208,
-0.15938760340213776,
0.46659055352211,
0.10989565402269363,
-0.1207866296172142,
-0.30450502038002014,
0.1523127555847168,
-0.13947360217571259,
0.09345488250255585,
-0.49075227975845337,
-0.08585510402917862,
-0.23074176907539368,
0.1629548966884613,
-0.25301092863082886,
0.7551641464233398,
0.20676973462104797,
0.19474925100803375,
0.15207913517951965,
0.023358948528766632,
-0.08850543200969696,
-0.43777307868003845,
-0.08935336768627167,
0.12714113295078278,
-0.09930773824453354,
-0.061639297753572464,
0.07312597334384918,
-0.06764484941959381,
0.391497939825058,
-0.08245649188756943,
-0.054449908435344696,
-0.47224026918411255,
0.06781482696533203,
-0.0471549853682518,
0.09706912934780121,
0.11794358491897583,
-0.17211176455020905,
0.1620836704969406,
-0.4026907980442047,
-0.015497937798500061,
-0.11300885677337646,
-0.44272810220718384,
-0.2376410961151123,
0.046975716948509216,
0.13580922782421112,
0.28566908836364746,
-0.020717395469546318,
-0.17603056132793427,
0.03132026270031929,
-0.024033401161432266,
-0.16447749733924866,
-0.17987902462482452,
0.03812537342309952,
0.07073043286800385,
0.17854870855808258,
-0.24931283295154572,
0.2252114713191986,
0.0366106741130352,
-0.29013532400131226,
-0.589133083820343,
0.38103777170181274,
0.17697902023792267,
-0.2777748703956604,
0.2593785226345062,
-0.183054581284523,
-0.038580361753702164,
0.33595505356788635,
-0.6108108162879944,
-0.08909472823143005,
0.04730689898133278,
0.07121710479259491,
-0.4067152142524719,
0.32667988538742065,
0.3233913481235504,
-0.11059372127056122,
0.009024815633893013,
-0.10590585321187973,
-0.2592622637748718,
0.05878091976046562,
0.09948702901601791,
0.4200100600719452,
-0.2023090273141861,
0.2221483588218689,
-0.08145953714847565,
0.25427350401878357,
-0.007060047704726458,
-0.1169079914689064,
0.3640681207180023,
0.113461934030056,
0.5133029222488403,
-0.24457918107509613,
-0.14100661873817444,
-0.5643543004989624,
-0.17712627351284027,
-0.28183403611183167,
-0.011447339318692684,
-0.02273542247712612,
-0.04424460232257843,
-0.1466464251279831,
-0.2983008325099945,
-0.24984246492385864,
-0.15601296722888947,
-0.0004163964476902038,
-0.27368345856666565,
0.30529114603996277,
0.10216238349676132,
0.22628596425056458,
0.1891043335199356,
-0.20325687527656555,
-0.06710128486156464,
0.20099936425685883,
0.31485360860824585,
0.047192614525556564,
-0.32266977429389954,
-0.030612880364060402,
-0.1401812583208084,
0.15837258100509644,
-0.2089395970106125,
-0.004810416605323553,
0.16129620373249054,
-0.06423906236886978,
0.09787680208683014,
0.20930607616901398,
0.8259220123291016,
0.22820858657360077,
0.1617145985364914,
0.06672341376543045,
-0.38726329803466797,
-0.2855741083621979,
-0.005081701558083296,
0.019830934703350067,
-0.27809861302375793,
-0.08809316158294678,
0.6831378936767578,
0.17875270545482635,
-0.0507894903421402,
-0.2957940101623535,
0.4659901261329651,
-0.33180347084999084,
-0.3347013294696808,
-0.26034849882125854,
-0.19917504489421844,
-0.5212270617485046,
-0.1314111351966858,
-0.2619122266769409,
-0.02847220189869404,
-0.1773986667394638,
0.11378856003284454,
-0.18715089559555054,
-0.0758933499455452,
0.051375612616539,
-0.1798715740442276,
0.3351958394050598,
0.33292558789253235,
0.05405189469456673,
0.08239433169364929,
0.18735261261463165,
0.17173051834106445,
0.3534221053123474,
-0.09962378442287445,
-0.09590578079223633,
-0.04830426350235939,
0.06811349093914032,
0.14130398631095886,
0.08038787543773651,
0.05227968469262123,
0.005039829295128584,
-0.02571897767484188,
-0.21549274027347565,
-0.3657269775867462,
-0.08521485328674316,
-0.08787687122821808,
-0.13799460232257843,
-0.21465668082237244,
-0.4565046727657318,
0.5085779428482056,
-0.0864705964922905,
-0.0846949890255928,
-0.06166277080774307,
-0.09775401651859283,
-0.2706187665462494,
0.10744597017765045,
0.11821205914020538,
0.8301042914390564,
0.16625404357910156,
0.21889038383960724,
0.18120358884334564,
-0.24685823917388916,
0.03670787811279297,
0.028986262157559395,
-0.048084888607263565,
-0.3911786675453186,
-0.3459462821483612,
-0.1515960842370987,
-0.17169658839702606,
0.008690970949828625,
0.30135342478752136,
-0.34600359201431274,
0.3065207600593567,
-0.2786552608013153,
-0.054278939962387085,
-0.1268516629934311,
-0.02321299910545349,
-0.16166657209396362,
-0.13089777529239655,
-0.1627981811761856,
0.0030436089728027582,
-0.01861252449452877,
0.06880884617567062,
-0.07297408580780029,
0.04332795739173889,
0.17787156999111176,
-0.10238860547542572,
0.30788564682006836,
0.13814334571361542,
-0.02809876948595047,
0.24916186928749084,
-0.1203393042087555,
-0.4506576359272003,
-0.05060942471027374,
0.5732133984565735,
0.4336515963077545,
0.05301077291369438,
0.06874866038560867,
-0.09891683608293533,
-0.01419480238109827,
0.39029932022094727,
-0.19780217111110687,
-0.1549127846956253,
0.43206849694252014,
0.12532742321491241,
-0.07732296735048294,
0.06692402064800262,
-0.05341719463467598,
-0.16151802241802216,
-0.07303012907505035,
-0.012171580456197262,
0.061018314212560654,
-0.31886395812034607,
0.0215417742729187,
0.23854175209999084,
0.3357428014278412,
-0.10635308921337128,
0.03801139071583748,
0.004773701075464487,
-0.00550881726667285,
0.26779526472091675,
0.03569595143198967,
-0.2979890704154968,
0.013407472521066666,
0.5746381878852844,
0.21815125644207,
-0.020175190642476082,
0.4256408214569092,
-0.33354857563972473,
0.1248631700873375,
-0.2270948588848114,
0.5075289011001587,
0.18347525596618652,
-0.2038390189409256,
0.20458456873893738,
0.03836661949753761,
0.4741450250148773,
-0.02725394442677498,
-0.01672223210334778,
0.07381311058998108,
-0.007936835289001465,
0.15436987578868866,
-0.04866011068224907,
-0.3517208397388458,
0.09103652834892273,
0.22863399982452393,
0.35155510902404785,
0.3458956778049469,
-0.1389698088169098,
0.024869391694664955,
0.3707374930381775,
-0.2032514065504074,
0.1789878010749817,
0.2704666256904602,
0.2227461189031601,
0.21634335815906525,
0.22491015493869781,
-0.30692070722579956,
-0.32146766781806946,
-0.03530564159154892,
-0.19339492917060852,
-0.261362761259079,
-0.14776460826396942,
-0.06892155110836029,
0.1421384960412979,
-0.07358510792255402,
0.27441200613975525,
-0.2740537226200104,
-0.42869243025779724,
0.19849075376987457,
-0.12608662247657776,
0.10449795424938202,
0.189878910779953,
0.21517373621463776,
0.21362103521823883,
0.13811630010604858,
0.4634353518486023,
-0.27139946818351746,
-0.13523273169994354,
-0.2096986025571823,
0.1733742356300354,
-0.02206438034772873,
-0.0064742169342935085,
0.12586061656475067,
-0.11786933243274689,
-0.6242120265960693,
-0.06739544123411179,
0.5685313940048218,
0.11676201969385147,
-0.042634427547454834,
-0.22807307541370392,
0.055082883685827255,
0.15555338561534882,
0.2226060926914215,
0.1180747002363205,
-0.40235674381256104,
-0.33652010560035706,
0.3168424367904663,
0.1549125462770462,
-0.07925642281770706,
-0.19125624001026154,
0.27554571628570557,
-0.17168407142162323,
-0.30125677585601807,
0.18502458930015564,
0.14117830991744995,
-0.052625738084316254,
-0.33937501907348633,
0.08545956015586853,
0.2024500072002411,
-0.14827567338943481,
0.4022921025753021,
0.6510441303253174,
-0.27489644289016724,
0.0234390739351511,
0.14741584658622742,
0.33776888251304626,
-0.1483325958251953,
0.43050602078437805,
-0.001116445753723383,
0.47706565260887146,
-0.005231767892837524,
0.0808771476149559,
-0.10373970866203308,
-0.4036499857902527,
0.07697390764951706,
0.13804015517234802,
-0.2588014006614685,
0.0405353307723999,
-0.030086150392889977,
-0.15368525683879852,
0.18862977623939514,
-0.3479963541030884,
-0.14804263412952423,
0.37146076560020447,
-0.24119065701961517,
0.10740040987730026,
-0.013434178195893764,
-0.13596965372562408,
0.2627214789390564,
0.2455378621816635,
-0.009992169216275215,
-0.24096344411373138,
0.3795967996120453,
0.08551452308893204,
-0.18178895115852356,
0.14682506024837494,
0.08944813907146454,
0.20304305851459503,
-0.19446779787540436,
-0.16171880066394806,
0.06935667246580124,
-0.12374754995107651,
0.08710657805204391,
0.0874505266547203,
0.03893424943089485,
-0.18455122411251068,
0.11380751430988312,
0.2477378398180008,
0.20417049527168274,
0.2740827798843384,
-0.03731311112642288,
0.12912137806415558,
0.11251422762870789,
-0.0035211367066949606,
0.009315944276750088,
0.20518739521503448,
-0.0007488185656256974,
0.0038971167523413897,
0.30486154556274414,
0.09476720541715622,
0.3823273777961731,
-0.48483553528785706,
0.25954723358154297,
0.2937278151512146,
-0.07465159893035889,
-0.24958398938179016,
0.04230130463838577,
0.16892196238040924,
0.015546108596026897,
0.5528268814086914,
-0.26864123344421387,
0.00560175022110343,
0.05080636963248253,
0.038175079971551895,
0.05144323408603668,
0.4367138147354126,
0.23866181075572968,
-0.44961169362068176,
-0.2709537744522095,
-0.23190180957317352,
-0.5596634745597839,
0.018425259739160538,
0.3477916121482849,
0.3131183087825775,
-0.24933966994285583,
0.10257057100534439,
0.07638727873563766,
0.16521678864955902,
0.048202767968177795,
-0.17678865790367126,
0.07443377375602722,
0.34125420451164246,
0.17679350078105927,
-0.253485769033432,
-0.023443767800927162,
0.29201841354370117,
-0.10936934500932693,
-0.2514941394329071,
0.1846385896205902,
0.07253148406744003,
-0.007318923249840736,
0.1785518229007721,
0.1702844500541687,
-0.22358162701129913,
0.40204355120658875,
0.6338939070701599,
0.08537008613348007,
0.023549480363726616,
-0.19988007843494415,
0.24535131454467773,
0.32068249583244324,
-0.04037567228078842,
-0.19774731993675232,
-0.0849018469452858,
0.08710682392120361,
0.1833113729953766,
-0.39719894528388977,
0.3609267473220825,
-0.21171611547470093,
-0.11294569820165634,
0.12772883474826813,
0.06514549255371094,
-0.5358835458755493,
0.049110569059848785,
0.0694136694073677,
0.17668896913528442,
0.136840358376503,
0.38226035237312317,
0.012054197490215302,
0.345138818025589,
-0.19440796971321106,
-0.1288730353116989,
0.3826500177383423,
-0.18387030065059662,
-0.31202882528305054,
-0.18203459680080414,
0.3298673629760742,
-0.05158006027340889,
-0.10722165554761887,
-0.3974068760871887,
0.11220548301935196,
0.45501434803009033,
-0.22392743825912476,
0.012751000933349133,
0.5110883116722107,
-0.20354190468788147,
0.17704035341739655,
0.13639168441295624,
0.5885226130485535,
0.12717539072036743,
-0.33513593673706055,
-0.004045640118420124,
-0.30075308680534363
] |
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.2981737554073334,
-0.08286520093679428,
0.026727501302957535,
0.14939935505390167,
0.3067897856235504,
0.12280038744211197,
-0.05620676651597023,
-0.06147686392068863,
0.04452739283442497,
0.05419393628835678,
-0.06526149064302444,
0.3738250732421875,
0.02156338281929493,
0.10119803249835968,
0.1474013775587082,
0.25320708751678467,
0.19879956543445587,
0.2516977787017822,
-0.26881930232048035,
-0.09719377756118774,
-0.21972472965717316,
-0.23093007504940033,
0.05293356254696846,
-0.34560680389404297,
-0.21621188521385193,
-0.2678649425506592,
-0.17009671032428741,
0.014569810591638088,
0.1032242402434349,
-0.03982143849134445,
0.16395993530750275,
0.13002514839172363,
0.3564486801624298,
0.2765147387981415,
-0.00012225648970343173,
0.04494687169790268,
-0.3267863690853119,
-0.16619619727134705,
-0.3974144458770752,
-0.14399074018001556,
0.17799146473407745,
-0.26386064291000366,
0.06470774114131927,
-0.33731797337532043,
-0.04464282467961311,
-0.1765090525150299,
-0.10760530084371567,
-0.2636471092700958,
0.6995686888694763,
-0.30835750699043274,
0.06561890989542007,
-0.05405180901288986,
-0.24225923418998718,
0.0614364854991436,
-0.07604202628135681,
0.24499660730361938,
0.11913585662841797,
0.151967853307724,
-0.04849734157323837,
0.22260259091854095,
-0.14047418534755707,
0.25488874316215515,
-0.20618584752082825,
-0.18936948478221893,
0.39679279923439026,
-0.0019805890042334795,
0.07554035633802414,
-0.33136242628097534,
0.07828711718320847,
-0.000281704735243693,
0.7876374125480652,
-0.4693838059902191,
-0.332303911447525,
-0.23040339350700378,
0.2201099544763565,
-0.07076101005077362,
0.04334079474210739,
0.20691679418087006,
0.01354870107024908,
0.22217997908592224,
-0.4472397565841675,
-0.8105937838554382,
-0.1399763524532318,
0.14884638786315918,
0.08192137628793716,
-0.49451684951782227,
0.023887772113084793,
0.14838428795337677,
0.20776218175888062,
0.2897450923919678,
0.3728310465812683,
-0.25498226284980774,
-0.17426781356334686,
0.10398469120264053,
-0.3044407367706299,
-0.24418579041957855,
-0.29225149750709534,
0.056951843202114105,
-0.05470499396324158,
0.3812348544597626,
0.13492949306964874,
-0.03296463564038277,
-0.24124962091445923,
0.17376817762851715,
0.17379452288150787,
0.2897123396396637,
0.11092575639486313,
0.1706046462059021,
0.13796117901802063,
0.0049736760556697845,
-0.21062451601028442,
-0.10551650077104568,
0.11871843039989471,
0.13158242404460907,
0.5387067198753357,
-0.21611890196800232,
0.2105356901884079,
0.045654844492673874,
0.12340018153190613,
0.012617555446922779,
0.05493377521634102,
-0.04813028499484062,
-0.1775924116373062,
0.3871256411075592,
0.08201803267002106,
0.18128176033496857,
0.15064884722232819,
0.23661033809185028,
0.02287636138498783,
-0.11504939943552017,
-0.12618298828601837,
-0.03481077775359154,
-0.2900649309158325,
0.391313761472702,
0.20096249878406525,
-0.09959912300109863,
0.18688154220581055,
0.4064936339855194,
-0.43461236357688904,
-0.1599062830209732,
0.014104102738201618,
-0.23744262754917145,
0.5390251874923706,
0.1750430315732956,
0.05220389366149902,
0.20256195962429047,
0.00510565796867013,
-0.04552116617560387,
-0.16679958999156952,
0.5195534825325012,
-0.27199891209602356,
-0.18111465871334076,
0.1025097444653511,
0.09023244678974152,
-0.16608205437660217,
0.21139419078826904,
-0.4340533912181854,
0.10766376554965973,
0.057343240827322006,
-0.1293477714061737,
0.16638536751270294,
0.031101897358894348,
-0.3366866111755371,
-0.2785729467868805,
0.06284526735544205,
0.30723658204078674,
-0.4218384921550751,
-0.16415774822235107,
0.06189166009426117,
-0.09403949975967407,
-0.20570595562458038,
0.2003057897090912,
-0.2843596339225769,
0.2975260317325592,
-0.27604204416275024,
-0.24221199750900269,
0.5749607086181641,
-0.02873363345861435,
-0.48127761483192444,
0.1532565951347351,
0.025359371677041054,
0.0056968871504068375,
0.001657133805565536,
0.617572009563446,
0.31914135813713074,
-0.1399002969264984,
-0.45405280590057373,
0.39994150400161743,
0.1578347533941269,
0.10492636263370514,
0.021870797500014305,
-0.29571405053138733,
0.21839407086372375,
-0.2868964374065399,
-0.187124565243721,
0.3673589527606964,
0.28259411454200745,
0.2646552622318268,
0.36159196496009827,
0.02343330904841423,
0.1554548144340515,
0.3602970540523529,
0.022047368809580803,
0.03408683463931084,
-0.10741905868053436,
0.052772924304008484,
-0.6752665638923645,
-0.0008340447093360126,
0.15547716617584229,
-0.5374924540519714,
0.17360897362232208,
-0.1934855431318283,
-0.09242695569992065,
-0.16534577310085297,
-0.08859283477067947,
-0.01356892753392458,
-0.08976835757493973,
-0.030893299728631973,
-0.04416383430361748,
-0.21191594004631042,
-0.2746407687664032,
0.42018088698387146,
-0.037642475217580795,
0.17623263597488403,
-0.6207961440086365,
0.4170427620410919,
0.19731475412845612,
-0.21418775618076324,
-0.1617542952299118,
-0.08378937095403671,
0.22957976162433624,
0.01859370991587639,
-0.05125674977898598,
0.36397305130958557,
0.16893407702445984,
0.37207624316215515,
0.05819975957274437,
0.12339462339878082,
0.028112515807151794,
-0.1681796908378601,
0.22012904286384583,
-0.043515197932720184,
0.16424477100372314,
-0.12329483777284622,
-0.25302210450172424,
0.08864094316959381,
-0.18905434012413025,
0.13726380467414856,
0.0867500752210617,
-0.16632549464702606,
-0.011845891363918781,
-0.377816766500473,
-0.08425353467464447,
-0.25644347071647644,
-0.29768991470336914,
0.18484041094779968,
0.44589751958847046,
0.06325358897447586,
0.024987783282995224,
-0.1737428903579712,
0.31633129715919495,
-0.1756477802991867,
0.011916839517652988,
0.01527005061507225,
-0.391963928937912,
-0.0695016086101532,
-0.17182429134845734,
0.48890015482902527,
0.10107781738042831,
0.08916045725345612,
0.06313921511173248,
0.10610203444957733,
0.12016203999519348,
0.040463224053382874,
0.034184087067842484,
0.018937427550554276,
0.56881183385849,
0.32381197810173035,
0.026262424886226654,
0.03925585374236107,
-0.15863478183746338,
0.4841208755970001,
0.13112154603004456,
-0.15808646380901337,
-0.20299963653087616,
0.06025093421339989,
-0.12024854123592377,
0.2065156251192093,
-0.48766493797302246,
-0.18659278750419617,
-0.3327080309391022,
0.10924696922302246,
-0.2565138339996338,
0.6586428284645081,
0.21084529161453247,
0.27177825570106506,
0.1587676703929901,
0.04561656340956688,
-0.12482915818691254,
-0.42189645767211914,
-0.053640831261873245,
-0.031255193054676056,
0.03746045380830765,
-0.09090113639831543,
-0.018166162073612213,
0.03502536565065384,
0.4715486764907837,
0.11380153149366379,
-0.030669022351503372,
-0.5500055551528931,
0.09202934056520462,
-0.07754889875650406,
0.20223332941532135,
0.08275804668664932,
-0.18597529828548431,
0.13729190826416016,
-0.23665983974933624,
-0.07456430047750473,
-0.11089545488357544,
-0.45801299810409546,
-0.1761930137872696,
-0.0046439277939498425,
0.06758386641740799,
0.3397305905818939,
0.03211972862482071,
-0.30952003598213196,
-0.06574352085590363,
-0.07723816484212875,
-0.11416609585285187,
-0.18192443251609802,
-0.01222620066255331,
-0.05316072329878807,
0.16598296165466309,
-0.2359538972377777,
0.23220473527908325,
0.005328029859811068,
-0.20060227811336517,
-0.4661620557308197,
0.44125375151634216,
0.12451734393835068,
-0.12371845543384552,
0.26411372423171997,
-0.28157246112823486,
-0.165634885430336,
0.4785482585430145,
-0.5246483087539673,
-0.15480446815490723,
0.05580056086182594,
0.13811670243740082,
-0.3403528928756714,
0.4552118480205536,
0.302121102809906,
0.047657500952482224,
0.014021509326994419,
-0.07247722893953323,
-0.22283096611499786,
0.09570272266864777,
0.042999282479286194,
0.4033217132091522,
-0.12401168793439865,
0.18965096771717072,
-0.05261008068919182,
0.4766652584075928,
0.0482533797621727,
-0.13042272627353668,
0.2802927792072296,
0.19504432380199432,
0.4728260934352875,
-0.13714951276779175,
-0.1203952506184578,
-0.4867364168167114,
-0.2577696144580841,
-0.22645016014575958,
-0.019765488803386688,
0.0007065219688229263,
0.0517284981906414,
-0.09430011361837387,
-0.2863277196884155,
-0.19047054648399353,
-0.20414213836193085,
0.07615820318460464,
-0.21137365698814392,
0.3135751783847809,
0.05728043243288994,
0.18358387053012848,
0.12215258181095123,
-0.17768971621990204,
0.09917043894529343,
0.16986218094825745,
0.4022675156593323,
0.015011072158813477,
-0.31364473700523376,
0.008283508941531181,
-0.15071819722652435,
0.14578373730182648,
-0.20087112486362457,
-0.10887424647808075,
0.26381582021713257,
-0.09607900679111481,
0.08261263370513916,
0.23463572561740875,
0.8441633582115173,
0.09459098428487778,
0.09366870671510696,
0.04526379331946373,
-0.2911585569381714,
-0.2852758765220642,
0.055753666907548904,
0.013880802318453789,
-0.23698996007442474,
-0.1452256143093109,
0.6316404342651367,
0.0028980623465031385,
-0.05835190415382385,
-0.16309696435928345,
0.599764347076416,
-0.44106367230415344,
-0.37100571393966675,
-0.14983253180980682,
-0.14239855110645294,
-0.5282941460609436,
-0.22749865055084229,
-0.2783735990524292,
-0.165114164352417,
-0.1657167226076126,
0.12169268727302551,
-0.33774033188819885,
-0.07975133508443832,
0.11862262338399887,
-0.13861259818077087,
0.3896143436431885,
0.23845110833644867,
0.05505892634391785,
0.1810157597064972,
0.3151734471321106,
0.21134145557880402,
0.47704416513442993,
-0.21939677000045776,
-0.30724841356277466,
-0.19563938677310944,
0.15619829297065735,
0.19013459980487823,
0.10894608497619629,
0.05556658282876015,
0.04378043860197067,
-0.04783432558178902,
-0.19425754249095917,
-0.44504261016845703,
-0.1347375065088272,
-0.1656709909439087,
-0.09904002398252487,
-0.1916392296552658,
-0.469086229801178,
0.632237434387207,
-0.17398938536643982,
-0.1316201388835907,
-0.12352044135332108,
-0.06652999669313431,
-0.2540264427661896,
0.33474722504615784,
0.16082510352134705,
0.9694901704788208,
0.04729351028800011,
0.15498070418834686,
0.11518816649913788,
-0.33091843128204346,
0.11469734460115433,
-0.09529764205217361,
-0.055607136338949203,
-0.4986628592014313,
-0.23652571439743042,
-0.15014074742794037,
-0.14996221661567688,
0.03695342689752579,
0.4310850203037262,
-0.37882885336875916,
0.35665175318717957,
-0.32010945677757263,
-0.02967892773449421,
-0.15644308924674988,
0.17677436769008636,
-0.1408025622367859,
-0.23882372677326202,
-0.11668775230646133,
-0.0169758889824152,
0.009541320614516735,
0.1132640615105629,
0.03705332800745964,
0.026938624680042267,
0.1899424046278,
-0.019800757989287376,
0.2504062354564667,
0.16207265853881836,
-0.0853407010436058,
0.3151872158050537,
-0.1668696105480194,
-0.5314213037490845,
-0.010757362470030785,
0.5266743898391724,
0.5019894242286682,
0.05033889785408974,
0.09279180318117142,
-0.012976575642824173,
0.02958623692393303,
0.27906641364097595,
-0.14641737937927246,
-0.10454410314559937,
0.4724716246128082,
0.1752946972846985,
-0.24537891149520874,
0.20790845155715942,
-0.09597021341323853,
-0.10675425082445145,
0.07702208310365677,
-0.04533233121037483,
0.2414693981409073,
-0.36509981751441956,
0.04468327388167381,
0.26737064123153687,
0.2766037583351135,
-0.08503876626491547,
-0.010688419453799725,
0.03559929132461548,
0.02741095796227455,
0.29621657729148865,
0.021650968119502068,
-0.2268110066652298,
0.07390256971120834,
0.45795249938964844,
0.22980965673923492,
0.027465345337986946,
0.45297881960868835,
-0.3027492165565491,
0.043754301965236664,
-0.23488980531692505,
0.357822060585022,
0.15582437813282013,
-0.27289217710494995,
0.16409388184547424,
0.1499301791191101,
0.3521016240119934,
-0.07665479928255081,
-0.18729165196418762,
0.09608300030231476,
0.009518107399344444,
-0.031710945069789886,
-0.09279254823923111,
-0.32285332679748535,
0.1501915603876114,
0.31223687529563904,
0.3856062591075897,
0.23591028153896332,
-0.2864777445793152,
-0.04252448305487633,
0.4829114079475403,
-0.20216578245162964,
0.2236270159482956,
0.2858694791793823,
0.29844123125076294,
0.015572607517242432,
0.12223979830741882,
-0.26307156682014465,
-0.3910292983055115,
-0.04393986240029335,
-0.25377142429351807,
-0.29284295439720154,
-0.11671429872512817,
-0.093650221824646,
0.16134338080883026,
-0.1719064861536026,
0.28613969683647156,
-0.37945473194122314,
-0.4428185522556305,
0.2977699041366577,
-0.2330528348684311,
0.17791959643363953,
0.26347866654396057,
0.24816671013832092,
0.22948721051216125,
0.19043026864528656,
0.3597933053970337,
-0.3228965103626251,
-0.03726208955049515,
-0.20045679807662964,
0.17675134539604187,
0.019368836656212807,
0.043783996254205704,
-0.008093400858342648,
-0.10492680221796036,
-0.5006387829780579,
-0.06236349791288376,
0.570861279964447,
0.037784088402986526,
0.07529155910015106,
-0.11215904355049133,
-0.07330847531557083,
0.07649509608745575,
0.2585809528827667,
0.14246654510498047,
-0.316640168428421,
-0.31156042218208313,
0.31528303027153015,
0.10834699124097824,
-0.16606123745441437,
-0.14550364017486572,
0.25911805033683777,
-0.3066038191318512,
-0.22802916169166565,
0.16273179650306702,
0.04079245775938034,
0.0030273301526904106,
-0.3377048671245575,
0.0188238974660635,
0.36025407910346985,
-0.1565859615802765,
0.30479973554611206,
0.44236472249031067,
-0.09671536087989807,
-0.06778642535209656,
0.10520549863576889,
0.3428691327571869,
0.05839668959379196,
0.24083653092384338,
-0.0606638602912426,
0.3778831362724304,
-0.015873322263360023,
0.061162736266851425,
-0.031194210052490234,
-0.40037161111831665,
0.06756023317575455,
0.220754012465477,
-0.23215067386627197,
0.024523116648197174,
0.009770776145160198,
0.01451379805803299,
0.27084389328956604,
-0.35103872418403625,
-0.1519542783498764,
0.38623717427253723,
-0.06748110055923462,
0.0649072527885437,
0.05013541132211685,
-0.10280042886734009,
0.2203305959701538,
0.2604195177555084,
-0.005928427446633577,
-0.3765154778957367,
0.3823736310005188,
0.15470026433467865,
-0.037192005664110184,
0.14263688027858734,
0.09615402668714523,
0.16138368844985962,
-0.056756194680929184,
-0.22179968655109406,
-0.06990796327590942,
0.015247483737766743,
0.16016823053359985,
0.04541553929448128,
-0.04624752327799797,
-0.11481736600399017,
0.05294019356369972,
0.11007741838693619,
0.3344466984272003,
0.30771324038505554,
-0.0333201102912426,
0.08864656090736389,
-0.01472254004329443,
-0.10163309425115585,
0.010188067331910133,
0.20183803141117096,
0.0004489190469030291,
0.018006570637226105,
0.11056434363126755,
0.0184145737439394,
0.33748552203178406,
-0.3615121841430664,
0.2868884801864624,
0.36281269788742065,
-0.18207573890686035,
-0.1669217050075531,
0.0322592593729496,
0.1311509907245636,
-0.028860293328762054,
0.6571773886680603,
-0.31290051341056824,
-0.0014361207140609622,
0.11267171055078506,
0.029594434425234795,
-0.13007879257202148,
0.29193350672721863,
0.38862380385398865,
-0.42226341366767883,
-0.26381874084472656,
-0.14157845079898834,
-0.5935500264167786,
-0.07036656886339188,
0.24319039285182953,
0.12785793840885162,
-0.23381628096103668,
0.13241030275821686,
0.20796775817871094,
0.2505532205104828,
-0.046772513538599014,
-0.23026683926582336,
0.16955533623695374,
0.33016443252563477,
0.08325383067131042,
-0.2390669882297516,
-0.09245514869689941,
0.40593692660331726,
-0.07990189641714096,
-0.36208316683769226,
0.041507672518491745,
0.18964965641498566,
-0.05733880773186684,
0.24552218616008759,
0.19197025895118713,
0.009455384686589241,
0.3001292049884796,
0.6162529587745667,
-0.01904943585395813,
-0.0020516742952167988,
-0.20478948950767517,
0.20923840999603271,
0.4031699001789093,
0.022274650633335114,
-0.14015942811965942,
-0.09945127367973328,
0.12383326888084412,
0.2696533203125,
-0.43714001774787903,
0.3272206485271454,
-0.24853315949440002,
-0.17099907994270325,
0.06427539139986038,
0.08514007180929184,
-0.4315861463546753,
0.050964727997779846,
0.14319738745689392,
0.21859490871429443,
0.18202203512191772,
0.3784556984901428,
-0.06858590245246887,
0.36106735467910767,
-0.18810980021953583,
-0.10090374946594238,
0.475373238325119,
-0.15663422644138336,
-0.20169517397880554,
-0.08702706545591354,
0.4287043809890747,
-0.08216584473848343,
0.028477944433689117,
-0.5293524861335754,
0.09171731770038605,
0.460917592048645,
-0.23072689771652222,
-0.05105337128043175,
0.4078032672405243,
-0.07364818453788757,
0.17402350902557373,
0.0477648563683033,
0.42295441031455994,
0.10436494648456573,
-0.3273545503616333,
-0.17451035976409912,
-0.34333497285842896
] |
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.3775414526462555,
-0.10952422022819519,
0.0013313631061464548,
0.2857869267463684,
0.25839200615882874,
0.13189703226089478,
-0.07236940413713455,
-0.09192659705877304,
-0.04141371324658394,
-0.07030738890171051,
-0.05451168492436409,
0.26995858550071716,
0.023235876113176346,
0.07323310524225235,
0.1965220868587494,
0.2476300448179245,
0.26209506392478943,
0.21151673793792725,
-0.4262388050556183,
-0.05111543834209442,
-0.2185807079076767,
-0.140591561794281,
-0.004783791955560446,
-0.28657785058021545,
-0.22525979578495026,
-0.35676440596580505,
-0.0927874818444252,
0.07167597115039825,
0.21636854112148285,
0.08951311558485031,
0.19704459607601166,
0.1367613673210144,
0.21895942091941833,
0.3962480127811432,
-0.0001211941271321848,
0.040428321808576584,
-0.33169329166412354,
-0.11564642190933228,
-0.3154456615447998,
-0.05379752069711685,
0.00012864492600783706,
-0.21202486753463745,
0.05257909744977951,
-0.281684935092926,
-0.04688839241862297,
0.006446417421102524,
-0.10754107683897018,
-0.3362383246421814,
0.5601175427436829,
-0.2909078299999237,
0.06847024708986282,
-0.12584352493286133,
-0.3435741066932678,
0.14751988649368286,
-0.2772861421108246,
0.33504560589790344,
0.13800907135009766,
-0.10395526885986328,
-0.08013355731964111,
0.34435999393463135,
0.015506255440413952,
0.24345123767852783,
-0.274949312210083,
-0.18670395016670227,
0.36309152841567993,
-0.03993452340364456,
0.05853535234928131,
-0.2551787197589874,
0.21353594958782196,
-0.050243087112903595,
0.7311309576034546,
-0.4320094883441925,
-0.25791361927986145,
-0.2524377405643463,
0.06725999712944031,
-0.060898423194885254,
0.18811890482902527,
0.26485350728034973,
0.10209650546312332,
0.1773751974105835,
-0.6674371957778931,
-0.7337230443954468,
-0.025395266711711884,
0.13377279043197632,
-0.016303295269608498,
-0.5745207667350769,
0.0006100570317357779,
0.14879104495048523,
0.06244350224733353,
0.2391049563884735,
0.486616849899292,
-0.23711180686950684,
-0.3087269067764282,
0.19659902155399323,
-0.3022063970565796,
-0.18647021055221558,
-0.22561508417129517,
0.23952220380306244,
-0.10681087523698807,
0.16157908737659454,
0.07342378050088882,
-0.04339076578617096,
-0.38523656129837036,
0.12986747920513153,
0.14770908653736115,
0.32104799151420593,
0.15081213414669037,
0.2113257348537445,
0.10894594341516495,
-0.11712951213121414,
-0.2213822901248932,
-0.07700604200363159,
0.2559014856815338,
0.075555719435215,
0.6239591240882874,
-0.2735370397567749,
0.17770503461360931,
0.02218538150191307,
0.17906047403812408,
0.016073672100901604,
0.14828932285308838,
-0.038849715143442154,
-0.1566101312637329,
0.340157687664032,
0.04541953280568123,
0.17250917851924896,
0.18150343000888824,
0.15426865220069885,
-0.060007963329553604,
-0.14816875755786896,
-0.1722119152545929,
-0.14594559371471405,
-0.29521796107292175,
0.45292341709136963,
0.16972264647483826,
-0.007034559268504381,
0.0887548103928566,
0.4451128840446472,
-0.43222418427467346,
-0.12009026855230331,
-0.023344846442341805,
-0.1521676629781723,
0.4138382077217102,
0.23239703476428986,
0.13514761626720428,
0.2169102132320404,
-0.030757736414670944,
0.028732577338814735,
-0.086979441344738,
0.6420636177062988,
-0.31595173478126526,
-0.15361681580543518,
0.21987813711166382,
0.08554704487323761,
-0.20152585208415985,
0.13202758133411407,
-0.6194602251052856,
0.1727582961320877,
0.2716607451438904,
-0.13686949014663696,
0.15670588612556458,
0.046191856265068054,
-0.3810898959636688,
-0.2422451674938202,
-0.09710989147424698,
0.34061530232429504,
-0.42462876439094543,
-0.21635141968727112,
0.25471341609954834,
-0.12894976139068604,
-0.22419136762619019,
0.26471325755119324,
-0.2679210603237152,
0.22540509700775146,
-0.23470710217952728,
-0.34675219655036926,
0.5462707281112671,
0.055227212607860565,
-0.3988834023475647,
0.08374442160129547,
0.05449488386511803,
-0.045362889766693115,
-0.0010167340515181422,
0.5464829802513123,
0.16742047667503357,
-0.13078130781650543,
-0.5164812803268433,
0.3973064124584198,
0.1192878931760788,
0.1762741655111313,
0.03911161422729492,
-0.15148571133613586,
0.26103314757347107,
-0.2685464918613434,
-0.08253393322229385,
0.43039706349372864,
0.29137900471687317,
0.2922711670398712,
0.21428655087947845,
0.02263733744621277,
0.189432755112648,
0.3739200532436371,
-0.18425482511520386,
0.1289743036031723,
-0.12209311872720718,
0.13271087408065796,
-0.6422827243804932,
0.00011537508544279262,
0.1669115573167801,
-0.628580629825592,
0.23269864916801453,
-0.08321311324834824,
0.024500379338860512,
-0.15356385707855225,
-0.024239325895905495,
0.06090507283806801,
-0.10612960159778595,
0.019947214052081108,
-0.05055118352174759,
-0.22838947176933289,
-0.24817369878292084,
0.6387432813644409,
-0.029980571940541267,
0.1081739291548729,
-0.6304486989974976,
0.3527703285217285,
0.25141042470932007,
-0.24752862751483917,
-0.3831179738044739,
-0.12129151821136475,
0.20036903023719788,
-0.09780334681272507,
-0.21136416494846344,
0.4761020243167877,
0.22510430216789246,
0.3998030424118042,
0.006494744680821896,
0.25754663348197937,
0.05051412433385849,
0.0444830097258091,
0.21049298346042633,
-0.1847689300775528,
0.08736161887645721,
-0.09541560709476471,
-0.17553740739822388,
0.019160443916916847,
-0.20413699746131897,
0.07820212095975876,
0.10501448065042496,
-0.20453667640686035,
0.10931996256113052,
-0.29500114917755127,
0.011604243889451027,
-0.23389823734760284,
-0.3099155128002167,
0.14548398554325104,
0.3009774684906006,
0.11183445155620575,
-0.08312626928091049,
-0.18306520581245422,
0.235820934176445,
-0.2309437245130539,
-0.02702803537249565,
0.0012547234073281288,
-0.3378605842590332,
-0.052565690129995346,
-0.13863632082939148,
0.5303159356117249,
0.19115352630615234,
0.06689327210187912,
-0.015223640948534012,
0.12227027863264084,
0.1313403844833374,
-0.03623959794640541,
-0.008472485467791557,
0.00714573310688138,
0.41043561697006226,
0.21278202533721924,
-0.06096627190709114,
0.10459814965724945,
-0.11689938604831696,
0.4943222105503082,
0.14551834762096405,
-0.13046303391456604,
-0.3501492440700531,
0.10025545954704285,
-0.15535962581634521,
0.007296921219676733,
-0.31883132457733154,
-0.09770847111940384,
-0.2095629721879959,
0.10840979963541031,
-0.26987889409065247,
0.7121253609657288,
0.2677806615829468,
0.21807725727558136,
0.1329808086156845,
0.10297756642103195,
-0.07106201350688934,
-0.4081364870071411,
-0.09470326453447342,
-0.07534358650445938,
-0.041188884526491165,
-0.08888226747512817,
0.035381682217121124,
-0.0306447371840477,
0.38857945799827576,
-0.11652307957410812,
0.10273953527212143,
-0.4580661356449127,
0.07158321887254715,
-0.08045684546232224,
0.10026410967111588,
0.12043283134698868,
-0.2551061809062958,
0.24486717581748962,
-0.4125896096229553,
0.0325445830821991,
-0.10878779739141464,
-0.4531969428062439,
-0.19317255914211273,
0.045940667390823364,
0.054022837430238724,
0.13994848728179932,
0.03385902941226959,
-0.17221088707447052,
-0.015442212112247944,
-0.03751010075211525,
-0.16209028661251068,
-0.16273196041584015,
0.05639617517590523,
0.16280971467494965,
0.07242835313081741,
-0.3136124610900879,
0.16135703027248383,
0.135917067527771,
-0.3148086965084076,
-0.6189990639686584,
0.36671775579452515,
0.12393707782030106,
-0.13686297833919525,
0.24166204035282135,
-0.11942165344953537,
-0.05199246481060982,
0.5253451466560364,
-0.6610503792762756,
-0.05363154783844948,
0.027838651090860367,
0.14800319075584412,
-0.3420061767101288,
0.36857056617736816,
0.36708518862724304,
0.05876985937356949,
0.01755785197019577,
-0.07956741750240326,
-0.21936778724193573,
0.03554317355155945,
0.19816705584526062,
0.3416229486465454,
-0.14889030158519745,
0.16826790571212769,
-0.012552200816571712,
0.35556313395500183,
-0.005212096497416496,
-0.187668576836586,
0.3496347963809967,
0.27601900696754456,
0.514116108417511,
-0.18929728865623474,
-0.1055220440030098,
-0.5744799375534058,
-0.17700719833374023,
-0.1977819949388504,
0.030764231458306313,
0.10370448976755142,
-0.045498013496398926,
-0.13610513508319855,
-0.1728491634130478,
-0.3196503221988678,
-0.1677066534757614,
0.02158660627901554,
-0.380264014005661,
0.3766799867153168,
0.12586821615695953,
0.22622007131576538,
0.04659022018313408,
-0.1971980780363083,
-0.006937691941857338,
0.2207195907831192,
0.32635974884033203,
0.07621323317289352,
-0.1963421106338501,
0.05602659285068512,
0.034176915884017944,
0.24277353286743164,
-0.15561829507350922,
-0.02940594032406807,
0.1411687135696411,
-0.10309723764657974,
0.03892628848552704,
0.3316906988620758,
0.7368651032447815,
0.09185341745615005,
0.093449667096138,
0.07272318750619888,
-0.37027421593666077,
-0.2972920536994934,
-0.018583785742521286,
0.051749520003795624,
-0.210895836353302,
-0.10651032626628876,
0.6030526757240295,
0.18971741199493408,
-0.0930284708738327,
-0.3880620300769806,
0.4908541440963745,
-0.352110892534256,
-0.4243789613246918,
-0.11214244365692139,
-0.07849510759115219,
-0.4928719699382782,
-0.19604460895061493,
-0.3165833055973053,
-0.1781640350818634,
-0.11995713412761688,
0.018413200974464417,
-0.31976285576820374,
-0.11780112236738205,
0.03561139479279518,
-0.155890092253685,
0.3335534632205963,
0.3068920373916626,
0.08242529630661011,
0.10434036701917648,
0.1859697550535202,
0.05674339830875397,
0.3127235174179077,
-0.1555325984954834,
-0.05306049808859825,
-0.17019522190093994,
0.20262691378593445,
0.06485478579998016,
0.07028307020664215,
-0.00583526398986578,
-0.03076544590294361,
-0.13826149702072144,
-0.2153838723897934,
-0.26128411293029785,
-0.010475525632500648,
-0.22100387513637543,
-0.022710248827934265,
-0.17553265392780304,
-0.48747530579566956,
0.45631808042526245,
-0.10107377916574478,
-0.1883666217327118,
-0.1476009488105774,
-0.07018619030714035,
-0.30304786562919617,
0.16354802250862122,
0.1351788192987442,
0.8293331265449524,
-0.008127500303089619,
0.15648017823696136,
0.06352728605270386,
-0.10721838474273682,
0.025615239515900612,
-0.13223133981227875,
-0.0666988343000412,
-0.3328026533126831,
-0.29062727093696594,
-0.18256761133670807,
-0.18342655897140503,
-0.018611690029501915,
0.3404778838157654,
-0.3613785207271576,
0.36384639143943787,
-0.25236189365386963,
-0.01291836891323328,
-0.06844062358140945,
-0.006190778687596321,
-0.08278868347406387,
-0.23925547301769257,
-0.12050042301416397,
0.0178153645247221,
-0.12636134028434753,
0.020651869475841522,
-0.017056969925761223,
0.13298189640045166,
0.16538670659065247,
0.08834467828273773,
0.36027446389198303,
0.08598478138446808,
-0.06145292520523071,
0.3906385898590088,
-0.16731345653533936,
-0.40164414048194885,
-0.10591506212949753,
0.6008498668670654,
0.4341290295124054,
0.05104723945260048,
0.09762141853570938,
-0.03499376401305199,
0.04908602684736252,
0.2996874153614044,
-0.1671099215745926,
-0.029814554378390312,
0.4338352084159851,
0.23777788877487183,
-0.008645948953926563,
0.011346595361828804,
-0.10013958811759949,
-0.13905330002307892,
-0.01756744273006916,
-0.06503650546073914,
0.04465716704726219,
-0.3660848140716553,
0.04717095568776131,
0.265533983707428,
0.3460139036178589,
0.03434697911143303,
0.007505239453166723,
0.07994645088911057,
0.0904640331864357,
0.3925037682056427,
0.036148447543382645,
-0.3290793299674988,
0.05187201499938965,
0.5086252689361572,
0.18465912342071533,
-0.09788443893194199,
0.28652113676071167,
-0.2758655846118927,
0.02421795204281807,
-0.1840948611497879,
0.4132816195487976,
0.03703762963414192,
-0.20014351606369019,
0.1599382907152176,
0.09372329711914062,
0.4384002089500427,
0.014928578399121761,
-0.1348424106836319,
0.04533643275499344,
0.002242439426481724,
0.012986945919692516,
-0.05730174109339714,
-0.31638216972351074,
0.1181783452630043,
0.24677065014839172,
0.3534676432609558,
0.35820651054382324,
-0.2377297729253769,
-0.009120652452111244,
0.4705204665660858,
-0.1857517659664154,
0.13024471700191498,
0.35190626978874207,
0.3294470012187958,
0.2843284606933594,
0.12919510900974274,
-0.2915623188018799,
-0.34963467717170715,
-0.06220441684126854,
-0.22978578507900238,
-0.3173734247684479,
-0.1254490166902542,
0.0059908125549554825,
0.17603066563606262,
-0.05344415083527565,
0.15711772441864014,
-0.3403254449367523,
-0.4503932297229767,
0.27656081318855286,
-0.2510400414466858,
0.13607248663902283,
0.17085866630077362,
0.08420494943857193,
0.12725085020065308,
0.19555824995040894,
0.43484798073768616,
-0.2793291509151459,
-0.020502910017967224,
-0.20999307930469513,
0.08227760344743729,
-0.13716818392276764,
-0.047650787979364395,
0.06809435039758682,
-0.11273159086704254,
-0.5614902973175049,
0.007176945451647043,
0.7099937200546265,
0.14698950946331024,
0.08457392454147339,
-0.22616706788539886,
0.030661512166261673,
0.15498290956020355,
0.24252083897590637,
0.02659468911588192,
-0.2630414366722107,
-0.3262079358100891,
0.3222833275794983,
0.10722334682941437,
0.0007809497183188796,
-0.11873796582221985,
0.26671454310417175,
-0.10833259671926498,
-0.2915617823600769,
0.1660127490758896,
0.11827293783426285,
0.04919964820146561,
-0.1892530620098114,
0.08280587196350098,
0.4146968126296997,
-0.21380217373371124,
0.3286815285682678,
0.5098992586135864,
-0.21692760288715363,
0.05001296103000641,
0.13840700685977936,
0.34383341670036316,
-0.1801339089870453,
0.4385669231414795,
0.02276553027331829,
0.48022499680519104,
-0.004278180655092001,
0.0963330790400505,
-0.04118002578616142,
-0.4797661006450653,
0.08668545633554459,
0.06853550672531128,
-0.26143279671669006,
0.09010965377092361,
0.0387505479156971,
0.004292546771466732,
0.1711467206478119,
-0.39643925428390503,
-0.1746976226568222,
0.4800513982772827,
-0.1526479572057724,
0.09491898864507675,
0.10180837661027908,
-0.11124633997678757,
0.2824839651584625,
0.2111828476190567,
-0.05955075845122337,
-0.2754020392894745,
0.4276595413684845,
0.16970714926719666,
-0.04299207776784897,
0.06445903331041336,
0.09705634415149689,
0.1154237911105156,
-0.11765799671411514,
-0.1695508360862732,
0.08830565214157104,
-0.10255154222249985,
0.08091895282268524,
0.02689650095999241,
-0.00968965794891119,
-0.211014062166214,
0.09879245609045029,
0.08454620093107224,
0.3834227919578552,
0.30577343702316284,
-0.023361189290881157,
0.16607023775577545,
0.16435706615447998,
-0.15702369809150696,
-0.01902533695101738,
0.14024554193019867,
-0.0021698472555726767,
0.04489772394299507,
0.21790538728237152,
-0.03003828041255474,
0.44003525376319885,
-0.37978076934814453,
0.23819459974765778,
0.3017781674861908,
-0.1042671874165535,
-0.16339458525180817,
0.05791126564145088,
0.10838029533624649,
0.033422309905290604,
0.5928040146827698,
-0.36716189980506897,
-0.024095626547932625,
0.03838537633419037,
0.0305531844496727,
0.06659063696861267,
0.47133758664131165,
0.27558618783950806,
-0.32694584131240845,
-0.2479608803987503,
-0.14929348230361938,
-0.5072793960571289,
-0.05646563693881035,
0.34513381123542786,
0.3302530348300934,
-0.3488495349884033,
0.09018354117870331,
0.09226886183023453,
0.22554849088191986,
-0.005446106195449829,
-0.1682601273059845,
0.17589755356311798,
0.32265505194664,
0.04734206199645996,
-0.2322092354297638,
-0.022588355466723442,
0.2931555211544037,
-0.11412566900253296,
-0.1815202832221985,
0.11771190911531448,
0.14786934852600098,
-0.017084822058677673,
0.177773579955101,
0.14910921454429626,
-0.06927061080932617,
0.3727116882801056,
0.5638623237609863,
0.012229511514306068,
0.08368765562772751,
-0.10309822112321854,
0.3902328610420227,
0.3161497712135315,
-0.14954864978790283,
-0.05360877513885498,
-0.14879336953163147,
0.0682305097579956,
0.1575758010149002,
-0.5072299838066101,
0.2509380578994751,
-0.1679805964231491,
-0.2084989845752716,
0.09727510809898376,
0.1540711671113968,
-0.44134843349456787,
-0.08456574380397797,
0.01008822675794363,
0.19329524040222168,
0.059962522238492966,
0.35462430119514465,
0.031932782381772995,
0.4073849022388458,
-0.16564087569713593,
-0.14172346889972687,
0.3911104202270508,
-0.1909821778535843,
-0.29342809319496155,
-0.10841728746891022,
0.2496725618839264,
-0.12436911463737488,
-0.1343962550163269,
-0.34101420640945435,
0.10879840701818466,
0.4196593761444092,
-0.27538561820983887,
-0.012733254581689835,
0.43818825483322144,
-0.14234507083892822,
0.1340463012456894,
0.006905188784003258,
0.5526455044746399,
0.10680542141199112,
-0.2677080035209656,
-0.0825621709227562,
-0.2169015109539032
] |
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.310508131980896,
-0.06806229054927826,
0.004688459448516369,
0.21374262869358063,
0.30936986207962036,
0.09057606011629105,
-0.03542681783437729,
0.052789073437452316,
-0.07327675074338913,
0.006163087673485279,
0.022279484197497368,
0.3242504596710205,
0.08983757346868515,
0.10398785024881363,
0.1767604947090149,
0.2547084391117096,
0.25003325939178467,
0.19376231729984283,
-0.33405041694641113,
-0.026814449578523636,
-0.22936400771141052,
-0.11293017864227295,
0.10871085524559021,
-0.2835572063922882,
-0.3304685950279236,
-0.3502228856086731,
-0.0617360845208168,
0.06746325641870499,
0.10107482224702835,
0.0025962551590055227,
0.16506341099739075,
0.1604156494140625,
0.2431449592113495,
0.28901001811027527,
-0.00011890222231158987,
0.003665076568722725,
-0.27938780188560486,
-0.09141143411397934,
-0.3182115852832794,
-0.06279093772172928,
0.0237713810056448,
-0.16877590119838715,
0.06436236947774887,
-0.2784348130226135,
-0.02687339298427105,
0.042244452983140945,
-0.13028381764888763,
-0.20418080687522888,
0.629493772983551,
-0.20928600430488586,
0.12258808314800262,
-0.14593619108200073,
-0.18162302672863007,
0.026853470131754875,
-0.23283687233924866,
0.2694655656814575,
0.05544117093086243,
0.03937385231256485,
0.039252784103155136,
0.3304746150970459,
-0.08966770023107529,
0.22549934685230255,
-0.3003200888633728,
-0.23343586921691895,
0.4113830626010895,
-0.061823587864637375,
0.17703402042388916,
-0.3527986407279968,
0.17960485816001892,
-0.040753234177827835,
0.8042438626289368,
-0.3945489823818207,
-0.22021576762199402,
-0.27045854926109314,
0.07716505229473114,
-0.1269112378358841,
0.18843266367912292,
0.09272600710391998,
0.07419507205486298,
0.13566109538078308,
-0.5429515838623047,
-0.8058208227157593,
-0.07928245514631271,
0.04397314786911011,
0.08491963148117065,
-0.5327280759811401,
-0.02863130159676075,
0.11435990780591965,
0.2698809504508972,
0.28035470843315125,
0.5117335319519043,
-0.1818695217370987,
-0.25727805495262146,
0.11778586357831955,
-0.29568472504615784,
-0.29796165227890015,
-0.21018585562705994,
0.20073802769184113,
-0.03704889863729477,
0.2396807223558426,
0.13173066079616547,
-0.04412425309419632,
-0.2862706184387207,
0.07306341826915741,
0.13369092345237732,
0.33492329716682434,
0.07645805180072784,
0.11151347309350967,
0.09284234791994095,
0.0828305333852768,
-0.19143196940422058,
-0.08878776431083679,
0.3011986017227173,
-0.025359364226460457,
0.6220219135284424,
-0.2496524453163147,
0.3028307259082794,
-0.08097387105226517,
0.13197562098503113,
0.019802242517471313,
0.1669227033853531,
-0.030759073793888092,
-0.14100486040115356,
0.2388070970773697,
0.126076340675354,
0.23848506808280945,
0.162521630525589,
0.22771525382995605,
-0.08907638490200043,
-0.09524986147880554,
-0.1974940001964569,
-0.042026862502098083,
-0.29912906885147095,
0.4488774836063385,
0.1797115057706833,
-0.0550355426967144,
0.062302060425281525,
0.4448396563529968,
-0.42687129974365234,
-0.13617120683193207,
-0.05581051483750343,
-0.20858053863048553,
0.3360283672809601,
0.20151081681251526,
0.10506227612495422,
0.20187179744243622,
-0.020575614646077156,
-0.06198517978191376,
-0.08048874884843826,
0.6188936829566956,
-0.4360116124153137,
-0.2547794282436371,
0.07202807813882828,
0.13309697806835175,
-0.12926296889781952,
0.1620909869670868,
-0.6500721573829651,
0.14816290140151978,
0.18233878910541534,
-0.16033747792243958,
0.22861650586128235,
0.07850533723831177,
-0.37905970215797424,
-0.2501145303249359,
-0.07686242461204529,
0.2681688666343689,
-0.3776041269302368,
-0.09197363257408142,
0.14218278229236603,
-0.19087350368499756,
-0.07864253222942352,
0.23381944000720978,
-0.32301220297813416,
0.25654977560043335,
-0.2728489637374878,
-0.29511478543281555,
0.5308728814125061,
0.10956891626119614,
-0.4193349778652191,
0.16070951521396637,
-0.04158123582601547,
-0.06763388961553574,
0.018784957006573677,
0.5070462226867676,
0.12845450639724731,
-0.21252362430095673,
-0.31084761023521423,
0.24781759083271027,
0.10980679839849472,
0.0558849535882473,
-0.0957123190164566,
-0.17687362432479858,
0.23560461401939392,
-0.29864582419395447,
-0.06147357076406479,
0.4517143964767456,
0.2861815094947815,
0.4201846420764923,
0.21126540005207062,
0.009220165200531483,
0.09904090315103531,
0.37046295404434204,
-0.07464011758565903,
-0.05217701196670532,
-0.22539551556110382,
0.20607738196849823,
-0.6755853295326233,
0.04093005880713463,
0.179238960146904,
-0.605893611907959,
0.3495005667209625,
-0.12510888278484344,
-0.010067091323435307,
-0.20554649829864502,
-0.06848298758268356,
0.02865609899163246,
-0.04679466411471367,
0.0033019923139363527,
-0.03532126545906067,
-0.16372233629226685,
-0.2710679769515991,
0.5333384871482849,
-0.08458159118890762,
0.07584400475025177,
-0.6207577586174011,
0.3459843099117279,
0.13164635002613068,
-0.1627102792263031,
-0.3209209442138672,
-0.0708475112915039,
0.2944808900356293,
0.022220872342586517,
-0.1368243545293808,
0.3887176811695099,
0.19619432091712952,
0.4301019310951233,
0.0012597928289324045,
0.2552747428417206,
0.0939522385597229,
-0.04226455092430115,
0.09797556698322296,
-0.1994079053401947,
0.11120760440826416,
-0.13044072687625885,
-0.1259731948375702,
-0.056881774216890335,
-0.22362996637821198,
0.06193595379590988,
0.04391741007566452,
-0.21454687416553497,
0.04352154955267906,
-0.34178873896598816,
0.02636668086051941,
-0.20485848188400269,
-0.21585200726985931,
0.1839471161365509,
0.3429165780544281,
0.1599927842617035,
-0.16570733487606049,
-0.10385201871395111,
0.22462864220142365,
-0.2585546374320984,
-0.08392834663391113,
0.06092790141701698,
-0.14971362054347992,
-0.09677435457706451,
-0.15955990552902222,
0.5698388814926147,
0.17994324862957,
0.07228977978229523,
0.09528915584087372,
0.13224494457244873,
0.0780080109834671,
-0.07570026814937592,
0.006311729550361633,
-0.009838669560849667,
0.5663112998008728,
0.2622886002063751,
-0.03510294109582901,
0.11737029254436493,
-0.15125715732574463,
0.4364984929561615,
0.15876609086990356,
-0.0320274718105793,
-0.33392199873924255,
0.09730339050292969,
-0.12079858034849167,
0.043615031987428665,
-0.37936457991600037,
-0.11524353921413422,
-0.253418505191803,
0.06178799271583557,
-0.17072315514087677,
0.7472002506256104,
0.242815300822258,
0.14776407182216644,
0.010200791992247105,
0.10778709501028061,
-0.12988829612731934,
-0.37671083211898804,
-0.1586436927318573,
0.10136246681213379,
-0.019138608127832413,
-0.05152065306901932,
0.1256587654352188,
-0.08107268065214157,
0.38478532433509827,
-0.044968295842409134,
-0.018450306728482246,
-0.5178279876708984,
0.07051058113574982,
-0.06712749600410461,
0.07220476865768433,
0.09668423235416412,
-0.1959408074617386,
0.18189698457717896,
-0.3614749312400818,
-0.06633970886468887,
-0.1263326108455658,
-0.4590773582458496,
-0.18059463798999786,
0.05638710781931877,
0.0017034686170518398,
0.2645663321018219,
-0.06022303178906441,
-0.23893427848815918,
0.01970362290740013,
-0.06042728200554848,
-0.18623387813568115,
-0.21047362685203552,
0.06634784489870071,
0.06242992728948593,
0.13084544241428375,
-0.2201140820980072,
0.2857634723186493,
0.0032418996561318636,
-0.3236319124698639,
-0.6576061844825745,
0.42790287733078003,
0.177945077419281,
-0.20014126598834991,
0.3122069835662842,
-0.11042650789022446,
-0.02697342075407505,
0.4068782329559326,
-0.5890814065933228,
-0.19383685290813446,
0.00838891789317131,
0.1047084704041481,
-0.41421830654144287,
0.2215416133403778,
0.3652362525463104,
-0.02052408643066883,
-0.04214292764663696,
-0.037371620535850525,
-0.2552672326564789,
0.09538763016462326,
0.15433953702449799,
0.4772270917892456,
-0.2085595726966858,
0.232204869389534,
0.03582652658224106,
0.38596174120903015,
-0.05119560658931732,
-0.04701748117804527,
0.3821452558040619,
0.26321089267730713,
0.5747002959251404,
-0.2582438886165619,
-0.13345612585544586,
-0.5062971711158752,
-0.2519562840461731,
-0.30961906909942627,
-0.0341155081987381,
-0.04070034623146057,
-0.06765498965978622,
-0.12603476643562317,
-0.2426857203245163,
-0.21787980198860168,
-0.1950589269399643,
0.07970517873764038,
-0.28898268938064575,
0.32724517583847046,
0.0038288463838398457,
0.19084908068180084,
0.18681561946868896,
-0.20612874627113342,
-0.013895693235099316,
0.21371762454509735,
0.3998018503189087,
0.08000713586807251,
-0.32756316661834717,
0.014029000885784626,
-0.28690576553344727,
0.20754610002040863,
-0.20995928347110748,
0.003059332026168704,
0.0532289557158947,
-0.013841480948030949,
0.08948162943124771,
0.20360979437828064,
0.7742394804954529,
0.15491296350955963,
0.14211773872375488,
0.16299539804458618,
-0.4092796742916107,
-0.21157041192054749,
0.0028168822173029184,
0.09951859712600708,
-0.2312847375869751,
-0.14083442091941833,
0.6834015250205994,
0.13785472512245178,
-0.11648258566856384,
-0.4072922468185425,
0.4617176353931427,
-0.2899160385131836,
-0.2482810765504837,
-0.16480353474617004,
-0.2642419934272766,
-0.49462786316871643,
-0.14943890273571014,
-0.22425463795661926,
-0.10948415100574493,
-0.19167470932006836,
0.1237001121044159,
-0.19405649602413177,
-0.1066662147641182,
0.056227732449769974,
-0.18359996378421783,
0.3257080018520355,
0.30641406774520874,
0.027938228100538254,
0.16402679681777954,
0.18483290076255798,
0.13145723938941956,
0.30278000235557556,
-0.11241080611944199,
-0.037294842302799225,
-0.07904112339019775,
0.14096012711524963,
0.07190493494272232,
0.1694459766149521,
0.006110654212534428,
0.017624426633119583,
-0.011918500997126102,
-0.17467783391475677,
-0.28524982929229736,
-0.07221338152885437,
-0.14549390971660614,
-0.1713913232088089,
-0.29366761445999146,
-0.43445149064064026,
0.5158485770225525,
-0.0422947034239769,
-0.1093987375497818,
-0.1100788488984108,
-0.10759863257408142,
-0.29394257068634033,
0.1297605335712433,
0.22622597217559814,
0.9243398904800415,
0.08838621526956558,
0.1814991533756256,
0.08760876953601837,
-0.17217396199703217,
0.016708141192793846,
-0.0423724539577961,
-0.04632211849093437,
-0.30260467529296875,
-0.36573195457458496,
-0.17605909705162048,
-0.14439590275287628,
0.04777013882994652,
0.2639947831630707,
-0.31155094504356384,
0.33572348952293396,
-0.290937215089798,
-0.10348185151815414,
-0.10468928515911102,
-0.007561239879578352,
-0.2122485339641571,
-0.24587345123291016,
-0.2050826996564865,
0.03132498636841774,
-0.15154841542243958,
-0.027383748441934586,
-0.031810492277145386,
-0.004562939051538706,
0.26498836278915405,
-0.0017583600711077452,
0.35586050152778625,
0.15692660212516785,
-0.08030708879232407,
0.298988401889801,
-0.1692281812429428,
-0.4347158670425415,
-0.053097326308488846,
0.5133095979690552,
0.49146386981010437,
0.01123671792447567,
0.009452711790800095,
-0.055323049426078796,
-0.02351529523730278,
0.35989999771118164,
-0.181090846657753,
-0.19407157599925995,
0.48623207211494446,
0.08695363998413086,
-0.05904063582420349,
0.049781523644924164,
-0.04200194031000137,
-0.2919214367866516,
-0.04743047058582306,
-0.1287676841020584,
0.13257774710655212,
-0.2795439660549164,
-0.04591292515397072,
0.28948459029197693,
0.2738040089607239,
-0.07426345348358154,
0.05402537062764168,
0.08345479518175125,
0.0090323556214571,
0.32218921184539795,
-0.04526577144861221,
-0.31516382098197937,
0.054315876215696335,
0.5431886911392212,
0.1804056167602539,
-0.0464722141623497,
0.33601734042167664,
-0.3092154562473297,
0.052300263196229935,
-0.20455989241600037,
0.3989337086677551,
0.17329005897045135,
-0.14321063458919525,
0.1380077600479126,
0.020450612530112267,
0.4439571499824524,
-0.03113492950797081,
-0.024284888058900833,
0.09927042573690414,
-0.008416088297963142,
0.11964014172554016,
-0.04809634014964104,
-0.39145907759666443,
0.13006901741027832,
0.24585159122943878,
0.38180819153785706,
0.32046619057655334,
-0.1763053983449936,
0.0028132081497460604,
0.38040417432785034,
-0.21883128583431244,
0.15833553671836853,
0.28091442584991455,
0.20719964802265167,
0.22060319781303406,
0.11623790115118027,
-0.26570719480514526,
-0.3280177712440491,
-0.051455236971378326,
-0.15947586297988892,
-0.30512458086013794,
-0.16521500051021576,
-0.030293019488453865,
0.136443629860878,
-0.03757724538445473,
0.18995489180088043,
-0.2565508484840393,
-0.4506433606147766,
0.26777902245521545,
-0.12954579293727875,
0.1429375410079956,
0.2473306804895401,
0.20512308180332184,
0.1521453857421875,
0.06534658372402191,
0.4487794041633606,
-0.23289625346660614,
-0.11850548535585403,
-0.21050940454006195,
0.12331853806972504,
-0.02070898376405239,
-0.00224172486923635,
0.05803227424621582,
-0.14826150238513947,
-0.5246189832687378,
-0.06721894443035126,
0.5569462180137634,
0.1424942910671234,
-0.07652102410793304,
-0.2013106644153595,
0.006891057826578617,
0.21397048234939575,
0.21155233681201935,
0.05104941502213478,
-0.3432707190513611,
-0.2787158191204071,
0.34320467710494995,
0.14426609873771667,
-0.016044558957219124,
-0.22548110783100128,
0.24616393446922302,
-0.18069565296173096,
-0.30619582533836365,
0.1442253142595291,
0.17676377296447754,
-0.05856887996196747,
-0.27548569440841675,
0.1589037925004959,
0.2719603180885315,
-0.3255970776081085,
0.3828687369823456,
0.5380004644393921,
-0.25912532210350037,
0.009626107290387154,
0.22572211921215057,
0.2819714844226837,
-0.1335763931274414,
0.42693108320236206,
0.009850171394646168,
0.5303926467895508,
-0.03958253934979439,
0.13323166966438293,
-0.06337355822324753,
-0.4151788651943207,
0.07029572129249573,
0.16498889029026031,
-0.27665919065475464,
0.06005583330988884,
0.024320904165506363,
-0.09798017144203186,
0.14325900375843048,
-0.4174816608428955,
-0.15071211755275726,
0.4192143380641937,
-0.2484191507101059,
0.10742577165365219,
0.057975683361291885,
-0.11203992366790771,
0.28260213136672974,
0.2744210362434387,
-0.053619854152202606,
-0.22684119641780853,
0.4427158534526825,
0.12553933262825012,
-0.19133220613002777,
0.204438254237175,
0.1249772161245346,
0.15889722108840942,
-0.09931236505508423,
-0.11698345839977264,
0.11477196216583252,
-0.08488579094409943,
-0.0037676766514778137,
0.029174355790019035,
0.02987905777990818,
-0.1809430569410324,
0.1118035763502121,
0.16769731044769287,
0.2783719003200531,
0.30594706535339355,
-0.02288656309247017,
0.16799266636371613,
0.0827450081706047,
-0.02561524137854576,
-0.03377033397555351,
0.21223294734954834,
0.013703703880310059,
0.014026708900928497,
0.31183770298957825,
-0.03626154363155365,
0.4630795121192932,
-0.34196507930755615,
0.20628899335861206,
0.4129408299922943,
-0.10740017145872116,
-0.14851966500282288,
0.09045706689357758,
0.12784036993980408,
-0.03781094402074814,
0.5705617666244507,
-0.2957131564617157,
-0.016077300533652306,
0.012491855770349503,
0.03952554985880852,
0.123050257563591,
0.43322649598121643,
0.21280327439308167,
-0.4697759747505188,
-0.28234779834747314,
-0.16648969054222107,
-0.6273467540740967,
-0.05089962109923363,
0.325365275144577,
0.3701801002025604,
-0.22585618495941162,
0.11184316873550415,
0.0707370862364769,
0.20985445380210876,
0.036916472017765045,
-0.23511120676994324,
0.15032640099525452,
0.2999604642391205,
0.12349234521389008,
-0.1595018208026886,
0.05034611001610756,
0.2770724296569824,
-0.13497667014598846,
-0.23883990943431854,
0.17247773706912994,
0.1970546692609787,
-0.014319187961518764,
0.21372678875923157,
0.13892127573490143,
-0.15568238496780396,
0.4832547605037689,
0.5390317440032959,
0.13823267817497253,
0.05344153940677643,
-0.18222835659980774,
0.3323271572589874,
0.27971151471138,
-0.05815219134092331,
-0.16947224736213684,
-0.17954620718955994,
0.074641652405262,
0.1931522637605667,
-0.3903319537639618,
0.3852839469909668,
-0.26981642842292786,
-0.008045339956879616,
0.07300563901662827,
0.12109646946191788,
-0.5197297930717468,
0.020904934033751488,
0.13112537562847137,
0.17183148860931396,
0.17206242680549622,
0.4176315367221832,
0.04504377394914627,
0.35358959436416626,
-0.2674762010574341,
-0.15314887464046478,
0.4640333354473114,
-0.1586669683456421,
-0.3031260371208191,
-0.15872077643871307,
0.3097462058067322,
0.02694576606154442,
-0.06417226791381836,
-0.36602839827537537,
0.021053405478596687,
0.3587176501750946,
-0.26715871691703796,
-0.026952432468533516,
0.5555729866027832,
-0.20377600193023682,
0.15760381519794464,
0.08783387392759323,
0.5945925116539001,
0.09697536379098892,
-0.30531829595565796,
-0.08827928453683853,
-0.3290877938270569
] |
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.3007220923900604,
-0.06920696794986725,
-0.005488774739205837,
0.2683241069316864,
0.18687587976455688,
0.08930063247680664,
-0.09074196964502335,
-0.050216589123010635,
-0.09361164271831512,
-0.029689237475395203,
0.08453046530485153,
0.39229440689086914,
0.09210673719644547,
0.20100516080856323,
0.1915559470653534,
0.21762537956237793,
0.2755785882472992,
0.2541545331478119,
-0.2981148660182953,
-0.0849449560046196,
-0.18265855312347412,
-0.20114955306053162,
0.03514629602432251,
-0.24502971768379211,
-0.2057037204504013,
-0.35815054178237915,
-0.0677715465426445,
0.015392797067761421,
0.12254999577999115,
0.024549059569835663,
0.13400782644748688,
0.08922433853149414,
0.25281456112861633,
0.2696576714515686,
-0.0001216760283568874,
0.04756714776158333,
-0.30470776557922363,
-0.1001051738858223,
-0.35261887311935425,
-0.14128851890563965,
-0.06971974670886993,
-0.2212415337562561,
0.07195174694061279,
-0.30706650018692017,
0.0589958131313324,
-0.2824418544769287,
-0.12607300281524658,
-0.24507847428321838,
0.6672533750534058,
-0.27220168709754944,
0.06997471302747726,
-0.12846003472805023,
-0.1617947220802307,
0.0976969450712204,
-0.2888137400150299,
0.3928678333759308,
0.18045830726623535,
0.08343400806188583,
-0.02489822544157505,
0.38224390149116516,
-0.021969638764858246,
0.16124823689460754,
-0.20002058148384094,
-0.2527584731578827,
0.38334134221076965,
-0.0076432921923696995,
0.22121967375278473,
-0.2953319251537323,
0.14677779376506805,
0.013578686863183975,
0.8064627647399902,
-0.40502291917800903,
-0.2574879825115204,
-0.2882363498210907,
0.15362901985645294,
-0.058058902621269226,
0.14963003993034363,
0.21569962799549103,
0.021887779235839844,
0.14021004736423492,
-0.5136814713478088,
-0.8684422969818115,
-0.1266842931509018,
0.12649370729923248,
0.12872357666492462,
-0.553269624710083,
-0.022965049371123314,
0.16374583542346954,
0.20249009132385254,
0.21852436661720276,
0.48604729771614075,
-0.34680303931236267,
-0.2665124237537384,
0.10810025781393051,
-0.24160388112068176,
-0.2579503059387207,
-0.35436001420021057,
0.10117962956428528,
-0.011411069892346859,
0.2894115149974823,
0.1406661421060562,
-0.08367779105901718,
-0.3567638397216797,
0.1603851169347763,
0.24140587449073792,
0.28090447187423706,
0.2183113694190979,
0.16930674016475677,
0.07399698346853256,
-0.06319056451320648,
-0.18618279695510864,
-0.09705108404159546,
0.18621651828289032,
0.041519660502672195,
0.5600594878196716,
-0.3111514747142792,
0.22956730425357819,
-0.012257295660674572,
0.15028700232505798,
0.022820275276899338,
0.08954732865095139,
-0.11794568598270416,
-0.14258421957492828,
0.26709434390068054,
0.12976230680942535,
0.21942825615406036,
0.15935394167900085,
0.24073144793510437,
0.04234761372208595,
-0.03760607913136482,
-0.1410648673772812,
-0.09188394993543625,
-0.2097061276435852,
0.46615278720855713,
0.09375118464231491,
-0.038841139525175095,
0.1977844089269638,
0.4313409626483917,
-0.49696850776672363,
-0.10859320312738419,
0.05018414929509163,
-0.19309037923812866,
0.3274519443511963,
0.1736687272787094,
0.14541079103946686,
0.24892480671405792,
-0.08799169957637787,
-0.09363969415426254,
-0.11913269013166428,
0.5767198801040649,
-0.35753434896469116,
-0.15206117928028107,
0.0701175108551979,
0.10437099635601044,
-0.15982872247695923,
0.0983540490269661,
-0.8150241374969482,
0.14275243878364563,
0.024753518402576447,
-0.12316896766424179,
0.17289762198925018,
0.053434260189533234,
-0.25636938214302063,
-0.23022900521755219,
-0.051265258342027664,
0.19309373199939728,
-0.4120175540447235,
-0.16803301870822906,
0.1258455067873001,
-0.2549982964992523,
-0.17994147539138794,
0.2108704298734665,
-0.36368492245674133,
0.2950890362262726,
-0.2587227523326874,
-0.30232149362564087,
0.6723534464836121,
0.020460421219468117,
-0.33874592185020447,
0.17606458067893982,
-0.02829056605696678,
-0.11844395101070404,
0.014704497531056404,
0.5250899791717529,
0.13721053302288055,
-0.09531288594007492,
-0.41450944542884827,
0.2945403456687927,
0.1407807171344757,
0.08684265613555908,
0.07955250889062881,
-0.2047656625509262,
0.12863707542419434,
-0.28698503971099854,
-0.24563053250312805,
0.3859403133392334,
0.2542550563812256,
0.3583354949951172,
0.31058913469314575,
0.01502904947847128,
0.14104683697223663,
0.45814719796180725,
-0.11642797291278839,
0.038538333028554916,
-0.2127675712108612,
0.17843666672706604,
-0.7484530210494995,
-0.00657160859555006,
0.233804851770401,
-0.684211790561676,
0.3345312476158142,
-0.1203259751200676,
-0.027776872739195824,
-0.16870245337486267,
-0.06641937047243118,
0.12984678149223328,
-0.07622648030519485,
0.0424031987786293,
-0.0529157929122448,
-0.15475979447364807,
-0.26756352186203003,
0.3820067048072815,
-0.05238154157996178,
0.12272240221500397,
-0.6055697798728943,
0.36769941449165344,
0.21118080615997314,
-0.20024831593036652,
-0.23974251747131348,
-0.19313360750675201,
0.20552106201648712,
0.009298308752477169,
-0.08935296535491943,
0.37867817282676697,
0.18095600605010986,
0.45517244935035706,
0.0918436124920845,
0.23228707909584045,
0.053429462015628815,
-0.04601461812853813,
0.1447264403104782,
-0.16047261655330658,
0.1452554166316986,
-0.122186578810215,
-0.26380059123039246,
0.04421829432249069,
-0.20154155790805817,
0.17875948548316956,
0.1345493048429489,
-0.19267794489860535,
0.023334171622991562,
-0.29020315408706665,
-0.018092196434736252,
-0.22206729650497437,
-0.25391262769699097,
0.1853526085615158,
0.3977224826812744,
0.1267138123512268,
-0.17217250168323517,
-0.1254342645406723,
0.29593098163604736,
-0.2575978934764862,
-0.02146092802286148,
-0.010238975286483765,
-0.36516886949539185,
0.008292252197861671,
-0.09410848468542099,
0.6046719551086426,
0.16111406683921814,
0.08203641325235367,
0.08663929253816605,
0.09111781418323517,
0.15119166672229767,
-0.04543570801615715,
0.04423326253890991,
-0.010149524547159672,
0.5799142122268677,
0.24431639909744263,
-0.03831604868173599,
-0.03656157851219177,
-0.11492462456226349,
0.3536053001880646,
0.16524268686771393,
-0.09468697011470795,
-0.2773091793060303,
0.11802420765161514,
-0.20112663507461548,
0.07134982198476791,
-0.48846086859703064,
-0.12731283903121948,
-0.25219109654426575,
0.15127485990524292,
-0.2714943289756775,
0.7723132967948914,
0.23256781697273254,
0.12630219757556915,
0.121907539665699,
0.015431724488735199,
-0.14702396094799042,
-0.43889644742012024,
-0.09669367223978043,
-0.019564397633075714,
-0.010302359238266945,
-0.062243252992630005,
0.11544781923294067,
0.04939275234937668,
0.378104567527771,
-0.0810578465461731,
-0.013159223832190037,
-0.439604789018631,
0.18912367522716522,
-0.0656801387667656,
0.1645982265472412,
0.06599143147468567,
-0.22156526148319244,
0.27954596281051636,
-0.38118886947631836,
-0.03841986879706383,
-0.05943354591727257,
-0.360728919506073,
-0.2850465774536133,
-0.006529426202178001,
0.013489697128534317,
0.28965985774993896,
0.01722964085638523,
-0.19021232426166534,
0.03355316445231438,
-0.04029781371355057,
0.01735227182507515,
-0.12257862836122513,
0.05574920028448105,
-0.014035980217158794,
0.24445363879203796,
-0.11309238523244858,
0.1804327666759491,
0.07642646133899689,
-0.21141661703586578,
-0.5961000323295593,
0.41280514001846313,
0.16332785785198212,
-0.1741422563791275,
0.3108075261116028,
-0.17417307198047638,
-0.021047014743089676,
0.31018567085266113,
-0.6087192893028259,
-0.11419225484132767,
0.06006160005927086,
0.10374749451875687,
-0.39194607734680176,
0.3361910879611969,
0.3062703013420105,
-0.027847999706864357,
0.014445174485445023,
-0.03347133845090866,
-0.23895303905010223,
0.07844120264053345,
0.1437772959470749,
0.42445045709609985,
-0.16125425696372986,
0.2261485904455185,
-0.09661968052387238,
0.3579064607620239,
0.0317312516272068,
-0.15033356845378876,
0.25775596499443054,
0.153489351272583,
0.43872150778770447,
-0.1750788390636444,
-0.05227774381637573,
-0.5761281251907349,
-0.16182008385658264,
-0.22177337110042572,
-0.11482544988393784,
-0.00577083695679903,
0.032396260648965836,
-0.10759337991476059,
-0.24965833127498627,
-0.28057071566581726,
-0.19337795674800873,
0.08453553915023804,
-0.2493494600057602,
0.26559293270111084,
0.019237376749515533,
0.17591287195682526,
0.14938676357269287,
-0.1331043690443039,
-0.03717359900474548,
0.2424815595149994,
0.3567497432231903,
0.03405454382300377,
-0.4226413667201996,
-0.08304040133953094,
-0.08184508234262466,
0.171751007437706,
-0.2144637554883957,
-0.0884096622467041,
0.1600838005542755,
0.0011427218560129404,
0.06771300733089447,
0.19654087722301483,
0.7361794710159302,
0.18743494153022766,
0.06370017677545547,
0.0926947295665741,
-0.34559157490730286,
-0.38814762234687805,
0.08432789146900177,
0.050614338368177414,
-0.2877064049243927,
-0.11748796701431274,
0.7245604395866394,
0.08039925247430801,
-0.12068247050046921,
-0.35767632722854614,
0.5562205910682678,
-0.3704288899898529,
-0.2955068051815033,
-0.14579470455646515,
-0.1664605736732483,
-0.5476548075675964,
-0.21335113048553467,
-0.3082762062549591,
-0.158236563205719,
-0.1307765543460846,
0.06464124470949173,
-0.25347790122032166,
-0.0915706679224968,
0.022077929228544235,
-0.11822156608104706,
0.39187073707580566,
0.2666739821434021,
0.01936674304306507,
0.1644687056541443,
0.22197943925857544,
0.32841458916664124,
0.3666434586048126,
-0.015375549905002117,
-0.09742754697799683,
-0.1326034516096115,
0.0867798924446106,
0.16486312448978424,
0.09364327043294907,
0.06861534714698792,
0.047984033823013306,
0.026837099343538284,
-0.20862127840518951,
-0.309278279542923,
-0.05600401386618614,
-0.13409364223480225,
-0.13672052323818207,
-0.1440843939781189,
-0.5415616631507874,
0.5702609419822693,
-0.06502198427915573,
-0.14081458747386932,
-0.08518777787685394,
-0.04595467448234558,
-0.27113988995552063,
0.17039062082767487,
0.14987888932228088,
0.871629536151886,
0.10897225886583328,
0.17788292467594147,
0.11092300713062286,
-0.27020612359046936,
0.08746032416820526,
0.03358153998851776,
-0.12014587968587875,
-0.3685464859008789,
-0.18291819095611572,
-0.15664030611515045,
-0.20753438770771027,
0.040554266422986984,
0.4153393507003784,
-0.28012555837631226,
0.3261986970901489,
-0.22381284832954407,
-0.150596484541893,
-0.19907492399215698,
0.09617255628108978,
-0.16576498746871948,
-0.17434504628181458,
-0.1681724339723587,
-0.011401105672121048,
-0.08819330483675003,
-0.030661439523100853,
0.005310256965458393,
0.041388850659132004,
0.055350929498672485,
-0.01871882937848568,
0.3721582889556885,
0.08462406694889069,
-0.06245941296219826,
0.27712324261665344,
-0.1577947437763214,
-0.4986291825771332,
-0.08261749893426895,
0.5926849246025085,
0.39605453610420227,
-0.03344820439815521,
0.052653420716524124,
-0.07231389731168747,
0.02688632160425186,
0.30636999011039734,
-0.24224381148815155,
-0.17192718386650085,
0.4481702744960785,
0.13767461478710175,
-0.08551819622516632,
0.14096641540527344,
-0.09451168775558472,
-0.1698206514120102,
-0.0376817062497139,
-0.08608055114746094,
0.05510396137833595,
-0.2550104856491089,
0.047466568648815155,
0.27123507857322693,
0.25303158164024353,
-0.021011359989643097,
0.00957658514380455,
0.15015268325805664,
0.05790382996201515,
0.2980200946331024,
0.03945420682430267,
-0.23744094371795654,
0.04595616087317467,
0.5188024640083313,
0.20673303306102753,
0.021412931382656097,
0.4381721615791321,
-0.3275931775569916,
0.12107392400503159,
-0.24026647210121155,
0.5366311073303223,
0.20174279808998108,
-0.1746363490819931,
0.18690618872642517,
0.0694175586104393,
0.400788277387619,
-0.04734538123011589,
-0.021302111446857452,
0.08538547903299332,
0.01116790622472763,
0.14452217519283295,
-0.0958094373345375,
-0.43805670738220215,
0.23431478440761566,
0.26247668266296387,
0.35354289412498474,
0.2583891451358795,
-0.2324337363243103,
-0.06804914027452469,
0.3585878610610962,
-0.17444638907909393,
0.2054148018360138,
0.30052241683006287,
0.28238117694854736,
0.16841864585876465,
0.20444361865520477,
-0.2087186574935913,
-0.3440040647983551,
-0.04381499066948891,
-0.25555282831192017,
-0.23652930557727814,
-0.12513233721256256,
-0.059807393699884415,
0.1539493054151535,
-0.04369121044874191,
0.16778942942619324,
-0.32661035656929016,
-0.48477429151535034,
0.28914013504981995,
-0.13750548660755157,
0.08243950456380844,
0.08195353299379349,
0.2197140008211136,
0.18409262597560883,
0.09372954070568085,
0.4481506049633026,
-0.31844180822372437,
-0.11875598877668381,
-0.19210198521614075,
0.17830194532871246,
-0.032810866832733154,
0.01210853923112154,
0.06422243267297745,
-0.13168299198150635,
-0.618908166885376,
-0.0990729108452797,
0.5383809804916382,
0.16359786689281464,
-0.022629156708717346,
-0.16756297647953033,
-0.029007015749812126,
0.10755258798599243,
0.2544226348400116,
0.20538093149662018,
-0.34229564666748047,
-0.22456443309783936,
0.3293197453022003,
0.12559767067432404,
0.026911044493317604,
-0.19253268837928772,
0.28809261322021484,
-0.19185201823711395,
-0.28732848167419434,
0.14658433198928833,
0.03198773413896561,
-0.051279038190841675,
-0.4122619330883026,
0.02547094039618969,
0.17515431344509125,
-0.15808822214603424,
0.3159532845020294,
0.5974050760269165,
-0.23314929008483887,
-0.0708443894982338,
0.14665760099887848,
0.39944934844970703,
-0.00568219693377614,
0.33055245876312256,
-0.0007101622759364545,
0.37643712759017944,
0.024003835394978523,
0.09160976856946945,
-0.024088799953460693,
-0.36716923117637634,
0.008116306737065315,
0.1389636993408203,
-0.21950973570346832,
0.049702007323503494,
0.07517561316490173,
-0.08808675408363342,
0.20825818181037903,
-0.3309556841850281,
-0.0835980549454689,
0.35109469294548035,
-0.1629563868045807,
0.0826335996389389,
-0.12985458970069885,
-0.1498635709285736,
0.3026362657546997,
0.27058500051498413,
-0.0788765624165535,
-0.3361347019672394,
0.3281606435775757,
0.14230331778526306,
-0.09715763479471207,
0.10632995516061783,
0.18724679946899414,
0.18761932849884033,
-0.16550152003765106,
-0.1503581702709198,
0.01286811102181673,
-0.028931107372045517,
0.012515444308519363,
0.016596190631389618,
0.001261650468222797,
-0.22744649648666382,
0.04194037616252899,
0.1657589226961136,
0.316542387008667,
0.31962117552757263,
-0.08389399200677872,
0.14995965361595154,
0.01787395030260086,
-0.0008007183787412941,
-0.07352926582098007,
0.21277669072151184,
0.015179079957306385,
0.029453638941049576,
0.2632456421852112,
0.004401422571390867,
0.3795758783817291,
-0.3571351170539856,
0.24797096848487854,
0.3106713593006134,
-0.14046280086040497,
-0.16658058762550354,
0.010372787714004517,
0.2103220373392105,
-0.10659781098365784,
0.543431282043457,
-0.2923468351364136,
-0.0012200650526210666,
0.024124469608068466,
0.014269893057644367,
-0.04149940609931946,
0.42676401138305664,
0.23310062289237976,
-0.4311105012893677,
-0.18666738271713257,
-0.18959149718284607,
-0.531938910484314,
-0.09897993505001068,
0.2813744843006134,
0.26681122183799744,
-0.24896834790706635,
0.18202714622020721,
0.13214708864688873,
0.22491292655467987,
0.05982944369316101,
-0.11674915254116058,
0.12656830251216888,
0.36708515882492065,
0.11884111911058426,
-0.23788441717624664,
0.0502789206802845,
0.3357856571674347,
-0.09746404737234116,
-0.21433128416538239,
0.19175957143306732,
0.13259442150592804,
-0.05126795545220375,
0.2214895486831665,
0.1896936446428299,
-0.13211625814437866,
0.44787561893463135,
0.6462354063987732,
0.018949398770928383,
0.03128951042890549,
-0.17740756273269653,
0.23626680672168732,
0.3744185268878937,
-0.02168247289955616,
-0.15659891068935394,
-0.016700515523552895,
0.09220446646213531,
0.24991263449192047,
-0.4566822052001953,
0.4448709487915039,
-0.20418833196163177,
-0.18681447207927704,
0.013796444982290268,
-0.047789204865694046,
-0.45817601680755615,
0.046374257653951645,
0.06515838205814362,
0.14308753609657288,
0.16218340396881104,
0.3478296995162964,
-0.0187161173671484,
0.31849342584609985,
-0.18996867537498474,
-0.024314425885677338,
0.4145451784133911,
-0.07722634077072144,
-0.19070376455783844,
-0.04279636964201927,
0.2818669378757477,
0.05549462139606476,
0.005082567222416401,
-0.4016094505786896,
0.12248041480779648,
0.48391762375831604,
-0.2663431763648987,
-0.07878061383962631,
0.3923037648200989,
-0.15820947289466858,
0.12561525404453278,
0.06752754002809525,
0.6033191084861755,
0.04220382496714592,
-0.35974323749542236,
-0.09212131798267365,
-0.28274479508399963
] |
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.3435496389865875,
-0.18610084056854248,
-0.023776641115546227,
0.19790960848331451,
0.23519615828990936,
0.09037342667579651,
-0.0758548453450203,
-0.08912719041109085,
-0.0024479334242641926,
0.06135242432355881,
0.08186816424131393,
0.28882044553756714,
0.008917439728975296,
0.2742181718349457,
0.21101678907871246,
0.23116427659988403,
0.2571013569831848,
0.30344894528388977,
-0.316180557012558,
-0.031090296804904938,
-0.19552482664585114,
-0.19055460393428802,
0.01577978953719139,
-0.27732956409454346,
-0.13354668021202087,
-0.3582567274570465,
-0.08404547721147537,
-0.009930756874382496,
0.0723501443862915,
0.06707757711410522,
0.12379110604524612,
0.14211994409561157,
0.31979474425315857,
0.30730587244033813,
-0.00011882343096658587,
0.011263365857303143,
-0.3935619592666626,
-0.11748509109020233,
-0.2952137589454651,
-0.17522887885570526,
0.01987258344888687,
-0.19282297790050507,
0.042612865567207336,
-0.2823275625705719,
-0.03559248894453049,
-0.07892432063817978,
-0.13821950554847717,
-0.1842428743839264,
0.6355670094490051,
-0.275776743888855,
0.08822808414697647,
-0.10131970793008804,
-0.260475218296051,
0.10034056752920151,
-0.36092567443847656,
0.3109508156776428,
0.16976577043533325,
0.03272545337677002,
-0.023011894896626472,
0.3523842394351959,
-0.005922825075685978,
0.18340381979942322,
-0.220282644033432,
-0.2364937663078308,
0.36850419640541077,
-0.05573343485593796,
0.196257084608078,
-0.3266140818595886,
0.1366037279367447,
-0.050418730825185776,
0.7573294043540955,
-0.39737242460250854,
-0.22244399785995483,
-0.22003133594989777,
0.2223118394613266,
-0.17800851166248322,
0.10281990468502045,
0.27105239033699036,
-0.00041949088335968554,
0.13091064989566803,
-0.591571033000946,
-0.8006386160850525,
-0.12654554843902588,
0.0599236823618412,
0.01747800223529339,
-0.6005364060401917,
-0.00987948663532734,
0.10617594420909882,
0.21777436137199402,
0.28150495886802673,
0.45982444286346436,
-0.23536178469657898,
-0.21617870032787323,
0.1422933042049408,
-0.2949935495853424,
-0.27456700801849365,
-0.2943735718727112,
0.19076335430145264,
-0.058179501444101334,
0.19619733095169067,
0.07011108100414276,
-0.09236592799425125,
-0.28402119874954224,
0.14825215935707092,
0.15288323163986206,
0.31609266996383667,
0.11482111364603043,
0.18086811900138855,
0.08324085175991058,
0.05905802920460701,
-0.2331293523311615,
-0.05364526808261871,
0.15330982208251953,
0.060394227504730225,
0.5767164826393127,
-0.22735001146793365,
0.17213593423366547,
0.023944241926074028,
0.07144946604967117,
0.0731746107339859,
0.16627159714698792,
-0.09022817760705948,
-0.11744256317615509,
0.343350887298584,
0.12025004625320435,
0.2047811597585678,
0.18999069929122925,
0.20102459192276,
-0.04890335723757744,
-0.11417496204376221,
-0.15518802404403687,
-0.05954644829034805,
-0.3120183050632477,
0.4196890592575073,
0.1253359168767929,
0.008064653724431992,
0.11991170793771744,
0.5349017381668091,
-0.47155168652534485,
-0.1450413018465042,
0.014429097063839436,
-0.19747668504714966,
0.3453064262866974,
0.1837601661682129,
0.16478322446346283,
0.1672118455171585,
-0.07095074653625488,
-0.029897110536694527,
-0.10037556290626526,
0.6497284173965454,
-0.31613996624946594,
-0.10923987627029419,
0.10167340934276581,
0.126290962100029,
-0.13794828951358795,
0.1107456162571907,
-0.7127209305763245,
0.19799159467220306,
0.01989188976585865,
-0.13777710497379303,
0.1604963093996048,
0.02383258193731308,
-0.35516148805618286,
-0.18282300233840942,
-0.053266432136297226,
0.18040931224822998,
-0.3858019709587097,
-0.1600942611694336,
0.19277258217334747,
-0.21991141140460968,
-0.11245496571063995,
0.22448506951332092,
-0.3141230046749115,
0.24187910556793213,
-0.27327755093574524,
-0.35773393511772156,
0.5291256308555603,
0.10013245046138763,
-0.33412250876426697,
0.16778558492660522,
-0.034818533807992935,
-0.07906153053045273,
0.023173863068223,
0.5614812970161438,
0.16812637448310852,
-0.10928022861480713,
-0.4543691575527191,
0.3388875126838684,
0.09941975027322769,
0.1335134655237198,
0.06959573924541473,
-0.16952909529209137,
0.27105626463890076,
-0.3116510510444641,
-0.14273618161678314,
0.4807794392108917,
0.24605664610862732,
0.3417785167694092,
0.3239542543888092,
-0.024512089788913727,
0.09958026558160782,
0.4077056050300598,
-0.15120798349380493,
0.07907246053218842,
-0.20955853164196014,
0.12622539699077606,
-0.6138048768043518,
-0.031110024079680443,
0.19368907809257507,
-0.5951253175735474,
0.3615722954273224,
-0.1226513534784317,
-0.06428507715463638,
-0.2044180929660797,
-0.012776023708283901,
0.074924997985363,
-0.06887328624725342,
-0.002293811645358801,
-0.11098836362361908,
-0.17763195931911469,
-0.2606808543205261,
0.4837685525417328,
-0.059083711355924606,
0.09318764507770538,
-0.6138257384300232,
0.33962178230285645,
0.17128588259220123,
-0.20454899966716766,
-0.2430604249238968,
-0.09670501947402954,
0.21039164066314697,
0.03194613754749298,
-0.09627177566289902,
0.33779212832450867,
0.19397775828838348,
0.4088326692581177,
0.012982119806110859,
0.19935950636863708,
0.0663035586476326,
-0.013270302675664425,
0.0733955129981041,
-0.23201321065425873,
0.13604170083999634,
-0.08118437975645065,
-0.17561911046504974,
0.061703190207481384,
-0.23636746406555176,
0.08926395326852798,
0.1581323742866516,
-0.20450879633426666,
0.054407164454460144,
-0.34168899059295654,
0.01903425343334675,
-0.20467491447925568,
-0.1858685463666916,
0.21923834085464478,
0.30885547399520874,
0.136353999376297,
-0.2268320620059967,
-0.20744352042675018,
0.23301959037780762,
-0.273706316947937,
-0.09121798723936081,
0.03533577919006348,
-0.25955429673194885,
0.016884468495845795,
-0.12040789425373077,
0.5437601208686829,
0.11886638402938843,
0.1275317370891571,
0.005332763772457838,
0.11943517625331879,
0.1251201182603836,
0.012979517690837383,
0.033916082233190536,
-0.034391891211271286,
0.5523136854171753,
0.2647174298763275,
-0.050943631678819656,
0.07244426012039185,
-0.16240665316581726,
0.41986629366874695,
0.15044249594211578,
-0.1196851134300232,
-0.3011409044265747,
0.09947309643030167,
-0.16158875823020935,
0.06608370691537857,
-0.46807560324668884,
-0.08413832634687424,
-0.24724353849887848,
0.2366381287574768,
-0.2964736223220825,
0.78852379322052,
0.25946560502052307,
0.16251371800899506,
0.11081790179014206,
0.04596862569451332,
-0.13120120763778687,
-0.4180256724357605,
-0.05735936015844345,
0.03743736818432808,
0.012536889873445034,
-0.04833447188138962,
0.07523690909147263,
-0.0037027099169790745,
0.43055886030197144,
-0.029105933383107185,
-0.06655988842248917,
-0.4269751310348511,
0.12784601747989655,
-0.08237317949533463,
0.10297410935163498,
0.11045191437005997,
-0.21205002069473267,
0.2974177896976471,
-0.41683876514434814,
-0.0541326068341732,
-0.12440760433673859,
-0.42016705870628357,
-0.25945350527763367,
0.029452355578541756,
0.054695531725883484,
0.26150214672088623,
0.010782072320580482,
-0.20518799126148224,
-0.009475501254200935,
-0.008310801349580288,
-0.11737431585788727,
-0.17131412029266357,
0.04680018126964569,
0.020350614562630653,
0.1569826304912567,
-0.2946605980396271,
0.2539896070957184,
0.08229655772447586,
-0.2376687079668045,
-0.5970131158828735,
0.34178805351257324,
0.15990062057971954,
-0.1892435997724533,
0.2897324860095978,
-0.18017923831939697,
-0.05541607737541199,
0.3803258240222931,
-0.585895836353302,
-0.09459684044122696,
0.04431375861167908,
0.14135558903217316,
-0.40696507692337036,
0.33472591638565063,
0.30819085240364075,
-0.022507095709443092,
-0.008129259571433067,
-0.06779469549655914,
-0.24541619420051575,
0.057677533477544785,
0.135620579123497,
0.39979302883148193,
-0.20723606646060944,
0.22036898136138916,
-0.0573364719748497,
0.3448047637939453,
-0.024694684892892838,
-0.15138903260231018,
0.2897457480430603,
0.13564354181289673,
0.42454424500465393,
-0.16769886016845703,
-0.12704677879810333,
-0.5524553656578064,
-0.17350003123283386,
-0.235456645488739,
-0.006049247924238443,
-0.037928417325019836,
0.007215591613203287,
-0.12818890810012817,
-0.2558847963809967,
-0.2843937277793884,
-0.13080598413944244,
0.050418462604284286,
-0.24523134529590607,
0.38225799798965454,
0.05870574340224266,
0.15766017138957977,
0.15273796021938324,
-0.1986498236656189,
-0.06896388530731201,
0.20944958925247192,
0.35488361120224,
0.027218131348490715,
-0.2600478529930115,
-0.03487683832645416,
-0.15328776836395264,
0.11025161296129227,
-0.2091599702835083,
-0.027674322947859764,
0.12216686457395554,
-0.0030595147982239723,
0.06094251945614815,
0.25452670454978943,
0.8182936310768127,
0.21565818786621094,
0.13744810223579407,
0.08896946161985397,
-0.42514583468437195,
-0.24784919619560242,
0.04569067060947418,
0.03224875032901764,
-0.3078768253326416,
-0.09407594799995422,
0.6723992824554443,
0.15264837443828583,
-0.09020872414112091,
-0.3045024871826172,
0.5188001394271851,
-0.35637983679771423,
-0.3737735152244568,
-0.226618230342865,
-0.16631671786308289,
-0.5012158751487732,
-0.12888817489147186,
-0.25982919335365295,
-0.043999288231134415,
-0.18328441679477692,
0.10613173991441727,
-0.21961435675621033,
-0.06760402768850327,
0.10953846573829651,
-0.13100038468837738,
0.3300732374191284,
0.34216615557670593,
0.04964509233832359,
0.12424881011247635,
0.21767404675483704,
0.16693851351737976,
0.3173029124736786,
-0.10533729940652847,
-0.11263882368803024,
-0.12806656956672668,
0.1298920065164566,
0.17120608687400818,
0.07560695707798004,
0.05274224281311035,
0.073239266872406,
-0.006858730223029852,
-0.16993914544582367,
-0.38294366002082825,
-0.045367468148469925,
-0.149021714925766,
-0.07308946549892426,
-0.20390397310256958,
-0.47512492537498474,
0.4746287167072296,
-0.09257631748914719,
-0.12585900723934174,
-0.14722108840942383,
-0.10613928735256195,
-0.292100191116333,
0.13995514810085297,
0.13064582645893097,
0.863239586353302,
0.03267402946949005,
0.15255941450595856,
0.11987494677305222,
-0.17053186893463135,
0.016849039122462273,
-0.0012273535830900073,
-0.08392131328582764,
-0.4019956886768341,
-0.32794901728630066,
-0.17332302033901215,
-0.1934763342142105,
0.03782476857304573,
0.32531511783599854,
-0.3283301293849945,
0.350751131772995,
-0.24877803027629852,
-0.10898873955011368,
-0.1078147143125534,
0.04434104263782501,
-0.11699352413415909,
-0.16496354341506958,
-0.18569031357765198,
-0.006142998579889536,
-0.0798516571521759,
-0.0044730366207659245,
-0.054357439279556274,
0.07407746464014053,
0.21157798171043396,
0.0019404172198846936,
0.3221924602985382,
0.12272784113883972,
-0.07071276009082794,
0.28050389885902405,
-0.1962251514196396,
-0.46495190262794495,
-0.0051141781732439995,
0.6101843118667603,
0.43407243490219116,
0.02489257976412773,
0.08137881010770798,
-0.07069776207208633,
-0.02665790729224682,
0.3314712941646576,
-0.2104785293340683,
-0.10344018042087555,
0.4504617154598236,
0.13666725158691406,
-0.10304783284664154,
0.0925334095954895,
-0.047437600791454315,
-0.1213080883026123,
0.01984325237572193,
-0.06464047729969025,
0.11354495584964752,
-0.3509957492351532,
0.03550690785050392,
0.24031829833984375,
0.3644150495529175,
-0.05869950354099274,
0.03146904334425926,
0.06251636892557144,
0.013053151778876781,
0.3171583116054535,
0.07085946947336197,
-0.28087955713272095,
0.03762059658765793,
0.5294992923736572,
0.20248040556907654,
-0.0426783561706543,
0.369986891746521,
-0.2707161009311676,
0.08999379724264145,
-0.2675445079803467,
0.46402230858802795,
0.11788608133792877,
-0.17460092902183533,
0.18568970263004303,
0.12572157382965088,
0.4507124722003937,
-0.01596333086490631,
-0.04391373321413994,
0.08839017152786255,
-0.06297940015792847,
0.16536471247673035,
-0.09405682981014252,
-0.3822158873081207,
0.12107300013303757,
0.23729540407657623,
0.36307305097579956,
0.3535114526748657,
-0.12283376604318619,
-0.03290075063705444,
0.39711204171180725,
-0.2104937732219696,
0.15994955599308014,
0.2804698348045349,
0.28492382168769836,
0.21431244909763336,
0.15449583530426025,
-0.32303059101104736,
-0.35993194580078125,
-0.00966667290776968,
-0.2506664991378784,
-0.23945240676403046,
-0.15870383381843567,
-0.052522726356983185,
0.14392836391925812,
-0.11399519443511963,
0.23214752972126007,
-0.2854383587837219,
-0.43824777007102966,
0.23569965362548828,
-0.14528611302375793,
0.09254181385040283,
0.17046043276786804,
0.21442843973636627,
0.20094110071659088,
0.078536257147789,
0.4266561269760132,
-0.3415493369102478,
-0.11250341683626175,
-0.21729446947574615,
0.1889527589082718,
-0.03229357302188873,
0.00512180058285594,
0.07024524360895157,
-0.11696258187294006,
-0.6251553893089294,
-0.09487902373075485,
0.6250932216644287,
0.12121511250734329,
-0.007364992052316666,
-0.1670638620853424,
0.010022648610174656,
0.15344597399234772,
0.29040053486824036,
0.0841551125049591,
-0.37735891342163086,
-0.24610112607479095,
0.3773587644100189,
0.15042181313037872,
-0.0956229418516159,
-0.11587667465209961,
0.2852272391319275,
-0.20924818515777588,
-0.28130221366882324,
0.18480560183525085,
0.10580998659133911,
-0.04548296332359314,
-0.3390641212463379,
0.037321265786886215,
0.25539806485176086,
-0.168448343873024,
0.3619692921638489,
0.5913917422294617,
-0.2182152271270752,
-0.056276772171258926,
0.13966168463230133,
0.41501113772392273,
-0.13962072134017944,
0.37946173548698425,
-0.0036846548318862915,
0.3818938434123993,
-0.0570320188999176,
0.14777082204818726,
-0.10903933644294739,
-0.4267398416996002,
0.10113799571990967,
0.16541045904159546,
-0.261038213968277,
0.02259836159646511,
-0.0011137895053252578,
-0.10303245484828949,
0.1897851675748825,
-0.37662172317504883,
-0.11893175542354584,
0.4679529070854187,
-0.21893829107284546,
0.1519278734922409,
-0.00488664535805583,
-0.12191538512706757,
0.25158774852752686,
0.30470022559165955,
-0.006079844664782286,
-0.26212695240974426,
0.3338620960712433,
0.16961273550987244,
-0.10972918570041656,
0.08383879065513611,
0.09739969670772552,
0.20913255214691162,
-0.1747376024723053,
-0.17292578518390656,
0.04247115179896355,
-0.059464432299137115,
0.08306116610765457,
0.05102963745594025,
0.006814487278461456,
-0.2014678716659546,
0.06833609938621521,
0.17138808965682983,
0.29286327958106995,
0.25087040662765503,
-0.025109097361564636,
0.12901705503463745,
0.030784226953983307,
-0.018299046903848648,
0.09670588374137878,
0.1933041661977768,
0.006185504142194986,
0.02546832524240017,
0.26394131779670715,
0.04610484465956688,
0.33344894647598267,
-0.37973135709762573,
0.20687440037727356,
0.4354175329208374,
-0.09028200060129166,
-0.24191169440746307,
0.028001394122838974,
0.2125844657421112,
0.01502084732055664,
0.5192965865135193,
-0.29991859197616577,
0.012651393190026283,
0.09539895504713058,
0.03013751655817032,
0.03295258805155754,
0.37832456827163696,
0.22531074285507202,
-0.3717055022716522,
-0.30084556341171265,
-0.21567590534687042,
-0.5639153718948364,
-0.08359401673078537,
0.36889445781707764,
0.24255302548408508,
-0.2383333295583725,
0.09796856343746185,
0.0944172814488411,
0.1586003452539444,
0.03316560387611389,
-0.15537749230861664,
0.12967586517333984,
0.3835381269454956,
0.1775435507297516,
-0.2048427313566208,
-0.003446401795372367,
0.33539018034935,
-0.15849685668945312,
-0.19208435714244843,
0.1638851910829544,
0.09122830629348755,
-0.026597222313284874,
0.18003670871257782,
0.19694413244724274,
-0.1996731460094452,
0.423263281583786,
0.5758476853370667,
0.033157896250486374,
0.09367994964122772,
-0.25773075222969055,
0.326477587223053,
0.4559474587440491,
-0.03907454386353493,
-0.18054868280887604,
-0.10831820219755173,
0.14453129470348358,
0.16273899376392365,
-0.4258213937282562,
0.383011132478714,
-0.22262337803840637,
-0.13338524103164673,
0.08442436158657074,
0.017223719507455826,
-0.5296298861503601,
0.0026823084335774183,
0.12372799217700958,
0.18533720076084137,
0.12318748235702515,
0.40718281269073486,
-0.02085547149181366,
0.3346154987812042,
-0.17359137535095215,
-0.10367590188980103,
0.37255167961120605,
-0.14484697580337524,
-0.25402528047561646,
-0.12615114450454712,
0.3549652695655823,
-0.06466710567474365,
-0.019083339720964432,
-0.3931911289691925,
0.1495351642370224,
0.4303223490715027,
-0.2442898452281952,
-0.040543634444475174,
0.5292307734489441,
-0.19518905878067017,
0.1532832831144333,
0.1000506803393364,
0.5462210178375244,
0.10794747620820999,
-0.35732150077819824,
-0.08707364648580551,
-0.2885379195213318
] |
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.41315704584121704,
-0.31920647621154785,
-0.08791661262512207,
0.357421338558197,
-0.10274987667798996,
0.020394116640090942,
0.34240543842315674,
0.11579525470733643,
0.057924553751945496,
-0.0040251328609883785,
0.06569883972406387,
0.4142298400402069,
0.18681801855564117,
0.21182173490524292,
-0.16755259037017822,
0.00805901363492012,
0.19050972163677216,
-0.04558300971984863,
0.17406044900417328,
-0.006044356618076563,
-0.1642415076494217,
0.13927225768566132,
-0.49813565611839294,
-0.0023560100235044956,
-0.4168529212474823,
-0.14932437241077423,
0.10352029651403427,
0.1356753706932068,
-0.15745948255062103,
-0.22853396832942963,
-0.26269301772117615,
0.1599624902009964,
-0.07593685388565063,
0.5732402801513672,
-0.00012281167437322438,
-0.19767795503139496,
0.01280084066092968,
0.26215264201164246,
0.07546825706958771,
0.06125934049487114,
-0.13256089389324188,
-0.27658262848854065,
-0.04943995922803879,
-0.1092960312962532,
0.11611361056566238,
0.20157694816589355,
-0.06076153740286827,
-0.4477423429489136,
0.0259237140417099,
0.08576235920190811,
0.05497930198907852,
0.36124926805496216,
-0.3099783957004547,
0.039309311658144,
-0.37768182158470154,
0.16872462630271912,
-0.15384377539157867,
0.05054796487092972,
0.27895450592041016,
-0.1809554398059845,
-0.10931962728500366,
0.3070889413356781,
-0.07127078622579575,
0.29660940170288086,
0.008204584009945393,
-0.08298180252313614,
0.05338689684867859,
-0.45094871520996094,
0.18975487351417542,
0.3490733504295349,
0.03533225506544113,
-0.0632035955786705,
-0.1647023856639862,
-0.23741640150547028,
-0.3268579840660095,
-0.13496904075145721,
0.20226511359214783,
0.140126034617424,
0.182107612490654,
-0.005169323645532131,
-0.5538259744644165,
0.14738385379314423,
0.34518101811408997,
-0.07219500094652176,
-0.11896922439336777,
0.01122503262013197,
0.12752817571163177,
0.3288133144378662,
0.34047752618789673,
0.12036224454641342,
-0.050015442073345184,
-0.22033977508544922,
0.31937265396118164,
0.2178266942501068,
-0.7854887843132019,
-0.035213734954595566,
0.2125978320837021,
-0.10208623111248016,
-0.0854894146323204,
-0.1859988570213318,
-0.10234852880239487,
0.3468082845211029,
-0.33053743839263916,
0.09549461305141449,
0.30707013607025146,
-0.07641884684562683,
0.007399178575724363,
0.11167795956134796,
-0.03472265601158142,
-0.17122921347618103,
-0.33147379755973816,
0.06314977258443832,
0.09290806949138641,
-0.3245916962623596,
-0.0648113265633583,
0.12928511202335358,
-0.30528274178504944,
-0.09038922190666199,
-0.1549668312072754,
0.029576066881418228,
-0.23782896995544434,
-0.10234224796295166,
0.13267818093299866,
0.077051542699337,
-0.012904848903417587,
0.7939462661743164,
-0.2598314583301544,
0.11570467054843903,
-0.4723810851573944,
-0.5671401619911194,
-0.02635623700916767,
-0.13674694299697876,
-0.3721123933792114,
0.2238743156194687,
0.12795136868953705,
-0.022243326529860497,
0.14073196053504944,
0.3258408010005951,
0.05036521330475807,
-0.22435598075389862,
0.32726117968559265,
-0.5305343866348267,
0.19723941385746002,
0.08167754113674164,
0.15858235955238342,
0.5495990514755249,
-0.11440888792276382,
0.32648125290870667,
-0.1295255720615387,
0.24386072158813477,
-0.5274050831794739,
-0.24513541162014008,
0.18052366375923157,
-0.04368806257843971,
0.10316687822341919,
0.10641269385814667,
-0.46372824907302856,
0.49805715680122375,
0.3198491632938385,
-0.21841251850128174,
-0.16935890913009644,
-0.19917917251586914,
-0.6358715295791626,
-0.15167726576328278,
-0.06138749048113823,
0.16733160614967346,
-0.3309352993965149,
0.23807133734226227,
-0.32237744331359863,
0.14681878685951233,
0.43502408266067505,
0.6122484803199768,
-0.18858030438423157,
0.38445398211479187,
0.0008836123743094504,
0.19841282069683075,
-0.006441306322813034,
-0.07650727033615112,
-0.3745231628417969,
0.5169082880020142,
-0.1592249721288681,
-0.0011448162840679288,
-0.19069428741931915,
0.1531788557767868,
0.24031923711299896,
-0.054744161665439606,
0.3251418471336365,
0.2936646640300751,
0.030495164915919304,
0.3874754309654236,
-0.2230064421892166,
-0.11075452715158463,
0.14605578780174255,
0.03928028792142868,
-0.08418295532464981,
-0.09125829488039017,
-0.013679874129593372,
-0.2940002977848053,
0.31632259488105774,
-0.012795752845704556,
0.02522158809006214,
0.4302801489830017,
-0.3920021653175354,
-0.1519802212715149,
-0.14723719656467438,
-0.23029060661792755,
-0.07329937070608139,
0.36632072925567627,
-0.027873344719409943,
0.0501864030957222,
0.43080928921699524,
0.03516373038291931,
0.192552849650383,
0.11382587999105453,
-0.04051584377884865,
-0.06420761346817017,
-0.1118849664926529,
-0.0805777758359909,
-0.15432201325893402,
-0.17896093428134918,
-0.009086904115974903,
0.4500133693218231,
0.18175454437732697,
-0.1041792556643486,
-0.0312028955668211,
-0.13255061209201813,
0.08126547187566757,
0.056289464235305786,
-0.19869929552078247,
-0.06962676346302032,
0.08548934012651443,
0.05027003586292267,
-0.07914604246616364,
0.2618638277053833,
0.4632999002933502,
-0.05390559881925583,
0.17097103595733643,
0.11557704955339432,
0.37286728620529175,
-0.054025717079639435,
0.04844740033149719,
-0.1458727866411209,
0.10215646028518677,
-0.23902365565299988,
-0.023904629051685333,
0.3120741844177246,
0.08390725404024124,
0.44222983717918396,
0.03163757175207138,
-0.1361156851053238,
-0.010145837441086769,
0.29654619097709656,
0.15425382554531097,
0.05687418580055237,
0.34583011269569397,
0.330803781747818,
0.2301616221666336,
0.33505451679229736,
-0.13227161765098572,
0.3230474889278412,
0.6291490793228149,
0.04870791733264923,
-0.34807446599006653,
0.04371523857116699,
-0.18393099308013916,
-0.3695406913757324,
0.022652966901659966,
-0.14126746356487274,
0.5598791241645813,
0.02004018984735012,
0.23184660077095032,
-0.03621411696076393,
-0.1006811261177063,
-0.05870399996638298,
-0.023061027750372887,
0.10299114137887955,
0.22641298174858093,
-0.10509268939495087,
0.2959200441837311,
-0.015935637056827545,
-0.06011109799146652,
-0.24219226837158203,
0.338969349861145,
0.2527018189430237,
-0.26005735993385315,
0.10316311568021774,
-0.2926936447620392,
0.1555963158607483,
0.17634217441082,
-0.10034094750881195,
-0.29019081592559814,
-0.21284113824367523,
-0.15581712126731873,
-0.08444599062204361,
0.22002623975276947,
-0.0549234040081501,
0.2770824432373047,
-0.13619406521320343,
-0.10554211586713791,
-0.04753908887505531,
0.0010066579561680555,
-0.1382567137479782,
-0.1498212218284607,
-0.01097465492784977,
0.28633633255958557,
0.22634725272655487,
0.04188721254467964,
-0.06779324263334274,
-0.2715701758861542,
-0.06478748470544815,
-0.20764793455600739,
-0.123651422560215,
0.14108186960220337,
0.05559181421995163,
-0.1938760131597519,
-0.05738724395632744,
-0.2245592474937439,
0.15367719531059265,
0.18145596981048584,
-0.24901999533176422,
-0.18997088074684143,
0.05163322016596794,
-0.10662883520126343,
-0.23324207961559296,
0.04508158937096596,
-0.1557425707578659,
-0.087059386074543,
-0.10771111398935318,
0.2935895025730133,
-0.17219968140125275,
0.3419692814350128,
-0.22608330845832825,
0.06347805261611938,
-0.07978181540966034,
-0.10795726627111435,
0.015877367928624153,
-0.33310291171073914,
-0.3667623698711395,
-0.011990005150437355,
-0.018404841423034668,
-0.19211706519126892,
-0.13449309766292572,
0.0897424966096878,
0.1568119376897812,
0.1717812418937683,
-0.15996527671813965,
0.16991205513477325,
-0.39074087142944336,
0.11943370848894119,
0.07057342678308487,
0.06748142838478088,
0.4676007032394409,
0.02765907533466816,
0.0626559779047966,
0.015641892328858376,
-0.4355052411556244,
-0.06356121599674225,
0.31928297877311707,
0.036836449056863785,
0.017217937856912613,
0.3445579409599304,
0.031346049159765244,
0.6403152346611023,
0.4947386384010315,
-0.16458657383918762,
0.20208857953548431,
0.009662935510277748,
-0.171650230884552,
-0.4027167856693268,
-0.2180113047361374,
0.12400682270526886,
-0.26142266392707825,
0.16841794550418854,
0.4269157350063324,
0.003641990013420582,
-0.42947980761528015,
-0.016689196228981018,
0.24397410452365875,
-0.24452762305736542,
-0.014102740213274956,
0.1481054276227951,
-0.12326809018850327,
0.19664506614208221,
0.2461676150560379,
-0.19769258797168732,
-0.3519733250141144,
-0.03533970192074776,
-0.0661897286772728,
-0.10603424161672592,
-0.09861534088850021,
-0.24210473895072937,
-0.4882795214653015,
-0.03389804810285568,
-0.37160128355026245,
0.2611177861690521,
0.04200632870197296,
0.2969750761985779,
-0.04393881931900978,
0.10577141493558884,
0.3316418528556824,
0.02959405817091465,
0.5544953346252441,
-0.4164329469203949,
-0.1365627944469452,
0.1310189813375473,
-0.3980678915977478,
-0.287352055311203,
0.07072918117046356,
-0.17073014378547668,
0.2828143537044525,
0.5884535312652588,
0.5143989324569702,
-0.056327927857637405,
-0.20539149641990662,
0.008656640537083149,
0.12120924144983292,
0.15537573397159576,
-0.26610511541366577,
-0.35467442870140076,
0.1345769464969635,
-0.1294955462217331,
0.12682420015335083,
-0.04238705709576607,
0.1320044994354248,
0.12328419834375381,
-0.14204750955104828,
0.019436458125710487,
0.11549408733844757,
0.23819869756698608,
0.17040187120437622,
0.12061531841754913,
0.09302537888288498,
0.3004205524921417,
0.26730746030807495,
-0.07237155735492706,
0.062234845012426376,
0.3293827176094055,
-0.12490686774253845,
-0.09985700249671936,
0.213240385055542,
0.024112878367304802,
0.32807523012161255,
0.31968408823013306,
0.14985761046409607,
0.030649926513433456,
0.1590185910463333,
0.277495801448822,
-0.22449897229671478,
0.2721707820892334,
0.3960229158401489,
0.3916812241077423,
-0.4936525225639343,
-0.5062224268913269,
-0.020567122846841812,
0.4649196267127991,
-0.146078959107399,
0.27148303389549255,
-0.7679566144943237,
0.0800638273358345,
0.0503082275390625,
0.09993046522140503,
0.7852848768234253,
-0.473132848739624,
0.03797152638435364,
-0.31195905804634094,
0.2154320776462555,
-0.04817584902048111,
-0.5948628187179565,
0.13347746431827545,
-0.18472863733768463,
-0.3472977876663208,
0.02756311558187008,
-0.10907606780529022,
0.203195258975029,
0.5102791786193848,
0.15832272171974182,
0.2661413252353668,
0.34042713046073914,
0.07846250385046005,
-0.026243776082992554,
0.35041823983192444,
0.5003806352615356,
-0.3187171518802643,
0.1645900458097458,
0.0327548012137413,
0.19393563270568848,
-0.2070087194442749,
0.029859626665711403,
0.0704520121216774,
-0.06115071102976799,
0.029334740713238716,
-0.3183436393737793,
-0.22798801958560944,
-0.3977982699871063,
0.19637145102024078,
-0.0764126405119896,
0.28263553977012634,
0.39007842540740967,
0.2677482068538666,
-0.0713077187538147,
0.09016023576259613,
0.008547738194465637,
0.05348880961537361,
0.26379457116127014,
0.23342007398605347,
0.38241082429885864,
-0.463977575302124,
-0.028704103082418442,
-0.10095904767513275,
-0.25060489773750305,
-0.2602866291999817,
-0.15324246883392334,
-0.11850912123918533,
-0.12253845483064651,
0.4491189420223236,
0.165728360414505,
0.1570969671010971,
-0.2264566421508789,
0.2328822761774063,
0.07904175668954849,
-0.10990691930055618,
-0.012514294125139713,
0.09148120880126953,
0.022349601611495018,
0.6711224317550659,
-0.2834819257259369,
-0.5138154029846191,
-0.03429766371846199,
0.39423149824142456,
0.249960795044899,
-0.09522737562656403,
0.04766494780778885,
0.21297049522399902,
-0.2575138807296753,
-0.13550223410129547,
0.15353015065193176,
-0.10335838049650192,
-0.09918630868196487,
0.10592187196016312,
0.02085018903017044,
-0.22452537715435028,
0.25469374656677246,
-0.1348884105682373,
-0.15127931535243988,
-0.053231026977300644,
-0.19176743924617767,
-0.2759397029876709,
-0.25289836525917053,
-0.18008317053318024,
-0.35165494680404663,
-0.21634714305400848,
0.23138156533241272,
0.02472802624106407,
0.1297437995672226,
0.4729887545108795,
-0.1329038292169571,
0.0583198145031929,
0.09011109173297882,
0.21108660101890564,
-0.018965739756822586,
-0.25146663188934326,
0.07792297750711441,
-0.025827771052718163,
-0.0658426433801651,
0.07955815643072128,
-0.08679791539907455,
-0.14740200340747833,
-0.011754525825381279,
0.18517281115055084,
-0.022486131638288498,
-0.2631608843803406,
0.32961928844451904,
-0.14561499655246735,
-0.2043028622865677,
-0.4302749037742615,
-0.062250856310129166,
0.05215882882475853,
-0.021854769438505173,
-0.10426001250743866,
0.2791089117527008,
-0.29837727546691895,
-0.27128249406814575,
0.4427228271961212,
-0.2003641575574875,
-0.09690336138010025,
-0.0010563188698142767,
0.28708505630493164,
0.45101019740104675,
-0.0946665108203888,
-0.10054177790880203,
0.029075907543301582,
0.2644410729408264,
0.06920474767684937,
0.13745875656604767,
-0.09657887369394302,
0.18162477016448975,
0.26669299602508545,
0.33893153071403503,
0.1272508054971695,
0.1346454620361328,
-0.25316497683525085,
0.002317215548828244,
0.0016433612909168005,
-0.2403116077184677,
-0.17648985981941223,
0.5670015811920166,
0.032863639295101166,
0.13805897533893585,
0.05161353945732117,
0.3361944556236267,
0.23635132610797882,
-0.009384376928210258,
-0.10602430254220963,
0.08108238130807877,
-0.2906019985675812,
0.06119489297270775,
0.1536387801170349,
0.2585485875606537,
0.25910690426826477,
0.44664907455444336,
0.11974850296974182,
-0.0015336296055465937,
0.4460708796977997,
0.27422669529914856,
0.27141061425209045,
0.4872281551361084,
0.26531076431274414,
-0.039557382464408875,
-0.37832391262054443,
0.20970004796981812,
0.503713846206665,
-0.33295753598213196,
-0.05749240145087242,
-0.057808373123407364,
0.22342638671398163,
-0.24945592880249023,
-0.38422197103500366,
-0.26097792387008667,
0.3868536353111267,
-0.16557934880256653,
-0.25823453068733215,
0.2212105095386505,
-0.0687718316912651,
-0.0023640235885977745,
0.17765675485134125,
-0.22046029567718506,
0.14243964850902557,
0.7928740978240967,
0.13015317916870117,
0.04412274435162544,
-0.38913896679878235,
-0.34113845229148865,
-0.14999006688594818,
0.16975833475589752,
-0.13819855451583862,
0.18285223841667175,
-0.3203029930591583,
-0.01006581075489521,
-0.0007453607977367938,
0.3008364140987396,
0.37649330496788025,
0.2772645950317383,
-0.14288492500782013,
0.10062981396913528,
-0.022189883515238762,
0.16126039624214172,
0.007400527596473694,
0.18288114666938782,
0.032288625836372375,
0.17487123608589172,
0.1654180884361267,
-0.10536801069974899,
-0.09015922993421555,
-0.45338311791419983,
0.030217966064810753,
0.35374969244003296,
-0.1493939459323883,
0.15781432390213013,
-0.3038739562034607,
-0.15540525317192078,
0.010965600609779358,
0.2941298186779022,
-0.2735162079334259,
-0.08983931690454483,
0.4953569173812866,
-0.4910951256752014,
0.0730636939406395,
-0.15138255059719086,
0.02531280554831028,
-0.07980023324489594,
0.5650858879089355,
0.3381139039993286,
0.010556614957749844,
-0.41154131293296814,
-0.11511464416980743,
-0.5973330736160278,
-0.07119506597518921,
-0.32060500979423523,
0.2698095738887787,
0.07329872250556946,
0.29093435406684875,
0.07440748810768127,
0.12126530706882477,
0.4038819968700409,
-0.09338992089033127,
-0.08354319632053375,
0.35437941551208496,
-0.31334227323532104,
0.47695818543434143,
-0.24344345927238464,
-0.19460438191890717,
-0.08490987122058868,
-0.4186907708644867,
0.3781762719154358,
0.07536008954048157,
-0.14862288534641266,
-0.17376112937927246,
-0.0027929774951189756,
0.15443940460681915,
0.1478448212146759,
0.1885031908750534,
0.3548046052455902,
0.3634970486164093,
0.04129442945122719,
0.007807601243257523,
-0.11902499198913574,
0.1936972290277481,
-0.04145526513457298,
0.33111101388931274,
-0.05833513289690018,
0.0689004436135292,
-0.3055816888809204,
0.16664667427539825,
0.11304130405187607,
-0.10937730222940445,
0.0038676015101373196,
-0.23709765076637268,
-0.32719334959983826,
-0.05050897225737572,
-0.03897659853100777,
0.31715983152389526,
0.09527376294136047,
0.40332382917404175,
0.13998936116695404,
-0.09344550222158432,
-0.1850917637348175,
-0.08013796806335449,
-0.02880479209125042,
-0.2668255865573883,
-0.2905767858028412,
-0.4305558204650879,
0.22771784663200378,
-0.25289055705070496,
0.16132135689258575,
-0.23314769566059113,
-0.32374733686447144,
0.30408573150634766,
-0.024933623149991035,
-0.36816152930259705,
0.3654678761959076,
-0.3870628774166107,
-0.08566883206367493,
-0.14730599522590637,
0.02906377613544464,
-0.09814479202032089,
-0.44488707184791565,
0.19132541120052338,
-0.1197810098528862
] |
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.3866337835788727,
-0.2725811004638672,
-0.07879332453012466,
0.3493689298629761,
-0.10609238594770432,
-0.00516586285084486,
0.37053728103637695,
0.12684975564479828,
0.054780419915914536,
-0.016425825655460358,
0.07629195600748062,
0.4323449432849884,
0.16459403932094574,
0.1775635927915573,
-0.14250174164772034,
0.06904073804616928,
0.22057965397834778,
-0.06273350864648819,
0.1990935057401657,
-0.013120533898472786,
-0.1687244176864624,
0.1928427368402481,
-0.4963889718055725,
-0.002165605779737234,
-0.41065454483032227,
-0.12482138723134995,
0.10404537618160248,
0.10486894845962524,
-0.13572800159454346,
-0.20465058088302612,
-0.21406717598438263,
0.13701212406158447,
-0.1355690062046051,
0.5738762617111206,
-0.00012297084322199225,
-0.19847312569618225,
0.054987840354442596,
0.26330673694610596,
0.07641605287790298,
0.08308642357587814,
-0.13295391201972961,
-0.26017528772354126,
-0.042412545531988144,
-0.08291500061750412,
0.12447315454483032,
0.2161739617586136,
-0.0585637129843235,
-0.46460434794425964,
-0.00966295413672924,
0.08433524519205093,
0.06314408779144287,
0.37648168206214905,
-0.28174418210983276,
0.014385828748345375,
-0.3346054255962372,
0.15811856091022491,
-0.17408885061740875,
0.05078718066215515,
0.28528645634651184,
-0.18645229935646057,
-0.11755947768688202,
0.30481013655662537,
-0.047498900443315506,
0.3209558427333832,
0.0011857592035084963,
-0.03222416341304779,
0.027019895613193512,
-0.44422903656959534,
0.1620766669511795,
0.37069252133369446,
0.005563064012676477,
-0.07273994386196136,
-0.18548859655857086,
-0.26900234818458557,
-0.3177761733531952,
-0.1561564803123474,
0.2311842441558838,
0.12887726724147797,
0.1493101865053177,
-0.013224995695054531,
-0.5340880155563354,
0.1374524086713791,
0.38665980100631714,
-0.07135014981031418,
-0.1523338407278061,
0.020111674442887306,
0.11030331254005432,
0.30946654081344604,
0.3142452538013458,
0.12283955514431,
-0.04554453864693642,
-0.1715078055858612,
0.2885456383228302,
0.1829546093940735,
-0.7955272197723389,
-0.04171011224389076,
0.24892885982990265,
-0.11296017467975616,
-0.06155221536755562,
-0.18146586418151855,
-0.09858933836221695,
0.35035210847854614,
-0.33401262760162354,
0.10812171548604965,
0.33531588315963745,
-0.09714949876070023,
0.0022062796633690596,
0.0807371437549591,
0.016070149838924408,
-0.16441062092781067,
-0.30380934476852417,
0.10167232900857925,
0.10551120340824127,
-0.3424447178840637,
-0.07126156240701675,
0.10951659828424454,
-0.2824559807777405,
-0.08732789009809494,
-0.14788800477981567,
0.05899376794695854,
-0.21595992147922516,
-0.06327296793460846,
0.10974790155887604,
0.07937046885490417,
-0.019251162186264992,
0.8041566014289856,
-0.269022136926651,
0.08701783418655396,
-0.4744412899017334,
-0.5820881724357605,
-0.018575040623545647,
-0.14689648151397705,
-0.35913318395614624,
0.19679632782936096,
0.10421926528215408,
-0.028777431696653366,
0.1002882570028305,
0.3114526569843292,
0.08657155930995941,
-0.22788846492767334,
0.30165091156959534,
-0.49758416414260864,
0.2251562774181366,
0.11890871077775955,
0.14715884625911713,
0.5624079704284668,
-0.1207757443189621,
0.3020247220993042,
-0.1247040331363678,
0.24048952758312225,
-0.5386422276496887,
-0.22626183927059174,
0.13901078701019287,
-0.04697047919034958,
0.09063369780778885,
0.11504188179969788,
-0.4588499665260315,
0.49707865715026855,
0.3395262360572815,
-0.24713222682476044,
-0.1647285521030426,
-0.1944389045238495,
-0.6674047112464905,
-0.1534184068441391,
-0.037628866732120514,
0.1841217577457428,
-0.3353410065174103,
0.22062145173549652,
-0.34663906693458557,
0.15603239834308624,
0.4348997175693512,
0.6155385971069336,
-0.189930260181427,
0.3575473427772522,
-0.050650060176849365,
0.20215439796447754,
-0.016386140137910843,
-0.03977130725979805,
-0.3898438513278961,
0.5365142226219177,
-0.16957198083400726,
0.011268865317106247,
-0.22578778862953186,
0.16068953275680542,
0.2166394591331482,
-0.060812558978796005,
0.35973796248435974,
0.2520621418952942,
0.0037233068142086267,
0.4067164659500122,
-0.22686083614826202,
-0.14847572147846222,
0.180609792470932,
0.03565087914466858,
-0.050955627113580704,
-0.10924477130174637,
-0.020767804235219955,
-0.2912408709526062,
0.32733094692230225,
0.03461358696222305,
0.019051911309361458,
0.4201275408267975,
-0.37679019570350647,
-0.17811819911003113,
-0.1492091417312622,
-0.24709779024124146,
-0.0693647637963295,
0.3475504517555237,
-0.008294133469462395,
0.03453543037176132,
0.453082412481308,
0.027628734707832336,
0.2079562097787857,
0.12411898374557495,
-0.041028041392564774,
-0.07881296426057816,
-0.11966788023710251,
-0.08743363618850708,
-0.19142967462539673,
-0.15839406847953796,
-0.041138507425785065,
0.4514875113964081,
0.2057488113641739,
-0.12299425154924393,
-0.054004501551389694,
-0.1302855759859085,
0.09773646295070648,
0.0768280103802681,
-0.19901591539382935,
-0.0822811871767044,
0.06427625566720963,
0.027988430112600327,
-0.08689752966165543,
0.2680094242095947,
0.4869924485683441,
-0.07008621096611023,
0.1350850760936737,
0.08798536658287048,
0.4050620198249817,
-0.02311157062649727,
-0.017242467030882835,
-0.11152040213346481,
0.11518684029579163,
-0.24092736840248108,
-0.033332373946905136,
0.31634071469306946,
0.11588653922080994,
0.39955687522888184,
0.030729584395885468,
-0.10514605045318604,
0.026766633614897728,
0.2851708233356476,
0.1078847199678421,
0.04600527882575989,
0.31088393926620483,
0.31362465023994446,
0.21517685055732727,
0.3205103278160095,
-0.106169193983078,
0.3456173539161682,
0.6657007336616516,
0.0833149328827858,
-0.310491681098938,
0.049639735370874405,
-0.15181924402713776,
-0.35815712809562683,
0.014146105386316776,
-0.12260730564594269,
0.5757824182510376,
0.0022506029345095158,
0.24728810787200928,
-0.03825550526380539,
-0.11481351405382156,
-0.08098255842924118,
-0.014108006842434406,
0.10800957679748535,
0.21079126000404358,
-0.07103285938501358,
0.33244186639785767,
-0.0037924188654869795,
-0.10003349184989929,
-0.21483510732650757,
0.3497826159000397,
0.207693949341774,
-0.28338274359703064,
0.10747386515140533,
-0.30346938967704773,
0.20223571360111237,
0.15993179380893707,
-0.10360775887966156,
-0.30136391520500183,
-0.2368094027042389,
-0.12218362092971802,
-0.08861931413412094,
0.1853170394897461,
-0.014241421595215797,
0.2501135766506195,
-0.09630273282527924,
-0.11537633836269379,
-0.03657395765185356,
0.03501244634389877,
-0.11283406615257263,
-0.15602555871009827,
-0.011422662995755672,
0.28044864535331726,
0.19014643132686615,
0.07296576350927353,
-0.05632820352911949,
-0.2777395248413086,
-0.12467657029628754,
-0.24367517232894897,
-0.09375527501106262,
0.14928080141544342,
0.07661101967096329,
-0.16368894279003143,
-0.10741505771875381,
-0.20783275365829468,
0.1690102219581604,
0.15896770358085632,
-0.3020035922527313,
-0.20187801122665405,
0.0461156889796257,
-0.11854910105466843,
-0.23148523271083832,
-0.010622276924550533,
-0.1588875949382782,
-0.09496452659368515,
-0.10994742810726166,
0.2879398465156555,
-0.16724719107151031,
0.3199920058250427,
-0.19329845905303955,
0.05272122472524643,
-0.0889679417014122,
-0.11601181328296661,
-0.04255574569106102,
-0.3604641258716583,
-0.3457469642162323,
-0.007407736033201218,
-0.04194549843668938,
-0.2252168208360672,
-0.14059635996818542,
0.07718778401613235,
0.1546163111925125,
0.15816017985343933,
-0.18233633041381836,
0.1749543696641922,
-0.38032642006874084,
0.1397096812725067,
0.08690934628248215,
0.022016232833266258,
0.4934561550617218,
-0.0037515033036470413,
0.06885956227779388,
0.0072936718352139,
-0.4403318464756012,
-0.062973752617836,
0.29776039719581604,
0.023054921999573708,
0.01959352195262909,
0.3518146276473999,
0.051364023238420486,
0.63152676820755,
0.4889097511768341,
-0.15075823664665222,
0.19872786104679108,
-0.04778289049863815,
-0.11157914996147156,
-0.39965328574180603,
-0.211954265832901,
0.11171211302280426,
-0.2826229929924011,
0.12542738020420074,
0.41685765981674194,
-0.011739443056285381,
-0.43633362650871277,
-0.009313385002315044,
0.2886064052581787,
-0.2262660264968872,
-0.03353458270430565,
0.14073222875595093,
-0.1364981085062027,
0.15566158294677734,
0.24927891790866852,
-0.15197715163230896,
-0.3358052670955658,
-0.04430108889937401,
-0.06554819643497467,
-0.10168848186731339,
-0.10399366170167923,
-0.27545490860939026,
-0.47828856110572815,
-0.011619744822382927,
-0.37799933552742004,
0.23008568584918976,
0.04780837520956993,
0.34983155131340027,
-0.04422468692064285,
0.08695735782384872,
0.3212324380874634,
-0.01689903438091278,
0.5688454508781433,
-0.39107364416122437,
-0.10881926119327545,
0.15168088674545288,
-0.3594425320625305,
-0.288334459066391,
0.03068782389163971,
-0.15070974826812744,
0.28838106989860535,
0.6098182201385498,
0.5065742135047913,
-0.04169139266014099,
-0.15379604697227478,
0.007669141516089439,
0.09767580777406693,
0.12819023430347443,
-0.2506241202354431,
-0.3729524314403534,
0.12175226211547852,
-0.095906101167202,
0.1306331604719162,
0.01431902777403593,
0.11157218366861343,
0.12505975365638733,
-0.16160708665847778,
0.023132678121328354,
0.08527666330337524,
0.22212238609790802,
0.1544778198003769,
0.1185791864991188,
0.09780614823102951,
0.33974793553352356,
0.25318315625190735,
-0.09061215072870255,
0.021265972405672073,
0.3452211022377014,
-0.11882561445236206,
-0.10191142559051514,
0.2752825915813446,
0.01477855071425438,
0.3062778115272522,
0.35899749398231506,
0.11247940361499786,
0.02898533269762993,
0.18591953814029694,
0.26042526960372925,
-0.21582457423210144,
0.24470512568950653,
0.413766086101532,
0.35236918926239014,
-0.47059449553489685,
-0.487020343542099,
-0.01803029701113701,
0.4810301661491394,
-0.14150336384773254,
0.318624347448349,
-0.7869358658790588,
0.08054344356060028,
0.03088347055017948,
0.06852050125598907,
0.7341234683990479,
-0.4244519770145416,
0.08448866754770279,
-0.27325838804244995,
0.2042396366596222,
-0.04537978395819664,
-0.5877482891082764,
0.14249369502067566,
-0.19937239587306976,
-0.33856892585754395,
0.026543552055954933,
-0.10841789096593857,
0.17293334007263184,
0.4824616611003876,
0.19011543691158295,
0.2567997872829437,
0.33606407046318054,
0.1500343233346939,
-0.01271684281527996,
0.307515949010849,
0.4955807626247406,
-0.3149344027042389,
0.15518565475940704,
0.029793215915560722,
0.21411480009555817,
-0.19111615419387817,
0.03499983996152878,
0.07685811072587967,
-0.045210544019937515,
-0.005710860714316368,
-0.34798532724380493,
-0.19827832281589508,
-0.37373316287994385,
0.21662785112857819,
-0.015299773775041103,
0.2827971875667572,
0.3574749827384949,
0.24374447762966156,
-0.05981322377920151,
0.08771640062332153,
-0.026788225397467613,
0.08559615164995193,
0.2774119973182678,
0.27294233441352844,
0.3718233108520508,
-0.4484907388687134,
-0.032968394458293915,
-0.08183262497186661,
-0.18957966566085815,
-0.2662757635116577,
-0.1657213419675827,
-0.13838717341423035,
-0.13470907509326935,
0.5105388760566711,
0.17554627358913422,
0.18540997803211212,
-0.19831375777721405,
0.2382969856262207,
0.13685676455497742,
-0.14183783531188965,
-0.015467834658920765,
0.09106964617967606,
0.03672580420970917,
0.640950620174408,
-0.3012278079986572,
-0.49837368726730347,
-0.04416181892156601,
0.4551082253456116,
0.23641033470630646,
-0.08262089639902115,
0.03786948695778847,
0.22276417911052704,
-0.25936073064804077,
-0.127549946308136,
0.1750159114599228,
-0.12043323367834091,
-0.13313400745391846,
0.1422906368970871,
-0.016994651407003403,
-0.24292993545532227,
0.23972831666469574,
-0.12397465854883194,
-0.14859344065189362,
-0.06956078857183456,
-0.19819368422031403,
-0.27454304695129395,
-0.2284976989030838,
-0.19229955971240997,
-0.35339581966400146,
-0.23019015789031982,
0.22551433742046356,
0.02703951485455036,
0.131220743060112,
0.41113048791885376,
-0.12426653504371643,
0.06341367959976196,
0.11516757309436798,
0.15110968053340912,
-0.04773954302072525,
-0.21922346949577332,
0.08489135652780533,
-0.04546711593866348,
-0.08864052593708038,
0.12409591674804688,
-0.08634959906339645,
-0.13493186235427856,
-0.035948898643255234,
0.19074973464012146,
-0.02935101091861725,
-0.2500729262828827,
0.36382856965065,
-0.12293623387813568,
-0.247305765748024,
-0.41245055198669434,
-0.04349817335605621,
0.07814033329486847,
-0.00846070609986782,
-0.10438708961009979,
0.27354905009269714,
-0.30384957790374756,
-0.2333778738975525,
0.4588102400302887,
-0.18313947319984436,
-0.04932932183146477,
-0.01648436114192009,
0.2902965545654297,
0.44137030839920044,
-0.0644911378622055,
-0.10115321725606918,
0.02763982117176056,
0.20802953839302063,
0.08459347486495972,
0.16115079820156097,
-0.13264982402324677,
0.194624662399292,
0.2788701057434082,
0.34370875358581543,
0.1637822985649109,
0.07356708496809006,
-0.2542279362678528,
-0.0023203729651868343,
-0.004193938337266445,
-0.25748953223228455,
-0.2087835818529129,
0.5838804244995117,
0.09643593430519104,
0.11977797001600266,
0.04113681986927986,
0.3612362742424011,
0.1861499845981598,
-0.009371916763484478,
-0.07118228077888489,
0.08699537068605423,
-0.3279542028903961,
0.06981157511472702,
0.1804550290107727,
0.24346448481082916,
0.2993232011795044,
0.4279681146144867,
0.09179109334945679,
0.004231186583638191,
0.4806728661060333,
0.2743300795555115,
0.25569725036621094,
0.5029736161231995,
0.24374529719352722,
-0.024836979806423187,
-0.38444530963897705,
0.22351916134357452,
0.4877792298793793,
-0.3467884361743927,
-0.038670510053634644,
-0.03562971577048302,
0.23982000350952148,
-0.2759625315666199,
-0.36806362867355347,
-0.31117063760757446,
0.36393842101097107,
-0.16866201162338257,
-0.25183340907096863,
0.2508213520050049,
-0.053662825375795364,
0.011008694767951965,
0.18838846683502197,
-0.207102969288826,
0.15624333918094635,
0.8072531819343567,
0.12216956168413162,
0.00702217873185873,
-0.39409589767456055,
-0.3178669512271881,
-0.19333171844482422,
0.17798306047916412,
-0.1600324809551239,
0.18320602178573608,
-0.3481115400791168,
-0.013661504723131657,
-0.0037106149829924107,
0.3205561637878418,
0.37187719345092773,
0.2885124981403351,
-0.130416601896286,
0.04779691621661186,
-0.029957987368106842,
0.1783384531736374,
-0.02601361647248268,
0.21893355250358582,
0.028329215943813324,
0.17764651775360107,
0.14948362112045288,
-0.10872133821249008,
-0.08027659356594086,
-0.39595991373062134,
0.051072362810373306,
0.3922520875930786,
-0.18919789791107178,
0.1715061515569687,
-0.387860506772995,
-0.14628483355045319,
0.0034630186855793,
0.29934245347976685,
-0.25320449471473694,
-0.1017913967370987,
0.5167980194091797,
-0.4817173182964325,
0.08819360285997391,
-0.1758195161819458,
0.026063786819577217,
-0.0718231350183487,
0.563106894493103,
0.2815415561199188,
-0.01572292298078537,
-0.3569282293319702,
-0.09537816792726517,
-0.6198188662528992,
-0.019546672701835632,
-0.3267100751399994,
0.323416143655777,
0.06498493254184723,
0.3096294701099396,
0.05098424479365349,
0.11596836894750595,
0.389309823513031,
-0.12461145967245102,
-0.09644441306591034,
0.32717692852020264,
-0.3246980607509613,
0.44326815009117126,
-0.22336091101169586,
-0.19830837845802307,
-0.07271738350391388,
-0.4446120858192444,
0.38807281851768494,
0.05435647442936897,
-0.15465179085731506,
-0.1481701284646988,
-0.059766121208667755,
0.15541641414165497,
0.17243066430091858,
0.18925411999225616,
0.3503003418445587,
0.33317968249320984,
0.0380781851708889,
-0.021267911419272423,
-0.16546504199504852,
0.15533924102783203,
-0.04201610013842583,
0.35191071033477783,
-0.08520814031362534,
0.06823883205652237,
-0.2896394729614258,
0.17770378291606903,
0.0935719907283783,
-0.11462961137294769,
0.01636563241481781,
-0.20131336152553558,
-0.35734841227531433,
-0.027392873540520668,
-0.038927748799324036,
0.3227158784866333,
0.07990189641714096,
0.3904702663421631,
0.07981285452842712,
-0.08450125902891159,
-0.16204676032066345,
-0.11616898328065872,
-0.022911056876182556,
-0.3266754448413849,
-0.299213171005249,
-0.4464145600795746,
0.2472546398639679,
-0.2571524977684021,
0.10948199033737183,
-0.2349528819322586,
-0.33308514952659607,
0.3025573790073395,
0.0018812589114531875,
-0.3634395897388458,
0.34032025933265686,
-0.4263154864311218,
-0.0976775512099266,
-0.156745046377182,
0.07318585366010666,
-0.08853673934936523,
-0.44505375623703003,
0.24541659653186798,
-0.11635119467973709
] |
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.4096490144729614,
-0.3040941059589386,
-0.08470116555690765,
0.3398917019367218,
-0.08970021456480026,
0.01273383293300867,
0.35276123881340027,
0.11814624816179276,
0.05821249261498451,
0.009482868015766144,
0.07270276546478271,
0.4454631805419922,
0.16307352483272552,
0.18932944536209106,
-0.14008459448814392,
0.030221184715628624,
0.2145637422800064,
-0.05549100041389465,
0.1930125504732132,
-0.009090309031307697,
-0.1625768542289734,
0.15560239553451538,
-0.502361536026001,
0.006112688221037388,
-0.4096406400203705,
-0.122415691614151,
0.11342652142047882,
0.11840233951807022,
-0.13675464689731598,
-0.2299797534942627,
-0.235691100358963,
0.12764254212379456,
-0.0973546952009201,
0.571878969669342,
-0.0001234950468642637,
-0.18870623409748077,
0.039246588945388794,
0.27531349658966064,
0.0935695543885231,
0.07435912638902664,
-0.1399451345205307,
-0.267549604177475,
-0.04831541329622269,
-0.09679397940635681,
0.12211396545171738,
0.2130555361509323,
-0.06752076745033264,
-0.4581291079521179,
-0.003836903953924775,
0.08698740601539612,
0.0546000674366951,
0.3697355091571808,
-0.3081154525279999,
0.028556209057569504,
-0.3477623760700226,
0.14822980761528015,
-0.16533604264259338,
0.0483659990131855,
0.27275383472442627,
-0.18068531155586243,
-0.11240067332983017,
0.3173138201236725,
-0.07486657798290253,
0.3036651015281677,
-0.016622141003608704,
-0.056667521595954895,
0.05283471941947937,
-0.4617328345775604,
0.1841142773628235,
0.34886667132377625,
0.004646428860723972,
-0.07339819520711899,
-0.1476437896490097,
-0.2400643229484558,
-0.33163541555404663,
-0.1445305198431015,
0.20600974559783936,
0.1393589973449707,
0.1707959622144699,
-0.0030376214999705553,
-0.5398432016372681,
0.14571119844913483,
0.35678842663764954,
-0.0727698802947998,
-0.1326306015253067,
0.01578965224325657,
0.12141040712594986,
0.3247835636138916,
0.3295474052429199,
0.12826697528362274,
-0.039319250732660294,
-0.18619805574417114,
0.30626994371414185,
0.21307049691677094,
-0.7936055064201355,
-0.04848814755678177,
0.2307215929031372,
-0.11614492535591125,
-0.06669747829437256,
-0.16934452950954437,
-0.10443715006113052,
0.3401467800140381,
-0.33806437253952026,
0.10364867001771927,
0.29657885432243347,
-0.09406374394893646,
0.011503905057907104,
0.10553230345249176,
-0.02197064645588398,
-0.17200613021850586,
-0.3138698935508728,
0.08857572078704834,
0.11085063219070435,
-0.3309870660305023,
-0.052016809582710266,
0.12647542357444763,
-0.2921321392059326,
-0.08321564644575119,
-0.131423220038414,
0.04335542395710945,
-0.21413396298885345,
-0.06579253822565079,
0.12193700671195984,
0.08765925467014313,
-0.020529037341475487,
0.8091928958892822,
-0.28013747930526733,
0.10474929213523865,
-0.47913822531700134,
-0.590672492980957,
-0.01831272803246975,
-0.1310722380876541,
-0.34975123405456543,
0.21596406400203705,
0.11775364726781845,
-0.0320882648229599,
0.1305219531059265,
0.3339616358280182,
0.04656032472848892,
-0.2266201376914978,
0.335783451795578,
-0.5207979679107666,
0.20829284191131592,
0.10602068901062012,
0.15331481397151947,
0.5560804009437561,
-0.1143067255616188,
0.31063494086265564,
-0.1215611919760704,
0.2645984888076782,
-0.5323985815048218,
-0.23795899748802185,
0.1448972523212433,
-0.052209075540304184,
0.10526373237371445,
0.12186331301927567,
-0.4693046510219574,
0.49627622961997986,
0.32396870851516724,
-0.2415212243795395,
-0.1572943776845932,
-0.19355088472366333,
-0.6807102560997009,
-0.15663549304008484,
-0.04826996102929115,
0.16444891691207886,
-0.3335207402706146,
0.2270425409078598,
-0.33178213238716125,
0.14594416320323944,
0.44637763500213623,
0.5977524518966675,
-0.19457612931728363,
0.3576439917087555,
-0.023772383108735085,
0.19981107115745544,
-0.012190330773591995,
-0.05912422016263008,
-0.39438697695732117,
0.5213029384613037,
-0.18123206496238708,
-0.0069300588220357895,
-0.21874406933784485,
0.16812583804130554,
0.2308540791273117,
-0.058527231216430664,
0.32842981815338135,
0.27403753995895386,
0.018239574506878853,
0.4006504714488983,
-0.2312323898077011,
-0.14047771692276,
0.17452067136764526,
0.022058948874473572,
-0.06645707041025162,
-0.09737106412649155,
-0.010621492750942707,
-0.2823178172111511,
0.3429296910762787,
0.01607394404709339,
0.01907140389084816,
0.4239671230316162,
-0.3839467167854309,
-0.17661426961421967,
-0.14084771275520325,
-0.2507997155189514,
-0.0771213173866272,
0.3548492193222046,
-0.01619941182434559,
0.033052586019039154,
0.43603426218032837,
0.029518529772758484,
0.19479018449783325,
0.12158199399709702,
-0.0341641940176487,
-0.0828239917755127,
-0.12454746663570404,
-0.09145741164684296,
-0.17770341038703918,
-0.16827797889709473,
-0.015416400507092476,
0.4407099187374115,
0.20545627176761627,
-0.11365833133459091,
-0.04486534744501114,
-0.14420388638973236,
0.09083794057369232,
0.09586875140666962,
-0.2234877347946167,
-0.09672632813453674,
0.09802327305078506,
0.039365511387586594,
-0.08587893843650818,
0.26149770617485046,
0.47359317541122437,
-0.06477060168981552,
0.1389826238155365,
0.08860424906015396,
0.3819342255592346,
-0.05180596932768822,
0.012504102662205696,
-0.12271425873041153,
0.11790070682764053,
-0.24454016983509064,
-0.017745936289429665,
0.3030712902545929,
0.10273480415344238,
0.4237642288208008,
0.009325740858912468,
-0.12454733997583389,
0.018058883026242256,
0.29127079248428345,
0.14677441120147705,
0.04393201693892479,
0.32559850811958313,
0.3314087986946106,
0.2144911140203476,
0.3231859803199768,
-0.12541504204273224,
0.34350109100341797,
0.6361768841743469,
0.06327580660581589,
-0.3252546191215515,
0.031858574599027634,
-0.17833280563354492,
-0.3582536280155182,
0.02718273736536503,
-0.13578087091445923,
0.5621811151504517,
0.0008783229277469218,
0.23145198822021484,
-0.02755950391292572,
-0.10162858664989471,
-0.07707154005765915,
-0.027014553546905518,
0.11001220345497131,
0.22707442939281464,
-0.1055656298995018,
0.32356196641921997,
-0.012885781936347485,
-0.04542197659611702,
-0.23213812708854675,
0.3384536802768707,
0.22580097615718842,
-0.265506386756897,
0.11652418971061707,
-0.31235215067863464,
0.19253653287887573,
0.16999377310276031,
-0.11069190502166748,
-0.2881993353366852,
-0.2154276818037033,
-0.13649842143058777,
-0.08012572675943375,
0.19791370630264282,
-0.029754724353551865,
0.25902435183525085,
-0.139348104596138,
-0.11048106104135513,
-0.040014952421188354,
0.021155646070837975,
-0.1237184926867485,
-0.14526042342185974,
-0.016891710460186005,
0.274161159992218,
0.20890839397907257,
0.03794567659497261,
-0.05677998065948486,
-0.2843341529369354,
-0.09295497834682465,
-0.22367827594280243,
-0.10366314649581909,
0.15998980402946472,
0.06553401052951813,
-0.18826362490653992,
-0.08692587167024612,
-0.22045733034610748,
0.1812090426683426,
0.1581973284482956,
-0.2650477886199951,
-0.18302269279956818,
0.060165178030729294,
-0.11906705051660538,
-0.21224473416805267,
0.010241820476949215,
-0.15423722565174103,
-0.08834272623062134,
-0.09257849305868149,
0.28504425287246704,
-0.16939234733581543,
0.3432774245738983,
-0.21478605270385742,
0.06286083906888962,
-0.08641242235898972,
-0.10673676431179047,
-0.012178029865026474,
-0.34018266201019287,
-0.3741225004196167,
-0.0052904183976352215,
-0.02063966542482376,
-0.2117353081703186,
-0.14386703073978424,
0.07442595064640045,
0.15316621959209442,
0.14762187004089355,
-0.17373262345790863,
0.1924843043088913,
-0.392159640789032,
0.13613314926624298,
0.06133789196610451,
0.026609458029270172,
0.47949227690696716,
0.018400069326162338,
0.07409568876028061,
0.008716005831956863,
-0.4381611943244934,
-0.08410484343767166,
0.29060667753219604,
0.013411927036941051,
0.01838134042918682,
0.3479090631008148,
0.04139842838048935,
0.6347270011901855,
0.48616600036621094,
-0.14311522245407104,
0.19215434789657593,
-0.024266963824629784,
-0.15445780754089355,
-0.39374399185180664,
-0.2161060869693756,
0.12255209684371948,
-0.2629093825817108,
0.1614924818277359,
0.4107542335987091,
-0.004305746406316757,
-0.42279326915740967,
-0.0008048478630371392,
0.23212505877017975,
-0.2147950977087021,
-0.01548768486827612,
0.1425657570362091,
-0.12909896671772003,
0.1569969803094864,
0.25086545944213867,
-0.17388583719730377,
-0.34793907403945923,
-0.04628855735063553,
-0.059679895639419556,
-0.10705412924289703,
-0.10732732713222504,
-0.24660831689834595,
-0.48603880405426025,
-0.026288887485861778,
-0.3734416961669922,
0.24216148257255554,
0.0494486503303051,
0.32000648975372314,
-0.01820654794573784,
0.1125686913728714,
0.3193674087524414,
0.013595451600849628,
0.5667480826377869,
-0.38246867060661316,
-0.10516539961099625,
0.1393255591392517,
-0.3690507411956787,
-0.29614415764808655,
0.04722887650132179,
-0.1584998369216919,
0.27400922775268555,
0.5899746417999268,
0.5148349404335022,
-0.00920296274125576,
-0.17444546520709991,
-0.0026543946005403996,
0.12483002245426178,
0.13431036472320557,
-0.25580617785453796,
-0.37023282051086426,
0.12248072028160095,
-0.11862153559923172,
0.13111811876296997,
-0.007325245998799801,
0.12884244322776794,
0.11309243738651276,
-0.1465183049440384,
0.02536887675523758,
0.09866271913051605,
0.20526380836963654,
0.15492182970046997,
0.11516070365905762,
0.08339881151914597,
0.3108261823654175,
0.23290595412254333,
-0.08538730442523956,
0.02930913120508194,
0.3309389352798462,
-0.11404947191476822,
-0.0981435552239418,
0.24574600160121918,
0.029643559828400612,
0.31587931513786316,
0.3062434494495392,
0.11953803896903992,
0.050381749868392944,
0.176502987742424,
0.2736957371234894,
-0.21659547090530396,
0.2651928663253784,
0.40477311611175537,
0.3798926770687103,
-0.47518062591552734,
-0.4996892511844635,
-0.002137815346941352,
0.4812625050544739,
-0.1455399990081787,
0.2885551154613495,
-0.800827145576477,
0.09418139606714249,
0.04046018421649933,
0.07505609095096588,
0.7513070106506348,
-0.42839330434799194,
0.05473395437002182,
-0.29063859581947327,
0.18642093241214752,
-0.04015762358903885,
-0.5946903228759766,
0.14801885187625885,
-0.1938692182302475,
-0.35929766297340393,
0.026049982756376266,
-0.10810557007789612,
0.18945033848285675,
0.4942733645439148,
0.17049922049045563,
0.2647927701473236,
0.3171115219593048,
0.11560679227113724,
-0.011567001231014729,
0.32123225927352905,
0.5124130845069885,
-0.3162499964237213,
0.1704144924879074,
0.024561535567045212,
0.20731355249881744,
-0.216673344373703,
0.03326074406504631,
0.0919920951128006,
-0.039499472826719284,
0.005111799109727144,
-0.32492318749427795,
-0.19128724932670593,
-0.38383257389068604,
0.21793793141841888,
-0.050830770283937454,
0.29203158617019653,
0.3759084641933441,
0.26796120405197144,
-0.07150650024414062,
0.09682508558034897,
0.002558216918259859,
0.0619816817343235,
0.29237478971481323,
0.26260459423065186,
0.38422316312789917,
-0.47124090790748596,
-0.02783171646296978,
-0.10483013838529587,
-0.24019400775432587,
-0.2531825006008148,
-0.15867771208286285,
-0.1203276738524437,
-0.1395845264196396,
0.4965135455131531,
0.1751244068145752,
0.19039611518383026,
-0.2085006982088089,
0.22188979387283325,
0.12424533069133759,
-0.1349465399980545,
-0.018465815111994743,
0.0999101921916008,
0.026760661974549294,
0.6535868048667908,
-0.31038588285446167,
-0.501361608505249,
-0.031531497836112976,
0.4279744327068329,
0.267914354801178,
-0.08829489350318909,
0.031192833557724953,
0.230148047208786,
-0.25872185826301575,
-0.12866424024105072,
0.17158819735050201,
-0.12221754342317581,
-0.11439763009548187,
0.12232041358947754,
-0.009048143401741982,
-0.228537917137146,
0.2377549707889557,
-0.14738713204860687,
-0.16428455710411072,
-0.056266166269779205,
-0.19550301134586334,
-0.2799699008464813,
-0.24924661219120026,
-0.19935853779315948,
-0.36731505393981934,
-0.24899914860725403,
0.24815815687179565,
0.0355367474257946,
0.1180194541811943,
0.4483623206615448,
-0.12032317370176315,
0.0711580142378807,
0.11351567506790161,
0.18022359907627106,
-0.05374731123447418,
-0.21468877792358398,
0.08267054706811905,
-0.033027008175849915,
-0.08394649624824524,
0.11858977377414703,
-0.08269502967596054,
-0.13705386221408844,
-0.03799547255039215,
0.19255022704601288,
-0.023291103541851044,
-0.2450544536113739,
0.34101638197898865,
-0.12115611881017685,
-0.21603924036026,
-0.40861931443214417,
-0.04020702466368675,
0.07036534696817398,
0.001775340992026031,
-0.10672230273485184,
0.28224167227745056,
-0.3028363585472107,
-0.2639416456222534,
0.44807350635528564,
-0.19021034240722656,
-0.07750187069177628,
-0.015557750128209591,
0.298188179731369,
0.4519787132740021,
-0.08093314617872238,
-0.097651906311512,
0.01957591250538826,
0.23650527000427246,
0.08487453311681747,
0.13985849916934967,
-0.11997608840465546,
0.1827152520418167,
0.2626991271972656,
0.31648892164230347,
0.12392876297235489,
0.09855029731988907,
-0.25165122747421265,
0.0024660590570420027,
-0.01080081146210432,
-0.25535205006599426,
-0.21392834186553955,
0.5657914876937866,
0.060656238347291946,
0.12688152492046356,
0.03754936903715134,
0.3244931697845459,
0.20574136078357697,
-0.015821661800146103,
-0.07791636139154434,
0.0725625529885292,
-0.3115456700325012,
0.06094450131058693,
0.16315017640590668,
0.2488364577293396,
0.2783692479133606,
0.4251827895641327,
0.11010871082544327,
0.0030399621464312077,
0.47740375995635986,
0.28282231092453003,
0.26132678985595703,
0.5220367312431335,
0.23381362855434418,
-0.025584926828742027,
-0.365349143743515,
0.20011548697948456,
0.5069089531898499,
-0.3683280050754547,
-0.056822385638952255,
-0.0439150333404541,
0.2323499321937561,
-0.23889215290546417,
-0.3795402944087982,
-0.2639645040035248,
0.38895466923713684,
-0.16088157892227173,
-0.25684884190559387,
0.24350914359092712,
-0.04735605791211128,
0.0063970815390348434,
0.1846165657043457,
-0.20352603495121002,
0.15303531289100647,
0.8075755834579468,
0.12286461144685745,
-0.0009974385611712933,
-0.3829838037490845,
-0.3443286716938019,
-0.14430832862854004,
0.1634519100189209,
-0.14931809902191162,
0.1704648733139038,
-0.32394087314605713,
-0.027548134326934814,
-0.01924094930291176,
0.2792573571205139,
0.3590281307697296,
0.2796684801578522,
-0.12019503116607666,
0.07421568781137466,
-0.009749943390488625,
0.17169176042079926,
0.007582896389067173,
0.17885032296180725,
0.039596669375896454,
0.1739646941423416,
0.1511010378599167,
-0.11748594790697098,
-0.0779491439461708,
-0.43455982208251953,
0.06544764339923859,
0.39593878388404846,
-0.16495388746261597,
0.17454983294010162,
-0.35325101017951965,
-0.1534026712179184,
-0.00587720749899745,
0.298311322927475,
-0.2523602545261383,
-0.09578902274370193,
0.5177611112594604,
-0.48199957609176636,
0.08499357104301453,
-0.17642247676849365,
0.020175015553832054,
-0.07533826678991318,
0.5530556440353394,
0.2912755310535431,
-0.013978476636111736,
-0.3776097893714905,
-0.10374731570482254,
-0.5993496775627136,
-0.027002433314919472,
-0.327399879693985,
0.29988062381744385,
0.07102890312671661,
0.29134559631347656,
0.050797346979379654,
0.11129291355609894,
0.4081783592700958,
-0.09454365819692612,
-0.06407871097326279,
0.3450731337070465,
-0.32135850191116333,
0.44850459694862366,
-0.2388504296541214,
-0.19244636595249176,
-0.07288862764835358,
-0.4286517798900604,
0.3931478261947632,
0.06916218996047974,
-0.1504868119955063,
-0.1682019680738449,
-0.028213385492563248,
0.16364389657974243,
0.15252865850925446,
0.19525480270385742,
0.3520745038986206,
0.33595430850982666,
0.025095714256167412,
-0.0006476067355833948,
-0.12167423218488693,
0.20235082507133484,
-0.04884635657072067,
0.32068464159965515,
-0.058011773973703384,
0.0556006021797657,
-0.29949814081192017,
0.17744262516498566,
0.10826161503791809,
-0.11218821257352829,
0.008569740690290928,
-0.22283601760864258,
-0.3369593918323517,
-0.030914612114429474,
-0.04658643528819084,
0.337324321269989,
0.06868032366037369,
0.37294167280197144,
0.10673802345991135,
-0.07175015658140182,
-0.15523649752140045,
-0.10693707317113876,
-0.02283138409256935,
-0.28818780183792114,
-0.3033367097377777,
-0.45137396454811096,
0.2482391893863678,
-0.26328223943710327,
0.13368944823741913,
-0.22434024512767792,
-0.3340464234352112,
0.3018879294395447,
-0.002104027196764946,
-0.3622485399246216,
0.34944605827331543,
-0.4049952030181885,
-0.07516228407621384,
-0.15556341409683228,
0.06648197770118713,
-0.07479706406593323,
-0.44599688053131104,
0.22672222554683685,
-0.1301652044057846
] |
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.3987977206707001,
-0.33985647559165955,
-0.09195335954427719,
0.3478132486343384,
-0.10693040490150452,
0.030263762921094894,
0.370674192905426,
0.1026252955198288,
0.06230878829956055,
0.014974081888794899,
0.0955682322382927,
0.4472281336784363,
0.17406834661960602,
0.19854341447353363,
-0.15032874047756195,
0.032467301934957504,
0.2079116404056549,
-0.013935661874711514,
0.2080075442790985,
-0.022497735917568207,
-0.14968058466911316,
0.16760145127773285,
-0.463599294424057,
-0.00112154649104923,
-0.4276060163974762,
-0.150529682636261,
0.10849232226610184,
0.158368781208992,
-0.15400800108909607,
-0.23104792833328247,
-0.2729552388191223,
0.1561857908964157,
-0.07722003012895584,
0.5987081527709961,
-0.0001209586116601713,
-0.17843230068683624,
-0.015478672459721565,
0.26571542024612427,
0.08263325691223145,
0.02261250466108322,
-0.14891819655895233,
-0.24391047656536102,
-0.05087712034583092,
-0.10651855915784836,
0.12415608763694763,
0.24920503795146942,
-0.08153334259986877,
-0.47447970509529114,
0.034868523478507996,
0.09184569120407104,
0.07008830457925797,
0.36983975768089294,
-0.3573281764984131,
0.005834849085658789,
-0.40084198117256165,
0.11535482853651047,
-0.13982851803302765,
0.04625707119703293,
0.308488130569458,
-0.1706036627292633,
-0.14132826030254364,
0.35386261343955994,
-0.05107751116156578,
0.30192407965660095,
-0.0005347469705156982,
-0.09177056699991226,
0.05094186216592789,
-0.4716905355453491,
0.2142588049173355,
0.3441272974014282,
0.005004366859793663,
-0.044915758073329926,
-0.1534072309732437,
-0.23391802608966827,
-0.35662972927093506,
-0.14253543317317963,
0.19763199985027313,
0.11915626376867294,
0.14689412713050842,
0.023606887087225914,
-0.5594054460525513,
0.14245565235614777,
0.3238300085067749,
-0.06035979837179184,
-0.12074907124042511,
0.034040819853544235,
0.10241903364658356,
0.3249109983444214,
0.3525274395942688,
0.1588868945837021,
-0.0753306970000267,
-0.2213253676891327,
0.315090149641037,
0.19271321594715118,
-0.7903563976287842,
-0.0546727292239666,
0.21718275547027588,
-0.09191320836544037,
-0.057015854865312576,
-0.15115858614444733,
-0.11517632752656937,
0.3496938645839691,
-0.3474544286727905,
0.08734364807605743,
0.31797462701797485,
-0.06743312627077103,
0.03333510458469391,
0.07785705476999283,
-0.039838723838329315,
-0.16192257404327393,
-0.2981225252151489,
0.059245090931653976,
0.08211418241262436,
-0.309110552072525,
-0.06774351745843887,
0.1036742627620697,
-0.31283536553382874,
-0.08419782668352127,
-0.1708451360464096,
0.006215384230017662,
-0.21756570041179657,
-0.08678647130727768,
0.14960624277591705,
0.09327846020460129,
-0.0010677616810426116,
0.8402993083000183,
-0.26444706320762634,
0.0933748334646225,
-0.4438735544681549,
-0.6254178881645203,
-0.021487975493073463,
-0.09773030877113342,
-0.3783905506134033,
0.22891351580619812,
0.12024493515491486,
-0.052269622683525085,
0.1299932599067688,
0.32371801137924194,
0.041928231716156006,
-0.19851507246494293,
0.31970956921577454,
-0.5415105223655701,
0.18958312273025513,
0.06053148955106735,
0.14352206885814667,
0.5663231611251831,
-0.0963238999247551,
0.29231908917427063,
-0.12785130739212036,
0.23476243019104004,
-0.5155059695243835,
-0.24755623936653137,
0.17588983476161957,
-0.022386183962225914,
0.10438001155853271,
0.10098773241043091,
-0.45317575335502625,
0.5067193508148193,
0.29287606477737427,
-0.1959366500377655,
-0.15085342526435852,
-0.15621575713157654,
-0.6555331945419312,
-0.16082219779491425,
-0.07108446210622787,
0.1317821890115738,
-0.35833361744880676,
0.2057325392961502,
-0.3523511290550232,
0.14839330315589905,
0.4070551097393036,
0.6043969988822937,
-0.2138480246067047,
0.3782384693622589,
0.02456425130367279,
0.2347586750984192,
0.0038240249268710613,
-0.0866079106926918,
-0.3828226625919342,
0.5263622999191284,
-0.22832250595092773,
-0.0003066732897423208,
-0.19125820696353912,
0.17503847181797028,
0.2384456992149353,
-0.027258260175585747,
0.3657390773296356,
0.26326802372932434,
0.009416809305548668,
0.3835633397102356,
-0.22402140498161316,
-0.153307244181633,
0.16316334903240204,
0.052279289811849594,
-0.08037332445383072,
-0.10238072276115417,
-0.04639960080385208,
-0.29130807518959045,
0.3220103979110718,
-0.006335441954433918,
0.029031693935394287,
0.42831894755363464,
-0.377492755651474,
-0.19083170592784882,
-0.13737653195858002,
-0.24499765038490295,
-0.09539031982421875,
0.38245707750320435,
0.02390381693840027,
0.07063805311918259,
0.4634760320186615,
0.03868091106414795,
0.14959757030010223,
0.10425176471471786,
-0.017523426562547684,
-0.07937303930521011,
-0.09171614050865173,
-0.10167837888002396,
-0.18055960536003113,
-0.2226996272802353,
-0.06597016006708145,
0.44194895029067993,
0.22275792062282562,
-0.09889385104179382,
-0.039299700409173965,
-0.1586315929889679,
0.04305829107761383,
0.0839981883764267,
-0.2125140130519867,
-0.07890501618385315,
0.07000578194856644,
0.06417304277420044,
-0.07292792201042175,
0.260271817445755,
0.42531317472457886,
-0.07394648343324661,
0.17464984953403473,
0.11281488835811615,
0.3552785813808441,
-0.045874856412410736,
0.020368892699480057,
-0.1413392275571823,
0.1449814885854721,
-0.25915294885635376,
-0.052130572497844696,
0.2841014266014099,
0.08382996171712875,
0.45066994428634644,
0.023560797795653343,
-0.14254771173000336,
-0.014093471691012383,
0.2643783986568451,
0.17081257700920105,
0.04926946386694908,
0.3555659055709839,
0.33834177255630493,
0.23495304584503174,
0.3360345661640167,
-0.16318832337856293,
0.3445369303226471,
0.6126601696014404,
0.04175194352865219,
-0.329556941986084,
0.029230749234557152,
-0.20064200460910797,
-0.3668961524963379,
0.08390694856643677,
-0.11446747928857803,
0.5725330114364624,
0.020446253940463066,
0.24645592272281647,
-0.04260138422250748,
-0.06171838194131851,
-0.07889235764741898,
-0.03211859241127968,
0.10358362644910812,
0.20687326788902283,
-0.13353459537029266,
0.29636234045028687,
-0.023353565484285355,
-0.04643833637237549,
-0.2598061263561249,
0.3200158178806305,
0.21674641966819763,
-0.24199244379997253,
0.13057078421115875,
-0.31966322660446167,
0.14522957801818848,
0.20405299961566925,
-0.11868873238563538,
-0.30315083265304565,
-0.20740213990211487,
-0.11621616780757904,
-0.06194609776139259,
0.276551753282547,
-0.05911635234951973,
0.2854481339454651,
-0.09246141463518143,
-0.15196189284324646,
-0.017240092158317566,
-0.020209815353155136,
-0.1655506044626236,
-0.17263080179691315,
0.008546261116862297,
0.26440396904945374,
0.2206043004989624,
0.04759031906723976,
-0.06418125331401825,
-0.28195181488990784,
-0.05248698964715004,
-0.1731324940919876,
-0.11061062663793564,
0.13793252408504486,
0.06425711512565613,
-0.17110535502433777,
0.003956667147576809,
-0.23479478061199188,
0.18941229581832886,
0.1470807045698166,
-0.2577967643737793,
-0.16384761035442352,
0.035585179924964905,
-0.12144431471824646,
-0.2122676819562912,
0.01288864016532898,
-0.1658165603876114,
-0.0854584351181984,
-0.09553897380828857,
0.3060120642185211,
-0.16613030433654785,
0.32320937514305115,
-0.19444580376148224,
0.0642021894454956,
-0.038994815200567245,
-0.0717666894197464,
0.031210284680128098,
-0.34526950120925903,
-0.37136325240135193,
-0.021093932911753654,
0.02809719368815422,
-0.20076757669448853,
-0.12266668677330017,
0.08514276146888733,
0.20755797624588013,
0.11453338712453842,
-0.15104559063911438,
0.17483404278755188,
-0.37280064821243286,
0.13019046187400818,
0.058938153088092804,
0.07849039137363434,
0.44672060012817383,
0.03605351224541664,
0.061704251915216446,
0.015099307522177696,
-0.41154494881629944,
-0.07897914946079254,
0.2864609360694885,
0.028867511078715324,
0.028507174924016,
0.3272491991519928,
0.07906375825405121,
0.6817412376403809,
0.4720703363418579,
-0.1880875825881958,
0.19480109214782715,
0.004317970480769873,
-0.1779790073633194,
-0.37629690766334534,
-0.22146502137184143,
0.10912156105041504,
-0.27755582332611084,
0.1900644749403,
0.4069153368473053,
0.002533701714128256,
-0.4038466215133667,
-0.02982316166162491,
0.24674764275550842,
-0.23898306488990784,
-0.005850855726748705,
0.14718744158744812,
-0.07959262281656265,
0.12828584015369415,
0.2544083893299103,
-0.18981222808361053,
-0.3439294993877411,
-0.03389439359307289,
-0.05740887299180031,
-0.07070473581552505,
-0.12443920969963074,
-0.2597433626651764,
-0.5114724636077881,
-0.03302009031176567,
-0.3813464641571045,
0.24752655625343323,
0.02288038469851017,
0.2694839835166931,
-0.03789057582616806,
0.12434116750955582,
0.3278178572654724,
-0.006477681454271078,
0.5314378142356873,
-0.37303927540779114,
-0.17245204746723175,
0.12348593771457672,
-0.4129565358161926,
-0.2700183093547821,
0.1126653179526329,
-0.18090105056762695,
0.2845950126647949,
0.5743812918663025,
0.5144296288490295,
-0.04554274305701256,
-0.22449439764022827,
-0.03747623413801193,
0.1309109926223755,
0.13298945128917694,
-0.270375519990921,
-0.32828712463378906,
0.1430768370628357,
-0.15073049068450928,
0.10063612461090088,
-0.02075878717005253,
0.13676711916923523,
0.12833718955516815,
-0.10235942900180817,
0.058042630553245544,
0.0914534330368042,
0.2539273202419281,
0.19802828133106232,
0.09630824625492096,
0.06021071597933769,
0.2583252787590027,
0.26571860909461975,
-0.09806041419506073,
0.0382843092083931,
0.3328792154788971,
-0.15483485162258148,
-0.09225033968687057,
0.23302358388900757,
0.060371048748493195,
0.32173842191696167,
0.3481733202934265,
0.12119119614362717,
0.06014125794172287,
0.1878470927476883,
0.24289046227931976,
-0.22551937401294708,
0.2873823940753937,
0.3583304286003113,
0.36877650022506714,
-0.4462330937385559,
-0.4971282482147217,
-0.012983345426619053,
0.4985201060771942,
-0.1683434247970581,
0.30292654037475586,
-0.7764918208122253,
0.07372359186410904,
0.021533342078328133,
0.07447464764118195,
0.798297643661499,
-0.43529313802719116,
0.062213510274887085,
-0.29512906074523926,
0.20999173820018768,
-0.05670745670795441,
-0.5967224836349487,
0.13448306918144226,
-0.1911984086036682,
-0.37819984555244446,
0.006917127408087254,
-0.10470190644264221,
0.18576012551784515,
0.5643202066421509,
0.152387797832489,
0.2857612371444702,
0.33662325143814087,
0.08056240528821945,
-0.0095908734947443,
0.3668850362300873,
0.5028188228607178,
-0.33573800325393677,
0.15403412282466888,
0.04631604626774788,
0.19374877214431763,
-0.19323325157165527,
0.0020393277518451214,
0.09964509308338165,
-0.071917824447155,
-0.002778370399028063,
-0.31431180238723755,
-0.21838925778865814,
-0.4510262906551361,
0.2037438303232193,
-0.0680125504732132,
0.31756943464279175,
0.39316388964653015,
0.27698248624801636,
-0.06705015152692795,
0.04112967476248741,
0.006571121048182249,
0.035671595484018326,
0.3010513186454773,
0.2570823132991791,
0.36310386657714844,
-0.47335556149482727,
-0.005705251824110746,
-0.1186290755867958,
-0.24545836448669434,
-0.21744117140769958,
-0.17005273699760437,
-0.05866028741002083,
-0.1510441154241562,
0.4876137375831604,
0.15785403549671173,
0.1609754115343094,
-0.1905016452074051,
0.24735195934772491,
0.11598824709653854,
-0.11486788839101791,
-0.001946686883457005,
0.1373942345380783,
0.02470344305038452,
0.6386429667472839,
-0.2702288329601288,
-0.4856567978858948,
-0.03457600250840187,
0.3869277238845825,
0.24855664372444153,
-0.10725664347410202,
0.011694896966218948,
0.20254448056221008,
-0.26656991243362427,
-0.14961089193820953,
0.16378827393054962,
-0.08577703684568405,
-0.07299879193305969,
0.127365842461586,
0.03482992574572563,
-0.2494172751903534,
0.24809761345386505,
-0.10014808177947998,
-0.13142864406108856,
-0.033611658960580826,
-0.20421777665615082,
-0.264325350522995,
-0.2544716000556946,
-0.17200860381126404,
-0.37506043910980225,
-0.2070089429616928,
0.24210138618946075,
-0.017237771302461624,
0.12845192849636078,
0.46955347061157227,
-0.14978647232055664,
0.06071293726563454,
0.10215603560209274,
0.190608948469162,
-0.03849971666932106,
-0.2601143717765808,
0.09419789910316467,
-0.017074618488550186,
-0.06436064094305038,
0.07839654386043549,
-0.08534803241491318,
-0.1668204963207245,
-0.01158130168914795,
0.18477272987365723,
-0.013035135343670845,
-0.257517009973526,
0.3359077572822571,
-0.10252401232719421,
-0.17392626404762268,
-0.39284074306488037,
-0.050177864730358124,
0.046840354800224304,
0.009701602160930634,
-0.10233153402805328,
0.3172992169857025,
-0.2931724786758423,
-0.3031935691833496,
0.4068659245967865,
-0.20919090509414673,
-0.06654568761587143,
-0.0005235549178905785,
0.26979854702949524,
0.4595624506473541,
-0.09184471517801285,
-0.12778042256832123,
0.029920734465122223,
0.2942762076854706,
0.06880039721727371,
0.11208608001470566,
-0.10152449458837509,
0.18292385339736938,
0.26990607380867004,
0.2781376838684082,
0.12020032852888107,
0.11410753428936005,
-0.20375683903694153,
0.005394837819039822,
0.02414286695420742,
-0.21305117011070251,
-0.17937590181827545,
0.5706431269645691,
0.01382954977452755,
0.1518811285495758,
0.06895621120929718,
0.32179152965545654,
0.22877725958824158,
-0.0012453589588403702,
-0.10710815340280533,
0.084971584379673,
-0.31230175495147705,
0.06844718754291534,
0.111009381711483,
0.2458711862564087,
0.2573176920413971,
0.436221718788147,
0.12562058866024017,
0.010120994411408901,
0.4173811674118042,
0.24228741228580475,
0.3094067871570587,
0.5200669169425964,
0.24014794826507568,
0.013599173165857792,
-0.3639061450958252,
0.19174283742904663,
0.49009406566619873,
-0.34418991208076477,
-0.06621063500642776,
-0.048706237226724625,
0.2394540160894394,
-0.2684270143508911,
-0.3709074854850769,
-0.21965554356575012,
0.3906935751438141,
-0.172459214925766,
-0.24326810240745544,
0.20419339835643768,
-0.03814399614930153,
-0.0459647960960865,
0.16042423248291016,
-0.2366207391023636,
0.13132509589195251,
0.8348478078842163,
0.12337586283683777,
0.030946440994739532,
-0.3607610762119293,
-0.3917118012905121,
-0.1342182755470276,
0.1480792909860611,
-0.13457442820072174,
0.19029682874679565,
-0.31342050433158875,
-0.006878588814288378,
-0.013660133816301823,
0.2765812277793884,
0.3565855622291565,
0.2774432301521301,
-0.11382260918617249,
0.09154701232910156,
-0.02687928080558777,
0.15397541224956512,
-0.018428580835461617,
0.15348665416240692,
0.006664914544671774,
0.18051689863204956,
0.15355515480041504,
-0.08646006882190704,
-0.09819887578487396,
-0.4284719228744507,
0.04473236948251724,
0.33989837765693665,
-0.16346898674964905,
0.13269290328025818,
-0.3101337254047394,
-0.15906040370464325,
-0.012057815678417683,
0.2858178913593292,
-0.24953864514827728,
-0.08626295626163483,
0.49840548634529114,
-0.4902805685997009,
0.07265078276395798,
-0.18412072956562042,
0.03561820834875107,
-0.04055829718708992,
0.5247300863265991,
0.28653717041015625,
-0.012987994588911533,
-0.4199313223361969,
-0.11387909948825836,
-0.5841237902641296,
-0.06558920443058014,
-0.32436609268188477,
0.2615007758140564,
0.04507474973797798,
0.2684960961341858,
0.061136964708566666,
0.14476889371871948,
0.4047614634037018,
-0.10118907690048218,
-0.08668340742588043,
0.359486848115921,
-0.3306727707386017,
0.5003920793533325,
-0.214293971657753,
-0.185648113489151,
-0.05530774965882301,
-0.40043994784355164,
0.36680009961128235,
0.0968988835811615,
-0.12973465025424957,
-0.17157194018363953,
-0.016261383891105652,
0.17877542972564697,
0.1407821625471115,
0.1806529015302658,
0.33150097727775574,
0.3267035186290741,
0.026923727244138718,
-0.008940774016082287,
-0.1012832447886467,
0.21931681036949158,
-0.07923226803541183,
0.3145408630371094,
-0.03766718879342079,
0.05904893949627876,
-0.30165642499923706,
0.17764990031719208,
0.10218895226716995,
-0.14521490037441254,
0.0031905050855129957,
-0.2515268921852112,
-0.32155904173851013,
-0.03988843411207199,
-0.05510415509343147,
0.35576316714286804,
0.08974406123161316,
0.4125421345233917,
0.13876453042030334,
-0.08937859535217285,
-0.20049521327018738,
-0.09980408102273941,
-0.018491879105567932,
-0.28247857093811035,
-0.32317662239074707,
-0.4460313618183136,
0.21570739150047302,
-0.2852640748023987,
0.1410280466079712,
-0.2329757958650589,
-0.3740328848361969,
0.3034423589706421,
-0.022932536900043488,
-0.4084107577800751,
0.305184006690979,
-0.3485662341117859,
-0.0823979377746582,
-0.1502869874238968,
0.04324977099895477,
-0.07814628630876541,
-0.4487420320510864,
0.20017604529857635,
-0.13360343873500824
] |
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.4439503848552704,
-0.276717871427536,
-0.07882984727621078,
0.3751106262207031,
-0.0908033475279808,
-0.005079233553260565,
0.3211756944656372,
0.06434030830860138,
-0.045802049338817596,
-0.009251722134649754,
0.04776545986533165,
0.40863656997680664,
0.21794910728931427,
0.152444988489151,
-0.14575190842151642,
-0.001972346566617489,
0.2254883050918579,
-0.021348362788558006,
0.14677461981773376,
0.017389407381415367,
-0.2218794971704483,
0.10279755294322968,
-0.5076214075088501,
0.0070181037299335,
-0.43289607763290405,
-0.16309316456317902,
0.08521302044391632,
0.09208352863788605,
-0.16287271678447723,
-0.23092010617256165,
-0.29256418347358704,
0.20941394567489624,
-0.0740564689040184,
0.587019145488739,
-0.00011809667194029316,
-0.1688384860754013,
-0.010061836801469326,
0.2632310390472412,
0.10635603964328766,
0.0013799273874610662,
-0.058067575097084045,
-0.2970834970474243,
-0.09592430293560028,
-0.09749175608158112,
0.10890458524227142,
0.10524197667837143,
-0.07693490386009216,
-0.42389994859695435,
0.1259801983833313,
0.01379351131618023,
0.1001286506652832,
0.3818840980529785,
-0.2749175727367401,
-0.03493375703692436,
-0.3510388433933258,
0.15261918306350708,
-0.13741585612297058,
-0.024037202820181847,
0.24174430966377258,
-0.12406650185585022,
-0.12726685404777527,
0.354368656873703,
-0.1285179853439331,
0.25875818729400635,
0.07895778864622116,
-0.04785126820206642,
0.05092160776257515,
-0.4571820795536041,
0.17482049763202667,
0.4000489413738251,
0.012555555440485477,
-0.09772326797246933,
-0.16878482699394226,
-0.23095621168613434,
-0.27916577458381653,
-0.15732617676258087,
0.20208683609962463,
0.10408293455839157,
0.13395389914512634,
-0.007066462188959122,
-0.6016133427619934,
0.23995749652385712,
0.3542020618915558,
-0.12022043764591217,
-0.11609919369220734,
0.0890444964170456,
0.11987091600894928,
0.34412914514541626,
0.3367704451084137,
0.07702981680631638,
-0.08753097802400589,
-0.2567176818847656,
0.21773761510849,
0.2279638648033142,
-0.8232133388519287,
-0.07567097991704941,
0.22124110162258148,
-0.16763140261173248,
-0.052167292684316635,
-0.1305062174797058,
-0.14654582738876343,
0.3569338917732239,
-0.3285429775714874,
0.11929979920387268,
0.2981949746608734,
-0.03457871824502945,
0.014054141007363796,
0.15811298787593842,
-0.01023582462221384,
-0.23398517072200775,
-0.31269940733909607,
0.05933823809027672,
0.03468148410320282,
-0.2625652253627777,
-0.03559548407793045,
0.08486069738864899,
-0.35329774022102356,
-0.05752516910433769,
-0.2106846123933792,
0.05341925099492073,
-0.27902913093566895,
-0.06604766100645065,
0.16198748350143433,
0.14056958258152008,
0.010609149932861328,
0.7866414189338684,
-0.30181437730789185,
0.04867378994822502,
-0.36489397287368774,
-0.5528379082679749,
-0.04295020550489426,
-0.19306819140911102,
-0.39975619316101074,
0.26326778531074524,
0.10551172494888306,
0.0493483729660511,
0.14946268498897552,
0.2821129560470581,
0.07659322768449783,
-0.14135615527629852,
0.34946420788764954,
-0.5429766178131104,
0.14964242279529572,
0.07261934876441956,
0.15456032752990723,
0.5177941918373108,
-0.13847492635250092,
0.3149019181728363,
-0.19714520871639252,
0.22030159831047058,
-0.4752672016620636,
-0.23187872767448425,
0.21513277292251587,
0.013539258390665054,
0.08857876807451248,
0.07967468351125717,
-0.5455650687217712,
0.5509292483329773,
0.2919282019138336,
-0.17266491055488586,
-0.1275852620601654,
-0.1853662133216858,
-0.6103127598762512,
-0.17819055914878845,
-0.0018491606460884213,
0.12260109186172485,
-0.24178031086921692,
0.17325420677661896,
-0.27100223302841187,
0.12221607565879822,
0.44973400235176086,
0.674250602722168,
-0.21963012218475342,
0.42462173104286194,
0.01584095135331154,
0.3035620152950287,
0.04491478577256203,
-0.1139073595404625,
-0.31098830699920654,
0.49109840393066406,
-0.16109056770801544,
-0.03469406068325043,
-0.18115609884262085,
0.14040178060531616,
0.3190975785255432,
-0.02902350388467312,
0.27423033118247986,
0.31473666429519653,
0.02651830017566681,
0.37933847308158875,
-0.15751726925373077,
-0.13057869672775269,
0.19623307883739471,
0.04519704356789589,
-0.1150432601571083,
-0.13560977578163147,
-0.05035228654742241,
-0.2750132083892822,
0.2248001992702484,
-0.03035775199532509,
0.04873068258166313,
0.3911474645137787,
-0.3012830913066864,
-0.17582157254219055,
-0.14155694842338562,
-0.2277328372001648,
-0.05997436121106148,
0.3407978117465973,
0.043090563267469406,
0.06395236402750015,
0.46081438660621643,
0.0015954991104081273,
0.22768744826316833,
0.1355305314064026,
-0.038094982504844666,
-0.1376337707042694,
-0.031348176300525665,
-0.04916995018720627,
-0.13466356694698334,
-0.22620314359664917,
-0.06786186993122101,
0.3672987222671509,
0.22380711138248444,
-0.06432679295539856,
0.08833121508359909,
-0.12577535212039948,
0.06707961112260818,
0.0064628710970282555,
-0.24240240454673767,
-0.03418252244591713,
0.06548833101987839,
0.10893068462610245,
-0.04548259451985359,
0.27921950817108154,
0.44929808378219604,
-0.038015883415937424,
0.11827291548252106,
0.1675734519958496,
0.3643089830875397,
-0.042177557945251465,
0.012465021573007107,
-0.12799279391765594,
0.08095497637987137,
-0.22929523885250092,
-0.060780011117458344,
0.2941325008869171,
0.10386351495981216,
0.4727625250816345,
0.004859880078583956,
-0.17620623111724854,
0.02054627425968647,
0.2855570316314697,
0.11215917021036148,
0.10429723560810089,
0.2605011761188507,
0.38319459557533264,
0.29290711879730225,
0.38074907660484314,
-0.1670200526714325,
0.2910596430301666,
0.5920897126197815,
-0.007292274385690689,
-0.3589828610420227,
0.08166822046041489,
-0.2233637273311615,
-0.40922942757606506,
0.07799874246120453,
-0.1123957708477974,
0.541170597076416,
0.04661361128091812,
0.2133834809064865,
-0.05554590001702309,
-0.12741482257843018,
-0.052457358688116074,
-0.006476324982941151,
0.07260075956583023,
0.19732815027236938,
-0.08159385621547699,
0.2709231674671173,
0.05631652846932411,
-0.06448934972286224,
-0.28894340991973877,
0.33610057830810547,
0.24157042801380157,
-0.20434199273586273,
0.07600143551826477,
-0.2641551196575165,
0.11246530711650848,
0.17097514867782593,
-0.06071775406599045,
-0.21242576837539673,
-0.19044296443462372,
-0.12146816402673721,
-0.12393946200609207,
0.1627361923456192,
-0.006701167672872543,
0.2737024426460266,
-0.07645650207996368,
-0.0927327498793602,
-0.027558650821447372,
-0.03238815814256668,
-0.14452239871025085,
-0.17975975573062897,
0.010428307577967644,
0.2918090522289276,
0.20764081180095673,
0.1169968694448471,
-0.075505830347538,
-0.23248685896396637,
-0.06650470942258835,
-0.23157748579978943,
-0.05561389401555061,
0.07954155653715134,
0.013509177602827549,
-0.15377776324748993,
-0.07506062835454941,
-0.27162763476371765,
0.04610501229763031,
0.19815966486930847,
-0.305595338344574,
-0.24106580018997192,
0.0426129586994648,
-0.1434977501630783,
-0.257267564535141,
0.04515647888183594,
-0.1229170486330986,
-0.08818700164556503,
-0.10831579566001892,
0.3268548250198364,
-0.15633277595043182,
0.29697057604789734,
-0.20593148469924927,
0.04237449914216995,
-0.03508332744240761,
-0.15363124012947083,
0.03894622251391411,
-0.30439844727516174,
-0.3341440260410309,
0.051107484847307205,
-0.04293501377105713,
-0.16125604510307312,
-0.1311006098985672,
0.11833160370588303,
0.17082172632217407,
0.14957363903522491,
-0.13461226224899292,
0.13722333312034607,
-0.37642422318458557,
0.1445041447877884,
0.04949593171477318,
0.11592114716768265,
0.43473079800605774,
0.06887508928775787,
0.0020961144473403692,
0.06672558188438416,
-0.41926735639572144,
-0.06351593136787415,
0.2809039354324341,
0.051003120839595795,
0.015669649466872215,
0.39014536142349243,
0.06004936993122101,
0.6509936451911926,
0.5063647627830505,
-0.1862693727016449,
0.15788313746452332,
0.014895791187882423,
-0.11450675129890442,
-0.40587830543518066,
-0.17028924822807312,
0.10956380516290665,
-0.22045691311359406,
0.11818071454763412,
0.4101577699184418,
-0.005214592441916466,
-0.4526440501213074,
0.0020454884506762028,
0.2613650858402252,
-0.2650694251060486,
-0.018933596089482307,
0.17344354093074799,
-0.10557930171489716,
0.1956784427165985,
0.18907687067985535,
-0.14576533436775208,
-0.31885769963264465,
-0.0576307438313961,
-0.04983959347009659,
-0.1312028169631958,
-0.11421393603086472,
-0.2327938675880432,
-0.5820651650428772,
0.00010414538701297715,
-0.36775875091552734,
0.2439447045326233,
0.006336250342428684,
0.24928462505340576,
0.027137791737914085,
0.08906573802232742,
0.32738062739372253,
-0.011615990661084652,
0.44942018389701843,
-0.31709372997283936,
-0.19174392521381378,
0.10785367339849472,
-0.452025443315506,
-0.214580237865448,
0.07663282006978989,
-0.1998126357793808,
0.21885305643081665,
0.6070112586021423,
0.5290972590446472,
-0.1593935191631317,
-0.24244901537895203,
-0.014531536027789116,
0.06750713288784027,
0.20638664066791534,
-0.2496497482061386,
-0.2906807065010071,
0.12187391519546509,
-0.14603359997272491,
0.1630268096923828,
-0.06442707777023315,
0.1508835256099701,
0.09837587177753448,
-0.18145810067653656,
0.03650038316845894,
0.05458145588636398,
0.25485682487487793,
0.24769973754882812,
0.14578303694725037,
0.06506208330392838,
0.31042084097862244,
0.32329311966896057,
-0.1338673084974289,
0.10377486795186996,
0.2178996503353119,
-0.09251033514738083,
-0.1132437065243721,
0.1909930557012558,
0.052056536078453064,
0.30458563566207886,
0.33853042125701904,
0.08565051853656769,
0.09821385145187378,
0.09432810544967651,
0.30663084983825684,
-0.2347390353679657,
0.3093484938144684,
0.4002848267555237,
0.4037315845489502,
-0.4667280912399292,
-0.5559287667274475,
-0.06902116537094116,
0.43304577469825745,
-0.18206685781478882,
0.22114472091197968,
-0.7285045385360718,
0.07736096531152725,
0.10971536487340927,
0.17125241458415985,
0.8330782055854797,
-0.4548245966434479,
0.0848211720585823,
-0.32364359498023987,
0.25373712182044983,
0.058080192655324936,
-0.71816486120224,
0.09622316807508469,
-0.23736369609832764,
-0.2546754479408264,
0.02462020516395569,
-0.11006709188222885,
0.19803112745285034,
0.5148919820785522,
0.11548258364200592,
0.25286322832107544,
0.42438167333602905,
0.23728030920028687,
-0.09955589473247528,
0.36430948972702026,
0.49651116132736206,
-0.4183226227760315,
0.13331300020217896,
0.08025459945201874,
0.19762255251407623,
-0.23891209065914154,
0.027095651254057884,
0.08348944038152695,
-0.07957062870264053,
0.018441934138536453,
-0.37587055563926697,
-0.2915439307689667,
-0.42384737730026245,
0.20387332141399384,
-0.0037292183842509985,
0.2687777876853943,
0.3288632929325104,
0.2797585725784302,
-0.06359629333019257,
0.14419768750667572,
-0.005917700007557869,
0.08635138720273972,
0.2842143774032593,
0.2989464998245239,
0.35095086693763733,
-0.5309538841247559,
-0.0671195387840271,
-0.07989834249019623,
-0.2635246217250824,
-0.18541587889194489,
-0.14250053465366364,
-0.1600113958120346,
-0.12324528396129608,
0.3970690965652466,
0.17071430385112762,
0.16851526498794556,
-0.17100980877876282,
0.2841366231441498,
0.09731685370206833,
-0.11475405842065811,
0.030512670055031776,
0.10242766886949539,
-0.06325146555900574,
0.6600756049156189,
-0.2263181358575821,
-0.47007232904434204,
-0.0673077404499054,
0.30551666021347046,
0.20261897146701813,
-0.16215059161186218,
0.051447268575429916,
0.12358466535806656,
-0.2654484510421753,
-0.16573266685009003,
0.2679198086261749,
-0.03320369869470596,
-0.06326833367347717,
0.07773140072822571,
-0.01856520213186741,
-0.2477262169122696,
0.29143282771110535,
0.015789417549967766,
-0.08396109193563461,
-0.07069411873817444,
-0.17017735540866852,
-0.23721522092819214,
-0.2801135778427124,
-0.14675258100032806,
-0.28205764293670654,
-0.15562981367111206,
0.22022461891174316,
0.07115080952644348,
0.07661563158035278,
0.494048535823822,
-0.18919555842876434,
-0.015063720755279064,
-0.013006629422307014,
0.23621495068073273,
-0.05159112066030502,
-0.22143912315368652,
0.037445612251758575,
-0.023709774017333984,
-0.027768272906541824,
0.09909214824438095,
-0.11860203742980957,
-0.17668481171131134,
-0.038822632282972336,
0.17179490625858307,
-0.0014160211430862546,
-0.3216920793056488,
0.293910413980484,
-0.13873597979545593,
-0.23626826703548431,
-0.45797276496887207,
-0.025331025943160057,
0.04404222220182419,
-0.04571486636996269,
-0.16523268818855286,
0.31540796160697937,
-0.21616144478321075,
-0.27625811100006104,
0.4109307825565338,
-0.18306568264961243,
-0.07804986089468002,
0.018538884818553925,
0.28429898619651794,
0.44849783182144165,
-0.09582430869340897,
-0.02268557995557785,
0.07603510469198227,
0.3730260133743286,
0.05050460994243622,
0.14152134954929352,
-0.08448728919029236,
0.15993571281433105,
0.24279914796352386,
0.3568879961967468,
0.18919245898723602,
0.129349485039711,
-0.2801516354084015,
0.09304092079401016,
0.057385705411434174,
-0.19893649220466614,
-0.12318933755159378,
0.4903806149959564,
0.01820560172200203,
0.14482566714286804,
0.09274276345968246,
0.3649459481239319,
0.30378663539886475,
0.0161976870149374,
-0.12734529376029968,
0.1338045746088028,
-0.288999080657959,
0.07244933396577835,
0.0860038548707962,
0.18596619367599487,
0.2598799765110016,
0.42626601457595825,
0.06979101896286011,
0.036390338093042374,
0.45032498240470886,
0.2709549367427826,
0.337674617767334,
0.47750693559646606,
0.33443787693977356,
-0.02553616091609001,
-0.34783029556274414,
0.2448360174894333,
0.45019903779029846,
-0.33155447244644165,
-0.13294102251529694,
-0.05537279322743416,
0.1937810331583023,
-0.237757608294487,
-0.3416784703731537,
-0.2749476730823517,
0.4440900981426239,
-0.20803022384643555,
-0.30454543232917786,
0.1787310540676117,
-0.09950251877307892,
-0.039652302861213684,
0.19847825169563293,
-0.2173384130001068,
0.1424008160829544,
0.7284571528434753,
0.07342729717493057,
0.048869725316762924,
-0.39054030179977417,
-0.29222360253334045,
-0.1570209264755249,
0.11946315318346024,
-0.14032408595085144,
0.2661329209804535,
-0.2927120625972748,
0.044173892587423325,
0.035260967910289764,
0.3550228774547577,
0.3926253914833069,
0.33034780621528625,
-0.1617080569267273,
0.08416741341352463,
-0.05718609318137169,
0.1578368991613388,
-0.023402778431773186,
0.2517150342464447,
0.021942347288131714,
0.0856103003025055,
0.15108497440814972,
-0.06314308941364288,
-0.13253673911094666,
-0.5011906027793884,
-0.05699004605412483,
0.27826637029647827,
-0.1449999213218689,
0.20235732197761536,
-0.28901684284210205,
-0.1213662177324295,
0.06472684442996979,
0.3031772971153259,
-0.24439942836761475,
-0.053822603076696396,
0.450395405292511,
-0.4847293198108673,
0.026895858347415924,
-0.17315492033958435,
0.06005777418613434,
-0.029980406165122986,
0.5599961876869202,
0.27980557084083557,
-0.025549866259098053,
-0.4537343382835388,
-0.16237404942512512,
-0.636235237121582,
-0.06692042946815491,
-0.2945363223552704,
0.26559534668922424,
0.015077791176736355,
0.29245033860206604,
0.08562064170837402,
0.22426429390907288,
0.33061474561691284,
0.005551622249186039,
-0.13176630437374115,
0.3757702112197876,
-0.2399872988462448,
0.544232189655304,
-0.2748652696609497,
-0.18831370770931244,
-0.08547379076480865,
-0.42639920115470886,
0.37695544958114624,
0.11007154732942581,
-0.10970637202262878,
-0.2021089494228363,
0.01951148360967636,
0.20562447607517242,
0.14386418461799622,
0.21369218826293945,
0.3713987171649933,
0.37175852060317993,
0.04887457937002182,
0.06331634521484375,
-0.11343260109424591,
0.12783314287662506,
-0.09793924540281296,
0.25566717982292175,
-0.11054741591215134,
0.06031907722353935,
-0.2797143757343292,
0.11800196021795273,
0.0593305267393589,
-0.1554957628250122,
-0.0002600130392238498,
-0.2810497581958771,
-0.36505594849586487,
-0.050783559679985046,
-0.1279812455177307,
0.2740596532821655,
0.04067174345254898,
0.3598731458187103,
0.17572921514511108,
-0.10031229257583618,
-0.23757965862751007,
-0.07976215332746506,
-0.02033424563705921,
-0.3013194501399994,
-0.2677738666534424,
-0.5111194252967834,
0.10802622884511948,
-0.17187921702861786,
0.1276896893978119,
-0.28876540064811707,
-0.3083532154560089,
0.3282150328159332,
-0.018147921189665794,
-0.4100755453109741,
0.3328618109226227,
-0.3763069808483124,
-0.13908201456069946,
-0.1773984581232071,
0.025044437497854233,
-0.12611797451972961,
-0.4447461664676666,
0.14784346520900726,
-0.0966653823852539
] |
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.4408693015575409,
-0.25723347067832947,
-0.10014680027961731,
0.3424951434135437,
-0.11361966282129288,
0.025486208498477936,
0.3359663486480713,
0.13727445900440216,
0.02380768023431301,
-0.026604047045111656,
0.07284291088581085,
0.4267615079879761,
0.16495084762573242,
0.1844828575849533,
-0.17839783430099487,
0.07351835072040558,
0.1910465806722641,
-0.023731406778097153,
0.1997002214193344,
-0.017558977007865906,
-0.17212103307247162,
0.12671928107738495,
-0.4863218665122986,
-0.02511507272720337,
-0.41870760917663574,
-0.1551898717880249,
0.11284855753183365,
0.10783499479293823,
-0.1613447517156601,
-0.24240384995937347,
-0.22542425990104675,
0.18126125633716583,
-0.09897954016923904,
0.5712871551513672,
-0.00012132779374951497,
-0.17576169967651367,
0.026249300688505173,
0.26557743549346924,
0.05665796622633934,
0.06321823596954346,
-0.17497722804546356,
-0.265629380941391,
-0.06031210720539093,
-0.10646232962608337,
0.13026642799377441,
0.19597123563289642,
-0.04122703894972801,
-0.45927494764328003,
0.02797401137650013,
0.09562048316001892,
0.06833565980195999,
0.36932140588760376,
-0.33585622906684875,
0.019016899168491364,
-0.3772295117378235,
0.17573584616184235,
-0.17431336641311646,
0.04393911361694336,
0.27031564712524414,
-0.18950170278549194,
-0.13275009393692017,
0.2942250967025757,
-0.05945564806461334,
0.2955109179019928,
-0.029309634119272232,
-0.08000773936510086,
0.04354195296764374,
-0.4581359028816223,
0.21094301342964172,
0.34130728244781494,
0.03362318500876427,
-0.05980623885989189,
-0.2014714479446411,
-0.25059130787849426,
-0.31351056694984436,
-0.09607504308223724,
0.18815048038959503,
0.1586235910654068,
0.14374248683452606,
0.00027497013797983527,
-0.564735472202301,
0.12500527501106262,
0.33291369676589966,
-0.08457820117473602,
-0.16066895425319672,
0.000977464602328837,
0.12147601693868637,
0.30066415667533875,
0.32857993245124817,
0.10265830904245377,
-0.02403355948626995,
-0.23417511582374573,
0.318665474653244,
0.21445512771606445,
-0.7959996461868286,
-0.03138897940516472,
0.23215380311012268,
-0.1166580319404602,
-0.07023406773805618,
-0.20114783942699432,
-0.08243408799171448,
0.3807694613933563,
-0.3303593397140503,
0.09570204466581345,
0.3113459050655365,
-0.08169247210025787,
0.03688124939799309,
0.13265541195869446,
-0.020012881606817245,
-0.16498970985412598,
-0.3204193711280823,
0.0855831429362297,
0.03750584274530411,
-0.31451326608657837,
-0.058868929743766785,
0.10909142345190048,
-0.2920225262641907,
-0.07769814878702164,
-0.1529201865196228,
0.057800035923719406,
-0.2044587880373001,
-0.07475537061691284,
0.1519743949174881,
0.09315239638090134,
-0.025100741535425186,
0.7979211807250977,
-0.28888922929763794,
0.0677870512008667,
-0.4647262394428253,
-0.5510894060134888,
-0.026688221842050552,
-0.1435280293226242,
-0.37169525027275085,
0.20598264038562775,
0.14672788977622986,
-0.0441315583884716,
0.138173446059227,
0.2995370626449585,
0.0675625130534172,
-0.19425569474697113,
0.3298443555831909,
-0.5215238928794861,
0.19086652994155884,
0.0897701159119606,
0.15186454355716705,
0.5952267646789551,
-0.13082773983478546,
0.3086302876472473,
-0.11461235582828522,
0.24252422153949738,
-0.5119680166244507,
-0.2261333167552948,
0.18016217648983002,
-0.016472937539219856,
0.06611565500497818,
0.10857898741960526,
-0.4507104754447937,
0.49280214309692383,
0.3107575476169586,
-0.20052531361579895,
-0.1917562484741211,
-0.21916678547859192,
-0.6590128540992737,
-0.15495848655700684,
-0.03785106912255287,
0.17814697325229645,
-0.3581598401069641,
0.23576577007770538,
-0.32643675804138184,
0.14650322496891022,
0.43546321988105774,
0.5881890058517456,
-0.1908946931362152,
0.37422770261764526,
-0.016753334552049637,
0.21686848998069763,
-0.005193717777729034,
-0.06124432012438774,
-0.4090892970561981,
0.550470769405365,
-0.15738442540168762,
-0.00773679418489337,
-0.1996927559375763,
0.13225328922271729,
0.2520766258239746,
-0.06678570061922073,
0.28410330414772034,
0.2935759723186493,
0.009399655275046825,
0.3959369957447052,
-0.21987284719944,
-0.12066283077001572,
0.15464220941066742,
0.0758327841758728,
-0.05206706002354622,
-0.11740883439779282,
-0.004019923508167267,
-0.2566078007221222,
0.3107919692993164,
0.0013411100953817368,
0.048563696444034576,
0.42027339339256287,
-0.3765275180339813,
-0.18144312500953674,
-0.14025738835334778,
-0.2091580331325531,
-0.08941466361284256,
0.36875903606414795,
-0.011205067858099937,
0.03691475838422775,
0.3978399634361267,
0.025036487728357315,
0.17637164890766144,
0.12760113179683685,
-0.05919552221894264,
-0.08343580365180969,
-0.09330980479717255,
-0.07049933820962906,
-0.1872856467962265,
-0.17432630062103271,
-0.02212638407945633,
0.4432823359966278,
0.21466518938541412,
-0.11095274239778519,
-0.016535399481654167,
-0.12749254703521729,
0.07512914389371872,
0.06958631426095963,
-0.18628713488578796,
-0.08000805228948593,
0.0683450698852539,
0.044272392988204956,
-0.07703699171543121,
0.25735726952552795,
0.45798057317733765,
-0.05753875523805618,
0.1573878973722458,
0.07835789024829865,
0.39720797538757324,
-0.0391157902777195,
0.022403206676244736,
-0.14334341883659363,
0.11754121631383896,
-0.2493545562028885,
-0.03731647506356239,
0.31276071071624756,
0.10988300293684006,
0.41937264800071716,
0.07046175003051758,
-0.14438758790493011,
0.007185700349509716,
0.3014127016067505,
0.16434791684150696,
0.015056412667036057,
0.3293916881084442,
0.34661567211151123,
0.2566779553890228,
0.3388877213001251,
-0.11545311659574509,
0.34637901186943054,
0.6238071322441101,
0.06780663132667542,
-0.33615976572036743,
0.02862291783094406,
-0.17012009024620056,
-0.3801422119140625,
0.03958520293235779,
-0.11314451694488525,
0.5269432067871094,
0.017090024426579475,
0.25774145126342773,
-0.025526612997055054,
-0.11627770215272903,
-0.07512734085321426,
-0.03876570612192154,
0.11482148617506027,
0.23689600825309753,
-0.0769185721874237,
0.3169465959072113,
-0.0354396291077137,
-0.06354371458292007,
-0.26479893922805786,
0.37546631693840027,
0.22004809975624084,
-0.2382185459136963,
0.09896206855773926,
-0.33655479550361633,
0.1643039733171463,
0.18566222488880157,
-0.12335559725761414,
-0.26503849029541016,
-0.24152828752994537,
-0.13819211721420288,
-0.09131987392902374,
0.217467799782753,
-0.029552454128861427,
0.24394892156124115,
-0.13408242166042328,
-0.09430927038192749,
-0.026770390570163727,
0.010889772325754166,
-0.1664039045572281,
-0.15596991777420044,
0.004940924700349569,
0.2704435884952545,
0.22643016278743744,
0.05720223858952522,
-0.055270966142416,
-0.2538317143917084,
-0.078809455037117,
-0.22050409018993378,
-0.09905282407999039,
0.15914806723594666,
0.05938960239291191,
-0.1872386634349823,
-0.07872165739536285,
-0.23356246948242188,
0.17491929233074188,
0.1698778122663498,
-0.24364352226257324,
-0.1829373985528946,
0.06688188016414642,
-0.11595141887664795,
-0.246694877743721,
0.024495629593729973,
-0.14984598755836487,
-0.09292861074209213,
-0.1155197024345398,
0.2580094337463379,
-0.1713649481534958,
0.3255139887332916,
-0.1932540237903595,
0.07854382693767548,
-0.04881277307868004,
-0.11180446296930313,
-0.017138978466391563,
-0.3181794583797455,
-0.3501659333705902,
0.026869557797908783,
-0.03202259913086891,
-0.20362220704555511,
-0.14498335123062134,
0.06731730699539185,
0.18034277856349945,
0.1953355073928833,
-0.15743093192577362,
0.18745243549346924,
-0.40016117691993713,
0.16392305493354797,
0.07313036918640137,
0.02486022561788559,
0.4335305094718933,
0.02438388019800186,
0.05988139659166336,
-0.00291967811062932,
-0.4167126715183258,
-0.07242923974990845,
0.2753516435623169,
0.0008794516324996948,
-0.009609635919332504,
0.3409213721752167,
0.07012496143579483,
0.6287553310394287,
0.5038678646087646,
-0.1901984065771103,
0.16790470480918884,
-0.0031843886245042086,
-0.13700684905052185,
-0.3670366704463959,
-0.22739745676517487,
0.13439276814460754,
-0.25231486558914185,
0.14938844740390778,
0.42146819829940796,
-0.008276688866317272,
-0.4179483950138092,
-0.015330747701227665,
0.25466859340667725,
-0.20119881629943848,
-0.01771668531000614,
0.13254058361053467,
-0.12000156193971634,
0.2148343175649643,
0.25466668605804443,
-0.16450825333595276,
-0.3432218134403229,
-0.0456087701022625,
-0.08712957054376602,
-0.10864146053791046,
-0.10620708018541336,
-0.2582457363605499,
-0.4892933666706085,
-0.009441457688808441,
-0.39609673619270325,
0.22279609739780426,
0.052832070738077164,
0.36500194668769836,
-0.03041958063840866,
0.12013066560029984,
0.3037041425704956,
0.0031181375961750746,
0.5263450145721436,
-0.4160197377204895,
-0.11488328874111176,
0.14857779443264008,
-0.3820876479148865,
-0.3232315480709076,
0.053349610418081284,
-0.16240458190441132,
0.3027198016643524,
0.560893177986145,
0.5175611972808838,
-0.036824047565460205,
-0.20092348754405975,
-0.014395828358829021,
0.12424392998218536,
0.15655240416526794,
-0.25523775815963745,
-0.32964906096458435,
0.11015395820140839,
-0.11324335634708405,
0.10829878598451614,
-0.01890941895544529,
0.1200617179274559,
0.12016516178846359,
-0.15730205178260803,
0.009452232159674168,
0.11044462025165558,
0.24382132291793823,
0.205190509557724,
0.10924424976110458,
0.07107741385698318,
0.3489990830421448,
0.2189205288887024,
-0.10752109438180923,
0.07319598644971848,
0.3272773325443268,
-0.11457089334726334,
-0.11288333684206009,
0.23553761839866638,
0.017801649868488312,
0.30125677585601807,
0.290953129529953,
0.1026962399482727,
0.035219863057136536,
0.1488351672887802,
0.25171440839767456,
-0.22046512365341187,
0.3065984845161438,
0.3736084997653961,
0.3654961585998535,
-0.49233806133270264,
-0.5268409252166748,
-0.019487274810671806,
0.4596676230430603,
-0.1460445523262024,
0.2637677490711212,
-0.7810155749320984,
0.09064756333827972,
0.049096863716840744,
0.08312629163265228,
0.7045717835426331,
-0.4334191679954529,
0.03117011860013008,
-0.3011367619037628,
0.20618844032287598,
-0.06066795065999031,
-0.5662207007408142,
0.1323685646057129,
-0.18968026340007782,
-0.3490004241466522,
0.037254102528095245,
-0.10875704139471054,
0.2165384739637375,
0.5372942090034485,
0.16535213589668274,
0.2765430510044098,
0.355330228805542,
0.10849214345216751,
-0.0140687245875597,
0.36526694893836975,
0.5064210295677185,
-0.3291376233100891,
0.18285489082336426,
0.053333040326833725,
0.18206553161144257,
-0.24166426062583923,
0.03248143568634987,
0.09637660533189774,
-0.05066325142979622,
0.03373581916093826,
-0.318134069442749,
-0.1936039924621582,
-0.4162677526473999,
0.23536640405654907,
-0.05434809625148773,
0.2807029187679291,
0.398090660572052,
0.2447253167629242,
-0.08027955144643784,
0.09834220260381699,
-0.007344464305788279,
0.07430719584226608,
0.2642247974872589,
0.2403719425201416,
0.3874531090259552,
-0.45677974820137024,
-0.008335581049323082,
-0.09590977430343628,
-0.2261185646057129,
-0.25819358229637146,
-0.1545785367488861,
-0.05948041379451752,
-0.10837917029857635,
0.4497854709625244,
0.14551709592342377,
0.16358713805675507,
-0.19441868364810944,
0.2312682420015335,
0.09017032384872437,
-0.12444064766168594,
-0.00039696384919807315,
0.09002269804477692,
0.062165942043066025,
0.6624906063079834,
-0.2686813175678253,
-0.4959302246570587,
-0.024275630712509155,
0.41474682092666626,
0.22465462982654572,
-0.0770731195807457,
0.056965868920087814,
0.2068658024072647,
-0.2856074273586273,
-0.15423400700092316,
0.15757064521312714,
-0.10636899620294571,
-0.10540439933538437,
0.1102898120880127,
-0.02852451801300049,
-0.23330630362033844,
0.2675740122795105,
-0.15705198049545288,
-0.1613534390926361,
-0.09197308868169785,
-0.17743323743343353,
-0.28063181042671204,
-0.24133604764938354,
-0.19484829902648926,
-0.38124701380729675,
-0.2053017020225525,
0.21624436974525452,
0.014936055056750774,
0.12179824709892273,
0.4578036069869995,
-0.14455720782279968,
0.04786849394440651,
0.09471623599529266,
0.1962701678276062,
-0.04606826603412628,
-0.23534385859966278,
0.07930667698383331,
-0.03858933597803116,
-0.052657656371593475,
0.10635411739349365,
-0.09019403904676437,
-0.15756799280643463,
-0.004082295577973127,
0.1757277101278305,
-0.013139859773218632,
-0.25326913595199585,
0.34993061423301697,
-0.11798767745494843,
-0.2294914275407791,
-0.411082923412323,
-0.030595742166042328,
0.0631314292550087,
-0.019553406164050102,
-0.08367515355348587,
0.2614877223968506,
-0.30485647916793823,
-0.262929767370224,
0.448455274105072,
-0.1784745305776596,
-0.07069141417741776,
-0.0015808648895472288,
0.2966395318508148,
0.47176966071128845,
-0.09237433224916458,
-0.07663825899362564,
0.020087501034140587,
0.24567916989326477,
0.05151678994297981,
0.14671199023723602,
-0.12097539007663727,
0.2085915207862854,
0.282965749502182,
0.325647234916687,
0.14229166507720947,
0.10228598117828369,
-0.24987974762916565,
0.011392013169825077,
0.016536103561520576,
-0.24106989800930023,
-0.19977106153964996,
0.5652070045471191,
0.04609009250998497,
0.1719612032175064,
0.049166448414325714,
0.3464103043079376,
0.19379922747612,
-0.017008068040013313,
-0.07935208082199097,
0.09418917447328568,
-0.2903538942337036,
0.059408050030469894,
0.18398430943489075,
0.26288312673568726,
0.26884037256240845,
0.43619903922080994,
0.12504778802394867,
-0.00838273111730814,
0.4837763011455536,
0.2577883303165436,
0.31509172916412354,
0.5179541707038879,
0.24926909804344177,
-0.03264806047081947,
-0.37721017003059387,
0.19071128964424133,
0.494961142539978,
-0.3534456491470337,
-0.046989962458610535,
-0.06487449258565903,
0.2101312279701233,
-0.25229188799858093,
-0.3471129834651947,
-0.25802183151245117,
0.3463008403778076,
-0.1636478453874588,
-0.2520793080329895,
0.22297506034374237,
-0.06839102506637573,
-0.024179181084036827,
0.17691746354103088,
-0.2295464277267456,
0.14557179808616638,
0.7704076170921326,
0.11659137904644012,
0.04102688655257225,
-0.3815883696079254,
-0.30965808033943176,
-0.1625860631465912,
0.15334051847457886,
-0.14305444061756134,
0.19574135541915894,
-0.3325936496257782,
-0.011943383142352104,
-0.02461194433271885,
0.3084973692893982,
0.36746636033058167,
0.3030281960964203,
-0.12775421142578125,
0.08283369988203049,
-0.011625480838119984,
0.14687927067279816,
-0.005686391610652208,
0.18998557329177856,
-0.01878397911787033,
0.17536547780036926,
0.18286645412445068,
-0.09486464411020279,
-0.09230434894561768,
-0.43663713335990906,
0.05247512459754944,
0.34499838948249817,
-0.16489925980567932,
0.14213551580905914,
-0.3117668628692627,
-0.1528322398662567,
0.04074881598353386,
0.2989789545536041,
-0.25708672404289246,
-0.09710310399532318,
0.5395147800445557,
-0.49188777804374695,
0.07764416933059692,
-0.1672455370426178,
0.03598269820213318,
-0.09600428491830826,
0.5680378675460815,
0.30399131774902344,
-0.015154785476624966,
-0.3837939202785492,
-0.12599769234657288,
-0.6268154382705688,
-0.06055278703570366,
-0.3254488706588745,
0.2521612048149109,
0.06945423036813736,
0.2867888808250427,
0.049837369471788406,
0.12537415325641632,
0.39452579617500305,
-0.09546633064746857,
-0.07452233135700226,
0.33305391669273376,
-0.34592974185943604,
0.45379921793937683,
-0.2335766851902008,
-0.2067919373512268,
-0.08110218495130539,
-0.44428932666778564,
0.3849733769893646,
0.07307673245668411,
-0.12520930171012878,
-0.1655890792608261,
-0.026191847398877144,
0.17447644472122192,
0.130319744348526,
0.19542886316776276,
0.3366410732269287,
0.3453725576400757,
0.039087917655706406,
0.018438419327139854,
-0.1458938717842102,
0.1976260244846344,
-0.03892305865883827,
0.3265102803707123,
-0.06322294473648071,
0.054795946925878525,
-0.28163406252861023,
0.17220179736614227,
0.1057349368929863,
-0.1668168008327484,
0.008409680798649788,
-0.20337148010730743,
-0.3303464651107788,
-0.03892260044813156,
-0.029436014592647552,
0.3369322121143341,
0.09369213879108429,
0.385831356048584,
0.12029724568128586,
-0.09688303619623184,
-0.1704241931438446,
-0.12834881246089935,
-0.021535683423280716,
-0.27284982800483704,
-0.30363771319389343,
-0.43934366106987,
0.21357254683971405,
-0.26720792055130005,
0.15297935903072357,
-0.22650860249996185,
-0.31919658184051514,
0.3211679756641388,
-0.046201419085264206,
-0.36792269349098206,
0.3406698405742645,
-0.3830782473087311,
-0.07950655370950699,
-0.16346268355846405,
0.04333527758717537,
-0.08365947753190994,
-0.46402880549430847,
0.18666204810142517,
-0.10772833973169327
] |
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.26154208183288574,
-0.03726404160261154,
0.05204009637236595,
0.6045717597007751,
0.45383769273757935,
0.2834008038043976,
0.14564386010169983,
0.27246683835983276,
0.17855094373226166,
0.10566100478172302,
-0.058184292167425156,
0.22738583385944366,
-0.1771182119846344,
-0.14591707289218903,
-0.03709074854850769,
-0.1933315545320511,
0.08402069658041,
0.013471443206071854,
-0.5429398417472839,
0.16046883165836334,
-0.35815536975860596,
0.11570598930120468,
-0.1856328696012497,
-0.11716005206108093,
-0.29803767800331116,
-0.10351601243019104,
-0.000604207394644618,
-0.0976313129067421,
0.018877854570746422,
-0.32740938663482666,
0.2548564076423645,
-0.12938927114009857,
0.08640072494745255,
0.5501937866210938,
-0.00012316074571572244,
-0.01377630140632391,
0.28356876969337463,
-0.16720838844776154,
-0.25339964032173157,
-0.12841573357582092,
-0.041656699031591415,
-0.02979831025004387,
0.09849721938371658,
-0.22525063157081604,
-0.011924220249056816,
-0.05259275063872337,
0.23173056542873383,
-0.3445146977901459,
0.4429749548435211,
0.22438852488994598,
0.1404946744441986,
0.06996550410985947,
0.4524520933628082,
-0.0441129244863987,
0.17390716075897217,
0.3341217339038849,
0.07138080149888992,
0.33202269673347473,
-0.2908717095851898,
-0.43568703532218933,
-0.03041297011077404,
0.3930503726005554,
-0.03994116559624672,
0.005288136191666126,
0.5653294324874878,
-0.14458337426185608,
0.02535320818424225,
-0.3368179500102997,
0.1123085618019104,
-0.007249276619404554,
0.5341090559959412,
-0.4902597963809967,
-0.02837262861430645,
-0.01478687021881342,
-0.05338368937373161,
-0.09523987770080566,
0.29709818959236145,
0.2689521312713623,
-0.2722630202770233,
-0.14476075768470764,
-0.13041681051254272,
-0.32499849796295166,
-0.3197002708911896,
0.44286853075027466,
-0.0909217819571495,
0.19100096821784973,
-0.024716006591916084,
0.3037816286087036,
0.5653707385063171,
-0.2050894945859909,
-0.23406194150447845,
-0.0758122056722641,
0.13654372096061707,
0.3287968039512634,
-0.26772069931030273,
-0.16602888703346252,
-0.30294886231422424,
-0.20470978319644928,
0.3511369526386261,
-0.4987058937549591,
-0.3861927390098572,
-0.12600089609622955,
0.15166963636875153,
0.021239040419459343,
0.4036451578140259,
0.28173547983169556,
-0.29636576771736145,
0.32283729314804077,
0.3122970461845398,
0.17427171766757965,
-0.2495379000902176,
-0.15899010002613068,
0.07679527997970581,
-0.037379130721092224,
-0.11104995012283325,
-0.19148291647434235,
0.08377370238304138,
-0.0016540841897949576,
-0.01374595332890749,
-0.021803364157676697,
-0.21283170580863953,
-0.1232089027762413,
-0.053849756717681885,
0.5055230259895325,
-0.10408411175012589,
-0.08461876213550568,
0.37382787466049194,
0.1444597840309143,
-0.012684540823101997,
-0.008076931349933147,
-0.05637473613023758,
0.41042256355285645,
-0.34362757205963135,
0.2843070924282074,
0.05026388540863991,
-0.0011584651656448841,
0.3263408839702606,
-0.07270574569702148,
-0.03312826156616211,
-0.05668129026889801,
0.16204515099525452,
-0.35802340507507324,
0.00871086772531271,
0.18468765914440155,
0.17885635793209076,
0.2493288666009903,
0.25035110116004944,
-0.1479862928390503,
-0.1526842713356018,
0.19699648022651672,
-0.16346801817417145,
-0.24330347776412964,
0.038736771792173386,
0.01092929020524025,
0.09801333397626877,
0.2277471423149109,
-0.2775132954120636,
0.18281055986881256,
0.652862012386322,
-0.0775153785943985,
-0.05726506561040878,
-0.08019668608903885,
-0.2296682745218277,
-0.16876882314682007,
0.27087822556495667,
0.5193135142326355,
-0.06465306133031845,
-0.10548370331525803,
-0.11697012931108475,
0.1677042841911316,
0.25101229548454285,
0.44138363003730774,
-0.16382251679897308,
0.2519161105155945,
-0.09722135215997696,
0.01679861918091774,
0.41418400406837463,
-0.31050944328308105,
-0.34190431237220764,
-0.0056238314136862755,
-0.02522915229201317,
-0.13432222604751587,
0.02327807806432247,
0.13213089108467102,
0.07739990204572678,
0.11566579341888428,
0.11192624270915985,
0.31041884422302246,
0.05610376596450806,
0.2800839841365814,
-0.30419841408729553,
-0.2975767254829407,
0.25286865234375,
0.07474607229232788,
0.06539707630872726,
-0.20408274233341217,
-0.060849517583847046,
0.8107670545578003,
0.29729488492012024,
-0.2623123526573181,
0.1555342674255371,
0.3147747814655304,
0.10613712668418884,
0.0064365193247795105,
0.08711925148963928,
-0.21991287171840668,
-0.25144723057746887,
-0.07342468947172165,
-0.05669912323355675,
0.3305934965610504,
-0.14518874883651733,
-0.04148105904459953,
0.15372270345687866,
-0.1186709776520729,
-0.17224955558776855,
-0.39086270332336426,
0.06229532137513161,
0.013073514215648174,
0.12358259409666061,
0.09008461982011795,
0.08106052130460739,
0.056008581072092056,
-0.09397000074386597,
0.2478923499584198,
-0.5998017191886902,
0.17150290310382843,
-0.28960758447647095,
-0.10769418627023697,
-0.021440112963318825,
-0.0624917596578598,
0.027414904907345772,
-0.04746546596288681,
-0.06855592876672745,
0.1519923061132431,
0.07713465392589569,
-0.1671154946088791,
-0.09068439155817032,
0.003420039778575301,
0.310109406709671,
-0.32211431860923767,
0.16570569574832916,
0.2421722114086151,
0.19550420343875885,
-0.09402245283126831,
-0.19769605994224548,
-0.155878484249115,
0.10513398051261902,
0.3647212088108063,
0.07918786257505417,
0.16877521574497223,
0.026240810751914978,
0.08954749256372452,
0.17978596687316895,
-0.2070019394159317,
0.21816347539424896,
0.012355189770460129,
0.240883931517601,
0.09500641375780106,
-0.029394637793302536,
-0.3097330629825592,
0.45832404494285583,
0.26819708943367004,
0.27729952335357666,
0.24248167872428894,
-0.4937291443347931,
-0.07404223084449768,
-0.06565181910991669,
-0.0718550980091095,
0.3221568763256073,
0.0500786118209362,
-0.11956381052732468,
0.12015480548143387,
0.19633783400058746,
0.00970320776104927,
0.30975982546806335,
0.1743883192539215,
0.4940778315067291,
-0.01870863139629364,
0.105722576379776,
-0.08063474297523499,
-0.09958699345588684,
-0.14684832096099854,
0.0500459298491478,
0.5077638626098633,
-0.17538021504878998,
-0.015785524621605873,
-0.18642668426036835,
-0.4006144404411316,
-0.2753978371620178,
0.1643146127462387,
-0.4642423689365387,
-0.13692739605903625,
-0.3849298655986786,
0.32475799322128296,
0.06956294924020767,
0.2584396302700043,
0.416075736284256,
-0.05071398988366127,
0.3513423800468445,
-0.1406712830066681,
0.0687718540430069,
-0.23041220009326935,
-0.11907540261745453,
-0.06273715943098068,
0.4409622251987457,
-0.2204727828502655,
0.08683231472969055,
0.1567283272743225,
-0.31955772638320923,
-0.21350908279418945,
-0.1457151472568512,
0.14698965847492218,
-0.08082127571105957,
0.12557438015937805,
0.05964222550392151,
0.5084348917007446,
-0.12339834868907928,
-0.2323761284351349,
0.17210941016674042,
0.0899069607257843,
-0.05887201428413391,
-0.037300556898117065,
0.02329365722835064,
0.15538495779037476,
0.05408918857574463,
-0.2931138277053833,
-0.17975705862045288,
-0.508184552192688,
0.40148040652275085,
-0.03389118239283562,
0.15136273205280304,
0.32791826128959656,
0.1617622822523117,
0.11561518162488937,
-0.12136616557836533,
0.08944834023714066,
-0.16215083003044128,
0.016019998118281364,
0.3207916021347046,
-0.1488260179758072,
-0.21143513917922974,
-0.02906382456421852,
0.06273750215768814,
0.3063039481639862,
0.23018574714660645,
-0.6157580614089966,
-0.02091062441468239,
-0.11368213593959808,
-0.010894600301980972,
-0.058850836008787155,
0.28631117939949036,
0.3913799226284027,
0.07892140746116638,
0.10780006647109985,
0.13758891820907593,
-0.16775739192962646,
0.09490665048360825,
-0.040982916951179504,
0.32489657402038574,
0.22007925808429718,
0.5234264731407166,
0.06372649222612381,
0.8384490013122559,
0.34196406602859497,
0.18714050948619843,
0.22882597148418427,
-0.022065989673137665,
0.0835644081234932,
0.004970150999724865,
-0.348187118768692,
-0.008208919316530228,
-0.03689686581492424,
0.061999522149562836,
0.16614322364330292,
0.008755018003284931,
-0.33744320273399353,
-0.16767241060733795,
-0.35052862763404846,
0.04599038138985634,
-0.3771669268608093,
0.2698536217212677,
0.17512498795986176,
0.36742353439331055,
-0.08383559435606003,
-0.0824132040143013,
0.02316123992204666,
-0.35157808661460876,
0.19453281164169312,
0.2135324627161026,
-0.017528695985674858,
0.02112432010471821,
-0.11370823532342911,
-0.39588916301727295,
-0.640546441078186,
0.11820436269044876,
-0.15440216660499573,
0.06297993659973145,
-0.10384825617074966,
0.09339769929647446,
0.06005198508501053,
0.1583072394132614,
0.7553272843360901,
0.005923289339989424,
-0.30729299783706665,
-0.0461270771920681,
-0.2609420120716095,
-0.5063744187355042,
0.21378420293331146,
-0.18415705859661102,
0.3441570997238159,
0.14338910579681396,
0.5205534100532532,
-0.3616020381450653,
-0.09813381731510162,
0.32128798961639404,
0.37471455335617065,
-0.2170829176902771,
-0.20469240844249725,
-0.13433176279067993,
-0.2551262080669403,
-0.6043948531150818,
0.004102698061615229,
0.05456928163766861,
0.1934489607810974,
0.49645286798477173,
0.2044563591480255,
0.05266909301280975,
-0.050896842032670975,
0.13719402253627777,
-0.053375739604234695,
0.3105924725532532,
0.11065413057804108,
0.1008516475558281,
0.1345042735338211,
-0.15806789696216583,
0.3764187693595886,
0.2939082980155945,
0.0716901570558548,
-0.3797554075717926,
-0.09978523850440979,
0.05762147530913353,
0.25239649415016174,
-0.06275457888841629,
-0.013914779759943485,
0.0038343530613929033,
0.026899192482233047,
0.17809520661830902,
-0.09977508336305618,
0.13221965730190277,
0.18756836652755737,
0.08740786463022232,
-0.45114579796791077,
-0.43663138151168823,
0.3414416015148163,
0.19970451295375824,
0.15969416499137878,
0.3301563858985901,
-0.14244431257247925,
-0.5566366314888,
0.32534104585647583,
0.35895806550979614,
0.9608324766159058,
-0.3551483154296875,
0.3937278687953949,
0.09621862322092056,
0.21176472306251526,
0.6567656397819519,
-0.47514036297798157,
0.3529614806175232,
-0.36994051933288574,
-0.0815761610865593,
0.04317505657672882,
-0.1330997198820114,
0.13796204328536987,
-0.017232758924365044,
-0.43608641624450684,
0.2891327142715454,
0.09133251756429672,
-0.03982735052704811,
-0.18405863642692566,
0.3883705735206604,
0.1124473288655281,
-0.48120003938674927,
-0.18418651819229126,
0.03195100650191307,
-0.12698417901992798,
0.2439669519662857,
-0.04560341313481331,
-0.027440568432211876,
0.11567571759223938,
-0.11502739042043686,
-0.3924034535884857,
-0.03745150938630104,
-0.48363596200942993,
0.30769115686416626,
-0.2517831027507782,
0.0015953655820339918,
0.40474554896354675,
0.3928065001964569,
0.01018132921308279,
0.3698485195636749,
-0.13404984772205353,
0.010526429861783981,
-0.36008134484291077,
-0.2767650783061981,
-0.1850568652153015,
0.06766454875469208,
0.242404505610466,
-0.19374260306358337,
-0.10712756216526031,
0.07635974138975143,
-0.03994683548808098,
-0.1982414424419403,
-0.21035297214984894,
-0.031876858323812485,
-0.12981919944286346,
-0.20456553995609283,
-0.21239322423934937,
0.013284141197800636,
-0.35847562551498413,
-0.018620021641254425,
0.045863233506679535,
0.01084706000983715,
-0.3378365635871887,
0.32868334650993347,
0.1423625499010086,
-0.4008426070213318,
0.030740324407815933,
0.4164583384990692,
0.3485441207885742,
0.1605854630470276,
0.720025360584259,
0.323261559009552,
-0.2456386834383011,
-0.1618594080209732,
-0.0824732556939125,
-0.025335872545838356,
-0.3048343360424042,
0.21009260416030884,
0.0837550014257431,
0.10605346411466599,
-0.30660057067871094,
-0.00037718459498137236,
0.12854333221912384,
0.04523569345474243,
0.0363888256251812,
-0.3043982684612274,
-0.560200035572052,
0.20824962854385376,
-0.01047776360064745,
0.03649914264678955,
0.23689424991607666,
0.022190408781170845,
0.02953154966235161,
0.24801486730575562,
-0.1566304713487625,
0.0200542900711298,
-0.16914212703704834,
0.2507920563220978,
0.2438187152147293,
-0.1116873025894165,
0.10324373841285706,
-0.012949067167937756,
-0.0043390667997300625,
0.15931078791618347,
-0.01502357516437769,
-0.12695281207561493,
0.04548146203160286,
0.15326263010501862,
-0.02685132622718811,
-0.2777855396270752,
-0.09635801613330841,
-0.5430380702018738,
-0.01589692197740078,
-0.3039938509464264,
0.011127829551696777,
0.02127934619784355,
-0.13627037405967712,
0.11097752302885056,
0.2019032984972,
-0.2731659710407257,
-0.06302575767040253,
0.279261976480484,
-0.022164518013596535,
-0.05075211077928543,
0.16587062180042267,
0.2017493098974228,
0.09379857033491135,
-0.1570737063884735,
-0.5362299084663391,
0.05583448335528374,
-0.08433609455823898,
-0.026627929881215096,
0.10199334472417831,
-0.11428510397672653,
-0.3993757665157318,
0.31942206621170044,
0.09046675264835358,
0.1510140597820282,
-0.14232788980007172,
0.20684121549129486,
0.20045147836208344,
0.008968900889158249,
-0.19372694194316864,
-0.0418560616672039,
0.33019885420799255,
-0.29200834035873413,
-0.05059792101383209,
0.32779014110565186,
-0.13116717338562012,
0.045345135033130646,
-0.029958052560687065,
0.131158247590065,
0.3588019609451294,
-0.07343082129955292,
0.3226180076599121,
0.006158402655273676,
-0.08348400890827179,
-0.016720864921808243,
0.1939016878604889,
0.405727356672287,
0.25870269536972046,
0.20438647270202637,
-0.15563851594924927,
0.03763880953192711,
-0.105872243642807,
-0.2548229396343231,
0.03794356435537338,
-0.0836716741323471,
0.14148905873298645,
0.4189733862876892,
-0.1775912344455719,
0.15922003984451294,
-0.19391296803951263,
0.17801780998706818,
0.18459685146808624,
-0.27455762028694153,
0.07877655327320099,
0.2984713912010193,
-0.21168772876262665,
0.04647485539317131,
0.14998888969421387,
-0.11578154563903809,
-0.06578820198774338,
0.14178577065467834,
0.07711374014616013,
-0.6087393164634705,
0.45919573307037354,
0.1467866599559784,
-0.22065070271492004,
-0.14092643558979034,
0.2773652970790863,
0.4522537887096405,
0.07107837498188019,
-0.30539900064468384,
0.05759404972195625,
0.02698766440153122,
0.13658887147903442,
-0.3318273425102234,
0.30944621562957764,
0.46216192841529846,
0.2915849983692169,
-0.19562357664108276,
0.25357291102409363,
-0.15816403925418854,
-0.012619315646588802,
0.015425755642354488,
-0.023688798770308495,
0.11646560579538345,
0.21650521457195282,
0.11305493861436844,
-0.010933046229183674,
-0.05862734839320183,
-0.15109561383724213,
0.16302037239074707,
0.1425207406282425,
-0.22791634500026703,
-0.38114193081855774,
-0.0991922989487648,
-0.17108850181102753,
-0.014039738103747368,
-0.011570178903639317,
-0.5901708602905273,
0.2826705574989319,
0.5286228656768799,
-0.13806703686714172,
0.08121010661125183,
0.020232802256941795,
0.013729493133723736,
-0.031966254115104675,
0.48462381958961487,
0.2030230611562729,
-0.0330803319811821,
-0.4814164936542511,
-0.3177812695503235,
-0.4150763154029846,
0.02410843037068844,
-0.3297814130783081,
0.004063060041517019,
-0.07540741562843323,
0.11538782715797424,
-0.04735545814037323,
0.04659400135278702,
0.04862787574529648,
-0.36422494053840637,
-0.04351768270134926,
0.1776147037744522,
-0.15607242286205292,
-0.25533750653266907,
-0.12738977372646332,
0.1787591427564621,
0.17938879132270813,
-0.19811443984508514,
0.26311153173446655,
0.008783611468970776,
-0.13983745872974396,
-0.3518665134906769,
0.13386838138103485,
0.050196729600429535,
0.17792177200317383,
0.15763580799102783,
0.061005376279354095,
0.38950493931770325,
0.004085572902113199,
-0.24227167665958405,
0.02581561729311943,
0.00026924521080218256,
-0.09981399029493332,
0.14134080708026886,
0.1294572651386261,
0.36912816762924194,
-0.4097653031349182,
-0.38277947902679443,
-0.43279334902763367,
0.28977447748184204,
-0.06378491222858429,
-0.11976820975542068,
-0.03508025035262108,
-0.037601836025714874,
0.2526533305644989,
0.0688294991850853,
0.06360182166099548,
0.1586662232875824,
-0.06568904221057892,
-0.0003347872116137296,
-0.45090430974960327,
-0.2615719437599182,
0.4598855674266815,
-0.45830026268959045,
-0.3856021761894226,
-0.08610018342733383,
-0.09503575414419174,
-0.14593543112277985,
-0.13941237330436707,
-0.7795313000679016,
0.09105968475341797,
0.2944115102291107,
0.09553062170743942,
-0.42246922850608826,
0.03149569407105446,
-0.10581450909376144,
0.12016617506742477,
-0.1256258338689804,
0.3365497291088104,
-0.090094655752182,
-0.4325060546398163,
0.16513030230998993,
-0.20777159929275513
] |
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.26154208183288574,
-0.03726404160261154,
0.05204009637236595,
0.6045717597007751,
0.45383769273757935,
0.2834008038043976,
0.14564386010169983,
0.27246683835983276,
0.17855094373226166,
0.10566100478172302,
-0.058184292167425156,
0.22738583385944366,
-0.1771182119846344,
-0.14591707289218903,
-0.03709074854850769,
-0.1933315545320511,
0.08402069658041,
0.013471443206071854,
-0.5429398417472839,
0.16046883165836334,
-0.35815536975860596,
0.11570598930120468,
-0.1856328696012497,
-0.11716005206108093,
-0.29803767800331116,
-0.10351601243019104,
-0.000604207394644618,
-0.0976313129067421,
0.018877854570746422,
-0.32740938663482666,
0.2548564076423645,
-0.12938927114009857,
0.08640072494745255,
0.5501937866210938,
-0.00012316074571572244,
-0.01377630140632391,
0.28356876969337463,
-0.16720838844776154,
-0.25339964032173157,
-0.12841573357582092,
-0.041656699031591415,
-0.02979831025004387,
0.09849721938371658,
-0.22525063157081604,
-0.011924220249056816,
-0.05259275063872337,
0.23173056542873383,
-0.3445146977901459,
0.4429749548435211,
0.22438852488994598,
0.1404946744441986,
0.06996550410985947,
0.4524520933628082,
-0.0441129244863987,
0.17390716075897217,
0.3341217339038849,
0.07138080149888992,
0.33202269673347473,
-0.2908717095851898,
-0.43568703532218933,
-0.03041297011077404,
0.3930503726005554,
-0.03994116559624672,
0.005288136191666126,
0.5653294324874878,
-0.14458337426185608,
0.02535320818424225,
-0.3368179500102997,
0.1123085618019104,
-0.007249276619404554,
0.5341090559959412,
-0.4902597963809967,
-0.02837262861430645,
-0.01478687021881342,
-0.05338368937373161,
-0.09523987770080566,
0.29709818959236145,
0.2689521312713623,
-0.2722630202770233,
-0.14476075768470764,
-0.13041681051254272,
-0.32499849796295166,
-0.3197002708911896,
0.44286853075027466,
-0.0909217819571495,
0.19100096821784973,
-0.024716006591916084,
0.3037816286087036,
0.5653707385063171,
-0.2050894945859909,
-0.23406194150447845,
-0.0758122056722641,
0.13654372096061707,
0.3287968039512634,
-0.26772069931030273,
-0.16602888703346252,
-0.30294886231422424,
-0.20470978319644928,
0.3511369526386261,
-0.4987058937549591,
-0.3861927390098572,
-0.12600089609622955,
0.15166963636875153,
0.021239040419459343,
0.4036451578140259,
0.28173547983169556,
-0.29636576771736145,
0.32283729314804077,
0.3122970461845398,
0.17427171766757965,
-0.2495379000902176,
-0.15899010002613068,
0.07679527997970581,
-0.037379130721092224,
-0.11104995012283325,
-0.19148291647434235,
0.08377370238304138,
-0.0016540841897949576,
-0.01374595332890749,
-0.021803364157676697,
-0.21283170580863953,
-0.1232089027762413,
-0.053849756717681885,
0.5055230259895325,
-0.10408411175012589,
-0.08461876213550568,
0.37382787466049194,
0.1444597840309143,
-0.012684540823101997,
-0.008076931349933147,
-0.05637473613023758,
0.41042256355285645,
-0.34362757205963135,
0.2843070924282074,
0.05026388540863991,
-0.0011584651656448841,
0.3263408839702606,
-0.07270574569702148,
-0.03312826156616211,
-0.05668129026889801,
0.16204515099525452,
-0.35802340507507324,
0.00871086772531271,
0.18468765914440155,
0.17885635793209076,
0.2493288666009903,
0.25035110116004944,
-0.1479862928390503,
-0.1526842713356018,
0.19699648022651672,
-0.16346801817417145,
-0.24330347776412964,
0.038736771792173386,
0.01092929020524025,
0.09801333397626877,
0.2277471423149109,
-0.2775132954120636,
0.18281055986881256,
0.652862012386322,
-0.0775153785943985,
-0.05726506561040878,
-0.08019668608903885,
-0.2296682745218277,
-0.16876882314682007,
0.27087822556495667,
0.5193135142326355,
-0.06465306133031845,
-0.10548370331525803,
-0.11697012931108475,
0.1677042841911316,
0.25101229548454285,
0.44138363003730774,
-0.16382251679897308,
0.2519161105155945,
-0.09722135215997696,
0.01679861918091774,
0.41418400406837463,
-0.31050944328308105,
-0.34190431237220764,
-0.0056238314136862755,
-0.02522915229201317,
-0.13432222604751587,
0.02327807806432247,
0.13213089108467102,
0.07739990204572678,
0.11566579341888428,
0.11192624270915985,
0.31041884422302246,
0.05610376596450806,
0.2800839841365814,
-0.30419841408729553,
-0.2975767254829407,
0.25286865234375,
0.07474607229232788,
0.06539707630872726,
-0.20408274233341217,
-0.060849517583847046,
0.8107670545578003,
0.29729488492012024,
-0.2623123526573181,
0.1555342674255371,
0.3147747814655304,
0.10613712668418884,
0.0064365193247795105,
0.08711925148963928,
-0.21991287171840668,
-0.25144723057746887,
-0.07342468947172165,
-0.05669912323355675,
0.3305934965610504,
-0.14518874883651733,
-0.04148105904459953,
0.15372270345687866,
-0.1186709776520729,
-0.17224955558776855,
-0.39086270332336426,
0.06229532137513161,
0.013073514215648174,
0.12358259409666061,
0.09008461982011795,
0.08106052130460739,
0.056008581072092056,
-0.09397000074386597,
0.2478923499584198,
-0.5998017191886902,
0.17150290310382843,
-0.28960758447647095,
-0.10769418627023697,
-0.021440112963318825,
-0.0624917596578598,
0.027414904907345772,
-0.04746546596288681,
-0.06855592876672745,
0.1519923061132431,
0.07713465392589569,
-0.1671154946088791,
-0.09068439155817032,
0.003420039778575301,
0.310109406709671,
-0.32211431860923767,
0.16570569574832916,
0.2421722114086151,
0.19550420343875885,
-0.09402245283126831,
-0.19769605994224548,
-0.155878484249115,
0.10513398051261902,
0.3647212088108063,
0.07918786257505417,
0.16877521574497223,
0.026240810751914978,
0.08954749256372452,
0.17978596687316895,
-0.2070019394159317,
0.21816347539424896,
0.012355189770460129,
0.240883931517601,
0.09500641375780106,
-0.029394637793302536,
-0.3097330629825592,
0.45832404494285583,
0.26819708943367004,
0.27729952335357666,
0.24248167872428894,
-0.4937291443347931,
-0.07404223084449768,
-0.06565181910991669,
-0.0718550980091095,
0.3221568763256073,
0.0500786118209362,
-0.11956381052732468,
0.12015480548143387,
0.19633783400058746,
0.00970320776104927,
0.30975982546806335,
0.1743883192539215,
0.4940778315067291,
-0.01870863139629364,
0.105722576379776,
-0.08063474297523499,
-0.09958699345588684,
-0.14684832096099854,
0.0500459298491478,
0.5077638626098633,
-0.17538021504878998,
-0.015785524621605873,
-0.18642668426036835,
-0.4006144404411316,
-0.2753978371620178,
0.1643146127462387,
-0.4642423689365387,
-0.13692739605903625,
-0.3849298655986786,
0.32475799322128296,
0.06956294924020767,
0.2584396302700043,
0.416075736284256,
-0.05071398988366127,
0.3513423800468445,
-0.1406712830066681,
0.0687718540430069,
-0.23041220009326935,
-0.11907540261745453,
-0.06273715943098068,
0.4409622251987457,
-0.2204727828502655,
0.08683231472969055,
0.1567283272743225,
-0.31955772638320923,
-0.21350908279418945,
-0.1457151472568512,
0.14698965847492218,
-0.08082127571105957,
0.12557438015937805,
0.05964222550392151,
0.5084348917007446,
-0.12339834868907928,
-0.2323761284351349,
0.17210941016674042,
0.0899069607257843,
-0.05887201428413391,
-0.037300556898117065,
0.02329365722835064,
0.15538495779037476,
0.05408918857574463,
-0.2931138277053833,
-0.17975705862045288,
-0.508184552192688,
0.40148040652275085,
-0.03389118239283562,
0.15136273205280304,
0.32791826128959656,
0.1617622822523117,
0.11561518162488937,
-0.12136616557836533,
0.08944834023714066,
-0.16215083003044128,
0.016019998118281364,
0.3207916021347046,
-0.1488260179758072,
-0.21143513917922974,
-0.02906382456421852,
0.06273750215768814,
0.3063039481639862,
0.23018574714660645,
-0.6157580614089966,
-0.02091062441468239,
-0.11368213593959808,
-0.010894600301980972,
-0.058850836008787155,
0.28631117939949036,
0.3913799226284027,
0.07892140746116638,
0.10780006647109985,
0.13758891820907593,
-0.16775739192962646,
0.09490665048360825,
-0.040982916951179504,
0.32489657402038574,
0.22007925808429718,
0.5234264731407166,
0.06372649222612381,
0.8384490013122559,
0.34196406602859497,
0.18714050948619843,
0.22882597148418427,
-0.022065989673137665,
0.0835644081234932,
0.004970150999724865,
-0.348187118768692,
-0.008208919316530228,
-0.03689686581492424,
0.061999522149562836,
0.16614322364330292,
0.008755018003284931,
-0.33744320273399353,
-0.16767241060733795,
-0.35052862763404846,
0.04599038138985634,
-0.3771669268608093,
0.2698536217212677,
0.17512498795986176,
0.36742353439331055,
-0.08383559435606003,
-0.0824132040143013,
0.02316123992204666,
-0.35157808661460876,
0.19453281164169312,
0.2135324627161026,
-0.017528695985674858,
0.02112432010471821,
-0.11370823532342911,
-0.39588916301727295,
-0.640546441078186,
0.11820436269044876,
-0.15440216660499573,
0.06297993659973145,
-0.10384825617074966,
0.09339769929647446,
0.06005198508501053,
0.1583072394132614,
0.7553272843360901,
0.005923289339989424,
-0.30729299783706665,
-0.0461270771920681,
-0.2609420120716095,
-0.5063744187355042,
0.21378420293331146,
-0.18415705859661102,
0.3441570997238159,
0.14338910579681396,
0.5205534100532532,
-0.3616020381450653,
-0.09813381731510162,
0.32128798961639404,
0.37471455335617065,
-0.2170829176902771,
-0.20469240844249725,
-0.13433176279067993,
-0.2551262080669403,
-0.6043948531150818,
0.004102698061615229,
0.05456928163766861,
0.1934489607810974,
0.49645286798477173,
0.2044563591480255,
0.05266909301280975,
-0.050896842032670975,
0.13719402253627777,
-0.053375739604234695,
0.3105924725532532,
0.11065413057804108,
0.1008516475558281,
0.1345042735338211,
-0.15806789696216583,
0.3764187693595886,
0.2939082980155945,
0.0716901570558548,
-0.3797554075717926,
-0.09978523850440979,
0.05762147530913353,
0.25239649415016174,
-0.06275457888841629,
-0.013914779759943485,
0.0038343530613929033,
0.026899192482233047,
0.17809520661830902,
-0.09977508336305618,
0.13221965730190277,
0.18756836652755737,
0.08740786463022232,
-0.45114579796791077,
-0.43663138151168823,
0.3414416015148163,
0.19970451295375824,
0.15969416499137878,
0.3301563858985901,
-0.14244431257247925,
-0.5566366314888,
0.32534104585647583,
0.35895806550979614,
0.9608324766159058,
-0.3551483154296875,
0.3937278687953949,
0.09621862322092056,
0.21176472306251526,
0.6567656397819519,
-0.47514036297798157,
0.3529614806175232,
-0.36994051933288574,
-0.0815761610865593,
0.04317505657672882,
-0.1330997198820114,
0.13796204328536987,
-0.017232758924365044,
-0.43608641624450684,
0.2891327142715454,
0.09133251756429672,
-0.03982735052704811,
-0.18405863642692566,
0.3883705735206604,
0.1124473288655281,
-0.48120003938674927,
-0.18418651819229126,
0.03195100650191307,
-0.12698417901992798,
0.2439669519662857,
-0.04560341313481331,
-0.027440568432211876,
0.11567571759223938,
-0.11502739042043686,
-0.3924034535884857,
-0.03745150938630104,
-0.48363596200942993,
0.30769115686416626,
-0.2517831027507782,
0.0015953655820339918,
0.40474554896354675,
0.3928065001964569,
0.01018132921308279,
0.3698485195636749,
-0.13404984772205353,
0.010526429861783981,
-0.36008134484291077,
-0.2767650783061981,
-0.1850568652153015,
0.06766454875469208,
0.242404505610466,
-0.19374260306358337,
-0.10712756216526031,
0.07635974138975143,
-0.03994683548808098,
-0.1982414424419403,
-0.21035297214984894,
-0.031876858323812485,
-0.12981919944286346,
-0.20456553995609283,
-0.21239322423934937,
0.013284141197800636,
-0.35847562551498413,
-0.018620021641254425,
0.045863233506679535,
0.01084706000983715,
-0.3378365635871887,
0.32868334650993347,
0.1423625499010086,
-0.4008426070213318,
0.030740324407815933,
0.4164583384990692,
0.3485441207885742,
0.1605854630470276,
0.720025360584259,
0.323261559009552,
-0.2456386834383011,
-0.1618594080209732,
-0.0824732556939125,
-0.025335872545838356,
-0.3048343360424042,
0.21009260416030884,
0.0837550014257431,
0.10605346411466599,
-0.30660057067871094,
-0.00037718459498137236,
0.12854333221912384,
0.04523569345474243,
0.0363888256251812,
-0.3043982684612274,
-0.560200035572052,
0.20824962854385376,
-0.01047776360064745,
0.03649914264678955,
0.23689424991607666,
0.022190408781170845,
0.02953154966235161,
0.24801486730575562,
-0.1566304713487625,
0.0200542900711298,
-0.16914212703704834,
0.2507920563220978,
0.2438187152147293,
-0.1116873025894165,
0.10324373841285706,
-0.012949067167937756,
-0.0043390667997300625,
0.15931078791618347,
-0.01502357516437769,
-0.12695281207561493,
0.04548146203160286,
0.15326263010501862,
-0.02685132622718811,
-0.2777855396270752,
-0.09635801613330841,
-0.5430380702018738,
-0.01589692197740078,
-0.3039938509464264,
0.011127829551696777,
0.02127934619784355,
-0.13627037405967712,
0.11097752302885056,
0.2019032984972,
-0.2731659710407257,
-0.06302575767040253,
0.279261976480484,
-0.022164518013596535,
-0.05075211077928543,
0.16587062180042267,
0.2017493098974228,
0.09379857033491135,
-0.1570737063884735,
-0.5362299084663391,
0.05583448335528374,
-0.08433609455823898,
-0.026627929881215096,
0.10199334472417831,
-0.11428510397672653,
-0.3993757665157318,
0.31942206621170044,
0.09046675264835358,
0.1510140597820282,
-0.14232788980007172,
0.20684121549129486,
0.20045147836208344,
0.008968900889158249,
-0.19372694194316864,
-0.0418560616672039,
0.33019885420799255,
-0.29200834035873413,
-0.05059792101383209,
0.32779014110565186,
-0.13116717338562012,
0.045345135033130646,
-0.029958052560687065,
0.131158247590065,
0.3588019609451294,
-0.07343082129955292,
0.3226180076599121,
0.006158402655273676,
-0.08348400890827179,
-0.016720864921808243,
0.1939016878604889,
0.405727356672287,
0.25870269536972046,
0.20438647270202637,
-0.15563851594924927,
0.03763880953192711,
-0.105872243642807,
-0.2548229396343231,
0.03794356435537338,
-0.0836716741323471,
0.14148905873298645,
0.4189733862876892,
-0.1775912344455719,
0.15922003984451294,
-0.19391296803951263,
0.17801780998706818,
0.18459685146808624,
-0.27455762028694153,
0.07877655327320099,
0.2984713912010193,
-0.21168772876262665,
0.04647485539317131,
0.14998888969421387,
-0.11578154563903809,
-0.06578820198774338,
0.14178577065467834,
0.07711374014616013,
-0.6087393164634705,
0.45919573307037354,
0.1467866599559784,
-0.22065070271492004,
-0.14092643558979034,
0.2773652970790863,
0.4522537887096405,
0.07107837498188019,
-0.30539900064468384,
0.05759404972195625,
0.02698766440153122,
0.13658887147903442,
-0.3318273425102234,
0.30944621562957764,
0.46216192841529846,
0.2915849983692169,
-0.19562357664108276,
0.25357291102409363,
-0.15816403925418854,
-0.012619315646588802,
0.015425755642354488,
-0.023688798770308495,
0.11646560579538345,
0.21650521457195282,
0.11305493861436844,
-0.010933046229183674,
-0.05862734839320183,
-0.15109561383724213,
0.16302037239074707,
0.1425207406282425,
-0.22791634500026703,
-0.38114193081855774,
-0.0991922989487648,
-0.17108850181102753,
-0.014039738103747368,
-0.011570178903639317,
-0.5901708602905273,
0.2826705574989319,
0.5286228656768799,
-0.13806703686714172,
0.08121010661125183,
0.020232802256941795,
0.013729493133723736,
-0.031966254115104675,
0.48462381958961487,
0.2030230611562729,
-0.0330803319811821,
-0.4814164936542511,
-0.3177812695503235,
-0.4150763154029846,
0.02410843037068844,
-0.3297814130783081,
0.004063060041517019,
-0.07540741562843323,
0.11538782715797424,
-0.04735545814037323,
0.04659400135278702,
0.04862787574529648,
-0.36422494053840637,
-0.04351768270134926,
0.1776147037744522,
-0.15607242286205292,
-0.25533750653266907,
-0.12738977372646332,
0.1787591427564621,
0.17938879132270813,
-0.19811443984508514,
0.26311153173446655,
0.008783611468970776,
-0.13983745872974396,
-0.3518665134906769,
0.13386838138103485,
0.050196729600429535,
0.17792177200317383,
0.15763580799102783,
0.061005376279354095,
0.38950493931770325,
0.004085572902113199,
-0.24227167665958405,
0.02581561729311943,
0.00026924521080218256,
-0.09981399029493332,
0.14134080708026886,
0.1294572651386261,
0.36912816762924194,
-0.4097653031349182,
-0.38277947902679443,
-0.43279334902763367,
0.28977447748184204,
-0.06378491222858429,
-0.11976820975542068,
-0.03508025035262108,
-0.037601836025714874,
0.2526533305644989,
0.0688294991850853,
0.06360182166099548,
0.1586662232875824,
-0.06568904221057892,
-0.0003347872116137296,
-0.45090430974960327,
-0.2615719437599182,
0.4598855674266815,
-0.45830026268959045,
-0.3856021761894226,
-0.08610018342733383,
-0.09503575414419174,
-0.14593543112277985,
-0.13941237330436707,
-0.7795313000679016,
0.09105968475341797,
0.2944115102291107,
0.09553062170743942,
-0.42246922850608826,
0.03149569407105446,
-0.10581450909376144,
0.12016617506742477,
-0.1256258338689804,
0.3365497291088104,
-0.090094655752182,
-0.4325060546398163,
0.16513030230998993,
-0.20777159929275513
] |
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.26154208183288574,
-0.03726404160261154,
0.05204009637236595,
0.6045717597007751,
0.45383769273757935,
0.2834008038043976,
0.14564386010169983,
0.27246683835983276,
0.17855094373226166,
0.10566100478172302,
-0.058184292167425156,
0.22738583385944366,
-0.1771182119846344,
-0.14591707289218903,
-0.03709074854850769,
-0.1933315545320511,
0.08402069658041,
0.013471443206071854,
-0.5429398417472839,
0.16046883165836334,
-0.35815536975860596,
0.11570598930120468,
-0.1856328696012497,
-0.11716005206108093,
-0.29803767800331116,
-0.10351601243019104,
-0.000604207394644618,
-0.0976313129067421,
0.018877854570746422,
-0.32740938663482666,
0.2548564076423645,
-0.12938927114009857,
0.08640072494745255,
0.5501937866210938,
-0.00012316074571572244,
-0.01377630140632391,
0.28356876969337463,
-0.16720838844776154,
-0.25339964032173157,
-0.12841573357582092,
-0.041656699031591415,
-0.02979831025004387,
0.09849721938371658,
-0.22525063157081604,
-0.011924220249056816,
-0.05259275063872337,
0.23173056542873383,
-0.3445146977901459,
0.4429749548435211,
0.22438852488994598,
0.1404946744441986,
0.06996550410985947,
0.4524520933628082,
-0.0441129244863987,
0.17390716075897217,
0.3341217339038849,
0.07138080149888992,
0.33202269673347473,
-0.2908717095851898,
-0.43568703532218933,
-0.03041297011077404,
0.3930503726005554,
-0.03994116559624672,
0.005288136191666126,
0.5653294324874878,
-0.14458337426185608,
0.02535320818424225,
-0.3368179500102997,
0.1123085618019104,
-0.007249276619404554,
0.5341090559959412,
-0.4902597963809967,
-0.02837262861430645,
-0.01478687021881342,
-0.05338368937373161,
-0.09523987770080566,
0.29709818959236145,
0.2689521312713623,
-0.2722630202770233,
-0.14476075768470764,
-0.13041681051254272,
-0.32499849796295166,
-0.3197002708911896,
0.44286853075027466,
-0.0909217819571495,
0.19100096821784973,
-0.024716006591916084,
0.3037816286087036,
0.5653707385063171,
-0.2050894945859909,
-0.23406194150447845,
-0.0758122056722641,
0.13654372096061707,
0.3287968039512634,
-0.26772069931030273,
-0.16602888703346252,
-0.30294886231422424,
-0.20470978319644928,
0.3511369526386261,
-0.4987058937549591,
-0.3861927390098572,
-0.12600089609622955,
0.15166963636875153,
0.021239040419459343,
0.4036451578140259,
0.28173547983169556,
-0.29636576771736145,
0.32283729314804077,
0.3122970461845398,
0.17427171766757965,
-0.2495379000902176,
-0.15899010002613068,
0.07679527997970581,
-0.037379130721092224,
-0.11104995012283325,
-0.19148291647434235,
0.08377370238304138,
-0.0016540841897949576,
-0.01374595332890749,
-0.021803364157676697,
-0.21283170580863953,
-0.1232089027762413,
-0.053849756717681885,
0.5055230259895325,
-0.10408411175012589,
-0.08461876213550568,
0.37382787466049194,
0.1444597840309143,
-0.012684540823101997,
-0.008076931349933147,
-0.05637473613023758,
0.41042256355285645,
-0.34362757205963135,
0.2843070924282074,
0.05026388540863991,
-0.0011584651656448841,
0.3263408839702606,
-0.07270574569702148,
-0.03312826156616211,
-0.05668129026889801,
0.16204515099525452,
-0.35802340507507324,
0.00871086772531271,
0.18468765914440155,
0.17885635793209076,
0.2493288666009903,
0.25035110116004944,
-0.1479862928390503,
-0.1526842713356018,
0.19699648022651672,
-0.16346801817417145,
-0.24330347776412964,
0.038736771792173386,
0.01092929020524025,
0.09801333397626877,
0.2277471423149109,
-0.2775132954120636,
0.18281055986881256,
0.652862012386322,
-0.0775153785943985,
-0.05726506561040878,
-0.08019668608903885,
-0.2296682745218277,
-0.16876882314682007,
0.27087822556495667,
0.5193135142326355,
-0.06465306133031845,
-0.10548370331525803,
-0.11697012931108475,
0.1677042841911316,
0.25101229548454285,
0.44138363003730774,
-0.16382251679897308,
0.2519161105155945,
-0.09722135215997696,
0.01679861918091774,
0.41418400406837463,
-0.31050944328308105,
-0.34190431237220764,
-0.0056238314136862755,
-0.02522915229201317,
-0.13432222604751587,
0.02327807806432247,
0.13213089108467102,
0.07739990204572678,
0.11566579341888428,
0.11192624270915985,
0.31041884422302246,
0.05610376596450806,
0.2800839841365814,
-0.30419841408729553,
-0.2975767254829407,
0.25286865234375,
0.07474607229232788,
0.06539707630872726,
-0.20408274233341217,
-0.060849517583847046,
0.8107670545578003,
0.29729488492012024,
-0.2623123526573181,
0.1555342674255371,
0.3147747814655304,
0.10613712668418884,
0.0064365193247795105,
0.08711925148963928,
-0.21991287171840668,
-0.25144723057746887,
-0.07342468947172165,
-0.05669912323355675,
0.3305934965610504,
-0.14518874883651733,
-0.04148105904459953,
0.15372270345687866,
-0.1186709776520729,
-0.17224955558776855,
-0.39086270332336426,
0.06229532137513161,
0.013073514215648174,
0.12358259409666061,
0.09008461982011795,
0.08106052130460739,
0.056008581072092056,
-0.09397000074386597,
0.2478923499584198,
-0.5998017191886902,
0.17150290310382843,
-0.28960758447647095,
-0.10769418627023697,
-0.021440112963318825,
-0.0624917596578598,
0.027414904907345772,
-0.04746546596288681,
-0.06855592876672745,
0.1519923061132431,
0.07713465392589569,
-0.1671154946088791,
-0.09068439155817032,
0.003420039778575301,
0.310109406709671,
-0.32211431860923767,
0.16570569574832916,
0.2421722114086151,
0.19550420343875885,
-0.09402245283126831,
-0.19769605994224548,
-0.155878484249115,
0.10513398051261902,
0.3647212088108063,
0.07918786257505417,
0.16877521574497223,
0.026240810751914978,
0.08954749256372452,
0.17978596687316895,
-0.2070019394159317,
0.21816347539424896,
0.012355189770460129,
0.240883931517601,
0.09500641375780106,
-0.029394637793302536,
-0.3097330629825592,
0.45832404494285583,
0.26819708943367004,
0.27729952335357666,
0.24248167872428894,
-0.4937291443347931,
-0.07404223084449768,
-0.06565181910991669,
-0.0718550980091095,
0.3221568763256073,
0.0500786118209362,
-0.11956381052732468,
0.12015480548143387,
0.19633783400058746,
0.00970320776104927,
0.30975982546806335,
0.1743883192539215,
0.4940778315067291,
-0.01870863139629364,
0.105722576379776,
-0.08063474297523499,
-0.09958699345588684,
-0.14684832096099854,
0.0500459298491478,
0.5077638626098633,
-0.17538021504878998,
-0.015785524621605873,
-0.18642668426036835,
-0.4006144404411316,
-0.2753978371620178,
0.1643146127462387,
-0.4642423689365387,
-0.13692739605903625,
-0.3849298655986786,
0.32475799322128296,
0.06956294924020767,
0.2584396302700043,
0.416075736284256,
-0.05071398988366127,
0.3513423800468445,
-0.1406712830066681,
0.0687718540430069,
-0.23041220009326935,
-0.11907540261745453,
-0.06273715943098068,
0.4409622251987457,
-0.2204727828502655,
0.08683231472969055,
0.1567283272743225,
-0.31955772638320923,
-0.21350908279418945,
-0.1457151472568512,
0.14698965847492218,
-0.08082127571105957,
0.12557438015937805,
0.05964222550392151,
0.5084348917007446,
-0.12339834868907928,
-0.2323761284351349,
0.17210941016674042,
0.0899069607257843,
-0.05887201428413391,
-0.037300556898117065,
0.02329365722835064,
0.15538495779037476,
0.05408918857574463,
-0.2931138277053833,
-0.17975705862045288,
-0.508184552192688,
0.40148040652275085,
-0.03389118239283562,
0.15136273205280304,
0.32791826128959656,
0.1617622822523117,
0.11561518162488937,
-0.12136616557836533,
0.08944834023714066,
-0.16215083003044128,
0.016019998118281364,
0.3207916021347046,
-0.1488260179758072,
-0.21143513917922974,
-0.02906382456421852,
0.06273750215768814,
0.3063039481639862,
0.23018574714660645,
-0.6157580614089966,
-0.02091062441468239,
-0.11368213593959808,
-0.010894600301980972,
-0.058850836008787155,
0.28631117939949036,
0.3913799226284027,
0.07892140746116638,
0.10780006647109985,
0.13758891820907593,
-0.16775739192962646,
0.09490665048360825,
-0.040982916951179504,
0.32489657402038574,
0.22007925808429718,
0.5234264731407166,
0.06372649222612381,
0.8384490013122559,
0.34196406602859497,
0.18714050948619843,
0.22882597148418427,
-0.022065989673137665,
0.0835644081234932,
0.004970150999724865,
-0.348187118768692,
-0.008208919316530228,
-0.03689686581492424,
0.061999522149562836,
0.16614322364330292,
0.008755018003284931,
-0.33744320273399353,
-0.16767241060733795,
-0.35052862763404846,
0.04599038138985634,
-0.3771669268608093,
0.2698536217212677,
0.17512498795986176,
0.36742353439331055,
-0.08383559435606003,
-0.0824132040143013,
0.02316123992204666,
-0.35157808661460876,
0.19453281164169312,
0.2135324627161026,
-0.017528695985674858,
0.02112432010471821,
-0.11370823532342911,
-0.39588916301727295,
-0.640546441078186,
0.11820436269044876,
-0.15440216660499573,
0.06297993659973145,
-0.10384825617074966,
0.09339769929647446,
0.06005198508501053,
0.1583072394132614,
0.7553272843360901,
0.005923289339989424,
-0.30729299783706665,
-0.0461270771920681,
-0.2609420120716095,
-0.5063744187355042,
0.21378420293331146,
-0.18415705859661102,
0.3441570997238159,
0.14338910579681396,
0.5205534100532532,
-0.3616020381450653,
-0.09813381731510162,
0.32128798961639404,
0.37471455335617065,
-0.2170829176902771,
-0.20469240844249725,
-0.13433176279067993,
-0.2551262080669403,
-0.6043948531150818,
0.004102698061615229,
0.05456928163766861,
0.1934489607810974,
0.49645286798477173,
0.2044563591480255,
0.05266909301280975,
-0.050896842032670975,
0.13719402253627777,
-0.053375739604234695,
0.3105924725532532,
0.11065413057804108,
0.1008516475558281,
0.1345042735338211,
-0.15806789696216583,
0.3764187693595886,
0.2939082980155945,
0.0716901570558548,
-0.3797554075717926,
-0.09978523850440979,
0.05762147530913353,
0.25239649415016174,
-0.06275457888841629,
-0.013914779759943485,
0.0038343530613929033,
0.026899192482233047,
0.17809520661830902,
-0.09977508336305618,
0.13221965730190277,
0.18756836652755737,
0.08740786463022232,
-0.45114579796791077,
-0.43663138151168823,
0.3414416015148163,
0.19970451295375824,
0.15969416499137878,
0.3301563858985901,
-0.14244431257247925,
-0.5566366314888,
0.32534104585647583,
0.35895806550979614,
0.9608324766159058,
-0.3551483154296875,
0.3937278687953949,
0.09621862322092056,
0.21176472306251526,
0.6567656397819519,
-0.47514036297798157,
0.3529614806175232,
-0.36994051933288574,
-0.0815761610865593,
0.04317505657672882,
-0.1330997198820114,
0.13796204328536987,
-0.017232758924365044,
-0.43608641624450684,
0.2891327142715454,
0.09133251756429672,
-0.03982735052704811,
-0.18405863642692566,
0.3883705735206604,
0.1124473288655281,
-0.48120003938674927,
-0.18418651819229126,
0.03195100650191307,
-0.12698417901992798,
0.2439669519662857,
-0.04560341313481331,
-0.027440568432211876,
0.11567571759223938,
-0.11502739042043686,
-0.3924034535884857,
-0.03745150938630104,
-0.48363596200942993,
0.30769115686416626,
-0.2517831027507782,
0.0015953655820339918,
0.40474554896354675,
0.3928065001964569,
0.01018132921308279,
0.3698485195636749,
-0.13404984772205353,
0.010526429861783981,
-0.36008134484291077,
-0.2767650783061981,
-0.1850568652153015,
0.06766454875469208,
0.242404505610466,
-0.19374260306358337,
-0.10712756216526031,
0.07635974138975143,
-0.03994683548808098,
-0.1982414424419403,
-0.21035297214984894,
-0.031876858323812485,
-0.12981919944286346,
-0.20456553995609283,
-0.21239322423934937,
0.013284141197800636,
-0.35847562551498413,
-0.018620021641254425,
0.045863233506679535,
0.01084706000983715,
-0.3378365635871887,
0.32868334650993347,
0.1423625499010086,
-0.4008426070213318,
0.030740324407815933,
0.4164583384990692,
0.3485441207885742,
0.1605854630470276,
0.720025360584259,
0.323261559009552,
-0.2456386834383011,
-0.1618594080209732,
-0.0824732556939125,
-0.025335872545838356,
-0.3048343360424042,
0.21009260416030884,
0.0837550014257431,
0.10605346411466599,
-0.30660057067871094,
-0.00037718459498137236,
0.12854333221912384,
0.04523569345474243,
0.0363888256251812,
-0.3043982684612274,
-0.560200035572052,
0.20824962854385376,
-0.01047776360064745,
0.03649914264678955,
0.23689424991607666,
0.022190408781170845,
0.02953154966235161,
0.24801486730575562,
-0.1566304713487625,
0.0200542900711298,
-0.16914212703704834,
0.2507920563220978,
0.2438187152147293,
-0.1116873025894165,
0.10324373841285706,
-0.012949067167937756,
-0.0043390667997300625,
0.15931078791618347,
-0.01502357516437769,
-0.12695281207561493,
0.04548146203160286,
0.15326263010501862,
-0.02685132622718811,
-0.2777855396270752,
-0.09635801613330841,
-0.5430380702018738,
-0.01589692197740078,
-0.3039938509464264,
0.011127829551696777,
0.02127934619784355,
-0.13627037405967712,
0.11097752302885056,
0.2019032984972,
-0.2731659710407257,
-0.06302575767040253,
0.279261976480484,
-0.022164518013596535,
-0.05075211077928543,
0.16587062180042267,
0.2017493098974228,
0.09379857033491135,
-0.1570737063884735,
-0.5362299084663391,
0.05583448335528374,
-0.08433609455823898,
-0.026627929881215096,
0.10199334472417831,
-0.11428510397672653,
-0.3993757665157318,
0.31942206621170044,
0.09046675264835358,
0.1510140597820282,
-0.14232788980007172,
0.20684121549129486,
0.20045147836208344,
0.008968900889158249,
-0.19372694194316864,
-0.0418560616672039,
0.33019885420799255,
-0.29200834035873413,
-0.05059792101383209,
0.32779014110565186,
-0.13116717338562012,
0.045345135033130646,
-0.029958052560687065,
0.131158247590065,
0.3588019609451294,
-0.07343082129955292,
0.3226180076599121,
0.006158402655273676,
-0.08348400890827179,
-0.016720864921808243,
0.1939016878604889,
0.405727356672287,
0.25870269536972046,
0.20438647270202637,
-0.15563851594924927,
0.03763880953192711,
-0.105872243642807,
-0.2548229396343231,
0.03794356435537338,
-0.0836716741323471,
0.14148905873298645,
0.4189733862876892,
-0.1775912344455719,
0.15922003984451294,
-0.19391296803951263,
0.17801780998706818,
0.18459685146808624,
-0.27455762028694153,
0.07877655327320099,
0.2984713912010193,
-0.21168772876262665,
0.04647485539317131,
0.14998888969421387,
-0.11578154563903809,
-0.06578820198774338,
0.14178577065467834,
0.07711374014616013,
-0.6087393164634705,
0.45919573307037354,
0.1467866599559784,
-0.22065070271492004,
-0.14092643558979034,
0.2773652970790863,
0.4522537887096405,
0.07107837498188019,
-0.30539900064468384,
0.05759404972195625,
0.02698766440153122,
0.13658887147903442,
-0.3318273425102234,
0.30944621562957764,
0.46216192841529846,
0.2915849983692169,
-0.19562357664108276,
0.25357291102409363,
-0.15816403925418854,
-0.012619315646588802,
0.015425755642354488,
-0.023688798770308495,
0.11646560579538345,
0.21650521457195282,
0.11305493861436844,
-0.010933046229183674,
-0.05862734839320183,
-0.15109561383724213,
0.16302037239074707,
0.1425207406282425,
-0.22791634500026703,
-0.38114193081855774,
-0.0991922989487648,
-0.17108850181102753,
-0.014039738103747368,
-0.011570178903639317,
-0.5901708602905273,
0.2826705574989319,
0.5286228656768799,
-0.13806703686714172,
0.08121010661125183,
0.020232802256941795,
0.013729493133723736,
-0.031966254115104675,
0.48462381958961487,
0.2030230611562729,
-0.0330803319811821,
-0.4814164936542511,
-0.3177812695503235,
-0.4150763154029846,
0.02410843037068844,
-0.3297814130783081,
0.004063060041517019,
-0.07540741562843323,
0.11538782715797424,
-0.04735545814037323,
0.04659400135278702,
0.04862787574529648,
-0.36422494053840637,
-0.04351768270134926,
0.1776147037744522,
-0.15607242286205292,
-0.25533750653266907,
-0.12738977372646332,
0.1787591427564621,
0.17938879132270813,
-0.19811443984508514,
0.26311153173446655,
0.008783611468970776,
-0.13983745872974396,
-0.3518665134906769,
0.13386838138103485,
0.050196729600429535,
0.17792177200317383,
0.15763580799102783,
0.061005376279354095,
0.38950493931770325,
0.004085572902113199,
-0.24227167665958405,
0.02581561729311943,
0.00026924521080218256,
-0.09981399029493332,
0.14134080708026886,
0.1294572651386261,
0.36912816762924194,
-0.4097653031349182,
-0.38277947902679443,
-0.43279334902763367,
0.28977447748184204,
-0.06378491222858429,
-0.11976820975542068,
-0.03508025035262108,
-0.037601836025714874,
0.2526533305644989,
0.0688294991850853,
0.06360182166099548,
0.1586662232875824,
-0.06568904221057892,
-0.0003347872116137296,
-0.45090430974960327,
-0.2615719437599182,
0.4598855674266815,
-0.45830026268959045,
-0.3856021761894226,
-0.08610018342733383,
-0.09503575414419174,
-0.14593543112277985,
-0.13941237330436707,
-0.7795313000679016,
0.09105968475341797,
0.2944115102291107,
0.09553062170743942,
-0.42246922850608826,
0.03149569407105446,
-0.10581450909376144,
0.12016617506742477,
-0.1256258338689804,
0.3365497291088104,
-0.090094655752182,
-0.4325060546398163,
0.16513030230998993,
-0.20777159929275513
] |
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.26154208183288574,
-0.03726404160261154,
0.05204009637236595,
0.6045717597007751,
0.45383769273757935,
0.2834008038043976,
0.14564386010169983,
0.27246683835983276,
0.17855094373226166,
0.10566100478172302,
-0.058184292167425156,
0.22738583385944366,
-0.1771182119846344,
-0.14591707289218903,
-0.03709074854850769,
-0.1933315545320511,
0.08402069658041,
0.013471443206071854,
-0.5429398417472839,
0.16046883165836334,
-0.35815536975860596,
0.11570598930120468,
-0.1856328696012497,
-0.11716005206108093,
-0.29803767800331116,
-0.10351601243019104,
-0.000604207394644618,
-0.0976313129067421,
0.018877854570746422,
-0.32740938663482666,
0.2548564076423645,
-0.12938927114009857,
0.08640072494745255,
0.5501937866210938,
-0.00012316074571572244,
-0.01377630140632391,
0.28356876969337463,
-0.16720838844776154,
-0.25339964032173157,
-0.12841573357582092,
-0.041656699031591415,
-0.02979831025004387,
0.09849721938371658,
-0.22525063157081604,
-0.011924220249056816,
-0.05259275063872337,
0.23173056542873383,
-0.3445146977901459,
0.4429749548435211,
0.22438852488994598,
0.1404946744441986,
0.06996550410985947,
0.4524520933628082,
-0.0441129244863987,
0.17390716075897217,
0.3341217339038849,
0.07138080149888992,
0.33202269673347473,
-0.2908717095851898,
-0.43568703532218933,
-0.03041297011077404,
0.3930503726005554,
-0.03994116559624672,
0.005288136191666126,
0.5653294324874878,
-0.14458337426185608,
0.02535320818424225,
-0.3368179500102997,
0.1123085618019104,
-0.007249276619404554,
0.5341090559959412,
-0.4902597963809967,
-0.02837262861430645,
-0.01478687021881342,
-0.05338368937373161,
-0.09523987770080566,
0.29709818959236145,
0.2689521312713623,
-0.2722630202770233,
-0.14476075768470764,
-0.13041681051254272,
-0.32499849796295166,
-0.3197002708911896,
0.44286853075027466,
-0.0909217819571495,
0.19100096821784973,
-0.024716006591916084,
0.3037816286087036,
0.5653707385063171,
-0.2050894945859909,
-0.23406194150447845,
-0.0758122056722641,
0.13654372096061707,
0.3287968039512634,
-0.26772069931030273,
-0.16602888703346252,
-0.30294886231422424,
-0.20470978319644928,
0.3511369526386261,
-0.4987058937549591,
-0.3861927390098572,
-0.12600089609622955,
0.15166963636875153,
0.021239040419459343,
0.4036451578140259,
0.28173547983169556,
-0.29636576771736145,
0.32283729314804077,
0.3122970461845398,
0.17427171766757965,
-0.2495379000902176,
-0.15899010002613068,
0.07679527997970581,
-0.037379130721092224,
-0.11104995012283325,
-0.19148291647434235,
0.08377370238304138,
-0.0016540841897949576,
-0.01374595332890749,
-0.021803364157676697,
-0.21283170580863953,
-0.1232089027762413,
-0.053849756717681885,
0.5055230259895325,
-0.10408411175012589,
-0.08461876213550568,
0.37382787466049194,
0.1444597840309143,
-0.012684540823101997,
-0.008076931349933147,
-0.05637473613023758,
0.41042256355285645,
-0.34362757205963135,
0.2843070924282074,
0.05026388540863991,
-0.0011584651656448841,
0.3263408839702606,
-0.07270574569702148,
-0.03312826156616211,
-0.05668129026889801,
0.16204515099525452,
-0.35802340507507324,
0.00871086772531271,
0.18468765914440155,
0.17885635793209076,
0.2493288666009903,
0.25035110116004944,
-0.1479862928390503,
-0.1526842713356018,
0.19699648022651672,
-0.16346801817417145,
-0.24330347776412964,
0.038736771792173386,
0.01092929020524025,
0.09801333397626877,
0.2277471423149109,
-0.2775132954120636,
0.18281055986881256,
0.652862012386322,
-0.0775153785943985,
-0.05726506561040878,
-0.08019668608903885,
-0.2296682745218277,
-0.16876882314682007,
0.27087822556495667,
0.5193135142326355,
-0.06465306133031845,
-0.10548370331525803,
-0.11697012931108475,
0.1677042841911316,
0.25101229548454285,
0.44138363003730774,
-0.16382251679897308,
0.2519161105155945,
-0.09722135215997696,
0.01679861918091774,
0.41418400406837463,
-0.31050944328308105,
-0.34190431237220764,
-0.0056238314136862755,
-0.02522915229201317,
-0.13432222604751587,
0.02327807806432247,
0.13213089108467102,
0.07739990204572678,
0.11566579341888428,
0.11192624270915985,
0.31041884422302246,
0.05610376596450806,
0.2800839841365814,
-0.30419841408729553,
-0.2975767254829407,
0.25286865234375,
0.07474607229232788,
0.06539707630872726,
-0.20408274233341217,
-0.060849517583847046,
0.8107670545578003,
0.29729488492012024,
-0.2623123526573181,
0.1555342674255371,
0.3147747814655304,
0.10613712668418884,
0.0064365193247795105,
0.08711925148963928,
-0.21991287171840668,
-0.25144723057746887,
-0.07342468947172165,
-0.05669912323355675,
0.3305934965610504,
-0.14518874883651733,
-0.04148105904459953,
0.15372270345687866,
-0.1186709776520729,
-0.17224955558776855,
-0.39086270332336426,
0.06229532137513161,
0.013073514215648174,
0.12358259409666061,
0.09008461982011795,
0.08106052130460739,
0.056008581072092056,
-0.09397000074386597,
0.2478923499584198,
-0.5998017191886902,
0.17150290310382843,
-0.28960758447647095,
-0.10769418627023697,
-0.021440112963318825,
-0.0624917596578598,
0.027414904907345772,
-0.04746546596288681,
-0.06855592876672745,
0.1519923061132431,
0.07713465392589569,
-0.1671154946088791,
-0.09068439155817032,
0.003420039778575301,
0.310109406709671,
-0.32211431860923767,
0.16570569574832916,
0.2421722114086151,
0.19550420343875885,
-0.09402245283126831,
-0.19769605994224548,
-0.155878484249115,
0.10513398051261902,
0.3647212088108063,
0.07918786257505417,
0.16877521574497223,
0.026240810751914978,
0.08954749256372452,
0.17978596687316895,
-0.2070019394159317,
0.21816347539424896,
0.012355189770460129,
0.240883931517601,
0.09500641375780106,
-0.029394637793302536,
-0.3097330629825592,
0.45832404494285583,
0.26819708943367004,
0.27729952335357666,
0.24248167872428894,
-0.4937291443347931,
-0.07404223084449768,
-0.06565181910991669,
-0.0718550980091095,
0.3221568763256073,
0.0500786118209362,
-0.11956381052732468,
0.12015480548143387,
0.19633783400058746,
0.00970320776104927,
0.30975982546806335,
0.1743883192539215,
0.4940778315067291,
-0.01870863139629364,
0.105722576379776,
-0.08063474297523499,
-0.09958699345588684,
-0.14684832096099854,
0.0500459298491478,
0.5077638626098633,
-0.17538021504878998,
-0.015785524621605873,
-0.18642668426036835,
-0.4006144404411316,
-0.2753978371620178,
0.1643146127462387,
-0.4642423689365387,
-0.13692739605903625,
-0.3849298655986786,
0.32475799322128296,
0.06956294924020767,
0.2584396302700043,
0.416075736284256,
-0.05071398988366127,
0.3513423800468445,
-0.1406712830066681,
0.0687718540430069,
-0.23041220009326935,
-0.11907540261745453,
-0.06273715943098068,
0.4409622251987457,
-0.2204727828502655,
0.08683231472969055,
0.1567283272743225,
-0.31955772638320923,
-0.21350908279418945,
-0.1457151472568512,
0.14698965847492218,
-0.08082127571105957,
0.12557438015937805,
0.05964222550392151,
0.5084348917007446,
-0.12339834868907928,
-0.2323761284351349,
0.17210941016674042,
0.0899069607257843,
-0.05887201428413391,
-0.037300556898117065,
0.02329365722835064,
0.15538495779037476,
0.05408918857574463,
-0.2931138277053833,
-0.17975705862045288,
-0.508184552192688,
0.40148040652275085,
-0.03389118239283562,
0.15136273205280304,
0.32791826128959656,
0.1617622822523117,
0.11561518162488937,
-0.12136616557836533,
0.08944834023714066,
-0.16215083003044128,
0.016019998118281364,
0.3207916021347046,
-0.1488260179758072,
-0.21143513917922974,
-0.02906382456421852,
0.06273750215768814,
0.3063039481639862,
0.23018574714660645,
-0.6157580614089966,
-0.02091062441468239,
-0.11368213593959808,
-0.010894600301980972,
-0.058850836008787155,
0.28631117939949036,
0.3913799226284027,
0.07892140746116638,
0.10780006647109985,
0.13758891820907593,
-0.16775739192962646,
0.09490665048360825,
-0.040982916951179504,
0.32489657402038574,
0.22007925808429718,
0.5234264731407166,
0.06372649222612381,
0.8384490013122559,
0.34196406602859497,
0.18714050948619843,
0.22882597148418427,
-0.022065989673137665,
0.0835644081234932,
0.004970150999724865,
-0.348187118768692,
-0.008208919316530228,
-0.03689686581492424,
0.061999522149562836,
0.16614322364330292,
0.008755018003284931,
-0.33744320273399353,
-0.16767241060733795,
-0.35052862763404846,
0.04599038138985634,
-0.3771669268608093,
0.2698536217212677,
0.17512498795986176,
0.36742353439331055,
-0.08383559435606003,
-0.0824132040143013,
0.02316123992204666,
-0.35157808661460876,
0.19453281164169312,
0.2135324627161026,
-0.017528695985674858,
0.02112432010471821,
-0.11370823532342911,
-0.39588916301727295,
-0.640546441078186,
0.11820436269044876,
-0.15440216660499573,
0.06297993659973145,
-0.10384825617074966,
0.09339769929647446,
0.06005198508501053,
0.1583072394132614,
0.7553272843360901,
0.005923289339989424,
-0.30729299783706665,
-0.0461270771920681,
-0.2609420120716095,
-0.5063744187355042,
0.21378420293331146,
-0.18415705859661102,
0.3441570997238159,
0.14338910579681396,
0.5205534100532532,
-0.3616020381450653,
-0.09813381731510162,
0.32128798961639404,
0.37471455335617065,
-0.2170829176902771,
-0.20469240844249725,
-0.13433176279067993,
-0.2551262080669403,
-0.6043948531150818,
0.004102698061615229,
0.05456928163766861,
0.1934489607810974,
0.49645286798477173,
0.2044563591480255,
0.05266909301280975,
-0.050896842032670975,
0.13719402253627777,
-0.053375739604234695,
0.3105924725532532,
0.11065413057804108,
0.1008516475558281,
0.1345042735338211,
-0.15806789696216583,
0.3764187693595886,
0.2939082980155945,
0.0716901570558548,
-0.3797554075717926,
-0.09978523850440979,
0.05762147530913353,
0.25239649415016174,
-0.06275457888841629,
-0.013914779759943485,
0.0038343530613929033,
0.026899192482233047,
0.17809520661830902,
-0.09977508336305618,
0.13221965730190277,
0.18756836652755737,
0.08740786463022232,
-0.45114579796791077,
-0.43663138151168823,
0.3414416015148163,
0.19970451295375824,
0.15969416499137878,
0.3301563858985901,
-0.14244431257247925,
-0.5566366314888,
0.32534104585647583,
0.35895806550979614,
0.9608324766159058,
-0.3551483154296875,
0.3937278687953949,
0.09621862322092056,
0.21176472306251526,
0.6567656397819519,
-0.47514036297798157,
0.3529614806175232,
-0.36994051933288574,
-0.0815761610865593,
0.04317505657672882,
-0.1330997198820114,
0.13796204328536987,
-0.017232758924365044,
-0.43608641624450684,
0.2891327142715454,
0.09133251756429672,
-0.03982735052704811,
-0.18405863642692566,
0.3883705735206604,
0.1124473288655281,
-0.48120003938674927,
-0.18418651819229126,
0.03195100650191307,
-0.12698417901992798,
0.2439669519662857,
-0.04560341313481331,
-0.027440568432211876,
0.11567571759223938,
-0.11502739042043686,
-0.3924034535884857,
-0.03745150938630104,
-0.48363596200942993,
0.30769115686416626,
-0.2517831027507782,
0.0015953655820339918,
0.40474554896354675,
0.3928065001964569,
0.01018132921308279,
0.3698485195636749,
-0.13404984772205353,
0.010526429861783981,
-0.36008134484291077,
-0.2767650783061981,
-0.1850568652153015,
0.06766454875469208,
0.242404505610466,
-0.19374260306358337,
-0.10712756216526031,
0.07635974138975143,
-0.03994683548808098,
-0.1982414424419403,
-0.21035297214984894,
-0.031876858323812485,
-0.12981919944286346,
-0.20456553995609283,
-0.21239322423934937,
0.013284141197800636,
-0.35847562551498413,
-0.018620021641254425,
0.045863233506679535,
0.01084706000983715,
-0.3378365635871887,
0.32868334650993347,
0.1423625499010086,
-0.4008426070213318,
0.030740324407815933,
0.4164583384990692,
0.3485441207885742,
0.1605854630470276,
0.720025360584259,
0.323261559009552,
-0.2456386834383011,
-0.1618594080209732,
-0.0824732556939125,
-0.025335872545838356,
-0.3048343360424042,
0.21009260416030884,
0.0837550014257431,
0.10605346411466599,
-0.30660057067871094,
-0.00037718459498137236,
0.12854333221912384,
0.04523569345474243,
0.0363888256251812,
-0.3043982684612274,
-0.560200035572052,
0.20824962854385376,
-0.01047776360064745,
0.03649914264678955,
0.23689424991607666,
0.022190408781170845,
0.02953154966235161,
0.24801486730575562,
-0.1566304713487625,
0.0200542900711298,
-0.16914212703704834,
0.2507920563220978,
0.2438187152147293,
-0.1116873025894165,
0.10324373841285706,
-0.012949067167937756,
-0.0043390667997300625,
0.15931078791618347,
-0.01502357516437769,
-0.12695281207561493,
0.04548146203160286,
0.15326263010501862,
-0.02685132622718811,
-0.2777855396270752,
-0.09635801613330841,
-0.5430380702018738,
-0.01589692197740078,
-0.3039938509464264,
0.011127829551696777,
0.02127934619784355,
-0.13627037405967712,
0.11097752302885056,
0.2019032984972,
-0.2731659710407257,
-0.06302575767040253,
0.279261976480484,
-0.022164518013596535,
-0.05075211077928543,
0.16587062180042267,
0.2017493098974228,
0.09379857033491135,
-0.1570737063884735,
-0.5362299084663391,
0.05583448335528374,
-0.08433609455823898,
-0.026627929881215096,
0.10199334472417831,
-0.11428510397672653,
-0.3993757665157318,
0.31942206621170044,
0.09046675264835358,
0.1510140597820282,
-0.14232788980007172,
0.20684121549129486,
0.20045147836208344,
0.008968900889158249,
-0.19372694194316864,
-0.0418560616672039,
0.33019885420799255,
-0.29200834035873413,
-0.05059792101383209,
0.32779014110565186,
-0.13116717338562012,
0.045345135033130646,
-0.029958052560687065,
0.131158247590065,
0.3588019609451294,
-0.07343082129955292,
0.3226180076599121,
0.006158402655273676,
-0.08348400890827179,
-0.016720864921808243,
0.1939016878604889,
0.405727356672287,
0.25870269536972046,
0.20438647270202637,
-0.15563851594924927,
0.03763880953192711,
-0.105872243642807,
-0.2548229396343231,
0.03794356435537338,
-0.0836716741323471,
0.14148905873298645,
0.4189733862876892,
-0.1775912344455719,
0.15922003984451294,
-0.19391296803951263,
0.17801780998706818,
0.18459685146808624,
-0.27455762028694153,
0.07877655327320099,
0.2984713912010193,
-0.21168772876262665,
0.04647485539317131,
0.14998888969421387,
-0.11578154563903809,
-0.06578820198774338,
0.14178577065467834,
0.07711374014616013,
-0.6087393164634705,
0.45919573307037354,
0.1467866599559784,
-0.22065070271492004,
-0.14092643558979034,
0.2773652970790863,
0.4522537887096405,
0.07107837498188019,
-0.30539900064468384,
0.05759404972195625,
0.02698766440153122,
0.13658887147903442,
-0.3318273425102234,
0.30944621562957764,
0.46216192841529846,
0.2915849983692169,
-0.19562357664108276,
0.25357291102409363,
-0.15816403925418854,
-0.012619315646588802,
0.015425755642354488,
-0.023688798770308495,
0.11646560579538345,
0.21650521457195282,
0.11305493861436844,
-0.010933046229183674,
-0.05862734839320183,
-0.15109561383724213,
0.16302037239074707,
0.1425207406282425,
-0.22791634500026703,
-0.38114193081855774,
-0.0991922989487648,
-0.17108850181102753,
-0.014039738103747368,
-0.011570178903639317,
-0.5901708602905273,
0.2826705574989319,
0.5286228656768799,
-0.13806703686714172,
0.08121010661125183,
0.020232802256941795,
0.013729493133723736,
-0.031966254115104675,
0.48462381958961487,
0.2030230611562729,
-0.0330803319811821,
-0.4814164936542511,
-0.3177812695503235,
-0.4150763154029846,
0.02410843037068844,
-0.3297814130783081,
0.004063060041517019,
-0.07540741562843323,
0.11538782715797424,
-0.04735545814037323,
0.04659400135278702,
0.04862787574529648,
-0.36422494053840637,
-0.04351768270134926,
0.1776147037744522,
-0.15607242286205292,
-0.25533750653266907,
-0.12738977372646332,
0.1787591427564621,
0.17938879132270813,
-0.19811443984508514,
0.26311153173446655,
0.008783611468970776,
-0.13983745872974396,
-0.3518665134906769,
0.13386838138103485,
0.050196729600429535,
0.17792177200317383,
0.15763580799102783,
0.061005376279354095,
0.38950493931770325,
0.004085572902113199,
-0.24227167665958405,
0.02581561729311943,
0.00026924521080218256,
-0.09981399029493332,
0.14134080708026886,
0.1294572651386261,
0.36912816762924194,
-0.4097653031349182,
-0.38277947902679443,
-0.43279334902763367,
0.28977447748184204,
-0.06378491222858429,
-0.11976820975542068,
-0.03508025035262108,
-0.037601836025714874,
0.2526533305644989,
0.0688294991850853,
0.06360182166099548,
0.1586662232875824,
-0.06568904221057892,
-0.0003347872116137296,
-0.45090430974960327,
-0.2615719437599182,
0.4598855674266815,
-0.45830026268959045,
-0.3856021761894226,
-0.08610018342733383,
-0.09503575414419174,
-0.14593543112277985,
-0.13941237330436707,
-0.7795313000679016,
0.09105968475341797,
0.2944115102291107,
0.09553062170743942,
-0.42246922850608826,
0.03149569407105446,
-0.10581450909376144,
0.12016617506742477,
-0.1256258338689804,
0.3365497291088104,
-0.090094655752182,
-0.4325060546398163,
0.16513030230998993,
-0.20777159929275513
] |
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.26154208183288574,
-0.03726404160261154,
0.05204009637236595,
0.6045717597007751,
0.45383769273757935,
0.2834008038043976,
0.14564386010169983,
0.27246683835983276,
0.17855094373226166,
0.10566100478172302,
-0.058184292167425156,
0.22738583385944366,
-0.1771182119846344,
-0.14591707289218903,
-0.03709074854850769,
-0.1933315545320511,
0.08402069658041,
0.013471443206071854,
-0.5429398417472839,
0.16046883165836334,
-0.35815536975860596,
0.11570598930120468,
-0.1856328696012497,
-0.11716005206108093,
-0.29803767800331116,
-0.10351601243019104,
-0.000604207394644618,
-0.0976313129067421,
0.018877854570746422,
-0.32740938663482666,
0.2548564076423645,
-0.12938927114009857,
0.08640072494745255,
0.5501937866210938,
-0.00012316074571572244,
-0.01377630140632391,
0.28356876969337463,
-0.16720838844776154,
-0.25339964032173157,
-0.12841573357582092,
-0.041656699031591415,
-0.02979831025004387,
0.09849721938371658,
-0.22525063157081604,
-0.011924220249056816,
-0.05259275063872337,
0.23173056542873383,
-0.3445146977901459,
0.4429749548435211,
0.22438852488994598,
0.1404946744441986,
0.06996550410985947,
0.4524520933628082,
-0.0441129244863987,
0.17390716075897217,
0.3341217339038849,
0.07138080149888992,
0.33202269673347473,
-0.2908717095851898,
-0.43568703532218933,
-0.03041297011077404,
0.3930503726005554,
-0.03994116559624672,
0.005288136191666126,
0.5653294324874878,
-0.14458337426185608,
0.02535320818424225,
-0.3368179500102997,
0.1123085618019104,
-0.007249276619404554,
0.5341090559959412,
-0.4902597963809967,
-0.02837262861430645,
-0.01478687021881342,
-0.05338368937373161,
-0.09523987770080566,
0.29709818959236145,
0.2689521312713623,
-0.2722630202770233,
-0.14476075768470764,
-0.13041681051254272,
-0.32499849796295166,
-0.3197002708911896,
0.44286853075027466,
-0.0909217819571495,
0.19100096821784973,
-0.024716006591916084,
0.3037816286087036,
0.5653707385063171,
-0.2050894945859909,
-0.23406194150447845,
-0.0758122056722641,
0.13654372096061707,
0.3287968039512634,
-0.26772069931030273,
-0.16602888703346252,
-0.30294886231422424,
-0.20470978319644928,
0.3511369526386261,
-0.4987058937549591,
-0.3861927390098572,
-0.12600089609622955,
0.15166963636875153,
0.021239040419459343,
0.4036451578140259,
0.28173547983169556,
-0.29636576771736145,
0.32283729314804077,
0.3122970461845398,
0.17427171766757965,
-0.2495379000902176,
-0.15899010002613068,
0.07679527997970581,
-0.037379130721092224,
-0.11104995012283325,
-0.19148291647434235,
0.08377370238304138,
-0.0016540841897949576,
-0.01374595332890749,
-0.021803364157676697,
-0.21283170580863953,
-0.1232089027762413,
-0.053849756717681885,
0.5055230259895325,
-0.10408411175012589,
-0.08461876213550568,
0.37382787466049194,
0.1444597840309143,
-0.012684540823101997,
-0.008076931349933147,
-0.05637473613023758,
0.41042256355285645,
-0.34362757205963135,
0.2843070924282074,
0.05026388540863991,
-0.0011584651656448841,
0.3263408839702606,
-0.07270574569702148,
-0.03312826156616211,
-0.05668129026889801,
0.16204515099525452,
-0.35802340507507324,
0.00871086772531271,
0.18468765914440155,
0.17885635793209076,
0.2493288666009903,
0.25035110116004944,
-0.1479862928390503,
-0.1526842713356018,
0.19699648022651672,
-0.16346801817417145,
-0.24330347776412964,
0.038736771792173386,
0.01092929020524025,
0.09801333397626877,
0.2277471423149109,
-0.2775132954120636,
0.18281055986881256,
0.652862012386322,
-0.0775153785943985,
-0.05726506561040878,
-0.08019668608903885,
-0.2296682745218277,
-0.16876882314682007,
0.27087822556495667,
0.5193135142326355,
-0.06465306133031845,
-0.10548370331525803,
-0.11697012931108475,
0.1677042841911316,
0.25101229548454285,
0.44138363003730774,
-0.16382251679897308,
0.2519161105155945,
-0.09722135215997696,
0.01679861918091774,
0.41418400406837463,
-0.31050944328308105,
-0.34190431237220764,
-0.0056238314136862755,
-0.02522915229201317,
-0.13432222604751587,
0.02327807806432247,
0.13213089108467102,
0.07739990204572678,
0.11566579341888428,
0.11192624270915985,
0.31041884422302246,
0.05610376596450806,
0.2800839841365814,
-0.30419841408729553,
-0.2975767254829407,
0.25286865234375,
0.07474607229232788,
0.06539707630872726,
-0.20408274233341217,
-0.060849517583847046,
0.8107670545578003,
0.29729488492012024,
-0.2623123526573181,
0.1555342674255371,
0.3147747814655304,
0.10613712668418884,
0.0064365193247795105,
0.08711925148963928,
-0.21991287171840668,
-0.25144723057746887,
-0.07342468947172165,
-0.05669912323355675,
0.3305934965610504,
-0.14518874883651733,
-0.04148105904459953,
0.15372270345687866,
-0.1186709776520729,
-0.17224955558776855,
-0.39086270332336426,
0.06229532137513161,
0.013073514215648174,
0.12358259409666061,
0.09008461982011795,
0.08106052130460739,
0.056008581072092056,
-0.09397000074386597,
0.2478923499584198,
-0.5998017191886902,
0.17150290310382843,
-0.28960758447647095,
-0.10769418627023697,
-0.021440112963318825,
-0.0624917596578598,
0.027414904907345772,
-0.04746546596288681,
-0.06855592876672745,
0.1519923061132431,
0.07713465392589569,
-0.1671154946088791,
-0.09068439155817032,
0.003420039778575301,
0.310109406709671,
-0.32211431860923767,
0.16570569574832916,
0.2421722114086151,
0.19550420343875885,
-0.09402245283126831,
-0.19769605994224548,
-0.155878484249115,
0.10513398051261902,
0.3647212088108063,
0.07918786257505417,
0.16877521574497223,
0.026240810751914978,
0.08954749256372452,
0.17978596687316895,
-0.2070019394159317,
0.21816347539424896,
0.012355189770460129,
0.240883931517601,
0.09500641375780106,
-0.029394637793302536,
-0.3097330629825592,
0.45832404494285583,
0.26819708943367004,
0.27729952335357666,
0.24248167872428894,
-0.4937291443347931,
-0.07404223084449768,
-0.06565181910991669,
-0.0718550980091095,
0.3221568763256073,
0.0500786118209362,
-0.11956381052732468,
0.12015480548143387,
0.19633783400058746,
0.00970320776104927,
0.30975982546806335,
0.1743883192539215,
0.4940778315067291,
-0.01870863139629364,
0.105722576379776,
-0.08063474297523499,
-0.09958699345588684,
-0.14684832096099854,
0.0500459298491478,
0.5077638626098633,
-0.17538021504878998,
-0.015785524621605873,
-0.18642668426036835,
-0.4006144404411316,
-0.2753978371620178,
0.1643146127462387,
-0.4642423689365387,
-0.13692739605903625,
-0.3849298655986786,
0.32475799322128296,
0.06956294924020767,
0.2584396302700043,
0.416075736284256,
-0.05071398988366127,
0.3513423800468445,
-0.1406712830066681,
0.0687718540430069,
-0.23041220009326935,
-0.11907540261745453,
-0.06273715943098068,
0.4409622251987457,
-0.2204727828502655,
0.08683231472969055,
0.1567283272743225,
-0.31955772638320923,
-0.21350908279418945,
-0.1457151472568512,
0.14698965847492218,
-0.08082127571105957,
0.12557438015937805,
0.05964222550392151,
0.5084348917007446,
-0.12339834868907928,
-0.2323761284351349,
0.17210941016674042,
0.0899069607257843,
-0.05887201428413391,
-0.037300556898117065,
0.02329365722835064,
0.15538495779037476,
0.05408918857574463,
-0.2931138277053833,
-0.17975705862045288,
-0.508184552192688,
0.40148040652275085,
-0.03389118239283562,
0.15136273205280304,
0.32791826128959656,
0.1617622822523117,
0.11561518162488937,
-0.12136616557836533,
0.08944834023714066,
-0.16215083003044128,
0.016019998118281364,
0.3207916021347046,
-0.1488260179758072,
-0.21143513917922974,
-0.02906382456421852,
0.06273750215768814,
0.3063039481639862,
0.23018574714660645,
-0.6157580614089966,
-0.02091062441468239,
-0.11368213593959808,
-0.010894600301980972,
-0.058850836008787155,
0.28631117939949036,
0.3913799226284027,
0.07892140746116638,
0.10780006647109985,
0.13758891820907593,
-0.16775739192962646,
0.09490665048360825,
-0.040982916951179504,
0.32489657402038574,
0.22007925808429718,
0.5234264731407166,
0.06372649222612381,
0.8384490013122559,
0.34196406602859497,
0.18714050948619843,
0.22882597148418427,
-0.022065989673137665,
0.0835644081234932,
0.004970150999724865,
-0.348187118768692,
-0.008208919316530228,
-0.03689686581492424,
0.061999522149562836,
0.16614322364330292,
0.008755018003284931,
-0.33744320273399353,
-0.16767241060733795,
-0.35052862763404846,
0.04599038138985634,
-0.3771669268608093,
0.2698536217212677,
0.17512498795986176,
0.36742353439331055,
-0.08383559435606003,
-0.0824132040143013,
0.02316123992204666,
-0.35157808661460876,
0.19453281164169312,
0.2135324627161026,
-0.017528695985674858,
0.02112432010471821,
-0.11370823532342911,
-0.39588916301727295,
-0.640546441078186,
0.11820436269044876,
-0.15440216660499573,
0.06297993659973145,
-0.10384825617074966,
0.09339769929647446,
0.06005198508501053,
0.1583072394132614,
0.7553272843360901,
0.005923289339989424,
-0.30729299783706665,
-0.0461270771920681,
-0.2609420120716095,
-0.5063744187355042,
0.21378420293331146,
-0.18415705859661102,
0.3441570997238159,
0.14338910579681396,
0.5205534100532532,
-0.3616020381450653,
-0.09813381731510162,
0.32128798961639404,
0.37471455335617065,
-0.2170829176902771,
-0.20469240844249725,
-0.13433176279067993,
-0.2551262080669403,
-0.6043948531150818,
0.004102698061615229,
0.05456928163766861,
0.1934489607810974,
0.49645286798477173,
0.2044563591480255,
0.05266909301280975,
-0.050896842032670975,
0.13719402253627777,
-0.053375739604234695,
0.3105924725532532,
0.11065413057804108,
0.1008516475558281,
0.1345042735338211,
-0.15806789696216583,
0.3764187693595886,
0.2939082980155945,
0.0716901570558548,
-0.3797554075717926,
-0.09978523850440979,
0.05762147530913353,
0.25239649415016174,
-0.06275457888841629,
-0.013914779759943485,
0.0038343530613929033,
0.026899192482233047,
0.17809520661830902,
-0.09977508336305618,
0.13221965730190277,
0.18756836652755737,
0.08740786463022232,
-0.45114579796791077,
-0.43663138151168823,
0.3414416015148163,
0.19970451295375824,
0.15969416499137878,
0.3301563858985901,
-0.14244431257247925,
-0.5566366314888,
0.32534104585647583,
0.35895806550979614,
0.9608324766159058,
-0.3551483154296875,
0.3937278687953949,
0.09621862322092056,
0.21176472306251526,
0.6567656397819519,
-0.47514036297798157,
0.3529614806175232,
-0.36994051933288574,
-0.0815761610865593,
0.04317505657672882,
-0.1330997198820114,
0.13796204328536987,
-0.017232758924365044,
-0.43608641624450684,
0.2891327142715454,
0.09133251756429672,
-0.03982735052704811,
-0.18405863642692566,
0.3883705735206604,
0.1124473288655281,
-0.48120003938674927,
-0.18418651819229126,
0.03195100650191307,
-0.12698417901992798,
0.2439669519662857,
-0.04560341313481331,
-0.027440568432211876,
0.11567571759223938,
-0.11502739042043686,
-0.3924034535884857,
-0.03745150938630104,
-0.48363596200942993,
0.30769115686416626,
-0.2517831027507782,
0.0015953655820339918,
0.40474554896354675,
0.3928065001964569,
0.01018132921308279,
0.3698485195636749,
-0.13404984772205353,
0.010526429861783981,
-0.36008134484291077,
-0.2767650783061981,
-0.1850568652153015,
0.06766454875469208,
0.242404505610466,
-0.19374260306358337,
-0.10712756216526031,
0.07635974138975143,
-0.03994683548808098,
-0.1982414424419403,
-0.21035297214984894,
-0.031876858323812485,
-0.12981919944286346,
-0.20456553995609283,
-0.21239322423934937,
0.013284141197800636,
-0.35847562551498413,
-0.018620021641254425,
0.045863233506679535,
0.01084706000983715,
-0.3378365635871887,
0.32868334650993347,
0.1423625499010086,
-0.4008426070213318,
0.030740324407815933,
0.4164583384990692,
0.3485441207885742,
0.1605854630470276,
0.720025360584259,
0.323261559009552,
-0.2456386834383011,
-0.1618594080209732,
-0.0824732556939125,
-0.025335872545838356,
-0.3048343360424042,
0.21009260416030884,
0.0837550014257431,
0.10605346411466599,
-0.30660057067871094,
-0.00037718459498137236,
0.12854333221912384,
0.04523569345474243,
0.0363888256251812,
-0.3043982684612274,
-0.560200035572052,
0.20824962854385376,
-0.01047776360064745,
0.03649914264678955,
0.23689424991607666,
0.022190408781170845,
0.02953154966235161,
0.24801486730575562,
-0.1566304713487625,
0.0200542900711298,
-0.16914212703704834,
0.2507920563220978,
0.2438187152147293,
-0.1116873025894165,
0.10324373841285706,
-0.012949067167937756,
-0.0043390667997300625,
0.15931078791618347,
-0.01502357516437769,
-0.12695281207561493,
0.04548146203160286,
0.15326263010501862,
-0.02685132622718811,
-0.2777855396270752,
-0.09635801613330841,
-0.5430380702018738,
-0.01589692197740078,
-0.3039938509464264,
0.011127829551696777,
0.02127934619784355,
-0.13627037405967712,
0.11097752302885056,
0.2019032984972,
-0.2731659710407257,
-0.06302575767040253,
0.279261976480484,
-0.022164518013596535,
-0.05075211077928543,
0.16587062180042267,
0.2017493098974228,
0.09379857033491135,
-0.1570737063884735,
-0.5362299084663391,
0.05583448335528374,
-0.08433609455823898,
-0.026627929881215096,
0.10199334472417831,
-0.11428510397672653,
-0.3993757665157318,
0.31942206621170044,
0.09046675264835358,
0.1510140597820282,
-0.14232788980007172,
0.20684121549129486,
0.20045147836208344,
0.008968900889158249,
-0.19372694194316864,
-0.0418560616672039,
0.33019885420799255,
-0.29200834035873413,
-0.05059792101383209,
0.32779014110565186,
-0.13116717338562012,
0.045345135033130646,
-0.029958052560687065,
0.131158247590065,
0.3588019609451294,
-0.07343082129955292,
0.3226180076599121,
0.006158402655273676,
-0.08348400890827179,
-0.016720864921808243,
0.1939016878604889,
0.405727356672287,
0.25870269536972046,
0.20438647270202637,
-0.15563851594924927,
0.03763880953192711,
-0.105872243642807,
-0.2548229396343231,
0.03794356435537338,
-0.0836716741323471,
0.14148905873298645,
0.4189733862876892,
-0.1775912344455719,
0.15922003984451294,
-0.19391296803951263,
0.17801780998706818,
0.18459685146808624,
-0.27455762028694153,
0.07877655327320099,
0.2984713912010193,
-0.21168772876262665,
0.04647485539317131,
0.14998888969421387,
-0.11578154563903809,
-0.06578820198774338,
0.14178577065467834,
0.07711374014616013,
-0.6087393164634705,
0.45919573307037354,
0.1467866599559784,
-0.22065070271492004,
-0.14092643558979034,
0.2773652970790863,
0.4522537887096405,
0.07107837498188019,
-0.30539900064468384,
0.05759404972195625,
0.02698766440153122,
0.13658887147903442,
-0.3318273425102234,
0.30944621562957764,
0.46216192841529846,
0.2915849983692169,
-0.19562357664108276,
0.25357291102409363,
-0.15816403925418854,
-0.012619315646588802,
0.015425755642354488,
-0.023688798770308495,
0.11646560579538345,
0.21650521457195282,
0.11305493861436844,
-0.010933046229183674,
-0.05862734839320183,
-0.15109561383724213,
0.16302037239074707,
0.1425207406282425,
-0.22791634500026703,
-0.38114193081855774,
-0.0991922989487648,
-0.17108850181102753,
-0.014039738103747368,
-0.011570178903639317,
-0.5901708602905273,
0.2826705574989319,
0.5286228656768799,
-0.13806703686714172,
0.08121010661125183,
0.020232802256941795,
0.013729493133723736,
-0.031966254115104675,
0.48462381958961487,
0.2030230611562729,
-0.0330803319811821,
-0.4814164936542511,
-0.3177812695503235,
-0.4150763154029846,
0.02410843037068844,
-0.3297814130783081,
0.004063060041517019,
-0.07540741562843323,
0.11538782715797424,
-0.04735545814037323,
0.04659400135278702,
0.04862787574529648,
-0.36422494053840637,
-0.04351768270134926,
0.1776147037744522,
-0.15607242286205292,
-0.25533750653266907,
-0.12738977372646332,
0.1787591427564621,
0.17938879132270813,
-0.19811443984508514,
0.26311153173446655,
0.008783611468970776,
-0.13983745872974396,
-0.3518665134906769,
0.13386838138103485,
0.050196729600429535,
0.17792177200317383,
0.15763580799102783,
0.061005376279354095,
0.38950493931770325,
0.004085572902113199,
-0.24227167665958405,
0.02581561729311943,
0.00026924521080218256,
-0.09981399029493332,
0.14134080708026886,
0.1294572651386261,
0.36912816762924194,
-0.4097653031349182,
-0.38277947902679443,
-0.43279334902763367,
0.28977447748184204,
-0.06378491222858429,
-0.11976820975542068,
-0.03508025035262108,
-0.037601836025714874,
0.2526533305644989,
0.0688294991850853,
0.06360182166099548,
0.1586662232875824,
-0.06568904221057892,
-0.0003347872116137296,
-0.45090430974960327,
-0.2615719437599182,
0.4598855674266815,
-0.45830026268959045,
-0.3856021761894226,
-0.08610018342733383,
-0.09503575414419174,
-0.14593543112277985,
-0.13941237330436707,
-0.7795313000679016,
0.09105968475341797,
0.2944115102291107,
0.09553062170743942,
-0.42246922850608826,
0.03149569407105446,
-0.10581450909376144,
0.12016617506742477,
-0.1256258338689804,
0.3365497291088104,
-0.090094655752182,
-0.4325060546398163,
0.16513030230998993,
-0.20777159929275513
] |
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.26154208183288574,
-0.03726404160261154,
0.05204009637236595,
0.6045717597007751,
0.45383769273757935,
0.2834008038043976,
0.14564386010169983,
0.27246683835983276,
0.17855094373226166,
0.10566100478172302,
-0.058184292167425156,
0.22738583385944366,
-0.1771182119846344,
-0.14591707289218903,
-0.03709074854850769,
-0.1933315545320511,
0.08402069658041,
0.013471443206071854,
-0.5429398417472839,
0.16046883165836334,
-0.35815536975860596,
0.11570598930120468,
-0.1856328696012497,
-0.11716005206108093,
-0.29803767800331116,
-0.10351601243019104,
-0.000604207394644618,
-0.0976313129067421,
0.018877854570746422,
-0.32740938663482666,
0.2548564076423645,
-0.12938927114009857,
0.08640072494745255,
0.5501937866210938,
-0.00012316074571572244,
-0.01377630140632391,
0.28356876969337463,
-0.16720838844776154,
-0.25339964032173157,
-0.12841573357582092,
-0.041656699031591415,
-0.02979831025004387,
0.09849721938371658,
-0.22525063157081604,
-0.011924220249056816,
-0.05259275063872337,
0.23173056542873383,
-0.3445146977901459,
0.4429749548435211,
0.22438852488994598,
0.1404946744441986,
0.06996550410985947,
0.4524520933628082,
-0.0441129244863987,
0.17390716075897217,
0.3341217339038849,
0.07138080149888992,
0.33202269673347473,
-0.2908717095851898,
-0.43568703532218933,
-0.03041297011077404,
0.3930503726005554,
-0.03994116559624672,
0.005288136191666126,
0.5653294324874878,
-0.14458337426185608,
0.02535320818424225,
-0.3368179500102997,
0.1123085618019104,
-0.007249276619404554,
0.5341090559959412,
-0.4902597963809967,
-0.02837262861430645,
-0.01478687021881342,
-0.05338368937373161,
-0.09523987770080566,
0.29709818959236145,
0.2689521312713623,
-0.2722630202770233,
-0.14476075768470764,
-0.13041681051254272,
-0.32499849796295166,
-0.3197002708911896,
0.44286853075027466,
-0.0909217819571495,
0.19100096821784973,
-0.024716006591916084,
0.3037816286087036,
0.5653707385063171,
-0.2050894945859909,
-0.23406194150447845,
-0.0758122056722641,
0.13654372096061707,
0.3287968039512634,
-0.26772069931030273,
-0.16602888703346252,
-0.30294886231422424,
-0.20470978319644928,
0.3511369526386261,
-0.4987058937549591,
-0.3861927390098572,
-0.12600089609622955,
0.15166963636875153,
0.021239040419459343,
0.4036451578140259,
0.28173547983169556,
-0.29636576771736145,
0.32283729314804077,
0.3122970461845398,
0.17427171766757965,
-0.2495379000902176,
-0.15899010002613068,
0.07679527997970581,
-0.037379130721092224,
-0.11104995012283325,
-0.19148291647434235,
0.08377370238304138,
-0.0016540841897949576,
-0.01374595332890749,
-0.021803364157676697,
-0.21283170580863953,
-0.1232089027762413,
-0.053849756717681885,
0.5055230259895325,
-0.10408411175012589,
-0.08461876213550568,
0.37382787466049194,
0.1444597840309143,
-0.012684540823101997,
-0.008076931349933147,
-0.05637473613023758,
0.41042256355285645,
-0.34362757205963135,
0.2843070924282074,
0.05026388540863991,
-0.0011584651656448841,
0.3263408839702606,
-0.07270574569702148,
-0.03312826156616211,
-0.05668129026889801,
0.16204515099525452,
-0.35802340507507324,
0.00871086772531271,
0.18468765914440155,
0.17885635793209076,
0.2493288666009903,
0.25035110116004944,
-0.1479862928390503,
-0.1526842713356018,
0.19699648022651672,
-0.16346801817417145,
-0.24330347776412964,
0.038736771792173386,
0.01092929020524025,
0.09801333397626877,
0.2277471423149109,
-0.2775132954120636,
0.18281055986881256,
0.652862012386322,
-0.0775153785943985,
-0.05726506561040878,
-0.08019668608903885,
-0.2296682745218277,
-0.16876882314682007,
0.27087822556495667,
0.5193135142326355,
-0.06465306133031845,
-0.10548370331525803,
-0.11697012931108475,
0.1677042841911316,
0.25101229548454285,
0.44138363003730774,
-0.16382251679897308,
0.2519161105155945,
-0.09722135215997696,
0.01679861918091774,
0.41418400406837463,
-0.31050944328308105,
-0.34190431237220764,
-0.0056238314136862755,
-0.02522915229201317,
-0.13432222604751587,
0.02327807806432247,
0.13213089108467102,
0.07739990204572678,
0.11566579341888428,
0.11192624270915985,
0.31041884422302246,
0.05610376596450806,
0.2800839841365814,
-0.30419841408729553,
-0.2975767254829407,
0.25286865234375,
0.07474607229232788,
0.06539707630872726,
-0.20408274233341217,
-0.060849517583847046,
0.8107670545578003,
0.29729488492012024,
-0.2623123526573181,
0.1555342674255371,
0.3147747814655304,
0.10613712668418884,
0.0064365193247795105,
0.08711925148963928,
-0.21991287171840668,
-0.25144723057746887,
-0.07342468947172165,
-0.05669912323355675,
0.3305934965610504,
-0.14518874883651733,
-0.04148105904459953,
0.15372270345687866,
-0.1186709776520729,
-0.17224955558776855,
-0.39086270332336426,
0.06229532137513161,
0.013073514215648174,
0.12358259409666061,
0.09008461982011795,
0.08106052130460739,
0.056008581072092056,
-0.09397000074386597,
0.2478923499584198,
-0.5998017191886902,
0.17150290310382843,
-0.28960758447647095,
-0.10769418627023697,
-0.021440112963318825,
-0.0624917596578598,
0.027414904907345772,
-0.04746546596288681,
-0.06855592876672745,
0.1519923061132431,
0.07713465392589569,
-0.1671154946088791,
-0.09068439155817032,
0.003420039778575301,
0.310109406709671,
-0.32211431860923767,
0.16570569574832916,
0.2421722114086151,
0.19550420343875885,
-0.09402245283126831,
-0.19769605994224548,
-0.155878484249115,
0.10513398051261902,
0.3647212088108063,
0.07918786257505417,
0.16877521574497223,
0.026240810751914978,
0.08954749256372452,
0.17978596687316895,
-0.2070019394159317,
0.21816347539424896,
0.012355189770460129,
0.240883931517601,
0.09500641375780106,
-0.029394637793302536,
-0.3097330629825592,
0.45832404494285583,
0.26819708943367004,
0.27729952335357666,
0.24248167872428894,
-0.4937291443347931,
-0.07404223084449768,
-0.06565181910991669,
-0.0718550980091095,
0.3221568763256073,
0.0500786118209362,
-0.11956381052732468,
0.12015480548143387,
0.19633783400058746,
0.00970320776104927,
0.30975982546806335,
0.1743883192539215,
0.4940778315067291,
-0.01870863139629364,
0.105722576379776,
-0.08063474297523499,
-0.09958699345588684,
-0.14684832096099854,
0.0500459298491478,
0.5077638626098633,
-0.17538021504878998,
-0.015785524621605873,
-0.18642668426036835,
-0.4006144404411316,
-0.2753978371620178,
0.1643146127462387,
-0.4642423689365387,
-0.13692739605903625,
-0.3849298655986786,
0.32475799322128296,
0.06956294924020767,
0.2584396302700043,
0.416075736284256,
-0.05071398988366127,
0.3513423800468445,
-0.1406712830066681,
0.0687718540430069,
-0.23041220009326935,
-0.11907540261745453,
-0.06273715943098068,
0.4409622251987457,
-0.2204727828502655,
0.08683231472969055,
0.1567283272743225,
-0.31955772638320923,
-0.21350908279418945,
-0.1457151472568512,
0.14698965847492218,
-0.08082127571105957,
0.12557438015937805,
0.05964222550392151,
0.5084348917007446,
-0.12339834868907928,
-0.2323761284351349,
0.17210941016674042,
0.0899069607257843,
-0.05887201428413391,
-0.037300556898117065,
0.02329365722835064,
0.15538495779037476,
0.05408918857574463,
-0.2931138277053833,
-0.17975705862045288,
-0.508184552192688,
0.40148040652275085,
-0.03389118239283562,
0.15136273205280304,
0.32791826128959656,
0.1617622822523117,
0.11561518162488937,
-0.12136616557836533,
0.08944834023714066,
-0.16215083003044128,
0.016019998118281364,
0.3207916021347046,
-0.1488260179758072,
-0.21143513917922974,
-0.02906382456421852,
0.06273750215768814,
0.3063039481639862,
0.23018574714660645,
-0.6157580614089966,
-0.02091062441468239,
-0.11368213593959808,
-0.010894600301980972,
-0.058850836008787155,
0.28631117939949036,
0.3913799226284027,
0.07892140746116638,
0.10780006647109985,
0.13758891820907593,
-0.16775739192962646,
0.09490665048360825,
-0.040982916951179504,
0.32489657402038574,
0.22007925808429718,
0.5234264731407166,
0.06372649222612381,
0.8384490013122559,
0.34196406602859497,
0.18714050948619843,
0.22882597148418427,
-0.022065989673137665,
0.0835644081234932,
0.004970150999724865,
-0.348187118768692,
-0.008208919316530228,
-0.03689686581492424,
0.061999522149562836,
0.16614322364330292,
0.008755018003284931,
-0.33744320273399353,
-0.16767241060733795,
-0.35052862763404846,
0.04599038138985634,
-0.3771669268608093,
0.2698536217212677,
0.17512498795986176,
0.36742353439331055,
-0.08383559435606003,
-0.0824132040143013,
0.02316123992204666,
-0.35157808661460876,
0.19453281164169312,
0.2135324627161026,
-0.017528695985674858,
0.02112432010471821,
-0.11370823532342911,
-0.39588916301727295,
-0.640546441078186,
0.11820436269044876,
-0.15440216660499573,
0.06297993659973145,
-0.10384825617074966,
0.09339769929647446,
0.06005198508501053,
0.1583072394132614,
0.7553272843360901,
0.005923289339989424,
-0.30729299783706665,
-0.0461270771920681,
-0.2609420120716095,
-0.5063744187355042,
0.21378420293331146,
-0.18415705859661102,
0.3441570997238159,
0.14338910579681396,
0.5205534100532532,
-0.3616020381450653,
-0.09813381731510162,
0.32128798961639404,
0.37471455335617065,
-0.2170829176902771,
-0.20469240844249725,
-0.13433176279067993,
-0.2551262080669403,
-0.6043948531150818,
0.004102698061615229,
0.05456928163766861,
0.1934489607810974,
0.49645286798477173,
0.2044563591480255,
0.05266909301280975,
-0.050896842032670975,
0.13719402253627777,
-0.053375739604234695,
0.3105924725532532,
0.11065413057804108,
0.1008516475558281,
0.1345042735338211,
-0.15806789696216583,
0.3764187693595886,
0.2939082980155945,
0.0716901570558548,
-0.3797554075717926,
-0.09978523850440979,
0.05762147530913353,
0.25239649415016174,
-0.06275457888841629,
-0.013914779759943485,
0.0038343530613929033,
0.026899192482233047,
0.17809520661830902,
-0.09977508336305618,
0.13221965730190277,
0.18756836652755737,
0.08740786463022232,
-0.45114579796791077,
-0.43663138151168823,
0.3414416015148163,
0.19970451295375824,
0.15969416499137878,
0.3301563858985901,
-0.14244431257247925,
-0.5566366314888,
0.32534104585647583,
0.35895806550979614,
0.9608324766159058,
-0.3551483154296875,
0.3937278687953949,
0.09621862322092056,
0.21176472306251526,
0.6567656397819519,
-0.47514036297798157,
0.3529614806175232,
-0.36994051933288574,
-0.0815761610865593,
0.04317505657672882,
-0.1330997198820114,
0.13796204328536987,
-0.017232758924365044,
-0.43608641624450684,
0.2891327142715454,
0.09133251756429672,
-0.03982735052704811,
-0.18405863642692566,
0.3883705735206604,
0.1124473288655281,
-0.48120003938674927,
-0.18418651819229126,
0.03195100650191307,
-0.12698417901992798,
0.2439669519662857,
-0.04560341313481331,
-0.027440568432211876,
0.11567571759223938,
-0.11502739042043686,
-0.3924034535884857,
-0.03745150938630104,
-0.48363596200942993,
0.30769115686416626,
-0.2517831027507782,
0.0015953655820339918,
0.40474554896354675,
0.3928065001964569,
0.01018132921308279,
0.3698485195636749,
-0.13404984772205353,
0.010526429861783981,
-0.36008134484291077,
-0.2767650783061981,
-0.1850568652153015,
0.06766454875469208,
0.242404505610466,
-0.19374260306358337,
-0.10712756216526031,
0.07635974138975143,
-0.03994683548808098,
-0.1982414424419403,
-0.21035297214984894,
-0.031876858323812485,
-0.12981919944286346,
-0.20456553995609283,
-0.21239322423934937,
0.013284141197800636,
-0.35847562551498413,
-0.018620021641254425,
0.045863233506679535,
0.01084706000983715,
-0.3378365635871887,
0.32868334650993347,
0.1423625499010086,
-0.4008426070213318,
0.030740324407815933,
0.4164583384990692,
0.3485441207885742,
0.1605854630470276,
0.720025360584259,
0.323261559009552,
-0.2456386834383011,
-0.1618594080209732,
-0.0824732556939125,
-0.025335872545838356,
-0.3048343360424042,
0.21009260416030884,
0.0837550014257431,
0.10605346411466599,
-0.30660057067871094,
-0.00037718459498137236,
0.12854333221912384,
0.04523569345474243,
0.0363888256251812,
-0.3043982684612274,
-0.560200035572052,
0.20824962854385376,
-0.01047776360064745,
0.03649914264678955,
0.23689424991607666,
0.022190408781170845,
0.02953154966235161,
0.24801486730575562,
-0.1566304713487625,
0.0200542900711298,
-0.16914212703704834,
0.2507920563220978,
0.2438187152147293,
-0.1116873025894165,
0.10324373841285706,
-0.012949067167937756,
-0.0043390667997300625,
0.15931078791618347,
-0.01502357516437769,
-0.12695281207561493,
0.04548146203160286,
0.15326263010501862,
-0.02685132622718811,
-0.2777855396270752,
-0.09635801613330841,
-0.5430380702018738,
-0.01589692197740078,
-0.3039938509464264,
0.011127829551696777,
0.02127934619784355,
-0.13627037405967712,
0.11097752302885056,
0.2019032984972,
-0.2731659710407257,
-0.06302575767040253,
0.279261976480484,
-0.022164518013596535,
-0.05075211077928543,
0.16587062180042267,
0.2017493098974228,
0.09379857033491135,
-0.1570737063884735,
-0.5362299084663391,
0.05583448335528374,
-0.08433609455823898,
-0.026627929881215096,
0.10199334472417831,
-0.11428510397672653,
-0.3993757665157318,
0.31942206621170044,
0.09046675264835358,
0.1510140597820282,
-0.14232788980007172,
0.20684121549129486,
0.20045147836208344,
0.008968900889158249,
-0.19372694194316864,
-0.0418560616672039,
0.33019885420799255,
-0.29200834035873413,
-0.05059792101383209,
0.32779014110565186,
-0.13116717338562012,
0.045345135033130646,
-0.029958052560687065,
0.131158247590065,
0.3588019609451294,
-0.07343082129955292,
0.3226180076599121,
0.006158402655273676,
-0.08348400890827179,
-0.016720864921808243,
0.1939016878604889,
0.405727356672287,
0.25870269536972046,
0.20438647270202637,
-0.15563851594924927,
0.03763880953192711,
-0.105872243642807,
-0.2548229396343231,
0.03794356435537338,
-0.0836716741323471,
0.14148905873298645,
0.4189733862876892,
-0.1775912344455719,
0.15922003984451294,
-0.19391296803951263,
0.17801780998706818,
0.18459685146808624,
-0.27455762028694153,
0.07877655327320099,
0.2984713912010193,
-0.21168772876262665,
0.04647485539317131,
0.14998888969421387,
-0.11578154563903809,
-0.06578820198774338,
0.14178577065467834,
0.07711374014616013,
-0.6087393164634705,
0.45919573307037354,
0.1467866599559784,
-0.22065070271492004,
-0.14092643558979034,
0.2773652970790863,
0.4522537887096405,
0.07107837498188019,
-0.30539900064468384,
0.05759404972195625,
0.02698766440153122,
0.13658887147903442,
-0.3318273425102234,
0.30944621562957764,
0.46216192841529846,
0.2915849983692169,
-0.19562357664108276,
0.25357291102409363,
-0.15816403925418854,
-0.012619315646588802,
0.015425755642354488,
-0.023688798770308495,
0.11646560579538345,
0.21650521457195282,
0.11305493861436844,
-0.010933046229183674,
-0.05862734839320183,
-0.15109561383724213,
0.16302037239074707,
0.1425207406282425,
-0.22791634500026703,
-0.38114193081855774,
-0.0991922989487648,
-0.17108850181102753,
-0.014039738103747368,
-0.011570178903639317,
-0.5901708602905273,
0.2826705574989319,
0.5286228656768799,
-0.13806703686714172,
0.08121010661125183,
0.020232802256941795,
0.013729493133723736,
-0.031966254115104675,
0.48462381958961487,
0.2030230611562729,
-0.0330803319811821,
-0.4814164936542511,
-0.3177812695503235,
-0.4150763154029846,
0.02410843037068844,
-0.3297814130783081,
0.004063060041517019,
-0.07540741562843323,
0.11538782715797424,
-0.04735545814037323,
0.04659400135278702,
0.04862787574529648,
-0.36422494053840637,
-0.04351768270134926,
0.1776147037744522,
-0.15607242286205292,
-0.25533750653266907,
-0.12738977372646332,
0.1787591427564621,
0.17938879132270813,
-0.19811443984508514,
0.26311153173446655,
0.008783611468970776,
-0.13983745872974396,
-0.3518665134906769,
0.13386838138103485,
0.050196729600429535,
0.17792177200317383,
0.15763580799102783,
0.061005376279354095,
0.38950493931770325,
0.004085572902113199,
-0.24227167665958405,
0.02581561729311943,
0.00026924521080218256,
-0.09981399029493332,
0.14134080708026886,
0.1294572651386261,
0.36912816762924194,
-0.4097653031349182,
-0.38277947902679443,
-0.43279334902763367,
0.28977447748184204,
-0.06378491222858429,
-0.11976820975542068,
-0.03508025035262108,
-0.037601836025714874,
0.2526533305644989,
0.0688294991850853,
0.06360182166099548,
0.1586662232875824,
-0.06568904221057892,
-0.0003347872116137296,
-0.45090430974960327,
-0.2615719437599182,
0.4598855674266815,
-0.45830026268959045,
-0.3856021761894226,
-0.08610018342733383,
-0.09503575414419174,
-0.14593543112277985,
-0.13941237330436707,
-0.7795313000679016,
0.09105968475341797,
0.2944115102291107,
0.09553062170743942,
-0.42246922850608826,
0.03149569407105446,
-0.10581450909376144,
0.12016617506742477,
-0.1256258338689804,
0.3365497291088104,
-0.090094655752182,
-0.4325060546398163,
0.16513030230998993,
-0.20777159929275513
] |
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.17891450226306915,
-0.05732319876551628,
0.005179460160434246,
0.1343672275543213,
0.4113537073135376,
0.3502123951911926,
0.6419944763183594,
0.16370762884616852,
-0.16131749749183655,
0.07234954833984375,
0.17885442078113556,
0.06387543678283691,
-0.060773108154535294,
0.03052571415901184,
-0.1302308738231659,
-0.11937060952186584,
0.08908388763666153,
0.1734791398048401,
0.18164238333702087,
-0.0444667711853981,
-0.2867427170276642,
-0.03982594236731529,
-0.1566799134016037,
0.3662884831428528,
-0.2972055673599243,
-0.37668392062187195,
0.2105434089899063,
-0.12052837759256363,
-0.11313314735889435,
-0.46339529752731323,
0.27180954813957214,
0.08612008392810822,
0.0026802513748407364,
0.4034269154071808,
-0.00010309630306437612,
0.05875676870346069,
0.2967478036880493,
0.1559891402721405,
-0.39840781688690186,
-0.43212831020355225,
-0.18936000764369965,
-0.023407861590385437,
0.03456372022628784,
-0.304476797580719,
0.09798327833414078,
-0.2846681475639343,
-0.09054117649793625,
-0.27566608786582947,
0.10468639433383942,
0.4386059045791626,
0.32663995027542114,
0.23733948171138763,
-0.2064998298883438,
-0.22930341958999634,
0.23115266859531403,
0.1250884085893631,
-0.03050871379673481,
0.0494752936065197,
-0.13443879783153534,
-0.0064585269428789616,
0.4515703618526459,
0.4609145224094391,
-0.27239561080932617,
0.2647712230682373,
0.13536487519741058,
0.14636334776878357,
0.13772478699684143,
-0.3910481035709381,
0.2763094902038574,
0.1961432248353958,
0.74526047706604,
-0.2964995503425598,
-0.2943911552429199,
-0.16970524191856384,
0.13737638294696808,
-0.4167192578315735,
0.18133898079395294,
0.07008319348096848,
0.006375689525157213,
-0.04701511934399605,
-0.03316250815987587,
0.06102722883224487,
0.08074197173118591,
0.08818031847476959,
-0.058075059205293655,
0.038328465074300766,
-0.09864160418510437,
0.3288167715072632,
0.11253046244382858,
-0.07475090771913528,
0.2975304424762726,
-0.0059941355139017105,
-0.08857018500566483,
0.041544560343027115,
-0.4325242340564728,
-0.02960842475295067,
-0.03688057139515877,
0.051676034927368164,
-0.118137888610363,
-0.038740374147892,
0.018386678770184517,
-0.3749556541442871,
-0.1474357545375824,
0.3403448760509491,
0.21513447165489197,
0.26627618074417114,
0.27069932222366333,
0.5616863369941711,
0.09117243438959122,
-0.07616247981786728,
0.030804160982370377,
-0.05580741912126541,
-0.001574118621647358,
-0.46264275908470154,
0.2433207482099533,
0.09893118590116501,
0.2934701442718506,
-0.23985853791236877,
-0.5455215573310852,
0.19244219362735748,
-0.028101101517677307,
0.09409554302692413,
0.1541178673505783,
0.3049503266811371,
0.022122062742710114,
0.20651817321777344,
0.07934718579053879,
0.19360806047916412,
-0.00917021930217743,
-0.11720536649227142,
-0.2069239616394043,
0.09760784357786179,
-0.20027904212474823,
-0.15010665357112885,
0.0502697229385376,
-0.072052501142025,
0.11244919896125793,
0.06405958533287048,
-0.0010050220880657434,
-0.07605667412281036,
-0.016303392127156258,
-0.38646429777145386,
-0.01274797786027193,
0.35889336466789246,
-0.10326334089040756,
0.42035040259361267,
0.25205424427986145,
-0.418550044298172,
0.059699349105358124,
0.18021109700202942,
-0.3688521087169647,
-0.03381352126598358,
-0.21215713024139404,
0.2862125635147095,
-0.10304385423660278,
-0.18798112869262695,
-0.12009162455797195,
0.0468238964676857,
0.41932007670402527,
-0.2145540416240692,
0.1575896143913269,
-0.3543839752674103,
-0.30932238698005676,
-0.2777700126171112,
-0.06630391627550125,
0.22143256664276123,
-0.6722468137741089,
0.004389546811580658,
-0.1475468873977661,
-0.02911280281841755,
0.05280671268701553,
0.29601922631263733,
-0.08100429177284241,
0.20629146695137024,
-0.07059191167354584,
0.030349701642990112,
0.13955116271972656,
-0.3906913101673126,
-0.1104636862874031,
0.10354377329349518,
-0.14200329780578613,
-0.24426409602165222,
0.0704808160662651,
-0.04033960774540901,
0.09173101931810379,
-0.0916263610124588,
0.05823206529021263,
-0.13187739253044128,
-0.1996321827173233,
-0.09513326734304428,
-0.14370395243167877,
0.05381122976541519,
0.6539093255996704,
0.0927329957485199,
-0.016800185665488243,
0.07564690709114075,
-0.10022872686386108,
-0.3448370695114136,
-0.042532313615083694,
-0.10095544904470444,
0.20621968805789948,
0.21479003131389618,
0.05564019829034805,
0.2983596920967102,
0.1459522843360901,
-0.06447026878595352,
-0.44249671697616577,
0.10170092433691025,
-0.04005155712366104,
0.139564648270607,
-0.14514318108558655,
-0.19234375655651093,
-0.3297649919986725,
-0.05378592014312744,
-0.20797628164291382,
0.01832389459013939,
0.16331332921981812,
0.06836079806089401,
-0.22142204642295837,
-0.020483320578932762,
0.014084305614233017,
-0.07588431239128113,
-0.017214002087712288,
0.10933052748441696,
-0.10402525961399078,
0.2656514644622803,
-0.09511606395244598,
0.11689403653144836,
-0.026739375665783882,
0.2531200349330902,
0.4326063096523285,
0.24005182087421417,
-0.046621520072221756,
0.3670240342617035,
0.08486083149909973,
-0.32702308893203735,
0.007840344682335854,
-0.17265833914279938,
0.018129494041204453,
-0.08387430757284164,
-0.016326790675520897,
0.1145247295498848,
0.2768394351005554,
-0.10859724879264832,
-0.08471960574388504,
0.1411859542131424,
-0.17720049619674683,
0.27628424763679504,
-0.16197456419467926,
0.20046064257621765,
0.25996309518814087,
-0.1093929260969162,
0.12512215971946716,
-0.21271125972270966,
0.21588090062141418,
-0.1297987848520279,
0.23431411385536194,
0.0071422867476940155,
-0.26171764731407166,
0.06771949678659439,
0.42205390334129333,
0.0015312876785174012,
-0.00352389644831419,
0.00977385975420475,
-0.1586681604385376,
0.16574639081954956,
-0.013017593882977962,
0.5957189798355103,
0.35284268856048584,
0.20595574378967285,
-0.16387562453746796,
-0.05826844274997711,
-0.2622588872909546,
-0.13698403537273407,
0.21246151626110077,
0.09510159492492676,
0.029852507635951042,
0.057296257466077805,
0.02611011639237404,
-0.06643901765346527,
-0.17657269537448883,
-0.24333888292312622,
0.20823118090629578,
0.34642988443374634,
-0.5103123188018799,
-0.0029064707923680544,
-0.34527283906936646,
-0.23186379671096802,
-0.31859728693962097,
-0.09879087656736374,
-0.2351587414741516,
-0.45904403924942017,
0.09043808281421661,
-0.07749143987894058,
-0.19039304554462433,
0.14507639408111572,
-0.037563882768154144,
0.007917581126093864,
-0.09107304364442825,
0.15205201506614685,
-0.09758397191762924,
-0.47024962306022644,
-0.20457139611244202,
0.1811123490333557,
0.007479986175894737,
0.04695321246981621,
0.48136013746261597,
-0.14319881796836853,
-0.12455569207668304,
-0.07857172936201096,
-0.29531702399253845,
0.004026516806334257,
-0.273065984249115,
0.1366041749715805,
0.18162274360656738,
0.1038593128323555,
0.008461663499474525,
-0.14868468046188354,
0.2930161654949188,
-0.07151962071657181,
0.024640154093503952,
0.10695717483758926,
0.045233163982629776,
-0.29207339882850647,
-0.26646992564201355,
-0.47501954436302185,
-0.47453007102012634,
-0.17748183012008667,
0.06694811582565308,
-0.07590831816196442,
-0.0335286445915699,
0.5198025703430176,
0.06844212859869003,
0.06568100303411484,
0.09314499795436859,
0.023252936080098152,
-0.34674352407455444,
-0.09354056417942047,
0.24904774129390717,
-0.17909182608127594,
-0.21024540066719055,
0.1960572600364685,
0.10930954664945602,
0.11752841621637344,
-0.2039329558610916,
-0.3139224648475647,
0.07286287099123001,
-0.05760139226913452,
0.05894460529088974,
0.0813102275133133,
0.19489642977714539,
0.21388272941112518,
0.26710212230682373,
-0.148003488779068,
-0.32705122232437134,
-0.33171188831329346,
0.13817338645458221,
-0.07196802645921707,
0.13063539564609528,
-0.10625577718019485,
0.2940855622291565,
-0.15208424627780914,
0.32650870084762573,
0.02177213691174984,
-0.21265599131584167,
0.19188879430294037,
-0.04784765839576721,
0.5207322835922241,
0.06838060170412064,
-0.4193747341632843,
0.06588514894247055,
-0.11910711973905563,
0.02694641798734665,
0.17604288458824158,
-0.31963908672332764,
0.03795626014471054,
-0.14796802401542664,
0.39460447430610657,
-0.24780505895614624,
-0.09965691715478897,
-0.10064268857240677,
-0.15016862750053406,
0.040526945143938065,
0.11690041422843933,
-0.04097527265548706,
-0.2084079086780548,
-0.19158485531806946,
-0.2512802183628082,
0.05782405287027359,
-0.09546123445034027,
-0.08755175024271011,
-0.5335749983787537,
-0.23349899053573608,
-0.1649959832429886,
0.29409846663475037,
0.15745101869106293,
0.33466413617134094,
-0.17851713299751282,
0.24547159671783447,
0.047758590430021286,
0.24589969217777252,
0.6149811148643494,
-0.4832390546798706,
0.15470227599143982,
0.22637194395065308,
0.3931273818016052,
-0.17800158262252808,
-0.12725535035133362,
-0.16925735771656036,
0.29472610354423523,
-0.29577744007110596,
0.025988830253481865,
-0.15553432703018188,
-0.09107692539691925,
0.26310059428215027,
0.15540583431720734,
-0.12238035351037979,
-0.31498029828071594,
-0.23095160722732544,
-0.1793929785490036,
-0.12728528678417206,
-0.053396809846162796,
0.06357715278863907,
0.18663805723190308,
-0.37848716974258423,
0.09864776581525803,
0.14082369208335876,
0.0735073834657669,
0.2715045213699341,
0.1186351478099823,
0.22324301302433014,
0.03027692809700966,
0.19736146926879883,
0.3174023926258087,
0.2587256133556366,
0.5099826455116272,
0.5483978390693665,
-0.3618466854095459,
-0.5113290548324585,
-0.11947869509458542,
-0.11476928740739822,
0.2007075846195221,
0.06500115245580673,
-0.14221520721912384,
0.1660955846309662,
-0.050639908760786057,
0.1854587346315384,
0.09619783610105515,
0.022307993844151497,
0.4922949969768524,
0.16057652235031128,
-0.48984798789024353,
-0.5388930439949036,
0.27135899662971497,
0.03924155607819557,
-0.04784061759710312,
0.12815535068511963,
0.07973218709230423,
-0.3407573103904724,
0.2059527039527893,
-0.15599367022514343,
0.6908730864524841,
0.0837978795170784,
-0.051030512899160385,
-0.01703108288347721,
-0.22617307305335999,
0.7132235765457153,
-0.11871161311864853,
0.0007718639681115746,
-0.3614291846752167,
-0.3074661195278168,
-0.06222986429929733,
-0.02211889624595642,
0.023474834859371185,
0.4506933391094208,
-0.30857908725738525,
0.3788377046585083,
-0.3285132050514221,
0.2046867161989212,
0.028749993070960045,
-0.0740615576505661,
0.2494397759437561,
-0.13231386244297028,
-0.08248619735240936,
0.20103396475315094,
-0.15761911869049072,
-0.13437563180923462,
-0.16743485629558563,
0.04190551117062569,
-0.23184852302074432,
-0.268060564994812,
-0.22626028954982758,
0.08226071298122406,
-0.2538246810436249,
0.14157825708389282,
-0.085654117166996,
-0.016719289124011993,
0.21681153774261475,
0.20250990986824036,
0.48632189631462097,
0.0789240300655365,
-0.1482863575220108,
0.18389566242694855,
0.04214852675795555,
0.1370234340429306,
0.03434861823916435,
0.05374675244092941,
0.41506227850914,
0.11604964733123779,
-0.2699809670448303,
0.1285303235054016,
-0.07956726104021072,
0.17594987154006958,
-0.08703131973743439,
0.08389434963464737,
-0.09839735180139542,
-0.3653748333454132,
0.032647598534822464,
-0.07703867554664612,
0.2287106066942215,
-0.2537734806537628,
0.1773461103439331,
0.05198271945118904,
-0.046680185943841934,
0.21207912266254425,
-0.2636915147304535,
-0.14659744501113892,
-0.04574663192033768,
0.18923304975032806,
0.02596413902938366,
0.19335642457008362,
0.24724461138248444,
0.025973347947001457,
-0.3513919413089752,
-0.2565113604068756,
0.03895195946097374,
0.02399943582713604,
-0.6778354048728943,
0.24598249793052673,
0.25335440039634705,
0.07594557106494904,
-0.057189229875802994,
0.2232683151960373,
-0.015830159187316895,
0.07108484953641891,
0.06101395562291145,
-0.5274380445480347,
-0.21865008771419525,
-0.004670436959713697,
-0.18475468456745148,
0.11692999303340912,
0.24786525964736938,
0.4110047519207001,
0.13375753164291382,
0.07145018875598907,
-0.3641543686389923,
-0.020954042673110962,
-0.1723940074443817,
0.29801276326179504,
0.1525106281042099,
0.01996106095612049,
0.28203141689300537,
-0.17880649864673615,
0.21821686625480652,
0.0007438941393047571,
0.007750352844595909,
-0.24981847405433655,
-0.18720929324626923,
0.11241060495376587,
0.13520921766757965,
-0.19721588492393494,
-0.06341143697500229,
-0.16438139975070953,
0.057836856693029404,
-0.07198397815227509,
-0.01725105755031109,
0.3105736970901489,
0.0032079345546662807,
0.3735309839248657,
-0.1509217470884323,
0.23278465867042542,
-0.046329841017723083,
0.21827781200408936,
0.012717180885374546,
-0.11400148272514343,
0.07424529641866684,
0.17296549677848816,
-0.1127648875117302,
0.01947791315615177,
-0.17507940530776978,
0.08479494601488113,
-0.11700500547885895,
-0.1179296150803566,
0.1342935413122177,
-0.5689804553985596,
0.2959565222263336,
0.19363801181316376,
0.44936269521713257,
0.27813720703125,
-0.18682560324668884,
-0.0707663968205452,
0.38260918855667114,
0.3079267740249634,
-0.36566975712776184,
-0.16835995018482208,
0.1630018949508667,
0.16556130349636078,
0.0003904930781573057,
0.07560741901397705,
0.06072523817420006,
-0.031059928238391876,
0.044892843812704086,
0.008086008951067924,
0.4554387927055359,
-0.4376547038555145,
0.23490537703037262,
0.5269825458526611,
-0.061971064656972885,
0.09998418390750885,
0.4967944622039795,
0.17317654192447662,
0.0635330006480217,
0.5881980657577515,
0.03465026989579201,
0.17732077836990356,
0.1874702125787735,
-0.13796019554138184,
-0.07542061060667038,
-0.17221730947494507,
0.1809183806180954,
0.09697239845991135,
0.018856609240174294,
-0.042831312865018845,
-0.0954478457570076,
0.3011341989040375,
-0.38394567370414734,
0.004110394511371851,
-0.005768762901425362,
0.11119665205478668,
-0.22550338506698608,
-0.106015644967556,
-0.15626294910907745,
-0.09870976209640503,
-0.16644608974456787,
-0.19731606543064117,
0.014027981087565422,
-0.17005053162574768,
0.3556353747844696,
-0.07428083568811417,
-0.19596435129642487,
-0.45658138394355774,
-0.1867782324552536,
0.3054196536540985,
0.06508152186870575,
-0.24730956554412842,
0.016319898888468742,
0.2487560212612152,
-0.1455007642507553,
0.3213774859905243,
0.08623956143856049,
0.6039386987686157,
0.17137542366981506,
0.0897911787033081,
-0.34109172224998474,
-0.09729502350091934,
-0.08858026564121246,
0.15166328847408295,
0.21556809544563293,
0.04592103138566017,
-0.036833956837654114,
0.3922654986381531,
0.20187819004058838,
-0.17074932157993317,
0.3085803985595703,
0.33574238419532776,
0.2227042317390442,
-0.17061945796012878,
-0.0630669817328453,
-0.1339656412601471,
-0.2573544979095459,
-0.32663965225219727,
0.10131869465112686,
-0.26979494094848633,
0.11595753580331802,
0.4622560143470764,
-0.04151366278529167,
0.08409026265144348,
-0.2942292392253876,
0.14628008008003235,
0.13171041011810303,
0.311890184879303,
0.27394425868988037,
-0.04762457683682442,
-0.3456506133079529,
0.16157123446464539,
-0.5773794054985046,
0.12946027517318726,
-0.1186995655298233,
-0.11469240486621857,
-0.033454012125730515,
-0.15822313725948334,
0.15932197868824005,
0.020614948123693466,
0.38295018672943115,
0.18881821632385254,
-0.015939833596348763,
-0.10867761075496674,
-0.1195140853524208,
-0.19319865107536316,
-0.08259912580251694,
-0.12190110981464386,
0.2010165899991989,
-0.3226902186870575,
-0.061835866421461105,
-0.1457766592502594,
0.03897590935230255,
-0.34980833530426025,
0.09371425211429596,
0.1062968522310257,
-0.020189348608255386,
0.36031776666641235,
0.1459479033946991,
0.7699722647666931,
0.04881495237350464,
0.1150306761264801,
-0.09138786792755127,
-0.35364916920661926,
-0.404243141412735,
0.36886903643608093,
0.3255910575389862,
0.25653600692749023,
-0.10637737810611725,
0.009763987734913826,
-0.16448278725147247,
0.09450659155845642,
-0.04354657232761383,
0.32114851474761963,
-0.2544762194156647,
0.21450477838516235,
-0.024010805413126945,
0.01713998056948185,
0.09913121163845062,
-0.05562575161457062,
-0.002646799897775054,
0.3410545289516449,
-0.2067563533782959,
-0.604709804058075,
0.6198092103004456,
-0.21293136477470398,
-0.23955528438091278,
0.1537303924560547,
0.15452565252780914,
0.22137925028800964,
-0.2187478393316269,
-0.5100530982017517,
0.02474985457956791,
0.3773825168609619,
0.019003786146640778,
-0.4423445463180542,
-0.0037065274082124233,
-0.19275739789009094,
0.051443908363580704,
0.11356008797883987,
0.30625423789024353,
0.1166287362575531,
-0.1932860165834427,
0.19910483062267303,
-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.17891450226306915,
-0.05732319876551628,
0.005179460160434246,
0.1343672275543213,
0.4113537073135376,
0.3502123951911926,
0.6419944763183594,
0.16370762884616852,
-0.16131749749183655,
0.07234954833984375,
0.17885442078113556,
0.06387543678283691,
-0.060773108154535294,
0.03052571415901184,
-0.1302308738231659,
-0.11937060952186584,
0.08908388763666153,
0.1734791398048401,
0.18164238333702087,
-0.0444667711853981,
-0.2867427170276642,
-0.03982594236731529,
-0.1566799134016037,
0.3662884831428528,
-0.2972055673599243,
-0.37668392062187195,
0.2105434089899063,
-0.12052837759256363,
-0.11313314735889435,
-0.46339529752731323,
0.27180954813957214,
0.08612008392810822,
0.0026802513748407364,
0.4034269154071808,
-0.00010309630306437612,
0.05875676870346069,
0.2967478036880493,
0.1559891402721405,
-0.39840781688690186,
-0.43212831020355225,
-0.18936000764369965,
-0.023407861590385437,
0.03456372022628784,
-0.304476797580719,
0.09798327833414078,
-0.2846681475639343,
-0.09054117649793625,
-0.27566608786582947,
0.10468639433383942,
0.4386059045791626,
0.32663995027542114,
0.23733948171138763,
-0.2064998298883438,
-0.22930341958999634,
0.23115266859531403,
0.1250884085893631,
-0.03050871379673481,
0.0494752936065197,
-0.13443879783153534,
-0.0064585269428789616,
0.4515703618526459,
0.4609145224094391,
-0.27239561080932617,
0.2647712230682373,
0.13536487519741058,
0.14636334776878357,
0.13772478699684143,
-0.3910481035709381,
0.2763094902038574,
0.1961432248353958,
0.74526047706604,
-0.2964995503425598,
-0.2943911552429199,
-0.16970524191856384,
0.13737638294696808,
-0.4167192578315735,
0.18133898079395294,
0.07008319348096848,
0.006375689525157213,
-0.04701511934399605,
-0.03316250815987587,
0.06102722883224487,
0.08074197173118591,
0.08818031847476959,
-0.058075059205293655,
0.038328465074300766,
-0.09864160418510437,
0.3288167715072632,
0.11253046244382858,
-0.07475090771913528,
0.2975304424762726,
-0.0059941355139017105,
-0.08857018500566483,
0.041544560343027115,
-0.4325242340564728,
-0.02960842475295067,
-0.03688057139515877,
0.051676034927368164,
-0.118137888610363,
-0.038740374147892,
0.018386678770184517,
-0.3749556541442871,
-0.1474357545375824,
0.3403448760509491,
0.21513447165489197,
0.26627618074417114,
0.27069932222366333,
0.5616863369941711,
0.09117243438959122,
-0.07616247981786728,
0.030804160982370377,
-0.05580741912126541,
-0.001574118621647358,
-0.46264275908470154,
0.2433207482099533,
0.09893118590116501,
0.2934701442718506,
-0.23985853791236877,
-0.5455215573310852,
0.19244219362735748,
-0.028101101517677307,
0.09409554302692413,
0.1541178673505783,
0.3049503266811371,
0.022122062742710114,
0.20651817321777344,
0.07934718579053879,
0.19360806047916412,
-0.00917021930217743,
-0.11720536649227142,
-0.2069239616394043,
0.09760784357786179,
-0.20027904212474823,
-0.15010665357112885,
0.0502697229385376,
-0.072052501142025,
0.11244919896125793,
0.06405958533287048,
-0.0010050220880657434,
-0.07605667412281036,
-0.016303392127156258,
-0.38646429777145386,
-0.01274797786027193,
0.35889336466789246,
-0.10326334089040756,
0.42035040259361267,
0.25205424427986145,
-0.418550044298172,
0.059699349105358124,
0.18021109700202942,
-0.3688521087169647,
-0.03381352126598358,
-0.21215713024139404,
0.2862125635147095,
-0.10304385423660278,
-0.18798112869262695,
-0.12009162455797195,
0.0468238964676857,
0.41932007670402527,
-0.2145540416240692,
0.1575896143913269,
-0.3543839752674103,
-0.30932238698005676,
-0.2777700126171112,
-0.06630391627550125,
0.22143256664276123,
-0.6722468137741089,
0.004389546811580658,
-0.1475468873977661,
-0.02911280281841755,
0.05280671268701553,
0.29601922631263733,
-0.08100429177284241,
0.20629146695137024,
-0.07059191167354584,
0.030349701642990112,
0.13955116271972656,
-0.3906913101673126,
-0.1104636862874031,
0.10354377329349518,
-0.14200329780578613,
-0.24426409602165222,
0.0704808160662651,
-0.04033960774540901,
0.09173101931810379,
-0.0916263610124588,
0.05823206529021263,
-0.13187739253044128,
-0.1996321827173233,
-0.09513326734304428,
-0.14370395243167877,
0.05381122976541519,
0.6539093255996704,
0.0927329957485199,
-0.016800185665488243,
0.07564690709114075,
-0.10022872686386108,
-0.3448370695114136,
-0.042532313615083694,
-0.10095544904470444,
0.20621968805789948,
0.21479003131389618,
0.05564019829034805,
0.2983596920967102,
0.1459522843360901,
-0.06447026878595352,
-0.44249671697616577,
0.10170092433691025,
-0.04005155712366104,
0.139564648270607,
-0.14514318108558655,
-0.19234375655651093,
-0.3297649919986725,
-0.05378592014312744,
-0.20797628164291382,
0.01832389459013939,
0.16331332921981812,
0.06836079806089401,
-0.22142204642295837,
-0.020483320578932762,
0.014084305614233017,
-0.07588431239128113,
-0.017214002087712288,
0.10933052748441696,
-0.10402525961399078,
0.2656514644622803,
-0.09511606395244598,
0.11689403653144836,
-0.026739375665783882,
0.2531200349330902,
0.4326063096523285,
0.24005182087421417,
-0.046621520072221756,
0.3670240342617035,
0.08486083149909973,
-0.32702308893203735,
0.007840344682335854,
-0.17265833914279938,
0.018129494041204453,
-0.08387430757284164,
-0.016326790675520897,
0.1145247295498848,
0.2768394351005554,
-0.10859724879264832,
-0.08471960574388504,
0.1411859542131424,
-0.17720049619674683,
0.27628424763679504,
-0.16197456419467926,
0.20046064257621765,
0.25996309518814087,
-0.1093929260969162,
0.12512215971946716,
-0.21271125972270966,
0.21588090062141418,
-0.1297987848520279,
0.23431411385536194,
0.0071422867476940155,
-0.26171764731407166,
0.06771949678659439,
0.42205390334129333,
0.0015312876785174012,
-0.00352389644831419,
0.00977385975420475,
-0.1586681604385376,
0.16574639081954956,
-0.013017593882977962,
0.5957189798355103,
0.35284268856048584,
0.20595574378967285,
-0.16387562453746796,
-0.05826844274997711,
-0.2622588872909546,
-0.13698403537273407,
0.21246151626110077,
0.09510159492492676,
0.029852507635951042,
0.057296257466077805,
0.02611011639237404,
-0.06643901765346527,
-0.17657269537448883,
-0.24333888292312622,
0.20823118090629578,
0.34642988443374634,
-0.5103123188018799,
-0.0029064707923680544,
-0.34527283906936646,
-0.23186379671096802,
-0.31859728693962097,
-0.09879087656736374,
-0.2351587414741516,
-0.45904403924942017,
0.09043808281421661,
-0.07749143987894058,
-0.19039304554462433,
0.14507639408111572,
-0.037563882768154144,
0.007917581126093864,
-0.09107304364442825,
0.15205201506614685,
-0.09758397191762924,
-0.47024962306022644,
-0.20457139611244202,
0.1811123490333557,
0.007479986175894737,
0.04695321246981621,
0.48136013746261597,
-0.14319881796836853,
-0.12455569207668304,
-0.07857172936201096,
-0.29531702399253845,
0.004026516806334257,
-0.273065984249115,
0.1366041749715805,
0.18162274360656738,
0.1038593128323555,
0.008461663499474525,
-0.14868468046188354,
0.2930161654949188,
-0.07151962071657181,
0.024640154093503952,
0.10695717483758926,
0.045233163982629776,
-0.29207339882850647,
-0.26646992564201355,
-0.47501954436302185,
-0.47453007102012634,
-0.17748183012008667,
0.06694811582565308,
-0.07590831816196442,
-0.0335286445915699,
0.5198025703430176,
0.06844212859869003,
0.06568100303411484,
0.09314499795436859,
0.023252936080098152,
-0.34674352407455444,
-0.09354056417942047,
0.24904774129390717,
-0.17909182608127594,
-0.21024540066719055,
0.1960572600364685,
0.10930954664945602,
0.11752841621637344,
-0.2039329558610916,
-0.3139224648475647,
0.07286287099123001,
-0.05760139226913452,
0.05894460529088974,
0.0813102275133133,
0.19489642977714539,
0.21388272941112518,
0.26710212230682373,
-0.148003488779068,
-0.32705122232437134,
-0.33171188831329346,
0.13817338645458221,
-0.07196802645921707,
0.13063539564609528,
-0.10625577718019485,
0.2940855622291565,
-0.15208424627780914,
0.32650870084762573,
0.02177213691174984,
-0.21265599131584167,
0.19188879430294037,
-0.04784765839576721,
0.5207322835922241,
0.06838060170412064,
-0.4193747341632843,
0.06588514894247055,
-0.11910711973905563,
0.02694641798734665,
0.17604288458824158,
-0.31963908672332764,
0.03795626014471054,
-0.14796802401542664,
0.39460447430610657,
-0.24780505895614624,
-0.09965691715478897,
-0.10064268857240677,
-0.15016862750053406,
0.040526945143938065,
0.11690041422843933,
-0.04097527265548706,
-0.2084079086780548,
-0.19158485531806946,
-0.2512802183628082,
0.05782405287027359,
-0.09546123445034027,
-0.08755175024271011,
-0.5335749983787537,
-0.23349899053573608,
-0.1649959832429886,
0.29409846663475037,
0.15745101869106293,
0.33466413617134094,
-0.17851713299751282,
0.24547159671783447,
0.047758590430021286,
0.24589969217777252,
0.6149811148643494,
-0.4832390546798706,
0.15470227599143982,
0.22637194395065308,
0.3931273818016052,
-0.17800158262252808,
-0.12725535035133362,
-0.16925735771656036,
0.29472610354423523,
-0.29577744007110596,
0.025988830253481865,
-0.15553432703018188,
-0.09107692539691925,
0.26310059428215027,
0.15540583431720734,
-0.12238035351037979,
-0.31498029828071594,
-0.23095160722732544,
-0.1793929785490036,
-0.12728528678417206,
-0.053396809846162796,
0.06357715278863907,
0.18663805723190308,
-0.37848716974258423,
0.09864776581525803,
0.14082369208335876,
0.0735073834657669,
0.2715045213699341,
0.1186351478099823,
0.22324301302433014,
0.03027692809700966,
0.19736146926879883,
0.3174023926258087,
0.2587256133556366,
0.5099826455116272,
0.5483978390693665,
-0.3618466854095459,
-0.5113290548324585,
-0.11947869509458542,
-0.11476928740739822,
0.2007075846195221,
0.06500115245580673,
-0.14221520721912384,
0.1660955846309662,
-0.050639908760786057,
0.1854587346315384,
0.09619783610105515,
0.022307993844151497,
0.4922949969768524,
0.16057652235031128,
-0.48984798789024353,
-0.5388930439949036,
0.27135899662971497,
0.03924155607819557,
-0.04784061759710312,
0.12815535068511963,
0.07973218709230423,
-0.3407573103904724,
0.2059527039527893,
-0.15599367022514343,
0.6908730864524841,
0.0837978795170784,
-0.051030512899160385,
-0.01703108288347721,
-0.22617307305335999,
0.7132235765457153,
-0.11871161311864853,
0.0007718639681115746,
-0.3614291846752167,
-0.3074661195278168,
-0.06222986429929733,
-0.02211889624595642,
0.023474834859371185,
0.4506933391094208,
-0.30857908725738525,
0.3788377046585083,
-0.3285132050514221,
0.2046867161989212,
0.028749993070960045,
-0.0740615576505661,
0.2494397759437561,
-0.13231386244297028,
-0.08248619735240936,
0.20103396475315094,
-0.15761911869049072,
-0.13437563180923462,
-0.16743485629558563,
0.04190551117062569,
-0.23184852302074432,
-0.268060564994812,
-0.22626028954982758,
0.08226071298122406,
-0.2538246810436249,
0.14157825708389282,
-0.085654117166996,
-0.016719289124011993,
0.21681153774261475,
0.20250990986824036,
0.48632189631462097,
0.0789240300655365,
-0.1482863575220108,
0.18389566242694855,
0.04214852675795555,
0.1370234340429306,
0.03434861823916435,
0.05374675244092941,
0.41506227850914,
0.11604964733123779,
-0.2699809670448303,
0.1285303235054016,
-0.07956726104021072,
0.17594987154006958,
-0.08703131973743439,
0.08389434963464737,
-0.09839735180139542,
-0.3653748333454132,
0.032647598534822464,
-0.07703867554664612,
0.2287106066942215,
-0.2537734806537628,
0.1773461103439331,
0.05198271945118904,
-0.046680185943841934,
0.21207912266254425,
-0.2636915147304535,
-0.14659744501113892,
-0.04574663192033768,
0.18923304975032806,
0.02596413902938366,
0.19335642457008362,
0.24724461138248444,
0.025973347947001457,
-0.3513919413089752,
-0.2565113604068756,
0.03895195946097374,
0.02399943582713604,
-0.6778354048728943,
0.24598249793052673,
0.25335440039634705,
0.07594557106494904,
-0.057189229875802994,
0.2232683151960373,
-0.015830159187316895,
0.07108484953641891,
0.06101395562291145,
-0.5274380445480347,
-0.21865008771419525,
-0.004670436959713697,
-0.18475468456745148,
0.11692999303340912,
0.24786525964736938,
0.4110047519207001,
0.13375753164291382,
0.07145018875598907,
-0.3641543686389923,
-0.020954042673110962,
-0.1723940074443817,
0.29801276326179504,
0.1525106281042099,
0.01996106095612049,
0.28203141689300537,
-0.17880649864673615,
0.21821686625480652,
0.0007438941393047571,
0.007750352844595909,
-0.24981847405433655,
-0.18720929324626923,
0.11241060495376587,
0.13520921766757965,
-0.19721588492393494,
-0.06341143697500229,
-0.16438139975070953,
0.057836856693029404,
-0.07198397815227509,
-0.01725105755031109,
0.3105736970901489,
0.0032079345546662807,
0.3735309839248657,
-0.1509217470884323,
0.23278465867042542,
-0.046329841017723083,
0.21827781200408936,
0.012717180885374546,
-0.11400148272514343,
0.07424529641866684,
0.17296549677848816,
-0.1127648875117302,
0.01947791315615177,
-0.17507940530776978,
0.08479494601488113,
-0.11700500547885895,
-0.1179296150803566,
0.1342935413122177,
-0.5689804553985596,
0.2959565222263336,
0.19363801181316376,
0.44936269521713257,
0.27813720703125,
-0.18682560324668884,
-0.0707663968205452,
0.38260918855667114,
0.3079267740249634,
-0.36566975712776184,
-0.16835995018482208,
0.1630018949508667,
0.16556130349636078,
0.0003904930781573057,
0.07560741901397705,
0.06072523817420006,
-0.031059928238391876,
0.044892843812704086,
0.008086008951067924,
0.4554387927055359,
-0.4376547038555145,
0.23490537703037262,
0.5269825458526611,
-0.061971064656972885,
0.09998418390750885,
0.4967944622039795,
0.17317654192447662,
0.0635330006480217,
0.5881980657577515,
0.03465026989579201,
0.17732077836990356,
0.1874702125787735,
-0.13796019554138184,
-0.07542061060667038,
-0.17221730947494507,
0.1809183806180954,
0.09697239845991135,
0.018856609240174294,
-0.042831312865018845,
-0.0954478457570076,
0.3011341989040375,
-0.38394567370414734,
0.004110394511371851,
-0.005768762901425362,
0.11119665205478668,
-0.22550338506698608,
-0.106015644967556,
-0.15626294910907745,
-0.09870976209640503,
-0.16644608974456787,
-0.19731606543064117,
0.014027981087565422,
-0.17005053162574768,
0.3556353747844696,
-0.07428083568811417,
-0.19596435129642487,
-0.45658138394355774,
-0.1867782324552536,
0.3054196536540985,
0.06508152186870575,
-0.24730956554412842,
0.016319898888468742,
0.2487560212612152,
-0.1455007642507553,
0.3213774859905243,
0.08623956143856049,
0.6039386987686157,
0.17137542366981506,
0.0897911787033081,
-0.34109172224998474,
-0.09729502350091934,
-0.08858026564121246,
0.15166328847408295,
0.21556809544563293,
0.04592103138566017,
-0.036833956837654114,
0.3922654986381531,
0.20187819004058838,
-0.17074932157993317,
0.3085803985595703,
0.33574238419532776,
0.2227042317390442,
-0.17061945796012878,
-0.0630669817328453,
-0.1339656412601471,
-0.2573544979095459,
-0.32663965225219727,
0.10131869465112686,
-0.26979494094848633,
0.11595753580331802,
0.4622560143470764,
-0.04151366278529167,
0.08409026265144348,
-0.2942292392253876,
0.14628008008003235,
0.13171041011810303,
0.311890184879303,
0.27394425868988037,
-0.04762457683682442,
-0.3456506133079529,
0.16157123446464539,
-0.5773794054985046,
0.12946027517318726,
-0.1186995655298233,
-0.11469240486621857,
-0.033454012125730515,
-0.15822313725948334,
0.15932197868824005,
0.020614948123693466,
0.38295018672943115,
0.18881821632385254,
-0.015939833596348763,
-0.10867761075496674,
-0.1195140853524208,
-0.19319865107536316,
-0.08259912580251694,
-0.12190110981464386,
0.2010165899991989,
-0.3226902186870575,
-0.061835866421461105,
-0.1457766592502594,
0.03897590935230255,
-0.34980833530426025,
0.09371425211429596,
0.1062968522310257,
-0.020189348608255386,
0.36031776666641235,
0.1459479033946991,
0.7699722647666931,
0.04881495237350464,
0.1150306761264801,
-0.09138786792755127,
-0.35364916920661926,
-0.404243141412735,
0.36886903643608093,
0.3255910575389862,
0.25653600692749023,
-0.10637737810611725,
0.009763987734913826,
-0.16448278725147247,
0.09450659155845642,
-0.04354657232761383,
0.32114851474761963,
-0.2544762194156647,
0.21450477838516235,
-0.024010805413126945,
0.01713998056948185,
0.09913121163845062,
-0.05562575161457062,
-0.002646799897775054,
0.3410545289516449,
-0.2067563533782959,
-0.604709804058075,
0.6198092103004456,
-0.21293136477470398,
-0.23955528438091278,
0.1537303924560547,
0.15452565252780914,
0.22137925028800964,
-0.2187478393316269,
-0.5100530982017517,
0.02474985457956791,
0.3773825168609619,
0.019003786146640778,
-0.4423445463180542,
-0.0037065274082124233,
-0.19275739789009094,
0.051443908363580704,
0.11356008797883987,
0.30625423789024353,
0.1166287362575531,
-0.1932860165834427,
0.19910483062267303,
-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.17891450226306915,
-0.05732319876551628,
0.005179460160434246,
0.1343672275543213,
0.4113537073135376,
0.3502123951911926,
0.6419944763183594,
0.16370762884616852,
-0.16131749749183655,
0.07234954833984375,
0.17885442078113556,
0.06387543678283691,
-0.060773108154535294,
0.03052571415901184,
-0.1302308738231659,
-0.11937060952186584,
0.08908388763666153,
0.1734791398048401,
0.18164238333702087,
-0.0444667711853981,
-0.2867427170276642,
-0.03982594236731529,
-0.1566799134016037,
0.3662884831428528,
-0.2972055673599243,
-0.37668392062187195,
0.2105434089899063,
-0.12052837759256363,
-0.11313314735889435,
-0.46339529752731323,
0.27180954813957214,
0.08612008392810822,
0.0026802513748407364,
0.4034269154071808,
-0.00010309630306437612,
0.05875676870346069,
0.2967478036880493,
0.1559891402721405,
-0.39840781688690186,
-0.43212831020355225,
-0.18936000764369965,
-0.023407861590385437,
0.03456372022628784,
-0.304476797580719,
0.09798327833414078,
-0.2846681475639343,
-0.09054117649793625,
-0.27566608786582947,
0.10468639433383942,
0.4386059045791626,
0.32663995027542114,
0.23733948171138763,
-0.2064998298883438,
-0.22930341958999634,
0.23115266859531403,
0.1250884085893631,
-0.03050871379673481,
0.0494752936065197,
-0.13443879783153534,
-0.0064585269428789616,
0.4515703618526459,
0.4609145224094391,
-0.27239561080932617,
0.2647712230682373,
0.13536487519741058,
0.14636334776878357,
0.13772478699684143,
-0.3910481035709381,
0.2763094902038574,
0.1961432248353958,
0.74526047706604,
-0.2964995503425598,
-0.2943911552429199,
-0.16970524191856384,
0.13737638294696808,
-0.4167192578315735,
0.18133898079395294,
0.07008319348096848,
0.006375689525157213,
-0.04701511934399605,
-0.03316250815987587,
0.06102722883224487,
0.08074197173118591,
0.08818031847476959,
-0.058075059205293655,
0.038328465074300766,
-0.09864160418510437,
0.3288167715072632,
0.11253046244382858,
-0.07475090771913528,
0.2975304424762726,
-0.0059941355139017105,
-0.08857018500566483,
0.041544560343027115,
-0.4325242340564728,
-0.02960842475295067,
-0.03688057139515877,
0.051676034927368164,
-0.118137888610363,
-0.038740374147892,
0.018386678770184517,
-0.3749556541442871,
-0.1474357545375824,
0.3403448760509491,
0.21513447165489197,
0.26627618074417114,
0.27069932222366333,
0.5616863369941711,
0.09117243438959122,
-0.07616247981786728,
0.030804160982370377,
-0.05580741912126541,
-0.001574118621647358,
-0.46264275908470154,
0.2433207482099533,
0.09893118590116501,
0.2934701442718506,
-0.23985853791236877,
-0.5455215573310852,
0.19244219362735748,
-0.028101101517677307,
0.09409554302692413,
0.1541178673505783,
0.3049503266811371,
0.022122062742710114,
0.20651817321777344,
0.07934718579053879,
0.19360806047916412,
-0.00917021930217743,
-0.11720536649227142,
-0.2069239616394043,
0.09760784357786179,
-0.20027904212474823,
-0.15010665357112885,
0.0502697229385376,
-0.072052501142025,
0.11244919896125793,
0.06405958533287048,
-0.0010050220880657434,
-0.07605667412281036,
-0.016303392127156258,
-0.38646429777145386,
-0.01274797786027193,
0.35889336466789246,
-0.10326334089040756,
0.42035040259361267,
0.25205424427986145,
-0.418550044298172,
0.059699349105358124,
0.18021109700202942,
-0.3688521087169647,
-0.03381352126598358,
-0.21215713024139404,
0.2862125635147095,
-0.10304385423660278,
-0.18798112869262695,
-0.12009162455797195,
0.0468238964676857,
0.41932007670402527,
-0.2145540416240692,
0.1575896143913269,
-0.3543839752674103,
-0.30932238698005676,
-0.2777700126171112,
-0.06630391627550125,
0.22143256664276123,
-0.6722468137741089,
0.004389546811580658,
-0.1475468873977661,
-0.02911280281841755,
0.05280671268701553,
0.29601922631263733,
-0.08100429177284241,
0.20629146695137024,
-0.07059191167354584,
0.030349701642990112,
0.13955116271972656,
-0.3906913101673126,
-0.1104636862874031,
0.10354377329349518,
-0.14200329780578613,
-0.24426409602165222,
0.0704808160662651,
-0.04033960774540901,
0.09173101931810379,
-0.0916263610124588,
0.05823206529021263,
-0.13187739253044128,
-0.1996321827173233,
-0.09513326734304428,
-0.14370395243167877,
0.05381122976541519,
0.6539093255996704,
0.0927329957485199,
-0.016800185665488243,
0.07564690709114075,
-0.10022872686386108,
-0.3448370695114136,
-0.042532313615083694,
-0.10095544904470444,
0.20621968805789948,
0.21479003131389618,
0.05564019829034805,
0.2983596920967102,
0.1459522843360901,
-0.06447026878595352,
-0.44249671697616577,
0.10170092433691025,
-0.04005155712366104,
0.139564648270607,
-0.14514318108558655,
-0.19234375655651093,
-0.3297649919986725,
-0.05378592014312744,
-0.20797628164291382,
0.01832389459013939,
0.16331332921981812,
0.06836079806089401,
-0.22142204642295837,
-0.020483320578932762,
0.014084305614233017,
-0.07588431239128113,
-0.017214002087712288,
0.10933052748441696,
-0.10402525961399078,
0.2656514644622803,
-0.09511606395244598,
0.11689403653144836,
-0.026739375665783882,
0.2531200349330902,
0.4326063096523285,
0.24005182087421417,
-0.046621520072221756,
0.3670240342617035,
0.08486083149909973,
-0.32702308893203735,
0.007840344682335854,
-0.17265833914279938,
0.018129494041204453,
-0.08387430757284164,
-0.016326790675520897,
0.1145247295498848,
0.2768394351005554,
-0.10859724879264832,
-0.08471960574388504,
0.1411859542131424,
-0.17720049619674683,
0.27628424763679504,
-0.16197456419467926,
0.20046064257621765,
0.25996309518814087,
-0.1093929260969162,
0.12512215971946716,
-0.21271125972270966,
0.21588090062141418,
-0.1297987848520279,
0.23431411385536194,
0.0071422867476940155,
-0.26171764731407166,
0.06771949678659439,
0.42205390334129333,
0.0015312876785174012,
-0.00352389644831419,
0.00977385975420475,
-0.1586681604385376,
0.16574639081954956,
-0.013017593882977962,
0.5957189798355103,
0.35284268856048584,
0.20595574378967285,
-0.16387562453746796,
-0.05826844274997711,
-0.2622588872909546,
-0.13698403537273407,
0.21246151626110077,
0.09510159492492676,
0.029852507635951042,
0.057296257466077805,
0.02611011639237404,
-0.06643901765346527,
-0.17657269537448883,
-0.24333888292312622,
0.20823118090629578,
0.34642988443374634,
-0.5103123188018799,
-0.0029064707923680544,
-0.34527283906936646,
-0.23186379671096802,
-0.31859728693962097,
-0.09879087656736374,
-0.2351587414741516,
-0.45904403924942017,
0.09043808281421661,
-0.07749143987894058,
-0.19039304554462433,
0.14507639408111572,
-0.037563882768154144,
0.007917581126093864,
-0.09107304364442825,
0.15205201506614685,
-0.09758397191762924,
-0.47024962306022644,
-0.20457139611244202,
0.1811123490333557,
0.007479986175894737,
0.04695321246981621,
0.48136013746261597,
-0.14319881796836853,
-0.12455569207668304,
-0.07857172936201096,
-0.29531702399253845,
0.004026516806334257,
-0.273065984249115,
0.1366041749715805,
0.18162274360656738,
0.1038593128323555,
0.008461663499474525,
-0.14868468046188354,
0.2930161654949188,
-0.07151962071657181,
0.024640154093503952,
0.10695717483758926,
0.045233163982629776,
-0.29207339882850647,
-0.26646992564201355,
-0.47501954436302185,
-0.47453007102012634,
-0.17748183012008667,
0.06694811582565308,
-0.07590831816196442,
-0.0335286445915699,
0.5198025703430176,
0.06844212859869003,
0.06568100303411484,
0.09314499795436859,
0.023252936080098152,
-0.34674352407455444,
-0.09354056417942047,
0.24904774129390717,
-0.17909182608127594,
-0.21024540066719055,
0.1960572600364685,
0.10930954664945602,
0.11752841621637344,
-0.2039329558610916,
-0.3139224648475647,
0.07286287099123001,
-0.05760139226913452,
0.05894460529088974,
0.0813102275133133,
0.19489642977714539,
0.21388272941112518,
0.26710212230682373,
-0.148003488779068,
-0.32705122232437134,
-0.33171188831329346,
0.13817338645458221,
-0.07196802645921707,
0.13063539564609528,
-0.10625577718019485,
0.2940855622291565,
-0.15208424627780914,
0.32650870084762573,
0.02177213691174984,
-0.21265599131584167,
0.19188879430294037,
-0.04784765839576721,
0.5207322835922241,
0.06838060170412064,
-0.4193747341632843,
0.06588514894247055,
-0.11910711973905563,
0.02694641798734665,
0.17604288458824158,
-0.31963908672332764,
0.03795626014471054,
-0.14796802401542664,
0.39460447430610657,
-0.24780505895614624,
-0.09965691715478897,
-0.10064268857240677,
-0.15016862750053406,
0.040526945143938065,
0.11690041422843933,
-0.04097527265548706,
-0.2084079086780548,
-0.19158485531806946,
-0.2512802183628082,
0.05782405287027359,
-0.09546123445034027,
-0.08755175024271011,
-0.5335749983787537,
-0.23349899053573608,
-0.1649959832429886,
0.29409846663475037,
0.15745101869106293,
0.33466413617134094,
-0.17851713299751282,
0.24547159671783447,
0.047758590430021286,
0.24589969217777252,
0.6149811148643494,
-0.4832390546798706,
0.15470227599143982,
0.22637194395065308,
0.3931273818016052,
-0.17800158262252808,
-0.12725535035133362,
-0.16925735771656036,
0.29472610354423523,
-0.29577744007110596,
0.025988830253481865,
-0.15553432703018188,
-0.09107692539691925,
0.26310059428215027,
0.15540583431720734,
-0.12238035351037979,
-0.31498029828071594,
-0.23095160722732544,
-0.1793929785490036,
-0.12728528678417206,
-0.053396809846162796,
0.06357715278863907,
0.18663805723190308,
-0.37848716974258423,
0.09864776581525803,
0.14082369208335876,
0.0735073834657669,
0.2715045213699341,
0.1186351478099823,
0.22324301302433014,
0.03027692809700966,
0.19736146926879883,
0.3174023926258087,
0.2587256133556366,
0.5099826455116272,
0.5483978390693665,
-0.3618466854095459,
-0.5113290548324585,
-0.11947869509458542,
-0.11476928740739822,
0.2007075846195221,
0.06500115245580673,
-0.14221520721912384,
0.1660955846309662,
-0.050639908760786057,
0.1854587346315384,
0.09619783610105515,
0.022307993844151497,
0.4922949969768524,
0.16057652235031128,
-0.48984798789024353,
-0.5388930439949036,
0.27135899662971497,
0.03924155607819557,
-0.04784061759710312,
0.12815535068511963,
0.07973218709230423,
-0.3407573103904724,
0.2059527039527893,
-0.15599367022514343,
0.6908730864524841,
0.0837978795170784,
-0.051030512899160385,
-0.01703108288347721,
-0.22617307305335999,
0.7132235765457153,
-0.11871161311864853,
0.0007718639681115746,
-0.3614291846752167,
-0.3074661195278168,
-0.06222986429929733,
-0.02211889624595642,
0.023474834859371185,
0.4506933391094208,
-0.30857908725738525,
0.3788377046585083,
-0.3285132050514221,
0.2046867161989212,
0.028749993070960045,
-0.0740615576505661,
0.2494397759437561,
-0.13231386244297028,
-0.08248619735240936,
0.20103396475315094,
-0.15761911869049072,
-0.13437563180923462,
-0.16743485629558563,
0.04190551117062569,
-0.23184852302074432,
-0.268060564994812,
-0.22626028954982758,
0.08226071298122406,
-0.2538246810436249,
0.14157825708389282,
-0.085654117166996,
-0.016719289124011993,
0.21681153774261475,
0.20250990986824036,
0.48632189631462097,
0.0789240300655365,
-0.1482863575220108,
0.18389566242694855,
0.04214852675795555,
0.1370234340429306,
0.03434861823916435,
0.05374675244092941,
0.41506227850914,
0.11604964733123779,
-0.2699809670448303,
0.1285303235054016,
-0.07956726104021072,
0.17594987154006958,
-0.08703131973743439,
0.08389434963464737,
-0.09839735180139542,
-0.3653748333454132,
0.032647598534822464,
-0.07703867554664612,
0.2287106066942215,
-0.2537734806537628,
0.1773461103439331,
0.05198271945118904,
-0.046680185943841934,
0.21207912266254425,
-0.2636915147304535,
-0.14659744501113892,
-0.04574663192033768,
0.18923304975032806,
0.02596413902938366,
0.19335642457008362,
0.24724461138248444,
0.025973347947001457,
-0.3513919413089752,
-0.2565113604068756,
0.03895195946097374,
0.02399943582713604,
-0.6778354048728943,
0.24598249793052673,
0.25335440039634705,
0.07594557106494904,
-0.057189229875802994,
0.2232683151960373,
-0.015830159187316895,
0.07108484953641891,
0.06101395562291145,
-0.5274380445480347,
-0.21865008771419525,
-0.004670436959713697,
-0.18475468456745148,
0.11692999303340912,
0.24786525964736938,
0.4110047519207001,
0.13375753164291382,
0.07145018875598907,
-0.3641543686389923,
-0.020954042673110962,
-0.1723940074443817,
0.29801276326179504,
0.1525106281042099,
0.01996106095612049,
0.28203141689300537,
-0.17880649864673615,
0.21821686625480652,
0.0007438941393047571,
0.007750352844595909,
-0.24981847405433655,
-0.18720929324626923,
0.11241060495376587,
0.13520921766757965,
-0.19721588492393494,
-0.06341143697500229,
-0.16438139975070953,
0.057836856693029404,
-0.07198397815227509,
-0.01725105755031109,
0.3105736970901489,
0.0032079345546662807,
0.3735309839248657,
-0.1509217470884323,
0.23278465867042542,
-0.046329841017723083,
0.21827781200408936,
0.012717180885374546,
-0.11400148272514343,
0.07424529641866684,
0.17296549677848816,
-0.1127648875117302,
0.01947791315615177,
-0.17507940530776978,
0.08479494601488113,
-0.11700500547885895,
-0.1179296150803566,
0.1342935413122177,
-0.5689804553985596,
0.2959565222263336,
0.19363801181316376,
0.44936269521713257,
0.27813720703125,
-0.18682560324668884,
-0.0707663968205452,
0.38260918855667114,
0.3079267740249634,
-0.36566975712776184,
-0.16835995018482208,
0.1630018949508667,
0.16556130349636078,
0.0003904930781573057,
0.07560741901397705,
0.06072523817420006,
-0.031059928238391876,
0.044892843812704086,
0.008086008951067924,
0.4554387927055359,
-0.4376547038555145,
0.23490537703037262,
0.5269825458526611,
-0.061971064656972885,
0.09998418390750885,
0.4967944622039795,
0.17317654192447662,
0.0635330006480217,
0.5881980657577515,
0.03465026989579201,
0.17732077836990356,
0.1874702125787735,
-0.13796019554138184,
-0.07542061060667038,
-0.17221730947494507,
0.1809183806180954,
0.09697239845991135,
0.018856609240174294,
-0.042831312865018845,
-0.0954478457570076,
0.3011341989040375,
-0.38394567370414734,
0.004110394511371851,
-0.005768762901425362,
0.11119665205478668,
-0.22550338506698608,
-0.106015644967556,
-0.15626294910907745,
-0.09870976209640503,
-0.16644608974456787,
-0.19731606543064117,
0.014027981087565422,
-0.17005053162574768,
0.3556353747844696,
-0.07428083568811417,
-0.19596435129642487,
-0.45658138394355774,
-0.1867782324552536,
0.3054196536540985,
0.06508152186870575,
-0.24730956554412842,
0.016319898888468742,
0.2487560212612152,
-0.1455007642507553,
0.3213774859905243,
0.08623956143856049,
0.6039386987686157,
0.17137542366981506,
0.0897911787033081,
-0.34109172224998474,
-0.09729502350091934,
-0.08858026564121246,
0.15166328847408295,
0.21556809544563293,
0.04592103138566017,
-0.036833956837654114,
0.3922654986381531,
0.20187819004058838,
-0.17074932157993317,
0.3085803985595703,
0.33574238419532776,
0.2227042317390442,
-0.17061945796012878,
-0.0630669817328453,
-0.1339656412601471,
-0.2573544979095459,
-0.32663965225219727,
0.10131869465112686,
-0.26979494094848633,
0.11595753580331802,
0.4622560143470764,
-0.04151366278529167,
0.08409026265144348,
-0.2942292392253876,
0.14628008008003235,
0.13171041011810303,
0.311890184879303,
0.27394425868988037,
-0.04762457683682442,
-0.3456506133079529,
0.16157123446464539,
-0.5773794054985046,
0.12946027517318726,
-0.1186995655298233,
-0.11469240486621857,
-0.033454012125730515,
-0.15822313725948334,
0.15932197868824005,
0.020614948123693466,
0.38295018672943115,
0.18881821632385254,
-0.015939833596348763,
-0.10867761075496674,
-0.1195140853524208,
-0.19319865107536316,
-0.08259912580251694,
-0.12190110981464386,
0.2010165899991989,
-0.3226902186870575,
-0.061835866421461105,
-0.1457766592502594,
0.03897590935230255,
-0.34980833530426025,
0.09371425211429596,
0.1062968522310257,
-0.020189348608255386,
0.36031776666641235,
0.1459479033946991,
0.7699722647666931,
0.04881495237350464,
0.1150306761264801,
-0.09138786792755127,
-0.35364916920661926,
-0.404243141412735,
0.36886903643608093,
0.3255910575389862,
0.25653600692749023,
-0.10637737810611725,
0.009763987734913826,
-0.16448278725147247,
0.09450659155845642,
-0.04354657232761383,
0.32114851474761963,
-0.2544762194156647,
0.21450477838516235,
-0.024010805413126945,
0.01713998056948185,
0.09913121163845062,
-0.05562575161457062,
-0.002646799897775054,
0.3410545289516449,
-0.2067563533782959,
-0.604709804058075,
0.6198092103004456,
-0.21293136477470398,
-0.23955528438091278,
0.1537303924560547,
0.15452565252780914,
0.22137925028800964,
-0.2187478393316269,
-0.5100530982017517,
0.02474985457956791,
0.3773825168609619,
0.019003786146640778,
-0.4423445463180542,
-0.0037065274082124233,
-0.19275739789009094,
0.051443908363580704,
0.11356008797883987,
0.30625423789024353,
0.1166287362575531,
-0.1932860165834427,
0.19910483062267303,
-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.17891450226306915,
-0.05732319876551628,
0.005179460160434246,
0.1343672275543213,
0.4113537073135376,
0.3502123951911926,
0.6419944763183594,
0.16370762884616852,
-0.16131749749183655,
0.07234954833984375,
0.17885442078113556,
0.06387543678283691,
-0.060773108154535294,
0.03052571415901184,
-0.1302308738231659,
-0.11937060952186584,
0.08908388763666153,
0.1734791398048401,
0.18164238333702087,
-0.0444667711853981,
-0.2867427170276642,
-0.03982594236731529,
-0.1566799134016037,
0.3662884831428528,
-0.2972055673599243,
-0.37668392062187195,
0.2105434089899063,
-0.12052837759256363,
-0.11313314735889435,
-0.46339529752731323,
0.27180954813957214,
0.08612008392810822,
0.0026802513748407364,
0.4034269154071808,
-0.00010309630306437612,
0.05875676870346069,
0.2967478036880493,
0.1559891402721405,
-0.39840781688690186,
-0.43212831020355225,
-0.18936000764369965,
-0.023407861590385437,
0.03456372022628784,
-0.304476797580719,
0.09798327833414078,
-0.2846681475639343,
-0.09054117649793625,
-0.27566608786582947,
0.10468639433383942,
0.4386059045791626,
0.32663995027542114,
0.23733948171138763,
-0.2064998298883438,
-0.22930341958999634,
0.23115266859531403,
0.1250884085893631,
-0.03050871379673481,
0.0494752936065197,
-0.13443879783153534,
-0.0064585269428789616,
0.4515703618526459,
0.4609145224094391,
-0.27239561080932617,
0.2647712230682373,
0.13536487519741058,
0.14636334776878357,
0.13772478699684143,
-0.3910481035709381,
0.2763094902038574,
0.1961432248353958,
0.74526047706604,
-0.2964995503425598,
-0.2943911552429199,
-0.16970524191856384,
0.13737638294696808,
-0.4167192578315735,
0.18133898079395294,
0.07008319348096848,
0.006375689525157213,
-0.04701511934399605,
-0.03316250815987587,
0.06102722883224487,
0.08074197173118591,
0.08818031847476959,
-0.058075059205293655,
0.038328465074300766,
-0.09864160418510437,
0.3288167715072632,
0.11253046244382858,
-0.07475090771913528,
0.2975304424762726,
-0.0059941355139017105,
-0.08857018500566483,
0.041544560343027115,
-0.4325242340564728,
-0.02960842475295067,
-0.03688057139515877,
0.051676034927368164,
-0.118137888610363,
-0.038740374147892,
0.018386678770184517,
-0.3749556541442871,
-0.1474357545375824,
0.3403448760509491,
0.21513447165489197,
0.26627618074417114,
0.27069932222366333,
0.5616863369941711,
0.09117243438959122,
-0.07616247981786728,
0.030804160982370377,
-0.05580741912126541,
-0.001574118621647358,
-0.46264275908470154,
0.2433207482099533,
0.09893118590116501,
0.2934701442718506,
-0.23985853791236877,
-0.5455215573310852,
0.19244219362735748,
-0.028101101517677307,
0.09409554302692413,
0.1541178673505783,
0.3049503266811371,
0.022122062742710114,
0.20651817321777344,
0.07934718579053879,
0.19360806047916412,
-0.00917021930217743,
-0.11720536649227142,
-0.2069239616394043,
0.09760784357786179,
-0.20027904212474823,
-0.15010665357112885,
0.0502697229385376,
-0.072052501142025,
0.11244919896125793,
0.06405958533287048,
-0.0010050220880657434,
-0.07605667412281036,
-0.016303392127156258,
-0.38646429777145386,
-0.01274797786027193,
0.35889336466789246,
-0.10326334089040756,
0.42035040259361267,
0.25205424427986145,
-0.418550044298172,
0.059699349105358124,
0.18021109700202942,
-0.3688521087169647,
-0.03381352126598358,
-0.21215713024139404,
0.2862125635147095,
-0.10304385423660278,
-0.18798112869262695,
-0.12009162455797195,
0.0468238964676857,
0.41932007670402527,
-0.2145540416240692,
0.1575896143913269,
-0.3543839752674103,
-0.30932238698005676,
-0.2777700126171112,
-0.06630391627550125,
0.22143256664276123,
-0.6722468137741089,
0.004389546811580658,
-0.1475468873977661,
-0.02911280281841755,
0.05280671268701553,
0.29601922631263733,
-0.08100429177284241,
0.20629146695137024,
-0.07059191167354584,
0.030349701642990112,
0.13955116271972656,
-0.3906913101673126,
-0.1104636862874031,
0.10354377329349518,
-0.14200329780578613,
-0.24426409602165222,
0.0704808160662651,
-0.04033960774540901,
0.09173101931810379,
-0.0916263610124588,
0.05823206529021263,
-0.13187739253044128,
-0.1996321827173233,
-0.09513326734304428,
-0.14370395243167877,
0.05381122976541519,
0.6539093255996704,
0.0927329957485199,
-0.016800185665488243,
0.07564690709114075,
-0.10022872686386108,
-0.3448370695114136,
-0.042532313615083694,
-0.10095544904470444,
0.20621968805789948,
0.21479003131389618,
0.05564019829034805,
0.2983596920967102,
0.1459522843360901,
-0.06447026878595352,
-0.44249671697616577,
0.10170092433691025,
-0.04005155712366104,
0.139564648270607,
-0.14514318108558655,
-0.19234375655651093,
-0.3297649919986725,
-0.05378592014312744,
-0.20797628164291382,
0.01832389459013939,
0.16331332921981812,
0.06836079806089401,
-0.22142204642295837,
-0.020483320578932762,
0.014084305614233017,
-0.07588431239128113,
-0.017214002087712288,
0.10933052748441696,
-0.10402525961399078,
0.2656514644622803,
-0.09511606395244598,
0.11689403653144836,
-0.026739375665783882,
0.2531200349330902,
0.4326063096523285,
0.24005182087421417,
-0.046621520072221756,
0.3670240342617035,
0.08486083149909973,
-0.32702308893203735,
0.007840344682335854,
-0.17265833914279938,
0.018129494041204453,
-0.08387430757284164,
-0.016326790675520897,
0.1145247295498848,
0.2768394351005554,
-0.10859724879264832,
-0.08471960574388504,
0.1411859542131424,
-0.17720049619674683,
0.27628424763679504,
-0.16197456419467926,
0.20046064257621765,
0.25996309518814087,
-0.1093929260969162,
0.12512215971946716,
-0.21271125972270966,
0.21588090062141418,
-0.1297987848520279,
0.23431411385536194,
0.0071422867476940155,
-0.26171764731407166,
0.06771949678659439,
0.42205390334129333,
0.0015312876785174012,
-0.00352389644831419,
0.00977385975420475,
-0.1586681604385376,
0.16574639081954956,
-0.013017593882977962,
0.5957189798355103,
0.35284268856048584,
0.20595574378967285,
-0.16387562453746796,
-0.05826844274997711,
-0.2622588872909546,
-0.13698403537273407,
0.21246151626110077,
0.09510159492492676,
0.029852507635951042,
0.057296257466077805,
0.02611011639237404,
-0.06643901765346527,
-0.17657269537448883,
-0.24333888292312622,
0.20823118090629578,
0.34642988443374634,
-0.5103123188018799,
-0.0029064707923680544,
-0.34527283906936646,
-0.23186379671096802,
-0.31859728693962097,
-0.09879087656736374,
-0.2351587414741516,
-0.45904403924942017,
0.09043808281421661,
-0.07749143987894058,
-0.19039304554462433,
0.14507639408111572,
-0.037563882768154144,
0.007917581126093864,
-0.09107304364442825,
0.15205201506614685,
-0.09758397191762924,
-0.47024962306022644,
-0.20457139611244202,
0.1811123490333557,
0.007479986175894737,
0.04695321246981621,
0.48136013746261597,
-0.14319881796836853,
-0.12455569207668304,
-0.07857172936201096,
-0.29531702399253845,
0.004026516806334257,
-0.273065984249115,
0.1366041749715805,
0.18162274360656738,
0.1038593128323555,
0.008461663499474525,
-0.14868468046188354,
0.2930161654949188,
-0.07151962071657181,
0.024640154093503952,
0.10695717483758926,
0.045233163982629776,
-0.29207339882850647,
-0.26646992564201355,
-0.47501954436302185,
-0.47453007102012634,
-0.17748183012008667,
0.06694811582565308,
-0.07590831816196442,
-0.0335286445915699,
0.5198025703430176,
0.06844212859869003,
0.06568100303411484,
0.09314499795436859,
0.023252936080098152,
-0.34674352407455444,
-0.09354056417942047,
0.24904774129390717,
-0.17909182608127594,
-0.21024540066719055,
0.1960572600364685,
0.10930954664945602,
0.11752841621637344,
-0.2039329558610916,
-0.3139224648475647,
0.07286287099123001,
-0.05760139226913452,
0.05894460529088974,
0.0813102275133133,
0.19489642977714539,
0.21388272941112518,
0.26710212230682373,
-0.148003488779068,
-0.32705122232437134,
-0.33171188831329346,
0.13817338645458221,
-0.07196802645921707,
0.13063539564609528,
-0.10625577718019485,
0.2940855622291565,
-0.15208424627780914,
0.32650870084762573,
0.02177213691174984,
-0.21265599131584167,
0.19188879430294037,
-0.04784765839576721,
0.5207322835922241,
0.06838060170412064,
-0.4193747341632843,
0.06588514894247055,
-0.11910711973905563,
0.02694641798734665,
0.17604288458824158,
-0.31963908672332764,
0.03795626014471054,
-0.14796802401542664,
0.39460447430610657,
-0.24780505895614624,
-0.09965691715478897,
-0.10064268857240677,
-0.15016862750053406,
0.040526945143938065,
0.11690041422843933,
-0.04097527265548706,
-0.2084079086780548,
-0.19158485531806946,
-0.2512802183628082,
0.05782405287027359,
-0.09546123445034027,
-0.08755175024271011,
-0.5335749983787537,
-0.23349899053573608,
-0.1649959832429886,
0.29409846663475037,
0.15745101869106293,
0.33466413617134094,
-0.17851713299751282,
0.24547159671783447,
0.047758590430021286,
0.24589969217777252,
0.6149811148643494,
-0.4832390546798706,
0.15470227599143982,
0.22637194395065308,
0.3931273818016052,
-0.17800158262252808,
-0.12725535035133362,
-0.16925735771656036,
0.29472610354423523,
-0.29577744007110596,
0.025988830253481865,
-0.15553432703018188,
-0.09107692539691925,
0.26310059428215027,
0.15540583431720734,
-0.12238035351037979,
-0.31498029828071594,
-0.23095160722732544,
-0.1793929785490036,
-0.12728528678417206,
-0.053396809846162796,
0.06357715278863907,
0.18663805723190308,
-0.37848716974258423,
0.09864776581525803,
0.14082369208335876,
0.0735073834657669,
0.2715045213699341,
0.1186351478099823,
0.22324301302433014,
0.03027692809700966,
0.19736146926879883,
0.3174023926258087,
0.2587256133556366,
0.5099826455116272,
0.5483978390693665,
-0.3618466854095459,
-0.5113290548324585,
-0.11947869509458542,
-0.11476928740739822,
0.2007075846195221,
0.06500115245580673,
-0.14221520721912384,
0.1660955846309662,
-0.050639908760786057,
0.1854587346315384,
0.09619783610105515,
0.022307993844151497,
0.4922949969768524,
0.16057652235031128,
-0.48984798789024353,
-0.5388930439949036,
0.27135899662971497,
0.03924155607819557,
-0.04784061759710312,
0.12815535068511963,
0.07973218709230423,
-0.3407573103904724,
0.2059527039527893,
-0.15599367022514343,
0.6908730864524841,
0.0837978795170784,
-0.051030512899160385,
-0.01703108288347721,
-0.22617307305335999,
0.7132235765457153,
-0.11871161311864853,
0.0007718639681115746,
-0.3614291846752167,
-0.3074661195278168,
-0.06222986429929733,
-0.02211889624595642,
0.023474834859371185,
0.4506933391094208,
-0.30857908725738525,
0.3788377046585083,
-0.3285132050514221,
0.2046867161989212,
0.028749993070960045,
-0.0740615576505661,
0.2494397759437561,
-0.13231386244297028,
-0.08248619735240936,
0.20103396475315094,
-0.15761911869049072,
-0.13437563180923462,
-0.16743485629558563,
0.04190551117062569,
-0.23184852302074432,
-0.268060564994812,
-0.22626028954982758,
0.08226071298122406,
-0.2538246810436249,
0.14157825708389282,
-0.085654117166996,
-0.016719289124011993,
0.21681153774261475,
0.20250990986824036,
0.48632189631462097,
0.0789240300655365,
-0.1482863575220108,
0.18389566242694855,
0.04214852675795555,
0.1370234340429306,
0.03434861823916435,
0.05374675244092941,
0.41506227850914,
0.11604964733123779,
-0.2699809670448303,
0.1285303235054016,
-0.07956726104021072,
0.17594987154006958,
-0.08703131973743439,
0.08389434963464737,
-0.09839735180139542,
-0.3653748333454132,
0.032647598534822464,
-0.07703867554664612,
0.2287106066942215,
-0.2537734806537628,
0.1773461103439331,
0.05198271945118904,
-0.046680185943841934,
0.21207912266254425,
-0.2636915147304535,
-0.14659744501113892,
-0.04574663192033768,
0.18923304975032806,
0.02596413902938366,
0.19335642457008362,
0.24724461138248444,
0.025973347947001457,
-0.3513919413089752,
-0.2565113604068756,
0.03895195946097374,
0.02399943582713604,
-0.6778354048728943,
0.24598249793052673,
0.25335440039634705,
0.07594557106494904,
-0.057189229875802994,
0.2232683151960373,
-0.015830159187316895,
0.07108484953641891,
0.06101395562291145,
-0.5274380445480347,
-0.21865008771419525,
-0.004670436959713697,
-0.18475468456745148,
0.11692999303340912,
0.24786525964736938,
0.4110047519207001,
0.13375753164291382,
0.07145018875598907,
-0.3641543686389923,
-0.020954042673110962,
-0.1723940074443817,
0.29801276326179504,
0.1525106281042099,
0.01996106095612049,
0.28203141689300537,
-0.17880649864673615,
0.21821686625480652,
0.0007438941393047571,
0.007750352844595909,
-0.24981847405433655,
-0.18720929324626923,
0.11241060495376587,
0.13520921766757965,
-0.19721588492393494,
-0.06341143697500229,
-0.16438139975070953,
0.057836856693029404,
-0.07198397815227509,
-0.01725105755031109,
0.3105736970901489,
0.0032079345546662807,
0.3735309839248657,
-0.1509217470884323,
0.23278465867042542,
-0.046329841017723083,
0.21827781200408936,
0.012717180885374546,
-0.11400148272514343,
0.07424529641866684,
0.17296549677848816,
-0.1127648875117302,
0.01947791315615177,
-0.17507940530776978,
0.08479494601488113,
-0.11700500547885895,
-0.1179296150803566,
0.1342935413122177,
-0.5689804553985596,
0.2959565222263336,
0.19363801181316376,
0.44936269521713257,
0.27813720703125,
-0.18682560324668884,
-0.0707663968205452,
0.38260918855667114,
0.3079267740249634,
-0.36566975712776184,
-0.16835995018482208,
0.1630018949508667,
0.16556130349636078,
0.0003904930781573057,
0.07560741901397705,
0.06072523817420006,
-0.031059928238391876,
0.044892843812704086,
0.008086008951067924,
0.4554387927055359,
-0.4376547038555145,
0.23490537703037262,
0.5269825458526611,
-0.061971064656972885,
0.09998418390750885,
0.4967944622039795,
0.17317654192447662,
0.0635330006480217,
0.5881980657577515,
0.03465026989579201,
0.17732077836990356,
0.1874702125787735,
-0.13796019554138184,
-0.07542061060667038,
-0.17221730947494507,
0.1809183806180954,
0.09697239845991135,
0.018856609240174294,
-0.042831312865018845,
-0.0954478457570076,
0.3011341989040375,
-0.38394567370414734,
0.004110394511371851,
-0.005768762901425362,
0.11119665205478668,
-0.22550338506698608,
-0.106015644967556,
-0.15626294910907745,
-0.09870976209640503,
-0.16644608974456787,
-0.19731606543064117,
0.014027981087565422,
-0.17005053162574768,
0.3556353747844696,
-0.07428083568811417,
-0.19596435129642487,
-0.45658138394355774,
-0.1867782324552536,
0.3054196536540985,
0.06508152186870575,
-0.24730956554412842,
0.016319898888468742,
0.2487560212612152,
-0.1455007642507553,
0.3213774859905243,
0.08623956143856049,
0.6039386987686157,
0.17137542366981506,
0.0897911787033081,
-0.34109172224998474,
-0.09729502350091934,
-0.08858026564121246,
0.15166328847408295,
0.21556809544563293,
0.04592103138566017,
-0.036833956837654114,
0.3922654986381531,
0.20187819004058838,
-0.17074932157993317,
0.3085803985595703,
0.33574238419532776,
0.2227042317390442,
-0.17061945796012878,
-0.0630669817328453,
-0.1339656412601471,
-0.2573544979095459,
-0.32663965225219727,
0.10131869465112686,
-0.26979494094848633,
0.11595753580331802,
0.4622560143470764,
-0.04151366278529167,
0.08409026265144348,
-0.2942292392253876,
0.14628008008003235,
0.13171041011810303,
0.311890184879303,
0.27394425868988037,
-0.04762457683682442,
-0.3456506133079529,
0.16157123446464539,
-0.5773794054985046,
0.12946027517318726,
-0.1186995655298233,
-0.11469240486621857,
-0.033454012125730515,
-0.15822313725948334,
0.15932197868824005,
0.020614948123693466,
0.38295018672943115,
0.18881821632385254,
-0.015939833596348763,
-0.10867761075496674,
-0.1195140853524208,
-0.19319865107536316,
-0.08259912580251694,
-0.12190110981464386,
0.2010165899991989,
-0.3226902186870575,
-0.061835866421461105,
-0.1457766592502594,
0.03897590935230255,
-0.34980833530426025,
0.09371425211429596,
0.1062968522310257,
-0.020189348608255386,
0.36031776666641235,
0.1459479033946991,
0.7699722647666931,
0.04881495237350464,
0.1150306761264801,
-0.09138786792755127,
-0.35364916920661926,
-0.404243141412735,
0.36886903643608093,
0.3255910575389862,
0.25653600692749023,
-0.10637737810611725,
0.009763987734913826,
-0.16448278725147247,
0.09450659155845642,
-0.04354657232761383,
0.32114851474761963,
-0.2544762194156647,
0.21450477838516235,
-0.024010805413126945,
0.01713998056948185,
0.09913121163845062,
-0.05562575161457062,
-0.002646799897775054,
0.3410545289516449,
-0.2067563533782959,
-0.604709804058075,
0.6198092103004456,
-0.21293136477470398,
-0.23955528438091278,
0.1537303924560547,
0.15452565252780914,
0.22137925028800964,
-0.2187478393316269,
-0.5100530982017517,
0.02474985457956791,
0.3773825168609619,
0.019003786146640778,
-0.4423445463180542,
-0.0037065274082124233,
-0.19275739789009094,
0.051443908363580704,
0.11356008797883987,
0.30625423789024353,
0.1166287362575531,
-0.1932860165834427,
0.19910483062267303,
-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.17891450226306915,
-0.05732319876551628,
0.005179460160434246,
0.1343672275543213,
0.4113537073135376,
0.3502123951911926,
0.6419944763183594,
0.16370762884616852,
-0.16131749749183655,
0.07234954833984375,
0.17885442078113556,
0.06387543678283691,
-0.060773108154535294,
0.03052571415901184,
-0.1302308738231659,
-0.11937060952186584,
0.08908388763666153,
0.1734791398048401,
0.18164238333702087,
-0.0444667711853981,
-0.2867427170276642,
-0.03982594236731529,
-0.1566799134016037,
0.3662884831428528,
-0.2972055673599243,
-0.37668392062187195,
0.2105434089899063,
-0.12052837759256363,
-0.11313314735889435,
-0.46339529752731323,
0.27180954813957214,
0.08612008392810822,
0.0026802513748407364,
0.4034269154071808,
-0.00010309630306437612,
0.05875676870346069,
0.2967478036880493,
0.1559891402721405,
-0.39840781688690186,
-0.43212831020355225,
-0.18936000764369965,
-0.023407861590385437,
0.03456372022628784,
-0.304476797580719,
0.09798327833414078,
-0.2846681475639343,
-0.09054117649793625,
-0.27566608786582947,
0.10468639433383942,
0.4386059045791626,
0.32663995027542114,
0.23733948171138763,
-0.2064998298883438,
-0.22930341958999634,
0.23115266859531403,
0.1250884085893631,
-0.03050871379673481,
0.0494752936065197,
-0.13443879783153534,
-0.0064585269428789616,
0.4515703618526459,
0.4609145224094391,
-0.27239561080932617,
0.2647712230682373,
0.13536487519741058,
0.14636334776878357,
0.13772478699684143,
-0.3910481035709381,
0.2763094902038574,
0.1961432248353958,
0.74526047706604,
-0.2964995503425598,
-0.2943911552429199,
-0.16970524191856384,
0.13737638294696808,
-0.4167192578315735,
0.18133898079395294,
0.07008319348096848,
0.006375689525157213,
-0.04701511934399605,
-0.03316250815987587,
0.06102722883224487,
0.08074197173118591,
0.08818031847476959,
-0.058075059205293655,
0.038328465074300766,
-0.09864160418510437,
0.3288167715072632,
0.11253046244382858,
-0.07475090771913528,
0.2975304424762726,
-0.0059941355139017105,
-0.08857018500566483,
0.041544560343027115,
-0.4325242340564728,
-0.02960842475295067,
-0.03688057139515877,
0.051676034927368164,
-0.118137888610363,
-0.038740374147892,
0.018386678770184517,
-0.3749556541442871,
-0.1474357545375824,
0.3403448760509491,
0.21513447165489197,
0.26627618074417114,
0.27069932222366333,
0.5616863369941711,
0.09117243438959122,
-0.07616247981786728,
0.030804160982370377,
-0.05580741912126541,
-0.001574118621647358,
-0.46264275908470154,
0.2433207482099533,
0.09893118590116501,
0.2934701442718506,
-0.23985853791236877,
-0.5455215573310852,
0.19244219362735748,
-0.028101101517677307,
0.09409554302692413,
0.1541178673505783,
0.3049503266811371,
0.022122062742710114,
0.20651817321777344,
0.07934718579053879,
0.19360806047916412,
-0.00917021930217743,
-0.11720536649227142,
-0.2069239616394043,
0.09760784357786179,
-0.20027904212474823,
-0.15010665357112885,
0.0502697229385376,
-0.072052501142025,
0.11244919896125793,
0.06405958533287048,
-0.0010050220880657434,
-0.07605667412281036,
-0.016303392127156258,
-0.38646429777145386,
-0.01274797786027193,
0.35889336466789246,
-0.10326334089040756,
0.42035040259361267,
0.25205424427986145,
-0.418550044298172,
0.059699349105358124,
0.18021109700202942,
-0.3688521087169647,
-0.03381352126598358,
-0.21215713024139404,
0.2862125635147095,
-0.10304385423660278,
-0.18798112869262695,
-0.12009162455797195,
0.0468238964676857,
0.41932007670402527,
-0.2145540416240692,
0.1575896143913269,
-0.3543839752674103,
-0.30932238698005676,
-0.2777700126171112,
-0.06630391627550125,
0.22143256664276123,
-0.6722468137741089,
0.004389546811580658,
-0.1475468873977661,
-0.02911280281841755,
0.05280671268701553,
0.29601922631263733,
-0.08100429177284241,
0.20629146695137024,
-0.07059191167354584,
0.030349701642990112,
0.13955116271972656,
-0.3906913101673126,
-0.1104636862874031,
0.10354377329349518,
-0.14200329780578613,
-0.24426409602165222,
0.0704808160662651,
-0.04033960774540901,
0.09173101931810379,
-0.0916263610124588,
0.05823206529021263,
-0.13187739253044128,
-0.1996321827173233,
-0.09513326734304428,
-0.14370395243167877,
0.05381122976541519,
0.6539093255996704,
0.0927329957485199,
-0.016800185665488243,
0.07564690709114075,
-0.10022872686386108,
-0.3448370695114136,
-0.042532313615083694,
-0.10095544904470444,
0.20621968805789948,
0.21479003131389618,
0.05564019829034805,
0.2983596920967102,
0.1459522843360901,
-0.06447026878595352,
-0.44249671697616577,
0.10170092433691025,
-0.04005155712366104,
0.139564648270607,
-0.14514318108558655,
-0.19234375655651093,
-0.3297649919986725,
-0.05378592014312744,
-0.20797628164291382,
0.01832389459013939,
0.16331332921981812,
0.06836079806089401,
-0.22142204642295837,
-0.020483320578932762,
0.014084305614233017,
-0.07588431239128113,
-0.017214002087712288,
0.10933052748441696,
-0.10402525961399078,
0.2656514644622803,
-0.09511606395244598,
0.11689403653144836,
-0.026739375665783882,
0.2531200349330902,
0.4326063096523285,
0.24005182087421417,
-0.046621520072221756,
0.3670240342617035,
0.08486083149909973,
-0.32702308893203735,
0.007840344682335854,
-0.17265833914279938,
0.018129494041204453,
-0.08387430757284164,
-0.016326790675520897,
0.1145247295498848,
0.2768394351005554,
-0.10859724879264832,
-0.08471960574388504,
0.1411859542131424,
-0.17720049619674683,
0.27628424763679504,
-0.16197456419467926,
0.20046064257621765,
0.25996309518814087,
-0.1093929260969162,
0.12512215971946716,
-0.21271125972270966,
0.21588090062141418,
-0.1297987848520279,
0.23431411385536194,
0.0071422867476940155,
-0.26171764731407166,
0.06771949678659439,
0.42205390334129333,
0.0015312876785174012,
-0.00352389644831419,
0.00977385975420475,
-0.1586681604385376,
0.16574639081954956,
-0.013017593882977962,
0.5957189798355103,
0.35284268856048584,
0.20595574378967285,
-0.16387562453746796,
-0.05826844274997711,
-0.2622588872909546,
-0.13698403537273407,
0.21246151626110077,
0.09510159492492676,
0.029852507635951042,
0.057296257466077805,
0.02611011639237404,
-0.06643901765346527,
-0.17657269537448883,
-0.24333888292312622,
0.20823118090629578,
0.34642988443374634,
-0.5103123188018799,
-0.0029064707923680544,
-0.34527283906936646,
-0.23186379671096802,
-0.31859728693962097,
-0.09879087656736374,
-0.2351587414741516,
-0.45904403924942017,
0.09043808281421661,
-0.07749143987894058,
-0.19039304554462433,
0.14507639408111572,
-0.037563882768154144,
0.007917581126093864,
-0.09107304364442825,
0.15205201506614685,
-0.09758397191762924,
-0.47024962306022644,
-0.20457139611244202,
0.1811123490333557,
0.007479986175894737,
0.04695321246981621,
0.48136013746261597,
-0.14319881796836853,
-0.12455569207668304,
-0.07857172936201096,
-0.29531702399253845,
0.004026516806334257,
-0.273065984249115,
0.1366041749715805,
0.18162274360656738,
0.1038593128323555,
0.008461663499474525,
-0.14868468046188354,
0.2930161654949188,
-0.07151962071657181,
0.024640154093503952,
0.10695717483758926,
0.045233163982629776,
-0.29207339882850647,
-0.26646992564201355,
-0.47501954436302185,
-0.47453007102012634,
-0.17748183012008667,
0.06694811582565308,
-0.07590831816196442,
-0.0335286445915699,
0.5198025703430176,
0.06844212859869003,
0.06568100303411484,
0.09314499795436859,
0.023252936080098152,
-0.34674352407455444,
-0.09354056417942047,
0.24904774129390717,
-0.17909182608127594,
-0.21024540066719055,
0.1960572600364685,
0.10930954664945602,
0.11752841621637344,
-0.2039329558610916,
-0.3139224648475647,
0.07286287099123001,
-0.05760139226913452,
0.05894460529088974,
0.0813102275133133,
0.19489642977714539,
0.21388272941112518,
0.26710212230682373,
-0.148003488779068,
-0.32705122232437134,
-0.33171188831329346,
0.13817338645458221,
-0.07196802645921707,
0.13063539564609528,
-0.10625577718019485,
0.2940855622291565,
-0.15208424627780914,
0.32650870084762573,
0.02177213691174984,
-0.21265599131584167,
0.19188879430294037,
-0.04784765839576721,
0.5207322835922241,
0.06838060170412064,
-0.4193747341632843,
0.06588514894247055,
-0.11910711973905563,
0.02694641798734665,
0.17604288458824158,
-0.31963908672332764,
0.03795626014471054,
-0.14796802401542664,
0.39460447430610657,
-0.24780505895614624,
-0.09965691715478897,
-0.10064268857240677,
-0.15016862750053406,
0.040526945143938065,
0.11690041422843933,
-0.04097527265548706,
-0.2084079086780548,
-0.19158485531806946,
-0.2512802183628082,
0.05782405287027359,
-0.09546123445034027,
-0.08755175024271011,
-0.5335749983787537,
-0.23349899053573608,
-0.1649959832429886,
0.29409846663475037,
0.15745101869106293,
0.33466413617134094,
-0.17851713299751282,
0.24547159671783447,
0.047758590430021286,
0.24589969217777252,
0.6149811148643494,
-0.4832390546798706,
0.15470227599143982,
0.22637194395065308,
0.3931273818016052,
-0.17800158262252808,
-0.12725535035133362,
-0.16925735771656036,
0.29472610354423523,
-0.29577744007110596,
0.025988830253481865,
-0.15553432703018188,
-0.09107692539691925,
0.26310059428215027,
0.15540583431720734,
-0.12238035351037979,
-0.31498029828071594,
-0.23095160722732544,
-0.1793929785490036,
-0.12728528678417206,
-0.053396809846162796,
0.06357715278863907,
0.18663805723190308,
-0.37848716974258423,
0.09864776581525803,
0.14082369208335876,
0.0735073834657669,
0.2715045213699341,
0.1186351478099823,
0.22324301302433014,
0.03027692809700966,
0.19736146926879883,
0.3174023926258087,
0.2587256133556366,
0.5099826455116272,
0.5483978390693665,
-0.3618466854095459,
-0.5113290548324585,
-0.11947869509458542,
-0.11476928740739822,
0.2007075846195221,
0.06500115245580673,
-0.14221520721912384,
0.1660955846309662,
-0.050639908760786057,
0.1854587346315384,
0.09619783610105515,
0.022307993844151497,
0.4922949969768524,
0.16057652235031128,
-0.48984798789024353,
-0.5388930439949036,
0.27135899662971497,
0.03924155607819557,
-0.04784061759710312,
0.12815535068511963,
0.07973218709230423,
-0.3407573103904724,
0.2059527039527893,
-0.15599367022514343,
0.6908730864524841,
0.0837978795170784,
-0.051030512899160385,
-0.01703108288347721,
-0.22617307305335999,
0.7132235765457153,
-0.11871161311864853,
0.0007718639681115746,
-0.3614291846752167,
-0.3074661195278168,
-0.06222986429929733,
-0.02211889624595642,
0.023474834859371185,
0.4506933391094208,
-0.30857908725738525,
0.3788377046585083,
-0.3285132050514221,
0.2046867161989212,
0.028749993070960045,
-0.0740615576505661,
0.2494397759437561,
-0.13231386244297028,
-0.08248619735240936,
0.20103396475315094,
-0.15761911869049072,
-0.13437563180923462,
-0.16743485629558563,
0.04190551117062569,
-0.23184852302074432,
-0.268060564994812,
-0.22626028954982758,
0.08226071298122406,
-0.2538246810436249,
0.14157825708389282,
-0.085654117166996,
-0.016719289124011993,
0.21681153774261475,
0.20250990986824036,
0.48632189631462097,
0.0789240300655365,
-0.1482863575220108,
0.18389566242694855,
0.04214852675795555,
0.1370234340429306,
0.03434861823916435,
0.05374675244092941,
0.41506227850914,
0.11604964733123779,
-0.2699809670448303,
0.1285303235054016,
-0.07956726104021072,
0.17594987154006958,
-0.08703131973743439,
0.08389434963464737,
-0.09839735180139542,
-0.3653748333454132,
0.032647598534822464,
-0.07703867554664612,
0.2287106066942215,
-0.2537734806537628,
0.1773461103439331,
0.05198271945118904,
-0.046680185943841934,
0.21207912266254425,
-0.2636915147304535,
-0.14659744501113892,
-0.04574663192033768,
0.18923304975032806,
0.02596413902938366,
0.19335642457008362,
0.24724461138248444,
0.025973347947001457,
-0.3513919413089752,
-0.2565113604068756,
0.03895195946097374,
0.02399943582713604,
-0.6778354048728943,
0.24598249793052673,
0.25335440039634705,
0.07594557106494904,
-0.057189229875802994,
0.2232683151960373,
-0.015830159187316895,
0.07108484953641891,
0.06101395562291145,
-0.5274380445480347,
-0.21865008771419525,
-0.004670436959713697,
-0.18475468456745148,
0.11692999303340912,
0.24786525964736938,
0.4110047519207001,
0.13375753164291382,
0.07145018875598907,
-0.3641543686389923,
-0.020954042673110962,
-0.1723940074443817,
0.29801276326179504,
0.1525106281042099,
0.01996106095612049,
0.28203141689300537,
-0.17880649864673615,
0.21821686625480652,
0.0007438941393047571,
0.007750352844595909,
-0.24981847405433655,
-0.18720929324626923,
0.11241060495376587,
0.13520921766757965,
-0.19721588492393494,
-0.06341143697500229,
-0.16438139975070953,
0.057836856693029404,
-0.07198397815227509,
-0.01725105755031109,
0.3105736970901489,
0.0032079345546662807,
0.3735309839248657,
-0.1509217470884323,
0.23278465867042542,
-0.046329841017723083,
0.21827781200408936,
0.012717180885374546,
-0.11400148272514343,
0.07424529641866684,
0.17296549677848816,
-0.1127648875117302,
0.01947791315615177,
-0.17507940530776978,
0.08479494601488113,
-0.11700500547885895,
-0.1179296150803566,
0.1342935413122177,
-0.5689804553985596,
0.2959565222263336,
0.19363801181316376,
0.44936269521713257,
0.27813720703125,
-0.18682560324668884,
-0.0707663968205452,
0.38260918855667114,
0.3079267740249634,
-0.36566975712776184,
-0.16835995018482208,
0.1630018949508667,
0.16556130349636078,
0.0003904930781573057,
0.07560741901397705,
0.06072523817420006,
-0.031059928238391876,
0.044892843812704086,
0.008086008951067924,
0.4554387927055359,
-0.4376547038555145,
0.23490537703037262,
0.5269825458526611,
-0.061971064656972885,
0.09998418390750885,
0.4967944622039795,
0.17317654192447662,
0.0635330006480217,
0.5881980657577515,
0.03465026989579201,
0.17732077836990356,
0.1874702125787735,
-0.13796019554138184,
-0.07542061060667038,
-0.17221730947494507,
0.1809183806180954,
0.09697239845991135,
0.018856609240174294,
-0.042831312865018845,
-0.0954478457570076,
0.3011341989040375,
-0.38394567370414734,
0.004110394511371851,
-0.005768762901425362,
0.11119665205478668,
-0.22550338506698608,
-0.106015644967556,
-0.15626294910907745,
-0.09870976209640503,
-0.16644608974456787,
-0.19731606543064117,
0.014027981087565422,
-0.17005053162574768,
0.3556353747844696,
-0.07428083568811417,
-0.19596435129642487,
-0.45658138394355774,
-0.1867782324552536,
0.3054196536540985,
0.06508152186870575,
-0.24730956554412842,
0.016319898888468742,
0.2487560212612152,
-0.1455007642507553,
0.3213774859905243,
0.08623956143856049,
0.6039386987686157,
0.17137542366981506,
0.0897911787033081,
-0.34109172224998474,
-0.09729502350091934,
-0.08858026564121246,
0.15166328847408295,
0.21556809544563293,
0.04592103138566017,
-0.036833956837654114,
0.3922654986381531,
0.20187819004058838,
-0.17074932157993317,
0.3085803985595703,
0.33574238419532776,
0.2227042317390442,
-0.17061945796012878,
-0.0630669817328453,
-0.1339656412601471,
-0.2573544979095459,
-0.32663965225219727,
0.10131869465112686,
-0.26979494094848633,
0.11595753580331802,
0.4622560143470764,
-0.04151366278529167,
0.08409026265144348,
-0.2942292392253876,
0.14628008008003235,
0.13171041011810303,
0.311890184879303,
0.27394425868988037,
-0.04762457683682442,
-0.3456506133079529,
0.16157123446464539,
-0.5773794054985046,
0.12946027517318726,
-0.1186995655298233,
-0.11469240486621857,
-0.033454012125730515,
-0.15822313725948334,
0.15932197868824005,
0.020614948123693466,
0.38295018672943115,
0.18881821632385254,
-0.015939833596348763,
-0.10867761075496674,
-0.1195140853524208,
-0.19319865107536316,
-0.08259912580251694,
-0.12190110981464386,
0.2010165899991989,
-0.3226902186870575,
-0.061835866421461105,
-0.1457766592502594,
0.03897590935230255,
-0.34980833530426025,
0.09371425211429596,
0.1062968522310257,
-0.020189348608255386,
0.36031776666641235,
0.1459479033946991,
0.7699722647666931,
0.04881495237350464,
0.1150306761264801,
-0.09138786792755127,
-0.35364916920661926,
-0.404243141412735,
0.36886903643608093,
0.3255910575389862,
0.25653600692749023,
-0.10637737810611725,
0.009763987734913826,
-0.16448278725147247,
0.09450659155845642,
-0.04354657232761383,
0.32114851474761963,
-0.2544762194156647,
0.21450477838516235,
-0.024010805413126945,
0.01713998056948185,
0.09913121163845062,
-0.05562575161457062,
-0.002646799897775054,
0.3410545289516449,
-0.2067563533782959,
-0.604709804058075,
0.6198092103004456,
-0.21293136477470398,
-0.23955528438091278,
0.1537303924560547,
0.15452565252780914,
0.22137925028800964,
-0.2187478393316269,
-0.5100530982017517,
0.02474985457956791,
0.3773825168609619,
0.019003786146640778,
-0.4423445463180542,
-0.0037065274082124233,
-0.19275739789009094,
0.051443908363580704,
0.11356008797883987,
0.30625423789024353,
0.1166287362575531,
-0.1932860165834427,
0.19910483062267303,
-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.17891450226306915,
-0.05732319876551628,
0.005179460160434246,
0.1343672275543213,
0.4113537073135376,
0.3502123951911926,
0.6419944763183594,
0.16370762884616852,
-0.16131749749183655,
0.07234954833984375,
0.17885442078113556,
0.06387543678283691,
-0.060773108154535294,
0.03052571415901184,
-0.1302308738231659,
-0.11937060952186584,
0.08908388763666153,
0.1734791398048401,
0.18164238333702087,
-0.0444667711853981,
-0.2867427170276642,
-0.03982594236731529,
-0.1566799134016037,
0.3662884831428528,
-0.2972055673599243,
-0.37668392062187195,
0.2105434089899063,
-0.12052837759256363,
-0.11313314735889435,
-0.46339529752731323,
0.27180954813957214,
0.08612008392810822,
0.0026802513748407364,
0.4034269154071808,
-0.00010309630306437612,
0.05875676870346069,
0.2967478036880493,
0.1559891402721405,
-0.39840781688690186,
-0.43212831020355225,
-0.18936000764369965,
-0.023407861590385437,
0.03456372022628784,
-0.304476797580719,
0.09798327833414078,
-0.2846681475639343,
-0.09054117649793625,
-0.27566608786582947,
0.10468639433383942,
0.4386059045791626,
0.32663995027542114,
0.23733948171138763,
-0.2064998298883438,
-0.22930341958999634,
0.23115266859531403,
0.1250884085893631,
-0.03050871379673481,
0.0494752936065197,
-0.13443879783153534,
-0.0064585269428789616,
0.4515703618526459,
0.4609145224094391,
-0.27239561080932617,
0.2647712230682373,
0.13536487519741058,
0.14636334776878357,
0.13772478699684143,
-0.3910481035709381,
0.2763094902038574,
0.1961432248353958,
0.74526047706604,
-0.2964995503425598,
-0.2943911552429199,
-0.16970524191856384,
0.13737638294696808,
-0.4167192578315735,
0.18133898079395294,
0.07008319348096848,
0.006375689525157213,
-0.04701511934399605,
-0.03316250815987587,
0.06102722883224487,
0.08074197173118591,
0.08818031847476959,
-0.058075059205293655,
0.038328465074300766,
-0.09864160418510437,
0.3288167715072632,
0.11253046244382858,
-0.07475090771913528,
0.2975304424762726,
-0.0059941355139017105,
-0.08857018500566483,
0.041544560343027115,
-0.4325242340564728,
-0.02960842475295067,
-0.03688057139515877,
0.051676034927368164,
-0.118137888610363,
-0.038740374147892,
0.018386678770184517,
-0.3749556541442871,
-0.1474357545375824,
0.3403448760509491,
0.21513447165489197,
0.26627618074417114,
0.27069932222366333,
0.5616863369941711,
0.09117243438959122,
-0.07616247981786728,
0.030804160982370377,
-0.05580741912126541,
-0.001574118621647358,
-0.46264275908470154,
0.2433207482099533,
0.09893118590116501,
0.2934701442718506,
-0.23985853791236877,
-0.5455215573310852,
0.19244219362735748,
-0.028101101517677307,
0.09409554302692413,
0.1541178673505783,
0.3049503266811371,
0.022122062742710114,
0.20651817321777344,
0.07934718579053879,
0.19360806047916412,
-0.00917021930217743,
-0.11720536649227142,
-0.2069239616394043,
0.09760784357786179,
-0.20027904212474823,
-0.15010665357112885,
0.0502697229385376,
-0.072052501142025,
0.11244919896125793,
0.06405958533287048,
-0.0010050220880657434,
-0.07605667412281036,
-0.016303392127156258,
-0.38646429777145386,
-0.01274797786027193,
0.35889336466789246,
-0.10326334089040756,
0.42035040259361267,
0.25205424427986145,
-0.418550044298172,
0.059699349105358124,
0.18021109700202942,
-0.3688521087169647,
-0.03381352126598358,
-0.21215713024139404,
0.2862125635147095,
-0.10304385423660278,
-0.18798112869262695,
-0.12009162455797195,
0.0468238964676857,
0.41932007670402527,
-0.2145540416240692,
0.1575896143913269,
-0.3543839752674103,
-0.30932238698005676,
-0.2777700126171112,
-0.06630391627550125,
0.22143256664276123,
-0.6722468137741089,
0.004389546811580658,
-0.1475468873977661,
-0.02911280281841755,
0.05280671268701553,
0.29601922631263733,
-0.08100429177284241,
0.20629146695137024,
-0.07059191167354584,
0.030349701642990112,
0.13955116271972656,
-0.3906913101673126,
-0.1104636862874031,
0.10354377329349518,
-0.14200329780578613,
-0.24426409602165222,
0.0704808160662651,
-0.04033960774540901,
0.09173101931810379,
-0.0916263610124588,
0.05823206529021263,
-0.13187739253044128,
-0.1996321827173233,
-0.09513326734304428,
-0.14370395243167877,
0.05381122976541519,
0.6539093255996704,
0.0927329957485199,
-0.016800185665488243,
0.07564690709114075,
-0.10022872686386108,
-0.3448370695114136,
-0.042532313615083694,
-0.10095544904470444,
0.20621968805789948,
0.21479003131389618,
0.05564019829034805,
0.2983596920967102,
0.1459522843360901,
-0.06447026878595352,
-0.44249671697616577,
0.10170092433691025,
-0.04005155712366104,
0.139564648270607,
-0.14514318108558655,
-0.19234375655651093,
-0.3297649919986725,
-0.05378592014312744,
-0.20797628164291382,
0.01832389459013939,
0.16331332921981812,
0.06836079806089401,
-0.22142204642295837,
-0.020483320578932762,
0.014084305614233017,
-0.07588431239128113,
-0.017214002087712288,
0.10933052748441696,
-0.10402525961399078,
0.2656514644622803,
-0.09511606395244598,
0.11689403653144836,
-0.026739375665783882,
0.2531200349330902,
0.4326063096523285,
0.24005182087421417,
-0.046621520072221756,
0.3670240342617035,
0.08486083149909973,
-0.32702308893203735,
0.007840344682335854,
-0.17265833914279938,
0.018129494041204453,
-0.08387430757284164,
-0.016326790675520897,
0.1145247295498848,
0.2768394351005554,
-0.10859724879264832,
-0.08471960574388504,
0.1411859542131424,
-0.17720049619674683,
0.27628424763679504,
-0.16197456419467926,
0.20046064257621765,
0.25996309518814087,
-0.1093929260969162,
0.12512215971946716,
-0.21271125972270966,
0.21588090062141418,
-0.1297987848520279,
0.23431411385536194,
0.0071422867476940155,
-0.26171764731407166,
0.06771949678659439,
0.42205390334129333,
0.0015312876785174012,
-0.00352389644831419,
0.00977385975420475,
-0.1586681604385376,
0.16574639081954956,
-0.013017593882977962,
0.5957189798355103,
0.35284268856048584,
0.20595574378967285,
-0.16387562453746796,
-0.05826844274997711,
-0.2622588872909546,
-0.13698403537273407,
0.21246151626110077,
0.09510159492492676,
0.029852507635951042,
0.057296257466077805,
0.02611011639237404,
-0.06643901765346527,
-0.17657269537448883,
-0.24333888292312622,
0.20823118090629578,
0.34642988443374634,
-0.5103123188018799,
-0.0029064707923680544,
-0.34527283906936646,
-0.23186379671096802,
-0.31859728693962097,
-0.09879087656736374,
-0.2351587414741516,
-0.45904403924942017,
0.09043808281421661,
-0.07749143987894058,
-0.19039304554462433,
0.14507639408111572,
-0.037563882768154144,
0.007917581126093864,
-0.09107304364442825,
0.15205201506614685,
-0.09758397191762924,
-0.47024962306022644,
-0.20457139611244202,
0.1811123490333557,
0.007479986175894737,
0.04695321246981621,
0.48136013746261597,
-0.14319881796836853,
-0.12455569207668304,
-0.07857172936201096,
-0.29531702399253845,
0.004026516806334257,
-0.273065984249115,
0.1366041749715805,
0.18162274360656738,
0.1038593128323555,
0.008461663499474525,
-0.14868468046188354,
0.2930161654949188,
-0.07151962071657181,
0.024640154093503952,
0.10695717483758926,
0.045233163982629776,
-0.29207339882850647,
-0.26646992564201355,
-0.47501954436302185,
-0.47453007102012634,
-0.17748183012008667,
0.06694811582565308,
-0.07590831816196442,
-0.0335286445915699,
0.5198025703430176,
0.06844212859869003,
0.06568100303411484,
0.09314499795436859,
0.023252936080098152,
-0.34674352407455444,
-0.09354056417942047,
0.24904774129390717,
-0.17909182608127594,
-0.21024540066719055,
0.1960572600364685,
0.10930954664945602,
0.11752841621637344,
-0.2039329558610916,
-0.3139224648475647,
0.07286287099123001,
-0.05760139226913452,
0.05894460529088974,
0.0813102275133133,
0.19489642977714539,
0.21388272941112518,
0.26710212230682373,
-0.148003488779068,
-0.32705122232437134,
-0.33171188831329346,
0.13817338645458221,
-0.07196802645921707,
0.13063539564609528,
-0.10625577718019485,
0.2940855622291565,
-0.15208424627780914,
0.32650870084762573,
0.02177213691174984,
-0.21265599131584167,
0.19188879430294037,
-0.04784765839576721,
0.5207322835922241,
0.06838060170412064,
-0.4193747341632843,
0.06588514894247055,
-0.11910711973905563,
0.02694641798734665,
0.17604288458824158,
-0.31963908672332764,
0.03795626014471054,
-0.14796802401542664,
0.39460447430610657,
-0.24780505895614624,
-0.09965691715478897,
-0.10064268857240677,
-0.15016862750053406,
0.040526945143938065,
0.11690041422843933,
-0.04097527265548706,
-0.2084079086780548,
-0.19158485531806946,
-0.2512802183628082,
0.05782405287027359,
-0.09546123445034027,
-0.08755175024271011,
-0.5335749983787537,
-0.23349899053573608,
-0.1649959832429886,
0.29409846663475037,
0.15745101869106293,
0.33466413617134094,
-0.17851713299751282,
0.24547159671783447,
0.047758590430021286,
0.24589969217777252,
0.6149811148643494,
-0.4832390546798706,
0.15470227599143982,
0.22637194395065308,
0.3931273818016052,
-0.17800158262252808,
-0.12725535035133362,
-0.16925735771656036,
0.29472610354423523,
-0.29577744007110596,
0.025988830253481865,
-0.15553432703018188,
-0.09107692539691925,
0.26310059428215027,
0.15540583431720734,
-0.12238035351037979,
-0.31498029828071594,
-0.23095160722732544,
-0.1793929785490036,
-0.12728528678417206,
-0.053396809846162796,
0.06357715278863907,
0.18663805723190308,
-0.37848716974258423,
0.09864776581525803,
0.14082369208335876,
0.0735073834657669,
0.2715045213699341,
0.1186351478099823,
0.22324301302433014,
0.03027692809700966,
0.19736146926879883,
0.3174023926258087,
0.2587256133556366,
0.5099826455116272,
0.5483978390693665,
-0.3618466854095459,
-0.5113290548324585,
-0.11947869509458542,
-0.11476928740739822,
0.2007075846195221,
0.06500115245580673,
-0.14221520721912384,
0.1660955846309662,
-0.050639908760786057,
0.1854587346315384,
0.09619783610105515,
0.022307993844151497,
0.4922949969768524,
0.16057652235031128,
-0.48984798789024353,
-0.5388930439949036,
0.27135899662971497,
0.03924155607819557,
-0.04784061759710312,
0.12815535068511963,
0.07973218709230423,
-0.3407573103904724,
0.2059527039527893,
-0.15599367022514343,
0.6908730864524841,
0.0837978795170784,
-0.051030512899160385,
-0.01703108288347721,
-0.22617307305335999,
0.7132235765457153,
-0.11871161311864853,
0.0007718639681115746,
-0.3614291846752167,
-0.3074661195278168,
-0.06222986429929733,
-0.02211889624595642,
0.023474834859371185,
0.4506933391094208,
-0.30857908725738525,
0.3788377046585083,
-0.3285132050514221,
0.2046867161989212,
0.028749993070960045,
-0.0740615576505661,
0.2494397759437561,
-0.13231386244297028,
-0.08248619735240936,
0.20103396475315094,
-0.15761911869049072,
-0.13437563180923462,
-0.16743485629558563,
0.04190551117062569,
-0.23184852302074432,
-0.268060564994812,
-0.22626028954982758,
0.08226071298122406,
-0.2538246810436249,
0.14157825708389282,
-0.085654117166996,
-0.016719289124011993,
0.21681153774261475,
0.20250990986824036,
0.48632189631462097,
0.0789240300655365,
-0.1482863575220108,
0.18389566242694855,
0.04214852675795555,
0.1370234340429306,
0.03434861823916435,
0.05374675244092941,
0.41506227850914,
0.11604964733123779,
-0.2699809670448303,
0.1285303235054016,
-0.07956726104021072,
0.17594987154006958,
-0.08703131973743439,
0.08389434963464737,
-0.09839735180139542,
-0.3653748333454132,
0.032647598534822464,
-0.07703867554664612,
0.2287106066942215,
-0.2537734806537628,
0.1773461103439331,
0.05198271945118904,
-0.046680185943841934,
0.21207912266254425,
-0.2636915147304535,
-0.14659744501113892,
-0.04574663192033768,
0.18923304975032806,
0.02596413902938366,
0.19335642457008362,
0.24724461138248444,
0.025973347947001457,
-0.3513919413089752,
-0.2565113604068756,
0.03895195946097374,
0.02399943582713604,
-0.6778354048728943,
0.24598249793052673,
0.25335440039634705,
0.07594557106494904,
-0.057189229875802994,
0.2232683151960373,
-0.015830159187316895,
0.07108484953641891,
0.06101395562291145,
-0.5274380445480347,
-0.21865008771419525,
-0.004670436959713697,
-0.18475468456745148,
0.11692999303340912,
0.24786525964736938,
0.4110047519207001,
0.13375753164291382,
0.07145018875598907,
-0.3641543686389923,
-0.020954042673110962,
-0.1723940074443817,
0.29801276326179504,
0.1525106281042099,
0.01996106095612049,
0.28203141689300537,
-0.17880649864673615,
0.21821686625480652,
0.0007438941393047571,
0.007750352844595909,
-0.24981847405433655,
-0.18720929324626923,
0.11241060495376587,
0.13520921766757965,
-0.19721588492393494,
-0.06341143697500229,
-0.16438139975070953,
0.057836856693029404,
-0.07198397815227509,
-0.01725105755031109,
0.3105736970901489,
0.0032079345546662807,
0.3735309839248657,
-0.1509217470884323,
0.23278465867042542,
-0.046329841017723083,
0.21827781200408936,
0.012717180885374546,
-0.11400148272514343,
0.07424529641866684,
0.17296549677848816,
-0.1127648875117302,
0.01947791315615177,
-0.17507940530776978,
0.08479494601488113,
-0.11700500547885895,
-0.1179296150803566,
0.1342935413122177,
-0.5689804553985596,
0.2959565222263336,
0.19363801181316376,
0.44936269521713257,
0.27813720703125,
-0.18682560324668884,
-0.0707663968205452,
0.38260918855667114,
0.3079267740249634,
-0.36566975712776184,
-0.16835995018482208,
0.1630018949508667,
0.16556130349636078,
0.0003904930781573057,
0.07560741901397705,
0.06072523817420006,
-0.031059928238391876,
0.044892843812704086,
0.008086008951067924,
0.4554387927055359,
-0.4376547038555145,
0.23490537703037262,
0.5269825458526611,
-0.061971064656972885,
0.09998418390750885,
0.4967944622039795,
0.17317654192447662,
0.0635330006480217,
0.5881980657577515,
0.03465026989579201,
0.17732077836990356,
0.1874702125787735,
-0.13796019554138184,
-0.07542061060667038,
-0.17221730947494507,
0.1809183806180954,
0.09697239845991135,
0.018856609240174294,
-0.042831312865018845,
-0.0954478457570076,
0.3011341989040375,
-0.38394567370414734,
0.004110394511371851,
-0.005768762901425362,
0.11119665205478668,
-0.22550338506698608,
-0.106015644967556,
-0.15626294910907745,
-0.09870976209640503,
-0.16644608974456787,
-0.19731606543064117,
0.014027981087565422,
-0.17005053162574768,
0.3556353747844696,
-0.07428083568811417,
-0.19596435129642487,
-0.45658138394355774,
-0.1867782324552536,
0.3054196536540985,
0.06508152186870575,
-0.24730956554412842,
0.016319898888468742,
0.2487560212612152,
-0.1455007642507553,
0.3213774859905243,
0.08623956143856049,
0.6039386987686157,
0.17137542366981506,
0.0897911787033081,
-0.34109172224998474,
-0.09729502350091934,
-0.08858026564121246,
0.15166328847408295,
0.21556809544563293,
0.04592103138566017,
-0.036833956837654114,
0.3922654986381531,
0.20187819004058838,
-0.17074932157993317,
0.3085803985595703,
0.33574238419532776,
0.2227042317390442,
-0.17061945796012878,
-0.0630669817328453,
-0.1339656412601471,
-0.2573544979095459,
-0.32663965225219727,
0.10131869465112686,
-0.26979494094848633,
0.11595753580331802,
0.4622560143470764,
-0.04151366278529167,
0.08409026265144348,
-0.2942292392253876,
0.14628008008003235,
0.13171041011810303,
0.311890184879303,
0.27394425868988037,
-0.04762457683682442,
-0.3456506133079529,
0.16157123446464539,
-0.5773794054985046,
0.12946027517318726,
-0.1186995655298233,
-0.11469240486621857,
-0.033454012125730515,
-0.15822313725948334,
0.15932197868824005,
0.020614948123693466,
0.38295018672943115,
0.18881821632385254,
-0.015939833596348763,
-0.10867761075496674,
-0.1195140853524208,
-0.19319865107536316,
-0.08259912580251694,
-0.12190110981464386,
0.2010165899991989,
-0.3226902186870575,
-0.061835866421461105,
-0.1457766592502594,
0.03897590935230255,
-0.34980833530426025,
0.09371425211429596,
0.1062968522310257,
-0.020189348608255386,
0.36031776666641235,
0.1459479033946991,
0.7699722647666931,
0.04881495237350464,
0.1150306761264801,
-0.09138786792755127,
-0.35364916920661926,
-0.404243141412735,
0.36886903643608093,
0.3255910575389862,
0.25653600692749023,
-0.10637737810611725,
0.009763987734913826,
-0.16448278725147247,
0.09450659155845642,
-0.04354657232761383,
0.32114851474761963,
-0.2544762194156647,
0.21450477838516235,
-0.024010805413126945,
0.01713998056948185,
0.09913121163845062,
-0.05562575161457062,
-0.002646799897775054,
0.3410545289516449,
-0.2067563533782959,
-0.604709804058075,
0.6198092103004456,
-0.21293136477470398,
-0.23955528438091278,
0.1537303924560547,
0.15452565252780914,
0.22137925028800964,
-0.2187478393316269,
-0.5100530982017517,
0.02474985457956791,
0.3773825168609619,
0.019003786146640778,
-0.4423445463180542,
-0.0037065274082124233,
-0.19275739789009094,
0.051443908363580704,
0.11356008797883987,
0.30625423789024353,
0.1166287362575531,
-0.1932860165834427,
0.19910483062267303,
-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.17891450226306915,
-0.05732319876551628,
0.005179460160434246,
0.1343672275543213,
0.4113537073135376,
0.3502123951911926,
0.6419944763183594,
0.16370762884616852,
-0.16131749749183655,
0.07234954833984375,
0.17885442078113556,
0.06387543678283691,
-0.060773108154535294,
0.03052571415901184,
-0.1302308738231659,
-0.11937060952186584,
0.08908388763666153,
0.1734791398048401,
0.18164238333702087,
-0.0444667711853981,
-0.2867427170276642,
-0.03982594236731529,
-0.1566799134016037,
0.3662884831428528,
-0.2972055673599243,
-0.37668392062187195,
0.2105434089899063,
-0.12052837759256363,
-0.11313314735889435,
-0.46339529752731323,
0.27180954813957214,
0.08612008392810822,
0.0026802513748407364,
0.4034269154071808,
-0.00010309630306437612,
0.05875676870346069,
0.2967478036880493,
0.1559891402721405,
-0.39840781688690186,
-0.43212831020355225,
-0.18936000764369965,
-0.023407861590385437,
0.03456372022628784,
-0.304476797580719,
0.09798327833414078,
-0.2846681475639343,
-0.09054117649793625,
-0.27566608786582947,
0.10468639433383942,
0.4386059045791626,
0.32663995027542114,
0.23733948171138763,
-0.2064998298883438,
-0.22930341958999634,
0.23115266859531403,
0.1250884085893631,
-0.03050871379673481,
0.0494752936065197,
-0.13443879783153534,
-0.0064585269428789616,
0.4515703618526459,
0.4609145224094391,
-0.27239561080932617,
0.2647712230682373,
0.13536487519741058,
0.14636334776878357,
0.13772478699684143,
-0.3910481035709381,
0.2763094902038574,
0.1961432248353958,
0.74526047706604,
-0.2964995503425598,
-0.2943911552429199,
-0.16970524191856384,
0.13737638294696808,
-0.4167192578315735,
0.18133898079395294,
0.07008319348096848,
0.006375689525157213,
-0.04701511934399605,
-0.03316250815987587,
0.06102722883224487,
0.08074197173118591,
0.08818031847476959,
-0.058075059205293655,
0.038328465074300766,
-0.09864160418510437,
0.3288167715072632,
0.11253046244382858,
-0.07475090771913528,
0.2975304424762726,
-0.0059941355139017105,
-0.08857018500566483,
0.041544560343027115,
-0.4325242340564728,
-0.02960842475295067,
-0.03688057139515877,
0.051676034927368164,
-0.118137888610363,
-0.038740374147892,
0.018386678770184517,
-0.3749556541442871,
-0.1474357545375824,
0.3403448760509491,
0.21513447165489197,
0.26627618074417114,
0.27069932222366333,
0.5616863369941711,
0.09117243438959122,
-0.07616247981786728,
0.030804160982370377,
-0.05580741912126541,
-0.001574118621647358,
-0.46264275908470154,
0.2433207482099533,
0.09893118590116501,
0.2934701442718506,
-0.23985853791236877,
-0.5455215573310852,
0.19244219362735748,
-0.028101101517677307,
0.09409554302692413,
0.1541178673505783,
0.3049503266811371,
0.022122062742710114,
0.20651817321777344,
0.07934718579053879,
0.19360806047916412,
-0.00917021930217743,
-0.11720536649227142,
-0.2069239616394043,
0.09760784357786179,
-0.20027904212474823,
-0.15010665357112885,
0.0502697229385376,
-0.072052501142025,
0.11244919896125793,
0.06405958533287048,
-0.0010050220880657434,
-0.07605667412281036,
-0.016303392127156258,
-0.38646429777145386,
-0.01274797786027193,
0.35889336466789246,
-0.10326334089040756,
0.42035040259361267,
0.25205424427986145,
-0.418550044298172,
0.059699349105358124,
0.18021109700202942,
-0.3688521087169647,
-0.03381352126598358,
-0.21215713024139404,
0.2862125635147095,
-0.10304385423660278,
-0.18798112869262695,
-0.12009162455797195,
0.0468238964676857,
0.41932007670402527,
-0.2145540416240692,
0.1575896143913269,
-0.3543839752674103,
-0.30932238698005676,
-0.2777700126171112,
-0.06630391627550125,
0.22143256664276123,
-0.6722468137741089,
0.004389546811580658,
-0.1475468873977661,
-0.02911280281841755,
0.05280671268701553,
0.29601922631263733,
-0.08100429177284241,
0.20629146695137024,
-0.07059191167354584,
0.030349701642990112,
0.13955116271972656,
-0.3906913101673126,
-0.1104636862874031,
0.10354377329349518,
-0.14200329780578613,
-0.24426409602165222,
0.0704808160662651,
-0.04033960774540901,
0.09173101931810379,
-0.0916263610124588,
0.05823206529021263,
-0.13187739253044128,
-0.1996321827173233,
-0.09513326734304428,
-0.14370395243167877,
0.05381122976541519,
0.6539093255996704,
0.0927329957485199,
-0.016800185665488243,
0.07564690709114075,
-0.10022872686386108,
-0.3448370695114136,
-0.042532313615083694,
-0.10095544904470444,
0.20621968805789948,
0.21479003131389618,
0.05564019829034805,
0.2983596920967102,
0.1459522843360901,
-0.06447026878595352,
-0.44249671697616577,
0.10170092433691025,
-0.04005155712366104,
0.139564648270607,
-0.14514318108558655,
-0.19234375655651093,
-0.3297649919986725,
-0.05378592014312744,
-0.20797628164291382,
0.01832389459013939,
0.16331332921981812,
0.06836079806089401,
-0.22142204642295837,
-0.020483320578932762,
0.014084305614233017,
-0.07588431239128113,
-0.017214002087712288,
0.10933052748441696,
-0.10402525961399078,
0.2656514644622803,
-0.09511606395244598,
0.11689403653144836,
-0.026739375665783882,
0.2531200349330902,
0.4326063096523285,
0.24005182087421417,
-0.046621520072221756,
0.3670240342617035,
0.08486083149909973,
-0.32702308893203735,
0.007840344682335854,
-0.17265833914279938,
0.018129494041204453,
-0.08387430757284164,
-0.016326790675520897,
0.1145247295498848,
0.2768394351005554,
-0.10859724879264832,
-0.08471960574388504,
0.1411859542131424,
-0.17720049619674683,
0.27628424763679504,
-0.16197456419467926,
0.20046064257621765,
0.25996309518814087,
-0.1093929260969162,
0.12512215971946716,
-0.21271125972270966,
0.21588090062141418,
-0.1297987848520279,
0.23431411385536194,
0.0071422867476940155,
-0.26171764731407166,
0.06771949678659439,
0.42205390334129333,
0.0015312876785174012,
-0.00352389644831419,
0.00977385975420475,
-0.1586681604385376,
0.16574639081954956,
-0.013017593882977962,
0.5957189798355103,
0.35284268856048584,
0.20595574378967285,
-0.16387562453746796,
-0.05826844274997711,
-0.2622588872909546,
-0.13698403537273407,
0.21246151626110077,
0.09510159492492676,
0.029852507635951042,
0.057296257466077805,
0.02611011639237404,
-0.06643901765346527,
-0.17657269537448883,
-0.24333888292312622,
0.20823118090629578,
0.34642988443374634,
-0.5103123188018799,
-0.0029064707923680544,
-0.34527283906936646,
-0.23186379671096802,
-0.31859728693962097,
-0.09879087656736374,
-0.2351587414741516,
-0.45904403924942017,
0.09043808281421661,
-0.07749143987894058,
-0.19039304554462433,
0.14507639408111572,
-0.037563882768154144,
0.007917581126093864,
-0.09107304364442825,
0.15205201506614685,
-0.09758397191762924,
-0.47024962306022644,
-0.20457139611244202,
0.1811123490333557,
0.007479986175894737,
0.04695321246981621,
0.48136013746261597,
-0.14319881796836853,
-0.12455569207668304,
-0.07857172936201096,
-0.29531702399253845,
0.004026516806334257,
-0.273065984249115,
0.1366041749715805,
0.18162274360656738,
0.1038593128323555,
0.008461663499474525,
-0.14868468046188354,
0.2930161654949188,
-0.07151962071657181,
0.024640154093503952,
0.10695717483758926,
0.045233163982629776,
-0.29207339882850647,
-0.26646992564201355,
-0.47501954436302185,
-0.47453007102012634,
-0.17748183012008667,
0.06694811582565308,
-0.07590831816196442,
-0.0335286445915699,
0.5198025703430176,
0.06844212859869003,
0.06568100303411484,
0.09314499795436859,
0.023252936080098152,
-0.34674352407455444,
-0.09354056417942047,
0.24904774129390717,
-0.17909182608127594,
-0.21024540066719055,
0.1960572600364685,
0.10930954664945602,
0.11752841621637344,
-0.2039329558610916,
-0.3139224648475647,
0.07286287099123001,
-0.05760139226913452,
0.05894460529088974,
0.0813102275133133,
0.19489642977714539,
0.21388272941112518,
0.26710212230682373,
-0.148003488779068,
-0.32705122232437134,
-0.33171188831329346,
0.13817338645458221,
-0.07196802645921707,
0.13063539564609528,
-0.10625577718019485,
0.2940855622291565,
-0.15208424627780914,
0.32650870084762573,
0.02177213691174984,
-0.21265599131584167,
0.19188879430294037,
-0.04784765839576721,
0.5207322835922241,
0.06838060170412064,
-0.4193747341632843,
0.06588514894247055,
-0.11910711973905563,
0.02694641798734665,
0.17604288458824158,
-0.31963908672332764,
0.03795626014471054,
-0.14796802401542664,
0.39460447430610657,
-0.24780505895614624,
-0.09965691715478897,
-0.10064268857240677,
-0.15016862750053406,
0.040526945143938065,
0.11690041422843933,
-0.04097527265548706,
-0.2084079086780548,
-0.19158485531806946,
-0.2512802183628082,
0.05782405287027359,
-0.09546123445034027,
-0.08755175024271011,
-0.5335749983787537,
-0.23349899053573608,
-0.1649959832429886,
0.29409846663475037,
0.15745101869106293,
0.33466413617134094,
-0.17851713299751282,
0.24547159671783447,
0.047758590430021286,
0.24589969217777252,
0.6149811148643494,
-0.4832390546798706,
0.15470227599143982,
0.22637194395065308,
0.3931273818016052,
-0.17800158262252808,
-0.12725535035133362,
-0.16925735771656036,
0.29472610354423523,
-0.29577744007110596,
0.025988830253481865,
-0.15553432703018188,
-0.09107692539691925,
0.26310059428215027,
0.15540583431720734,
-0.12238035351037979,
-0.31498029828071594,
-0.23095160722732544,
-0.1793929785490036,
-0.12728528678417206,
-0.053396809846162796,
0.06357715278863907,
0.18663805723190308,
-0.37848716974258423,
0.09864776581525803,
0.14082369208335876,
0.0735073834657669,
0.2715045213699341,
0.1186351478099823,
0.22324301302433014,
0.03027692809700966,
0.19736146926879883,
0.3174023926258087,
0.2587256133556366,
0.5099826455116272,
0.5483978390693665,
-0.3618466854095459,
-0.5113290548324585,
-0.11947869509458542,
-0.11476928740739822,
0.2007075846195221,
0.06500115245580673,
-0.14221520721912384,
0.1660955846309662,
-0.050639908760786057,
0.1854587346315384,
0.09619783610105515,
0.022307993844151497,
0.4922949969768524,
0.16057652235031128,
-0.48984798789024353,
-0.5388930439949036,
0.27135899662971497,
0.03924155607819557,
-0.04784061759710312,
0.12815535068511963,
0.07973218709230423,
-0.3407573103904724,
0.2059527039527893,
-0.15599367022514343,
0.6908730864524841,
0.0837978795170784,
-0.051030512899160385,
-0.01703108288347721,
-0.22617307305335999,
0.7132235765457153,
-0.11871161311864853,
0.0007718639681115746,
-0.3614291846752167,
-0.3074661195278168,
-0.06222986429929733,
-0.02211889624595642,
0.023474834859371185,
0.4506933391094208,
-0.30857908725738525,
0.3788377046585083,
-0.3285132050514221,
0.2046867161989212,
0.028749993070960045,
-0.0740615576505661,
0.2494397759437561,
-0.13231386244297028,
-0.08248619735240936,
0.20103396475315094,
-0.15761911869049072,
-0.13437563180923462,
-0.16743485629558563,
0.04190551117062569,
-0.23184852302074432,
-0.268060564994812,
-0.22626028954982758,
0.08226071298122406,
-0.2538246810436249,
0.14157825708389282,
-0.085654117166996,
-0.016719289124011993,
0.21681153774261475,
0.20250990986824036,
0.48632189631462097,
0.0789240300655365,
-0.1482863575220108,
0.18389566242694855,
0.04214852675795555,
0.1370234340429306,
0.03434861823916435,
0.05374675244092941,
0.41506227850914,
0.11604964733123779,
-0.2699809670448303,
0.1285303235054016,
-0.07956726104021072,
0.17594987154006958,
-0.08703131973743439,
0.08389434963464737,
-0.09839735180139542,
-0.3653748333454132,
0.032647598534822464,
-0.07703867554664612,
0.2287106066942215,
-0.2537734806537628,
0.1773461103439331,
0.05198271945118904,
-0.046680185943841934,
0.21207912266254425,
-0.2636915147304535,
-0.14659744501113892,
-0.04574663192033768,
0.18923304975032806,
0.02596413902938366,
0.19335642457008362,
0.24724461138248444,
0.025973347947001457,
-0.3513919413089752,
-0.2565113604068756,
0.03895195946097374,
0.02399943582713604,
-0.6778354048728943,
0.24598249793052673,
0.25335440039634705,
0.07594557106494904,
-0.057189229875802994,
0.2232683151960373,
-0.015830159187316895,
0.07108484953641891,
0.06101395562291145,
-0.5274380445480347,
-0.21865008771419525,
-0.004670436959713697,
-0.18475468456745148,
0.11692999303340912,
0.24786525964736938,
0.4110047519207001,
0.13375753164291382,
0.07145018875598907,
-0.3641543686389923,
-0.020954042673110962,
-0.1723940074443817,
0.29801276326179504,
0.1525106281042099,
0.01996106095612049,
0.28203141689300537,
-0.17880649864673615,
0.21821686625480652,
0.0007438941393047571,
0.007750352844595909,
-0.24981847405433655,
-0.18720929324626923,
0.11241060495376587,
0.13520921766757965,
-0.19721588492393494,
-0.06341143697500229,
-0.16438139975070953,
0.057836856693029404,
-0.07198397815227509,
-0.01725105755031109,
0.3105736970901489,
0.0032079345546662807,
0.3735309839248657,
-0.1509217470884323,
0.23278465867042542,
-0.046329841017723083,
0.21827781200408936,
0.012717180885374546,
-0.11400148272514343,
0.07424529641866684,
0.17296549677848816,
-0.1127648875117302,
0.01947791315615177,
-0.17507940530776978,
0.08479494601488113,
-0.11700500547885895,
-0.1179296150803566,
0.1342935413122177,
-0.5689804553985596,
0.2959565222263336,
0.19363801181316376,
0.44936269521713257,
0.27813720703125,
-0.18682560324668884,
-0.0707663968205452,
0.38260918855667114,
0.3079267740249634,
-0.36566975712776184,
-0.16835995018482208,
0.1630018949508667,
0.16556130349636078,
0.0003904930781573057,
0.07560741901397705,
0.06072523817420006,
-0.031059928238391876,
0.044892843812704086,
0.008086008951067924,
0.4554387927055359,
-0.4376547038555145,
0.23490537703037262,
0.5269825458526611,
-0.061971064656972885,
0.09998418390750885,
0.4967944622039795,
0.17317654192447662,
0.0635330006480217,
0.5881980657577515,
0.03465026989579201,
0.17732077836990356,
0.1874702125787735,
-0.13796019554138184,
-0.07542061060667038,
-0.17221730947494507,
0.1809183806180954,
0.09697239845991135,
0.018856609240174294,
-0.042831312865018845,
-0.0954478457570076,
0.3011341989040375,
-0.38394567370414734,
0.004110394511371851,
-0.005768762901425362,
0.11119665205478668,
-0.22550338506698608,
-0.106015644967556,
-0.15626294910907745,
-0.09870976209640503,
-0.16644608974456787,
-0.19731606543064117,
0.014027981087565422,
-0.17005053162574768,
0.3556353747844696,
-0.07428083568811417,
-0.19596435129642487,
-0.45658138394355774,
-0.1867782324552536,
0.3054196536540985,
0.06508152186870575,
-0.24730956554412842,
0.016319898888468742,
0.2487560212612152,
-0.1455007642507553,
0.3213774859905243,
0.08623956143856049,
0.6039386987686157,
0.17137542366981506,
0.0897911787033081,
-0.34109172224998474,
-0.09729502350091934,
-0.08858026564121246,
0.15166328847408295,
0.21556809544563293,
0.04592103138566017,
-0.036833956837654114,
0.3922654986381531,
0.20187819004058838,
-0.17074932157993317,
0.3085803985595703,
0.33574238419532776,
0.2227042317390442,
-0.17061945796012878,
-0.0630669817328453,
-0.1339656412601471,
-0.2573544979095459,
-0.32663965225219727,
0.10131869465112686,
-0.26979494094848633,
0.11595753580331802,
0.4622560143470764,
-0.04151366278529167,
0.08409026265144348,
-0.2942292392253876,
0.14628008008003235,
0.13171041011810303,
0.311890184879303,
0.27394425868988037,
-0.04762457683682442,
-0.3456506133079529,
0.16157123446464539,
-0.5773794054985046,
0.12946027517318726,
-0.1186995655298233,
-0.11469240486621857,
-0.033454012125730515,
-0.15822313725948334,
0.15932197868824005,
0.020614948123693466,
0.38295018672943115,
0.18881821632385254,
-0.015939833596348763,
-0.10867761075496674,
-0.1195140853524208,
-0.19319865107536316,
-0.08259912580251694,
-0.12190110981464386,
0.2010165899991989,
-0.3226902186870575,
-0.061835866421461105,
-0.1457766592502594,
0.03897590935230255,
-0.34980833530426025,
0.09371425211429596,
0.1062968522310257,
-0.020189348608255386,
0.36031776666641235,
0.1459479033946991,
0.7699722647666931,
0.04881495237350464,
0.1150306761264801,
-0.09138786792755127,
-0.35364916920661926,
-0.404243141412735,
0.36886903643608093,
0.3255910575389862,
0.25653600692749023,
-0.10637737810611725,
0.009763987734913826,
-0.16448278725147247,
0.09450659155845642,
-0.04354657232761383,
0.32114851474761963,
-0.2544762194156647,
0.21450477838516235,
-0.024010805413126945,
0.01713998056948185,
0.09913121163845062,
-0.05562575161457062,
-0.002646799897775054,
0.3410545289516449,
-0.2067563533782959,
-0.604709804058075,
0.6198092103004456,
-0.21293136477470398,
-0.23955528438091278,
0.1537303924560547,
0.15452565252780914,
0.22137925028800964,
-0.2187478393316269,
-0.5100530982017517,
0.02474985457956791,
0.3773825168609619,
0.019003786146640778,
-0.4423445463180542,
-0.0037065274082124233,
-0.19275739789009094,
0.051443908363580704,
0.11356008797883987,
0.30625423789024353,
0.1166287362575531,
-0.1932860165834427,
0.19910483062267303,
-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.17891450226306915,
-0.05732319876551628,
0.005179460160434246,
0.1343672275543213,
0.4113537073135376,
0.3502123951911926,
0.6419944763183594,
0.16370762884616852,
-0.16131749749183655,
0.07234954833984375,
0.17885442078113556,
0.06387543678283691,
-0.060773108154535294,
0.03052571415901184,
-0.1302308738231659,
-0.11937060952186584,
0.08908388763666153,
0.1734791398048401,
0.18164238333702087,
-0.0444667711853981,
-0.2867427170276642,
-0.03982594236731529,
-0.1566799134016037,
0.3662884831428528,
-0.2972055673599243,
-0.37668392062187195,
0.2105434089899063,
-0.12052837759256363,
-0.11313314735889435,
-0.46339529752731323,
0.27180954813957214,
0.08612008392810822,
0.0026802513748407364,
0.4034269154071808,
-0.00010309630306437612,
0.05875676870346069,
0.2967478036880493,
0.1559891402721405,
-0.39840781688690186,
-0.43212831020355225,
-0.18936000764369965,
-0.023407861590385437,
0.03456372022628784,
-0.304476797580719,
0.09798327833414078,
-0.2846681475639343,
-0.09054117649793625,
-0.27566608786582947,
0.10468639433383942,
0.4386059045791626,
0.32663995027542114,
0.23733948171138763,
-0.2064998298883438,
-0.22930341958999634,
0.23115266859531403,
0.1250884085893631,
-0.03050871379673481,
0.0494752936065197,
-0.13443879783153534,
-0.0064585269428789616,
0.4515703618526459,
0.4609145224094391,
-0.27239561080932617,
0.2647712230682373,
0.13536487519741058,
0.14636334776878357,
0.13772478699684143,
-0.3910481035709381,
0.2763094902038574,
0.1961432248353958,
0.74526047706604,
-0.2964995503425598,
-0.2943911552429199,
-0.16970524191856384,
0.13737638294696808,
-0.4167192578315735,
0.18133898079395294,
0.07008319348096848,
0.006375689525157213,
-0.04701511934399605,
-0.03316250815987587,
0.06102722883224487,
0.08074197173118591,
0.08818031847476959,
-0.058075059205293655,
0.038328465074300766,
-0.09864160418510437,
0.3288167715072632,
0.11253046244382858,
-0.07475090771913528,
0.2975304424762726,
-0.0059941355139017105,
-0.08857018500566483,
0.041544560343027115,
-0.4325242340564728,
-0.02960842475295067,
-0.03688057139515877,
0.051676034927368164,
-0.118137888610363,
-0.038740374147892,
0.018386678770184517,
-0.3749556541442871,
-0.1474357545375824,
0.3403448760509491,
0.21513447165489197,
0.26627618074417114,
0.27069932222366333,
0.5616863369941711,
0.09117243438959122,
-0.07616247981786728,
0.030804160982370377,
-0.05580741912126541,
-0.001574118621647358,
-0.46264275908470154,
0.2433207482099533,
0.09893118590116501,
0.2934701442718506,
-0.23985853791236877,
-0.5455215573310852,
0.19244219362735748,
-0.028101101517677307,
0.09409554302692413,
0.1541178673505783,
0.3049503266811371,
0.022122062742710114,
0.20651817321777344,
0.07934718579053879,
0.19360806047916412,
-0.00917021930217743,
-0.11720536649227142,
-0.2069239616394043,
0.09760784357786179,
-0.20027904212474823,
-0.15010665357112885,
0.0502697229385376,
-0.072052501142025,
0.11244919896125793,
0.06405958533287048,
-0.0010050220880657434,
-0.07605667412281036,
-0.016303392127156258,
-0.38646429777145386,
-0.01274797786027193,
0.35889336466789246,
-0.10326334089040756,
0.42035040259361267,
0.25205424427986145,
-0.418550044298172,
0.059699349105358124,
0.18021109700202942,
-0.3688521087169647,
-0.03381352126598358,
-0.21215713024139404,
0.2862125635147095,
-0.10304385423660278,
-0.18798112869262695,
-0.12009162455797195,
0.0468238964676857,
0.41932007670402527,
-0.2145540416240692,
0.1575896143913269,
-0.3543839752674103,
-0.30932238698005676,
-0.2777700126171112,
-0.06630391627550125,
0.22143256664276123,
-0.6722468137741089,
0.004389546811580658,
-0.1475468873977661,
-0.02911280281841755,
0.05280671268701553,
0.29601922631263733,
-0.08100429177284241,
0.20629146695137024,
-0.07059191167354584,
0.030349701642990112,
0.13955116271972656,
-0.3906913101673126,
-0.1104636862874031,
0.10354377329349518,
-0.14200329780578613,
-0.24426409602165222,
0.0704808160662651,
-0.04033960774540901,
0.09173101931810379,
-0.0916263610124588,
0.05823206529021263,
-0.13187739253044128,
-0.1996321827173233,
-0.09513326734304428,
-0.14370395243167877,
0.05381122976541519,
0.6539093255996704,
0.0927329957485199,
-0.016800185665488243,
0.07564690709114075,
-0.10022872686386108,
-0.3448370695114136,
-0.042532313615083694,
-0.10095544904470444,
0.20621968805789948,
0.21479003131389618,
0.05564019829034805,
0.2983596920967102,
0.1459522843360901,
-0.06447026878595352,
-0.44249671697616577,
0.10170092433691025,
-0.04005155712366104,
0.139564648270607,
-0.14514318108558655,
-0.19234375655651093,
-0.3297649919986725,
-0.05378592014312744,
-0.20797628164291382,
0.01832389459013939,
0.16331332921981812,
0.06836079806089401,
-0.22142204642295837,
-0.020483320578932762,
0.014084305614233017,
-0.07588431239128113,
-0.017214002087712288,
0.10933052748441696,
-0.10402525961399078,
0.2656514644622803,
-0.09511606395244598,
0.11689403653144836,
-0.026739375665783882,
0.2531200349330902,
0.4326063096523285,
0.24005182087421417,
-0.046621520072221756,
0.3670240342617035,
0.08486083149909973,
-0.32702308893203735,
0.007840344682335854,
-0.17265833914279938,
0.018129494041204453,
-0.08387430757284164,
-0.016326790675520897,
0.1145247295498848,
0.2768394351005554,
-0.10859724879264832,
-0.08471960574388504,
0.1411859542131424,
-0.17720049619674683,
0.27628424763679504,
-0.16197456419467926,
0.20046064257621765,
0.25996309518814087,
-0.1093929260969162,
0.12512215971946716,
-0.21271125972270966,
0.21588090062141418,
-0.1297987848520279,
0.23431411385536194,
0.0071422867476940155,
-0.26171764731407166,
0.06771949678659439,
0.42205390334129333,
0.0015312876785174012,
-0.00352389644831419,
0.00977385975420475,
-0.1586681604385376,
0.16574639081954956,
-0.013017593882977962,
0.5957189798355103,
0.35284268856048584,
0.20595574378967285,
-0.16387562453746796,
-0.05826844274997711,
-0.2622588872909546,
-0.13698403537273407,
0.21246151626110077,
0.09510159492492676,
0.029852507635951042,
0.057296257466077805,
0.02611011639237404,
-0.06643901765346527,
-0.17657269537448883,
-0.24333888292312622,
0.20823118090629578,
0.34642988443374634,
-0.5103123188018799,
-0.0029064707923680544,
-0.34527283906936646,
-0.23186379671096802,
-0.31859728693962097,
-0.09879087656736374,
-0.2351587414741516,
-0.45904403924942017,
0.09043808281421661,
-0.07749143987894058,
-0.19039304554462433,
0.14507639408111572,
-0.037563882768154144,
0.007917581126093864,
-0.09107304364442825,
0.15205201506614685,
-0.09758397191762924,
-0.47024962306022644,
-0.20457139611244202,
0.1811123490333557,
0.007479986175894737,
0.04695321246981621,
0.48136013746261597,
-0.14319881796836853,
-0.12455569207668304,
-0.07857172936201096,
-0.29531702399253845,
0.004026516806334257,
-0.273065984249115,
0.1366041749715805,
0.18162274360656738,
0.1038593128323555,
0.008461663499474525,
-0.14868468046188354,
0.2930161654949188,
-0.07151962071657181,
0.024640154093503952,
0.10695717483758926,
0.045233163982629776,
-0.29207339882850647,
-0.26646992564201355,
-0.47501954436302185,
-0.47453007102012634,
-0.17748183012008667,
0.06694811582565308,
-0.07590831816196442,
-0.0335286445915699,
0.5198025703430176,
0.06844212859869003,
0.06568100303411484,
0.09314499795436859,
0.023252936080098152,
-0.34674352407455444,
-0.09354056417942047,
0.24904774129390717,
-0.17909182608127594,
-0.21024540066719055,
0.1960572600364685,
0.10930954664945602,
0.11752841621637344,
-0.2039329558610916,
-0.3139224648475647,
0.07286287099123001,
-0.05760139226913452,
0.05894460529088974,
0.0813102275133133,
0.19489642977714539,
0.21388272941112518,
0.26710212230682373,
-0.148003488779068,
-0.32705122232437134,
-0.33171188831329346,
0.13817338645458221,
-0.07196802645921707,
0.13063539564609528,
-0.10625577718019485,
0.2940855622291565,
-0.15208424627780914,
0.32650870084762573,
0.02177213691174984,
-0.21265599131584167,
0.19188879430294037,
-0.04784765839576721,
0.5207322835922241,
0.06838060170412064,
-0.4193747341632843,
0.06588514894247055,
-0.11910711973905563,
0.02694641798734665,
0.17604288458824158,
-0.31963908672332764,
0.03795626014471054,
-0.14796802401542664,
0.39460447430610657,
-0.24780505895614624,
-0.09965691715478897,
-0.10064268857240677,
-0.15016862750053406,
0.040526945143938065,
0.11690041422843933,
-0.04097527265548706,
-0.2084079086780548,
-0.19158485531806946,
-0.2512802183628082,
0.05782405287027359,
-0.09546123445034027,
-0.08755175024271011,
-0.5335749983787537,
-0.23349899053573608,
-0.1649959832429886,
0.29409846663475037,
0.15745101869106293,
0.33466413617134094,
-0.17851713299751282,
0.24547159671783447,
0.047758590430021286,
0.24589969217777252,
0.6149811148643494,
-0.4832390546798706,
0.15470227599143982,
0.22637194395065308,
0.3931273818016052,
-0.17800158262252808,
-0.12725535035133362,
-0.16925735771656036,
0.29472610354423523,
-0.29577744007110596,
0.025988830253481865,
-0.15553432703018188,
-0.09107692539691925,
0.26310059428215027,
0.15540583431720734,
-0.12238035351037979,
-0.31498029828071594,
-0.23095160722732544,
-0.1793929785490036,
-0.12728528678417206,
-0.053396809846162796,
0.06357715278863907,
0.18663805723190308,
-0.37848716974258423,
0.09864776581525803,
0.14082369208335876,
0.0735073834657669,
0.2715045213699341,
0.1186351478099823,
0.22324301302433014,
0.03027692809700966,
0.19736146926879883,
0.3174023926258087,
0.2587256133556366,
0.5099826455116272,
0.5483978390693665,
-0.3618466854095459,
-0.5113290548324585,
-0.11947869509458542,
-0.11476928740739822,
0.2007075846195221,
0.06500115245580673,
-0.14221520721912384,
0.1660955846309662,
-0.050639908760786057,
0.1854587346315384,
0.09619783610105515,
0.022307993844151497,
0.4922949969768524,
0.16057652235031128,
-0.48984798789024353,
-0.5388930439949036,
0.27135899662971497,
0.03924155607819557,
-0.04784061759710312,
0.12815535068511963,
0.07973218709230423,
-0.3407573103904724,
0.2059527039527893,
-0.15599367022514343,
0.6908730864524841,
0.0837978795170784,
-0.051030512899160385,
-0.01703108288347721,
-0.22617307305335999,
0.7132235765457153,
-0.11871161311864853,
0.0007718639681115746,
-0.3614291846752167,
-0.3074661195278168,
-0.06222986429929733,
-0.02211889624595642,
0.023474834859371185,
0.4506933391094208,
-0.30857908725738525,
0.3788377046585083,
-0.3285132050514221,
0.2046867161989212,
0.028749993070960045,
-0.0740615576505661,
0.2494397759437561,
-0.13231386244297028,
-0.08248619735240936,
0.20103396475315094,
-0.15761911869049072,
-0.13437563180923462,
-0.16743485629558563,
0.04190551117062569,
-0.23184852302074432,
-0.268060564994812,
-0.22626028954982758,
0.08226071298122406,
-0.2538246810436249,
0.14157825708389282,
-0.085654117166996,
-0.016719289124011993,
0.21681153774261475,
0.20250990986824036,
0.48632189631462097,
0.0789240300655365,
-0.1482863575220108,
0.18389566242694855,
0.04214852675795555,
0.1370234340429306,
0.03434861823916435,
0.05374675244092941,
0.41506227850914,
0.11604964733123779,
-0.2699809670448303,
0.1285303235054016,
-0.07956726104021072,
0.17594987154006958,
-0.08703131973743439,
0.08389434963464737,
-0.09839735180139542,
-0.3653748333454132,
0.032647598534822464,
-0.07703867554664612,
0.2287106066942215,
-0.2537734806537628,
0.1773461103439331,
0.05198271945118904,
-0.046680185943841934,
0.21207912266254425,
-0.2636915147304535,
-0.14659744501113892,
-0.04574663192033768,
0.18923304975032806,
0.02596413902938366,
0.19335642457008362,
0.24724461138248444,
0.025973347947001457,
-0.3513919413089752,
-0.2565113604068756,
0.03895195946097374,
0.02399943582713604,
-0.6778354048728943,
0.24598249793052673,
0.25335440039634705,
0.07594557106494904,
-0.057189229875802994,
0.2232683151960373,
-0.015830159187316895,
0.07108484953641891,
0.06101395562291145,
-0.5274380445480347,
-0.21865008771419525,
-0.004670436959713697,
-0.18475468456745148,
0.11692999303340912,
0.24786525964736938,
0.4110047519207001,
0.13375753164291382,
0.07145018875598907,
-0.3641543686389923,
-0.020954042673110962,
-0.1723940074443817,
0.29801276326179504,
0.1525106281042099,
0.01996106095612049,
0.28203141689300537,
-0.17880649864673615,
0.21821686625480652,
0.0007438941393047571,
0.007750352844595909,
-0.24981847405433655,
-0.18720929324626923,
0.11241060495376587,
0.13520921766757965,
-0.19721588492393494,
-0.06341143697500229,
-0.16438139975070953,
0.057836856693029404,
-0.07198397815227509,
-0.01725105755031109,
0.3105736970901489,
0.0032079345546662807,
0.3735309839248657,
-0.1509217470884323,
0.23278465867042542,
-0.046329841017723083,
0.21827781200408936,
0.012717180885374546,
-0.11400148272514343,
0.07424529641866684,
0.17296549677848816,
-0.1127648875117302,
0.01947791315615177,
-0.17507940530776978,
0.08479494601488113,
-0.11700500547885895,
-0.1179296150803566,
0.1342935413122177,
-0.5689804553985596,
0.2959565222263336,
0.19363801181316376,
0.44936269521713257,
0.27813720703125,
-0.18682560324668884,
-0.0707663968205452,
0.38260918855667114,
0.3079267740249634,
-0.36566975712776184,
-0.16835995018482208,
0.1630018949508667,
0.16556130349636078,
0.0003904930781573057,
0.07560741901397705,
0.06072523817420006,
-0.031059928238391876,
0.044892843812704086,
0.008086008951067924,
0.4554387927055359,
-0.4376547038555145,
0.23490537703037262,
0.5269825458526611,
-0.061971064656972885,
0.09998418390750885,
0.4967944622039795,
0.17317654192447662,
0.0635330006480217,
0.5881980657577515,
0.03465026989579201,
0.17732077836990356,
0.1874702125787735,
-0.13796019554138184,
-0.07542061060667038,
-0.17221730947494507,
0.1809183806180954,
0.09697239845991135,
0.018856609240174294,
-0.042831312865018845,
-0.0954478457570076,
0.3011341989040375,
-0.38394567370414734,
0.004110394511371851,
-0.005768762901425362,
0.11119665205478668,
-0.22550338506698608,
-0.106015644967556,
-0.15626294910907745,
-0.09870976209640503,
-0.16644608974456787,
-0.19731606543064117,
0.014027981087565422,
-0.17005053162574768,
0.3556353747844696,
-0.07428083568811417,
-0.19596435129642487,
-0.45658138394355774,
-0.1867782324552536,
0.3054196536540985,
0.06508152186870575,
-0.24730956554412842,
0.016319898888468742,
0.2487560212612152,
-0.1455007642507553,
0.3213774859905243,
0.08623956143856049,
0.6039386987686157,
0.17137542366981506,
0.0897911787033081,
-0.34109172224998474,
-0.09729502350091934,
-0.08858026564121246,
0.15166328847408295,
0.21556809544563293,
0.04592103138566017,
-0.036833956837654114,
0.3922654986381531,
0.20187819004058838,
-0.17074932157993317,
0.3085803985595703,
0.33574238419532776,
0.2227042317390442,
-0.17061945796012878,
-0.0630669817328453,
-0.1339656412601471,
-0.2573544979095459,
-0.32663965225219727,
0.10131869465112686,
-0.26979494094848633,
0.11595753580331802,
0.4622560143470764,
-0.04151366278529167,
0.08409026265144348,
-0.2942292392253876,
0.14628008008003235,
0.13171041011810303,
0.311890184879303,
0.27394425868988037,
-0.04762457683682442,
-0.3456506133079529,
0.16157123446464539,
-0.5773794054985046,
0.12946027517318726,
-0.1186995655298233,
-0.11469240486621857,
-0.033454012125730515,
-0.15822313725948334,
0.15932197868824005,
0.020614948123693466,
0.38295018672943115,
0.18881821632385254,
-0.015939833596348763,
-0.10867761075496674,
-0.1195140853524208,
-0.19319865107536316,
-0.08259912580251694,
-0.12190110981464386,
0.2010165899991989,
-0.3226902186870575,
-0.061835866421461105,
-0.1457766592502594,
0.03897590935230255,
-0.34980833530426025,
0.09371425211429596,
0.1062968522310257,
-0.020189348608255386,
0.36031776666641235,
0.1459479033946991,
0.7699722647666931,
0.04881495237350464,
0.1150306761264801,
-0.09138786792755127,
-0.35364916920661926,
-0.404243141412735,
0.36886903643608093,
0.3255910575389862,
0.25653600692749023,
-0.10637737810611725,
0.009763987734913826,
-0.16448278725147247,
0.09450659155845642,
-0.04354657232761383,
0.32114851474761963,
-0.2544762194156647,
0.21450477838516235,
-0.024010805413126945,
0.01713998056948185,
0.09913121163845062,
-0.05562575161457062,
-0.002646799897775054,
0.3410545289516449,
-0.2067563533782959,
-0.604709804058075,
0.6198092103004456,
-0.21293136477470398,
-0.23955528438091278,
0.1537303924560547,
0.15452565252780914,
0.22137925028800964,
-0.2187478393316269,
-0.5100530982017517,
0.02474985457956791,
0.3773825168609619,
0.019003786146640778,
-0.4423445463180542,
-0.0037065274082124233,
-0.19275739789009094,
0.051443908363580704,
0.11356008797883987,
0.30625423789024353,
0.1166287362575531,
-0.1932860165834427,
0.19910483062267303,
-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.17891450226306915,
-0.05732319876551628,
0.005179460160434246,
0.1343672275543213,
0.4113537073135376,
0.3502123951911926,
0.6419944763183594,
0.16370762884616852,
-0.16131749749183655,
0.07234954833984375,
0.17885442078113556,
0.06387543678283691,
-0.060773108154535294,
0.03052571415901184,
-0.1302308738231659,
-0.11937060952186584,
0.08908388763666153,
0.1734791398048401,
0.18164238333702087,
-0.0444667711853981,
-0.2867427170276642,
-0.03982594236731529,
-0.1566799134016037,
0.3662884831428528,
-0.2972055673599243,
-0.37668392062187195,
0.2105434089899063,
-0.12052837759256363,
-0.11313314735889435,
-0.46339529752731323,
0.27180954813957214,
0.08612008392810822,
0.0026802513748407364,
0.4034269154071808,
-0.00010309630306437612,
0.05875676870346069,
0.2967478036880493,
0.1559891402721405,
-0.39840781688690186,
-0.43212831020355225,
-0.18936000764369965,
-0.023407861590385437,
0.03456372022628784,
-0.304476797580719,
0.09798327833414078,
-0.2846681475639343,
-0.09054117649793625,
-0.27566608786582947,
0.10468639433383942,
0.4386059045791626,
0.32663995027542114,
0.23733948171138763,
-0.2064998298883438,
-0.22930341958999634,
0.23115266859531403,
0.1250884085893631,
-0.03050871379673481,
0.0494752936065197,
-0.13443879783153534,
-0.0064585269428789616,
0.4515703618526459,
0.4609145224094391,
-0.27239561080932617,
0.2647712230682373,
0.13536487519741058,
0.14636334776878357,
0.13772478699684143,
-0.3910481035709381,
0.2763094902038574,
0.1961432248353958,
0.74526047706604,
-0.2964995503425598,
-0.2943911552429199,
-0.16970524191856384,
0.13737638294696808,
-0.4167192578315735,
0.18133898079395294,
0.07008319348096848,
0.006375689525157213,
-0.04701511934399605,
-0.03316250815987587,
0.06102722883224487,
0.08074197173118591,
0.08818031847476959,
-0.058075059205293655,
0.038328465074300766,
-0.09864160418510437,
0.3288167715072632,
0.11253046244382858,
-0.07475090771913528,
0.2975304424762726,
-0.0059941355139017105,
-0.08857018500566483,
0.041544560343027115,
-0.4325242340564728,
-0.02960842475295067,
-0.03688057139515877,
0.051676034927368164,
-0.118137888610363,
-0.038740374147892,
0.018386678770184517,
-0.3749556541442871,
-0.1474357545375824,
0.3403448760509491,
0.21513447165489197,
0.26627618074417114,
0.27069932222366333,
0.5616863369941711,
0.09117243438959122,
-0.07616247981786728,
0.030804160982370377,
-0.05580741912126541,
-0.001574118621647358,
-0.46264275908470154,
0.2433207482099533,
0.09893118590116501,
0.2934701442718506,
-0.23985853791236877,
-0.5455215573310852,
0.19244219362735748,
-0.028101101517677307,
0.09409554302692413,
0.1541178673505783,
0.3049503266811371,
0.022122062742710114,
0.20651817321777344,
0.07934718579053879,
0.19360806047916412,
-0.00917021930217743,
-0.11720536649227142,
-0.2069239616394043,
0.09760784357786179,
-0.20027904212474823,
-0.15010665357112885,
0.0502697229385376,
-0.072052501142025,
0.11244919896125793,
0.06405958533287048,
-0.0010050220880657434,
-0.07605667412281036,
-0.016303392127156258,
-0.38646429777145386,
-0.01274797786027193,
0.35889336466789246,
-0.10326334089040756,
0.42035040259361267,
0.25205424427986145,
-0.418550044298172,
0.059699349105358124,
0.18021109700202942,
-0.3688521087169647,
-0.03381352126598358,
-0.21215713024139404,
0.2862125635147095,
-0.10304385423660278,
-0.18798112869262695,
-0.12009162455797195,
0.0468238964676857,
0.41932007670402527,
-0.2145540416240692,
0.1575896143913269,
-0.3543839752674103,
-0.30932238698005676,
-0.2777700126171112,
-0.06630391627550125,
0.22143256664276123,
-0.6722468137741089,
0.004389546811580658,
-0.1475468873977661,
-0.02911280281841755,
0.05280671268701553,
0.29601922631263733,
-0.08100429177284241,
0.20629146695137024,
-0.07059191167354584,
0.030349701642990112,
0.13955116271972656,
-0.3906913101673126,
-0.1104636862874031,
0.10354377329349518,
-0.14200329780578613,
-0.24426409602165222,
0.0704808160662651,
-0.04033960774540901,
0.09173101931810379,
-0.0916263610124588,
0.05823206529021263,
-0.13187739253044128,
-0.1996321827173233,
-0.09513326734304428,
-0.14370395243167877,
0.05381122976541519,
0.6539093255996704,
0.0927329957485199,
-0.016800185665488243,
0.07564690709114075,
-0.10022872686386108,
-0.3448370695114136,
-0.042532313615083694,
-0.10095544904470444,
0.20621968805789948,
0.21479003131389618,
0.05564019829034805,
0.2983596920967102,
0.1459522843360901,
-0.06447026878595352,
-0.44249671697616577,
0.10170092433691025,
-0.04005155712366104,
0.139564648270607,
-0.14514318108558655,
-0.19234375655651093,
-0.3297649919986725,
-0.05378592014312744,
-0.20797628164291382,
0.01832389459013939,
0.16331332921981812,
0.06836079806089401,
-0.22142204642295837,
-0.020483320578932762,
0.014084305614233017,
-0.07588431239128113,
-0.017214002087712288,
0.10933052748441696,
-0.10402525961399078,
0.2656514644622803,
-0.09511606395244598,
0.11689403653144836,
-0.026739375665783882,
0.2531200349330902,
0.4326063096523285,
0.24005182087421417,
-0.046621520072221756,
0.3670240342617035,
0.08486083149909973,
-0.32702308893203735,
0.007840344682335854,
-0.17265833914279938,
0.018129494041204453,
-0.08387430757284164,
-0.016326790675520897,
0.1145247295498848,
0.2768394351005554,
-0.10859724879264832,
-0.08471960574388504,
0.1411859542131424,
-0.17720049619674683,
0.27628424763679504,
-0.16197456419467926,
0.20046064257621765,
0.25996309518814087,
-0.1093929260969162,
0.12512215971946716,
-0.21271125972270966,
0.21588090062141418,
-0.1297987848520279,
0.23431411385536194,
0.0071422867476940155,
-0.26171764731407166,
0.06771949678659439,
0.42205390334129333,
0.0015312876785174012,
-0.00352389644831419,
0.00977385975420475,
-0.1586681604385376,
0.16574639081954956,
-0.013017593882977962,
0.5957189798355103,
0.35284268856048584,
0.20595574378967285,
-0.16387562453746796,
-0.05826844274997711,
-0.2622588872909546,
-0.13698403537273407,
0.21246151626110077,
0.09510159492492676,
0.029852507635951042,
0.057296257466077805,
0.02611011639237404,
-0.06643901765346527,
-0.17657269537448883,
-0.24333888292312622,
0.20823118090629578,
0.34642988443374634,
-0.5103123188018799,
-0.0029064707923680544,
-0.34527283906936646,
-0.23186379671096802,
-0.31859728693962097,
-0.09879087656736374,
-0.2351587414741516,
-0.45904403924942017,
0.09043808281421661,
-0.07749143987894058,
-0.19039304554462433,
0.14507639408111572,
-0.037563882768154144,
0.007917581126093864,
-0.09107304364442825,
0.15205201506614685,
-0.09758397191762924,
-0.47024962306022644,
-0.20457139611244202,
0.1811123490333557,
0.007479986175894737,
0.04695321246981621,
0.48136013746261597,
-0.14319881796836853,
-0.12455569207668304,
-0.07857172936201096,
-0.29531702399253845,
0.004026516806334257,
-0.273065984249115,
0.1366041749715805,
0.18162274360656738,
0.1038593128323555,
0.008461663499474525,
-0.14868468046188354,
0.2930161654949188,
-0.07151962071657181,
0.024640154093503952,
0.10695717483758926,
0.045233163982629776,
-0.29207339882850647,
-0.26646992564201355,
-0.47501954436302185,
-0.47453007102012634,
-0.17748183012008667,
0.06694811582565308,
-0.07590831816196442,
-0.0335286445915699,
0.5198025703430176,
0.06844212859869003,
0.06568100303411484,
0.09314499795436859,
0.023252936080098152,
-0.34674352407455444,
-0.09354056417942047,
0.24904774129390717,
-0.17909182608127594,
-0.21024540066719055,
0.1960572600364685,
0.10930954664945602,
0.11752841621637344,
-0.2039329558610916,
-0.3139224648475647,
0.07286287099123001,
-0.05760139226913452,
0.05894460529088974,
0.0813102275133133,
0.19489642977714539,
0.21388272941112518,
0.26710212230682373,
-0.148003488779068,
-0.32705122232437134,
-0.33171188831329346,
0.13817338645458221,
-0.07196802645921707,
0.13063539564609528,
-0.10625577718019485,
0.2940855622291565,
-0.15208424627780914,
0.32650870084762573,
0.02177213691174984,
-0.21265599131584167,
0.19188879430294037,
-0.04784765839576721,
0.5207322835922241,
0.06838060170412064,
-0.4193747341632843,
0.06588514894247055,
-0.11910711973905563,
0.02694641798734665,
0.17604288458824158,
-0.31963908672332764,
0.03795626014471054,
-0.14796802401542664,
0.39460447430610657,
-0.24780505895614624,
-0.09965691715478897,
-0.10064268857240677,
-0.15016862750053406,
0.040526945143938065,
0.11690041422843933,
-0.04097527265548706,
-0.2084079086780548,
-0.19158485531806946,
-0.2512802183628082,
0.05782405287027359,
-0.09546123445034027,
-0.08755175024271011,
-0.5335749983787537,
-0.23349899053573608,
-0.1649959832429886,
0.29409846663475037,
0.15745101869106293,
0.33466413617134094,
-0.17851713299751282,
0.24547159671783447,
0.047758590430021286,
0.24589969217777252,
0.6149811148643494,
-0.4832390546798706,
0.15470227599143982,
0.22637194395065308,
0.3931273818016052,
-0.17800158262252808,
-0.12725535035133362,
-0.16925735771656036,
0.29472610354423523,
-0.29577744007110596,
0.025988830253481865,
-0.15553432703018188,
-0.09107692539691925,
0.26310059428215027,
0.15540583431720734,
-0.12238035351037979,
-0.31498029828071594,
-0.23095160722732544,
-0.1793929785490036,
-0.12728528678417206,
-0.053396809846162796,
0.06357715278863907,
0.18663805723190308,
-0.37848716974258423,
0.09864776581525803,
0.14082369208335876,
0.0735073834657669,
0.2715045213699341,
0.1186351478099823,
0.22324301302433014,
0.03027692809700966,
0.19736146926879883,
0.3174023926258087,
0.2587256133556366,
0.5099826455116272,
0.5483978390693665,
-0.3618466854095459,
-0.5113290548324585,
-0.11947869509458542,
-0.11476928740739822,
0.2007075846195221,
0.06500115245580673,
-0.14221520721912384,
0.1660955846309662,
-0.050639908760786057,
0.1854587346315384,
0.09619783610105515,
0.022307993844151497,
0.4922949969768524,
0.16057652235031128,
-0.48984798789024353,
-0.5388930439949036,
0.27135899662971497,
0.03924155607819557,
-0.04784061759710312,
0.12815535068511963,
0.07973218709230423,
-0.3407573103904724,
0.2059527039527893,
-0.15599367022514343,
0.6908730864524841,
0.0837978795170784,
-0.051030512899160385,
-0.01703108288347721,
-0.22617307305335999,
0.7132235765457153,
-0.11871161311864853,
0.0007718639681115746,
-0.3614291846752167,
-0.3074661195278168,
-0.06222986429929733,
-0.02211889624595642,
0.023474834859371185,
0.4506933391094208,
-0.30857908725738525,
0.3788377046585083,
-0.3285132050514221,
0.2046867161989212,
0.028749993070960045,
-0.0740615576505661,
0.2494397759437561,
-0.13231386244297028,
-0.08248619735240936,
0.20103396475315094,
-0.15761911869049072,
-0.13437563180923462,
-0.16743485629558563,
0.04190551117062569,
-0.23184852302074432,
-0.268060564994812,
-0.22626028954982758,
0.08226071298122406,
-0.2538246810436249,
0.14157825708389282,
-0.085654117166996,
-0.016719289124011993,
0.21681153774261475,
0.20250990986824036,
0.48632189631462097,
0.0789240300655365,
-0.1482863575220108,
0.18389566242694855,
0.04214852675795555,
0.1370234340429306,
0.03434861823916435,
0.05374675244092941,
0.41506227850914,
0.11604964733123779,
-0.2699809670448303,
0.1285303235054016,
-0.07956726104021072,
0.17594987154006958,
-0.08703131973743439,
0.08389434963464737,
-0.09839735180139542,
-0.3653748333454132,
0.032647598534822464,
-0.07703867554664612,
0.2287106066942215,
-0.2537734806537628,
0.1773461103439331,
0.05198271945118904,
-0.046680185943841934,
0.21207912266254425,
-0.2636915147304535,
-0.14659744501113892,
-0.04574663192033768,
0.18923304975032806,
0.02596413902938366,
0.19335642457008362,
0.24724461138248444,
0.025973347947001457,
-0.3513919413089752,
-0.2565113604068756,
0.03895195946097374,
0.02399943582713604,
-0.6778354048728943,
0.24598249793052673,
0.25335440039634705,
0.07594557106494904,
-0.057189229875802994,
0.2232683151960373,
-0.015830159187316895,
0.07108484953641891,
0.06101395562291145,
-0.5274380445480347,
-0.21865008771419525,
-0.004670436959713697,
-0.18475468456745148,
0.11692999303340912,
0.24786525964736938,
0.4110047519207001,
0.13375753164291382,
0.07145018875598907,
-0.3641543686389923,
-0.020954042673110962,
-0.1723940074443817,
0.29801276326179504,
0.1525106281042099,
0.01996106095612049,
0.28203141689300537,
-0.17880649864673615,
0.21821686625480652,
0.0007438941393047571,
0.007750352844595909,
-0.24981847405433655,
-0.18720929324626923,
0.11241060495376587,
0.13520921766757965,
-0.19721588492393494,
-0.06341143697500229,
-0.16438139975070953,
0.057836856693029404,
-0.07198397815227509,
-0.01725105755031109,
0.3105736970901489,
0.0032079345546662807,
0.3735309839248657,
-0.1509217470884323,
0.23278465867042542,
-0.046329841017723083,
0.21827781200408936,
0.012717180885374546,
-0.11400148272514343,
0.07424529641866684,
0.17296549677848816,
-0.1127648875117302,
0.01947791315615177,
-0.17507940530776978,
0.08479494601488113,
-0.11700500547885895,
-0.1179296150803566,
0.1342935413122177,
-0.5689804553985596,
0.2959565222263336,
0.19363801181316376,
0.44936269521713257,
0.27813720703125,
-0.18682560324668884,
-0.0707663968205452,
0.38260918855667114,
0.3079267740249634,
-0.36566975712776184,
-0.16835995018482208,
0.1630018949508667,
0.16556130349636078,
0.0003904930781573057,
0.07560741901397705,
0.06072523817420006,
-0.031059928238391876,
0.044892843812704086,
0.008086008951067924,
0.4554387927055359,
-0.4376547038555145,
0.23490537703037262,
0.5269825458526611,
-0.061971064656972885,
0.09998418390750885,
0.4967944622039795,
0.17317654192447662,
0.0635330006480217,
0.5881980657577515,
0.03465026989579201,
0.17732077836990356,
0.1874702125787735,
-0.13796019554138184,
-0.07542061060667038,
-0.17221730947494507,
0.1809183806180954,
0.09697239845991135,
0.018856609240174294,
-0.042831312865018845,
-0.0954478457570076,
0.3011341989040375,
-0.38394567370414734,
0.004110394511371851,
-0.005768762901425362,
0.11119665205478668,
-0.22550338506698608,
-0.106015644967556,
-0.15626294910907745,
-0.09870976209640503,
-0.16644608974456787,
-0.19731606543064117,
0.014027981087565422,
-0.17005053162574768,
0.3556353747844696,
-0.07428083568811417,
-0.19596435129642487,
-0.45658138394355774,
-0.1867782324552536,
0.3054196536540985,
0.06508152186870575,
-0.24730956554412842,
0.016319898888468742,
0.2487560212612152,
-0.1455007642507553,
0.3213774859905243,
0.08623956143856049,
0.6039386987686157,
0.17137542366981506,
0.0897911787033081,
-0.34109172224998474,
-0.09729502350091934,
-0.08858026564121246,
0.15166328847408295,
0.21556809544563293,
0.04592103138566017,
-0.036833956837654114,
0.3922654986381531,
0.20187819004058838,
-0.17074932157993317,
0.3085803985595703,
0.33574238419532776,
0.2227042317390442,
-0.17061945796012878,
-0.0630669817328453,
-0.1339656412601471,
-0.2573544979095459,
-0.32663965225219727,
0.10131869465112686,
-0.26979494094848633,
0.11595753580331802,
0.4622560143470764,
-0.04151366278529167,
0.08409026265144348,
-0.2942292392253876,
0.14628008008003235,
0.13171041011810303,
0.311890184879303,
0.27394425868988037,
-0.04762457683682442,
-0.3456506133079529,
0.16157123446464539,
-0.5773794054985046,
0.12946027517318726,
-0.1186995655298233,
-0.11469240486621857,
-0.033454012125730515,
-0.15822313725948334,
0.15932197868824005,
0.020614948123693466,
0.38295018672943115,
0.18881821632385254,
-0.015939833596348763,
-0.10867761075496674,
-0.1195140853524208,
-0.19319865107536316,
-0.08259912580251694,
-0.12190110981464386,
0.2010165899991989,
-0.3226902186870575,
-0.061835866421461105,
-0.1457766592502594,
0.03897590935230255,
-0.34980833530426025,
0.09371425211429596,
0.1062968522310257,
-0.020189348608255386,
0.36031776666641235,
0.1459479033946991,
0.7699722647666931,
0.04881495237350464,
0.1150306761264801,
-0.09138786792755127,
-0.35364916920661926,
-0.404243141412735,
0.36886903643608093,
0.3255910575389862,
0.25653600692749023,
-0.10637737810611725,
0.009763987734913826,
-0.16448278725147247,
0.09450659155845642,
-0.04354657232761383,
0.32114851474761963,
-0.2544762194156647,
0.21450477838516235,
-0.024010805413126945,
0.01713998056948185,
0.09913121163845062,
-0.05562575161457062,
-0.002646799897775054,
0.3410545289516449,
-0.2067563533782959,
-0.604709804058075,
0.6198092103004456,
-0.21293136477470398,
-0.23955528438091278,
0.1537303924560547,
0.15452565252780914,
0.22137925028800964,
-0.2187478393316269,
-0.5100530982017517,
0.02474985457956791,
0.3773825168609619,
0.019003786146640778,
-0.4423445463180542,
-0.0037065274082124233,
-0.19275739789009094,
0.051443908363580704,
0.11356008797883987,
0.30625423789024353,
0.1166287362575531,
-0.1932860165834427,
0.19910483062267303,
-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.17891450226306915,
-0.05732319876551628,
0.005179460160434246,
0.1343672275543213,
0.4113537073135376,
0.3502123951911926,
0.6419944763183594,
0.16370762884616852,
-0.16131749749183655,
0.07234954833984375,
0.17885442078113556,
0.06387543678283691,
-0.060773108154535294,
0.03052571415901184,
-0.1302308738231659,
-0.11937060952186584,
0.08908388763666153,
0.1734791398048401,
0.18164238333702087,
-0.0444667711853981,
-0.2867427170276642,
-0.03982594236731529,
-0.1566799134016037,
0.3662884831428528,
-0.2972055673599243,
-0.37668392062187195,
0.2105434089899063,
-0.12052837759256363,
-0.11313314735889435,
-0.46339529752731323,
0.27180954813957214,
0.08612008392810822,
0.0026802513748407364,
0.4034269154071808,
-0.00010309630306437612,
0.05875676870346069,
0.2967478036880493,
0.1559891402721405,
-0.39840781688690186,
-0.43212831020355225,
-0.18936000764369965,
-0.023407861590385437,
0.03456372022628784,
-0.304476797580719,
0.09798327833414078,
-0.2846681475639343,
-0.09054117649793625,
-0.27566608786582947,
0.10468639433383942,
0.4386059045791626,
0.32663995027542114,
0.23733948171138763,
-0.2064998298883438,
-0.22930341958999634,
0.23115266859531403,
0.1250884085893631,
-0.03050871379673481,
0.0494752936065197,
-0.13443879783153534,
-0.0064585269428789616,
0.4515703618526459,
0.4609145224094391,
-0.27239561080932617,
0.2647712230682373,
0.13536487519741058,
0.14636334776878357,
0.13772478699684143,
-0.3910481035709381,
0.2763094902038574,
0.1961432248353958,
0.74526047706604,
-0.2964995503425598,
-0.2943911552429199,
-0.16970524191856384,
0.13737638294696808,
-0.4167192578315735,
0.18133898079395294,
0.07008319348096848,
0.006375689525157213,
-0.04701511934399605,
-0.03316250815987587,
0.06102722883224487,
0.08074197173118591,
0.08818031847476959,
-0.058075059205293655,
0.038328465074300766,
-0.09864160418510437,
0.3288167715072632,
0.11253046244382858,
-0.07475090771913528,
0.2975304424762726,
-0.0059941355139017105,
-0.08857018500566483,
0.041544560343027115,
-0.4325242340564728,
-0.02960842475295067,
-0.03688057139515877,
0.051676034927368164,
-0.118137888610363,
-0.038740374147892,
0.018386678770184517,
-0.3749556541442871,
-0.1474357545375824,
0.3403448760509491,
0.21513447165489197,
0.26627618074417114,
0.27069932222366333,
0.5616863369941711,
0.09117243438959122,
-0.07616247981786728,
0.030804160982370377,
-0.05580741912126541,
-0.001574118621647358,
-0.46264275908470154,
0.2433207482099533,
0.09893118590116501,
0.2934701442718506,
-0.23985853791236877,
-0.5455215573310852,
0.19244219362735748,
-0.028101101517677307,
0.09409554302692413,
0.1541178673505783,
0.3049503266811371,
0.022122062742710114,
0.20651817321777344,
0.07934718579053879,
0.19360806047916412,
-0.00917021930217743,
-0.11720536649227142,
-0.2069239616394043,
0.09760784357786179,
-0.20027904212474823,
-0.15010665357112885,
0.0502697229385376,
-0.072052501142025,
0.11244919896125793,
0.06405958533287048,
-0.0010050220880657434,
-0.07605667412281036,
-0.016303392127156258,
-0.38646429777145386,
-0.01274797786027193,
0.35889336466789246,
-0.10326334089040756,
0.42035040259361267,
0.25205424427986145,
-0.418550044298172,
0.059699349105358124,
0.18021109700202942,
-0.3688521087169647,
-0.03381352126598358,
-0.21215713024139404,
0.2862125635147095,
-0.10304385423660278,
-0.18798112869262695,
-0.12009162455797195,
0.0468238964676857,
0.41932007670402527,
-0.2145540416240692,
0.1575896143913269,
-0.3543839752674103,
-0.30932238698005676,
-0.2777700126171112,
-0.06630391627550125,
0.22143256664276123,
-0.6722468137741089,
0.004389546811580658,
-0.1475468873977661,
-0.02911280281841755,
0.05280671268701553,
0.29601922631263733,
-0.08100429177284241,
0.20629146695137024,
-0.07059191167354584,
0.030349701642990112,
0.13955116271972656,
-0.3906913101673126,
-0.1104636862874031,
0.10354377329349518,
-0.14200329780578613,
-0.24426409602165222,
0.0704808160662651,
-0.04033960774540901,
0.09173101931810379,
-0.0916263610124588,
0.05823206529021263,
-0.13187739253044128,
-0.1996321827173233,
-0.09513326734304428,
-0.14370395243167877,
0.05381122976541519,
0.6539093255996704,
0.0927329957485199,
-0.016800185665488243,
0.07564690709114075,
-0.10022872686386108,
-0.3448370695114136,
-0.042532313615083694,
-0.10095544904470444,
0.20621968805789948,
0.21479003131389618,
0.05564019829034805,
0.2983596920967102,
0.1459522843360901,
-0.06447026878595352,
-0.44249671697616577,
0.10170092433691025,
-0.04005155712366104,
0.139564648270607,
-0.14514318108558655,
-0.19234375655651093,
-0.3297649919986725,
-0.05378592014312744,
-0.20797628164291382,
0.01832389459013939,
0.16331332921981812,
0.06836079806089401,
-0.22142204642295837,
-0.020483320578932762,
0.014084305614233017,
-0.07588431239128113,
-0.017214002087712288,
0.10933052748441696,
-0.10402525961399078,
0.2656514644622803,
-0.09511606395244598,
0.11689403653144836,
-0.026739375665783882,
0.2531200349330902,
0.4326063096523285,
0.24005182087421417,
-0.046621520072221756,
0.3670240342617035,
0.08486083149909973,
-0.32702308893203735,
0.007840344682335854,
-0.17265833914279938,
0.018129494041204453,
-0.08387430757284164,
-0.016326790675520897,
0.1145247295498848,
0.2768394351005554,
-0.10859724879264832,
-0.08471960574388504,
0.1411859542131424,
-0.17720049619674683,
0.27628424763679504,
-0.16197456419467926,
0.20046064257621765,
0.25996309518814087,
-0.1093929260969162,
0.12512215971946716,
-0.21271125972270966,
0.21588090062141418,
-0.1297987848520279,
0.23431411385536194,
0.0071422867476940155,
-0.26171764731407166,
0.06771949678659439,
0.42205390334129333,
0.0015312876785174012,
-0.00352389644831419,
0.00977385975420475,
-0.1586681604385376,
0.16574639081954956,
-0.013017593882977962,
0.5957189798355103,
0.35284268856048584,
0.20595574378967285,
-0.16387562453746796,
-0.05826844274997711,
-0.2622588872909546,
-0.13698403537273407,
0.21246151626110077,
0.09510159492492676,
0.029852507635951042,
0.057296257466077805,
0.02611011639237404,
-0.06643901765346527,
-0.17657269537448883,
-0.24333888292312622,
0.20823118090629578,
0.34642988443374634,
-0.5103123188018799,
-0.0029064707923680544,
-0.34527283906936646,
-0.23186379671096802,
-0.31859728693962097,
-0.09879087656736374,
-0.2351587414741516,
-0.45904403924942017,
0.09043808281421661,
-0.07749143987894058,
-0.19039304554462433,
0.14507639408111572,
-0.037563882768154144,
0.007917581126093864,
-0.09107304364442825,
0.15205201506614685,
-0.09758397191762924,
-0.47024962306022644,
-0.20457139611244202,
0.1811123490333557,
0.007479986175894737,
0.04695321246981621,
0.48136013746261597,
-0.14319881796836853,
-0.12455569207668304,
-0.07857172936201096,
-0.29531702399253845,
0.004026516806334257,
-0.273065984249115,
0.1366041749715805,
0.18162274360656738,
0.1038593128323555,
0.008461663499474525,
-0.14868468046188354,
0.2930161654949188,
-0.07151962071657181,
0.024640154093503952,
0.10695717483758926,
0.045233163982629776,
-0.29207339882850647,
-0.26646992564201355,
-0.47501954436302185,
-0.47453007102012634,
-0.17748183012008667,
0.06694811582565308,
-0.07590831816196442,
-0.0335286445915699,
0.5198025703430176,
0.06844212859869003,
0.06568100303411484,
0.09314499795436859,
0.023252936080098152,
-0.34674352407455444,
-0.09354056417942047,
0.24904774129390717,
-0.17909182608127594,
-0.21024540066719055,
0.1960572600364685,
0.10930954664945602,
0.11752841621637344,
-0.2039329558610916,
-0.3139224648475647,
0.07286287099123001,
-0.05760139226913452,
0.05894460529088974,
0.0813102275133133,
0.19489642977714539,
0.21388272941112518,
0.26710212230682373,
-0.148003488779068,
-0.32705122232437134,
-0.33171188831329346,
0.13817338645458221,
-0.07196802645921707,
0.13063539564609528,
-0.10625577718019485,
0.2940855622291565,
-0.15208424627780914,
0.32650870084762573,
0.02177213691174984,
-0.21265599131584167,
0.19188879430294037,
-0.04784765839576721,
0.5207322835922241,
0.06838060170412064,
-0.4193747341632843,
0.06588514894247055,
-0.11910711973905563,
0.02694641798734665,
0.17604288458824158,
-0.31963908672332764,
0.03795626014471054,
-0.14796802401542664,
0.39460447430610657,
-0.24780505895614624,
-0.09965691715478897,
-0.10064268857240677,
-0.15016862750053406,
0.040526945143938065,
0.11690041422843933,
-0.04097527265548706,
-0.2084079086780548,
-0.19158485531806946,
-0.2512802183628082,
0.05782405287027359,
-0.09546123445034027,
-0.08755175024271011,
-0.5335749983787537,
-0.23349899053573608,
-0.1649959832429886,
0.29409846663475037,
0.15745101869106293,
0.33466413617134094,
-0.17851713299751282,
0.24547159671783447,
0.047758590430021286,
0.24589969217777252,
0.6149811148643494,
-0.4832390546798706,
0.15470227599143982,
0.22637194395065308,
0.3931273818016052,
-0.17800158262252808,
-0.12725535035133362,
-0.16925735771656036,
0.29472610354423523,
-0.29577744007110596,
0.025988830253481865,
-0.15553432703018188,
-0.09107692539691925,
0.26310059428215027,
0.15540583431720734,
-0.12238035351037979,
-0.31498029828071594,
-0.23095160722732544,
-0.1793929785490036,
-0.12728528678417206,
-0.053396809846162796,
0.06357715278863907,
0.18663805723190308,
-0.37848716974258423,
0.09864776581525803,
0.14082369208335876,
0.0735073834657669,
0.2715045213699341,
0.1186351478099823,
0.22324301302433014,
0.03027692809700966,
0.19736146926879883,
0.3174023926258087,
0.2587256133556366,
0.5099826455116272,
0.5483978390693665,
-0.3618466854095459,
-0.5113290548324585,
-0.11947869509458542,
-0.11476928740739822,
0.2007075846195221,
0.06500115245580673,
-0.14221520721912384,
0.1660955846309662,
-0.050639908760786057,
0.1854587346315384,
0.09619783610105515,
0.022307993844151497,
0.4922949969768524,
0.16057652235031128,
-0.48984798789024353,
-0.5388930439949036,
0.27135899662971497,
0.03924155607819557,
-0.04784061759710312,
0.12815535068511963,
0.07973218709230423,
-0.3407573103904724,
0.2059527039527893,
-0.15599367022514343,
0.6908730864524841,
0.0837978795170784,
-0.051030512899160385,
-0.01703108288347721,
-0.22617307305335999,
0.7132235765457153,
-0.11871161311864853,
0.0007718639681115746,
-0.3614291846752167,
-0.3074661195278168,
-0.06222986429929733,
-0.02211889624595642,
0.023474834859371185,
0.4506933391094208,
-0.30857908725738525,
0.3788377046585083,
-0.3285132050514221,
0.2046867161989212,
0.028749993070960045,
-0.0740615576505661,
0.2494397759437561,
-0.13231386244297028,
-0.08248619735240936,
0.20103396475315094,
-0.15761911869049072,
-0.13437563180923462,
-0.16743485629558563,
0.04190551117062569,
-0.23184852302074432,
-0.268060564994812,
-0.22626028954982758,
0.08226071298122406,
-0.2538246810436249,
0.14157825708389282,
-0.085654117166996,
-0.016719289124011993,
0.21681153774261475,
0.20250990986824036,
0.48632189631462097,
0.0789240300655365,
-0.1482863575220108,
0.18389566242694855,
0.04214852675795555,
0.1370234340429306,
0.03434861823916435,
0.05374675244092941,
0.41506227850914,
0.11604964733123779,
-0.2699809670448303,
0.1285303235054016,
-0.07956726104021072,
0.17594987154006958,
-0.08703131973743439,
0.08389434963464737,
-0.09839735180139542,
-0.3653748333454132,
0.032647598534822464,
-0.07703867554664612,
0.2287106066942215,
-0.2537734806537628,
0.1773461103439331,
0.05198271945118904,
-0.046680185943841934,
0.21207912266254425,
-0.2636915147304535,
-0.14659744501113892,
-0.04574663192033768,
0.18923304975032806,
0.02596413902938366,
0.19335642457008362,
0.24724461138248444,
0.025973347947001457,
-0.3513919413089752,
-0.2565113604068756,
0.03895195946097374,
0.02399943582713604,
-0.6778354048728943,
0.24598249793052673,
0.25335440039634705,
0.07594557106494904,
-0.057189229875802994,
0.2232683151960373,
-0.015830159187316895,
0.07108484953641891,
0.06101395562291145,
-0.5274380445480347,
-0.21865008771419525,
-0.004670436959713697,
-0.18475468456745148,
0.11692999303340912,
0.24786525964736938,
0.4110047519207001,
0.13375753164291382,
0.07145018875598907,
-0.3641543686389923,
-0.020954042673110962,
-0.1723940074443817,
0.29801276326179504,
0.1525106281042099,
0.01996106095612049,
0.28203141689300537,
-0.17880649864673615,
0.21821686625480652,
0.0007438941393047571,
0.007750352844595909,
-0.24981847405433655,
-0.18720929324626923,
0.11241060495376587,
0.13520921766757965,
-0.19721588492393494,
-0.06341143697500229,
-0.16438139975070953,
0.057836856693029404,
-0.07198397815227509,
-0.01725105755031109,
0.3105736970901489,
0.0032079345546662807,
0.3735309839248657,
-0.1509217470884323,
0.23278465867042542,
-0.046329841017723083,
0.21827781200408936,
0.012717180885374546,
-0.11400148272514343,
0.07424529641866684,
0.17296549677848816,
-0.1127648875117302,
0.01947791315615177,
-0.17507940530776978,
0.08479494601488113,
-0.11700500547885895,
-0.1179296150803566,
0.1342935413122177,
-0.5689804553985596,
0.2959565222263336,
0.19363801181316376,
0.44936269521713257,
0.27813720703125,
-0.18682560324668884,
-0.0707663968205452,
0.38260918855667114,
0.3079267740249634,
-0.36566975712776184,
-0.16835995018482208,
0.1630018949508667,
0.16556130349636078,
0.0003904930781573057,
0.07560741901397705,
0.06072523817420006,
-0.031059928238391876,
0.044892843812704086,
0.008086008951067924,
0.4554387927055359,
-0.4376547038555145,
0.23490537703037262,
0.5269825458526611,
-0.061971064656972885,
0.09998418390750885,
0.4967944622039795,
0.17317654192447662,
0.0635330006480217,
0.5881980657577515,
0.03465026989579201,
0.17732077836990356,
0.1874702125787735,
-0.13796019554138184,
-0.07542061060667038,
-0.17221730947494507,
0.1809183806180954,
0.09697239845991135,
0.018856609240174294,
-0.042831312865018845,
-0.0954478457570076,
0.3011341989040375,
-0.38394567370414734,
0.004110394511371851,
-0.005768762901425362,
0.11119665205478668,
-0.22550338506698608,
-0.106015644967556,
-0.15626294910907745,
-0.09870976209640503,
-0.16644608974456787,
-0.19731606543064117,
0.014027981087565422,
-0.17005053162574768,
0.3556353747844696,
-0.07428083568811417,
-0.19596435129642487,
-0.45658138394355774,
-0.1867782324552536,
0.3054196536540985,
0.06508152186870575,
-0.24730956554412842,
0.016319898888468742,
0.2487560212612152,
-0.1455007642507553,
0.3213774859905243,
0.08623956143856049,
0.6039386987686157,
0.17137542366981506,
0.0897911787033081,
-0.34109172224998474,
-0.09729502350091934,
-0.08858026564121246,
0.15166328847408295,
0.21556809544563293,
0.04592103138566017,
-0.036833956837654114,
0.3922654986381531,
0.20187819004058838,
-0.17074932157993317,
0.3085803985595703,
0.33574238419532776,
0.2227042317390442,
-0.17061945796012878,
-0.0630669817328453,
-0.1339656412601471,
-0.2573544979095459,
-0.32663965225219727,
0.10131869465112686,
-0.26979494094848633,
0.11595753580331802,
0.4622560143470764,
-0.04151366278529167,
0.08409026265144348,
-0.2942292392253876,
0.14628008008003235,
0.13171041011810303,
0.311890184879303,
0.27394425868988037,
-0.04762457683682442,
-0.3456506133079529,
0.16157123446464539,
-0.5773794054985046,
0.12946027517318726,
-0.1186995655298233,
-0.11469240486621857,
-0.033454012125730515,
-0.15822313725948334,
0.15932197868824005,
0.020614948123693466,
0.38295018672943115,
0.18881821632385254,
-0.015939833596348763,
-0.10867761075496674,
-0.1195140853524208,
-0.19319865107536316,
-0.08259912580251694,
-0.12190110981464386,
0.2010165899991989,
-0.3226902186870575,
-0.061835866421461105,
-0.1457766592502594,
0.03897590935230255,
-0.34980833530426025,
0.09371425211429596,
0.1062968522310257,
-0.020189348608255386,
0.36031776666641235,
0.1459479033946991,
0.7699722647666931,
0.04881495237350464,
0.1150306761264801,
-0.09138786792755127,
-0.35364916920661926,
-0.404243141412735,
0.36886903643608093,
0.3255910575389862,
0.25653600692749023,
-0.10637737810611725,
0.009763987734913826,
-0.16448278725147247,
0.09450659155845642,
-0.04354657232761383,
0.32114851474761963,
-0.2544762194156647,
0.21450477838516235,
-0.024010805413126945,
0.01713998056948185,
0.09913121163845062,
-0.05562575161457062,
-0.002646799897775054,
0.3410545289516449,
-0.2067563533782959,
-0.604709804058075,
0.6198092103004456,
-0.21293136477470398,
-0.23955528438091278,
0.1537303924560547,
0.15452565252780914,
0.22137925028800964,
-0.2187478393316269,
-0.5100530982017517,
0.02474985457956791,
0.3773825168609619,
0.019003786146640778,
-0.4423445463180542,
-0.0037065274082124233,
-0.19275739789009094,
0.051443908363580704,
0.11356008797883987,
0.30625423789024353,
0.1166287362575531,
-0.1932860165834427,
0.19910483062267303,
-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.10489434748888016,
-0.4077847898006439,
-0.12521077692508698,
0.35286909341812134,
0.20643307268619537,
0.07730388641357422,
0.2821688652038574,
-0.01321975514292717,
0.10144545882940292,
-0.09215116500854492,
-0.29715466499328613,
-0.07670380920171738,
-0.05919022485613823,
0.5414656400680542,
0.5551632642745972,
-0.055017150938510895,
0.1947561353445053,
0.007736638654023409,
-0.16066421568393707,
0.02435385249555111,
-0.13115496933460236,
-0.01847812533378601,
-0.1919618844985962,
-0.05607675388455391,
-0.2441977858543396,
0.07344353944063187,
-0.24310334026813507,
0.2023605853319168,
-0.3524555563926697,
-0.31531822681427,
0.1265479326248169,
0.14202618598937988,
0.20387893915176392,
0.1515563726425171,
-0.00011447398719610646,
0.026150286197662354,
0.2794186472892761,
-0.2648743689060211,
-0.07990250736474991,
-0.2754318416118622,
-0.21003614366054535,
-0.19585444033145905,
0.1365063637495041,
-0.30974411964416504,
-0.034409768879413605,
-0.36396920680999756,
0.32087939977645874,
-0.2029702514410019,
0.41632723808288574,
0.3321010172367096,
0.17345836758613586,
0.17704620957374573,
-0.01202954351902008,
0.07155801355838776,
0.1994963437318802,
0.7043316960334778,
-0.235323965549469,
0.07656261324882507,
0.3966984748840332,
0.2751343548297882,
0.13175946474075317,
0.19040168821811676,
-0.14710040390491486,
0.24462400376796722,
0.6670562028884888,
0.2847820520401001,
-0.06340858340263367,
-0.5953473448753357,
0.17681020498275757,
0.3605564534664154,
0.7247247099876404,
-0.2514559328556061,
-0.37726303935050964,
-0.2556193172931671,
-0.3492872416973114,
-0.14611297845840454,
-0.053107842803001404,
0.2958313524723053,
-0.00945405475795269,
0.23407380282878876,
-0.5905614495277405,
-0.27589112520217896,
-0.18513135612010956,
-0.032956819981336594,
0.06180305778980255,
0.2776287794113159,
-0.3768875300884247,
0.2667973041534424,
0.15191961824893951,
0.14780427515506744,
0.019391797482967377,
-0.24111875891685486,
0.0904683992266655,
0.21363893151283264,
0.10612352192401886,
-0.2127499133348465,
-0.30109086632728577,
0.1735035926103592,
0.4054275453090668,
0.051344793289899826,
-0.02488824538886547,
-0.00017329311231151223,
-0.2388935387134552,
0.2633925974369049,
0.3330247402191162,
-0.06605813652276993,
-0.06473445892333984,
-0.07640983909368515,
0.2803305685520172,
-0.06800214946269989,
0.28757140040397644,
-0.0922330915927887,
-0.2132638841867447,
-0.05720340088009834,
-0.13174118101596832,
-0.3184928297996521,
0.1354006975889206,
-0.26080799102783203,
-0.04648953676223755,
0.058191727846860886,
0.13853245973587036,
-0.1853196620941162,
-0.19966477155685425,
0.23537912964820862,
-0.00964334886521101,
-0.16118380427360535,
0.13097938895225525,
0.2234884649515152,
0.11412363499403,
-0.17014144361019135,
0.008983778767287731,
0.1949692964553833,
-0.2847527861595154,
0.1963900625705719,
0.061017245054244995,
-0.20415042340755463,
0.339229941368103,
-0.10499962419271469,
0.20440974831581116,
0.03427228704094887,
0.1778147667646408,
-0.2119627594947815,
0.31753212213516235,
0.465555876493454,
-0.09165351837873459,
0.05782569944858551,
0.07910094410181046,
0.050705164670944214,
-0.4007253348827362,
0.18673908710479736,
-0.47340285778045654,
-0.28558486700057983,
-0.14915460348129272,
0.036601562052965164,
-0.12718220055103302,
0.014197200536727905,
-0.4138632118701935,
0.2678913474082947,
0.11482876539230347,
0.13253286480903625,
0.23751448094844818,
0.05657484382390976,
-0.39376968145370483,
-0.2800177335739136,
0.21619336307048798,
0.20003396272659302,
-0.4700543284416199,
0.1166008934378624,
-0.0538983978331089,
-0.2484961301088333,
-0.036288950592279434,
0.29476022720336914,
-0.1932140588760376,
0.15620768070220947,
-0.21288703382015228,
0.17404523491859436,
0.13663780689239502,
-0.4921630620956421,
0.20291182398796082,
0.351314902305603,
0.367130309343338,
-0.11086411029100418,
0.044171400368213654,
0.1537507176399231,
0.04291342943906784,
0.010678451508283615,
-0.2065613716840744,
0.2118646502494812,
0.024009792134165764,
-0.16477741301059723,
-0.051058683544397354,
-0.44740280508995056,
-0.05948620289564133,
0.2002524435520172,
0.09965237975120544,
0.10396289825439453,
0.1326233148574829,
-0.005194289609789848,
0.09291690587997437,
-0.07498028129339218,
0.30684611201286316,
0.0156943928450346,
0.1508459597826004,
0.13592831790447235,
0.13806535303592682,
-0.031865961849689484,
-0.42358314990997314,
0.168513685464859,
0.0633087232708931,
0.07636631280183792,
0.07617310434579849,
-0.39724090695381165,
-0.017949111759662628,
-0.09666237235069275,
-0.02264808490872383,
-0.3566533327102661,
0.01991572603583336,
-0.06996317952871323,
0.11507720500230789,
-0.19596952199935913,
-0.5987905859947205,
0.328592985868454,
-0.15115922689437866,
0.023014243692159653,
-0.42398276925086975,
0.14187289774417877,
-0.13460350036621094,
0.18034927546977997,
-0.028620412573218346,
-0.040311045944690704,
-0.22511200606822968,
-0.32238808274269104,
0.25589215755462646,
0.33087462186813354,
0.093439482152462,
0.07226016372442245,
0.1576121300458908,
0.565075159072876,
0.13126200437545776,
-0.23010925948619843,
0.3880791664123535,
-0.19106703996658325,
0.29060596227645874,
-0.06017345190048218,
-0.45782968401908875,
0.44754675030708313,
-0.055035244673490524,
0.13084782660007477,
0.06384478509426117,
-0.14453686773777008,
0.21650297939777374,
-0.015415770933032036,
-0.26178625226020813,
-0.15156494081020355,
-0.07501984387636185,
0.09452911466360092,
0.3611968457698822,
-0.07167582958936691,
-0.37081268429756165,
0.036555465310811996,
0.260116308927536,
-0.18208496272563934,
-0.0158427394926548,
0.24170829355716705,
-0.11505576968193054,
-0.3044469356536865,
0.1658320277929306,
0.0687476396560669,
0.4986749291419983,
0.039202917367219925,
0.06697476655244827,
0.2871890664100647,
0.08046193420886993,
-0.16710849106311798,
0.13381865620613098,
0.021315274760127068,
0.2222680151462555,
-0.0037228823639452457,
-0.2135404348373413,
-0.03183610364794731,
-0.12279908359050751,
0.09900039434432983,
0.022822080180048943,
0.07431446760892868,
-0.22893328964710236,
0.2501445710659027,
-0.15369802713394165,
-0.22925856709480286,
0.02208784967660904,
0.08967985957860947,
-0.3034619390964508,
0.0047839730978012085,
-0.16138304769992828,
-0.05315661430358887,
0.07999149709939957,
-0.13765910267829895,
-0.03570594638586044,
0.4570160210132599,
-0.1464422643184662,
0.14059674739837646,
-0.32847848534584045,
0.07160916924476624,
0.0750909298658371,
0.07504540681838989,
0.32168883085250854,
0.13820002973079681,
0.4002685844898224,
-0.3740536868572235,
-0.13605034351348877,
-0.36461296677589417,
-0.15461066365242004,
0.40242424607276917,
-0.24231475591659546,
0.3959169387817383,
0.34240272641181946,
0.2233855426311493,
-0.11982981860637665,
0.23123066127300262,
0.152353435754776,
-0.2863832712173462,
-0.16783730685710907,
-0.3098677396774292,
-0.0997554287314415,
-0.24888473749160767,
-0.31150123476982117,
-0.005112555809319019,
-0.39169439673423767,
-0.14497977495193481,
0.2766244113445282,
0.3025510311126709,
0.3917849361896515,
0.28619882464408875,
0.16175463795661926,
0.38494449853897095,
-0.27902328968048096,
0.0002964746381621808,
-0.3693479895591736,
-0.6604458689689636,
0.2806851267814636,
-0.24962395429611206,
-0.3559562861919403,
0.2686173915863037,
0.10826891660690308,
0.11107626557350159,
0.05241753160953522,
-0.5647808909416199,
-0.3803994953632355,
0.07351416349411011,
-0.029880844056606293,
0.3173150420188904,
0.26447635889053345,
0.14114955067634583,
-0.36165207624435425,
0.021610628813505173,
-0.25393959879875183,
-0.2714327275753021,
-0.0720844566822052,
-0.006952611729502678,
0.14944645762443542,
0.38489076495170593,
0.2619085907936096,
-0.06574473530054092,
0.49623429775238037,
0.10236389189958572,
-0.006929501891136169,
0.4028252065181732,
0.04298758879303932,
0.4390590190887451,
-0.5036190152168274,
0.18891459703445435,
0.3229767382144928,
-0.228029265999794,
-0.08935285359621048,
0.27973082661628723,
0.15195225179195404,
-0.00028190770535729825,
-0.20329324901103973,
0.07419037073850632,
-0.2951330244541168,
0.08600431680679321,
0.12255031615495682,
0.3008068799972534,
0.03576599434018135,
-0.08287190645933151,
-0.21134839951992035,
0.0658426582813263,
0.07934864610433578,
-0.19802133738994598,
0.5932244658470154,
0.39512184262275696,
0.042381688952445984,
-0.4509614408016205,
-0.04931490868330002,
-0.4759039282798767,
0.20786044001579285,
-0.22910459339618683,
0.03664693608880043,
-0.062276579439640045,
0.17105066776275635,
0.35136181116104126,
-0.2008669674396515,
0.32422345876693726,
-0.4471009373664856,
-0.30306947231292725,
0.114862821996212,
-0.29940375685691833,
-0.19050060212612152,
0.08998683094978333,
-0.17539848387241364,
0.1934819221496582,
-0.04224591329693794,
0.44699031114578247,
-0.2695119380950928,
-0.33099982142448425,
0.2156672477722168,
0.043371737003326416,
-0.2091081589460373,
-0.17337673902511597,
-0.023739241063594818,
-0.37953105568885803,
-0.4606887996196747,
-0.30163446068763733,
0.10946545749902725,
-0.35311710834503174,
0.07894154638051987,
0.1045583039522171,
0.07413919270038605,
0.2746049463748932,
0.07873935997486115,
0.034486014395952225,
0.0890977531671524,
-0.030865907669067383,
-0.11909961700439453,
0.25029656291007996,
0.2833506762981415,
0.10833869874477386,
0.6675300598144531,
-0.20941169559955597,
-0.17038406431674957,
0.1666610687971115,
-0.06854510307312012,
0.30223405361175537,
0.2958967089653015,
-0.046192049980163574,
-0.05091729387640953,
0.2474733591079712,
-0.03804178908467293,
-0.5824604630470276,
0.034711483865976334,
0.2892962396144867,
-0.1367737352848053,
-0.49545204639434814,
-0.5957933664321899,
0.6540589332580566,
0.07350140064954758,
-0.05040675774216652,
0.08165884763002396,
0.21554537117481232,
-0.3724493086338043,
0.19355352222919464,
0.5435107946395874,
1.071170687675476,
-0.206447035074234,
0.4783608913421631,
-0.03531656041741371,
-0.026417948305606842,
0.34455960988998413,
-0.1600823551416397,
-0.2060886025428772,
-0.21303734183311462,
0.05250847339630127,
-0.2116367667913437,
-0.04342813044786453,
0.29801055788993835,
0.0743614137172699,
-0.25129759311676025,
0.0711921900510788,
0.04678146168589592,
0.1992855966091156,
-0.26228150725364685,
0.38014745712280273,
-0.07634703814983368,
-0.23257173597812653,
-0.07870884239673615,
0.15118224918842316,
0.16608498990535736,
0.0884915217757225,
-0.08834366500377655,
0.051804229617118835,
-0.1285293996334076,
-0.010441450402140617,
-0.2773344814777374,
-0.4066329300403595,
0.09381101280450821,
-0.21242298185825348,
0.0439089871942997,
-0.04212050884962082,
0.19666524231433868,
0.06100667640566826,
0.487564355134964,
-0.011999402195215225,
-0.5061596632003784,
-0.09092023223638535,
-0.1689058393239975,
-0.16011865437030792,
0.0015376636292785406,
-0.33819344639778137,
0.24137556552886963,
-0.15945619344711304,
0.07561516761779785,
-0.08977311849594116,
-0.005094131920486689,
-0.2896891236305237,
-0.11526383459568024,
0.07301250100135803,
0.022478584200143814,
-0.11609594523906708,
-0.3256322741508484,
0.047933030873537064,
-0.14186570048332214,
0.011907609179615974,
0.07158654928207397,
0.2889598309993744,
0.028293216601014137,
0.24282510578632355,
-0.02214638888835907,
-0.18775857985019684,
-0.13269606232643127,
0.005165417678654194,
0.19760861992835999,
-0.021600887179374695,
-0.04153416305780411,
0.11552590131759644,
-0.25695472955703735,
-0.1879383772611618,
0.25553610920906067,
0.3657173812389374,
-0.29135823249816895,
0.03434175252914429,
0.20499031245708466,
-0.03859250992536545,
-0.23239737749099731,
0.3837563991546631,
0.27561894059181213,
-0.25395312905311584,
-0.1566251516342163,
-0.4555266797542572,
-0.45564717054367065,
0.2915145456790924,
0.05500894412398338,
0.27226412296295166,
0.09747596830129623,
-0.13197331130504608,
0.37841880321502686,
0.14383161067962646,
-0.26965266466140747,
0.20713591575622559,
0.19439327716827393,
0.22763296961784363,
0.30679646134376526,
0.1615452915430069,
0.1273261457681656,
-0.12193423509597778,
-0.10211683809757233,
0.0005313900765031576,
-0.5738062858581543,
-0.1093948632478714,
-0.08299235999584198,
0.24343988299369812,
0.210224449634552,
-0.6044509410858154,
0.2512055039405823,
-0.18843470513820648,
-0.41412588953971863,
-0.17056111991405487,
0.056787844747304916,
0.32436853647232056,
-0.1336844116449356,
-0.16980087757110596,
0.31111517548561096,
0.03588618338108063,
0.10187957435846329,
0.012681256048381329,
0.14064355194568634,
0.2875843346118927,
0.10906447470188141,
0.005835839081555605,
-0.15954670310020447,
-0.07624664902687073,
0.2651563882827759,
0.22415496408939362,
0.30713438987731934,
0.034725919365882874,
0.45030492544174194,
-0.0871046781539917,
0.2993297278881073,
-0.09958165884017944,
0.6628458499908447,
0.4894660413265228,
-0.28992173075675964,
0.21582049131393433,
0.33993110060691833,
0.047665853053331375,
-0.15153244137763977,
-0.023708108812570572,
0.11338697373867035,
0.1913728266954422,
-0.11480087041854858,
0.32574260234832764,
0.5763187408447266,
0.354155957698822,
-0.05522368475794792,
-0.0920710638165474,
0.49775415658950806,
-0.23618093132972717,
-0.04511239007115364,
-0.004151087254285812,
-0.20093216001987457,
0.21444867551326752,
0.35680702328681946,
0.2959003448486328,
0.24470454454421997,
0.39493757486343384,
-0.044964760541915894,
0.31699442863464355,
0.21171733736991882,
0.31113123893737793,
0.18369069695472717,
-0.1737135648727417,
0.34190547466278076,
0.35210999846458435,
-0.0029111572075635195,
0.2933192849159241,
0.011505521833896637,
0.2548392117023468,
-0.03777898848056793,
0.06494107097387314,
-0.21810351312160492,
0.29749956727027893,
0.0736960843205452,
-0.2234390527009964,
-0.10657408833503723,
-0.2485700249671936,
0.03517094627022743,
0.07818044722080231,
-0.2575293779373169,
-0.4391990303993225,
0.45280054211616516,
-0.1613835096359253,
0.08142104744911194,
-0.011728841811418533,
0.22998221218585968,
-0.184050515294075,
-0.012600329704582691,
-0.014715622179210186,
0.4757888615131378,
-0.03885677829384804,
0.17514996230602264,
0.2862820327281952,
0.49843403697013855,
0.41248929500579834,
0.2951304018497467,
0.04152349755167961,
0.11622749269008636,
-0.2170935571193695,
-0.024029377847909927,
-0.10739971697330475,
0.2956201434135437,
0.10525649040937424,
-0.2680221498012543,
0.35243725776672363,
0.04674994945526123,
-0.015058045275509357,
0.16114649176597595,
-0.24807637929916382,
-0.09473219513893127,
-0.25789424777030945,
-0.06532591581344604,
-0.03980385884642601,
-0.05216660350561142,
-0.01961042359471321,
0.08347950875759125,
-0.4652503430843353,
-0.15120196342468262,
0.40835508704185486,
-0.18226110935211182,
0.21702684462070465,
-0.019124729558825493,
0.042989425361156464,
-0.12770415842533112,
0.5674459934234619,
0.17586645483970642,
0.22554239630699158,
-0.1872522234916687,
-0.0654117614030838,
-0.619135856628418,
0.017313368618488312,
-0.1485692411661148,
-0.02767738327383995,
-0.03425563499331474,
0.1928008496761322,
0.11834278702735901,
0.3820802569389343,
0.12640279531478882,
-0.16497597098350525,
0.07817448675632477,
0.1624617874622345,
0.06997209787368774,
0.028106071054935455,
-0.13909529149532318,
0.5387626886367798,
-0.12290695309638977,
-0.08954460173845291,
0.37877893447875977,
-0.03595243766903877,
-0.1172066479921341,
-0.23003971576690674,
0.26737236976623535,
0.1256120353937149,
0.050616305321455,
0.451018363237381,
0.01114767137914896,
0.10429732501506805,
-0.23955343663692474,
-0.07493384927511215,
-0.27820733189582825,
0.09132213145494461,
-0.30624523758888245,
0.14646337926387787,
0.03926684707403183,
-0.07202106714248657,
-0.513012170791626,
-0.12600921094417572,
-0.1060919463634491,
-0.04764532670378685,
-0.2147376388311386,
-0.1384328156709671,
-0.2805692255496979,
-0.022200321778655052,
-0.3666778802871704,
-0.13021768629550934,
0.07994510978460312,
0.19124135375022888,
0.020777283236384392,
-0.32685521245002747,
-0.4230949580669403,
-0.09624446928501129,
0.5732991099357605,
-0.08079169690608978,
-0.09435267746448517,
0.05042979121208191,
-0.22508563101291656,
0.08670597523450851,
-0.16949786245822906,
-0.8003812432289124,
-0.024474719539284706,
0.2794876992702484,
0.11446109414100647,
-0.04949657618999481,
0.12134073674678802,
0.037600234150886536,
-0.1471036821603775,
-0.372990220785141,
0.35261261463165283,
-0.0036820359528064728,
-0.16388863325119019,
-0.3388901650905609,
-0.43348896503448486
] |
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.1660705804824829,
-0.34415170550346375,
-0.0265198964625597,
0.3718196749687195,
-0.3747006058692932,
-0.002087885281071067,
0.061371371150016785,
-0.07089857012033463,
-0.9394964575767517,
-0.006283103488385677,
0.1252354234457016,
0.15680809319019318,
0.08135801553726196,
0.0008894793572835624,
-0.01845906861126423,
0.029295671731233597,
0.16485168039798737,
-0.04007914662361145,
0.2795078158378601,
-0.16712768375873566,
-0.05828510597348213,
0.47503602504730225,
-0.5303707718849182,
0.023151610046625137,
-0.8211600184440613,
0.06900753825902939,
-0.10389894992113113,
0.16458480060100555,
-0.367931067943573,
-0.3551764488220215,
0.2766614854335785,
0.07233370095491409,
0.12486228346824646,
0.19319312274456024,
-0.0001210675181937404,
-0.43599316477775574,
0.22240594029426575,
-0.098182313144207,
-0.19736041128635406,
0.21454200148582458,
-0.19300884008407593,
-0.42950519919395447,
-0.03821959346532822,
-0.18750837445259094,
0.2144865095615387,
0.43106216192245483,
-0.5452502965927124,
0.26144516468048096,
0.37660589814186096,
0.32194000482559204,
0.1062864437699318,
-0.05998697876930237,
0.12514111399650574,
-0.06098374351859093,
0.5427101254463196,
0.044348400086164474,
-0.05328759551048279,
0.2690056562423706,
0.1820475459098816,
0.2210753709077835,
-0.06485485285520554,
0.388767272233963,
0.08200608938932419,
-0.24968013167381287,
-0.04309861361980438,
-0.028093773871660233,
-0.21996930241584778,
-0.22189511358737946,
0.0012414862867444754,
0.4098292291164398,
0.46096089482307434,
-0.21670001745224,
-0.3023409843444824,
-0.6893439292907715,
0.2730961740016937,
-0.22582122683525085,
0.10935916006565094,
-0.007354593835771084,
-0.003954609856009483,
-0.034964315593242645,
-0.10261420905590057,
-0.3313954472541809,
-0.2891083061695099,
-0.11530477553606033,
-0.2888515591621399,
0.361983060836792,
-0.09821096062660217,
0.04202604293823242,
0.12998244166374207,
0.21710799634456635,
0.6810011267662048,
-0.03529783710837364,
-0.0374365970492363,
-0.05997416004538536,
0.02130848541855812,
-0.28269731998443604,
0.07698149979114532,
-0.08763130754232407,
0.4273088872432709,
-0.31645211577415466,
-0.3112625777721405,
-0.4441929757595062,
0.042277052998542786,
-0.05170534551143646,
0.34669870138168335,
0.07965809851884842,
0.18349485099315643,
0.4299296736717224,
0.08451055735349655,
-0.044189222157001495,
0.14123541116714478,
0.11425355821847916,
-0.30850303173065186,
-0.10484470427036285,
-0.45651960372924805,
0.0863846093416214,
-0.41637906432151794,
-0.41306954622268677,
-0.13309478759765625,
0.1724143922328949,
-0.11130181699991226,
-0.2724637985229492,
0.015479163266718388,
0.09700143337249756,
0.2453031986951828,
0.5682412981987,
-0.006998824421316385,
-0.153908371925354,
-0.09623594582080841,
-0.2754598557949066,
-0.04876112565398216,
-0.12592071294784546,
-0.08377911150455475,
-0.0407453328371048,
-0.04313645139336586,
-0.4689643681049347,
0.14229021966457367,
-0.03672854229807854,
0.34247827529907227,
0.10441011190414429,
0.0005000242963433266,
-0.19081804156303406,
0.11239410936832428,
-0.07600189000368118,
-0.22809430956840515,
-0.04319249093532562,
0.018265727907419205,
0.42657288908958435,
-0.25983700156211853,
0.19833111763000488,
-0.08259734511375427,
-0.3248424828052521,
-0.2638595402240753,
0.022616013884544373,
-0.2561662793159485,
-0.16437940299510956,
0.6193920969963074,
0.052314694970846176,
0.2874729037284851,
-0.10288471728563309,
0.23427818715572357,
-0.21832957863807678,
-0.14484673738479614,
-0.07572771608829498,
0.24447809159755707,
0.15507400035858154,
-0.24328137934207916,
-0.03393663465976715,
0.05359736829996109,
-0.017870325595140457,
0.01581002026796341,
0.23357439041137695,
-0.14548268914222717,
0.4814395308494568,
-0.09974779933691025,
-0.15828688442707062,
0.3144388794898987,
-0.5198949575424194,
-0.13040409982204437,
0.19596339762210846,
0.1512756049633026,
-0.010327013209462166,
-0.12460128217935562,
-0.2870708703994751,
0.5772901177406311,
-0.004811327438801527,
0.032435446977615356,
0.03672243282198906,
0.022380298003554344,
0.0059989821165800095,
-0.3243201971054077,
-0.16828912496566772,
-0.4615069329738617,
-0.3119511604309082,
-0.03923352435231209,
-0.41527479887008667,
-0.35702797770500183,
-0.13256148993968964,
0.4206116795539856,
0.17398619651794434,
-0.07138019055128098,
0.10502410680055618,
0.20620475709438324,
0.27798765897750854,
0.1916782110929489,
0.31332331895828247,
-0.10010020434856415,
-0.01940331980586052,
0.3702385127544403,
0.14408929646015167,
0.5833434462547302,
-0.20241022109985352,
-0.34244927763938904,
0.01809881068766117,
0.3618110418319702,
-0.26602429151535034,
0.046432457864284515,
0.07845691591501236,
0.24907518923282623,
0.10457401722669601,
-0.2230345457792282,
0.22943411767482758,
-0.06860586255788803,
0.08295892179012299,
-0.02288326621055603,
-0.16792574524879456,
0.007625951431691647,
-0.051464613527059555,
0.07654015719890594,
0.3759823739528656,
0.05017656460404396,
0.22134603559970856,
-0.043064408004283905,
0.1560603678226471,
0.37331995368003845,
0.0259112361818552,
0.1593765914440155,
-0.15034087002277374,
0.1712961196899414,
0.07133755832910538,
0.003965569660067558,
-0.3762098550796509,
-0.06715943664312363,
0.15557299554347992,
-0.1190156415104866,
0.20180624723434448,
0.39372217655181885,
-0.08496517688035965,
0.12510696053504944,
-0.15240417420864105,
-0.10328111797571182,
-0.05049848183989525,
-0.04356307163834572,
-0.44408202171325684,
-0.07754459232091904,
0.20971792936325073,
0.04346415027976036,
0.11478110402822495,
-0.12784527242183685,
0.07944547384977341,
0.27159222960472107,
-0.04066704586148262,
-0.35213911533355713,
0.3497368097305298,
-0.3610709309577942,
-0.04318546876311302,
0.16863176226615906,
0.15749791264533997,
0.16287368535995483,
0.2707739770412445,
0.4084944427013397,
0.01361558586359024,
-0.126195028424263,
-0.2134842425584793,
0.2715885043144226,
0.2755281627178192,
0.26986268162727356,
0.31304630637168884,
0.12875355780124664,
0.20439817011356354,
-0.057674605399370193,
-0.052232518792152405,
0.004960825201123953,
-0.10045421868562698,
-0.2025471329689026,
-0.14761509001255035,
0.08831124752759933,
-0.31753450632095337,
-0.019139301031827927,
-0.2643445134162903,
0.13518795371055603,
-0.2632877230644226,
0.20454910397529602,
-0.26547250151634216,
-0.13985612988471985,
-0.09684740751981735,
-0.41577643156051636,
0.3907617926597595,
-0.23952990770339966,
0.2784121632575989,
0.08633545786142349,
-0.23837317526340485,
-0.40466973185539246,
0.0646500214934349,
-0.18994246423244476,
-0.11686692386865616,
0.33734145760536194,
-0.3670262098312378,
0.10299520194530487,
0.1408555507659912,
-0.3336954116821289,
0.4816080629825592,
-0.16561110317707062,
-0.16459544003009796,
0.20191749930381775,
-0.39824166893959045,
-0.08838991075754166,
0.15490855276584625,
-0.18833988904953003,
-0.08651845902204514,
-0.01042862981557846,
-0.2035205066204071,
-0.10642068088054657,
0.10763262212276459,
-0.11341563612222672,
-0.2887965738773346,
0.09650644659996033,
-0.24954544007778168,
0.029788760468363762,
-0.185846209526062,
0.0634327083826065,
-0.3321937918663025,
-0.09462402760982513,
0.1867457926273346,
-0.3426504135131836,
0.2871343791484833,
-0.17422166466712952,
-0.33610624074935913,
0.061368007212877274,
-0.11694908142089844,
-0.1123993918299675,
0.05193272978067398,
-0.18715308606624603,
-0.11768133193254471,
-0.26429688930511475,
-0.5564435720443726,
0.34575220942497253,
-0.06873516738414764,
0.13304562866687775,
-0.2591458261013031,
0.1160946786403656,
0.309104859828949,
0.025471052154898643,
0.02537926472723484,
-0.3204878866672516,
0.03291396051645279,
-0.07022767513990402,
-0.06103344261646271,
0.5930925011634827,
-0.2280663251876831,
0.07297902554273605,
0.15650731325149536,
0.12258251011371613,
0.4253534972667694,
0.059368424117565155,
-0.04813762009143829,
0.018267055973410606,
0.16441603004932404,
-0.10712550580501556,
0.16833733022212982,
0.20772135257720947,
-0.09768964350223541,
-0.1563349962234497,
0.47056177258491516,
0.3646203875541687,
-0.005498185753822327,
-0.13887818157672882,
0.18332530558109283,
-0.029336733743548393,
-0.26613762974739075,
0.17399048805236816,
0.29955804347991943,
0.38800960779190063,
-0.15468436479568481,
0.1660911738872528,
-0.15125295519828796,
0.07501860707998276,
-0.23211881518363953,
-0.1701999455690384,
0.3782021403312683,
-0.22228509187698364,
0.3915691077709198,
0.38634175062179565,
-0.391390860080719,
0.28226327896118164,
0.3291309177875519,
-0.08320371806621552,
0.020157255232334137,
-0.2512384057044983,
0.059998832643032074,
0.10806328058242798,
0.39214083552360535,
-0.22492487728595734,
-0.41628360748291016,
0.44021329283714294,
0.18641410768032074,
-0.3669566810131073,
-0.0029855386819690466,
-0.42167484760284424,
-0.697432279586792,
1.1738070249557495,
0.2573477625846863,
-0.15380901098251343,
0.0064690872095525265,
0.3078438341617584,
0.07863926142454147,
0.013955783098936081,
-0.20597481727600098,
-0.17019784450531006,
-0.13169465959072113,
-0.22176489233970642,
0.05816993862390518,
0.052162956446409225,
-0.045202843844890594,
-0.23918196558952332,
-0.14561119675636292,
0.4471740424633026,
-0.173331618309021,
-0.05078491196036339,
0.3019073009490967,
0.23295417428016663,
0.03599141165614128,
0.17397485673427582,
0.19019661843776703,
0.23997510969638824,
0.212004616856575,
0.27771034836769104,
-0.07665690779685974,
-0.4299619793891907,
0.1638706624507904,
-0.20159931480884552,
0.5481740236282349,
0.4593532681465149,
0.00662889564409852,
-0.09797999262809753,
-0.5291199088096619,
-0.027972925454378128,
0.30446916818618774,
0.16935303807258606,
0.24010688066482544,
-0.05303103104233742,
-0.3426639139652252,
-0.09143035113811493,
0.10913331806659698,
0.19105178117752075,
-0.30629444122314453,
-0.0053373780101537704,
-0.25501662492752075,
-0.0913890078663826,
0.055453527718782425,
0.2086661159992218,
0.9420135617256165,
0.2601417601108551,
0.19265395402908325,
0.13769152760505676,
-0.4085134267807007,
0.6010938286781311,
0.08202265202999115,
0.11725535243749619,
-0.26836130023002625,
0.12795370817184448,
0.06766246259212494,
-0.19924379885196686,
-0.12373532354831696,
-0.27354639768600464,
-0.2983323037624359,
-0.15898053348064423,
-0.3140905499458313,
-0.17261327803134918,
-0.10101423412561417,
0.3583069145679474,
-0.16427646577358246,
-0.08458207547664642,
0.4812367260456085,
0.03992164134979248,
0.35901692509651184,
0.006037719082087278,
-0.12389641255140305,
0.039435382932424545,
-0.37394189834594727,
-0.09885891526937485,
-0.586901068687439,
-0.24768787622451782,
-0.017537375912070274,
-0.021594496443867683,
-0.13268882036209106,
-0.6107326745986938,
0.047334011644124985,
0.2841532230377197,
0.2572387456893921,
-0.00015941129822749645,
-0.12712515890598297,
0.13643363118171692,
0.38360127806663513,
-0.09676249325275421,
0.35677164793014526,
0.14926087856292725,
0.03688780218362808,
-0.18864692747592926,
-0.2704181373119354,
-0.052709951996803284,
-0.0406089648604393,
0.010483527556061745,
0.1263318806886673,
-0.012774127535521984,
0.218448206782341,
-0.5251657366752625,
0.1823175847530365,
0.29482126235961914,
0.021330466493964195,
-0.20413561165332794,
0.11767836660146713,
0.10391682386398315,
-0.11028193682432175,
0.011642878875136375,
-0.3245985805988312,
-0.3441007733345032,
-0.10302157700061798,
-0.17645655572414398,
0.20903252065181732,
-0.032529667019844055,
-0.06588060408830643,
0.26345035433769226,
-0.16134972870349884,
-0.039363760501146317,
0.40477752685546875,
-0.48169565200805664,
-0.17575466632843018,
0.046746984124183655,
0.3898824155330658,
-0.48736777901649475,
-0.20789910852909088,
0.7181903123855591,
0.283985435962677,
0.12103213369846344,
-0.24420610070228577,
0.07768554240465164,
-0.21901755034923553,
0.2853497564792633,
-0.1448170244693756,
0.267201691865921,
-0.17149293422698975,
0.19368906319141388,
0.17945662140846252,
-0.2558463215827942,
-0.2345597743988037,
-0.05176554620265961,
-0.06454551964998245,
0.05571461096405983,
-0.081413634121418,
0.0005702083581127226,
-0.16191142797470093,
-0.08690181374549866,
-0.04640389233827591,
0.2907567322254181,
0.14834003150463104,
-0.10663330554962158,
-0.04548318684101105,
0.19944033026695251,
0.0568397156894207,
-0.17142173647880554,
-0.06163901835680008,
0.21247495710849762,
-0.1362294703722,
-0.13710752129554749,
0.12863869965076447,
-0.02904742769896984,
0.1667293757200241,
0.3370331823825836,
-0.6418236494064331,
0.22525155544281006,
0.09848261624574661,
0.4276834726333618,
0.20315243303775787,
0.33477112650871277,
0.1589769721031189,
0.2815193831920624,
-0.1367618441581726,
0.013174464926123619,
0.2245786339044571,
0.0837198868393898,
-0.13950960338115692,
0.16328498721122742,
-0.011857597157359123,
0.21651330590248108,
0.08821839094161987,
0.16160926222801208,
-0.01950552873313427,
0.3819691836833954,
-0.10949472337961197,
-0.07609503716230392,
0.29280754923820496,
0.10944101214408875,
-0.10391193628311157,
0.07779351621866226,
-0.3227870762348175,
0.10222601890563965,
-0.1177077516913414,
0.10590394586324692,
0.13384895026683807,
-0.0717744454741478,
-0.28603824973106384,
-0.09571842104196548,
0.2287207841873169,
0.43959516286849976,
0.04520251601934433,
0.2318580150604248,
-0.20782281458377838,
0.3169746398925781,
-0.1538722813129425,
-0.010630344972014427,
0.07696323841810226,
-0.3803689181804657,
0.3780268132686615,
-0.14781765639781952,
0.07938806712627411,
0.43931132555007935,
0.4490014314651489,
-0.12169808149337769,
0.5643338561058044,
0.09375589340925217,
0.1662645936012268,
0.07778961211442947,
-0.1747879683971405,
0.07629407197237015,
0.3394045829772949,
0.1429419368505478,
-0.5593453049659729,
0.011987046338617802,
0.009836921468377113,
0.05077267438173294,
-0.09076381474733353,
0.0733441486954689,
0.32125285267829895,
0.08121442794799805,
-0.1045706644654274,
-0.04042051360011101,
-0.003482548985630274,
0.08480841666460037,
-0.14082835614681244,
-0.08253898471593857,
0.25724300742149353,
-0.14289171993732452,
0.266638845205307,
-0.2509081959724426,
0.2829678952693939,
-0.13347291946411133,
0.2678283452987671,
-0.032118815928697586,
0.37512364983558655,
0.37953662872314453,
0.0595998652279377,
0.27360549569129944,
-0.12823975086212158,
-0.042559001594781876,
0.18633735179901123,
-0.007686734665185213,
0.24949659407138824,
0.38913002610206604,
0.1700572818517685,
0.2802574336528778,
0.058299336582422256,
-0.029289312660694122,
-0.1207246407866478,
-0.030432630330324173,
-0.04941016063094139,
-0.06762554496526718,
-0.10229718685150146,
-0.06966524571180344,
-0.20045730471611023,
0.18514969944953918,
0.16588586568832397,
-0.30868473649024963,
0.4326114356517792,
0.23650269210338593,
-0.08680123835802078,
-0.016157101839780807,
0.15643036365509033,
0.010687926784157753,
-0.10974740982055664,
0.050486113876104355,
0.29272326827049255,
0.3041374087333679,
0.13100965321063995,
-0.5701603293418884,
-0.12233293056488037,
0.1272026151418686,
-0.1752164661884308,
-0.5535449385643005,
0.1471068263053894,
0.07043036818504333,
0.10530157387256622,
0.18674053251743317,
0.13356223702430725,
0.032481174916028976,
-0.17004410922527313,
0.05899523198604584,
-0.09152662009000778,
-0.10227444767951965,
0.30590328574180603,
-0.0794074609875679,
0.0153197655454278,
0.10565881431102753,
0.051568444818258286,
0.07108410447835922,
-0.11111407727003098,
0.08735755831003189,
-0.20754696428775787,
0.23924194276332855,
0.26469239592552185,
0.24937881529331207,
0.32204124331474304,
0.6761338114738464,
-0.16049718856811523,
0.09593816846609116,
0.005575923714786768,
-0.054803021252155304,
-0.023848848417401314,
0.165002703666687,
-0.07995811849832535,
-0.3598211407661438,
-0.30139780044555664,
0.08759231865406036,
0.30002281069755554,
0.32684826850891113,
0.31174343824386597,
-0.1694517880678177,
-0.3693901002407074,
-0.32549452781677246,
0.07810422778129578,
-0.2393302023410797,
0.10115890204906464,
0.3707357347011566,
-0.17343901097774506,
-0.2449706345796585,
0.034040965139865875,
-0.1015896126627922,
0.4346279799938202,
-0.13820715248584747,
0.112789586186409,
-0.3447739779949188,
0.1693849265575409,
0.649117112159729,
-0.1134447529911995,
-0.6402674913406372,
-0.26782262325286865,
0.3487849831581116,
0.24953709542751312,
-0.2667505741119385,
0.14107635617256165,
0.2826903164386749,
-0.18790662288665771,
-0.011999722570180893,
0.8816471695899963,
-0.17402096092700958,
-0.24882838129997253,
-0.2054695338010788,
-0.05596598610281944
] |
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.07905146479606628,
0.005305801052600145,
0.022709064185619354,
0.17673128843307495,
-0.17504696547985077,
0.009194070473313332,
0.1926340013742447,
0.15998324751853943,
-1.0088422298431396,
0.0919717326760292,
0.11612185090780258,
0.03976002335548401,
-0.01693623699247837,
0.1187618300318718,
-0.06156918406486511,
0.3097827732563019,
0.0787527784705162,
0.060011859983205795,
0.14791862666606903,
-0.11915608495473862,
-0.3082512319087982,
0.3580760955810547,
-0.331066757440567,
0.04057799652218819,
-0.5341427326202393,
0.16513113677501678,
-0.09848033636808395,
0.18783581256866455,
-0.43420663475990295,
-0.4354424774646759,
0.3668314218521118,
0.1122715100646019,
0.41307926177978516,
0.01641717739403248,
-0.00011188627104274929,
-0.11925441771745682,
0.2520216405391693,
-0.14122174680233002,
-0.0766935870051384,
0.16946350038051605,
-0.05020998790860176,
-0.27380651235580444,
0.014766115695238113,
-0.027316169813275337,
-0.05033528804779053,
0.2545049786567688,
-0.10911502689123154,
0.2557537257671356,
0.07377193123102188,
0.3681804835796356,
0.21397696435451508,
0.03844790905714035,
0.17021872103214264,
-0.05148298665881157,
0.35415130853652954,
0.21729058027267456,
-0.05252237617969513,
0.3811750113964081,
-0.19514890015125275,
0.104010671377182,
-0.20996342599391937,
0.26880741119384766,
0.18733158707618713,
-0.2268103063106537,
0.3166733980178833,
0.15400034189224243,
0.2569654583930969,
-0.22149594128131866,
-0.2121857851743698,
0.35007578134536743,
0.29034659266471863,
-0.21424917876720428,
-0.19418737292289734,
-0.22967630624771118,
0.2725410461425781,
-0.4574775695800781,
0.06040465459227562,
0.04332003369927406,
-0.0058561949990689754,
0.013738179579377174,
-0.21385310590267181,
-0.5553433895111084,
-0.29264578223228455,
0.05859196558594704,
-0.3667197823524475,
0.3881666958332062,
-0.11572849005460739,
-0.10229024291038513,
0.18173864483833313,
0.05999142304062843,
0.6260011196136475,
0.010335393249988556,
-0.16928143799304962,
-0.143128901720047,
-0.11973617970943451,
-0.2859583795070648,
-0.05593464523553848,
0.0654563456773758,
0.263885498046875,
-0.06365489959716797,
-0.11569244414567947,
-0.45107072591781616,
0.21219906210899353,
-0.24826322495937347,
-0.00935836136341095,
0.11319559812545776,
0.28376486897468567,
0.23985563218593597,
0.11208292841911316,
0.22244122624397278,
0.2796359062194824,
0.11298421025276184,
-0.20290066301822662,
-0.059766512364149094,
-0.24347399175167084,
-0.06760773807764053,
-0.017915375530719757,
-0.2810792922973633,
0.12912261486053467,
0.19883257150650024,
0.06394579261541367,
-0.07963801920413971,
-0.10121239721775055,
0.01849358156323433,
0.0820041224360466,
0.4512065351009369,
0.0034325928427278996,
-0.1984366625547409,
-0.08452907204627991,
-0.3352281153202057,
-0.11661504954099655,
-0.2821265459060669,
-0.08293800055980682,
-0.045928675681352615,
0.035548411309719086,
-0.201243594288826,
0.18888400495052338,
-0.1283838301897049,
0.2089134156703949,
0.3528969883918762,
0.17743809521198273,
-0.17301005125045776,
0.14464955031871796,
-0.007326615508645773,
-0.2975330948829651,
-0.19501113891601562,
-0.05856534093618393,
0.16186141967773438,
-0.27998706698417664,
0.04854534566402435,
-0.09934739023447037,
-0.30435407161712646,
-0.4162813723087311,
0.12122361361980438,
-0.1019025519490242,
0.011826236732304096,
0.6224347949028015,
0.1664649397134781,
0.08264505863189697,
-0.17435847222805023,
0.06716466695070267,
-0.40802061557769775,
-0.3539324104785919,
-0.1758713275194168,
0.31934282183647156,
0.23307299613952637,
-0.2300451695919037,
-0.11733414977788925,
-0.09116522967815399,
-0.15054500102996826,
0.13107116520404816,
0.008416766300797462,
-0.17774511873722076,
0.11057599633932114,
-0.072057344019413,
-0.22153960168361664,
0.25182753801345825,
-0.3360653221607208,
-0.34178733825683594,
0.1112435981631279,
0.21982382237911224,
-0.3266858458518982,
-0.033013034611940384,
-0.05166817829012871,
0.34880566596984863,
-0.03355361521244049,
0.02224285900592804,
0.09916269034147263,
0.02203093096613884,
-0.21327143907546997,
-0.31793755292892456,
-0.2815464735031128,
-0.39548471570014954,
-0.10320790112018585,
0.14736054837703705,
-0.19749969244003296,
-0.35294514894485474,
0.03155675530433655,
0.30556899309158325,
0.19243310391902924,
0.01123743038624525,
0.30210405588150024,
0.3747839629650116,
-0.19042164087295532,
0.07839390635490417,
0.2963239848613739,
-0.6002671718597412,
0.03336140513420105,
-0.08809278160333633,
0.2312197983264923,
0.7295772433280945,
-0.08657703548669815,
-0.04869649559259415,
-0.10753533244132996,
0.19382423162460327,
-0.21021248400211334,
0.1165839210152626,
0.060215551406145096,
0.2370426207780838,
0.08849406242370605,
-0.1364409476518631,
0.07854671776294708,
-0.23631536960601807,
0.11352118104696274,
-0.2278851866722107,
-0.1792076677083969,
-0.08976946771144867,
-0.002487239195033908,
0.00924159586429596,
0.0679096207022667,
-0.17652975022792816,
0.2218802571296692,
0.044006310403347015,
0.3089011311531067,
0.30449169874191284,
-0.3136167824268341,
0.08099932968616486,
-0.0011137773981317878,
0.007004610728472471,
0.05681978911161423,
0.008292979560792446,
-0.27142736315727234,
-0.3744516670703888,
0.2555377781391144,
-0.08464056253433228,
0.08079978823661804,
0.4652869999408722,
-0.06986945867538452,
0.20971952378749847,
-0.0009585264488123357,
-0.14544735848903656,
-0.017178239300847054,
-0.07667334377765656,
-0.5671277046203613,
-0.27561333775520325,
0.35973450541496277,
-0.009008843451738358,
0.38063836097717285,
-0.3556630313396454,
-0.06700567901134491,
0.28654834628105164,
0.0019145773258060217,
-0.41076451539993286,
0.44181662797927856,
-0.3745269179344177,
-0.08145298063755035,
0.10613277554512024,
0.4837853014469147,
0.0947723463177681,
0.26297134160995483,
0.284714013338089,
0.17738014459609985,
-0.06069241091609001,
-0.0977046936750412,
0.38253939151763916,
0.07971800118684769,
0.6006681323051453,
0.22282098233699799,
0.015329874120652676,
0.09871137887239456,
0.08725039660930634,
-0.16376429796218872,
0.018188629299402237,
0.1527939885854721,
-0.21980443596839905,
-0.2572901248931885,
0.06017555668950081,
-0.067753367125988,
-0.07474900037050247,
-0.017705118283629417,
-0.32437512278556824,
-0.13961990177631378,
0.06038029491901398,
-0.23856884241104126,
0.07134707272052765,
-0.029460297897458076,
-0.5579317212104797,
0.33890339732170105,
-0.2254011034965515,
0.21552591025829315,
0.15094208717346191,
0.08237921446561813,
-0.50020831823349,
0.14829248189926147,
-0.10691848397254944,
-0.3531935214996338,
0.04819963127374649,
-0.41826915740966797,
0.06689505279064178,
0.23851190507411957,
-0.32649630308151245,
0.36969149112701416,
0.13476724922657013,
0.19042956829071045,
0.22300586104393005,
-0.3871462047100067,
-0.16407549381256104,
0.28418582677841187,
-0.1811351478099823,
0.018317870795726776,
-0.21519175171852112,
-0.02268640510737896,
-0.3398990035057068,
0.25748658180236816,
-0.1655430942773819,
-0.41320422291755676,
-0.06456775218248367,
-0.16896215081214905,
-0.0013992213644087315,
0.06847673654556274,
0.03592393174767494,
0.007292509078979492,
-0.02684878557920456,
-0.07572776824235916,
-0.4006310999393463,
0.27608147263526917,
-0.01145485695451498,
-0.2453078031539917,
0.2559419274330139,
0.0025325051974505186,
-0.18186408281326294,
-0.020004678517580032,
-0.17058153450489044,
0.13180504739284515,
-0.1081928014755249,
-0.6059451699256897,
0.23638200759887695,
-0.07030858844518661,
-0.010660854168236256,
-0.12749344110488892,
-0.059798602014780045,
0.31788620352745056,
0.23252762854099274,
-0.02608775906264782,
0.09492122381925583,
0.03831419721245766,
0.2087804079055786,
-0.1287233680486679,
0.4611244201660156,
-0.09768605977296829,
0.07730937749147415,
0.04596102982759476,
0.3247406482696533,
0.2846694588661194,
-0.2928979992866516,
-0.1263490617275238,
0.08746218681335449,
0.33588284254074097,
0.0002202821779064834,
0.2209351807832718,
0.025912946090102196,
0.035394005477428436,
0.015260743908584118,
0.3652918040752411,
0.2062506228685379,
-0.11519975960254669,
0.01741754449903965,
0.23813118040561676,
0.19254271686077118,
-0.16756141185760498,
0.03271365910768509,
0.23420217633247375,
0.6284463405609131,
-0.1660373955965042,
0.032945893704891205,
0.027678821235895157,
-0.33312511444091797,
-0.1734183430671692,
-0.12247209995985031,
0.19044433534145355,
-0.13016481697559357,
0.177604541182518,
0.5518295168876648,
-0.5440958142280579,
0.26398688554763794,
-0.05141882970929146,
0.0805387869477272,
0.11513794958591461,
-0.281725138425827,
-0.16047164797782898,
-0.006048829294741154,
0.467994749546051,
-0.048159487545490265,
-0.41257938742637634,
0.3504714369773865,
0.16530509293079376,
-0.473429411649704,
-0.12155445665121078,
-0.25876525044441223,
-0.5339024066925049,
1.0868719816207886,
0.5440804958343506,
-0.0359400250017643,
-0.23142564296722412,
0.33897778391838074,
-0.028615789487957954,
-0.22212719917297363,
-0.1624899059534073,
-0.2948036789894104,
0.0752849355340004,
-0.020975744351744652,
-0.05505690351128578,
-0.26033511757850647,
-0.11307599395513535,
-0.20744352042675018,
-0.010298623703420162,
0.20511731505393982,
-0.1974102258682251,
0.09648407995700836,
0.21911008656024933,
0.3813682496547699,
0.14023222029209137,
0.24319259822368622,
0.05938532203435898,
0.466658353805542,
0.4851014018058777,
0.15328562259674072,
-0.0573614165186882,
-0.27194899320602417,
0.28227323293685913,
-0.10912313312292099,
0.5299080014228821,
0.31078293919563293,
-0.05726319178938866,
-0.02130158431828022,
-0.20387877523899078,
0.07713908702135086,
0.07609602063894272,
0.21592289209365845,
0.3242281675338745,
-0.21654431521892548,
-0.3204387426376343,
-0.12043210864067078,
0.020163480192422867,
0.2061261683702469,
-0.20278514921665192,
-0.45433518290519714,
-0.14858025312423706,
-0.07301388680934906,
-0.10132015496492386,
0.4920629560947418,
0.8532770872116089,
0.06602252274751663,
0.29918622970581055,
-0.01713697239756584,
-0.2874812185764313,
0.48880496621131897,
-0.08671258389949799,
0.1391887366771698,
-0.3684086203575134,
-0.00796576775610447,
0.07105063647031784,
-0.1088034063577652,
-0.14667433500289917,
0.0864088162779808,
-0.13995477557182312,
0.0994459018111229,
-0.13181686401367188,
-0.24831785261631012,
-0.01217944361269474,
0.36271926760673523,
0.06245850399136543,
0.047075506299734116,
0.6486373543739319,
0.04023907333612442,
-0.0018706818809732795,
-0.18506228923797607,
-0.03301338106393814,
-0.06685100495815277,
-0.1162804514169693,
0.04118818789720535,
-0.13688594102859497,
-0.11154003441333771,
0.08052593469619751,
-0.02134803682565689,
0.1995278298854828,
-0.4030073583126068,
0.08989658951759338,
0.5373719930648804,
0.17341573536396027,
0.25247374176979065,
-0.26674821972846985,
-0.07807363569736481,
0.25933071970939636,
-0.1200408786535263,
0.3983040750026703,
0.13484857976436615,
0.05711734667420387,
-0.22006948292255402,
-0.2907456159591675,
-0.03893009200692177,
0.11887829750776291,
0.11488828808069229,
0.002232426544651389,
-0.32475849986076355,
0.13972796499729156,
-0.506587564945221,
0.14170843362808228,
0.07076559960842133,
0.041173581033945084,
-0.12315396219491959,
0.20836885273456573,
-0.12431614845991135,
-0.02244255505502224,
0.030800711363554,
-0.1415693461894989,
-0.38706710934638977,
-0.0869080051779747,
-0.1063447967171669,
0.27097776532173157,
0.27689096331596375,
0.1275363564491272,
0.1496860235929489,
-0.052711330354213715,
-0.08569102734327316,
0.29014912247657776,
-0.16133269667625427,
-0.15065382421016693,
0.15199854969978333,
0.4072238802909851,
-0.05591137707233429,
-0.09591875225305557,
0.22890989482402802,
0.2441459447145462,
0.01380125805735588,
-0.08439187705516815,
0.2946995496749878,
-0.4281076490879059,
0.18212461471557617,
-0.20106816291809082,
0.48216119408607483,
-0.11250170320272446,
-0.05479603260755539,
-0.07321470975875854,
-0.260174036026001,
-0.3238524794578552,
-0.015386444516479969,
-0.19747142493724823,
-0.08789535611867905,
-0.28027766942977905,
0.016867471858859062,
-0.2452736496925354,
-0.056128356605768204,
0.03208106756210327,
-0.08785424381494522,
-0.08350890129804611,
-0.18519741296768188,
-0.06912339478731155,
0.10991735756397247,
-0.03504224494099617,
-0.1135483831167221,
0.1861981600522995,
0.09873134642839432,
-0.33183225989341736,
-0.056874293833971024,
-0.07248495519161224,
-0.20562401413917542,
0.21655921638011932,
0.6052780151367188,
-0.4788675904273987,
0.017434317618608475,
0.21672716736793518,
0.3572167456150055,
0.06316869705915451,
0.2910679876804352,
0.19182446599006653,
0.5138147473335266,
-0.09727127850055695,
0.016756584867835045,
-0.08037299662828445,
0.139407217502594,
-0.37107667326927185,
-0.037503618746995926,
-0.0178777277469635,
0.08289258182048798,
-0.04806647449731827,
-0.00418538274243474,
0.13872312009334564,
0.11442700028419495,
-0.08109795302152634,
-0.11322849988937378,
0.2425556629896164,
0.2390529364347458,
-0.24246996641159058,
0.03844577819108963,
-0.17254501581192017,
0.058764636516571045,
-0.034702178090810776,
0.16506938636302948,
0.1652335524559021,
-0.06663107872009277,
-0.1837201714515686,
0.1502305120229721,
-0.09414961189031601,
0.42565542459487915,
-0.014578362926840782,
0.24392209947109222,
0.006996682845056057,
0.30488908290863037,
0.3469513952732086,
-0.12999150156974792,
0.15805526077747345,
-0.04525775834918022,
0.5192871689796448,
-0.04321862757205963,
-0.13205404579639435,
0.30897611379623413,
0.3415552079677582,
-0.44370603561401367,
0.4573957622051239,
0.19896817207336426,
0.11211781203746796,
0.0746014341711998,
-0.06781885027885437,
0.09700533002614975,
0.40119391679763794,
-0.13414785265922546,
-0.5298082232475281,
0.02781584858894348,
-0.09279967099428177,
-0.17680205404758453,
-0.1649041622877121,
-0.058829985558986664,
0.402444064617157,
0.3872845470905304,
-0.06080828234553337,
-0.15170545876026154,
-0.06671588867902756,
0.09235930442810059,
-0.24441105127334595,
0.05743652209639549,
0.500582754611969,
-0.02210625819861889,
0.0581258088350296,
-0.249732106924057,
0.031606610864400864,
-0.11271066218614578,
-0.004711884073913097,
-0.1360364705324173,
0.4472355544567108,
0.27429282665252686,
0.05042450129985809,
0.16266725957393646,
-0.19843187928199768,
0.2732846438884735,
0.04978287220001221,
-0.14462018013000488,
0.14204943180084229,
0.5019466876983643,
0.2180439829826355,
0.18412186205387115,
0.12611089646816254,
-0.01633005402982235,
-0.22221942245960236,
-0.12272963672876358,
0.03806570917367935,
-0.025414209812879562,
0.13666105270385742,
0.243660569190979,
-0.178556889295578,
0.15515072643756866,
0.2969261109828949,
-0.4654335081577301,
0.3182477355003357,
0.5749580264091492,
0.1311013102531433,
0.0354703925549984,
0.057807158678770065,
0.07111480832099915,
-0.17689596116542816,
0.04466988518834114,
0.20894025266170502,
0.16239973902702332,
-0.1082179844379425,
-0.5213893055915833,
-0.08115920424461365,
0.2729402482509613,
-0.10016102343797684,
-0.1645810604095459,
0.1313473880290985,
0.18350964784622192,
0.07779615372419357,
0.013211396522819996,
-0.11204638332128525,
-0.052708275616168976,
-0.43847566843032837,
0.18090660870075226,
-0.1560252159833908,
0.020243307575583458,
-0.11992708593606949,
-0.005276262294501066,
0.028947100043296814,
-0.11492208391427994,
-0.011854329146444798,
-0.12899290025234222,
-0.08106829971075058,
-0.0968911275267601,
0.13122323155403137,
0.3844473659992218,
0.4371201694011688,
0.2869355082511902,
0.21507887542247772,
0.35340699553489685,
-0.0599927119910717,
-0.2232438325881958,
-0.07869506627321243,
0.21015521883964539,
-0.2013535350561142,
-0.058558233082294464,
-0.20938560366630554,
-0.2135194092988968,
-0.319955438375473,
-0.13258054852485657,
0.1056051030755043,
0.2887853682041168,
0.2079712152481079,
-0.08566298335790634,
-0.3484726548194885,
-0.1450229436159134,
0.10127494484186172,
-0.26137182116508484,
0.2602858245372772,
0.2764101028442383,
-0.10399376600980759,
-0.2661340832710266,
-0.06568815559148788,
-0.007432627957314253,
0.3319244086742401,
0.09688597917556763,
0.29778334498405457,
-0.4783822298049927,
-0.023506002500653267,
0.27441051602363586,
0.03644378483295441,
-0.49608170986175537,
-0.07097075879573822,
0.4799348711967468,
0.13487552106380463,
-0.26060616970062256,
0.37228673696517944,
0.13075579702854156,
-0.08449768275022507,
-0.13513748347759247,
0.5800477266311646,
-0.3409998416900635,
-0.3498988151550293,
-0.5202124118804932,
-0.15781129896640778
] |
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.13010796904563904,
0.09629001468420029,
0.03945086896419525,
0.053366899490356445,
-0.2169310450553894,
0.007520818617194891,
0.15427373349666595,
-0.00016209053865168244,
-0.9731166362762451,
0.06726887822151184,
0.2056126743555069,
0.07014179229736328,
-0.05132923647761345,
-0.08427174389362335,
-0.08032701164484024,
0.3419831097126007,
-0.0675748959183693,
0.3278602957725525,
0.22854731976985931,
-0.12276341766119003,
-0.36684566736221313,
0.2775173485279083,
-0.27497804164886475,
-0.008239258080720901,
-0.39346593618392944,
0.08061215281486511,
-0.14193373918533325,
0.27101078629493713,
-0.24152685701847076,
-0.5320183038711548,
0.39744216203689575,
0.2227785438299179,
0.07723739743232727,
0.028881384059786797,
-0.00011551201896509156,
-0.21264971792697906,
0.38725143671035767,
-0.21596553921699524,
-0.20997418463230133,
0.47307687997817993,
-0.11290456354618073,
-0.7660291790962219,
-0.044373299926519394,
-0.44478270411491394,
0.03193454071879387,
0.5121638774871826,
-0.08175261318683624,
0.17434577643871307,
0.2542613744735718,
0.16135835647583008,
0.1676936000585556,
0.23931831121444702,
0.2375083714723587,
0.13331787288188934,
0.3475005030632019,
-0.024968521669507027,
-0.16960974037647247,
0.5508458614349365,
-0.20811355113983154,
0.12033341825008392,
-0.2780003547668457,
0.3548777103424072,
0.1467532366514206,
-0.23361405730247498,
0.13697245717048645,
-0.038033775985240936,
0.2645014226436615,
-0.0674743801355362,
-0.14199885725975037,
0.29095083475112915,
0.29439061880111694,
-0.2650744616985321,
-0.11949878185987473,
-0.5421314239501953,
0.26774969696998596,
-0.4985670745372772,
0.09953786432743073,
-0.036558933556079865,
-0.015111696906387806,
0.017059141770005226,
-0.25459861755371094,
-0.41988784074783325,
-0.32829567790031433,
0.12001685798168182,
-0.1598799228668213,
0.418084055185318,
-0.027240348979830742,
0.030142830684781075,
0.15385916829109192,
0.15866394340991974,
0.5796193480491638,
0.0767199918627739,
-0.24449428915977478,
0.02156628482043743,
-0.03778190538287163,
-0.4418599605560303,
0.19023023545742035,
-0.13099107146263123,
0.16423378884792328,
-0.21044740080833435,
-0.12043824791908264,
-0.41997066140174866,
-0.09010695666074753,
-0.05931009724736214,
0.019350161775946617,
0.054340660572052,
0.4128797650337219,
0.3364708423614502,
0.24082228541374207,
-0.1000608578324318,
0.41143953800201416,
0.14362233877182007,
-0.252966970205307,
-0.18112076818943024,
-0.12394508719444275,
0.16758282482624054,
-0.2642976641654968,
-0.24068981409072876,
0.1624811887741089,
0.15658318996429443,
-0.03493655472993851,
-0.07352836430072784,
-0.06181761994957924,
-0.017856642603874207,
0.27473974227905273,
0.35804399847984314,
0.06861726939678192,
-0.0945584774017334,
0.07715874910354614,
-0.2723608911037445,
-0.05946337804198265,
-0.3487530052661896,
0.005907965358346701,
-0.01715368777513504,
-0.18438509106636047,
-0.056259073317050934,
0.3026264011859894,
-0.3127998411655426,
0.25982362031936646,
0.31694433093070984,
0.15031664073467255,
0.012402566149830818,
0.09437458217144012,
0.048849351704120636,
-0.08826020359992981,
-0.14847682416439056,
0.02123878337442875,
0.17100127041339874,
-0.37301743030548096,
0.22069977223873138,
0.10787882655858994,
-0.38717490434646606,
-0.4981611669063568,
0.05744684860110283,
-0.3294163942337036,
-0.06611490249633789,
0.5692340731620789,
0.061552174389362335,
0.15338627994060516,
-0.2984738349914551,
0.24794821441173553,
-0.16791458427906036,
-0.17644448578357697,
-0.13770057260990143,
0.2795294523239136,
0.07242704927921295,
0.07722011208534241,
-0.2327021360397339,
-0.21927115321159363,
-0.14208003878593445,
0.21048443019390106,
0.04647008329629898,
-0.19113431870937347,
0.18372714519500732,
-0.08464378863573074,
-0.016906743869185448,
0.4908643960952759,
-0.3189496397972107,
-0.24930424988269806,
0.430147647857666,
-0.03689126670360565,
-0.21943970024585724,
-0.09887883067131042,
0.1389303356409073,
0.1706574559211731,
-0.19584321975708008,
-0.03320321440696716,
0.15176014602184296,
0.031092464923858643,
0.12894481420516968,
-0.33394166827201843,
-0.22194375097751617,
-0.2317958027124405,
-0.2167310267686844,
0.16336648166179657,
-0.22278602421283722,
-0.21781717240810394,
0.29569360613822937,
0.43389901518821716,
0.05951735004782677,
-0.06937972456216812,
0.24991585314273834,
0.36855337023735046,
-0.21286728978157043,
-0.10876655578613281,
0.49096015095710754,
-0.3863343894481659,
0.08844302594661713,
0.08078808337450027,
0.214643195271492,
0.7478343844413757,
-0.2653278112411499,
-0.23058122396469116,
-0.15998204052448273,
0.25983649492263794,
-0.003771808696910739,
0.11042029410600662,
0.15214107930660248,
0.1595446914434433,
0.2314087152481079,
0.14877967536449432,
0.07305525243282318,
-0.16152112185955048,
0.03717609867453575,
0.07722332328557968,
-0.18533439934253693,
-0.030261507257819176,
-0.11656475067138672,
0.16304530203342438,
0.3133796155452728,
0.040984299033880234,
0.22510789334774017,
-0.12525393068790436,
0.3692483901977539,
0.04595843702554703,
-0.048130977898836136,
0.07098136097192764,
-0.16615884006023407,
0.04617762938141823,
0.2672274708747864,
-0.012721954844892025,
-0.39322909712791443,
-0.41525450348854065,
0.061391353607177734,
0.01168004423379898,
0.09879370033740997,
0.5511186718940735,
-0.24389466643333435,
0.07469256967306137,
-0.08411341905593872,
-0.19023339450359344,
-0.1499231904745102,
-0.20794621109962463,
-0.2950228452682495,
-0.2136441469192505,
0.323147177696228,
-0.2128850817680359,
0.15343372523784637,
-0.3101693391799927,
-0.06339975446462631,
0.44164925813674927,
-0.18532367050647736,
-0.18470817804336548,
0.31806978583335876,
-0.24189473688602448,
-0.08907422423362732,
0.24813465774059296,
0.2256140559911728,
0.015950964763760567,
0.2709317207336426,
0.28303903341293335,
0.13575446605682373,
-0.24085144698619843,
-0.12831589579582214,
0.17523203790187836,
0.23882323503494263,
0.4394448399543762,
0.23919592797756195,
0.09228673577308655,
0.11481355130672455,
0.03407164663076401,
-0.004528902471065521,
-0.005415708292275667,
-0.027731681242585182,
-0.22798766195774078,
-0.36219459772109985,
0.1602543443441391,
-0.1504976600408554,
-0.06508225202560425,
-0.3093797266483307,
-0.22545063495635986,
-0.3511166274547577,
0.10185340791940689,
-0.1388072371482849,
-0.1369156837463379,
0.11451946943998337,
-0.5290243625640869,
0.41891995072364807,
-0.03922191262245178,
0.2031296193599701,
0.20474494993686676,
-0.2497674971818924,
-0.5104732513427734,
0.08534501492977142,
-0.04100541025400162,
-0.30614355206489563,
0.3523704409599304,
-0.4794408977031708,
0.028088806197047234,
0.24861985445022583,
-0.4806945323944092,
0.3634321391582489,
-0.08300323039293289,
-0.15813498198986053,
0.2018321305513382,
-0.20512965321540833,
-0.38333195447921753,
0.1208053007721901,
-0.24498549103736877,
0.22460679709911346,
-0.15399938821792603,
0.0005648088990710676,
-0.07204631716012955,
0.21230269968509674,
-0.4482308328151703,
-0.1638089120388031,
0.16696666181087494,
-0.337891548871994,
0.1977343112230301,
-0.0912569984793663,
0.01607426442205906,
0.08179276436567307,
-0.162283256649971,
0.20118451118469238,
-0.18186968564987183,
0.11547928303480148,
-0.11367293447256088,
0.01670769602060318,
0.22593455016613007,
-0.0811314582824707,
-0.16622339189052582,
0.06995844841003418,
-0.23872093856334686,
0.010603596456348896,
-0.30786243081092834,
-0.7261508703231812,
0.07437492907047272,
0.059525683522224426,
-0.06015824154019356,
-0.11508245021104813,
0.037605058401823044,
0.21317192912101746,
0.1127520352602005,
0.05231945216655731,
-0.08557415008544922,
-0.1226234957575798,
0.16212928295135498,
0.09451085329055786,
0.5319266319274902,
-0.2228880524635315,
0.30962976813316345,
-0.0022927792742848396,
0.15905599296092987,
0.28537628054618835,
-0.0007305496837943792,
-0.22525687515735626,
-0.0015947174979373813,
0.2930029332637787,
0.2588471472263336,
0.32865849137306213,
0.3251234292984009,
0.10309933871030807,
-0.13795562088489532,
0.45384088158607483,
0.0774000957608223,
-0.1460176557302475,
0.05539689213037491,
0.14415666460990906,
0.01693861372768879,
-0.4341699481010437,
0.05735485255718231,
0.11680690944194794,
0.5626435875892639,
-0.2184775322675705,
-0.008421259932219982,
-0.10973425954580307,
-0.16501350700855255,
-0.23411794006824493,
-0.029320068657398224,
0.3005228638648987,
-0.029177522286772728,
0.20548851788043976,
0.24581876397132874,
-0.5631024837493896,
0.21508842706680298,
-0.03627796471118927,
0.08299043029546738,
0.1746264547109604,
-0.2535679340362549,
-0.23569965362548828,
0.104434534907341,
0.0360959954559803,
-0.09381787478923798,
-0.20633110404014587,
0.3459341526031494,
0.32525673508644104,
-0.29109838604927063,
-0.21757635474205017,
-0.22080311179161072,
-0.26990774273872375,
1.2819188833236694,
0.4255768656730652,
-0.38629618287086487,
0.04303550720214844,
0.37623271346092224,
-0.14831775426864624,
-0.14912715554237366,
-0.21907305717468262,
-0.39829036593437195,
-0.1763944923877716,
-0.19425158202648163,
0.11788635700941086,
-0.015451856888830662,
-0.08903256803750992,
-0.12346053868532181,
0.09127960354089737,
0.32054102420806885,
-0.17800402641296387,
0.09684178233146667,
0.3929637372493744,
0.22838594019412994,
0.5601587891578674,
0.1672637164592743,
0.05112123489379883,
0.3188781142234802,
-0.05534479394555092,
0.19465519487857819,
0.11765483766794205,
-0.08283430337905884,
0.2511397898197174,
-0.35255953669548035,
0.4620981216430664,
0.3488355278968811,
0.13131682574748993,
-0.10071646422147751,
-0.1621299833059311,
0.0177412498742342,
0.17482031881809235,
0.3541531264781952,
0.1557818055152893,
-0.32480180263519287,
-0.32516565918922424,
-0.14338858425617218,
0.2663402557373047,
0.06850884854793549,
-0.1487400084733963,
-0.41195404529571533,
-0.19027142226696014,
-0.2139977514743805,
-0.15380452573299408,
0.239215686917305,
0.8080552220344543,
0.12398327142000198,
0.17042721807956696,
0.3559846878051758,
-0.2942589223384857,
0.49233558773994446,
0.08145066350698471,
0.03882982209324837,
-0.33180949091911316,
0.26948848366737366,
0.14304295182228088,
-0.041259486228227615,
-0.2466948926448822,
-0.048389922827482224,
-0.41653767228126526,
-0.003149596741423011,
0.002239014022052288,
-0.24130281805992126,
-0.09307247400283813,
0.32376062870025635,
0.05278417095541954,
0.06395354866981506,
0.27525609731674194,
0.038937412202358246,
0.1326099932193756,
-0.051002368330955505,
0.012095743790268898,
-0.25951647758483887,
-0.17580704391002655,
-0.177046537399292,
-0.35323527455329895,
-0.3114778995513916,
0.14125989377498627,
0.018509328365325928,
-0.02365589328110218,
-0.409552663564682,
0.1921205222606659,
0.27702006697654724,
0.35891029238700867,
0.297050416469574,
-0.2169283777475357,
-0.10931135714054108,
0.2528964877128601,
-0.2034260779619217,
0.35744863748550415,
0.24697524309158325,
0.03481851518154144,
-0.28306472301483154,
-0.19564829766750336,
0.15171830356121063,
-0.10017713159322739,
-0.037682052701711655,
0.14607775211334229,
-0.17815931141376495,
0.01420816220343113,
-0.3417794406414032,
-0.03545304387807846,
0.3411014974117279,
-0.08775433897972107,
-0.01002997625619173,
0.13758614659309387,
0.09325173497200012,
-0.03530140221118927,
-0.15632332861423492,
-0.28208184242248535,
-0.20600461959838867,
-0.04445650428533554,
-0.393948495388031,
0.13725391030311584,
0.18241126835346222,
-0.021891089156270027,
0.04239057004451752,
0.022850049659609795,
0.0014151375507935882,
0.1289571225643158,
-0.4131375849246979,
-0.07709551602602005,
-0.06685738265514374,
0.5177924633026123,
-0.29522353410720825,
-0.2913728952407837,
0.2481759637594223,
0.1947963982820511,
0.29998883605003357,
-0.10228275507688522,
0.2632979452610016,
-0.40712547302246094,
0.251320481300354,
-0.2720458507537842,
0.44590574502944946,
0.000008848403922456782,
0.40267881751060486,
-0.07454828172922134,
-0.18729041516780853,
-0.2772980034351349,
-0.27209872007369995,
-0.22974826395511627,
0.010797973722219467,
-0.18794965744018555,
0.045885905623435974,
-0.14564287662506104,
-0.12315236777067184,
-0.027406860142946243,
0.16666309535503387,
-0.0020090502221137285,
-0.10856494307518005,
0.026101751253008842,
0.16789942979812622,
0.04580976068973541,
-0.036275409162044525,
0.22900165617465973,
0.001738367835059762,
-0.1395779550075531,
-0.020596235990524292,
0.03945005312561989,
-0.3833729922771454,
0.13144461810588837,
0.660442054271698,
-0.5886905193328857,
0.4171711802482605,
0.25117403268814087,
0.2564396858215332,
-0.019274549558758736,
0.353210985660553,
-0.11483392864465714,
0.5428200364112854,
-0.004675347823649645,
0.103853240609169,
0.24781960248947144,
0.06584317982196808,
-0.3922310471534729,
0.14414727687835693,
-0.0034277737140655518,
0.15521323680877686,
-0.07603446394205093,
0.004132846836000681,
-0.0537702701985836,
0.07223508507013321,
-0.2965034544467926,
-0.1990164816379547,
0.21631303429603577,
0.1753440797328949,
-0.29901620745658875,
0.18871255218982697,
-0.16726672649383545,
-0.034873589873313904,
0.158766970038414,
0.14922118186950684,
0.03163020312786102,
-0.10849243402481079,
-0.18700982630252838,
0.2079923003911972,
-0.1151563823223114,
0.38942408561706543,
-0.018680457025766373,
0.26229873299598694,
-0.09827104955911636,
0.27523741126060486,
0.09796726703643799,
-0.13200350105762482,
0.2643313705921173,
-0.40305179357528687,
0.5268943309783936,
-0.16619844734668732,
-0.12497059255838394,
0.26963549852371216,
0.18433748185634613,
-0.21038050949573517,
0.363931804895401,
0.3102308511734009,
0.09927650541067123,
0.25281596183776855,
0.04095616191625595,
0.11011329293251038,
0.1543637216091156,
0.1772451400756836,
-0.6114675998687744,
0.1304253190755844,
-0.021784750744700432,
0.03717814385890961,
0.002564942929893732,
0.24862107634544373,
0.19745688140392303,
0.11357448995113373,
-0.07056427001953125,
-0.030934499576687813,
-0.3614552915096283,
0.035695064812898636,
-0.07797940820455551,
0.2171178162097931,
0.33587273955345154,
0.14980371296405792,
0.09457551687955856,
-0.369161993265152,
0.03716098144650459,
-0.1639920175075531,
-0.026407983154058456,
-0.11657789349555969,
0.4230065643787384,
0.3049895167350769,
0.014247661456465721,
0.17972399294376373,
-0.06231539323925972,
0.1979973018169403,
0.15745943784713745,
-0.13977672159671783,
0.0717100128531456,
0.3436504006385803,
0.08094310760498047,
0.2746039628982544,
0.10123322159051895,
-0.06630122661590576,
0.040720414370298386,
-0.1917508840560913,
-0.1818830966949463,
0.02576301433146,
0.14800895750522614,
0.15532606840133667,
-0.2714477777481079,
0.13517439365386963,
0.1511497050523758,
-0.2748749256134033,
0.3268390893936157,
0.36956921219825745,
0.33354651927948,
0.09222079068422318,
-0.11992441117763519,
0.046059757471084595,
-0.05181442201137543,
0.13571128249168396,
0.33516648411750793,
0.11566980928182602,
0.05916612222790718,
-0.6472338438034058,
-0.26151490211486816,
0.2753869891166687,
-0.18589864671230316,
-0.6451835632324219,
0.3044978976249695,
0.023329945281147957,
0.10429559648036957,
0.07858922332525253,
-0.11200376600027084,
-0.1032508835196495,
-0.46637117862701416,
-0.122479148209095,
-0.1709790676832199,
-0.18593282997608185,
0.033265456557273865,
-0.08088581264019012,
0.061683133244514465,
-0.055532392114400864,
0.08941930532455444,
0.08451378345489502,
-0.005715695209801197,
-0.07989850640296936,
0.15644530951976776,
0.4028078615665436,
0.5088064074516296,
0.277264267206192,
0.1935526728630066,
0.5034731030464172,
-0.16098904609680176,
-0.21870945394039154,
0.0961424931883812,
0.015353032387793064,
-0.04061989486217499,
-0.17197240889072418,
-0.23269908130168915,
-0.09010592103004456,
-0.20258381962776184,
0.19032318890094757,
-0.013450508005917072,
0.29780933260917664,
0.23215730488300323,
-0.09349846094846725,
-0.11281523108482361,
-0.1320219784975052,
-0.0002958972763735801,
-0.1756170690059662,
0.0633368268609047,
0.2933475077152252,
-0.09903991967439651,
-0.03282853588461876,
-0.06937804073095322,
-0.22041864693164825,
0.2743247449398041,
-0.09550270438194275,
0.1714579313993454,
-0.269641637802124,
0.1478174477815628,
0.08460335433483124,
0.10204610228538513,
-0.5734165906906128,
-0.002199826529249549,
0.44563713669776917,
0.39070314168930054,
-0.3774709701538086,
0.28123894333839417,
0.1921706348657608,
-0.11856816709041595,
0.031697969883680344,
0.6229763627052307,
-0.28076043725013733,
-0.5063768625259399,
-0.4081284701824188,
-0.2519995868206024
] |
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.11777999252080917,
-0.149089977145195,
-0.12398058921098709,
0.406358927488327,
-0.14216803014278412,
-0.18602581322193146,
0.2695666551589966,
0.010811260901391506,
-0.9765855073928833,
0.12976138293743134,
0.031708974391222,
-0.04653014615178108,
0.029542744159698486,
0.17403796315193176,
-0.07360436022281647,
0.12774553894996643,
0.0628562793135643,
-0.11948887258768082,
-0.07110372930765152,
-0.16196931898593903,
-0.14691190421581268,
0.42279765009880066,
-0.3452402651309967,
-0.05698104202747345,
-0.47104907035827637,
0.2424958050251007,
-0.12262775003910065,
0.07011741399765015,
-0.5567562580108643,
-0.3233380913734436,
0.40870052576065063,
-0.0866103246808052,
0.17693258821964264,
0.35544219613075256,
-0.00010404671775177121,
-0.17485757172107697,
0.224698007106781,
-0.11574235558509827,
-0.06555585563182831,
0.24040193855762482,
-0.2004331648349762,
-0.1920391023159027,
-0.15475307404994965,
-0.03028588369488716,
0.02811148576438427,
0.27323612570762634,
-0.3089979290962219,
0.29939261078834534,
0.1822165697813034,
0.2430882453918457,
0.2945325970649719,
0.08092090487480164,
0.2179151326417923,
-0.17604485154151917,
0.2989799976348877,
0.19175861775875092,
-0.1165723204612732,
0.2260446548461914,
-0.13072039186954498,
0.22758373618125916,
-0.08728357404470444,
0.28604212403297424,
0.3349746763706207,
-0.1724303960800171,
0.0849059447646141,
-0.02619178034365177,
-0.08708175271749496,
-0.08644367009401321,
0.09545333683490753,
0.3211066424846649,
0.3949129283428192,
-0.31217852234840393,
-0.40265268087387085,
-0.1913689821958542,
0.03105190023779869,
-0.3462633788585663,
0.056320708245038986,
0.009638815186917782,
0.04613189399242401,
-0.05843694135546684,
-0.498258113861084,
-0.1443537473678589,
-0.20755675435066223,
-0.04255836084485054,
-0.3624976873397827,
0.45122402906417847,
-0.24200695753097534,
0.017778633162379265,
0.10087147355079651,
-0.05274088680744171,
0.41424643993377686,
0.027484947815537453,
-0.09224429726600647,
-0.08609513938426971,
-0.24077469110488892,
-0.3211272656917572,
0.11061970889568329,
-0.12677590548992157,
0.4134696424007416,
-0.1761905550956726,
-0.32135674357414246,
-0.419523149728775,
0.0159682035446167,
-0.33418509364128113,
0.18793953955173492,
0.2340657114982605,
0.01041554193943739,
0.16689172387123108,
0.11904706060886383,
0.0761188194155693,
0.27233827114105225,
0.09307568520307541,
-0.2449101209640503,
-0.1001407727599144,
-0.2591288685798645,
-0.019995352253317833,
-0.14235492050647736,
-0.28683650493621826,
-0.10391665250062943,
0.09911176562309265,
-0.09187132120132446,
-0.15839672088623047,
-0.04698781669139862,
0.15262429416179657,
-0.007952430285513401,
0.4125005900859833,
-0.12674064934253693,
-0.055518873035907745,
-0.025935443118214607,
-0.2938326597213745,
-0.236273393034935,
-0.30698496103286743,
-0.11960861831903458,
-0.2069772183895111,
-0.13348183035850525,
-0.14952830970287323,
0.29413214325904846,
-0.11338221281766891,
0.2720681428909302,
0.20488396286964417,
0.020979732275009155,
-0.13109879195690155,
0.03509778156876564,
-0.0036283787339925766,
-0.21244403719902039,
-0.24516387283802032,
-0.09873654693365097,
0.16802318394184113,
-0.25606444478034973,
-0.12840767204761505,
0.05714023858308792,
-0.3249763548374176,
-0.38232067227363586,
0.17053154110908508,
-0.19792801141738892,
-0.029026729986071587,
0.5316368937492371,
0.09593676030635834,
0.050576649606227875,
0.15573345124721527,
0.14039205014705658,
-0.34081748127937317,
-0.06990756839513779,
-0.22923122346401215,
0.3176361322402954,
0.0836290568113327,
-0.1907849758863449,
-0.07872036844491959,
-0.08769615739583969,
-0.20946048200130463,
0.17757736146450043,
0.21580523252487183,
-0.0621553398668766,
-0.09345832467079163,
-0.1083810105919838,
-0.2343144714832306,
0.1496349722146988,
-0.36167919635772705,
-0.4399794638156891,
0.22092080116271973,
0.17576895654201508,
-0.2946113348007202,
0.0770808607339859,
-0.02188269980251789,
0.3208504319190979,
0.04633321985602379,
0.09113859385251999,
0.09181386232376099,
0.04175296053290367,
-0.034882139414548874,
-0.1790224015712738,
-0.34284543991088867,
-0.3542279899120331,
-0.1385771483182907,
0.2041586935520172,
-0.34457364678382874,
-0.14810532331466675,
0.0730542540550232,
0.37618914246559143,
0.22624646127223969,
-0.0707726925611496,
0.262015700340271,
0.49646908044815063,
-0.14206546545028687,
0.020205995067954063,
0.261813759803772,
-0.3479643166065216,
0.03894500434398651,
0.12039632350206375,
0.11058938503265381,
0.7259975671768188,
-0.17053695023059845,
-0.2706592381000519,
0.04658082500100136,
0.24936498701572418,
-0.09994467347860336,
0.20311520993709564,
0.04045899957418442,
0.36503931879997253,
-0.004092110786587,
-0.11047128587961197,
0.11397425830364227,
-0.017898615449666977,
-0.02927575446665287,
0.1010705828666687,
-0.13705821335315704,
-0.0016142388340085745,
-0.06534218043088913,
0.15497830510139465,
0.24030306935310364,
-0.04119220748543739,
0.10021006315946579,
-0.047953058034181595,
0.22809579968452454,
0.3012150824069977,
-0.20310261845588684,
0.20461808145046234,
0.04229441285133362,
0.0624803826212883,
0.22545549273490906,
0.0878700539469719,
-0.42477884888648987,
-0.23242543637752533,
0.27758315205574036,
-0.1241128221154213,
0.22564707696437836,
0.48455482721328735,
-0.23233076930046082,
0.1195516288280487,
-0.029378386214375496,
0.025112852454185486,
-0.08480606228113174,
0.005210361909121275,
-0.3428603410720825,
-0.2204592525959015,
0.18156267702579498,
0.057542379945516586,
0.26551249623298645,
-0.36896994709968567,
0.03828435391187668,
0.3136281967163086,
-0.04310694336891174,
-0.3063024580478668,
0.2688687741756439,
-0.49136480689048767,
-0.0822649821639061,
0.22808898985385895,
0.46486011147499084,
0.10761496424674988,
0.2788805365562439,
0.4253000319004059,
0.06829439103603363,
0.05181291326880455,
-0.04457751289010048,
0.19962996244430542,
0.047905027866363525,
0.4186438322067261,
0.14364129304885864,
0.0831095278263092,
0.09657841920852661,
-0.03898809477686882,
-0.0646342858672142,
-0.005044093821197748,
0.004276348743587732,
-0.08243858069181442,
-0.24268847703933716,
-0.09078703075647354,
-0.010019205510616302,
-0.012167692184448242,
-0.21765591204166412,
-0.25143784284591675,
-0.16269910335540771,
0.12141761928796768,
-0.3009020984172821,
0.051075685769319534,
-0.06331045180559158,
-0.3588639795780182,
0.16813693940639496,
0.013689742423593998,
0.3135438859462738,
0.23851515352725983,
0.13889354467391968,
-0.4799480736255646,
0.2259170562028885,
-0.1357046514749527,
-0.3781638741493225,
0.2379620373249054,
-0.4166472256183624,
0.06953950226306915,
0.08195170760154724,
-0.29977867007255554,
0.38625437021255493,
-0.12782810628414154,
0.006458026822656393,
0.16388750076293945,
-0.34232833981513977,
-0.2572751045227051,
0.35634708404541016,
-0.0730229914188385,
-0.1017332673072815,
-0.2386433333158493,
0.005729706026613712,
-0.30397653579711914,
0.08573082089424133,
-0.2400321215391159,
-0.2603771388530731,
-0.0834302231669426,
-0.09324316680431366,
0.19438043236732483,
0.01876021921634674,
-0.027861347422003746,
0.024029415100812912,
0.11475316435098648,
0.15723660588264465,
-0.21346721053123474,
0.1495199054479599,
-0.28038668632507324,
-0.3806747496128082,
0.1139083132147789,
-0.03517446666955948,
-0.22255225479602814,
0.048199523240327835,
0.030506953597068787,
0.09311629086732864,
-0.15763793885707855,
-0.6883489489555359,
-0.0888281911611557,
-0.15760889649391174,
0.12907665967941284,
-0.12521037459373474,
0.1556967794895172,
0.22304552793502808,
0.053997110575437546,
-0.1211584135890007,
-0.11042343825101852,
-0.15637488663196564,
0.04112701863050461,
0.09459482878446579,
0.6660493016242981,
-0.19457387924194336,
0.20592491328716278,
0.24367313086986542,
0.462705135345459,
0.4733084738254547,
-0.2580983340740204,
-0.08673971891403198,
-0.006799291353672743,
0.2599477171897888,
0.012500095181167126,
0.30475541949272156,
0.34876471757888794,
-0.06934545189142227,
-0.04285610094666481,
0.3592759966850281,
0.23119309544563293,
-0.011224702000617981,
0.1118726134300232,
0.2965574562549591,
0.10823723673820496,
-0.07360918819904327,
-0.005964001640677452,
0.40281251072883606,
0.444723516702652,
-0.1062420979142189,
0.14737601578235626,
-0.13482926785945892,
-0.10461762547492981,
-0.12107527256011963,
-0.260517418384552,
0.09954938292503357,
-0.1071477085351944,
0.2515938878059387,
0.34484806656837463,
-0.6651986241340637,
0.32503336668014526,
0.05197743698954582,
0.026449130848050117,
0.06465931236743927,
-0.1042146161198616,
-0.10223059356212616,
0.08454664796590805,
0.4017074704170227,
0.015803582966327667,
-0.1736898273229599,
0.2601073682308197,
-0.028571007773280144,
-0.3924728333950043,
-0.09871228039264679,
-0.41333916783332825,
-0.41861602663993835,
1.0134063959121704,
0.47790876030921936,
-0.1989348828792572,
-0.07238226383924484,
0.28430527448654175,
0.14225520193576813,
-0.06981366127729416,
-0.15598678588867188,
-0.3303982615470886,
-0.1588706076145172,
0.04165690764784813,
0.058585796505212784,
-0.023408859968185425,
0.006052290089428425,
-0.13934345543384552,
-0.1141657829284668,
0.2211965173482895,
-0.240044504404068,
0.03033752739429474,
0.2552056610584259,
0.4171558618545532,
0.27113157510757446,
0.19917811453342438,
-0.02217060513794422,
0.35900527238845825,
0.23648293316364288,
0.38726314902305603,
0.07967373728752136,
-0.2558590769767761,
0.33165279030799866,
-0.005172151606529951,
0.443492591381073,
0.35732367634773254,
-0.027747901156544685,
-0.1808559000492096,
-0.26133251190185547,
0.16654764115810394,
0.08239525556564331,
0.2123361974954605,
0.3883031904697418,
-0.011576049961149693,
-0.2462444007396698,
-0.11238913983106613,
0.18287692964076996,
0.10397148877382278,
-0.065953329205513,
-0.24619309604167938,
-0.08138088136911392,
0.020325686782598495,
-0.08066144585609436,
0.28850647807121277,
0.8127246499061584,
-0.08199035376310349,
0.05961085110902786,
0.04117577150464058,
-0.3376258909702301,
0.2398924082517624,
-0.06954313069581985,
0.11487603932619095,
-0.3390146493911743,
-0.08353981375694275,
0.13620978593826294,
-0.11373179405927658,
-0.24181100726127625,
-0.07806894183158875,
-0.1553235501050949,
0.03906882926821709,
-0.14247532188892365,
-0.09211660176515579,
-0.0923302173614502,
0.2410520762205124,
-0.013318508863449097,
0.15704762935638428,
0.4033719301223755,
0.2571754455566406,
0.24672190845012665,
0.031208880245685577,
-0.00768706202507019,
-0.09422797709703445,
-0.2511577010154724,
-0.031015928834676743,
-0.4506998062133789,
-0.14965446293354034,
-0.04153900966048241,
0.04370669648051262,
0.14639602601528168,
-0.44778281450271606,
-0.05231277272105217,
0.40754085779190063,
0.19180068373680115,
0.17629900574684143,
-0.17787645757198334,
0.11436787992715836,
0.15891526639461517,
0.16220763325691223,
0.4319056570529938,
0.21484072506427765,
-0.1464109718799591,
-0.18852271139621735,
-0.2969200015068054,
0.13717737793922424,
0.06685790419578552,
0.05084654688835144,
0.0620933473110199,
-0.18321941792964935,
0.008464336395263672,
-0.493852823972702,
0.3007800281047821,
0.0256844200193882,
0.06528721749782562,
-0.015288579277694225,
0.2463904470205307,
0.07471094280481339,
-0.051932718604803085,
0.03467236086726189,
-0.07042047381401062,
-0.43629637360572815,
-0.16064681112766266,
-0.10923367738723755,
0.1591436266899109,
0.3684764504432678,
-0.07097430527210236,
0.10984350740909576,
0.03274478018283844,
-0.03099404089152813,
0.26324722170829773,
-0.34977179765701294,
-0.04679585248231888,
0.04117473587393761,
0.06604751944541931,
-0.22398243844509125,
-0.10873477160930634,
0.19834581017494202,
0.38624706864356995,
-0.0009006544132716954,
-0.20269806683063507,
0.11716671288013458,
-0.3669368624687195,
0.1662435680627823,
-0.14059333503246307,
0.46737080812454224,
-0.256917268037796,
0.17297154664993286,
-0.022885795682668686,
-0.35014382004737854,
-0.3971061706542969,
-0.12634052336215973,
-0.2659686207771301,
-0.11352511495351791,
-0.39127877354621887,
-0.18057465553283691,
-0.10140296816825867,
-0.01712210848927498,
0.14419998228549957,
-0.052401162683963776,
-0.12381190806627274,
-0.27015814185142517,
-0.02788287028670311,
0.05541236326098442,
-0.07997101545333862,
-0.12377874553203583,
0.07321884483098984,
0.12106648087501526,
-0.3472323417663574,
-0.055411625653505325,
0.14605361223220825,
-0.039532553404569626,
0.22611011564731598,
0.4076477587223053,
-0.5039839744567871,
0.07259490340948105,
0.2214101403951645,
0.2120591104030609,
0.3264288902282715,
0.39905786514282227,
0.08246174454689026,
0.4527711570262909,
0.15572112798690796,
0.06853678822517395,
-0.0174627136439085,
0.042617831379175186,
-0.2237728089094162,
-0.03870723024010658,
0.08531887084245682,
0.16770651936531067,
0.13168630003929138,
0.2200067937374115,
0.2272941619157791,
0.18329568207263947,
-0.1064094677567482,
0.04827585071325302,
0.15940062701702118,
0.30505460500717163,
-0.27438363432884216,
0.10712303221225739,
-0.24878890812397003,
0.36901792883872986,
-0.0323476567864418,
0.17794200778007507,
0.17119619250297546,
0.03996412083506584,
-0.03352266550064087,
0.07940057665109634,
0.08340588212013245,
0.525468647480011,
-0.01635114476084709,
0.1120557188987732,
-0.018553508445620537,
0.40082627534866333,
0.25235792994499207,
-0.20617733895778656,
0.16379737854003906,
0.03493652492761612,
0.3331681191921234,
-0.11944133788347244,
-0.2856724262237549,
0.29205521941185,
0.356574684381485,
-0.16821040213108063,
0.33400288224220276,
0.18331378698349,
-0.06671273708343506,
0.017981261014938354,
-0.0859551727771759,
0.16779054701328278,
-0.01209443248808384,
-0.0016970080323517323,
-0.7779330611228943,
0.05127421393990517,
-0.056156717240810394,
-0.10494952648878098,
0.12080958485603333,
-0.08152008801698685,
0.17091885209083557,
0.33472517132759094,
-0.2347365766763687,
-0.12702856957912445,
0.055020008236169815,
-0.07581094652414322,
-0.13941402733325958,
-0.050918273627758026,
0.10899267345666885,
0.20494715869426727,
0.07400831580162048,
-0.2799780070781708,
0.2123621553182602,
0.07560968399047852,
0.10400260984897614,
-0.10481654852628708,
0.405782014131546,
0.2850220799446106,
-0.08171538263559341,
0.016661033034324646,
-0.09043991565704346,
0.20107220113277435,
0.10498993843793869,
-0.2600869834423065,
0.09408790618181229,
0.33851075172424316,
0.07876729965209961,
0.25973644852638245,
0.20111197233200073,
-0.13432912528514862,
-0.24169191718101501,
-0.2874896228313446,
0.050414953380823135,
-0.18829277157783508,
0.15379197895526886,
-0.14916746318340302,
-0.09165177494287491,
0.05430527776479721,
0.13055169582366943,
-0.49235647916793823,
0.22768980264663696,
0.3193548023700714,
0.05561170354485512,
0.1301303207874298,
-0.019379673525691032,
0.11609434336423874,
-0.27945676445961,
-0.02271760255098343,
0.24742408096790314,
0.20130178332328796,
0.08794130384922028,
-0.5815750360488892,
-0.09237449616193771,
0.31054002046585083,
-0.16546757519245148,
-0.3448004126548767,
0.053261641412973404,
0.3007671535015106,
0.03726803883910179,
0.037697453051805496,
0.19740720093250275,
-0.10798154026269913,
-0.2613867223262787,
0.11923959106206894,
-0.30531367659568787,
0.015738962218165398,
0.0029157560784369707,
0.024956263601779938,
0.1774377077817917,
-0.016139699146151543,
0.05651024356484413,
-0.13105306029319763,
0.015971621498465538,
-0.11696960777044296,
0.023999517783522606,
0.32449737191200256,
0.21143585443496704,
0.3351796269416809,
0.15028506517410278,
0.435619980096817,
-0.11513195186853409,
-0.30861321091651917,
-0.10748779028654099,
0.0539790615439415,
0.04323862865567207,
-0.10129576176404953,
-0.33733069896698,
-0.27977824211120605,
-0.19995954632759094,
0.039730191230773926,
0.21891498565673828,
0.4644092917442322,
0.22393915057182312,
-0.14496906101703644,
-0.23409314453601837,
-0.09604010730981827,
-0.10712757706642151,
-0.33279505372047424,
0.173146590590477,
0.2569657862186432,
-0.14552776515483856,
-0.2706972360610962,
0.0175241120159626,
-0.004645705688744783,
0.314762145280838,
-0.18139898777008057,
0.10842786729335785,
-0.34983938932418823,
-0.15410636365413666,
0.24462392926216125,
-0.11816287040710449,
-0.4130527079105377,
0.07198947668075562,
0.376216322183609,
0.32415562868118286,
-0.0967504009604454,
0.30593669414520264,
0.14065179228782654,
-0.18889166414737701,
-0.005348795559257269,
0.7830973863601685,
-0.3070816099643707,
-0.42964237928390503,
-0.11242833733558655,
-0.0667237937450409
] |
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.3290725350379944,
-0.0584937259554863,
-0.010408233851194382,
0.5395736694335938,
0.3104315400123596,
0.004104514606297016,
0.2097795009613037,
0.08727050572633743,
0.3129350244998932,
0.10788669437170029,
-0.02249966561794281,
-0.12566150724887848,
-0.2969319224357605,
0.18879434466362,
0.11141647398471832,
0.18481963872909546,
-0.13642436265945435,
0.005854562856256962,
-0.8216051459312439,
0.0158687736839056,
-0.18384985625743866,
0.19848419725894928,
-0.1673421412706375,
-0.09697218984365463,
-0.5068029761314392,
0.2375524342060089,
-0.030008725821971893,
0.2536424696445465,
-0.21137112379074097,
-0.481631875038147,
0.5141909122467041,
0.030975455418229103,
0.05185121297836304,
0.5576844215393066,
-0.00011410437582526356,
0.15152524411678314,
0.29352429509162903,
-0.010245938785374165,
-0.246602863073349,
-0.2974116802215576,
-0.5779013633728027,
-0.3827316462993622,
0.0219600610435009,
0.22454971075057983,
-0.1884622424840927,
0.0820961445569992,
-0.2400665581226349,
-0.3640690743923187,
0.2820507287979126,
0.2943234443664551,
0.22149503231048584,
0.41515806317329407,
0.27894672751426697,
-0.30919402837753296,
0.05109775811433792,
0.29077139496803284,
-0.1379878669977188,
-0.028001783415675163,
0.013574878685176373,
-0.13521751761436462,
0.023276841267943382,
0.031645674258470535,
0.07332299649715424,
0.32977190613746643,
0.345793753862381,
-0.15872319042682648,
0.2857406437397003,
-0.008103087544441223,
0.27922523021698,
0.05777904391288757,
0.19649453461170197,
-0.07577876001596451,
-0.23603981733322144,
-0.05943106487393379,
-0.1306951642036438,
-0.42765355110168457,
0.2592029571533203,
0.2658745050430298,
0.03034377470612526,
0.266006201505661,
-0.35894131660461426,
0.07395793497562408,
0.22120827436447144,
0.031787190586328506,
-0.3881675601005554,
0.3771405518054962,
-0.31149420142173767,
0.0018199814949184656,
0.2749302387237549,
-0.19026878476142883,
0.16606588661670685,
-0.11145958304405212,
-0.018748950213193893,
0.08372074365615845,
-0.5072571039199829,
0.2616915702819824,
0.02555939555168152,
0.2756202518939972,
-0.08005740493535995,
0.15823689103126526,
-0.2520165741443634,
0.014927663840353489,
0.20893773436546326,
-0.015564980916678905,
0.17879310250282288,
0.1386246532201767,
-0.1099448874592781,
-0.06265923380851746,
0.2749220132827759,
0.05509815365076065,
-0.18534168601036072,
0.13512106239795685,
-0.1703791320323944,
-0.44336509704589844,
-0.08917578309774399,
-0.1894311159849167,
0.152550607919693,
-0.0720275491476059,
-0.2599219083786011,
0.06353223323822021,
0.13551835715770721,
-0.3142128884792328,
0.02041897177696228,
0.28551939129829407,
0.04840925335884094,
0.17023660242557526,
0.11796139925718307,
0.0036532024387270212,
-0.004203027579933405,
-0.03577090799808502,
-0.3564470112323761,
-0.3906193971633911,
-0.2991640865802765,
0.061120204627513885,
0.40783950686454773,
-0.21857286989688873,
0.2283025085926056,
0.00041089794831350446,
-0.13100461661815643,
-0.12732090055942535,
-0.2269294708967209,
-0.007741925772279501,
0.21889331936836243,
0.4824034571647644,
0.07109293341636658,
0.2990787923336029,
0.2443663477897644,
0.15959174931049347,
-0.00813092477619648,
-0.007438609376549721,
-0.0995388850569725,
-0.2956007719039917,
0.1295209527015686,
0.2581730782985687,
-0.0815231204032898,
0.1570640206336975,
-0.22945040464401245,
-0.11366289108991623,
0.10502003133296967,
0.3215996026992798,
-0.19287195801734924,
-0.2417546510696411,
-0.16372555494308472,
-0.06663870811462402,
0.532136857509613,
0.5977166295051575,
0.009565877728164196,
-0.19424322247505188,
-0.39475035667419434,
-0.0471857488155365,
0.23443421721458435,
0.3322235345840454,
-0.02982371859252453,
0.10070229321718216,
-0.26099538803100586,
-0.24706058204174042,
-0.0820457711815834,
-0.059450048953294754,
-0.18328426778316498,
0.1371452361345291,
-0.13132382929325104,
0.2751171588897705,
0.03245142847299576,
-0.12638020515441895,
0.014531278982758522,
-0.22653594613075256,
0.3428909182548523,
0.08913655579090118,
-0.15807799994945526,
0.08362772315740585,
-0.07941648364067078,
-0.3164912760257721,
0.24742774665355682,
0.18862758576869965,
0.19368137419223785,
-0.1896170675754547,
0.21572473645210266,
0.024288009852170944,
0.06840887665748596,
0.05708887428045273,
0.1292503923177719,
0.038519036024808884,
0.08485826849937439,
-0.012777989730238914,
-0.08891837298870087,
0.05340268835425377,
-0.447301983833313,
0.2964878976345062,
0.2691926956176758,
0.043741390109062195,
0.11734624952077866,
0.12081702053546906,
-0.1622183918952942,
0.13357682526111603,
-0.3434743583202362,
-0.18876855075359344,
0.08767925202846527,
0.13490258157253265,
-0.003515737596899271,
-0.14503443241119385,
-0.038808729499578476,
-0.02397848851978779,
-0.2259172648191452,
0.14871421456336975,
0.24453319609165192,
0.06671968102455139,
-0.1433456391096115,
-0.12520839273929596,
0.2802850008010864,
0.27434486150741577,
0.16356074810028076,
-0.1697695106267929,
-0.16306321322917938,
0.09085734188556671,
0.13997527956962585,
0.3951955735683441,
-0.08718615770339966,
0.10392123460769653,
0.17919151484966278,
-0.4736974537372589,
0.16994349658489227,
0.13616104423999786,
-0.1402689665555954,
-0.2992379665374756,
0.120428666472435,
0.04246196523308754,
-0.11031556874513626,
0.26758500933647156,
0.11755931377410889,
0.03573485091328621,
0.1648181527853012,
0.07098998874425888,
0.14531424641609192,
-0.3879215717315674,
0.2801464796066284,
-0.09231584519147873,
0.3428556025028229,
0.26702308654785156,
0.02395343966782093,
-0.04254975542426109,
0.38053956627845764,
0.16340187191963196,
0.20223462581634521,
0.015098406001925468,
-0.3856000602245331,
-0.08566146343946457,
-0.06618725508451462,
0.05018530786037445,
0.39677315950393677,
0.07352706044912338,
0.09358639270067215,
0.17863602936267853,
0.11497156322002411,
-0.30252647399902344,
0.4467020630836487,
-0.07497851550579071,
-0.07670716941356659,
0.30438727140426636,
-0.023559365421533585,
-0.0722775012254715,
-0.2620561122894287,
0.5669638514518738,
0.05820992588996887,
0.00621738750487566,
-0.19751547276973724,
-0.2630079388618469,
-0.43427199125289917,
0.23578374087810516,
-0.3500569760799408,
-0.5691424012184143,
-0.20526376366615295,
-0.20574337244033813,
-0.27586719393730164,
0.11813641339540482,
-0.09885352849960327,
0.24787111580371857,
0.0687461644411087,
0.2188892364501953,
-0.04907844960689545,
0.34659814834594727,
-0.09770271182060242,
-0.2259615808725357,
-0.10649780929088593,
0.03910555690526962,
0.5312061309814453,
-0.2995472252368927,
0.3275356888771057,
-0.1957133710384369,
0.06398878991603851,
-0.20025946199893951,
-0.22829706966876984,
0.08723226189613342,
-0.04787023365497589,
0.34654074907302856,
0.21176870167255402,
-0.023282209411263466,
0.3644333779811859,
-0.10893535614013672,
0.3259531855583191,
-0.1572977751493454,
-0.015334676951169968,
0.0034699325915426016,
-0.04454406723380089,
-0.14267052710056305,
-0.2228538691997528,
-0.3446231782436371,
-0.4408050775527954,
-0.3883455693721771,
-0.010652836412191391,
-0.02618829533457756,
-0.04189358279109001,
0.09175758063793182,
-0.134288489818573,
-0.05323055759072304,
-0.01781107299029827,
-0.025891108438372612,
-0.348614364862442,
-0.29844772815704346,
0.20006678998470306,
-0.3020639419555664,
-0.2819243371486664,
0.23929305374622345,
0.1354367733001709,
0.4544391632080078,
0.04012790322303772,
-0.3937389850616455,
0.5808199048042297,
-0.13911113142967224,
-0.1142628863453865,
0.18045715987682343,
0.30906379222869873,
-0.09056617319583893,
0.16540473699569702,
-0.04958541691303253,
-0.1657475233078003,
-0.26460081338882446,
-0.18060140311717987,
-0.23206642270088196,
0.15910443663597107,
-0.14567019045352936,
0.06278622150421143,
0.010418371297419071,
0.8047191500663757,
0.06547863781452179,
-0.2943533658981323,
0.18274545669555664,
0.12671278417110443,
0.2218531221151352,
-0.0006961300387047231,
-0.589535653591156,
0.20101135969161987,
-0.09861696511507034,
0.22158341109752655,
0.36266225576400757,
0.04329082369804382,
0.17377440631389618,
-0.11392243951559067,
0.19396013021469116,
-0.18877920508384705,
-0.35137173533439636,
-0.12816323339939117,
0.2005106657743454,
0.38496795296669006,
0.090053029358387,
0.12198898196220398,
0.027391621842980385,
-0.09549250453710556,
-0.009535497985780239,
0.35470110177993774,
0.12224748730659485,
0.08853287994861603,
-0.10506425052881241,
-0.056012604385614395,
-0.23697513341903687,
0.05358923599123955,
-0.19320541620254517,
0.457562655210495,
-0.0324505977332592,
-0.1230473518371582,
-0.04231582581996918,
-0.01829041726887226,
0.5026881098747253,
0.19673863053321838,
0.39276978373527527,
0.10224806517362595,
-0.4248223602771759,
-0.23930007219314575,
-0.12757590413093567,
0.09022285044193268,
-0.07357703894376755,
0.12852084636688232,
0.1846207082271576,
-0.2020290642976761,
-0.5072084665298462,
0.20257887244224548,
0.11079110205173492,
-0.18881256878376007,
-0.11982688307762146,
-0.1453293412923813,
0.0249493308365345,
-0.29022109508514404,
-0.07774042338132858,
-0.22481460869312286,
0.17979168891906738,
-0.4049389064311981,
-0.02397233620285988,
-0.15451878309249878,
-0.07883783429861069,
0.15115895867347717,
0.06572175025939941,
0.09346503764390945,
0.04429977014660835,
0.49238133430480957,
0.3122970461845398,
0.32004907727241516,
0.5650812983512878,
0.6159530878067017,
-0.1010637953877449,
0.03441856801509857,
0.08350548893213272,
0.016379784792661667,
0.052282702177762985,
0.28316032886505127,
-0.0781763568520546,
0.1110999584197998,
0.0438617505133152,
0.11074777692556381,
-0.5960831642150879,
0.12400128692388535,
0.20190824568271637,
0.0680200532078743,
-0.3572423756122589,
-0.09975917637348175,
0.1946077197790146,
0.02687332034111023,
0.20069801807403564,
0.17601026594638824,
0.1702607274055481,
-0.3972955346107483,
-0.4666156470775604,
0.01681901328265667,
0.49473026394844055,
-0.07358794659376144,
0.22224268317222595,
-0.14231917262077332,
-0.11037677526473999,
0.05664803087711334,
0.27787667512893677,
-0.11726551502943039,
-0.19149531424045563,
0.17908522486686707,
0.03193092718720436,
-0.15855593979358673,
0.08609406650066376,
0.11525733768939972,
-0.07403644919395447,
0.2761105000972748,
0.04731118306517601,
0.5473353862762451,
0.13990309834480286,
0.08276165276765823,
-0.1333881914615631,
-0.2570036053657532,
-0.2534721791744232,
0.14690102636814117,
-0.04010213539004326,
0.3355659544467926,
-0.23143869638442993,
-0.10192492604255676,
0.31197482347488403,
-0.06653527170419693,
-0.24529503285884857,
0.006580241955816746,
-0.6495985388755798,
0.10334160923957825,
-0.03576107323169708,
-0.10310167819261551,
0.369224488735199,
-0.2313642054796219,
0.18111591041088104,
0.3199763298034668,
-0.1902632862329483,
0.10109957307577133,
-0.3137950599193573,
0.03833146393299103,
-0.2302718460559845,
0.2646712064743042,
0.10080127418041229,
-0.03361686319112778,
-0.06036466360092163,
-0.10863896459341049,
-0.0407438650727272,
-0.05392931029200554,
0.03385227546095848,
0.05077137053012848,
-0.05529152229428291,
-0.049335554242134094,
-0.3194902539253235,
0.011820007115602493,
0.01315112691372633,
-0.1511109620332718,
0.15436102449893951,
0.029080845415592194,
-0.05492846667766571,
0.32918524742126465,
-0.05495509132742882,
-0.10675472021102905,
-0.05855013430118561,
0.41458988189697266,
-0.26236164569854736,
0.022985907271504402,
0.3038800358772278,
0.415106862783432,
-0.01754780486226082,
-0.2813273072242737,
-0.06851522624492645,
0.0908065214753151,
-0.24481138586997986,
0.27016791701316833,
0.116421639919281,
-0.08998122066259384,
0.3801683485507965,
0.5611444711685181,
0.34226030111312866,
-0.1498253494501114,
0.012246424332261086,
-0.28683650493621826,
-0.19111789762973785,
0.06081496179103851,
-0.1435583382844925,
0.16259491443634033,
0.02771451510488987,
0.44049277901649475,
-0.17470523715019226,
0.3926444351673126,
-0.3059358596801758,
0.2749379277229309,
-0.09475729614496231,
-0.00005809745198348537,
0.21237310767173767,
-0.15855348110198975,
0.15915872156620026,
-0.09213419258594513,
0.04122496768832207,
-0.034026846289634705,
-0.5342017412185669,
-0.21376074850559235,
-0.11785946041345596,
0.09453809261322021,
0.09808219969272614,
-0.27111488580703735,
0.16907431185245514,
-0.10803572833538055,
0.08079547435045242,
-0.1697111576795578,
0.34704700112342834,
0.06606906652450562,
-0.1222606897354126,
0.02290220931172371,
0.07030117511749268,
0.06582503020763397,
-0.16896109282970428,
0.13905839622020721,
0.07145331054925919,
-0.06772688776254654,
-0.0049926708452403545,
-0.04107778146862984,
0.04417804256081581,
0.02083796262741089,
0.1150299683213234,
0.010287060402333736,
-0.021658875048160553,
0.11822172999382019,
0.5093996524810791,
-0.30560898780822754,
-0.2525113821029663,
0.26381129026412964,
0.285666823387146,
0.16861838102340698,
0.05136161297559738,
0.06142771989107132,
-0.16902238130569458,
0.17126987874507904,
-0.29538440704345703,
-0.07953961938619614,
-0.03775753080844879,
0.16378192603588104,
0.0857122465968132,
0.04997260868549347,
0.35707494616508484,
-0.21518944203853607,
-0.23370258510112762,
0.3549878001213074,
0.3251188397407532,
-0.1116921603679657,
0.17485368251800537,
0.46126291155815125,
0.08477867394685745,
0.20866720378398895,
0.10753431916236877,
-0.16532078385353088,
0.10477497428655624,
0.37650811672210693,
-0.23962701857089996,
0.6803704500198364,
0.06465471535921097,
0.006373072974383831,
0.24075575172901154,
-0.41432836651802063,
0.1107708141207695,
0.26909786462783813,
-0.15682946145534515,
0.024420613422989845,
-0.2630805969238281,
0.13773320615291595,
-0.34020116925239563,
-0.273153156042099,
-0.18553632497787476,
0.19849255681037903,
-0.06555123627185822,
-0.1254132241010666,
-0.255675733089447,
-0.11668553948402405,
-0.07807447761297226,
0.027362599968910217,
-0.07522281259298325,
-0.1022675484418869,
0.259592741727829,
0.17326119542121887,
-0.15647456049919128,
-0.40464767813682556,
-0.3694781959056854,
0.01614440605044365,
-0.09832074493169785,
-0.1228213831782341,
0.25600796937942505,
0.404837042093277,
-0.2123369723558426,
0.1384950429201126,
0.405162513256073,
0.47156813740730286,
0.30138829350471497,
-0.01928645372390747,
-0.08603382110595703,
0.08719737827777863,
-0.08513973653316498,
-0.27750033140182495,
0.41972634196281433,
-0.2568070590496063,
-0.1573415994644165,
0.004949149675667286,
0.1699632704257965,
-0.1862417757511139,
-0.3644254803657532,
0.12785668671131134,
-0.3126045763492584,
-0.2835620045661926,
0.19259624183177948,
-0.0886969268321991,
-0.057648755609989166,
-0.04640505462884903,
0.38013148307800293,
-0.046357057988643646,
0.2271072119474411,
0.6677178144454956,
-0.027535224333405495,
0.12809251248836517,
-0.2423587143421173,
0.1004885882139206,
0.08526214957237244,
0.7199055552482605,
0.2930563688278198,
-0.08171437680721283,
-0.28653523325920105,
-0.5099944472312927,
-0.7815913558006287,
0.04826048016548157,
0.15429101884365082,
0.43628746271133423,
0.07365281879901886,
0.0439884215593338,
0.11922533065080643,
-0.022529972717165947,
0.15371620655059814,
0.12201841920614243,
0.2925758957862854,
-0.21513329446315765,
-0.35486501455307007,
0.1796959787607193,
-0.09501513838768005,
-0.1906719207763672,
-0.005381075665354729,
-0.3220205307006836,
0.14668795466423035,
-0.27889227867126465,
0.024703174829483032,
-0.24172347784042358,
0.42358967661857605,
0.002974569099023938,
0.2875816226005554,
0.21881195902824402,
0.08809081465005875,
0.3063713610172272,
0.010798751376569271,
-0.06305772811174393,
-0.4197326898574829,
-0.3112783133983612,
0.014537468552589417,
0.08607366681098938,
-0.10746809095144272,
0.36468425393104553,
-0.05370118096470833,
-0.268521785736084,
-0.44320881366729736,
0.10508589446544647,
0.11436876654624939,
0.20233586430549622,
-0.17699387669563293,
0.22221054136753082,
-0.21476846933364868,
-0.17331399023532867,
0.34437569975852966,
0.4282422959804535,
-0.029236910864710808,
0.18783709406852722,
-0.21067678928375244,
-0.38733211159706116,
0.2546340227127075,
-0.2887779474258423,
-0.16298505663871765,
-0.46298402547836304,
0.17723610997200012,
-0.09543827921152115,
-0.16986311972141266,
-0.4217802584171295,
0.1528436839580536,
0.17121724784374237,
-0.10168135166168213,
-0.21474704146385193,
0.3726131319999695,
-0.04605412483215332,
-0.06841422617435455,
-0.018581420183181763,
0.1694672554731369,
0.1803847849369049,
-0.33431875705718994,
-0.11396206170320511,
-0.05983348563313484
] |
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.3290725350379944,
-0.0584937259554863,
-0.010408233851194382,
0.5395736694335938,
0.3104315400123596,
0.004104514606297016,
0.2097795009613037,
0.08727050572633743,
0.3129350244998932,
0.10788669437170029,
-0.02249966561794281,
-0.12566150724887848,
-0.2969319224357605,
0.18879434466362,
0.11141647398471832,
0.18481963872909546,
-0.13642436265945435,
0.005854562856256962,
-0.8216051459312439,
0.0158687736839056,
-0.18384985625743866,
0.19848419725894928,
-0.1673421412706375,
-0.09697218984365463,
-0.5068029761314392,
0.2375524342060089,
-0.030008725821971893,
0.2536424696445465,
-0.21137112379074097,
-0.481631875038147,
0.5141909122467041,
0.030975455418229103,
0.05185121297836304,
0.5576844215393066,
-0.00011410437582526356,
0.15152524411678314,
0.29352429509162903,
-0.010245938785374165,
-0.246602863073349,
-0.2974116802215576,
-0.5779013633728027,
-0.3827316462993622,
0.0219600610435009,
0.22454971075057983,
-0.1884622424840927,
0.0820961445569992,
-0.2400665581226349,
-0.3640690743923187,
0.2820507287979126,
0.2943234443664551,
0.22149503231048584,
0.41515806317329407,
0.27894672751426697,
-0.30919402837753296,
0.05109775811433792,
0.29077139496803284,
-0.1379878669977188,
-0.028001783415675163,
0.013574878685176373,
-0.13521751761436462,
0.023276841267943382,
0.031645674258470535,
0.07332299649715424,
0.32977190613746643,
0.345793753862381,
-0.15872319042682648,
0.2857406437397003,
-0.008103087544441223,
0.27922523021698,
0.05777904391288757,
0.19649453461170197,
-0.07577876001596451,
-0.23603981733322144,
-0.05943106487393379,
-0.1306951642036438,
-0.42765355110168457,
0.2592029571533203,
0.2658745050430298,
0.03034377470612526,
0.266006201505661,
-0.35894131660461426,
0.07395793497562408,
0.22120827436447144,
0.031787190586328506,
-0.3881675601005554,
0.3771405518054962,
-0.31149420142173767,
0.0018199814949184656,
0.2749302387237549,
-0.19026878476142883,
0.16606588661670685,
-0.11145958304405212,
-0.018748950213193893,
0.08372074365615845,
-0.5072571039199829,
0.2616915702819824,
0.02555939555168152,
0.2756202518939972,
-0.08005740493535995,
0.15823689103126526,
-0.2520165741443634,
0.014927663840353489,
0.20893773436546326,
-0.015564980916678905,
0.17879310250282288,
0.1386246532201767,
-0.1099448874592781,
-0.06265923380851746,
0.2749220132827759,
0.05509815365076065,
-0.18534168601036072,
0.13512106239795685,
-0.1703791320323944,
-0.44336509704589844,
-0.08917578309774399,
-0.1894311159849167,
0.152550607919693,
-0.0720275491476059,
-0.2599219083786011,
0.06353223323822021,
0.13551835715770721,
-0.3142128884792328,
0.02041897177696228,
0.28551939129829407,
0.04840925335884094,
0.17023660242557526,
0.11796139925718307,
0.0036532024387270212,
-0.004203027579933405,
-0.03577090799808502,
-0.3564470112323761,
-0.3906193971633911,
-0.2991640865802765,
0.061120204627513885,
0.40783950686454773,
-0.21857286989688873,
0.2283025085926056,
0.00041089794831350446,
-0.13100461661815643,
-0.12732090055942535,
-0.2269294708967209,
-0.007741925772279501,
0.21889331936836243,
0.4824034571647644,
0.07109293341636658,
0.2990787923336029,
0.2443663477897644,
0.15959174931049347,
-0.00813092477619648,
-0.007438609376549721,
-0.0995388850569725,
-0.2956007719039917,
0.1295209527015686,
0.2581730782985687,
-0.0815231204032898,
0.1570640206336975,
-0.22945040464401245,
-0.11366289108991623,
0.10502003133296967,
0.3215996026992798,
-0.19287195801734924,
-0.2417546510696411,
-0.16372555494308472,
-0.06663870811462402,
0.532136857509613,
0.5977166295051575,
0.009565877728164196,
-0.19424322247505188,
-0.39475035667419434,
-0.0471857488155365,
0.23443421721458435,
0.3322235345840454,
-0.02982371859252453,
0.10070229321718216,
-0.26099538803100586,
-0.24706058204174042,
-0.0820457711815834,
-0.059450048953294754,
-0.18328426778316498,
0.1371452361345291,
-0.13132382929325104,
0.2751171588897705,
0.03245142847299576,
-0.12638020515441895,
0.014531278982758522,
-0.22653594613075256,
0.3428909182548523,
0.08913655579090118,
-0.15807799994945526,
0.08362772315740585,
-0.07941648364067078,
-0.3164912760257721,
0.24742774665355682,
0.18862758576869965,
0.19368137419223785,
-0.1896170675754547,
0.21572473645210266,
0.024288009852170944,
0.06840887665748596,
0.05708887428045273,
0.1292503923177719,
0.038519036024808884,
0.08485826849937439,
-0.012777989730238914,
-0.08891837298870087,
0.05340268835425377,
-0.447301983833313,
0.2964878976345062,
0.2691926956176758,
0.043741390109062195,
0.11734624952077866,
0.12081702053546906,
-0.1622183918952942,
0.13357682526111603,
-0.3434743583202362,
-0.18876855075359344,
0.08767925202846527,
0.13490258157253265,
-0.003515737596899271,
-0.14503443241119385,
-0.038808729499578476,
-0.02397848851978779,
-0.2259172648191452,
0.14871421456336975,
0.24453319609165192,
0.06671968102455139,
-0.1433456391096115,
-0.12520839273929596,
0.2802850008010864,
0.27434486150741577,
0.16356074810028076,
-0.1697695106267929,
-0.16306321322917938,
0.09085734188556671,
0.13997527956962585,
0.3951955735683441,
-0.08718615770339966,
0.10392123460769653,
0.17919151484966278,
-0.4736974537372589,
0.16994349658489227,
0.13616104423999786,
-0.1402689665555954,
-0.2992379665374756,
0.120428666472435,
0.04246196523308754,
-0.11031556874513626,
0.26758500933647156,
0.11755931377410889,
0.03573485091328621,
0.1648181527853012,
0.07098998874425888,
0.14531424641609192,
-0.3879215717315674,
0.2801464796066284,
-0.09231584519147873,
0.3428556025028229,
0.26702308654785156,
0.02395343966782093,
-0.04254975542426109,
0.38053956627845764,
0.16340187191963196,
0.20223462581634521,
0.015098406001925468,
-0.3856000602245331,
-0.08566146343946457,
-0.06618725508451462,
0.05018530786037445,
0.39677315950393677,
0.07352706044912338,
0.09358639270067215,
0.17863602936267853,
0.11497156322002411,
-0.30252647399902344,
0.4467020630836487,
-0.07497851550579071,
-0.07670716941356659,
0.30438727140426636,
-0.023559365421533585,
-0.0722775012254715,
-0.2620561122894287,
0.5669638514518738,
0.05820992588996887,
0.00621738750487566,
-0.19751547276973724,
-0.2630079388618469,
-0.43427199125289917,
0.23578374087810516,
-0.3500569760799408,
-0.5691424012184143,
-0.20526376366615295,
-0.20574337244033813,
-0.27586719393730164,
0.11813641339540482,
-0.09885352849960327,
0.24787111580371857,
0.0687461644411087,
0.2188892364501953,
-0.04907844960689545,
0.34659814834594727,
-0.09770271182060242,
-0.2259615808725357,
-0.10649780929088593,
0.03910555690526962,
0.5312061309814453,
-0.2995472252368927,
0.3275356888771057,
-0.1957133710384369,
0.06398878991603851,
-0.20025946199893951,
-0.22829706966876984,
0.08723226189613342,
-0.04787023365497589,
0.34654074907302856,
0.21176870167255402,
-0.023282209411263466,
0.3644333779811859,
-0.10893535614013672,
0.3259531855583191,
-0.1572977751493454,
-0.015334676951169968,
0.0034699325915426016,
-0.04454406723380089,
-0.14267052710056305,
-0.2228538691997528,
-0.3446231782436371,
-0.4408050775527954,
-0.3883455693721771,
-0.010652836412191391,
-0.02618829533457756,
-0.04189358279109001,
0.09175758063793182,
-0.134288489818573,
-0.05323055759072304,
-0.01781107299029827,
-0.025891108438372612,
-0.348614364862442,
-0.29844772815704346,
0.20006678998470306,
-0.3020639419555664,
-0.2819243371486664,
0.23929305374622345,
0.1354367733001709,
0.4544391632080078,
0.04012790322303772,
-0.3937389850616455,
0.5808199048042297,
-0.13911113142967224,
-0.1142628863453865,
0.18045715987682343,
0.30906379222869873,
-0.09056617319583893,
0.16540473699569702,
-0.04958541691303253,
-0.1657475233078003,
-0.26460081338882446,
-0.18060140311717987,
-0.23206642270088196,
0.15910443663597107,
-0.14567019045352936,
0.06278622150421143,
0.010418371297419071,
0.8047191500663757,
0.06547863781452179,
-0.2943533658981323,
0.18274545669555664,
0.12671278417110443,
0.2218531221151352,
-0.0006961300387047231,
-0.589535653591156,
0.20101135969161987,
-0.09861696511507034,
0.22158341109752655,
0.36266225576400757,
0.04329082369804382,
0.17377440631389618,
-0.11392243951559067,
0.19396013021469116,
-0.18877920508384705,
-0.35137173533439636,
-0.12816323339939117,
0.2005106657743454,
0.38496795296669006,
0.090053029358387,
0.12198898196220398,
0.027391621842980385,
-0.09549250453710556,
-0.009535497985780239,
0.35470110177993774,
0.12224748730659485,
0.08853287994861603,
-0.10506425052881241,
-0.056012604385614395,
-0.23697513341903687,
0.05358923599123955,
-0.19320541620254517,
0.457562655210495,
-0.0324505977332592,
-0.1230473518371582,
-0.04231582581996918,
-0.01829041726887226,
0.5026881098747253,
0.19673863053321838,
0.39276978373527527,
0.10224806517362595,
-0.4248223602771759,
-0.23930007219314575,
-0.12757590413093567,
0.09022285044193268,
-0.07357703894376755,
0.12852084636688232,
0.1846207082271576,
-0.2020290642976761,
-0.5072084665298462,
0.20257887244224548,
0.11079110205173492,
-0.18881256878376007,
-0.11982688307762146,
-0.1453293412923813,
0.0249493308365345,
-0.29022109508514404,
-0.07774042338132858,
-0.22481460869312286,
0.17979168891906738,
-0.4049389064311981,
-0.02397233620285988,
-0.15451878309249878,
-0.07883783429861069,
0.15115895867347717,
0.06572175025939941,
0.09346503764390945,
0.04429977014660835,
0.49238133430480957,
0.3122970461845398,
0.32004907727241516,
0.5650812983512878,
0.6159530878067017,
-0.1010637953877449,
0.03441856801509857,
0.08350548893213272,
0.016379784792661667,
0.052282702177762985,
0.28316032886505127,
-0.0781763568520546,
0.1110999584197998,
0.0438617505133152,
0.11074777692556381,
-0.5960831642150879,
0.12400128692388535,
0.20190824568271637,
0.0680200532078743,
-0.3572423756122589,
-0.09975917637348175,
0.1946077197790146,
0.02687332034111023,
0.20069801807403564,
0.17601026594638824,
0.1702607274055481,
-0.3972955346107483,
-0.4666156470775604,
0.01681901328265667,
0.49473026394844055,
-0.07358794659376144,
0.22224268317222595,
-0.14231917262077332,
-0.11037677526473999,
0.05664803087711334,
0.27787667512893677,
-0.11726551502943039,
-0.19149531424045563,
0.17908522486686707,
0.03193092718720436,
-0.15855593979358673,
0.08609406650066376,
0.11525733768939972,
-0.07403644919395447,
0.2761105000972748,
0.04731118306517601,
0.5473353862762451,
0.13990309834480286,
0.08276165276765823,
-0.1333881914615631,
-0.2570036053657532,
-0.2534721791744232,
0.14690102636814117,
-0.04010213539004326,
0.3355659544467926,
-0.23143869638442993,
-0.10192492604255676,
0.31197482347488403,
-0.06653527170419693,
-0.24529503285884857,
0.006580241955816746,
-0.6495985388755798,
0.10334160923957825,
-0.03576107323169708,
-0.10310167819261551,
0.369224488735199,
-0.2313642054796219,
0.18111591041088104,
0.3199763298034668,
-0.1902632862329483,
0.10109957307577133,
-0.3137950599193573,
0.03833146393299103,
-0.2302718460559845,
0.2646712064743042,
0.10080127418041229,
-0.03361686319112778,
-0.06036466360092163,
-0.10863896459341049,
-0.0407438650727272,
-0.05392931029200554,
0.03385227546095848,
0.05077137053012848,
-0.05529152229428291,
-0.049335554242134094,
-0.3194902539253235,
0.011820007115602493,
0.01315112691372633,
-0.1511109620332718,
0.15436102449893951,
0.029080845415592194,
-0.05492846667766571,
0.32918524742126465,
-0.05495509132742882,
-0.10675472021102905,
-0.05855013430118561,
0.41458988189697266,
-0.26236164569854736,
0.022985907271504402,
0.3038800358772278,
0.415106862783432,
-0.01754780486226082,
-0.2813273072242737,
-0.06851522624492645,
0.0908065214753151,
-0.24481138586997986,
0.27016791701316833,
0.116421639919281,
-0.08998122066259384,
0.3801683485507965,
0.5611444711685181,
0.34226030111312866,
-0.1498253494501114,
0.012246424332261086,
-0.28683650493621826,
-0.19111789762973785,
0.06081496179103851,
-0.1435583382844925,
0.16259491443634033,
0.02771451510488987,
0.44049277901649475,
-0.17470523715019226,
0.3926444351673126,
-0.3059358596801758,
0.2749379277229309,
-0.09475729614496231,
-0.00005809745198348537,
0.21237310767173767,
-0.15855348110198975,
0.15915872156620026,
-0.09213419258594513,
0.04122496768832207,
-0.034026846289634705,
-0.5342017412185669,
-0.21376074850559235,
-0.11785946041345596,
0.09453809261322021,
0.09808219969272614,
-0.27111488580703735,
0.16907431185245514,
-0.10803572833538055,
0.08079547435045242,
-0.1697111576795578,
0.34704700112342834,
0.06606906652450562,
-0.1222606897354126,
0.02290220931172371,
0.07030117511749268,
0.06582503020763397,
-0.16896109282970428,
0.13905839622020721,
0.07145331054925919,
-0.06772688776254654,
-0.0049926708452403545,
-0.04107778146862984,
0.04417804256081581,
0.02083796262741089,
0.1150299683213234,
0.010287060402333736,
-0.021658875048160553,
0.11822172999382019,
0.5093996524810791,
-0.30560898780822754,
-0.2525113821029663,
0.26381129026412964,
0.285666823387146,
0.16861838102340698,
0.05136161297559738,
0.06142771989107132,
-0.16902238130569458,
0.17126987874507904,
-0.29538440704345703,
-0.07953961938619614,
-0.03775753080844879,
0.16378192603588104,
0.0857122465968132,
0.04997260868549347,
0.35707494616508484,
-0.21518944203853607,
-0.23370258510112762,
0.3549878001213074,
0.3251188397407532,
-0.1116921603679657,
0.17485368251800537,
0.46126291155815125,
0.08477867394685745,
0.20866720378398895,
0.10753431916236877,
-0.16532078385353088,
0.10477497428655624,
0.37650811672210693,
-0.23962701857089996,
0.6803704500198364,
0.06465471535921097,
0.006373072974383831,
0.24075575172901154,
-0.41432836651802063,
0.1107708141207695,
0.26909786462783813,
-0.15682946145534515,
0.024420613422989845,
-0.2630805969238281,
0.13773320615291595,
-0.34020116925239563,
-0.273153156042099,
-0.18553632497787476,
0.19849255681037903,
-0.06555123627185822,
-0.1254132241010666,
-0.255675733089447,
-0.11668553948402405,
-0.07807447761297226,
0.027362599968910217,
-0.07522281259298325,
-0.1022675484418869,
0.259592741727829,
0.17326119542121887,
-0.15647456049919128,
-0.40464767813682556,
-0.3694781959056854,
0.01614440605044365,
-0.09832074493169785,
-0.1228213831782341,
0.25600796937942505,
0.404837042093277,
-0.2123369723558426,
0.1384950429201126,
0.405162513256073,
0.47156813740730286,
0.30138829350471497,
-0.01928645372390747,
-0.08603382110595703,
0.08719737827777863,
-0.08513973653316498,
-0.27750033140182495,
0.41972634196281433,
-0.2568070590496063,
-0.1573415994644165,
0.004949149675667286,
0.1699632704257965,
-0.1862417757511139,
-0.3644254803657532,
0.12785668671131134,
-0.3126045763492584,
-0.2835620045661926,
0.19259624183177948,
-0.0886969268321991,
-0.057648755609989166,
-0.04640505462884903,
0.38013148307800293,
-0.046357057988643646,
0.2271072119474411,
0.6677178144454956,
-0.027535224333405495,
0.12809251248836517,
-0.2423587143421173,
0.1004885882139206,
0.08526214957237244,
0.7199055552482605,
0.2930563688278198,
-0.08171437680721283,
-0.28653523325920105,
-0.5099944472312927,
-0.7815913558006287,
0.04826048016548157,
0.15429101884365082,
0.43628746271133423,
0.07365281879901886,
0.0439884215593338,
0.11922533065080643,
-0.022529972717165947,
0.15371620655059814,
0.12201841920614243,
0.2925758957862854,
-0.21513329446315765,
-0.35486501455307007,
0.1796959787607193,
-0.09501513838768005,
-0.1906719207763672,
-0.005381075665354729,
-0.3220205307006836,
0.14668795466423035,
-0.27889227867126465,
0.024703174829483032,
-0.24172347784042358,
0.42358967661857605,
0.002974569099023938,
0.2875816226005554,
0.21881195902824402,
0.08809081465005875,
0.3063713610172272,
0.010798751376569271,
-0.06305772811174393,
-0.4197326898574829,
-0.3112783133983612,
0.014537468552589417,
0.08607366681098938,
-0.10746809095144272,
0.36468425393104553,
-0.05370118096470833,
-0.268521785736084,
-0.44320881366729736,
0.10508589446544647,
0.11436876654624939,
0.20233586430549622,
-0.17699387669563293,
0.22221054136753082,
-0.21476846933364868,
-0.17331399023532867,
0.34437569975852966,
0.4282422959804535,
-0.029236910864710808,
0.18783709406852722,
-0.21067678928375244,
-0.38733211159706116,
0.2546340227127075,
-0.2887779474258423,
-0.16298505663871765,
-0.46298402547836304,
0.17723610997200012,
-0.09543827921152115,
-0.16986311972141266,
-0.4217802584171295,
0.1528436839580536,
0.17121724784374237,
-0.10168135166168213,
-0.21474704146385193,
0.3726131319999695,
-0.04605412483215332,
-0.06841422617435455,
-0.018581420183181763,
0.1694672554731369,
0.1803847849369049,
-0.33431875705718994,
-0.11396206170320511,
-0.05983348563313484
] |
Subsets and Splits