html_url
stringlengths 51
51
| title
stringlengths 6
280
| comments
stringlengths 67
24.7k
| body
stringlengths 51
36.2k
| __index_level_0__
int64 1
1.17k
| comment_length
int64 16
1.45k
| text
stringlengths 190
38.3k
| embeddings
sequence |
---|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | > @lhoestq - do you know what might be happening inside pa_table.to_pydict(), as this is in the pyarrow domain. Perhaps you know someone to tag from that project?
`to_pydict` calls `to_pylist` on each column (i.e. on each PyArrow Array). Then it iterates on the array and calls `as_py` on each element. The `as_py` implementation depends on the data type. For strings I think it simply gets the buffer that contains the binary string data that is defined in C++
The Arrow team is pretty responsive at [email protected] if it can help
> Probably next need to remove datasets from the equation and make a reproducible case with just pyarrow directly.
That would be ideal indeed. Would be happy to help on this, can you give me access to the bucket so I can try with your data ? | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 138 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
> @lhoestq - do you know what might be happening inside pa_table.to_pydict(), as this is in the pyarrow domain. Perhaps you know someone to tag from that project?
`to_pydict` calls `to_pylist` on each column (i.e. on each PyArrow Array). Then it iterates on the array and calls `as_py` on each element. The `as_py` implementation depends on the data type. For strings I think it simply gets the buffer that contains the binary string data that is defined in C++
The Arrow team is pretty responsive at [email protected] if it can help
> Probably next need to remove datasets from the equation and make a reproducible case with just pyarrow directly.
That would be ideal indeed. Would be happy to help on this, can you give me access to the bucket so I can try with your data ? | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | > That would be ideal indeed. Would be happy to help on this, can you give me access to the bucket so I can try with your data ?
I added you to the bucket @lhoestq | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 36 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
> That would be ideal indeed. Would be happy to help on this, can you give me access to the bucket so I can try with your data ?
I added you to the bucket @lhoestq | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | It looks like an issue with memory mapping:
- the amount of memory used in the end corresponds to the size of the dataset
- setting `keep_in_memory=True` in `load_from_disk` loads the dataset in RAM, and **doesn't cause any memory leak** | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 40 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
It looks like an issue with memory mapping:
- the amount of memory used in the end corresponds to the size of the dataset
- setting `keep_in_memory=True` in `load_from_disk` loads the dataset in RAM, and **doesn't cause any memory leak** | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | Here is a code to reproduce this issue using only PyArrow and a dummy arrow file:
```python
import psutil
import os
import gc
import pyarrow as pa
import time
ARROW_PATH = "tmp.arrow"
if not os.path.exists(ARROW_PATH):
arr = pa.array([b"a" * (200 * 1024)] * 1000) # ~200MB
table = pa.table({"a": arr})
with open(ARROW_PATH, "wb") as f:
writer = pa.RecordBatchStreamWriter(f, schema=table.schema)
writer.write_table(table)
writer.close()
def memory_mapped_arrow_table_from_file(filename: str) -> pa.Table:
memory_mapped_stream = pa.memory_map(filename)
opened_stream = pa.ipc.open_stream(memory_mapped_stream)
pa_table = opened_stream.read_all()
return pa_table
table = memory_mapped_arrow_table_from_file(ARROW_PATH)
arr = table[0]
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
for idx, x in enumerate(arr):
if idx % 100 == 0:
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB")
```
prints
```
0 0.2500MB
100 19.8008MB
200 39.3320MB
300 58.8633MB
400 78.3945MB
500 97.9258MB
600 117.4570MB
700 136.9883MB
800 156.5195MB
900 176.0508MB
```
Note that this example simply iterates over the `pyarrow.lib.BinaryScalar` objects in the array. Running `.as_py()` is not needed to experience the memory issue. | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 161 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
Here is a code to reproduce this issue using only PyArrow and a dummy arrow file:
```python
import psutil
import os
import gc
import pyarrow as pa
import time
ARROW_PATH = "tmp.arrow"
if not os.path.exists(ARROW_PATH):
arr = pa.array([b"a" * (200 * 1024)] * 1000) # ~200MB
table = pa.table({"a": arr})
with open(ARROW_PATH, "wb") as f:
writer = pa.RecordBatchStreamWriter(f, schema=table.schema)
writer.write_table(table)
writer.close()
def memory_mapped_arrow_table_from_file(filename: str) -> pa.Table:
memory_mapped_stream = pa.memory_map(filename)
opened_stream = pa.ipc.open_stream(memory_mapped_stream)
pa_table = opened_stream.read_all()
return pa_table
table = memory_mapped_arrow_table_from_file(ARROW_PATH)
arr = table[0]
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
for idx, x in enumerate(arr):
if idx % 100 == 0:
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB")
```
prints
```
0 0.2500MB
100 19.8008MB
200 39.3320MB
300 58.8633MB
400 78.3945MB
500 97.9258MB
600 117.4570MB
700 136.9883MB
800 156.5195MB
900 176.0508MB
```
Note that this example simply iterates over the `pyarrow.lib.BinaryScalar` objects in the array. Running `.as_py()` is not needed to experience the memory issue. | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | @lhoestq that does indeed increase in memory, but if you iterate over array again after the first time, or re-open and remap the same file (repeat `table = memory_mapped_arrow_table_from_file(ARROW_PATH)`) before re-iterating, it doesn't move pas 195MB.... it would appear another step is needed to continue consuming memory past that.. hmmm
Are the pa_tables held on to anywhere after they are iterated in the real code?
in my hack, if you do a bunch cut & paste and then change the arr name for each iter
```
table = memory_mapped_arrow_table_from_file(ARROW_PATH)
arr = table[0]
for idx, x in enumerate(arr):
if idx % 100 == 0:
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB")
table = memory_mapped_arrow_table_from_file(ARROW_PATH)
arr1 = table[0]
for idx, x in enumerate(arr1):
if idx % 100 == 0:
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB")
table = memory_mapped_arrow_table_from_file(ARROW_PATH)
arr2 = table[0]
for idx, x in enumerate(arr2):
if idx % 100 == 0:
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB")
```
it leaks, if all arr are the same name (so prev one gets cleaned up) it does not and goes back to 0, anything that could be holding onto a reference of an intermediary equivalent like arr in the real use case?
| ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 219 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
@lhoestq that does indeed increase in memory, but if you iterate over array again after the first time, or re-open and remap the same file (repeat `table = memory_mapped_arrow_table_from_file(ARROW_PATH)`) before re-iterating, it doesn't move pas 195MB.... it would appear another step is needed to continue consuming memory past that.. hmmm
Are the pa_tables held on to anywhere after they are iterated in the real code?
in my hack, if you do a bunch cut & paste and then change the arr name for each iter
```
table = memory_mapped_arrow_table_from_file(ARROW_PATH)
arr = table[0]
for idx, x in enumerate(arr):
if idx % 100 == 0:
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB")
table = memory_mapped_arrow_table_from_file(ARROW_PATH)
arr1 = table[0]
for idx, x in enumerate(arr1):
if idx % 100 == 0:
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB")
table = memory_mapped_arrow_table_from_file(ARROW_PATH)
arr2 = table[0]
for idx, x in enumerate(arr2):
if idx % 100 == 0:
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB")
```
it leaks, if all arr are the same name (so prev one gets cleaned up) it does not and goes back to 0, anything that could be holding onto a reference of an intermediary equivalent like arr in the real use case?
| [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | Yes, we have already established here https://github.com/huggingface/datasets/issues/4883#issuecomment-1232063891 that when one iterates over the whole dataset multiple times, it consumes a bit more memory in the next few repetitions and then remains steady.
Which means that when a new iterator is created over the same dataset, all the memory from the previous iterator is re-used.
So the leak happens primarily when the iterator is "drained" the first time. which tells me that either a circular reference is created somewhere which only gets released when the iterator is destroyed, or there is some global variable that keeps piling up the memory and doesn't release it in time.
Also I noticed some `__del__` methods which won't destroy objects automatically and there is usually a warning against using it https://stackoverflow.com/a/1481512/9201239
There are also some `weakref`s in the code which too may lead to leaks or weird problems at times.
| ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 145 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
Yes, we have already established here https://github.com/huggingface/datasets/issues/4883#issuecomment-1232063891 that when one iterates over the whole dataset multiple times, it consumes a bit more memory in the next few repetitions and then remains steady.
Which means that when a new iterator is created over the same dataset, all the memory from the previous iterator is re-used.
So the leak happens primarily when the iterator is "drained" the first time. which tells me that either a circular reference is created somewhere which only gets released when the iterator is destroyed, or there is some global variable that keeps piling up the memory and doesn't release it in time.
Also I noticed some `__del__` methods which won't destroy objects automatically and there is usually a warning against using it https://stackoverflow.com/a/1481512/9201239
There are also some `weakref`s in the code which too may lead to leaks or weird problems at times.
| [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | @stas00 my point was, I'm not convinced @lhoestq last example illustrates the leak, but rather the differences between memory mapping and in memory usage patterns. If you destroy arr, memory map impl goes back to 0 each iteration. The amount of memory that 'looks' like it is leaked in first pass differes quite a bit between memory mapped vs in memory, but the underlying issue likely a circular reference, or reference(s) which were not cleaned up that would impact either case, but likely much more visible with mmap. | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 88 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
@stas00 my point was, I'm not convinced @lhoestq last example illustrates the leak, but rather the differences between memory mapping and in memory usage patterns. If you destroy arr, memory map impl goes back to 0 each iteration. The amount of memory that 'looks' like it is leaked in first pass differes quite a bit between memory mapped vs in memory, but the underlying issue likely a circular reference, or reference(s) which were not cleaned up that would impact either case, but likely much more visible with mmap. | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | Thank you for clarifying, Ross.
I think we agree that it's almost certain that the `datasets` iterator traps some inner variable that prevents object freeing, since if we create the iterator multiple times (and drain it) after a few runs no new memory is allocated. We could try to dig in more with `objgraph` - my main concern is if the problem happens somewhere outside of python, (i.e. in pyarrow cpp implementation) in which case it'd be much more difficult to trace.
I wish there was a way on linux to tell the program to free no longer used memory at will. | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 102 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
Thank you for clarifying, Ross.
I think we agree that it's almost certain that the `datasets` iterator traps some inner variable that prevents object freeing, since if we create the iterator multiple times (and drain it) after a few runs no new memory is allocated. We could try to dig in more with `objgraph` - my main concern is if the problem happens somewhere outside of python, (i.e. in pyarrow cpp implementation) in which case it'd be much more difficult to trace.
I wish there was a way on linux to tell the program to free no longer used memory at will. | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | FWIW, I revisted some code I had in the works to use HF datasets w/ timm train & val scripts. There is no leak there across multipe epochs. It uses the defaults.
It's worth noting that with imagenet `keep_in_memory=True` isn't even an option because the train arrow file is ~140GB and my local memory is less. The virtual address space reflects mmap (> 150GB) and doesn't increase over epochs that I noticed. I have some perf issues to bring up wrt to the current setup, but that's a separate and lower prio discussion to have elsewhere... | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 96 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
FWIW, I revisted some code I had in the works to use HF datasets w/ timm train & val scripts. There is no leak there across multipe epochs. It uses the defaults.
It's worth noting that with imagenet `keep_in_memory=True` isn't even an option because the train arrow file is ~140GB and my local memory is less. The virtual address space reflects mmap (> 150GB) and doesn't increase over epochs that I noticed. I have some perf issues to bring up wrt to the current setup, but that's a separate and lower prio discussion to have elsewhere... | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | # Notes
After reading many issues and trying many things here is the summary of my learning
I'm now using @lhoestq repro case as it's pyarrow-isolated: https://github.com/huggingface/datasets/issues/4883#issuecomment-1242034985
## 1. pyarrow memory backends
it has 3 backends, I tried them all with the same results
```
pa.set_memory_pool(pa.jemalloc_memory_pool())
pa.set_memory_pool(pa.mimalloc_memory_pool())
pa.set_memory_pool(pa.system_memory_pool())
```
## 2. quick release
The `jemalloc` backend supports quick release
```
pa.jemalloc_set_decay_ms(0)
```
it doesn't make any difference in this case
## 3. actual memory allocations
this is a useful tracer for PA memory allocators
```
pa.log_memory_allocations(enable=True)
```
it nicely reports memory allocations and releases when the arrow file is created the first time.
but when we then try to do `enumerate(arr)` this logger reports 0 allocations.
This summary also reports no allocations when the script run the second time (post file creation):
```
mem_pool = pa.default_memory_pool()
print(f"PyArrow mem pool info: {mem_pool.backend_name} backend, {mem_pool.bytes_allocated()} allocated, "
f"{mem_pool.max_memory()} max allocated, ")
print(f"PyArrow total allocated bytes: {pa.total_allocated_bytes()}")
```
However it's easy to see by using `tracemalloc` which only measures python's memory allocations that it's PA that leaks, since `tracemalloc` shows fixed memory
(this is bolted on top of the original repro script)
```
import tracemalloc
tracemalloc.start()
[...]
for idx, x in enumerate(arr):
if idx % 10 == 0:
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / 2**20
mem_use = pa.total_allocated_bytes() - start_use
mem_peak = pool.max_memory() - start_peak_use
second_size, second_peak = tracemalloc.get_traced_memory()
mem_diff = (second_size - first_size) / 2**20
mem_peak_diff = (second_peak - first_peak) / 2**20
# pa.jemalloc_memory_pool().release_unused()
# pa.mimalloc_memory_pool().release_unused()
# pa.system_memory_pool().release_unused()
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB {mem_diff:12.4f} {mem_peak_diff:12.4f} {memory_mapped_stream.size()/2**20:4.4}MB {mem_use/2**20:4.4}MB {mem_peak/2**20:4.4}MB")
```
gives:
```
0 5.4258MB 0.0110 0.0201 195.3MB 0.0MB 0.0MB
10 25.3672MB 0.0112 0.0202 195.3MB 0.0MB 0.0MB
20 45.9336MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
30 62.4336MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
40 83.0586MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
50 103.6836MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
60 124.3086MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
70 140.8086MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
80 161.4336MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
90 182.0586MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
```
the 3rd and 4th columns are `tracemalloc`'s report.
the 5th column is the size of mmaped stream - fixed.
the last 2 are the PA's malloc reports - you can see it's totally fixed and 0.
So what gives? PA's memory allocator says nothing was allocated and we can see python doesn't allocate any memory either.
As someone suggested in one of the PA issues that **IPC/GRPC could be the issue.** Any suggestions on how debug this one?
The main issue is that one can't step through with a python debugger as `arr` is an opaque cpp object binded to python.
Please see the next comment for a possible answer.
# ref-count
I also traced reference counts and they are all fixed using either `sys.getrefcount(x)` or `len(gc.get_referrers(x))`
so it's not the python object
# Important related discussions
https://issues.apache.org/jira/browse/ARROW-11007 - looks very similar to our issue
in particular this part of the report:
https://issues.apache.org/jira/browse/ARROW-11007?focusedCommentId=17279642&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17279642
| ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 482 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
# Notes
After reading many issues and trying many things here is the summary of my learning
I'm now using @lhoestq repro case as it's pyarrow-isolated: https://github.com/huggingface/datasets/issues/4883#issuecomment-1242034985
## 1. pyarrow memory backends
it has 3 backends, I tried them all with the same results
```
pa.set_memory_pool(pa.jemalloc_memory_pool())
pa.set_memory_pool(pa.mimalloc_memory_pool())
pa.set_memory_pool(pa.system_memory_pool())
```
## 2. quick release
The `jemalloc` backend supports quick release
```
pa.jemalloc_set_decay_ms(0)
```
it doesn't make any difference in this case
## 3. actual memory allocations
this is a useful tracer for PA memory allocators
```
pa.log_memory_allocations(enable=True)
```
it nicely reports memory allocations and releases when the arrow file is created the first time.
but when we then try to do `enumerate(arr)` this logger reports 0 allocations.
This summary also reports no allocations when the script run the second time (post file creation):
```
mem_pool = pa.default_memory_pool()
print(f"PyArrow mem pool info: {mem_pool.backend_name} backend, {mem_pool.bytes_allocated()} allocated, "
f"{mem_pool.max_memory()} max allocated, ")
print(f"PyArrow total allocated bytes: {pa.total_allocated_bytes()}")
```
However it's easy to see by using `tracemalloc` which only measures python's memory allocations that it's PA that leaks, since `tracemalloc` shows fixed memory
(this is bolted on top of the original repro script)
```
import tracemalloc
tracemalloc.start()
[...]
for idx, x in enumerate(arr):
if idx % 10 == 0:
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / 2**20
mem_use = pa.total_allocated_bytes() - start_use
mem_peak = pool.max_memory() - start_peak_use
second_size, second_peak = tracemalloc.get_traced_memory()
mem_diff = (second_size - first_size) / 2**20
mem_peak_diff = (second_peak - first_peak) / 2**20
# pa.jemalloc_memory_pool().release_unused()
# pa.mimalloc_memory_pool().release_unused()
# pa.system_memory_pool().release_unused()
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB {mem_diff:12.4f} {mem_peak_diff:12.4f} {memory_mapped_stream.size()/2**20:4.4}MB {mem_use/2**20:4.4}MB {mem_peak/2**20:4.4}MB")
```
gives:
```
0 5.4258MB 0.0110 0.0201 195.3MB 0.0MB 0.0MB
10 25.3672MB 0.0112 0.0202 195.3MB 0.0MB 0.0MB
20 45.9336MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
30 62.4336MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
40 83.0586MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
50 103.6836MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
60 124.3086MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
70 140.8086MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
80 161.4336MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
90 182.0586MB 0.0112 0.0203 195.3MB 0.0MB 0.0MB
```
the 3rd and 4th columns are `tracemalloc`'s report.
the 5th column is the size of mmaped stream - fixed.
the last 2 are the PA's malloc reports - you can see it's totally fixed and 0.
So what gives? PA's memory allocator says nothing was allocated and we can see python doesn't allocate any memory either.
As someone suggested in one of the PA issues that **IPC/GRPC could be the issue.** Any suggestions on how debug this one?
The main issue is that one can't step through with a python debugger as `arr` is an opaque cpp object binded to python.
Please see the next comment for a possible answer.
# ref-count
I also traced reference counts and they are all fixed using either `sys.getrefcount(x)` or `len(gc.get_referrers(x))`
so it's not the python object
# Important related discussions
https://issues.apache.org/jira/browse/ARROW-11007 - looks very similar to our issue
in particular this part of the report:
https://issues.apache.org/jira/browse/ARROW-11007?focusedCommentId=17279642&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17279642
| [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | # There is no leak, just badly communicated linux RSS memory usage stats
Next, lets revisit @rwightman's suggestion that there is actually no leak.
After all - we are using mmap which **will try to map** the file to RAM as much as it can and then page out if there is no memory. i.e. MMAP is only fast if you have a lot of CPU RAM.
So let's do it:
# Memory mapping OOM test
We first quickly start a cgroups-controlled shell which will instantly kill any program that consumes more than 1GB of memory:
```
$ systemd-run --user --scope -p MemoryHigh=1G -p MemoryMax=1G -p MemorySwapMax=1G --setenv="MEMLIMIT=1GB" bash
```
Let's check that it indeed does so. Let's change @lhoestq's script to allocate a 10GB arrow file:
```
$ python -c 'import pyarrow as pa; pa.array([b"a" * (2000 * 1024)] * 5000)'
Killed
```
oops, that didn't work, as we tried to allocate 10GB when only 1GB is allowed. This is what we want!
Let's do a sanity check - can we allocate 0.1GB?
```
python -c 'import pyarrow as pa; pa.array([b"a" * (2000 * 1024)] * 50)'
```
Yes. So the limited shell does the right thing. It let's allocate `< 1GB` of RSS RAM.
Next let's go back to @lhoestq's script but with 10GB arrow file.
we change his repro script https://github.com/huggingface/datasets/issues/4883#issuecomment-1242034985 to 50x larger file
```
arr = pa.array([b"a" * (2000 * 1024)] * 5000) # ~10000MB
```
we first have to run into a normal unlimited shell so that we don't get killed (as the script allocates 10GB)
let's run the script now in the 1GB-limited shell while running a monitor:
```
$ htop -F python -s M_RESIDENT -u `whoami`
```
so we have 2 sources of RSS info just in case.
```
$ python pyar.py
0 4.3516MB 0.0103 0.0194 9.766e+03MB 0.0MB 0.0MB
10 24.3008MB 0.0104 0.0195 9.766e+03MB 0.0MB 0.0MB
[...]
4980 9730.3672MB 0.0108 0.0199 9.766e+03MB 0.0MB 0.0MB
4990 9750.9922MB 0.0108 0.0199 9.766e+03MB 0.0MB 0.0MB
PyArrow mem pool info: jemalloc backend, 0 allocated, 0 max allocated,
PyArrow total allocated bytes: 0
```
But wait, it reported 10GB RSS both in `htop` and in our log!
So that means it never allocated 10GB otherwise it'd have been killed.
**Which tells us that there is no leak whatsoever** and this is just a really difficult situation where MMAPPED memory is reported as part of RSS which it probably shouldn't. As now we have no way how to measure real memory usage.
I also attached the script with all the different things I have tried in it, so it should be easy to turn them on/off if you want to reproduce any of my findings.
[pyar.txt](https://github.com/huggingface/datasets/files/9539430/pyar.txt)
just rename it to `pyra.py` as gh doesn't let attaching scripts...
(I have to remember to exit that special mem-limited shell or else I won't be able to do anything serious there.)
| ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 479 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
# There is no leak, just badly communicated linux RSS memory usage stats
Next, lets revisit @rwightman's suggestion that there is actually no leak.
After all - we are using mmap which **will try to map** the file to RAM as much as it can and then page out if there is no memory. i.e. MMAP is only fast if you have a lot of CPU RAM.
So let's do it:
# Memory mapping OOM test
We first quickly start a cgroups-controlled shell which will instantly kill any program that consumes more than 1GB of memory:
```
$ systemd-run --user --scope -p MemoryHigh=1G -p MemoryMax=1G -p MemorySwapMax=1G --setenv="MEMLIMIT=1GB" bash
```
Let's check that it indeed does so. Let's change @lhoestq's script to allocate a 10GB arrow file:
```
$ python -c 'import pyarrow as pa; pa.array([b"a" * (2000 * 1024)] * 5000)'
Killed
```
oops, that didn't work, as we tried to allocate 10GB when only 1GB is allowed. This is what we want!
Let's do a sanity check - can we allocate 0.1GB?
```
python -c 'import pyarrow as pa; pa.array([b"a" * (2000 * 1024)] * 50)'
```
Yes. So the limited shell does the right thing. It let's allocate `< 1GB` of RSS RAM.
Next let's go back to @lhoestq's script but with 10GB arrow file.
we change his repro script https://github.com/huggingface/datasets/issues/4883#issuecomment-1242034985 to 50x larger file
```
arr = pa.array([b"a" * (2000 * 1024)] * 5000) # ~10000MB
```
we first have to run into a normal unlimited shell so that we don't get killed (as the script allocates 10GB)
let's run the script now in the 1GB-limited shell while running a monitor:
```
$ htop -F python -s M_RESIDENT -u `whoami`
```
so we have 2 sources of RSS info just in case.
```
$ python pyar.py
0 4.3516MB 0.0103 0.0194 9.766e+03MB 0.0MB 0.0MB
10 24.3008MB 0.0104 0.0195 9.766e+03MB 0.0MB 0.0MB
[...]
4980 9730.3672MB 0.0108 0.0199 9.766e+03MB 0.0MB 0.0MB
4990 9750.9922MB 0.0108 0.0199 9.766e+03MB 0.0MB 0.0MB
PyArrow mem pool info: jemalloc backend, 0 allocated, 0 max allocated,
PyArrow total allocated bytes: 0
```
But wait, it reported 10GB RSS both in `htop` and in our log!
So that means it never allocated 10GB otherwise it'd have been killed.
**Which tells us that there is no leak whatsoever** and this is just a really difficult situation where MMAPPED memory is reported as part of RSS which it probably shouldn't. As now we have no way how to measure real memory usage.
I also attached the script with all the different things I have tried in it, so it should be easy to turn them on/off if you want to reproduce any of my findings.
[pyar.txt](https://github.com/huggingface/datasets/files/9539430/pyar.txt)
just rename it to `pyra.py` as gh doesn't let attaching scripts...
(I have to remember to exit that special mem-limited shell or else I won't be able to do anything serious there.)
| [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | The original leak in the multi-modal code is very likely something else. But of course now it'd be very difficult to trace it using mmap.
I think to debug we have to set `keep_in_memory=True` in `load_from_disk` to load the small dataset in RAM, so there will be no mmap misleading reporting component and then continue searching for another source of a leak. | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 62 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
The original leak in the multi-modal code is very likely something else. But of course now it'd be very difficult to trace it using mmap.
I think to debug we have to set `keep_in_memory=True` in `load_from_disk` to load the small dataset in RAM, so there will be no mmap misleading reporting component and then continue searching for another source of a leak. | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | To add to what @stas00 found, I'm gonna leave some links to where I believe the confusion came from in pyarrow's APIs, for future reference:
* In the section where they talk about [efficiently writing and reading arrow data](https://arrow.apache.org/docs/dev/python/ipc.html?#efficiently-writing-and-reading-arrow-data), they give an example of how
> Arrow can directly reference the data mapped from disk and avoid having to allocate its own memory.
And where their example shows 0 RSS memory allocation, the way we used to measure RSS shows 39.6719MB allocated. Here's the script to reproduce:
```
import psutil
import os
import gc
import pyarrow as pa
import time
import sys
# gc.set_debug(gc.DEBUG_LEAK)
# gc.set_threshold(0,0,0)
#pa.set_memory_pool(pa.mimalloc_memory_pool())
#pa.set_memory_pool(pa.system_memory_pool())
import tracemalloc
#pa.jemalloc_set_decay_ms(0)
# pa.log_memory_allocations(enable=True)
BATCH_SIZE = 10000
NUM_BATCHES = 1000
schema = pa.schema([pa.field('nums', pa.int32())])
with pa.OSFile('bigfile.arrow', 'wb') as sink:
with pa.ipc.new_file(sink, schema) as writer:
for row in range(NUM_BATCHES):
batch = pa.record_batch([pa.array(range(BATCH_SIZE), type=pa.int32())], schema)
writer.write(batch)
start_use = pa.total_allocated_bytes()
pool = pa.default_memory_pool()
start_peak_use = pool.max_memory()
tracemalloc.start()
first_size, first_peak = tracemalloc.get_traced_memory()
mem_before = psutil.Process(os.getpid()).memory_info().rss / 2**20
# with pa.OSFile('bigfile.arrow', 'rb') as source:
# loaded_array = pa.ipc.open_file(source).read_all()
with pa.memory_map('bigfile.arrow', 'rb') as source:
loaded_array = pa.ipc.open_file(source).read_all()
print("LEN:", len(loaded_array))
print("RSS: {}MB".format(pa.total_allocated_bytes() >> 20))
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / 2**20
mem_use = pa.total_allocated_bytes() - start_use
mem_peak = pool.max_memory() - start_peak_use
second_size, second_peak = tracemalloc.get_traced_memory()
mem_diff = (second_size - first_size) / 2**20
mem_peak_diff = (second_peak - first_peak) / 2**20
idx = 0
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB {mem_diff:12.4f} {mem_peak_diff:12.4f} {mem_use/2**20:4.4}MB {mem_peak/2**20:4.4}MB")
```
gives:
```
LEN: 10000000
RSS: 0MB
0 39.6719MB 0.0132 0.0529 0.0MB 0.0MB
```
Which again just proves that we uncorrectly measure RSS, in the case of MMAPPED memory
* [The recommended way to do memory profiling from Arrow's docs](https://arrow.apache.org/docs/dev/cpp/memory.html#memory-profiling)
| ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 272 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
To add to what @stas00 found, I'm gonna leave some links to where I believe the confusion came from in pyarrow's APIs, for future reference:
* In the section where they talk about [efficiently writing and reading arrow data](https://arrow.apache.org/docs/dev/python/ipc.html?#efficiently-writing-and-reading-arrow-data), they give an example of how
> Arrow can directly reference the data mapped from disk and avoid having to allocate its own memory.
And where their example shows 0 RSS memory allocation, the way we used to measure RSS shows 39.6719MB allocated. Here's the script to reproduce:
```
import psutil
import os
import gc
import pyarrow as pa
import time
import sys
# gc.set_debug(gc.DEBUG_LEAK)
# gc.set_threshold(0,0,0)
#pa.set_memory_pool(pa.mimalloc_memory_pool())
#pa.set_memory_pool(pa.system_memory_pool())
import tracemalloc
#pa.jemalloc_set_decay_ms(0)
# pa.log_memory_allocations(enable=True)
BATCH_SIZE = 10000
NUM_BATCHES = 1000
schema = pa.schema([pa.field('nums', pa.int32())])
with pa.OSFile('bigfile.arrow', 'wb') as sink:
with pa.ipc.new_file(sink, schema) as writer:
for row in range(NUM_BATCHES):
batch = pa.record_batch([pa.array(range(BATCH_SIZE), type=pa.int32())], schema)
writer.write(batch)
start_use = pa.total_allocated_bytes()
pool = pa.default_memory_pool()
start_peak_use = pool.max_memory()
tracemalloc.start()
first_size, first_peak = tracemalloc.get_traced_memory()
mem_before = psutil.Process(os.getpid()).memory_info().rss / 2**20
# with pa.OSFile('bigfile.arrow', 'rb') as source:
# loaded_array = pa.ipc.open_file(source).read_all()
with pa.memory_map('bigfile.arrow', 'rb') as source:
loaded_array = pa.ipc.open_file(source).read_all()
print("LEN:", len(loaded_array))
print("RSS: {}MB".format(pa.total_allocated_bytes() >> 20))
gc.collect()
time.sleep(0.1)
mem_after = psutil.Process(os.getpid()).memory_info().rss / 2**20
mem_use = pa.total_allocated_bytes() - start_use
mem_peak = pool.max_memory() - start_peak_use
second_size, second_peak = tracemalloc.get_traced_memory()
mem_diff = (second_size - first_size) / 2**20
mem_peak_diff = (second_peak - first_peak) / 2**20
idx = 0
print(f"{idx:4d} {mem_after - mem_before:12.4f}MB {mem_diff:12.4f} {mem_peak_diff:12.4f} {mem_use/2**20:4.4}MB {mem_peak/2**20:4.4}MB")
```
gives:
```
LEN: 10000000
RSS: 0MB
0 39.6719MB 0.0132 0.0529 0.0MB 0.0MB
```
Which again just proves that we uncorrectly measure RSS, in the case of MMAPPED memory
* [The recommended way to do memory profiling from Arrow's docs](https://arrow.apache.org/docs/dev/cpp/memory.html#memory-profiling)
| [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | @lhoestq, I have been working on a detailed article that shows that MMAP doesn't leak and it's mostly ready. I will share when it's ready.
The issue is that we still need to be able to debug memory leaks by turning MMAP off.
But, once I tried to show the user that using `load_dataset(... keep_in_memory=True)` is the way to debug an actual memory leak - guess I what I discovered? A potential actual leak.
Here is the repro:
```
$ cat ds-mmap.py
from datasets import load_dataset
import gc
import os
import psutil
proc = psutil.Process(os.getpid())
def mem_read():
gc.collect()
return proc.memory_info().rss / 2**20
dataset = load_dataset("wmt19", 'cs-en', keep_in_memory=True, streaming=False)['train']
print(f"{'idx':>6} {'RSS':>10} {'Δ RSS':>15}")
step = 20000
for i in range(0, 10*step, step):
mem_before = mem_read()
_ = dataset[i:i+step]
mem_after = mem_read()
print(f"{i:6d} {mem_after:12.4f}MB {mem_after - mem_before:12.4f}MB ")
```
```
python ds-io.py
Reusing dataset wmt19 (/home/stas/.cache/huggingface/datasets/wmt19/cs-en/1.0.0/c3db1bf4240362ed1ef4673b354f468d70aac66d4e67d45f536d493a0840f0d3)
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 5.66it/s]
idx RSS Δ RSS
0 1398.4609MB 3.5195MB
20000 1398.5742MB 0.1133MB
40000 1398.6016MB 0.0273MB
60000 1398.6016MB 0.0000MB
80000 1398.6016MB 0.0000MB
100000 1398.6328MB 0.0312MB
120000 1398.6953MB 0.0625MB
140000 1398.6953MB 0.0000MB
160000 1398.7500MB 0.0547MB
180000 1398.7500MB 0.0000MB
``` | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 183 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
@lhoestq, I have been working on a detailed article that shows that MMAP doesn't leak and it's mostly ready. I will share when it's ready.
The issue is that we still need to be able to debug memory leaks by turning MMAP off.
But, once I tried to show the user that using `load_dataset(... keep_in_memory=True)` is the way to debug an actual memory leak - guess I what I discovered? A potential actual leak.
Here is the repro:
```
$ cat ds-mmap.py
from datasets import load_dataset
import gc
import os
import psutil
proc = psutil.Process(os.getpid())
def mem_read():
gc.collect()
return proc.memory_info().rss / 2**20
dataset = load_dataset("wmt19", 'cs-en', keep_in_memory=True, streaming=False)['train']
print(f"{'idx':>6} {'RSS':>10} {'Δ RSS':>15}")
step = 20000
for i in range(0, 10*step, step):
mem_before = mem_read()
_ = dataset[i:i+step]
mem_after = mem_read()
print(f"{i:6d} {mem_after:12.4f}MB {mem_after - mem_before:12.4f}MB ")
```
```
python ds-io.py
Reusing dataset wmt19 (/home/stas/.cache/huggingface/datasets/wmt19/cs-en/1.0.0/c3db1bf4240362ed1ef4673b354f468d70aac66d4e67d45f536d493a0840f0d3)
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 5.66it/s]
idx RSS Δ RSS
0 1398.4609MB 3.5195MB
20000 1398.5742MB 0.1133MB
40000 1398.6016MB 0.0273MB
60000 1398.6016MB 0.0000MB
80000 1398.6016MB 0.0000MB
100000 1398.6328MB 0.0312MB
120000 1398.6953MB 0.0625MB
140000 1398.6953MB 0.0000MB
160000 1398.7500MB 0.0547MB
180000 1398.7500MB 0.0000MB
``` | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | as I suggested on slack perhaps it was due to dataset records length variation, so with your help I wrote another repro with synthetic records which are all identical - which should remove my hypothese from the equation and we should expect 0 incremental growth as we iterate over the datasets. But alas this is not the case. There is a tiny but definite leak-like behavior.
Here is the new repro:
```
$ cat ds-synthetic-no-mmap.py
from datasets import load_from_disk, Dataset
import gc
import sys
import os
import psutil
proc = psutil.Process(os.getpid())
def mem_read():
gc.collect()
return proc.memory_info().rss / 2**20
DS_PATH = "synthetic-ds"
if not os.path.exists(DS_PATH):
records = 1_000_000
print("Creating a synthetic dataset")
row = dict(foo=[dict(a='a'*500, b='b'*1000)])
ds = Dataset.from_dict({k: [v] * records for k, v in row.items()})
ds.save_to_disk(DS_PATH)
print("Done. Please restart the program")
sys.exit()
dataset = load_from_disk(DS_PATH, keep_in_memory=True)
print(f"Dataset len={len(dataset)}")
print(f"{'idx':>8} {'RSS':>10} {'Δ RSS':>15}")
mem_start = 0
step = 25_000
warmup_iterations = 4
for idx, i in enumerate(range(0, len(dataset), step)):
if idx == warmup_iterations: # skip the first few iterations while things get set up
mem_start = mem_read()
mem_before = mem_read()
_ = dataset[i:i+step]
mem_after = mem_read()
print(f"{i:8d} {mem_after:12.4f}MB {mem_after - mem_before:12.4f}MB")
mem_end = mem_read()
print(f"Total diff: {mem_end - mem_start:12.4f}MB (after {warmup_iterations} warmup iterations)")
```
and the run:
```
$ python ds-synthetic-no-mmap.py
Dataset len=1000000
idx RSS Δ RSS
0 1601.9258MB 47.9688MB
25000 1641.6289MB 39.7031MB
50000 1641.8594MB 0.2305MB
75000 1642.1289MB 0.2695MB
100000 1642.1289MB 0.0000MB
125000 1642.3789MB 0.2500MB
150000 1642.3789MB 0.0000MB
175000 1642.6289MB 0.2500MB
200000 1642.6289MB 0.0000MB
225000 1642.8789MB 0.2500MB
250000 1642.8828MB 0.0039MB
275000 1643.1328MB 0.2500MB
300000 1643.1328MB 0.0000MB
325000 1643.3828MB 0.2500MB
350000 1643.3828MB 0.0000MB
375000 1643.6328MB 0.2500MB
400000 1643.6328MB 0.0000MB
425000 1643.8828MB 0.2500MB
450000 1643.8828MB 0.0000MB
475000 1644.1328MB 0.2500MB
500000 1644.1328MB 0.0000MB
525000 1644.3828MB 0.2500MB
550000 1644.3828MB 0.0000MB
575000 1644.6328MB 0.2500MB
600000 1644.6328MB 0.0000MB
625000 1644.8828MB 0.2500MB
650000 1644.8828MB 0.0000MB
675000 1645.1328MB 0.2500MB
700000 1645.1328MB 0.0000MB
725000 1645.3828MB 0.2500MB
750000 1645.3828MB 0.0000MB
775000 1645.6328MB 0.2500MB
800000 1645.6328MB 0.0000MB
825000 1645.8828MB 0.2500MB
850000 1645.8828MB 0.0000MB
875000 1646.1328MB 0.2500MB
900000 1646.1328MB 0.0000MB
925000 1646.3828MB 0.2500MB
950000 1646.3828MB 0.0000MB
975000 1646.6328MB 0.2500MB
Total diff: 4.5039MB (after 4 warmup iterations)
```
so I'm still not sure why we get this.
As you can see I started skipping the first few iterations where memory isn't stable yet. As the actual diff is much larger if we count all iterations.
What do you think? | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 386 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
as I suggested on slack perhaps it was due to dataset records length variation, so with your help I wrote another repro with synthetic records which are all identical - which should remove my hypothese from the equation and we should expect 0 incremental growth as we iterate over the datasets. But alas this is not the case. There is a tiny but definite leak-like behavior.
Here is the new repro:
```
$ cat ds-synthetic-no-mmap.py
from datasets import load_from_disk, Dataset
import gc
import sys
import os
import psutil
proc = psutil.Process(os.getpid())
def mem_read():
gc.collect()
return proc.memory_info().rss / 2**20
DS_PATH = "synthetic-ds"
if not os.path.exists(DS_PATH):
records = 1_000_000
print("Creating a synthetic dataset")
row = dict(foo=[dict(a='a'*500, b='b'*1000)])
ds = Dataset.from_dict({k: [v] * records for k, v in row.items()})
ds.save_to_disk(DS_PATH)
print("Done. Please restart the program")
sys.exit()
dataset = load_from_disk(DS_PATH, keep_in_memory=True)
print(f"Dataset len={len(dataset)}")
print(f"{'idx':>8} {'RSS':>10} {'Δ RSS':>15}")
mem_start = 0
step = 25_000
warmup_iterations = 4
for idx, i in enumerate(range(0, len(dataset), step)):
if idx == warmup_iterations: # skip the first few iterations while things get set up
mem_start = mem_read()
mem_before = mem_read()
_ = dataset[i:i+step]
mem_after = mem_read()
print(f"{i:8d} {mem_after:12.4f}MB {mem_after - mem_before:12.4f}MB")
mem_end = mem_read()
print(f"Total diff: {mem_end - mem_start:12.4f}MB (after {warmup_iterations} warmup iterations)")
```
and the run:
```
$ python ds-synthetic-no-mmap.py
Dataset len=1000000
idx RSS Δ RSS
0 1601.9258MB 47.9688MB
25000 1641.6289MB 39.7031MB
50000 1641.8594MB 0.2305MB
75000 1642.1289MB 0.2695MB
100000 1642.1289MB 0.0000MB
125000 1642.3789MB 0.2500MB
150000 1642.3789MB 0.0000MB
175000 1642.6289MB 0.2500MB
200000 1642.6289MB 0.0000MB
225000 1642.8789MB 0.2500MB
250000 1642.8828MB 0.0039MB
275000 1643.1328MB 0.2500MB
300000 1643.1328MB 0.0000MB
325000 1643.3828MB 0.2500MB
350000 1643.3828MB 0.0000MB
375000 1643.6328MB 0.2500MB
400000 1643.6328MB 0.0000MB
425000 1643.8828MB 0.2500MB
450000 1643.8828MB 0.0000MB
475000 1644.1328MB 0.2500MB
500000 1644.1328MB 0.0000MB
525000 1644.3828MB 0.2500MB
550000 1644.3828MB 0.0000MB
575000 1644.6328MB 0.2500MB
600000 1644.6328MB 0.0000MB
625000 1644.8828MB 0.2500MB
650000 1644.8828MB 0.0000MB
675000 1645.1328MB 0.2500MB
700000 1645.1328MB 0.0000MB
725000 1645.3828MB 0.2500MB
750000 1645.3828MB 0.0000MB
775000 1645.6328MB 0.2500MB
800000 1645.6328MB 0.0000MB
825000 1645.8828MB 0.2500MB
850000 1645.8828MB 0.0000MB
875000 1646.1328MB 0.2500MB
900000 1646.1328MB 0.0000MB
925000 1646.3828MB 0.2500MB
950000 1646.3828MB 0.0000MB
975000 1646.6328MB 0.2500MB
Total diff: 4.5039MB (after 4 warmup iterations)
```
so I'm still not sure why we get this.
As you can see I started skipping the first few iterations where memory isn't stable yet. As the actual diff is much larger if we count all iterations.
What do you think? | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | @stas00 my 2 cents from having looked at a LOT of memory leaks over the years, esp in Python, .3% memory increase over that many iterations of something is difficult to say with certainty it is a leak.
Also, just looking at RSS makes it hard to analyze leaks. RSS can stay near constant while you are leaking. RSS is paged in mem, if you have a big leak your RSS might not increase much (leaked mem tends not to get used again so often paged out) while your virtual page allocation could be going through the roof... | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 98 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
@stas00 my 2 cents from having looked at a LOT of memory leaks over the years, esp in Python, .3% memory increase over that many iterations of something is difficult to say with certainty it is a leak.
Also, just looking at RSS makes it hard to analyze leaks. RSS can stay near constant while you are leaking. RSS is paged in mem, if you have a big leak your RSS might not increase much (leaked mem tends not to get used again so often paged out) while your virtual page allocation could be going through the roof... | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | yes, that's true, but unless the leak is big, I'm yet to find another measurement tool.
To prove your point here is a very simple IO in a loop program that also reads the same line all over again:
```
$ cat mmap-no-leak-debug.py
import gc
import mmap
import os
import psutil
import sys
proc = psutil.Process(os.getpid())
PATH = "./tmp.txt"
def mem_read():
gc.collect()
return proc.memory_info().rss / 2**20
# create a large data file with a few long lines
if not os.path.exists(PATH):
with open(PATH, "w") as fh:
s = 'a'* 2**27 + "\n" # 128MB
# write ~2GB file
for i in range(16):
fh.write(s)
print(f"{'idx':>4} {'RSS':>10} {'Δ RSS':>12} {'Δ accumulated':>10}")
total_read = 0
content = ''
mem_after = mem_before_acc = mem_after_acc = mem_before = proc.memory_info().rss / 2**20
print(f"{0:4d} {mem_after:10.2f}MB {mem_after - 0:10.2f}MB {0:10.2f}MB")
mmap_mode = True if "--mmap" in sys.argv else False
with open(PATH, "r") as fh:
if mmap_mode:
mm = mmap.mmap(fh.fileno(), 0, access=mmap.ACCESS_READ)
idx = 0
while True:
idx += 1
mem_before = mem_read()
line = mm.readline() if mmap_mode else fh.readline()
if not line:
break
#total_read += len(line)
if "--accumulate" in sys.argv:
mem_before_acc = mem_read()
content += str(line)
mem_after_acc = mem_read()
mem_after = mem_read()
print(f"{idx:4d} {mem_after:10.2f}MB {mem_after - mem_before:10.2f}MB {mem_after_acc - mem_before_acc:10.2f}MB")
```
it has some other instrumentations to do mmap and accumulate data, but let's ignore that for now.
Here it is running in a simple non-mmap IO:
```
$ python mmap-no-leak-debug.py
idx RSS Δ RSS Δ accumulated
0 12.43MB 12.43MB 0.00MB
1 269.72MB 257.29MB 0.00MB
2 269.73MB 0.02MB 0.00MB
3 269.73MB 0.00MB 0.00MB
4 269.74MB 0.01MB 0.00MB
5 269.74MB 0.00MB 0.00MB
6 269.75MB 0.01MB 0.00MB
7 269.75MB 0.00MB 0.00MB
8 269.76MB 0.01MB 0.00MB
9 269.76MB 0.00MB 0.00MB
10 269.77MB 0.01MB 0.00MB
11 269.77MB 0.00MB 0.00MB
12 269.77MB 0.00MB 0.00MB
13 269.77MB 0.00MB 0.00MB
14 269.77MB 0.00MB 0.00MB
15 269.77MB 0.00MB 0.00MB
16 146.02MB -123.75MB 0.00MB
```
as you can see even this super-simplistic program that just performs `readline()` slightly increases in RSS over iterations.
If you have a better tool for measurement other than RSS, I'm all ears. | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 339 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
yes, that's true, but unless the leak is big, I'm yet to find another measurement tool.
To prove your point here is a very simple IO in a loop program that also reads the same line all over again:
```
$ cat mmap-no-leak-debug.py
import gc
import mmap
import os
import psutil
import sys
proc = psutil.Process(os.getpid())
PATH = "./tmp.txt"
def mem_read():
gc.collect()
return proc.memory_info().rss / 2**20
# create a large data file with a few long lines
if not os.path.exists(PATH):
with open(PATH, "w") as fh:
s = 'a'* 2**27 + "\n" # 128MB
# write ~2GB file
for i in range(16):
fh.write(s)
print(f"{'idx':>4} {'RSS':>10} {'Δ RSS':>12} {'Δ accumulated':>10}")
total_read = 0
content = ''
mem_after = mem_before_acc = mem_after_acc = mem_before = proc.memory_info().rss / 2**20
print(f"{0:4d} {mem_after:10.2f}MB {mem_after - 0:10.2f}MB {0:10.2f}MB")
mmap_mode = True if "--mmap" in sys.argv else False
with open(PATH, "r") as fh:
if mmap_mode:
mm = mmap.mmap(fh.fileno(), 0, access=mmap.ACCESS_READ)
idx = 0
while True:
idx += 1
mem_before = mem_read()
line = mm.readline() if mmap_mode else fh.readline()
if not line:
break
#total_read += len(line)
if "--accumulate" in sys.argv:
mem_before_acc = mem_read()
content += str(line)
mem_after_acc = mem_read()
mem_after = mem_read()
print(f"{idx:4d} {mem_after:10.2f}MB {mem_after - mem_before:10.2f}MB {mem_after_acc - mem_before_acc:10.2f}MB")
```
it has some other instrumentations to do mmap and accumulate data, but let's ignore that for now.
Here it is running in a simple non-mmap IO:
```
$ python mmap-no-leak-debug.py
idx RSS Δ RSS Δ accumulated
0 12.43MB 12.43MB 0.00MB
1 269.72MB 257.29MB 0.00MB
2 269.73MB 0.02MB 0.00MB
3 269.73MB 0.00MB 0.00MB
4 269.74MB 0.01MB 0.00MB
5 269.74MB 0.00MB 0.00MB
6 269.75MB 0.01MB 0.00MB
7 269.75MB 0.00MB 0.00MB
8 269.76MB 0.01MB 0.00MB
9 269.76MB 0.00MB 0.00MB
10 269.77MB 0.01MB 0.00MB
11 269.77MB 0.00MB 0.00MB
12 269.77MB 0.00MB 0.00MB
13 269.77MB 0.00MB 0.00MB
14 269.77MB 0.00MB 0.00MB
15 269.77MB 0.00MB 0.00MB
16 146.02MB -123.75MB 0.00MB
```
as you can see even this super-simplistic program that just performs `readline()` slightly increases in RSS over iterations.
If you have a better tool for measurement other than RSS, I'm all ears. | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4883 | With dataloader RSS memory consumed by HF datasets monotonically increases | @stas00 if you aren't using memory maps, you should be able to clearly see the increase in the virtual mem for the process as well. Even then, it could still be challenging to determine if it's leak vs fragmentation due to problematic allocation patterns (not uncommon with Python). Using a better mem allocator like tcmalloc via LD_PRELOAD hooks could reduce impact of fragmentation across both Python and c libs. Not sure that plays nice with any allocator that arrow might use itself though. | ## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
| 562 | 83 | With dataloader RSS memory consumed by HF datasets monotonically increases
## Describe the bug
When the HF datasets is used in conjunction with PyTorch Dataloader, the RSS memory of the process keeps on increasing when it should stay constant.
## Steps to reproduce the bug
Run and observe the output of this snippet which logs RSS memory.
```python
import psutil
import os
from transformers import BertTokenizer
from datasets import load_dataset
from torch.utils.data import DataLoader
BATCH_SIZE = 32
NUM_TRIES = 10
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def transform(x):
x.update(tokenizer(x["text"], return_tensors="pt", max_length=64, padding="max_length", truncation=True))
x.pop("text")
x.pop("label")
return x
dataset = load_dataset("imdb", split="train")
dataset.set_transform(transform)
train_loader = DataLoader(dataset, batch_size=BATCH_SIZE, shuffle=True, num_workers=4)
mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
count = 0
while count < NUM_TRIES:
for idx, batch in enumerate(train_loader):
mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024)
print(count, idx, mem_after - mem_before)
count += 1
```
## Expected results
Memory should not increase after initial setup and loading of the dataset
## Actual results
Memory continuously increases as can be seen in the log.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 7.0.0
@stas00 if you aren't using memory maps, you should be able to clearly see the increase in the virtual mem for the process as well. Even then, it could still be challenging to determine if it's leak vs fragmentation due to problematic allocation patterns (not uncommon with Python). Using a better mem allocator like tcmalloc via LD_PRELOAD hooks could reduce impact of fragmentation across both Python and c libs. Not sure that plays nice with any allocator that arrow might use itself though. | [
-1.3456745147705078,
-0.9408893585205078,
-0.6082325577735901,
1.4900658130645752,
-0.16659556329250336,
-1.1978836059570312,
0.18446822464466095,
-0.9904817938804626,
1.7127701044082642,
-0.9127209782600403,
0.32199573516845703,
-1.645914077758789,
0.008292214944958687,
-0.5305266380310059,
-0.7368240356445312,
-0.8680623769760132,
-0.3830266296863556,
-0.755933940410614,
1.0888969898223877,
2.4927315711975098,
1.2132302522659302,
-1.3673100471496582,
2.8145322799682617,
0.6641378998756409,
-0.20078502595424652,
-0.9981290102005005,
0.4903518259525299,
-0.028081411495804787,
-1.3940471410751343,
-0.42926546931266785,
-0.9887250661849976,
-0.04549615830183029,
-0.5573567748069763,
-0.5104092359542847,
0.05121902376413345,
0.3866605758666992,
-0.2967248558998108,
-0.47202277183532715,
-0.5758332014083862,
-0.7513810992240906,
0.5142050385475159,
-0.3368419408798218,
0.9138073921203613,
-0.3782516419887543,
1.8067529201507568,
-0.6006296873092651,
0.5444851517677307,
0.6974621415138245,
1.296736240386963,
0.3136139214038849,
-0.07975853234529495,
0.37863773107528687,
0.3654620945453644,
0.02466842718422413,
0.5280435681343079,
1.238614797592163,
0.6420201659202576,
0.5056704878807068,
0.7074031829833984,
-2.1996448040008545,
1.337660312652588,
-1.0472979545593262,
0.3104155361652374,
1.3663548231124878,
-1.0244818925857544,
0.404926061630249,
-1.8165744543075562,
-0.17714202404022217,
0.5387469530105591,
-2.227980852127075,
0.26181337237358093,
-1.333545446395874,
-0.5536288619041443,
1.0510144233703613,
0.39305680990219116,
-1.2066415548324585,
0.02880621887743473,
-0.4824528396129608,
1.0472171306610107,
0.4035400152206421,
1.1232656240463257,
-1.6934772729873657,
-0.09558111429214478,
-0.2548387944698334,
0.13386526703834534,
-1.2733478546142578,
-1.5739248991012573,
0.6284825205802917,
0.6872959136962891,
0.5347981452941895,
-0.168450728058815,
1.1074827909469604,
-1.0748878717422485,
0.810119092464447,
-0.9592978358268738,
-1.7534220218658447,
-1.442900538444519,
-2.2745959758758545,
-2.2582132816314697,
0.7272041440010071,
-0.3630068004131317,
-0.5768483877182007,
2.1622564792633057,
-1.0507404804229736,
-1.7097580432891846,
1.1498268842697144,
0.20130011439323425,
-0.03294523060321808,
2.3897061347961426,
0.24802783131599426,
-0.7693718075752258,
0.48302945494651794,
-0.6801387667655945,
0.7557951211929321,
-0.32687100768089294,
1.3288655281066895,
0.35964101552963257,
-1.077149510383606,
1.5594624280929565,
-0.3565557897090912,
0.5547168850898743,
-0.5378705263137817,
-0.5056799054145813,
-0.6777976751327515,
0.30499202013015747,
1.9391034841537476,
-0.24899491667747498,
1.4876232147216797,
-0.28325730562210083,
-1.5276548862457275,
-1.6066371202468872,
0.8666796088218689,
0.5084416270256042,
-0.6998859643936157,
0.11254440993070602,
-0.4678167402744293,
0.08040022850036621,
0.0418856143951416,
1.1831382513046265,
1.3379158973693848,
0.7654542326927185,
-0.3034147620201111,
-0.8241268396377563,
0.14076216518878937,
-0.06860007345676422,
-0.6152783036231995,
-1.6993037462234497,
-0.3541695177555084,
0.12285004556179047,
0.6346868276596069,
-1.139463186264038,
1.791568636894226,
0.9444905519485474,
1.8820761442184448,
0.9884319305419922,
-0.26258715987205505,
1.4546303749084473,
0.10867669433355331,
1.8005536794662476,
-0.41651254892349243,
0.6643854379653931,
-0.3957706093788147,
-1.1714314222335815,
0.8055565357208252,
-0.3990897238254547,
-2.0226633548736572,
-0.7003831267356873,
-0.8200564384460449,
-0.1491536796092987,
-0.8277912735939026,
0.9397925138473511,
-0.23813442885875702,
-1.4107216596603394,
0.25831156969070435,
-0.7547075748443604,
0.17807255685329437,
-1.237444281578064,
0.31925198435783386,
0.6853119730949402,
-0.6437072157859802,
0.07194779068231583,
-0.23367372155189514,
-1.2896608114242554,
-0.5049828886985779,
0.33292391896247864,
1.8890324831008911,
-0.7776071429252625,
0.9924145340919495,
1.0876238346099854,
-0.6968219876289368,
0.012549536302685738,
0.26442599296569824,
-0.35494548082351685,
0.8863717913627625,
-1.0513525009155273,
-0.3630474805831909,
1.2163238525390625,
-0.25326991081237793,
-0.5605433583259583,
1.5159350633621216,
0.6593117117881775,
-1.002369999885559,
-0.23206187784671783,
-0.12939003109931946,
-0.8466392159461975,
-0.005218449980020523,
-1.5683531761169434,
-0.08878418803215027,
0.4685538411140442,
-1.5128296613693237,
-0.5017187595367432,
-0.15047891438007355,
1.3515366315841675,
-0.11259105056524277,
1.5023568868637085,
-0.415457159280777,
-0.1297438144683838,
-0.3727469742298126,
-0.36567479372024536,
0.11482261121273041,
-0.20836268365383148,
-0.5902147889137268,
0.21720631420612335,
-0.8024930953979492,
0.2840043902397156,
1.469167947769165,
0.3803018629550934,
-0.025415390729904175,
0.5581291317939758,
1.1453503370285034,
0.37100544571876526,
-0.1272420436143875,
-0.8356252908706665,
-1.613617181777954,
1.9466984272003174,
-1.42118501663208,
2.011033296585083,
0.7807146310806274,
-0.024200191721320152,
-1.788856029510498,
-1.9044363498687744,
1.3422175645828247,
1.1275908946990967,
2.3904876708984375,
0.4904828369617462,
0.3934091329574585,
-0.8226829171180725,
-0.6534190773963928,
0.3855447769165039,
-1.0276910066604614,
-0.7147096991539001,
0.1934453397989273,
2.384058952331543,
1.7914016246795654,
-0.4404252767562866,
-0.14885959029197693,
-0.9774578213691711,
1.3912009000778198,
-0.23916912078857422,
0.2010434865951538,
1.9593064785003662,
-0.2583774924278259,
-1.050148606300354,
1.328955054283142,
-2.323151111602783,
0.1382395327091217,
2.044011354446411,
0.28365230560302734,
0.012549808248877525,
-1.3272994756698608,
-0.6089122891426086,
-0.32975390553474426,
-0.3469744622707367,
-1.2489533424377441,
0.5056625604629517,
-0.22484679520130157,
-0.8096854090690613,
-1.340374231338501,
0.1352320909500122,
-1.1494815349578857,
-1.643752932548523,
0.24344241619110107,
1.820591926574707,
2.090343475341797,
-0.7278938293457031,
1.5236506462097168,
-0.30115294456481934,
0.1484161913394928,
1.1960254907608032,
1.2635914087295532,
3.192150115966797,
1.8740202188491821,
-1.3503233194351196,
0.6581200957298279,
-0.13437402248382568,
-0.45284736156463623,
1.1497379541397095,
-1.2457644939422607,
1.3134595155715942,
-0.12174821645021439,
-1.2098270654678345,
-1.2116332054138184,
1.0029468536376953,
0.45783451199531555,
0.03292365372180939,
-0.4919250011444092,
1.2115298509597778,
0.09584575891494751,
1.3724995851516724,
0.48495498299598694,
-0.3532949686050415,
0.5766444802284241,
-0.40999969840049744,
-0.5519458651542664,
1.5657682418823242,
0.2363395094871521,
-1.4753748178482056,
-2.179252862930298,
-0.21737970411777496,
-0.8505850434303284,
0.09153411537408829,
-0.6642230749130249,
-0.9736753106117249,
1.605678915977478,
0.3569697439670563,
-1.2210720777511597,
-0.2926757335662842,
-0.3624151945114136,
-0.6017191410064697,
2.7155795097351074,
-1.3522179126739502,
-0.1738610416650772,
-0.9802293181419373,
-0.639472484588623,
1.639389157295227,
-1.233166217803955,
-0.2628035247325897,
-0.9534544944763184,
-0.5630477070808411,
-1.2418452501296997,
-0.5834013223648071,
0.03595472127199173,
-0.9480134844779968,
0.7940202355384827,
0.07852134853601456,
-1.234148621559143,
-0.31920620799064636,
-0.8554741740226746,
0.9480671882629395,
-0.20090952515602112,
0.08390350639820099,
1.7664235830307007,
0.2792228162288666,
-0.4304153621196747,
0.80732262134552,
1.2393101453781128,
0.620684802532196,
-0.5920217633247375,
0.1725146323442459,
-0.6946435570716858,
0.37656018137931824,
-1.2498857975006104,
0.270234614610672,
-2.9029159545898438,
0.6336669325828552,
-0.08079998940229416,
-0.06381617486476898,
-0.0734049528837204,
-1.2625430822372437,
1.0222158432006836,
2.5063514709472656,
-1.1626150608062744,
0.5008445978164673,
0.3114815056324005,
1.1229493618011475,
-1.627206802368164,
0.21698273718357086,
-0.5066118836402893,
1.9992536306381226,
0.22062179446220398,
1.2061243057250977,
-0.5326019525527954,
-2.2403202056884766,
0.6723302006721497,
-1.266638159751892,
-1.0859512090682983,
0.8119773268699646,
-0.9297357797622681,
0.18603572249412537,
-1.3402143716812134,
-0.2902253568172455,
-0.8601101636886597,
-1.0897269248962402,
0.6060749292373657,
0.10735853761434555,
0.3588859736919403,
-0.5260518789291382,
0.31110870838165283,
-2.216672658920288,
-1.3040443658828735,
-0.2633318305015564,
-1.0105011463165283,
0.4574465751647949,
-0.410473108291626,
0.6774814128875732,
-0.23564590513706207,
0.010457431897521019,
0.38610872626304626,
1.4576483964920044,
3.2715961933135986,
0.09956122934818268,
0.301991730928421,
-0.2109888195991516,
-0.9935383200645447,
1.4922302961349487,
0.9043306112289429,
-0.20193900167942047,
-0.5284638404846191,
-1.0837061405181885,
1.2685019969940186,
1.8522716760635376,
0.983715295791626,
0.04918799549341202,
-0.8792904019355774,
-0.7527298331260681,
-0.043947331607341766,
0.10306966304779053,
0.47714436054229736,
0.9129413962364197,
0.09210521727800369,
0.1336706280708313,
1.4545193910598755,
1.1627200841903687,
-0.38164496421813965,
0.3205074071884155,
-0.8464387655258179,
-0.5075517892837524,
0.5155040621757507,
0.308674156665802,
-0.03310214355587959,
0.281877338886261,
-0.9664566516876221,
-0.2371414303779602,
-0.3437305688858032,
-0.9023891687393188,
-0.7632758021354675,
-0.38439857959747314,
-0.33230406045913696,
1.6648180484771729,
0.1300407201051712,
-0.5238239765167236,
-0.055726103484630585,
-0.8309701681137085,
-0.13256144523620605,
-1.082911729812622,
0.3457486629486084,
-0.0790385827422142,
-0.11495871096849442,
-0.19391940534114838,
1.6855462789535522,
-0.9022364616394043,
-2.1333892345428467,
0.23754067718982697,
0.1775517463684082,
-0.26412245631217957,
0.13100287318229675,
1.6978129148483276,
0.5974505543708801,
1.4748735427856445,
1.3795123100280762,
0.9303262233734131,
-0.626076877117157,
-1.2897917032241821,
0.7599477171897888,
0.9455456733703613,
-1.4671447277069092,
0.8391163349151611,
-0.11522658914327621,
-0.5478386878967285,
0.6078248023986816,
1.2540514469146729,
0.5331074595451355,
-1.9481807947158813,
0.8532366752624512,
-1.0743372440338135,
0.7612594366073608,
0.7308582663536072,
0.7453436851501465,
0.1393406242132187,
0.8648879528045654,
-1.1737693548202515,
-1.1398522853851318,
-0.7236630916595459,
-0.713309109210968,
2.012040615081787,
-0.28980252146720886,
0.48732107877731323,
-0.2655614912509918,
-1.2891273498535156,
-0.05405634641647339,
0.6506226658821106,
0.2802134156227112,
-0.46643659472465515,
0.8019556999206543,
-0.694577157497406,
-1.1097264289855957,
-1.3364487886428833,
-0.4351939857006073,
-1.0631521940231323,
-0.9516217708587646,
1.0444905757904053,
0.7113284468650818,
0.3405146896839142,
1.8603373765945435,
0.6903589963912964,
0.3392787277698517,
-2.5745413303375244,
0.8835199475288391,
0.2557958960533142,
-0.05781141668558121,
0.8988186120986938,
0.30319908261299133,
1.07449471950531,
-0.09358476847410202,
0.5086930990219116,
-2.4155220985412598,
2.309831380844116,
-0.24061371386051178,
0.7141567468643188,
0.014552397653460503,
-0.07640489190816879,
1.131474494934082,
0.6281043291091919,
0.523414134979248,
-1.0769916772842407,
0.7043992280960083,
-0.5971868634223938,
1.2324737310409546,
0.7982116937637329,
-0.8513968586921692,
-0.021885257214307785,
1.3504549264907837,
0.42135658860206604,
-0.5246526598930359,
-1.0025928020477295,
-1.0134156942367554,
1.000321388244629,
1.7054829597473145,
-0.0335569903254509,
0.04334051162004471,
0.7343161106109619,
0.6713212132453918,
-1.2867084741592407,
0.04901813715696335,
-0.67430579662323,
-0.7371372580528259,
1.6502599716186523,
2.0547358989715576,
-0.14076437056064606,
-0.20691466331481934,
-0.6229692101478577,
-1.3633646965026855,
0.7885762453079224,
-0.059051357209682465,
0.16534149646759033,
0.7066991329193115,
-0.6061696410179138,
1.0549712181091309,
0.9125235676765442,
0.8662229776382446,
0.2379431277513504,
0.23078131675720215,
0.3748324513435364,
-0.2565402388572693,
-1.2323416471481323,
-0.2125733643770218,
-0.9856508374214172,
-2.565537691116333,
0.4157915413379669,
-0.25639206171035767,
-1.4179948568344116,
0.09521280229091644,
-0.9895752668380737,
0.8760542273521423,
-0.6216545104980469,
-1.1409293413162231,
-1.5211485624313354,
0.18349945545196533,
-0.058397673070430756,
1.0050358772277832,
-1.5482393503189087,
-0.18261702358722687,
1.1982637643814087,
0.867816686630249,
-0.6559525728225708,
0.9577773809432983,
0.23516248166561127,
1.0362322330474854,
0.838640570640564,
-0.3789461851119995,
0.5493937730789185,
0.0816434919834137,
-1.3323479890823364,
0.44297850131988525,
1.23307466506958,
0.17594316601753235,
1.5128017663955688,
-0.5291904807090759,
-0.06255100667476654,
0.39031052589416504,
-0.5516723990440369,
-0.450096070766449,
-0.5602800250053406,
0.667149543762207,
-0.0694044977426529,
-0.8754652738571167,
-0.04741450399160385,
-0.11719411611557007,
-0.2586039900779724,
0.23150622844696045,
-1.5204490423202515,
-0.13415884971618652,
-0.40416231751441956,
-0.6293094754219055,
-1.2250041961669922,
-0.09792473167181015,
1.4130277633666992,
-0.8415790796279907,
-0.17264120280742645,
0.4396706521511078,
0.28711792826652527,
0.5535748600959778,
0.6564173102378845,
-0.7486574053764343,
-0.2723916172981262,
-0.14849811792373657,
-0.33571726083755493,
0.2906655967235565,
1.3851763010025024,
-0.038782719522714615,
-0.947731614112854,
0.656768798828125,
-0.3475314676761627,
0.1332705020904541,
1.946388602256775,
0.12185245752334595,
-0.8178975582122803,
0.2909891903400421,
-0.7602747082710266,
1.9514741897583008,
1.7224045991897583,
1.3531020879745483,
-0.12688606977462769,
-0.9123553037643433,
0.5952283143997192,
-0.38634634017944336,
-0.33557161688804626,
0.8433634638786316,
0.4467078447341919,
-0.26705336570739746,
-1.3906415700912476,
0.8312788009643555,
1.2146635055541992,
-0.8781235218048096,
-0.8194313049316406,
0.15234944224357605,
-0.7522030472755432,
1.126238465309143,
0.6814170479774475,
0.3241252303123474,
0.2778457701206207,
1.71786630153656,
0.7778400778770447,
-0.45911937952041626,
0.45575621724128723,
0.5507116913795471,
-0.129198357462883,
-2.1114208698272705,
-1.1087679862976074,
0.35181424021720886,
-0.5345180034637451,
-1.5069165229797363,
1.3615120649337769,
-1.059998631477356,
-1.0055593252182007,
0.5396565198898315,
0.08687037974596024,
1.4546167850494385,
0.38200095295906067,
1.5785131454467773,
2.0378663539886475,
0.8854597806930542,
0.4099530577659607,
1.2578232288360596,
-0.12420430034399033,
-0.3520529866218567,
1.7640841007232666,
-0.43837592005729675,
0.47290393710136414,
1.1004068851470947,
-0.34461599588394165,
-1.1265803575515747,
-0.8062984943389893,
-1.2340717315673828,
-0.7939636707305908,
1.0964415073394775,
0.10493461787700653,
-1.094685673713684,
0.2557145655155182,
1.546735405921936,
0.16623683273792267,
-0.2534290850162506,
0.6431328654289246,
0.3723268210887909,
-0.7573228478431702,
-0.0379166305065155,
-0.8851772546768188,
0.5373284816741943,
-0.22915315628051758,
-0.46386945247650146,
0.30105340480804443,
0.5070804953575134,
1.3783419132232666,
-0.00756369112059474,
0.07435756921768188,
1.1933504343032837,
-1.38986337184906,
1.418781042098999,
-0.7348827719688416,
0.2718644142150879,
-2.3313169479370117,
1.417336106300354,
-0.7966417670249939,
1.9579287767410278,
-2.76560115814209,
0.5276625156402588,
-0.5667552947998047,
-0.5087578296661377,
0.26753759384155273,
-0.3559775650501251,
0.1182524710893631,
-0.08742187917232513,
-1.1697667837142944,
-0.08547525852918625,
-0.6436024308204651,
0.6488094329833984,
1.1224316358566284,
1.3656020164489746,
-1.1791036128997803,
-0.3048124611377716,
-1.7325257062911987,
-0.14731629192829132,
-0.7285364866256714,
0.2844303250312805,
-1.925489902496338,
-0.1801113784313202,
-1.9270166158676147,
-2.3837430477142334,
-1.2422761917114258,
-0.8113393783569336,
1.1797535419464111,
0.12925852835178375,
-0.8630570769309998,
1.2531734704971313,
-0.4439081847667694,
-1.8146110773086548,
1.0832955837249756,
-2.2140438556671143
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | Thanks for opening this discussion, @alexis-michaud.
As the language validation procedure is shared with other Hugging Face projects, I'm tagging them as well.
CC: @huggingface/moon-landing | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 25 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
Thanks for opening this discussion, @alexis-michaud.
As the language validation procedure is shared with other Hugging Face projects, I'm tagging them as well.
CC: @huggingface/moon-landing | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | on the Hub side, there is not fine grained validation we just check that `language:` contains an array of lowercase strings between 2 and 3 characters long =)
and for `language_bcp47:` we just check it's an array of strings.
The only page where we have a hardcoded list of languages is https://huggingface.co/languages and I've been thinking of hooking that page on an external database of languages (so any suggestion is super interesting), but it's not used for validation.
That being said, in `datasets` this file https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json is not really used no? Or just in the tagging tool? What about just removing it?
also cc'ing @lbourdois who's been active and helpful on those subjects in the past! | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 116 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
on the Hub side, there is not fine grained validation we just check that `language:` contains an array of lowercase strings between 2 and 3 characters long =)
and for `language_bcp47:` we just check it's an array of strings.
The only page where we have a hardcoded list of languages is https://huggingface.co/languages and I've been thinking of hooking that page on an external database of languages (so any suggestion is super interesting), but it's not used for validation.
That being said, in `datasets` this file https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json is not really used no? Or just in the tagging tool? What about just removing it?
also cc'ing @lbourdois who's been active and helpful on those subjects in the past! | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | PS @alexis-michaud is there a DB of language codes you would recommend? That would contain all `ISO 639-1, 639-2 or 639-3 codes` and be kept up to date, and ideally that would be accessible as a Node.js npm package?
cc @albertvillanova too | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 42 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
PS @alexis-michaud is there a DB of language codes you would recommend? That would contain all `ISO 639-1, 639-2 or 639-3 codes` and be kept up to date, and ideally that would be accessible as a Node.js npm package?
cc @albertvillanova too | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > PS @alexis-michaud is there a DB of language codes you would recommend? That would contain all `ISO 639-1, 639-2 or 639-3 codes` and be kept up to date, and ideally that would be accessible as a Node.js npm package?
>
> cc @albertvillanova too
Many thanks for your answer!
The Glottolog database is kept up to date, and has information on the closest ISO code for each Glottocode. So providing a clean table with equivalences sounds (to me) like something perfectly reasonable to expect from their team.
To what extent would [pyglottolog](https://github.com/glottolog/pyglottolog) fit the bill / do the job? (API documentation [here](https://pyglottolog.readthedocs.io/en/latest/index.html)) I'm reaching my technical limitations here: I can't assess the distance between what they offer and what the HF team needs.
I have opened an Issue in [their repo](https://github.com/glottolog/glottolog-cldf/issues/13).
Very interested to see where it goes from there. | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 141 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> PS @alexis-michaud is there a DB of language codes you would recommend? That would contain all `ISO 639-1, 639-2 or 639-3 codes` and be kept up to date, and ideally that would be accessible as a Node.js npm package?
>
> cc @albertvillanova too
Many thanks for your answer!
The Glottolog database is kept up to date, and has information on the closest ISO code for each Glottocode. So providing a clean table with equivalences sounds (to me) like something perfectly reasonable to expect from their team.
To what extent would [pyglottolog](https://github.com/glottolog/pyglottolog) fit the bill / do the job? (API documentation [here](https://pyglottolog.readthedocs.io/en/latest/index.html)) I'm reaching my technical limitations here: I can't assess the distance between what they offer and what the HF team needs.
I have opened an Issue in [their repo](https://github.com/glottolog/glottolog-cldf/issues/13).
Very interested to see where it goes from there. | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | I just tried pyglottolog to generate a file with all the current IDs (first column).
`glottolog languoids` inside the `glottolog` repository.
[glottolog-languoids-v4.6-10-g5c66eec874.csv](https://github.com/huggingface/datasets/files/9417456/glottolog-languoids-v4.6-10-g5c66eec874.csv)
| **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 22 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
I just tried pyglottolog to generate a file with all the current IDs (first column).
`glottolog languoids` inside the `glottolog` repository.
[glottolog-languoids-v4.6-10-g5c66eec874.csv](https://github.com/huggingface/datasets/files/9417456/glottolog-languoids-v4.6-10-g5c66eec874.csv)
| [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | Greetings @alexis-michaud and others,
I think perhaps a standards-based approach here would help everyone out both at the technical and social layers of technical innovations.
Let me say a few things:
1. there are multiple kinds of assets in AI that should have associated language codes.
* AI Training Data sets
* AI models
* AI outputs
These are all distinct components which should be tagged for the language and encoding methods they operate on or enhance. For example, an AI based cross-language tool from French to English (UK variety) still needs to consider if it is operating on oral language speech or written text. This is where [IANA language sub-tags](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) come in and are so important. I link to the official source. If one wants to use middleware such as a python package or npm package to manage strings then please make sure those packages are updating codes as they are being revised. I see that @julien-c mentioned BCP-47. BCP-47 is the current standard for language tagging. Following it will make the resources you create more findable and let future users better understand or expect any biases which may have been introduced in the different AI based products.
2. BCP-47 is a technical read. However, you will notice that it identifies when to use an ISO 639-1, ISO 639-2, or ISO 639-3. code. This is important for interoperability with many systems. If you are using library systems then you should likely just stick with ISO 639-3 codes.
3. If you are going to use Glottolog codes use them after an `-x-` tag in the BCP-47 format to maintain BCP-47 validity.
4. You should source ISO 639-3 codes directly from the [ISO 639-3 registrar](https://iso639-3.sil.org/code_tables/639/data) as these codes are updated annually, usually in February or March. ISO 639-3 codes have multiple classes: `Active`, `Deprecated`, and `Unassigned`. This means that string length checking is not a sufficient strategy for validation.
5. The names of smaller languages often change depending on the language used to describe them. The [ISO639-2 documentation](https://www.loc.gov/standards/iso639-2/php/code_list.php) has a list of language names for languages with smaller populations for languages in which descriptions about these languages are often written. For example, ISO 639-2's documentation contains the names of languages as they are used in French, German, and English. ISO 639-2 rarely is updated as it is now tied to ISO 639-3's evolution and modern systems should just use ISO 639-3, but these additional names of languages in other languages may not appear in the ISO 369-3 tables.
6. Glottolog codes are also updated at least annually. Usually sometime after ISO 639-3 updates.
7. Please, if the material is in a written mode, please indicate which script is used unless the IANA field has a `suppress script` value. Please use the script tag that BCP-47 calls for from [ISO 15924](https://unicode.org/iso15924/iso15924-codes.html). This also updates at least annually.
8. Another great place to look for language names is the [Unicode CLDR database for locales](https://cldr.unicode.org/translation/displaynames/languagelocale-names). These ought to be congruent with ISO 639-3 but, sometimes CLDR has additional references to languages (such as the french name for a language) which is not contained in ISO 639-2 or ISO 639-3.
9. Wikidata for language names is not always a great source of authoritative information. Language names are asymmetrical. Many times they are contrived because there is no actual name for the language in the language referring... e.g. French doesn't have a name for every language in the world, often they say something like: the language of 'x' people. — English does the same. When a language name standard does not have the best name for a language the best way to handle that is to make a change request with the standards registrar. Keeping track of the source list and the version of your source list for your language codes is very important.
10. Finally, It would be a great service to technologist, minority language communities, and linguists if for all resources of the three types mentioned in number 1 above you added a record to [OLAC](http://www.language-archives.org/). — I can help you with that. OLAC is a search interface for language resources.
| **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 687 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
Greetings @alexis-michaud and others,
I think perhaps a standards-based approach here would help everyone out both at the technical and social layers of technical innovations.
Let me say a few things:
1. there are multiple kinds of assets in AI that should have associated language codes.
* AI Training Data sets
* AI models
* AI outputs
These are all distinct components which should be tagged for the language and encoding methods they operate on or enhance. For example, an AI based cross-language tool from French to English (UK variety) still needs to consider if it is operating on oral language speech or written text. This is where [IANA language sub-tags](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) come in and are so important. I link to the official source. If one wants to use middleware such as a python package or npm package to manage strings then please make sure those packages are updating codes as they are being revised. I see that @julien-c mentioned BCP-47. BCP-47 is the current standard for language tagging. Following it will make the resources you create more findable and let future users better understand or expect any biases which may have been introduced in the different AI based products.
2. BCP-47 is a technical read. However, you will notice that it identifies when to use an ISO 639-1, ISO 639-2, or ISO 639-3. code. This is important for interoperability with many systems. If you are using library systems then you should likely just stick with ISO 639-3 codes.
3. If you are going to use Glottolog codes use them after an `-x-` tag in the BCP-47 format to maintain BCP-47 validity.
4. You should source ISO 639-3 codes directly from the [ISO 639-3 registrar](https://iso639-3.sil.org/code_tables/639/data) as these codes are updated annually, usually in February or March. ISO 639-3 codes have multiple classes: `Active`, `Deprecated`, and `Unassigned`. This means that string length checking is not a sufficient strategy for validation.
5. The names of smaller languages often change depending on the language used to describe them. The [ISO639-2 documentation](https://www.loc.gov/standards/iso639-2/php/code_list.php) has a list of language names for languages with smaller populations for languages in which descriptions about these languages are often written. For example, ISO 639-2's documentation contains the names of languages as they are used in French, German, and English. ISO 639-2 rarely is updated as it is now tied to ISO 639-3's evolution and modern systems should just use ISO 639-3, but these additional names of languages in other languages may not appear in the ISO 369-3 tables.
6. Glottolog codes are also updated at least annually. Usually sometime after ISO 639-3 updates.
7. Please, if the material is in a written mode, please indicate which script is used unless the IANA field has a `suppress script` value. Please use the script tag that BCP-47 calls for from [ISO 15924](https://unicode.org/iso15924/iso15924-codes.html). This also updates at least annually.
8. Another great place to look for language names is the [Unicode CLDR database for locales](https://cldr.unicode.org/translation/displaynames/languagelocale-names). These ought to be congruent with ISO 639-3 but, sometimes CLDR has additional references to languages (such as the french name for a language) which is not contained in ISO 639-2 or ISO 639-3.
9. Wikidata for language names is not always a great source of authoritative information. Language names are asymmetrical. Many times they are contrived because there is no actual name for the language in the language referring... e.g. French doesn't have a name for every language in the world, often they say something like: the language of 'x' people. — English does the same. When a language name standard does not have the best name for a language the best way to handle that is to make a change request with the standards registrar. Keeping track of the source list and the version of your source list for your language codes is very important.
10. Finally, It would be a great service to technologist, minority language communities, and linguists if for all resources of the three types mentioned in number 1 above you added a record to [OLAC](http://www.language-archives.org/). — I can help you with that. OLAC is a search interface for language resources.
| [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | Hi everybody!
About the point:
> also cc'ing @lbourdois who's been active and helpful on those subjects in the past!
Discussions on the need to improve the Hub's tagging system (applying to both datasets and models) can be found in the following discussion: https://github.com/huggingface/hub-docs/issues/193
Once this system has been redone and satisfies the identified needs, a redesign of the [Languages page](https://huggingface.co/languages) would also be relevant: https://github.com/huggingface/hub-docs/issues/194.
I invite you to read them. But as a quick summary, the exchanges were oriented towards the ISO standard (the first HF system was based on it and it is generally the standard indicated in AI/DL papers) by favouring ISO 639-1 if it exists, and fallback to ISO 639-2 or ISO 639-3 if it doesn't. In addition, it is possible to add BCP-47 tags to consider existing varieties/regionalisms within a language (https://huggingface.co/datasets/AmazonScience/massive/discussions/1). If a language does not belong to either of these two standards, then a request should be made to the HF team to add it manually.
To return to the present discussion, thank you for the various databases and methodologies you mention. It makes a big difference to have linguists in the loop 🚀.
I have a couple of questions where I think an expert perspective would be appreciated:
- Do you think it's possible to easily handle tags that have been deprecated potentially for decades?
For example (I'm taking the case of Hebrew but this has happened for other languages) I tagged Google models with the "iw" [tag](https://huggingface.co/models?language=iw&sort=downloads) because I based it on what the authors gave in their [paper](https://arxiv.org/pdf/2010.11934.pdf) see table 6 page 12). It turns out that this ISO tag has in fact been deprecated since 1989 in favour of the "he" tag. It would therefore be necessary to have a verification that transforms the old tags into the most recent ones.
- When you look up a language on Wikipedia, it usually shows, in addition to the ISO standard, the codes in the Glottolog (which you have already mentioned), [ELP](https://www.endangeredlanguages.com/?hl=en) and [Linguasphere](http://www.linguasphere.info/jr/index.php?l1=home&l2=welcome) databases. Would you have any opinion about these two other databases?
- On the Hub, there is the following dataset where French people speak in English: https://huggingface.co/datasets/Datatang/French_Speaking_English_Speech_Data_by_Mobile_Phone
Is there a database to take this case into account? I have not found any code in the Glottolog database. If based on an IETF BCP-47 standard, I would tend to tag the dataset with "en-fr" but would this be something accepted by linguists?
Based on the first post in this thread that there are about 8000 languages, if one considers that a given language can be pronounced by a speaker of the other 7999, that would theoretically make about 64 million BCP-47 language1-language2 codes existing. And even much more if we consider regionalists with language1_regionalism_x-language2_regionalism_y. I guess there is no such database.
- Are there any databases that take into account all the existing sign languages in the world?
It would be nice to have them included on the Hub.
- Is there an international classification of languages?
A bit like the [International Classification of Diseases](https://en.wikipedia.org/wiki/International_Classification_of_Diseases) in medicine, which is established by the WHO and used as a reference throughout the world. The idea would be to have a precise number of languages to which we would then have to assign a unique tag in order to find them later.
- Finally for the CNRS team, when can we expect to see all the datasets of [Pangloss](https://pangloss.cnrs.fr/) on HF? 👀 And I don't know if you have a way to help to add also the datasets of [CoCoON](https://cocoon.huma-num.fr/exist/crdo/). | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 590 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
Hi everybody!
About the point:
> also cc'ing @lbourdois who's been active and helpful on those subjects in the past!
Discussions on the need to improve the Hub's tagging system (applying to both datasets and models) can be found in the following discussion: https://github.com/huggingface/hub-docs/issues/193
Once this system has been redone and satisfies the identified needs, a redesign of the [Languages page](https://huggingface.co/languages) would also be relevant: https://github.com/huggingface/hub-docs/issues/194.
I invite you to read them. But as a quick summary, the exchanges were oriented towards the ISO standard (the first HF system was based on it and it is generally the standard indicated in AI/DL papers) by favouring ISO 639-1 if it exists, and fallback to ISO 639-2 or ISO 639-3 if it doesn't. In addition, it is possible to add BCP-47 tags to consider existing varieties/regionalisms within a language (https://huggingface.co/datasets/AmazonScience/massive/discussions/1). If a language does not belong to either of these two standards, then a request should be made to the HF team to add it manually.
To return to the present discussion, thank you for the various databases and methodologies you mention. It makes a big difference to have linguists in the loop 🚀.
I have a couple of questions where I think an expert perspective would be appreciated:
- Do you think it's possible to easily handle tags that have been deprecated potentially for decades?
For example (I'm taking the case of Hebrew but this has happened for other languages) I tagged Google models with the "iw" [tag](https://huggingface.co/models?language=iw&sort=downloads) because I based it on what the authors gave in their [paper](https://arxiv.org/pdf/2010.11934.pdf) see table 6 page 12). It turns out that this ISO tag has in fact been deprecated since 1989 in favour of the "he" tag. It would therefore be necessary to have a verification that transforms the old tags into the most recent ones.
- When you look up a language on Wikipedia, it usually shows, in addition to the ISO standard, the codes in the Glottolog (which you have already mentioned), [ELP](https://www.endangeredlanguages.com/?hl=en) and [Linguasphere](http://www.linguasphere.info/jr/index.php?l1=home&l2=welcome) databases. Would you have any opinion about these two other databases?
- On the Hub, there is the following dataset where French people speak in English: https://huggingface.co/datasets/Datatang/French_Speaking_English_Speech_Data_by_Mobile_Phone
Is there a database to take this case into account? I have not found any code in the Glottolog database. If based on an IETF BCP-47 standard, I would tend to tag the dataset with "en-fr" but would this be something accepted by linguists?
Based on the first post in this thread that there are about 8000 languages, if one considers that a given language can be pronounced by a speaker of the other 7999, that would theoretically make about 64 million BCP-47 language1-language2 codes existing. And even much more if we consider regionalists with language1_regionalism_x-language2_regionalism_y. I guess there is no such database.
- Are there any databases that take into account all the existing sign languages in the world?
It would be nice to have them included on the Hub.
- Is there an international classification of languages?
A bit like the [International Classification of Diseases](https://en.wikipedia.org/wiki/International_Classification_of_Diseases) in medicine, which is established by the WHO and used as a reference throughout the world. The idea would be to have a precise number of languages to which we would then have to assign a unique tag in order to find them later.
- Finally for the CNRS team, when can we expect to see all the datasets of [Pangloss](https://pangloss.cnrs.fr/) on HF? 👀 And I don't know if you have a way to help to add also the datasets of [CoCoON](https://cocoon.huma-num.fr/exist/crdo/). | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > I invite you to read them. But as a quick summary, the exchanges were oriented towards the ISO standard (the first HF system was based on it and it is generally the standard indicated in AI/DL papers) by favouring ISO 639-1 if it exists, and fallback to ISO 639-2 or ISO 639-3 if it doesn't. In addition, it is possible to add BCP-47 tags to consider existing varieties/regionalisms within a language (https://huggingface.co/datasets/AmazonScience/massive/discussions/1). If a language does not belong to either of these two standards, then a request should be made to the HF team to add it manually.
One comment on this fall back system (which generally follows the BCP-47 process). ISO 639-2 has some codes which refer to a language ambiguously. For example, I believe code `ara` is used for arabic. In some contexts arabic is considered a single language, however, Egyptian Arabic is quite different from Moroccan Arabic, which are both considered separate languages. These ambiguous codes are valid ISO 639-3 codes but they have a special status. They are called `macro codes`. They exist inside the ISO 639-3 standard to provide absolute fallback compatibility between ISO 639-2 and ISO 639-3. However, when considering AI and MT applications with language data, the unforeseen potential applications and the potential for bias using macro codes should be avoided for new applications of language tags to resources. For historical cases where it is not clear what resources were used to create the AI tools or datasets then I understand the use of ambiguous tag uses. So for clarity in language tagging I suggest:
1. Strictly following BCP-47
2. Whenever possible avoid the use of macro tags in the ISO 639-3 standard. These are BCP-47 valid, but could introduce biases in the application of their use in society. (Generally there are more specific tags available to use in the ISO 639-3 standard.) | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 311 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> I invite you to read them. But as a quick summary, the exchanges were oriented towards the ISO standard (the first HF system was based on it and it is generally the standard indicated in AI/DL papers) by favouring ISO 639-1 if it exists, and fallback to ISO 639-2 or ISO 639-3 if it doesn't. In addition, it is possible to add BCP-47 tags to consider existing varieties/regionalisms within a language (https://huggingface.co/datasets/AmazonScience/massive/discussions/1). If a language does not belong to either of these two standards, then a request should be made to the HF team to add it manually.
One comment on this fall back system (which generally follows the BCP-47 process). ISO 639-2 has some codes which refer to a language ambiguously. For example, I believe code `ara` is used for arabic. In some contexts arabic is considered a single language, however, Egyptian Arabic is quite different from Moroccan Arabic, which are both considered separate languages. These ambiguous codes are valid ISO 639-3 codes but they have a special status. They are called `macro codes`. They exist inside the ISO 639-3 standard to provide absolute fallback compatibility between ISO 639-2 and ISO 639-3. However, when considering AI and MT applications with language data, the unforeseen potential applications and the potential for bias using macro codes should be avoided for new applications of language tags to resources. For historical cases where it is not clear what resources were used to create the AI tools or datasets then I understand the use of ambiguous tag uses. So for clarity in language tagging I suggest:
1. Strictly following BCP-47
2. Whenever possible avoid the use of macro tags in the ISO 639-3 standard. These are BCP-47 valid, but could introduce biases in the application of their use in society. (Generally there are more specific tags available to use in the ISO 639-3 standard.) | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > * Are there any databases that take into account all the existing sign languages in the world?
> It would be nice to have them included on the Hub.
Sign Languages present an interesting case. As I understand the situation. The identification of sign languages has been identified as a component of their endangerment. Some sign languages do exist in ISO 639-3. For further discussion on the issue I refer readers to the following publications:
* https://doi.org/10.3390/languages7010049
* https://www.academia.edu/35870983/The_ethics_of_of_language_identification_and_ISO_639
One way to be BCP-47 compliant and identify a sign language which is not identified in any of the BCP-47 referenced standards is to use the ISO 639-3 code for undetermined language `und` and then apply a custom suffix indicator (as explained in BCP-47) `-x-` and a custom code, such as the ones used in https://doi.org/10.3390/languages7010049 | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 136 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> * Are there any databases that take into account all the existing sign languages in the world?
> It would be nice to have them included on the Hub.
Sign Languages present an interesting case. As I understand the situation. The identification of sign languages has been identified as a component of their endangerment. Some sign languages do exist in ISO 639-3. For further discussion on the issue I refer readers to the following publications:
* https://doi.org/10.3390/languages7010049
* https://www.academia.edu/35870983/The_ethics_of_of_language_identification_and_ISO_639
One way to be BCP-47 compliant and identify a sign language which is not identified in any of the BCP-47 referenced standards is to use the ISO 639-3 code for undetermined language `und` and then apply a custom suffix indicator (as explained in BCP-47) `-x-` and a custom code, such as the ones used in https://doi.org/10.3390/languages7010049 | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > * Is there an international classification of languages?
> A bit like the [International Classification of Diseases](https://en.wikipedia.org/wiki/International_Classification_of_Diseases) in medicine, which is established by the WHO and used as a reference throughout the world. The idea would be to have a precise number of languages to which we would then have to assign a unique tag in order to find them later.
Yes that would be the function of ISO 639-3. It is the reference standard for languages. It includes a code and its name and the status of the code. Many technical metadata standards for file and computer interoperability reference it, many technical library metadata standards reference it. Some linguists use it. Many governments reference it.
Indexing diseases are different from indexing languages in several ways, one way is that diseases are the impact of a pathogen not the pathogen itself. If we take COVID-19 as an example, there are many varieties of the pathogen but broadly speaking there is only one disease — with many symptoms.
| **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 168 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> * Is there an international classification of languages?
> A bit like the [International Classification of Diseases](https://en.wikipedia.org/wiki/International_Classification_of_Diseases) in medicine, which is established by the WHO and used as a reference throughout the world. The idea would be to have a precise number of languages to which we would then have to assign a unique tag in order to find them later.
Yes that would be the function of ISO 639-3. It is the reference standard for languages. It includes a code and its name and the status of the code. Many technical metadata standards for file and computer interoperability reference it, many technical library metadata standards reference it. Some linguists use it. Many governments reference it.
Indexing diseases are different from indexing languages in several ways, one way is that diseases are the impact of a pathogen not the pathogen itself. If we take COVID-19 as an example, there are many varieties of the pathogen but broadly speaking there is only one disease — with many symptoms.
| [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | >* When you look up a language on Wikipedia, it usually shows, in addition to the ISO standard, the codes in the Glottolog (which you have already mentioned), [ELP](https://www.endangeredlanguages.com/?hl=en) and [Linguasphere](http://www.linguasphere.info/jr/index.php?l1=home&l2=welcome) databases. Would you have any opinion about these two other databases?
While these do appear on wikipedia, I don't know of any information system which uses these codes. I do know that glottolog did import ELP data at one time and its database does contain ELP data I'm not sure if Glottolog regularly ingests new versions of ELP data. I suspect that the use of Linguasphere data may be relevant to users of wikidata as a linked data attribute but I haven't heard of any linked data projects using Linguasphere data for analysis or product development. My impression is that it is fairly unused. | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 135 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
>* When you look up a language on Wikipedia, it usually shows, in addition to the ISO standard, the codes in the Glottolog (which you have already mentioned), [ELP](https://www.endangeredlanguages.com/?hl=en) and [Linguasphere](http://www.linguasphere.info/jr/index.php?l1=home&l2=welcome) databases. Would you have any opinion about these two other databases?
While these do appear on wikipedia, I don't know of any information system which uses these codes. I do know that glottolog did import ELP data at one time and its database does contain ELP data I'm not sure if Glottolog regularly ingests new versions of ELP data. I suspect that the use of Linguasphere data may be relevant to users of wikidata as a linked data attribute but I haven't heard of any linked data projects using Linguasphere data for analysis or product development. My impression is that it is fairly unused. | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > * Do you think it's possible to easily handle tags that have been deprecated potentially for decades?
>For example (I'm taking the case of Hebrew but this has happened for other languages) I [tag](https://huggingface.co/models?language=iw&sort=downloads)ged Google models with the "iw" tag because I based it on what the authors gave in their [paper](https://arxiv.org/pdf/2010.11934.pdf) see table 6 page 12). It turns out that this ISO tag has in fact been deprecated since 1989 in favour of the "he" tag. It would therefore be necessary to have a verification that transforms the old tags into the most recent ones.
Yes. You can parse the IANA file linked to above (it is regularly updated). All deprecated tags are marked as such in that file. The new prefered tag if there is one, is indicated. ISO 639-3 also indicates a code's status but their list is relevant only codes within their domain (ISO 639-3). | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 150 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> * Do you think it's possible to easily handle tags that have been deprecated potentially for decades?
>For example (I'm taking the case of Hebrew but this has happened for other languages) I [tag](https://huggingface.co/models?language=iw&sort=downloads)ged Google models with the "iw" tag because I based it on what the authors gave in their [paper](https://arxiv.org/pdf/2010.11934.pdf) see table 6 page 12). It turns out that this ISO tag has in fact been deprecated since 1989 in favour of the "he" tag. It would therefore be necessary to have a verification that transforms the old tags into the most recent ones.
Yes. You can parse the IANA file linked to above (it is regularly updated). All deprecated tags are marked as such in that file. The new prefered tag if there is one, is indicated. ISO 639-3 also indicates a code's status but their list is relevant only codes within their domain (ISO 639-3). | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > * On the Hub, there is the following dataset where French people speak in English: https://huggingface.co/datasets/Datatang/French_Speaking_English_Speech_Data_by_Mobile_Phone
Is there a database to take this case into account? I have not found any code in the Glottolog database. If based on an IETF BCP-47 standard, I would tend to tag the dataset with "en-fr" but would this be something accepted by linguists?
I would interpret `en-fr` as english as spoken in France. `fr`in this position refers to the geo-political entity not a second language. I see no reason that other linguists should have a different option after having read BCP-47 and understood how it works.
The functional goal here is to tag a language resource as being produced by nonnative speakers, while tagging both languages. There are several problems here. The first is that BCP-47 has no way explicit way to do this. One could use the sub code `x-` with a private use code to indicate a second language and infer some meaning as to that language's role. However, there is another problem here which complexifies the situation greatly... how do we know that those english speakers (in France, or from France, or who were native French speakers) were not speaking their third or fourth language rather than their second language. So to conceptualize a sub-tag which indicates the first language of a speech act for speakers in a second (or other) language would need to be carefully crafted. It might then be proposed to the appropriate authorities. For example three sub-tags exist.
There are three registered sub-tags out of a BCP-47 allowed 35. These are `x-`, `u-`, and `t-`. `u-` and `t-` are defined in [RFC6067 ](https://www.rfc-editor.org/rfc/rfc6067)and [RFC6497](https://www.rfc-editor.org/rfc/rfc6497) . For more information see the [Unicode CLDR documentation](https://cldr.unicode.org/index/bcp47-extension) where it says:
>[IETF BCP 47 ](http://www.google.com/url?q=http%3A%2F%2Ftools.ietf.org%2Fhtml%2Fbcp47&sa=D&sntz=1&usg=AOvVaw1DoMN1IBGg-JHgECBvdW1t)[Tags for Identifying Languages](http://www.google.com/url?q=http%3A%2F%2Ftools.ietf.org%2Fhtml%2Fbcp47&sa=D&sntz=1&usg=AOvVaw1DoMN1IBGg-JHgECBvdW1t) defines the language identifiers (tags) used on the Internet and in many standards. It has an extension mechanism that allows additional information to be included. The Unicode Consortium is the maintainer of the extension ‘u’ for Locale Extensions, as described in [rfc6067](https://www.google.com/url?q=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc6067&sa=D&sntz=1&usg=AOvVaw0gGWi0EjHfy1WId8k8oKAi), and the extension 't' for Transformed Content, as described in [rfc6497](https://www.google.com/url?q=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc6497&sa=D&sntz=1&usg=AOvVaw0w-OUsFX1PtaKYIq31P64I).
>
>The subtags available for use in the 'u' extension provide language tag extensions that provide for additional information needed for identifying locales. The 'u' subtags consist of a set of keys and associated values (types). For example, a locale identifier for British English with numeric collation has the following form: en-GB-u-kn-true
>
>The subtags available for use in the 't' extension provide language tag extensions that provide for additional information needed for identifying transformed content, or a request to transform content in a certain way. For example, the language tag "ja-Kana-t-it" can be used as a content tag indicates Japanese Katakana transformed from Italian. It can also be used as a request for a given transformation.
>
>For more details on the valid subtags for these extensions, their syntax, and their meanings, see LDML Section 3.7 [Unicode BCP 47 Extension Data](http://www.google.com/url?q=http%3A%2F%2Fwww.unicode.org%2Freports%2Ftr35%2F%23Locale_Extension_Key_and_Type_Data&sa=D&sntz=1&usg=AOvVaw0lMthb9KbTJtoOd5mvv3Ha). | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 493 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> * On the Hub, there is the following dataset where French people speak in English: https://huggingface.co/datasets/Datatang/French_Speaking_English_Speech_Data_by_Mobile_Phone
Is there a database to take this case into account? I have not found any code in the Glottolog database. If based on an IETF BCP-47 standard, I would tend to tag the dataset with "en-fr" but would this be something accepted by linguists?
I would interpret `en-fr` as english as spoken in France. `fr`in this position refers to the geo-political entity not a second language. I see no reason that other linguists should have a different option after having read BCP-47 and understood how it works.
The functional goal here is to tag a language resource as being produced by nonnative speakers, while tagging both languages. There are several problems here. The first is that BCP-47 has no way explicit way to do this. One could use the sub code `x-` with a private use code to indicate a second language and infer some meaning as to that language's role. However, there is another problem here which complexifies the situation greatly... how do we know that those english speakers (in France, or from France, or who were native French speakers) were not speaking their third or fourth language rather than their second language. So to conceptualize a sub-tag which indicates the first language of a speech act for speakers in a second (or other) language would need to be carefully crafted. It might then be proposed to the appropriate authorities. For example three sub-tags exist.
There are three registered sub-tags out of a BCP-47 allowed 35. These are `x-`, `u-`, and `t-`. `u-` and `t-` are defined in [RFC6067 ](https://www.rfc-editor.org/rfc/rfc6067)and [RFC6497](https://www.rfc-editor.org/rfc/rfc6497) . For more information see the [Unicode CLDR documentation](https://cldr.unicode.org/index/bcp47-extension) where it says:
>[IETF BCP 47 ](http://www.google.com/url?q=http%3A%2F%2Ftools.ietf.org%2Fhtml%2Fbcp47&sa=D&sntz=1&usg=AOvVaw1DoMN1IBGg-JHgECBvdW1t)[Tags for Identifying Languages](http://www.google.com/url?q=http%3A%2F%2Ftools.ietf.org%2Fhtml%2Fbcp47&sa=D&sntz=1&usg=AOvVaw1DoMN1IBGg-JHgECBvdW1t) defines the language identifiers (tags) used on the Internet and in many standards. It has an extension mechanism that allows additional information to be included. The Unicode Consortium is the maintainer of the extension ‘u’ for Locale Extensions, as described in [rfc6067](https://www.google.com/url?q=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc6067&sa=D&sntz=1&usg=AOvVaw0gGWi0EjHfy1WId8k8oKAi), and the extension 't' for Transformed Content, as described in [rfc6497](https://www.google.com/url?q=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc6497&sa=D&sntz=1&usg=AOvVaw0w-OUsFX1PtaKYIq31P64I).
>
>The subtags available for use in the 'u' extension provide language tag extensions that provide for additional information needed for identifying locales. The 'u' subtags consist of a set of keys and associated values (types). For example, a locale identifier for British English with numeric collation has the following form: en-GB-u-kn-true
>
>The subtags available for use in the 't' extension provide language tag extensions that provide for additional information needed for identifying transformed content, or a request to transform content in a certain way. For example, the language tag "ja-Kana-t-it" can be used as a content tag indicates Japanese Katakana transformed from Italian. It can also be used as a request for a given transformation.
>
>For more details on the valid subtags for these extensions, their syntax, and their meanings, see LDML Section 3.7 [Unicode BCP 47 Extension Data](http://www.google.com/url?q=http%3A%2F%2Fwww.unicode.org%2Freports%2Ftr35%2F%23Locale_Extension_Key_and_Type_Data&sa=D&sntz=1&usg=AOvVaw0lMthb9KbTJtoOd5mvv3Ha). | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | Hi @lbourdois ! Many thanks for the detailed information.
> Discussions on the need to improve the Hub's tagging system (applying to both datasets and models) can be found in the following discussion: [huggingface/hub-docs#193](https://github.com/huggingface/hub-docs/issues/193)
Fascinating topic! To me, the following suggestion has a lot of appeal:
"if consider that it was necessary to create an ISO 639-3 because ISO 639-1 was deficient, it would be to do the reverse and thus convert the tags from ISO 639-1 to ISO 639-2 or 3 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes or https://iso639-3.sil.org/code_tables/639/data)."
Yes, ISO 639-1 is unsuitable because it has so few codes: less than 200. To address linguistic diversity in 'unrestricted mode', a list of all languages is wanted.
The idea of letting people use their favourite nomenclature and automatically adding the ISO 639-3 three-letter code as a tag is appealing. Thus all the HF datasets would have three-letter language tags (handy for basic search), alongside the authors' preferred tags and language names (including Glottolog tags as well as ISO 639-{1, 2}, and all other options allowed by BCP-47).
Retaining the authors' original tags and language names would be best.
* For language names: some people favour one name over another and it is important to respect their choice. In the case of Yongning Na: alternative names include 'Mosuo', 'Narua', 'Eastern Naxi'... and the names carry implications: people have been reported to come to blows about the use of the term 'Mosuo'.
* For language tags: Glottocodes can be more fine-grained than Ethnologue (ISO 639-3), and some colleagues feel strongly about those.
Thus there would be a BCP-47 tag (sounds like a solid technical choice, though not 'passer-by-friendly': requiring some expertise to interpret) **plus** an ISO 639-3 tag that could be grabbed easily, and (last but not least) language names spelled out in full. Searches would be easier. No information would be lost.
Are industry practices so conservative that many people are happy with two-letter codes, and consider ISO 639-3 three-letter codes an unnecessary complication? That would be a pity, since there are so many advantages to using longer lists. (Somewhat like the transition to Unicode: sooo much better!) But maybe that conservative attitude _is_ widespread, and it would then need to be taken into account. In which case, one could consider offering two-letter codes as a search option. Internally, the search engine would look up the corresponding 3-letter codes, and produce the search results accordingly.
Now to the other questions:
> * Do you think it's possible to easily handle tags that have been deprecated potentially for decades?
> For example (I'm taking the case of Hebrew but this has happened for other languages) I tagged Google models with the "iw" [tag](https://huggingface.co/models?language=iw&sort=downloads) because I based it on what the authors gave in their [paper](https://arxiv.org/pdf/2010.11934.pdf) see table 6 page 12). It turns out that this ISO tag has in fact been deprecated since 1989 in favour of the "he" tag. It would therefore be necessary to have a verification that transforms the old tags into the most recent ones.
I guess that the above suggestion takes care of this case. The original tag (in this example, "iw") is retained (facilitating cross-reference with the published paper, and respecting the real: the way the dataset was originally tagged). This old tag goes into the `BCP-47` field of the dataset, which can handle quirks & oddities like this one. And a new tag is added in the `ISO 639-3` field: the 3-letter code "heb".
> * When you look up a language on Wikipedia, it usually shows, in addition to the ISO standard, the codes in the Glottolog (which you have already mentioned), [ELP](https://www.endangeredlanguages.com/?hl=en) and [Linguasphere](http://www.linguasphere.info/jr/index.php?l1=home&l2=welcome) databases. Would you have any opinion about these two other databases?
I'm afraid I never heard about Linguasphere. The [online register for Linguasphere (PDF)](http://www.linguasphere.info/jr/pdf/index/LS_index_n-n.pdf) seems to be from 1999-2000. It seems that the level of interoperability is not very high right now. (By contrast, Glottolog has [pyglottolog](https://github.com/glottolog/pyglottolog) and in my experience contacts flow well.)
The Endangered Languages Project is something Google started but initially did not 'push' very strongly, it seems. Just airing an opinion on the public Internet, it seems that the project is now solidly rooted at University of Hawaiʻi at Mānoa. It seems that they do not generate codes of their own. They refer to ISO 639-3 (Ethnologue) as a code authority when applicable, and otherwise provide comments in so many words, such as that language L currently lacks an Ethnologue code of its own (example [here](https://www.endangeredlanguages.com/lang/10624)).
> * On the Hub, there is the following dataset where French people speak in English: https://huggingface.co/datasets/Datatang/French_Speaking_English_Speech_Data_by_Mobile_Phone
> Is there a database to take this case into account? I have not found any code in the Glottolog database. If based on an IETF BCP-47 standard, I would tend to tag the dataset with "en-fr" but would this be something accepted by linguists?
> Based on the first post in this thread that there are about 8000 languages, if one considers that a given language can be pronounced by a speaker of the other 7999, that would theoretically make about 64 million BCP-47 language1-language2 codes existing. And even much more if we consider regionalists with language1_regionalism_x-language2_regionalism_y. I guess there is no such database.
Yes, you noted the difficulty here: that there are so many possible situations. Eventually, each dataset would required descriptors of its own. @BenjaminGalliot points out that, in addition to specifying the speakers' native languages, the degree of language proficiency would also be relevant. How many years did the speakers spend in which area? Talking which languages? In what chronological order? Etc. The complexity defies encoding. The purpose of language codes is to allow for searches that group resources into sets that make sense. Additional information is very important, but would seem to be a matter for 'comments' fields.
> * Is there an international classification of languages?
> A bit like the [International Classification of Diseases](https://en.wikipedia.org/wiki/International_Classification_of_Diseases) in medicine, which is established by the WHO and used as a reference throughout the world. The idea would be to have a precise number of languages to which we would then have to assign a unique tag in order to find them later.
As I understand, Ethnologue and Glottolog both try to do that, each in its own way. The simile with diseases seems interesting, to some extent: in both cases it's about human classification of phenomena that have complexity (though some diseases are simpler than others, whereas all languages have much complexity, in different ways).
> * Finally, when can we expect to see all the datasets of [Pangloss](https://pangloss.cnrs.fr/) on HF? eyes And I don't know if you have a way to help to add also the datasets of [CoCoON](https://cocoon.huma-num.fr/exist/crdo/).
Three concerns: (i) Technical specifications: we have not yet received feedback on the Japhug and Na datasets in HF. There may be technical considerations that we have not yet thought of and that would need to be taken into account before 'bulk upload'. (ii) Would there be a way to automate the process? The way @BenjaminGalliot did it for Japhug and Na, there was a manual component involved, and doing it by hand for all 200 datasets would not be an ideal workflow, given that the metadata are all clearly arranged. (iii) Some datasets are currently under a 'No derivatives' CreativeCommons license. We could go back to the depositors and argue that the 'No derivatives' mention were best omitted (see [here a similar argument about publications](https://creativecommons.org/2020/04/21/academic-publications-under-no-derivatives-licenses-is-misguided/)): again, we'd want to be sure about the way forward before we set the process into motion.
Our hope would be that some colleagues try out the [OutilsPangloss](https://gitlab.com/lacito/outilspangloss) download tool, assemble datasets from Pangloss/Cocoon as they wish, then deposit them to HF. | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 1,285 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
Hi @lbourdois ! Many thanks for the detailed information.
> Discussions on the need to improve the Hub's tagging system (applying to both datasets and models) can be found in the following discussion: [huggingface/hub-docs#193](https://github.com/huggingface/hub-docs/issues/193)
Fascinating topic! To me, the following suggestion has a lot of appeal:
"if consider that it was necessary to create an ISO 639-3 because ISO 639-1 was deficient, it would be to do the reverse and thus convert the tags from ISO 639-1 to ISO 639-2 or 3 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes or https://iso639-3.sil.org/code_tables/639/data)."
Yes, ISO 639-1 is unsuitable because it has so few codes: less than 200. To address linguistic diversity in 'unrestricted mode', a list of all languages is wanted.
The idea of letting people use their favourite nomenclature and automatically adding the ISO 639-3 three-letter code as a tag is appealing. Thus all the HF datasets would have three-letter language tags (handy for basic search), alongside the authors' preferred tags and language names (including Glottolog tags as well as ISO 639-{1, 2}, and all other options allowed by BCP-47).
Retaining the authors' original tags and language names would be best.
* For language names: some people favour one name over another and it is important to respect their choice. In the case of Yongning Na: alternative names include 'Mosuo', 'Narua', 'Eastern Naxi'... and the names carry implications: people have been reported to come to blows about the use of the term 'Mosuo'.
* For language tags: Glottocodes can be more fine-grained than Ethnologue (ISO 639-3), and some colleagues feel strongly about those.
Thus there would be a BCP-47 tag (sounds like a solid technical choice, though not 'passer-by-friendly': requiring some expertise to interpret) **plus** an ISO 639-3 tag that could be grabbed easily, and (last but not least) language names spelled out in full. Searches would be easier. No information would be lost.
Are industry practices so conservative that many people are happy with two-letter codes, and consider ISO 639-3 three-letter codes an unnecessary complication? That would be a pity, since there are so many advantages to using longer lists. (Somewhat like the transition to Unicode: sooo much better!) But maybe that conservative attitude _is_ widespread, and it would then need to be taken into account. In which case, one could consider offering two-letter codes as a search option. Internally, the search engine would look up the corresponding 3-letter codes, and produce the search results accordingly.
Now to the other questions:
> * Do you think it's possible to easily handle tags that have been deprecated potentially for decades?
> For example (I'm taking the case of Hebrew but this has happened for other languages) I tagged Google models with the "iw" [tag](https://huggingface.co/models?language=iw&sort=downloads) because I based it on what the authors gave in their [paper](https://arxiv.org/pdf/2010.11934.pdf) see table 6 page 12). It turns out that this ISO tag has in fact been deprecated since 1989 in favour of the "he" tag. It would therefore be necessary to have a verification that transforms the old tags into the most recent ones.
I guess that the above suggestion takes care of this case. The original tag (in this example, "iw") is retained (facilitating cross-reference with the published paper, and respecting the real: the way the dataset was originally tagged). This old tag goes into the `BCP-47` field of the dataset, which can handle quirks & oddities like this one. And a new tag is added in the `ISO 639-3` field: the 3-letter code "heb".
> * When you look up a language on Wikipedia, it usually shows, in addition to the ISO standard, the codes in the Glottolog (which you have already mentioned), [ELP](https://www.endangeredlanguages.com/?hl=en) and [Linguasphere](http://www.linguasphere.info/jr/index.php?l1=home&l2=welcome) databases. Would you have any opinion about these two other databases?
I'm afraid I never heard about Linguasphere. The [online register for Linguasphere (PDF)](http://www.linguasphere.info/jr/pdf/index/LS_index_n-n.pdf) seems to be from 1999-2000. It seems that the level of interoperability is not very high right now. (By contrast, Glottolog has [pyglottolog](https://github.com/glottolog/pyglottolog) and in my experience contacts flow well.)
The Endangered Languages Project is something Google started but initially did not 'push' very strongly, it seems. Just airing an opinion on the public Internet, it seems that the project is now solidly rooted at University of Hawaiʻi at Mānoa. It seems that they do not generate codes of their own. They refer to ISO 639-3 (Ethnologue) as a code authority when applicable, and otherwise provide comments in so many words, such as that language L currently lacks an Ethnologue code of its own (example [here](https://www.endangeredlanguages.com/lang/10624)).
> * On the Hub, there is the following dataset where French people speak in English: https://huggingface.co/datasets/Datatang/French_Speaking_English_Speech_Data_by_Mobile_Phone
> Is there a database to take this case into account? I have not found any code in the Glottolog database. If based on an IETF BCP-47 standard, I would tend to tag the dataset with "en-fr" but would this be something accepted by linguists?
> Based on the first post in this thread that there are about 8000 languages, if one considers that a given language can be pronounced by a speaker of the other 7999, that would theoretically make about 64 million BCP-47 language1-language2 codes existing. And even much more if we consider regionalists with language1_regionalism_x-language2_regionalism_y. I guess there is no such database.
Yes, you noted the difficulty here: that there are so many possible situations. Eventually, each dataset would required descriptors of its own. @BenjaminGalliot points out that, in addition to specifying the speakers' native languages, the degree of language proficiency would also be relevant. How many years did the speakers spend in which area? Talking which languages? In what chronological order? Etc. The complexity defies encoding. The purpose of language codes is to allow for searches that group resources into sets that make sense. Additional information is very important, but would seem to be a matter for 'comments' fields.
> * Is there an international classification of languages?
> A bit like the [International Classification of Diseases](https://en.wikipedia.org/wiki/International_Classification_of_Diseases) in medicine, which is established by the WHO and used as a reference throughout the world. The idea would be to have a precise number of languages to which we would then have to assign a unique tag in order to find them later.
As I understand, Ethnologue and Glottolog both try to do that, each in its own way. The simile with diseases seems interesting, to some extent: in both cases it's about human classification of phenomena that have complexity (though some diseases are simpler than others, whereas all languages have much complexity, in different ways).
> * Finally, when can we expect to see all the datasets of [Pangloss](https://pangloss.cnrs.fr/) on HF? eyes And I don't know if you have a way to help to add also the datasets of [CoCoON](https://cocoon.huma-num.fr/exist/crdo/).
Three concerns: (i) Technical specifications: we have not yet received feedback on the Japhug and Na datasets in HF. There may be technical considerations that we have not yet thought of and that would need to be taken into account before 'bulk upload'. (ii) Would there be a way to automate the process? The way @BenjaminGalliot did it for Japhug and Na, there was a manual component involved, and doing it by hand for all 200 datasets would not be an ideal workflow, given that the metadata are all clearly arranged. (iii) Some datasets are currently under a 'No derivatives' CreativeCommons license. We could go back to the depositors and argue that the 'No derivatives' mention were best omitted (see [here a similar argument about publications](https://creativecommons.org/2020/04/21/academic-publications-under-no-derivatives-licenses-is-misguided/)): again, we'd want to be sure about the way forward before we set the process into motion.
Our hope would be that some colleagues try out the [OutilsPangloss](https://gitlab.com/lacito/outilspangloss) download tool, assemble datasets from Pangloss/Cocoon as they wish, then deposit them to HF. | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > The idea of letting people use their favourite nomenclature and automatically adding the ISO 639-3 three-letter code as a tag is appealing. Thus all the HF datasets would have three-letter language tags (handy for basic search), alongside the authors' preferred tags and language names (including Glottolog tags as well as ISO 639-{1, 2}, and all other options allowed by BCP-47).
>
> Retaining the authors' original tags and language names would be best.
>
> * For language names: some people favour one name over another and it is important to respect their choice. In the case of Yongning Na: alternative names include 'Mosuo', 'Narua', 'Eastern Naxi'... and the names carry implications: people have been reported to come to blows about the use of the term 'Mosuo'.
> * For language tags: Glottocodes can be more fine-grained than Ethnologue (ISO 639-3), and some colleagues feel strongly about those.
>
> Thus there would be a BCP-47 tag (sounds like a solid technical choice, though not 'passer-by-friendly': requiring some expertise to interpret) **plus** an ISO 639-3 tag that could be grabbed easily, and (last but not least) language names spelled out in full. Searches would be easier. No information would be lost.
@alexis-michaud raises an excellent point. Language Resource users have varying search habits (or approaches). This includes cases where two or more language names refer to a single language. A search utility/interface needs to be flexible and able to present results from various kinds of input in the search process. This could be like how the terms French/Français/Franzosisch (en/fr/de) are names for the same language or it could be a variety of the following: autoglottonyms (how the speakers of the language refer to their language), or exoglottonyms (how others refer to the language). Additionally, in web based searches I have also needed to implement diacritic sensitive and insensitive logic so that users can type with or without diacritics and not have results unnecessarily excluded.
Depending on how detailed of a search problem HF seeks to solve. It may be better to off load complex search to search engines like OLAC which aggregate a lot of language resources. — as I mentioned above I can assist with the informatics on creating an OLAC feed.
Abstracting search logic from actual metadata may prove a useful way to lower the technical debt overhead. Technical tools and library standards use ISO and BCP-47 Standards. So, from a bibliographic metadata perspective this seems to be the way forward with the widest set of use cases. | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 421 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> The idea of letting people use their favourite nomenclature and automatically adding the ISO 639-3 three-letter code as a tag is appealing. Thus all the HF datasets would have three-letter language tags (handy for basic search), alongside the authors' preferred tags and language names (including Glottolog tags as well as ISO 639-{1, 2}, and all other options allowed by BCP-47).
>
> Retaining the authors' original tags and language names would be best.
>
> * For language names: some people favour one name over another and it is important to respect their choice. In the case of Yongning Na: alternative names include 'Mosuo', 'Narua', 'Eastern Naxi'... and the names carry implications: people have been reported to come to blows about the use of the term 'Mosuo'.
> * For language tags: Glottocodes can be more fine-grained than Ethnologue (ISO 639-3), and some colleagues feel strongly about those.
>
> Thus there would be a BCP-47 tag (sounds like a solid technical choice, though not 'passer-by-friendly': requiring some expertise to interpret) **plus** an ISO 639-3 tag that could be grabbed easily, and (last but not least) language names spelled out in full. Searches would be easier. No information would be lost.
@alexis-michaud raises an excellent point. Language Resource users have varying search habits (or approaches). This includes cases where two or more language names refer to a single language. A search utility/interface needs to be flexible and able to present results from various kinds of input in the search process. This could be like how the terms French/Français/Franzosisch (en/fr/de) are names for the same language or it could be a variety of the following: autoglottonyms (how the speakers of the language refer to their language), or exoglottonyms (how others refer to the language). Additionally, in web based searches I have also needed to implement diacritic sensitive and insensitive logic so that users can type with or without diacritics and not have results unnecessarily excluded.
Depending on how detailed of a search problem HF seeks to solve. It may be better to off load complex search to search engines like OLAC which aggregate a lot of language resources. — as I mentioned above I can assist with the informatics on creating an OLAC feed.
Abstracting search logic from actual metadata may prove a useful way to lower the technical debt overhead. Technical tools and library standards use ISO and BCP-47 Standards. So, from a bibliographic metadata perspective this seems to be the way forward with the widest set of use cases. | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | To get a visual idea of these first exchanges, I coded a Streamlit app that I put online on Spaces: https://huggingface.co/spaces/lbourdois/Language-tags-demo.
The code is in Python so I don't know if it can be used by HF who seems to need something in Node.js but it serves as a proof of concept. The advantage is also that you can directly test ideas by enter things in a search bar and see what comes up.
This application is divided into 3 points:
- The first is to enter a language in natural language to get its code which can then be filled in the YAML file of the README.MD files of the HF datasets or models in order to be referenced and found by everyone.
In practice, enter the language (e.g: `English`) you are interested in to get its associated tag (e.g: `en`). You can enter several languages by separating them with a comma (e.g `French,English,German`). You will be given priority to the ISO 639-3 code if it exists otherwise the Glottocode or the BCP47 code (for varieties in particular). If none of these codes are available, it links to a page where the user can contact HF to request to add this tag.
If you enter a BCP47 code, it must be entered as follows: `Language(Territory)`, for example `French(Canada)`. Attention! If you enter a BCP-47 language, it must be entered first, otherwise the plant code will be displayed. I have to fix this problem but I am moving to a new place, I don't have an internet connection when I want and I prefer to push this first version so that you can already test things now and not have to wait days or weeks.
This point is intended to simulate the user's side of the equation, which wonders which tag he should fill in for his language.
- The second is to enter a language code to obtain the name of the language in natural language.
In practice, enter the tag (ISO 639-1/2/3, Glottolog or BCP-47) you are interested in (e.g: `fra`) to get its associated language (e.g: French). You can enter several languages by separating them with a comma (e.g `fra,eng,deu`). Attention! If you enter a BCP-47 code, it must be entered first, otherwise the plant code will be displayed. Same as the other bug above (it's actually the same one).
This point is intended to simulate the side of HF that for a given tag must return the correct language.
To code these two points, I tested two approaches.
1. The first one (internal DB in the app) consists in querying a database that HF would have locally at their place. To create this database, I merged the ISO 639 database (https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab) and the Glottolog database (https://glottolog.org/meta/downloads). The result of this merge is visible in the 3rd point of the application qui is an overview of the database.
In the image below, on line 1 of the database, we can see that the Glottocode database gives an ISO 639-3 code (column ISO639P3code) but not the ISO 639 database (column 639-3). Do you have an explanation for this phenomenon?

For BCP 47 codes of the type `fr-CA`, I have retrieved the ISO-3166 alpha 1 codes of the territories (https://www.iso.org/iso-3166-country-codes.html).
In practice, what I do is if we enter `fr-CA` is that the letters before the `-` refer to a language in the `Name` column for a `639-1` == `fr` (`639-3` for `fra` or `fre`) in the base of my image above. Then I look at the letters after the `-` which refers to a territory. It comes out `French (Canada)`. I used https://cldr.unicode.org/translation/displaynames/languagelocale-name-patterns for the pattern that came up.
2. The second approach (with langcodes lib in the app) consists in using the Python `langcodes` library (https://github.com/rspeer/langcodes) which offers a lot of features in ready-made functions. It manages for example deprecated codes, the validity of an entered code, gives languages from code in the language of your choice (by default in English, but also autoglottonyms), etc. I invite you to read the README of the library. The only negative point is that it hasn't been updated for 10 months so basing your tag system on an external tool that isn't necessarily up to date can cause problems in the long run. But it is certainly an interesting source.
Finally, I have added some information on the number of people speaking/reading the language(s) searched (figures provided by langcodes which are based on those given by ISO). This is not relevant for our topic but it could be figures that could be added as information on the https://huggingface.co/languages page.
What could be done to improve the app if I have time:
- Write the text for the app's homepage to describe what it does. This could serve as a basis for a documentation that I think will be necessary to add somewhere on the HF website to explain how the language tagging system works.
- Deal with the bug mentioned above
- Integrate ISO 3166-1 alpha 2 territories (https://www.iso.org/obp/ui#iso:pub:PUB500001:en)? They offer a finer granularity than ISO 3166-1 alpha 1 which is limited to the country level, but they are very administrative (for French, ISO 3166-1 alpha 2 gives us the "départements" for example).
- Add autoglottonyms? (I only handle English language names for the moment)
- For each language indicate to which family it belongs, in practice this could help to make data augmentation, but especially to classify the languages and find them more easily on the page https://huggingface.co/languages. | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 920 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
To get a visual idea of these first exchanges, I coded a Streamlit app that I put online on Spaces: https://huggingface.co/spaces/lbourdois/Language-tags-demo.
The code is in Python so I don't know if it can be used by HF who seems to need something in Node.js but it serves as a proof of concept. The advantage is also that you can directly test ideas by enter things in a search bar and see what comes up.
This application is divided into 3 points:
- The first is to enter a language in natural language to get its code which can then be filled in the YAML file of the README.MD files of the HF datasets or models in order to be referenced and found by everyone.
In practice, enter the language (e.g: `English`) you are interested in to get its associated tag (e.g: `en`). You can enter several languages by separating them with a comma (e.g `French,English,German`). You will be given priority to the ISO 639-3 code if it exists otherwise the Glottocode or the BCP47 code (for varieties in particular). If none of these codes are available, it links to a page where the user can contact HF to request to add this tag.
If you enter a BCP47 code, it must be entered as follows: `Language(Territory)`, for example `French(Canada)`. Attention! If you enter a BCP-47 language, it must be entered first, otherwise the plant code will be displayed. I have to fix this problem but I am moving to a new place, I don't have an internet connection when I want and I prefer to push this first version so that you can already test things now and not have to wait days or weeks.
This point is intended to simulate the user's side of the equation, which wonders which tag he should fill in for his language.
- The second is to enter a language code to obtain the name of the language in natural language.
In practice, enter the tag (ISO 639-1/2/3, Glottolog or BCP-47) you are interested in (e.g: `fra`) to get its associated language (e.g: French). You can enter several languages by separating them with a comma (e.g `fra,eng,deu`). Attention! If you enter a BCP-47 code, it must be entered first, otherwise the plant code will be displayed. Same as the other bug above (it's actually the same one).
This point is intended to simulate the side of HF that for a given tag must return the correct language.
To code these two points, I tested two approaches.
1. The first one (internal DB in the app) consists in querying a database that HF would have locally at their place. To create this database, I merged the ISO 639 database (https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab) and the Glottolog database (https://glottolog.org/meta/downloads). The result of this merge is visible in the 3rd point of the application qui is an overview of the database.
In the image below, on line 1 of the database, we can see that the Glottocode database gives an ISO 639-3 code (column ISO639P3code) but not the ISO 639 database (column 639-3). Do you have an explanation for this phenomenon?

For BCP 47 codes of the type `fr-CA`, I have retrieved the ISO-3166 alpha 1 codes of the territories (https://www.iso.org/iso-3166-country-codes.html).
In practice, what I do is if we enter `fr-CA` is that the letters before the `-` refer to a language in the `Name` column for a `639-1` == `fr` (`639-3` for `fra` or `fre`) in the base of my image above. Then I look at the letters after the `-` which refers to a territory. It comes out `French (Canada)`. I used https://cldr.unicode.org/translation/displaynames/languagelocale-name-patterns for the pattern that came up.
2. The second approach (with langcodes lib in the app) consists in using the Python `langcodes` library (https://github.com/rspeer/langcodes) which offers a lot of features in ready-made functions. It manages for example deprecated codes, the validity of an entered code, gives languages from code in the language of your choice (by default in English, but also autoglottonyms), etc. I invite you to read the README of the library. The only negative point is that it hasn't been updated for 10 months so basing your tag system on an external tool that isn't necessarily up to date can cause problems in the long run. But it is certainly an interesting source.
Finally, I have added some information on the number of people speaking/reading the language(s) searched (figures provided by langcodes which are based on those given by ISO). This is not relevant for our topic but it could be figures that could be added as information on the https://huggingface.co/languages page.
What could be done to improve the app if I have time:
- Write the text for the app's homepage to describe what it does. This could serve as a basis for a documentation that I think will be necessary to add somewhere on the HF website to explain how the language tagging system works.
- Deal with the bug mentioned above
- Integrate ISO 3166-1 alpha 2 territories (https://www.iso.org/obp/ui#iso:pub:PUB500001:en)? They offer a finer granularity than ISO 3166-1 alpha 1 which is limited to the country level, but they are very administrative (for French, ISO 3166-1 alpha 2 gives us the "départements" for example).
- Add autoglottonyms? (I only handle English language names for the moment)
- For each language indicate to which family it belongs, in practice this could help to make data augmentation, but especially to classify the languages and find them more easily on the page https://huggingface.co/languages. | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | Very impressive! Using the prompt 'Japhug' (a language name), the app finds the intended language:

A first question: based on the Glottocode, would it be possible to grab the closest ISO639-3 code? In case there is no match for the exact language variety, one needs to explore the higher-level groupings, level by level. For this language (Japhug), the information provided in the extracted CSV file (`glottolog-languoids-v4.6.csv`) is:
`sino1245/burm1265/naqi1236/qian1263/rgya1241/core1262/jiar1240`
One need not look further than the first higher-level grouping, [`jiar1240`](https://glottolog.org/resource/languoid/id/jiar1240), to get an ISO639-3 code, namely `jya`.
Thus users searching by language names would get ISO639-3 (often less fine-grained than Glottolog) as a bonus.
It might be possible to ask the Glottolog team to provide this piece of information as part of an export from their database. | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 127 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
Very impressive! Using the prompt 'Japhug' (a language name), the app finds the intended language:

A first question: based on the Glottocode, would it be possible to grab the closest ISO639-3 code? In case there is no match for the exact language variety, one needs to explore the higher-level groupings, level by level. For this language (Japhug), the information provided in the extracted CSV file (`glottolog-languoids-v4.6.csv`) is:
`sino1245/burm1265/naqi1236/qian1263/rgya1241/core1262/jiar1240`
One need not look further than the first higher-level grouping, [`jiar1240`](https://glottolog.org/resource/languoid/id/jiar1240), to get an ISO639-3 code, namely `jya`.
Thus users searching by language names would get ISO639-3 (often less fine-grained than Glottolog) as a bonus.
It might be possible to ask the Glottolog team to provide this piece of information as part of an export from their database. | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > on line 1 of the database, we can see that the Glottocode database gives an ISO 639-3 code (column ISO639P3code) but not the ISO 639 database (column 639-3). Do you have an explanation for this phenomenon?
That is because the language name 'Aewa' is not found in the Ethnologue (ISO 639-3) export that you are using. [This export in table form](https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab) only has one reference name (`Ref_Name`). For the language at issue, it is not 'Aewa' but ['Awishira'](https://www.ethnologue.com/language/ash).
By contrast, the language on line 0 of the database is called 'Abinomn' by both Ethnologue and Glottolog, and accordingly, columns `ISO639P3code` and `639-3` both contain the ISO 639-3 code, `bsa`.
The full Ethnologue database records alternate names for each language, and I'd bet that 'Aewa' is recorded among alternate names for the 'Ashiwira' language. I can't check because the full Ethnologue database is paywalled.

[Glottolog](https://glottolog.org/resource/languoid/id/abis1238) does provide the corresponding ISO 639-3 code for 'Aewa', `ash`, which is an exact match (it refers to the same variety as Glottolog `abis1238`).
In this specific case, Glottolog provides all the relevant information. I'd say that Glottolog can be trusted for all the codes they provide, including ISO 639-3 codes: they only include them when the match is good.
See previous comment about the cases where there is no exact match between Glottolog and ISO 639-3 (suggested workaround: look at a higher-level grouping to get an ISO 639-3 code). | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 236 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> on line 1 of the database, we can see that the Glottocode database gives an ISO 639-3 code (column ISO639P3code) but not the ISO 639 database (column 639-3). Do you have an explanation for this phenomenon?
That is because the language name 'Aewa' is not found in the Ethnologue (ISO 639-3) export that you are using. [This export in table form](https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab) only has one reference name (`Ref_Name`). For the language at issue, it is not 'Aewa' but ['Awishira'](https://www.ethnologue.com/language/ash).
By contrast, the language on line 0 of the database is called 'Abinomn' by both Ethnologue and Glottolog, and accordingly, columns `ISO639P3code` and `639-3` both contain the ISO 639-3 code, `bsa`.
The full Ethnologue database records alternate names for each language, and I'd bet that 'Aewa' is recorded among alternate names for the 'Ashiwira' language. I can't check because the full Ethnologue database is paywalled.

[Glottolog](https://glottolog.org/resource/languoid/id/abis1238) does provide the corresponding ISO 639-3 code for 'Aewa', `ash`, which is an exact match (it refers to the same variety as Glottolog `abis1238`).
In this specific case, Glottolog provides all the relevant information. I'd say that Glottolog can be trusted for all the codes they provide, including ISO 639-3 codes: they only include them when the match is good.
See previous comment about the cases where there is no exact match between Glottolog and ISO 639-3 (suggested workaround: look at a higher-level grouping to get an ISO 639-3 code). | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | I will add these two points to my TODO list.
- Since Glottolog can be trust, I will add a condition to the code that if there is no ISO 639-3 code in the "official" database (https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab), look for it in the "ISO639P3code" column of Glottolog.
- For the point of adding the closest ISO 639-3 code for a Glottolog code, what convention should be adopted for the output? Just the ISO 639-3 code, or the ISO 639-3 code - Glottolog code, or the ISO 639-3 code - language name?
To use the example of `Japhug` , should it be just `jya`, or `jya-japh1234` or `jya-Japhug`? | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 106 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
I will add these two points to my TODO list.
- Since Glottolog can be trust, I will add a condition to the code that if there is no ISO 639-3 code in the "official" database (https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab), look for it in the "ISO639P3code" column of Glottolog.
- For the point of adding the closest ISO 639-3 code for a Glottolog code, what convention should be adopted for the output? Just the ISO 639-3 code, or the ISO 639-3 code - Glottolog code, or the ISO 639-3 code - language name?
To use the example of `Japhug` , should it be just `jya`, or `jya-japh1234` or `jya-Japhug`? | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > * Integrate ISO 3166-1 alpha 2 territories (https://www.iso.org/obp/ui#iso:pub:PUB500001:en)? They offer a finer granularity than ISO 3166-1 alpha 1 which is limited to the country level, but they are very administrative (for French, ISO 3166-1 alpha 2 gives us the "départements" for example).
I'm concerned with this sort of exploration. Not because I am against innovation. In fact this is an interesting thought exercise. However, to explore this thought further creates cognitive dissidence between BCP-47 authorized codes and other code sets which are not BP-47 compliant. For that reason, I think adding additional codes is a waste of time both for HF devs and for future users who get a confusing idea about language tagging. | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 115 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> * Integrate ISO 3166-1 alpha 2 territories (https://www.iso.org/obp/ui#iso:pub:PUB500001:en)? They offer a finer granularity than ISO 3166-1 alpha 1 which is limited to the country level, but they are very administrative (for French, ISO 3166-1 alpha 2 gives us the "départements" for example).
I'm concerned with this sort of exploration. Not because I am against innovation. In fact this is an interesting thought exercise. However, to explore this thought further creates cognitive dissidence between BCP-47 authorized codes and other code sets which are not BP-47 compliant. For that reason, I think adding additional codes is a waste of time both for HF devs and for future users who get a confusing idea about language tagging. | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | Good job for the application!
> On the Hub, there is the following dataset where French people speak in English: https://huggingface.co/datasets/Datatang/French_Speaking_English_Speech_Data_by_Mobile_Phone
Is there a database to take this case into account? I have not found any code in the Glottolog database. If based on an IETF BCP-47 standard, I would tend to tag the dataset with "en-fr" but would this be something accepted by linguists?
Based on the first post in this thread that there are about 8000 languages, if one considers that a given language can be pronounced by a speaker of the other 7999, that would theoretically make about 64 million BCP-47 language1-language2 codes existing. And even much more if we consider regionalists with language1_regionalism_x-language2_regionalism_y. I guess there is no such database.
> Yes, you noted the difficulty here: that there are so many possible situations. Eventually, each dataset would required descriptors of its own. @BenjaminGalliot points out that, in addition to specifying the speakers' native languages, the degree of language proficiency would also be relevant. How many years did the speakers spend in which area? Talking which languages? In what chronological order? Etc. The complexity defies encoding. The purpose of language codes is to allow for searches that group resources into sets that make sense. Additional information is very important, but would seem to be a matter for 'comments' fields.
To briefly complete what I said on this subject in a private discussion group, there is a lot of (meta)data associated with each element of a corpus (which language level, according to which criteria, knowing that even among native speakers there are differences, some of which may go beyond what seems obvious to us from a linguistic point of view, such as socio-professional category, life history, environment in the broad sense, etc.), which can be placed in ad-hoc columns, or more freely in a comment/note column. And it is the role of the researcher (in this case a linguist, in all likelihood) to do analyses (statistics...) to determine the relevant data, including criteria that may justify separating different languages (in the broad sense), making separate corpora, etc. Putting this information in the language code is in my opinion doing the job in the opposite and wrong direction, as well as bringing other problems, like where to stop in the list of multidimensional criteria to be integrated, so in my opinion, here, the minimum is the best (the important thing is in my opinion to have well-documented data, globally, by sub-corpus or by line)...
> If you are going to use Glottolog codes use them after an -x- tag in the BCP-47 format to maintain BCP-47 validity.
Yes, for the current corpora, I have written:
```
language:
- jya
- nru
language_bcp47:
- x-japh1234
- x-yong1288
```
> * Add autoglottonyms? (I only handle English language names for the moment)
Autoglossonyms are useful (I use them prior to other glossonyms), but I'm not sure there is an easy way to retrieve them. We can find some of them in the "Alternative Names" panel of Glottolog, but even if we have an API to retrieve them easily, their associated language code will often not be the one we are in (hence the need to do several cycles to find one, which might not be the right one...). Maybe this problem needs more investigation...
> For the point of adding the closest ISO 639-3 code for a Glottolog code, what convention should be adopted for the output? Just the ISO 639-3 code, or the ISO 639-3 code - Glottolog code, or the ISO 639-3 code - language name?
To use the example of Japhug , should it be just jya, or jya-japh1234 or jya-Japhug?
I strongly insist not to add **a** language name after the code, it would restart a spiral of problems, notably the choice of the language in question:
* the autoglossonym: in my opinion the best choice, but you have to know it…
* the English name: iniquitous,
* the name in the administratively/politically dominant language of the target language if it is relevant (strictly localized without overlapping, for example): iniquitous and tendentious (and in a way a special case of the previous one)...
* etc.
| **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 699 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
Good job for the application!
> On the Hub, there is the following dataset where French people speak in English: https://huggingface.co/datasets/Datatang/French_Speaking_English_Speech_Data_by_Mobile_Phone
Is there a database to take this case into account? I have not found any code in the Glottolog database. If based on an IETF BCP-47 standard, I would tend to tag the dataset with "en-fr" but would this be something accepted by linguists?
Based on the first post in this thread that there are about 8000 languages, if one considers that a given language can be pronounced by a speaker of the other 7999, that would theoretically make about 64 million BCP-47 language1-language2 codes existing. And even much more if we consider regionalists with language1_regionalism_x-language2_regionalism_y. I guess there is no such database.
> Yes, you noted the difficulty here: that there are so many possible situations. Eventually, each dataset would required descriptors of its own. @BenjaminGalliot points out that, in addition to specifying the speakers' native languages, the degree of language proficiency would also be relevant. How many years did the speakers spend in which area? Talking which languages? In what chronological order? Etc. The complexity defies encoding. The purpose of language codes is to allow for searches that group resources into sets that make sense. Additional information is very important, but would seem to be a matter for 'comments' fields.
To briefly complete what I said on this subject in a private discussion group, there is a lot of (meta)data associated with each element of a corpus (which language level, according to which criteria, knowing that even among native speakers there are differences, some of which may go beyond what seems obvious to us from a linguistic point of view, such as socio-professional category, life history, environment in the broad sense, etc.), which can be placed in ad-hoc columns, or more freely in a comment/note column. And it is the role of the researcher (in this case a linguist, in all likelihood) to do analyses (statistics...) to determine the relevant data, including criteria that may justify separating different languages (in the broad sense), making separate corpora, etc. Putting this information in the language code is in my opinion doing the job in the opposite and wrong direction, as well as bringing other problems, like where to stop in the list of multidimensional criteria to be integrated, so in my opinion, here, the minimum is the best (the important thing is in my opinion to have well-documented data, globally, by sub-corpus or by line)...
> If you are going to use Glottolog codes use them after an -x- tag in the BCP-47 format to maintain BCP-47 validity.
Yes, for the current corpora, I have written:
```
language:
- jya
- nru
language_bcp47:
- x-japh1234
- x-yong1288
```
> * Add autoglottonyms? (I only handle English language names for the moment)
Autoglossonyms are useful (I use them prior to other glossonyms), but I'm not sure there is an easy way to retrieve them. We can find some of them in the "Alternative Names" panel of Glottolog, but even if we have an API to retrieve them easily, their associated language code will often not be the one we are in (hence the need to do several cycles to find one, which might not be the right one...). Maybe this problem needs more investigation...
> For the point of adding the closest ISO 639-3 code for a Glottolog code, what convention should be adopted for the output? Just the ISO 639-3 code, or the ISO 639-3 code - Glottolog code, or the ISO 639-3 code - language name?
To use the example of Japhug , should it be just jya, or jya-japh1234 or jya-Japhug?
I strongly insist not to add **a** language name after the code, it would restart a spiral of problems, notably the choice of the language in question:
* the autoglossonym: in my opinion the best choice, but you have to know it…
* the English name: iniquitous,
* the name in the administratively/politically dominant language of the target language if it is relevant (strictly localized without overlapping, for example): iniquitous and tendentious (and in a way a special case of the previous one)...
* etc.
| [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > To get a visual idea of these first exchanges, I coded a Streamlit app that I put online on Spaces: https://huggingface.co/spaces/lbourdois/Language-tags-demo.
> The code is in Python so I don't know if it can be used by HF who seems to need something in Node.js but it serves as a proof of concept. The advantage is also that you can directly test ideas by enter things in a search bar and see what comes up.
This is really great. You're doing a fantastic job. I love watching the creative process evolve. It is exciting. Let me provide some links to some search interfaces for further inspiration. I always find it helpful to know how others have approached a problem when figuring out my approach. I will link to three examples Glottolog, r12a's language sub-tag chooser, and the FLEx project builder wizard. The first two are online, but the last one is in an application which must be downloaded and works only on windows or linux. I have placed some notes on each of the screenshots.
* **[Glottolog](https://glottolog.org/)** | [Search Query](https://glottolog.org/glottolog?name=en&namequerytype=part&multilingual=on#2/20.9/150.0)


* **[r12a language sub-tag chooser](https://r12a.github.io/app-subtags/)** | [Code on github](https://github.com/r12a/app-subtags)

* **FLEx Language Chooser** | [application page](https://software.sil.org/fieldworks/)

| **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 201 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> To get a visual idea of these first exchanges, I coded a Streamlit app that I put online on Spaces: https://huggingface.co/spaces/lbourdois/Language-tags-demo.
> The code is in Python so I don't know if it can be used by HF who seems to need something in Node.js but it serves as a proof of concept. The advantage is also that you can directly test ideas by enter things in a search bar and see what comes up.
This is really great. You're doing a fantastic job. I love watching the creative process evolve. It is exciting. Let me provide some links to some search interfaces for further inspiration. I always find it helpful to know how others have approached a problem when figuring out my approach. I will link to three examples Glottolog, r12a's language sub-tag chooser, and the FLEx project builder wizard. The first two are online, but the last one is in an application which must be downloaded and works only on windows or linux. I have placed some notes on each of the screenshots.
* **[Glottolog](https://glottolog.org/)** | [Search Query](https://glottolog.org/glottolog?name=en&namequerytype=part&multilingual=on#2/20.9/150.0)


* **[r12a language sub-tag chooser](https://r12a.github.io/app-subtags/)** | [Code on github](https://github.com/r12a/app-subtags)

* **FLEx Language Chooser** | [application page](https://software.sil.org/fieldworks/)

| [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > In practice, what I do is if we enter `fr-CA` is that the letters before the `-` refer to a language in the `Name` column for a `639-1` == `fr` (`639-3` for `fra` or `fre`) in the base of my image above. Then I look at the letters after the `-` which refers to a territory. It comes out `French (Canada)`. I used https://cldr.unicode.org/translation/displaynames/languagelocale-name-patterns for the pattern that came up.
What you are doing is looking at the algorithm for Locale generation rather than BCP-47's original documentation. I'm not sure there are difference, there might be. I know that locale IDs generally follow BCP-47 But I think there are some differences such as the use of `_` vs. `-`. | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 120 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> In practice, what I do is if we enter `fr-CA` is that the letters before the `-` refer to a language in the `Name` column for a `639-1` == `fr` (`639-3` for `fra` or `fre`) in the base of my image above. Then I look at the letters after the `-` which refers to a territory. It comes out `French (Canada)`. I used https://cldr.unicode.org/translation/displaynames/languagelocale-name-patterns for the pattern that came up.
What you are doing is looking at the algorithm for Locale generation rather than BCP-47's original documentation. I'm not sure there are difference, there might be. I know that locale IDs generally follow BCP-47 But I think there are some differences such as the use of `_` vs. `-`. | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > A first question: based on the Glottocode, would it be possible to grab the closest ISO639-3 code? In case there is no match for the exact language variety, one needs to explore the higher-level groupings, level by level. For this language (Japhug), the information provided in the extracted CSV file (`glottolog-languoids-v4.6.csv`) is: `sino1245/burm1265/naqi1236/qian1263/rgya1241/core1262/jiar1240` One need not look further than the first higher-level grouping, [`jiar1240`](https://glottolog.org/resource/languoid/id/jiar1240), to get an ISO639-3 code, namely `jya`.
>
> Thus users searching by language names would get ISO639-3 (often less fine-grained than Glottolog) as a bonus. It might be possible to ask the Glottolog team to provide this piece of information as part of an export from their database.
This is logical, but the fine grained assertions are not the same. That is just because they are in a hierarchical structure today doesn't mean they will be tomorrow. In some cases the glottolog is clearly referring to sub-language variants which will never receive full language status, whereas in other cases glottolog is referencing to unequal entities one or more of which should be a language. Many of the codes in glottolog have no associated documentation indicating what sort of speech variety they are. | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 198 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> A first question: based on the Glottocode, would it be possible to grab the closest ISO639-3 code? In case there is no match for the exact language variety, one needs to explore the higher-level groupings, level by level. For this language (Japhug), the information provided in the extracted CSV file (`glottolog-languoids-v4.6.csv`) is: `sino1245/burm1265/naqi1236/qian1263/rgya1241/core1262/jiar1240` One need not look further than the first higher-level grouping, [`jiar1240`](https://glottolog.org/resource/languoid/id/jiar1240), to get an ISO639-3 code, namely `jya`.
>
> Thus users searching by language names would get ISO639-3 (often less fine-grained than Glottolog) as a bonus. It might be possible to ask the Glottolog team to provide this piece of information as part of an export from their database.
This is logical, but the fine grained assertions are not the same. That is just because they are in a hierarchical structure today doesn't mean they will be tomorrow. In some cases the glottolog is clearly referring to sub-language variants which will never receive full language status, whereas in other cases glottolog is referencing to unequal entities one or more of which should be a language. Many of the codes in glottolog have no associated documentation indicating what sort of speech variety they are. | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | @lbourdois
> * Since Glottolog can be trust, I will add a condition to the code that if there is no ISO 639-3 code in the "official" database (https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab), look for it in the "ISO639P3code" column of Glottolog.
I'm confused here... if there is no ISO639-3 code in the official database from the registrar, why would you look for an "unofficial" code from someone else? What is the use case here? | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 71 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
@lbourdois
> * Since Glottolog can be trust, I will add a condition to the code that if there is no ISO 639-3 code in the "official" database (https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab), look for it in the "ISO639P3code" column of Glottolog.
I'm confused here... if there is no ISO639-3 code in the official database from the registrar, why would you look for an "unofficial" code from someone else? What is the use case here? | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > For the point of adding the closest ISO 639-3 code for a Glottolog code, what convention should be adopted for the output? Just the ISO 639-3 code, or the ISO 639-3 code - Glottolog code, or the ISO 639-3 code - language name?
To use the example of Japhug , should it be just jya, or jya-japh1234 or jya-Japhug?
(answer edited in view of [Benjamin Galliot's comment](https://github.com/huggingface/datasets/issues/4881#issuecomment-1237420600)
Easy part of the answer first: jya-Japhug is out, because, as @BenjaminGalliot pointed out above, mixing language names with language codes will make trouble. For Japhug, `jya-Japhug` looks rather good: the pair looks nice, the one (`jya`) packed together, the other (`Japhug`) good and complete while still pretty compact. But think about languages like 'Yongning Na' or 'Yucatán Maya': a code with a space in the middle, like `nru-Yongning Na`, is really unsightly and unwieldy, not?
Some [principles for language naming in English](http://hdl.handle.net/10125/24725) have been put forward, with some linguistic arguments, but always supposing that such standardization is desirable, actual standardization of language names in English may well never happen.
As for `jya-japh1234`: again, at first sight it seems cute, combining two fierce competitors (Ethnologue and Glottolog) into something that gets the best of both worlds.
But @HughP has a point: _adding additional codes is a waste of time both for HF devs and for future users who get a confusing idea about language tagging_ Strong wording, for an important comment: better stick with BCP 47.
So the solution pointed out by Benjamin, from Frances Gillis-Webber and Sabine Tittel, looks attractive:
jya-x-japh1234
On the other hand, if the idea for HF Datasets is simply to add the closest ISO 639-3 code for a Glottolog code, maybe it could be provided simply in three letters: providing the 'raw' ISO 639-3 code `jya`. Availability of 'straight' ISO 639-3 codes could save trouble for some users, and those who want more detail could look at the rest of the metadata and general information associated with datasets. | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 331 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> For the point of adding the closest ISO 639-3 code for a Glottolog code, what convention should be adopted for the output? Just the ISO 639-3 code, or the ISO 639-3 code - Glottolog code, or the ISO 639-3 code - language name?
To use the example of Japhug , should it be just jya, or jya-japh1234 or jya-Japhug?
(answer edited in view of [Benjamin Galliot's comment](https://github.com/huggingface/datasets/issues/4881#issuecomment-1237420600)
Easy part of the answer first: jya-Japhug is out, because, as @BenjaminGalliot pointed out above, mixing language names with language codes will make trouble. For Japhug, `jya-Japhug` looks rather good: the pair looks nice, the one (`jya`) packed together, the other (`Japhug`) good and complete while still pretty compact. But think about languages like 'Yongning Na' or 'Yucatán Maya': a code with a space in the middle, like `nru-Yongning Na`, is really unsightly and unwieldy, not?
Some [principles for language naming in English](http://hdl.handle.net/10125/24725) have been put forward, with some linguistic arguments, but always supposing that such standardization is desirable, actual standardization of language names in English may well never happen.
As for `jya-japh1234`: again, at first sight it seems cute, combining two fierce competitors (Ethnologue and Glottolog) into something that gets the best of both worlds.
But @HughP has a point: _adding additional codes is a waste of time both for HF devs and for future users who get a confusing idea about language tagging_ Strong wording, for an important comment: better stick with BCP 47.
So the solution pointed out by Benjamin, from Frances Gillis-Webber and Sabine Tittel, looks attractive:
jya-x-japh1234
On the other hand, if the idea for HF Datasets is simply to add the closest ISO 639-3 code for a Glottolog code, maybe it could be provided simply in three letters: providing the 'raw' ISO 639-3 code `jya`. Availability of 'straight' ISO 639-3 codes could save trouble for some users, and those who want more detail could look at the rest of the metadata and general information associated with datasets. | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | The problem seems to have already been raised here: https://drops.dagstuhl.de/opus/volltexte/2019/10368/pdf/OASIcs-LDK-2019-4.pdf
An example can be seen here :
> 3.1.2 The use of privateuse sub-tag
In light of unambiguous language codes being available for the two Khoisan varieties, we
propose to combine the ISO 639-3 code for the parent language N‖ng, i.e., ‘ngh’, with the
privateuse sub-tag ‘x-’ and the respective Glottocodes stated above.
The language tags for N|uu and ‖’Au can then be defined accordingly:
N|uu: ngh-x-nuuu1242
‖’Au: ngh-x-auni1243
By the way, while searching for this, I came across this application: https://huggingface.co/spaces/cdleong/langcode-search | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 92 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
The problem seems to have already been raised here: https://drops.dagstuhl.de/opus/volltexte/2019/10368/pdf/OASIcs-LDK-2019-4.pdf
An example can be seen here :
> 3.1.2 The use of privateuse sub-tag
In light of unambiguous language codes being available for the two Khoisan varieties, we
propose to combine the ISO 639-3 code for the parent language N‖ng, i.e., ‘ngh’, with the
privateuse sub-tag ‘x-’ and the respective Glottocodes stated above.
The language tags for N|uu and ‖’Au can then be defined accordingly:
N|uu: ngh-x-nuuu1242
‖’Au: ngh-x-auni1243
By the way, while searching for this, I came across this application: https://huggingface.co/spaces/cdleong/langcode-search | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > > * Since Glottolog can be trust, I will add a condition to the code that if there is no ISO 639-3 code in the "official" database (https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab), look for it in the "ISO639P3code" column of Glottolog.
>
> I'm confused here... if there is no ISO639-3 code in the official database from the registrar, why would you look for an "unofficial" code from someone else? What is the use case here?
Hi @HughP, I'm happy to clear what confusion may exist here :innocent: Here is the use case.
Guillaume Jacques (@rgyalrong) put together a sizeable corpus of the Japhug language. It is up on HF Datasets ([here](https://huggingface.co/datasets/Lacito/pangloss/viewer/japh1234)) as well as on Zenodo.
Zenodo is an all-purpose repository without adequate domain-specific metadata ("[métadonnées métier](https://www.cines.fr/archivage/des-expertises/les-metadonnees/metadonnees-metier/)"), and the deposits in there are not easy to locate. The Zenodo deposit is intended for a highly specific user case: someone reads about the dataset in a paper, goes to the address on Zenodo and grabs the dataset at one go.
HF Datasets, on the other hand, allows users to look around among corpora. The Japhug corpus needs proper tagging so that HF Datasets users can find out about it.
Japhug has an entry of its own in Glottolog, whereas it lacks an entry of its own in Ethnologue. Hence the practical usefulness of Glottolog. Ethnologue pools together, under the code `jya`, three different languages (Japhug, Tshobdun `tsho1240` and Zbu `zbua1234`).
I hope that this helps. | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 242 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> > * Since Glottolog can be trust, I will add a condition to the code that if there is no ISO 639-3 code in the "official" database (https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab), look for it in the "ISO639P3code" column of Glottolog.
>
> I'm confused here... if there is no ISO639-3 code in the official database from the registrar, why would you look for an "unofficial" code from someone else? What is the use case here?
Hi @HughP, I'm happy to clear what confusion may exist here :innocent: Here is the use case.
Guillaume Jacques (@rgyalrong) put together a sizeable corpus of the Japhug language. It is up on HF Datasets ([here](https://huggingface.co/datasets/Lacito/pangloss/viewer/japh1234)) as well as on Zenodo.
Zenodo is an all-purpose repository without adequate domain-specific metadata ("[métadonnées métier](https://www.cines.fr/archivage/des-expertises/les-metadonnees/metadonnees-metier/)"), and the deposits in there are not easy to locate. The Zenodo deposit is intended for a highly specific user case: someone reads about the dataset in a paper, goes to the address on Zenodo and grabs the dataset at one go.
HF Datasets, on the other hand, allows users to look around among corpora. The Japhug corpus needs proper tagging so that HF Datasets users can find out about it.
Japhug has an entry of its own in Glottolog, whereas it lacks an entry of its own in Ethnologue. Hence the practical usefulness of Glottolog. Ethnologue pools together, under the code `jya`, three different languages (Japhug, Tshobdun `tsho1240` and Zbu `zbua1234`).
I hope that this helps. | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | > By the way, while searching for this, I came across this application: https://huggingface.co/spaces/cdleong/langcode-search
Really relevant Space, so tagging its author @cdleong, just in case! | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 25 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
> By the way, while searching for this, I came across this application: https://huggingface.co/spaces/cdleong/langcode-search
Really relevant Space, so tagging its author @cdleong, just in case! | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4881 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list) | @cdleong A one-stop shop for language codes: terrific!
How do you feel about the use of Glottocodes? When searching the language names 'Japhug' and 'Yongning Na' (real examples, related to a HF Datasets deposit & various research projects), the relevant Glottocodes are retrieved, and that is great (and not that easy, notably with the space in the middle of 'Yongning Na'). But this positive result is 'hidden' in the results page. Specifically:
- for Japhug: when searching by language name ('Japhug'), the result in big print is 'Failure', even though there is an available Glottocode (at bottom).

When searching by Glottocode (japh1234), same outcome: 'Result: failure!' (even though this _is_ the right Glottocode
When searching by x-japh1234 (Glottocode encapsulated in BCP 47 syntax), one gets the message
> ''x-japh1234' parses meaningfully as a language tag according to IANA"
but there is paradoxically no link provided to Glottolog: the 'Glottolog' part of the results page is empty

- Yongning Na: the correct code is identified (yong1288) but instead of foregrounding this exact match, the first result that comes up is a completely different language, called 'Yong'.
Trying to formulate a conclusion (admittedly, this note is not based on intensive testing, it is just feedback on initial contact): from a user perspective, it seems that the tool could make more extensive use of Glottolog. `langcode-search` does a great job querying Glottolog, why not make more extensive use of that information? (including: to arrive at the nearest ISO 639-3 code) | **The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT, | 563 | 249 | Language names and language codes: connecting to a big database (rather than slow enrichment of custom list)
**The problem:**
Language diversity is an important dimension of the diversity of datasets. To find one's way around datasets, being able to search by language name and by standardized codes appears crucial.
Currently the list of language codes is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/resources/languages.json), right? At about 1,500 entries, it is roughly at 1/4th of the world's diversity of extant languages. (Probably less, as the list of 1,418 contains variants that are linguistically very close: 108 varieties of English, for instance.)
Looking forward to ever increasing coverage, how will the list of language names and language codes improve over time?
Enrichment of the custom list by HFT contributors (like [here](https://github.com/huggingface/datasets/pull/4880)) has several issues:
* progress is likely to be slow:

(input required from reviewers, etc.)
* the more contributors, the less consistency can be expected among contributions. No need to elaborate on how much confusion is likely to ensue as datasets accumulate.
* there is no information on which language relates with which: no encoding of the special closeness between the languages of the Northwestern Germanic branch (English+Dutch+German etc.), for instance. Information on phylogenetic closeness can be relevant to run experiments on transfer of technology from one language to its close relatives.
**A solution that seems desirable:**
Connecting to an established database that (i) aims at full coverage of the world's languages and (ii) has information on higher-level groupings, alternative names, etc.
It takes a lot of hard work to do such databases. Two important initiatives are [Ethnologue](https://www.ethnologue.com/) (ISO standard) and [Glottolog](https://glottolog.org/). Both have pros and cons. Glottolog contains references to Ethnologue identifiers, so adopting Glottolog entails getting the advantages of both sets of language codes.
Both seem technically accessible & 'developer-friendly'. Glottolog has a [GitHub repo](https://github.com/glottolog/glottolog). For Ethnologue, harvesting tools have been devised (see [here](https://github.com/lyy1994/ethnologue); I did not try it out).
In case a conversation with linguists seemed in order here, I'd be happy to participate ('pro bono', of course), & to rustle up more colleagues as useful, to help this useful development happen.
With appreciation of HFT,
@cdleong A one-stop shop for language codes: terrific!
How do you feel about the use of Glottocodes? When searching the language names 'Japhug' and 'Yongning Na' (real examples, related to a HF Datasets deposit & various research projects), the relevant Glottocodes are retrieved, and that is great (and not that easy, notably with the space in the middle of 'Yongning Na'). But this positive result is 'hidden' in the results page. Specifically:
- for Japhug: when searching by language name ('Japhug'), the result in big print is 'Failure', even though there is an available Glottocode (at bottom).

When searching by Glottocode (japh1234), same outcome: 'Result: failure!' (even though this _is_ the right Glottocode
When searching by x-japh1234 (Glottocode encapsulated in BCP 47 syntax), one gets the message
> ''x-japh1234' parses meaningfully as a language tag according to IANA"
but there is paradoxically no link provided to Glottolog: the 'Glottolog' part of the results page is empty

- Yongning Na: the correct code is identified (yong1288) but instead of foregrounding this exact match, the first result that comes up is a completely different language, called 'Yong'.
Trying to formulate a conclusion (admittedly, this note is not based on intensive testing, it is just feedback on initial contact): from a user perspective, it seems that the tool could make more extensive use of Glottolog. `langcode-search` does a great job querying Glottolog, why not make more extensive use of that information? (including: to arrive at the nearest ISO 639-3 code) | [
-1.2275348901748657,
-0.9556611776351929,
-0.7780465483665466,
1.4236634969711304,
-0.17439725995063782,
-1.2645025253295898,
0.08693516254425049,
-1.034253716468811,
1.6205370426177979,
-0.7516156435012817,
0.2925865352153778,
-1.6723847389221191,
-0.022796083241701126,
-0.590979278087616,
-0.8330154418945312,
-0.8392846584320068,
-0.46987563371658325,
-0.8445972204208374,
0.9801056385040283,
2.6771271228790283,
1.2639482021331787,
-1.5184022188186646,
2.792006492614746,
0.7077949047088623,
-0.14186620712280273,
-1.0022997856140137,
0.5391249656677246,
0.06920771300792694,
-1.2715833187103271,
-0.48127248883247375,
-0.9453917741775513,
-0.0944828987121582,
-0.5068397521972656,
-0.48882538080215454,
0.06216850504279137,
0.374209463596344,
-0.17198145389556885,
-0.3907196521759033,
-0.5901003479957581,
-0.7670916318893433,
0.51050865650177,
-0.40220823884010315,
0.9139612913131714,
-0.30200719833374023,
1.8145416975021362,
-0.5577585697174072,
0.3577905595302582,
0.7021293044090271,
1.3966143131256104,
0.19093868136405945,
-0.012714519165456295,
0.37863895297050476,
0.3891555666923523,
-0.037413857877254486,
0.48693937063217163,
1.2698522806167603,
0.7206282615661621,
0.42123547196388245,
0.760555624961853,
-2.1666905879974365,
1.3634397983551025,
-0.9917059540748596,
0.3884774148464203,
1.3033699989318848,
-0.9685572981834412,
0.45319414138793945,
-1.8528239727020264,
-0.10035492479801178,
0.609673023223877,
-2.280416250228882,
0.19482208788394928,
-1.1779980659484863,
-0.5611861348152161,
0.9002624154090881,
0.24985618889331818,
-1.2869638204574585,
0.24702109396457672,
-0.6271977424621582,
1.0315353870391846,
0.46727505326271057,
1.2352218627929688,
-1.7369776964187622,
-0.06743308156728745,
-0.289340078830719,
0.11781607568264008,
-1.2267509698867798,
-1.5362989902496338,
0.5778486728668213,
0.5674877166748047,
0.5760629177093506,
-0.13351531326770782,
0.9339680075645447,
-1.0148231983184814,
0.8762745261192322,
-0.994830846786499,
-1.662210464477539,
-1.503366231918335,
-2.2148935794830322,
-2.211775541305542,
0.8407499194145203,
-0.4396876096725464,
-0.5224485397338867,
2.038396120071411,
-1.0144551992416382,
-1.7613978385925293,
1.0974119901657104,
0.36475664377212524,
-0.020999841392040253,
2.3830978870391846,
0.17552898824214935,
-0.756886899471283,
0.4943282902240753,
-0.6603935956954956,
0.8487066030502319,
-0.40235191583633423,
1.4116078615188599,
0.4728905260562897,
-1.022369623184204,
1.5583246946334839,
-0.5022183656692505,
0.4847891926765442,
-0.723267674446106,
-0.48699235916137695,
-0.6986998319625854,
0.36298468708992004,
1.9149166345596313,
-0.3528425991535187,
1.5374025106430054,
-0.40924644470214844,
-1.5462466478347778,
-1.59462571144104,
0.899554431438446,
0.5548586845397949,
-0.8217785358428955,
0.023321885615587234,
-0.49503588676452637,
0.030381321907043457,
0.016753723844885826,
1.0543708801269531,
1.2136635780334473,
0.6835466623306274,
-0.2114483267068863,
-0.9213365316390991,
0.1561000943183899,
-0.1421373337507248,
-0.671686053276062,
-1.8847198486328125,
-0.3572356402873993,
0.1350499540567398,
0.6279628872871399,
-1.3098281621932983,
1.670356035232544,
0.8947374224662781,
1.892360806465149,
1.0113744735717773,
-0.36996883153915405,
1.5168280601501465,
0.045064378529787064,
1.7912068367004395,
-0.5360925793647766,
0.6893115043640137,
-0.369324654340744,
-1.2078640460968018,
0.8196459412574768,
-0.35301369428634644,
-2.1063458919525146,
-0.6988725662231445,
-0.7739967703819275,
-0.2219981551170349,
-0.7723454236984253,
0.9470689296722412,
-0.2922830879688263,
-1.3458317518234253,
0.23538951575756073,
-0.6933230757713318,
0.1178482174873352,
-1.207261085510254,
0.27997204661369324,
0.7854304313659668,
-0.6589360237121582,
0.049640730023384094,
-0.2521432936191559,
-1.2924797534942627,
-0.532617449760437,
0.2630082368850708,
1.9244712591171265,
-0.7696300745010376,
0.9200634360313416,
1.0119094848632812,
-0.6735087037086487,
0.077063649892807,
0.3507627546787262,
-0.3313201367855072,
0.889623761177063,
-1.0553977489471436,
-0.4166103005409241,
1.0992549657821655,
-0.13344316184520721,
-0.5336676836013794,
1.457146406173706,
0.7378848195075989,
-0.9218949675559998,
-0.25564658641815186,
-0.06329381465911865,
-0.866290807723999,
0.07623840868473053,
-1.5373896360397339,
-0.16257037222385406,
0.2763884961605072,
-1.556063175201416,
-0.5389751195907593,
-0.2993526756763458,
1.3135510683059692,
-0.13486990332603455,
1.4445797204971313,
-0.33550629019737244,
-0.18552769720554352,
-0.40047526359558105,
-0.3220199644565582,
0.19121743738651276,
-0.20618611574172974,
-0.5836997032165527,
0.2999420464038849,
-0.8184696435928345,
0.3662983477115631,
1.4724681377410889,
0.4953264892101288,
0.029655128717422485,
0.5342214107513428,
1.040581226348877,
0.35094204545021057,
-0.018220294266939163,
-0.8504914045333862,
-1.6163804531097412,
2.0304291248321533,
-1.5015157461166382,
2.023301362991333,
0.895916759967804,
0.019143644720315933,
-1.7519179582595825,
-1.8622616529464722,
1.300787329673767,
1.1689621210098267,
2.399606943130493,
0.5483589172363281,
0.38798287510871887,
-0.7972094416618347,
-0.6089829206466675,
0.32981106638908386,
-1.0541127920150757,
-0.7814670205116272,
0.14765791594982147,
2.397007942199707,
1.8245689868927002,
-0.5240293741226196,
-0.21720971167087555,
-1.0340009927749634,
1.442738652229309,
-0.2099199742078781,
0.1369740515947342,
1.9325391054153442,
-0.2592748999595642,
-1.0730366706848145,
1.2893919944763184,
-2.3514387607574463,
0.21642684936523438,
1.9442256689071655,
0.3226507306098938,
0.02687773108482361,
-1.4443371295928955,
-0.6270768046379089,
-0.30763739347457886,
-0.422307550907135,
-1.245694875717163,
0.49972930550575256,
-0.2895941138267517,
-0.9005747437477112,
-1.4835726022720337,
0.057763610035181046,
-1.2283114194869995,
-1.6046335697174072,
0.390230268239975,
1.8029130697250366,
2.0316038131713867,
-0.6460523009300232,
1.557715892791748,
-0.2960366904735565,
0.11284838616847992,
1.1962214708328247,
1.2644661664962769,
3.1656453609466553,
1.8757137060165405,
-1.2658061981201172,
0.5509650111198425,
-0.1679624319076538,
-0.4538296163082123,
1.069335699081421,
-1.1282281875610352,
1.2780596017837524,
-0.1592572182416916,
-1.2229443788528442,
-1.1665170192718506,
1.085189700126648,
0.514081597328186,
0.04402880370616913,
-0.5654692053794861,
1.1284315586090088,
0.030803419649600983,
1.2957179546356201,
0.5532933473587036,
-0.3421323001384735,
0.602321982383728,
-0.35346174240112305,
-0.5064607262611389,
1.5828369855880737,
0.218197301030159,
-1.470000147819519,
-2.322383165359497,
-0.15289926528930664,
-0.8121902346611023,
0.06097765639424324,
-0.6810001730918884,
-1.0013617277145386,
1.6524295806884766,
0.4171644151210785,
-1.2859362363815308,
-0.29289892315864563,
-0.31418269872665405,
-0.6087539196014404,
2.558403730392456,
-1.4416265487670898,
-0.20023483037948608,
-0.9184410572052002,
-0.48594018816947937,
1.5558826923370361,
-1.2322739362716675,
-0.16120652854442596,
-1.0071871280670166,
-0.645752489566803,
-1.1874736547470093,
-0.6100691556930542,
-0.09528911113739014,
-0.8407471776008606,
0.7592337727546692,
0.10342955589294434,
-1.0833847522735596,
-0.29746994376182556,
-0.861497163772583,
0.85431969165802,
-0.0764329731464386,
0.21728472411632538,
1.9426414966583252,
0.403800368309021,
-0.48700523376464844,
0.7248294353485107,
1.2358059883117676,
0.662247359752655,
-0.6365864872932434,
0.14827722311019897,
-0.6480190753936768,
0.2528311312198639,
-1.3275659084320068,
0.3430326581001282,
-2.8486146926879883,
0.7048239707946777,
-0.06212271377444267,
-0.050808172672986984,
0.021255435422062874,
-1.2199634313583374,
1.201818823814392,
2.6249969005584717,
-1.136478304862976,
0.4124390780925751,
0.3337157666683197,
1.0938804149627686,
-1.5985455513000488,
0.26991140842437744,
-0.39124104380607605,
2.0768380165100098,
0.20199579000473022,
1.1601481437683105,
-0.5733034610748291,
-2.2174699306488037,
0.6150366067886353,
-1.2672202587127686,
-1.0791994333267212,
0.640178382396698,
-0.8322338461875916,
0.057520534843206406,
-1.477736473083496,
-0.142808198928833,
-0.9448015093803406,
-1.1718415021896362,
0.6938698887825012,
0.07837960124015808,
0.39415308833122253,
-0.643983781337738,
0.24734778702259064,
-2.1019184589385986,
-1.4030073881149292,
-0.1790391355752945,
-0.893578290939331,
0.5060230493545532,
-0.28007301688194275,
0.7207027077674866,
-0.10247011482715607,
0.023948658257722855,
0.2656104266643524,
1.3926743268966675,
3.322032928466797,
0.14514495432376862,
0.3646186292171478,
-0.19193001091480255,
-0.9116162657737732,
1.4248228073120117,
0.9432073831558228,
-0.10602428019046783,
-0.6220670342445374,
-0.9911013841629028,
1.3511446714401245,
1.9749244451522827,
1.1034495830535889,
0.05881154164671898,
-0.8435155153274536,
-0.684482991695404,
-0.07467979192733765,
0.25515884160995483,
0.5002174973487854,
1.019619107246399,
-0.04825965687632561,
0.08677762746810913,
1.448893427848816,
1.3229314088821411,
-0.4907180666923523,
0.391365647315979,
-0.8348553776741028,
-0.47512170672416687,
0.39655810594558716,
0.3012603521347046,
-0.05264406278729439,
0.448820024728775,
-1.1220309734344482,
-0.32507461309432983,
-0.35834595561027527,
-0.9913572669029236,
-0.6818754076957703,
-0.3995918035507202,
-0.38967806100845337,
1.6717206239700317,
0.12617458403110504,
-0.40748509764671326,
0.025018345564603806,
-0.7951834797859192,
-0.08724173903465271,
-1.0381637811660767,
0.3057396113872528,
-0.10625982284545898,
-0.09205026924610138,
-0.1447923630475998,
1.716718316078186,
-0.8595122694969177,
-2.1478703022003174,
0.26452577114105225,
0.16260558366775513,
-0.4570852220058441,
0.1927744299173355,
1.6768120527267456,
0.5901098251342773,
1.416293740272522,
1.347848892211914,
0.9129360914230347,
-0.5563139915466309,
-1.199118733406067,
0.6856987476348877,
1.0566917657852173,
-1.423460602760315,
0.8500553369522095,
-0.08221007883548737,
-0.5706155896186829,
0.7649648785591125,
1.2871595621109009,
0.42222484946250916,
-2.027575969696045,
0.8800147175788879,
-0.8548034429550171,
0.8142295479774475,
0.6309964656829834,
0.7066895961761475,
0.2423015683889389,
0.8202031850814819,
-1.3542685508728027,
-1.1381360292434692,
-0.7816346883773804,
-0.6334765553474426,
1.9749301671981812,
-0.19217178225517273,
0.5366391539573669,
-0.28190308809280396,
-1.2752532958984375,
-0.15925313532352448,
0.6835708618164062,
0.33546483516693115,
-0.4432513117790222,
0.8102670907974243,
-0.6347452402114868,
-1.2033195495605469,
-1.3221973180770874,
-0.4426765739917755,
-0.9128797650337219,
-0.8340247869491577,
1.0559053421020508,
0.8056427240371704,
0.33636435866355896,
1.9637608528137207,
0.6081492900848389,
0.14104166626930237,
-2.625520706176758,
0.8120164275169373,
0.3832325041294098,
-0.14787693321704865,
0.9926270842552185,
0.2443644255399704,
1.0401273965835571,
0.052458714693784714,
0.5708379149436951,
-2.3595025539398193,
2.247687578201294,
-0.14240524172782898,
0.7738465070724487,
0.030826538801193237,
-0.07350444793701172,
1.1207621097564697,
0.59235018491745,
0.5677510499954224,
-1.1309268474578857,
0.6548648476600647,
-0.593617856502533,
1.2053908109664917,
0.9046022891998291,
-0.7929807901382446,
-0.02599192224442959,
1.3713301420211792,
0.4954529106616974,
-0.45426493883132935,
-0.891213595867157,
-0.9241418242454529,
0.901566743850708,
1.874524712562561,
-0.026089169085025787,
0.07246062159538269,
0.8504430651664734,
0.6607363820075989,
-1.3801748752593994,
0.041751835495233536,
-0.7504537105560303,
-0.7698619961738586,
1.6152310371398926,
2.0780553817749023,
-0.15526250004768372,
-0.168241485953331,
-0.6375933289527893,
-1.3400514125823975,
0.8073834180831909,
-0.06788323074579239,
0.20051999390125275,
0.6885185241699219,
-0.5898710489273071,
1.1779505014419556,
0.8047732710838318,
0.9166064262390137,
0.10811576247215271,
0.3625122308731079,
0.3341428339481354,
-0.3318832516670227,
-1.08796226978302,
-0.22520193457603455,
-1.1171036958694458,
-2.482600212097168,
0.3804953992366791,
-0.21050739288330078,
-1.452248454093933,
0.011417951434850693,
-0.9743086099624634,
0.8709594011306763,
-0.5687865614891052,
-1.0863879919052124,
-1.5188850164413452,
0.22755317389965057,
-0.0504806824028492,
0.9448952674865723,
-1.648914098739624,
-0.07059407234191895,
1.2281020879745483,
0.8159814476966858,
-0.4881948232650757,
0.9432309865951538,
0.3148147463798523,
0.9952141642570496,
0.9047226905822754,
-0.40743502974510193,
0.3972148597240448,
0.09394265711307526,
-1.365460991859436,
0.45200005173683167,
1.241689920425415,
0.1675553321838379,
1.329611897468567,
-0.5688031911849976,
0.011553527787327766,
0.43345069885253906,
-0.5212740302085876,
-0.4501403570175171,
-0.4885190427303314,
0.6191284656524658,
-0.020991027355194092,
-0.9560327529907227,
0.06588143110275269,
-0.11558428406715393,
-0.2468228042125702,
0.216539204120636,
-1.4723191261291504,
-0.19491344690322876,
-0.4283857047557831,
-0.4933265745639801,
-1.284339427947998,
-0.04865145683288574,
1.330999493598938,
-0.8092471957206726,
-0.20084773004055023,
0.4741393029689789,
0.46069851517677307,
0.6149874329566956,
0.7052558064460754,
-0.6734061241149902,
-0.47736188769340515,
-0.2295684665441513,
-0.3984079658985138,
0.18343783915042877,
1.2072975635528564,
-0.222744882106781,
-0.9767913818359375,
0.7270591259002686,
-0.4019874334335327,
0.10283409059047699,
1.9420770406723022,
0.054033901542425156,
-0.7776623964309692,
0.3615894317626953,
-0.6947202086448669,
1.8833202123641968,
1.676192283630371,
1.3135569095611572,
-0.17581258714199066,
-0.8634769320487976,
0.6148801445960999,
-0.2487865388393402,
-0.367228239774704,
0.8309382796287537,
0.435168594121933,
-0.22656981647014618,
-1.4665822982788086,
0.5352073907852173,
1.3414644002914429,
-0.9461830258369446,
-0.735244631767273,
0.08839073777198792,
-0.8761121034622192,
1.1156363487243652,
0.6778927445411682,
0.3817063271999359,
0.2114783525466919,
1.60712730884552,
0.688022255897522,
-0.48128271102905273,
0.46622931957244873,
0.5537786483764648,
-0.15975278615951538,
-2.1279613971710205,
-1.039219617843628,
0.24809964001178741,
-0.40366408228874207,
-1.574829339981079,
1.277310848236084,
-1.133170485496521,
-1.0071651935577393,
0.47050943970680237,
0.08235028386116028,
1.4162209033966064,
0.2939456105232239,
1.6718426942825317,
2.1031527519226074,
0.8960716128349304,
0.3461529612541199,
1.2979601621627808,
-0.032964956015348434,
-0.3724967837333679,
1.8698464632034302,
-0.35319656133651733,
0.5671018362045288,
1.0922646522521973,
-0.33692988753318787,
-1.0977953672409058,
-0.7435131072998047,
-1.1804263591766357,
-0.6427080631256104,
1.2386881113052368,
0.056663092225790024,
-1.1401448249816895,
0.2159380316734314,
1.5497088432312012,
0.2062557488679886,
-0.3357294797897339,
0.5630776286125183,
0.45593076944351196,
-0.6718077063560486,
-0.12120163440704346,
-0.9716745018959045,
0.5085533857345581,
-0.12791553139686584,
-0.3935178816318512,
0.3221118748188019,
0.48591259121894836,
1.1839076280593872,
-0.05121193081140518,
0.10494764149188995,
1.134580373764038,
-1.5018961429595947,
1.4728552103042603,
-0.6924663186073303,
0.26534149050712585,
-2.4514963626861572,
1.518264889717102,
-0.7696329355239868,
1.9457390308380127,
-2.5722782611846924,
0.4498157203197479,
-0.563263475894928,
-0.4577450156211853,
0.3728470802307129,
-0.3052738606929779,
0.14563705027103424,
-0.1263009011745453,
-1.0456676483154297,
-0.09537024796009064,
-0.6828768253326416,
0.5510257482528687,
1.209495186805725,
1.2831722497940063,
-1.1195141077041626,
-0.2775672376155853,
-1.718284249305725,
-0.15985602140426636,
-0.712447464466095,
0.3064424693584442,
-2.0076887607574463,
-0.17518943548202515,
-1.8699637651443481,
-2.3115336894989014,
-1.3946799039840698,
-0.9190652370452881,
1.0779832601547241,
0.17530538141727448,
-0.9154385924339294,
1.1435383558273315,
-0.4581924080848694,
-1.8257641792297363,
1.0648571252822876,
-2.2153782844543457
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | Love this in principle 🚀
Let's keep in mind users might rely on `dataset_infos.json` already.
I'm not convinced by the two-syntax solution, wouldn't it be simpler to have only one syntax with a `default` config for datasets with only one config? ie, always having the `configs` field. This makes parsing the metadata easier IMO.
Might also be good to wrap the tags under a `datasets_info` tag as follows:
```yaml
description: ...
citation: ...
dataset_infos:
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
configs:
- ...
[...]
```
Let's also keep in mind that extracting YAML metadata from a markdown readme is a bit more fastidious for users than just parsing a JSON file. | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 111 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
Love this in principle 🚀
Let's keep in mind users might rely on `dataset_infos.json` already.
I'm not convinced by the two-syntax solution, wouldn't it be simpler to have only one syntax with a `default` config for datasets with only one config? ie, always having the `configs` field. This makes parsing the metadata easier IMO.
Might also be good to wrap the tags under a `datasets_info` tag as follows:
```yaml
description: ...
citation: ...
dataset_infos:
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
configs:
- ...
[...]
```
Let's also keep in mind that extracting YAML metadata from a markdown readme is a bit more fastidious for users than just parsing a JSON file. | [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | > Let's keep in mind users might rely on dataset_infos.json already.
Yea we'll full full backward compatibility
> Let's also keep in mind that extracting YAML metadata from a markdown readme is a bit more fastidious for users than just parsing a JSON file.
The main things that may use or ingest these data IMO are:
- users in the UI or IDE
- `datasets` to populate `DatasetInfo` python object
- moon landing which is already parsing YAML
Am I missing something ? If not I think it's ok to use YAML
> Might also be good to wrap the tags under a datasets_info tag as follows:
Maybe one single syntax like this then ?
```yaml
dataset_infos:
- config: unlabeled
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
and when you have only one config
```yaml
dataset_infos:
- config: default
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
``` | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 195 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
> Let's keep in mind users might rely on dataset_infos.json already.
Yea we'll full full backward compatibility
> Let's also keep in mind that extracting YAML metadata from a markdown readme is a bit more fastidious for users than just parsing a JSON file.
The main things that may use or ingest these data IMO are:
- users in the UI or IDE
- `datasets` to populate `DatasetInfo` python object
- moon landing which is already parsing YAML
Am I missing something ? If not I think it's ok to use YAML
> Might also be good to wrap the tags under a datasets_info tag as follows:
Maybe one single syntax like this then ?
```yaml
dataset_infos:
- config: unlabeled
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
and when you have only one config
```yaml
dataset_infos:
- config: default
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
``` | [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | love the idea, and the trend in general to move more things (like tasks) to a single place (YAML).
also, if you browse files on a dataset's page (in "Files and versions"), raw `README.md` files looks nice and readable, while `.json` files are just one long line that users need to scroll.
> Let's also keep in mind that extracting YAML metadata from a markdown readme is a bit more fastidious for users than just parsing a JSON file.
do users often parse `datasets_infos.json` file themselves? | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 86 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
love the idea, and the trend in general to move more things (like tasks) to a single place (YAML).
also, if you browse files on a dataset's page (in "Files and versions"), raw `README.md` files looks nice and readable, while `.json` files are just one long line that users need to scroll.
> Let's also keep in mind that extracting YAML metadata from a markdown readme is a bit more fastidious for users than just parsing a JSON file.
do users often parse `datasets_infos.json` file themselves? | [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | > do users often parse datasets_infos.json file themselves?
Not AFAIK, but I'm sure there should be a few users.
Users that access these info via the `DatasetInfo` from `datasets` won't see the change though e.g.
```python
>> from datasets import get_datasets_infos
>>> get_datasets_infos("squad")
{'plain_text': DatasetInfo(description='Stanford Question Answering Dataset...
``` | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 49 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
> do users often parse datasets_infos.json file themselves?
Not AFAIK, but I'm sure there should be a few users.
Users that access these info via the `DatasetInfo` from `datasets` won't see the change though e.g.
```python
>> from datasets import get_datasets_infos
>>> get_datasets_infos("squad")
{'plain_text': DatasetInfo(description='Stanford Question Answering Dataset...
``` | [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | > Maybe one single syntax like this then ?
LGTM!
> The main things that may use or ingest these data IMO are:
> - users in the UI or IDE
> - datasets to populate DatasetInfo python object
> - moon landing which is already parsing YAML
Fair point!
Having dataset info in the README's YAML is great for API / `huggingface_hub` consumers as well as it will be inserted in the `cardData` field out of the box 🔥
| Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 80 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
> Maybe one single syntax like this then ?
LGTM!
> The main things that may use or ingest these data IMO are:
> - users in the UI or IDE
> - datasets to populate DatasetInfo python object
> - moon landing which is already parsing YAML
Fair point!
Having dataset info in the README's YAML is great for API / `huggingface_hub` consumers as well as it will be inserted in the `cardData` field out of the box 🔥
| [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | Very supportive of this!
Nesting an array of configs inside `dataset_infos: ` sounds good to me. One small tweak is that `config: default` can be optional for the default config (which can be the first one by convention)
We'll be able to implement metadata validation on the Hub side so we ensure that those metadata are always in the right format (maybe for @coyotte508 ? cc @Pierrci). From a quick glance the `features` might be the harder part to validate here, any doc will be welcome.
### Other high-level points:
- as we move from mostly academic datasets to *all* datasets (which include the data inside the repos), my intuition is that more and more datasets (Hub-stored) are going to be **single-config**
- similarly, less and less datasets will have a loading script, **just the data + some metadata**
- to lower the barrier to entry to contribution, in the long term users shouldn't need to compute/update this data via a command line. It could be filled automatically on the Hub through a "bot" inside Discussions & Pull requests for instance. | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 181 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
Very supportive of this!
Nesting an array of configs inside `dataset_infos: ` sounds good to me. One small tweak is that `config: default` can be optional for the default config (which can be the first one by convention)
We'll be able to implement metadata validation on the Hub side so we ensure that those metadata are always in the right format (maybe for @coyotte508 ? cc @Pierrci). From a quick glance the `features` might be the harder part to validate here, any doc will be welcome.
### Other high-level points:
- as we move from mostly academic datasets to *all* datasets (which include the data inside the repos), my intuition is that more and more datasets (Hub-stored) are going to be **single-config**
- similarly, less and less datasets will have a loading script, **just the data + some metadata**
- to lower the barrier to entry to contribution, in the long term users shouldn't need to compute/update this data via a command line. It could be filled automatically on the Hub through a "bot" inside Discussions & Pull requests for instance. | [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | re: `config: default`
Note also that the default config is not named `default`, afaiu, but create from the repo name, eg: https://huggingface.co/datasets/nbtpj/bionlp2021SAS default config is `nbtpj--bionlp2021SAS` (which is awful) | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 29 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
re: `config: default`
Note also that the default config is not named `default`, afaiu, but create from the repo name, eg: https://huggingface.co/datasets/nbtpj/bionlp2021SAS default config is `nbtpj--bionlp2021SAS` (which is awful) | [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | > Note also that the default config is not named default, afaiu, but create from the repo name, eg: https://huggingface.co/datasets/nbtpj/bionlp2021SAS default config is nbtpj--bionlp2021SAS (which is awful)
We can change this to `default` I think or something else | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 38 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
> Note also that the default config is not named default, afaiu, but create from the repo name, eg: https://huggingface.co/datasets/nbtpj/bionlp2021SAS default config is nbtpj--bionlp2021SAS (which is awful)
We can change this to `default` I think or something else | [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | > From a quick glance the features might be the harder part to validate here, any doc will be welcome.
I dug into features validation, see:
- the OpenAPI spec: https://github.com/huggingface/datasets-server/blob/main/chart/static-files/openapi.json#L460-L697
- the node.js code: https://github.com/huggingface/moon-landing/blob/upgrade-datasets-server-client/server/lib/datasets/FeatureType.ts | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 36 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
> From a quick glance the features might be the harder part to validate here, any doc will be welcome.
I dug into features validation, see:
- the OpenAPI spec: https://github.com/huggingface/datasets-server/blob/main/chart/static-files/openapi.json#L460-L697
- the node.js code: https://github.com/huggingface/moon-landing/blob/upgrade-datasets-server-client/server/lib/datasets/FeatureType.ts | [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | > We can change this to default I think or something else
I created https://github.com/huggingface/datasets/issues/4902 to discuss that | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 18 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
> We can change this to default I think or something else
I created https://github.com/huggingface/datasets/issues/4902 to discuss that | [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | > Note also that the default config is not named `default`, afaiu, but create from the repo name
in case of single-config you can even hide the config name from the UI IMO
> I dug into features validation, see: the OpenAPI spec
in moon-landing we use [Joi](https://joi.dev/api/) to validate metadata so we would need to generate from Joi code from the OpenAPI spec (or from somewhere else) but I guess that's doable – or just rewrite it manually, as it won't change often | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 84 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
> Note also that the default config is not named `default`, afaiu, but create from the repo name
in case of single-config you can even hide the config name from the UI IMO
> I dug into features validation, see: the OpenAPI spec
in moon-landing we use [Joi](https://joi.dev/api/) to validate metadata so we would need to generate from Joi code from the OpenAPI spec (or from somewhere else) but I guess that's doable – or just rewrite it manually, as it won't change often | [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | I remember there was an ongoing discussion on this topic:
- #3507
I recall some of the concerns raised on that discussion:
- @lhoestq: Tensorflow Datasets catalog includes a community catalog where you can find and use HF datasets. They are using the exported dataset_infos.json files from github to get the metadata: [#3507 (comment)](https://github.com/huggingface/datasets/issues/3507#issuecomment-1056997627)
- @severo: [#3507 (comment)](https://github.com/huggingface/datasets/issues/3507#issuecomment-1042779776)
- the metadata header might be very long, before reaching the start of the README/dataset card.
- It also somewhat prevents including large strings like the checksums
- two concepts are mixed in the same file (metadata and documentation). This means that if you're interested only in one of them, you still have to know how to parse the whole file.
- @severo: the future "datasets server" could be in charge of generating the dataset-info.json file: [#3507 (comment)](https://github.com/huggingface/datasets/issues/3507#issuecomment-1033752157) | Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 136 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
I remember there was an ongoing discussion on this topic:
- #3507
I recall some of the concerns raised on that discussion:
- @lhoestq: Tensorflow Datasets catalog includes a community catalog where you can find and use HF datasets. They are using the exported dataset_infos.json files from github to get the metadata: [#3507 (comment)](https://github.com/huggingface/datasets/issues/3507#issuecomment-1056997627)
- @severo: [#3507 (comment)](https://github.com/huggingface/datasets/issues/3507#issuecomment-1042779776)
- the metadata header might be very long, before reaching the start of the README/dataset card.
- It also somewhat prevents including large strings like the checksums
- two concepts are mixed in the same file (metadata and documentation). This means that if you're interested only in one of them, you still have to know how to parse the whole file.
- @severo: the future "datasets server" could be in charge of generating the dataset-info.json file: [#3507 (comment)](https://github.com/huggingface/datasets/issues/3507#issuecomment-1033752157) | [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4876 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md` | Thanks for bringing these points up !
> @lhoestq: Tensorflow Datasets catalog includes a community catalog where you can find and use HF datasets. They are using the exported dataset_infos.json files from github to get the metadata: https://github.com/huggingface/datasets/issues/3507#issuecomment-1056997627
The TFDS implementation is not super advanced, so it's ok IMO as long as we don't break all the dataset scripts. Note that users can still use `to_tf_dataset`.
We had a chance to discuss the two nexts points with @julien-c as well:
> @severo: https://github.com/huggingface/datasets/issues/3507#issuecomment-1042779776
the metadata header might be very long, before reaching the start of the README/dataset card.
If we don't add the checksums we should be fine. We can also set a maximum number of supported configs in the README to keep it readable.
> @severo: the future "datasets server" could be in charge of generating the dataset-info.json file: https://github.com/huggingface/datasets/issues/3507#issuecomment-1033752157
I guess the "HF Hub actions" could open PRs to do the same in the YAML directly
| Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :) | 565 | 158 | Move DatasetInfo from `datasets_infos.json` to the YAML tags in `README.md`
Currently there are two places to find metadata for datasets:
- datasets_infos.json, which contains **per dataset config**
- description
- citation
- license
- splits and sizes
- checksums of the data files
- feature types
- and more
- YAML tags, which contain
- license
- language
- train-eval-index
- and more
It would be nice to have a single place instead. We can rely on the YAML tags more than the JSON file for consistency with models. And it would all be indexed by our back-end directly, which is nice to have.
One way would be to move everything to the YAML tags except the checksums (there can be tens of thousands of them). The description/citation is already in the dataset card so we probably don't need to have them in the YAML card, it would be redundant.
Here is an example for SQuAD
```yaml
download_size: 35142551
dataset_size: 89789763
version: 1.0.0
splits:
- name: train
num_examples: 87599
num_bytes: 79317110
- name: validation
num_examples: 10570
num_bytes: 10472653
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
struct:
- name: text
list:
dtype: string
- name: answer_start
list:
dtype: int32
```
Since there is only one configuration for SQuAD, this structure is ok. For datasets with several configs we can see in a second step, but IMO it would be ok to have these fields per config using another syntax
```yaml
configs:
- config: unlabeled
splits:
- name: train
num_examples: 10000
features:
- name: text
dtype: string
- config: labeled
splits:
- name: train
num_examples: 100
features:
- name: text
dtype: string
- name: label
dtype: ClassLabel
names:
- negative
- positive
```
So in the end you could specify a YAML tag either at the top level (for all configs) or per config in the `configs` field
Alternatively we could keep config specific stuff in the `dataset_infos.json` as it it today
Not sure yet what's the best approach here but cc @julien-c @mariosasko @albertvillanova @polinaeterna for feedback :)
Thanks for bringing these points up !
> @lhoestq: Tensorflow Datasets catalog includes a community catalog where you can find and use HF datasets. They are using the exported dataset_infos.json files from github to get the metadata: https://github.com/huggingface/datasets/issues/3507#issuecomment-1056997627
The TFDS implementation is not super advanced, so it's ok IMO as long as we don't break all the dataset scripts. Note that users can still use `to_tf_dataset`.
We had a chance to discuss the two nexts points with @julien-c as well:
> @severo: https://github.com/huggingface/datasets/issues/3507#issuecomment-1042779776
the metadata header might be very long, before reaching the start of the README/dataset card.
If we don't add the checksums we should be fine. We can also set a maximum number of supported configs in the README to keep it readable.
> @severo: the future "datasets server" could be in charge of generating the dataset-info.json file: https://github.com/huggingface/datasets/issues/3507#issuecomment-1033752157
I guess the "HF Hub actions" could open PRs to do the same in the YAML directly
| [
-1.189358115196228,
-0.9210463166236877,
-0.703642725944519,
1.4209673404693604,
-0.15685121715068817,
-1.2014561891555786,
0.1082346960902214,
-1.0666435956954956,
1.6757789850234985,
-0.6696830987930298,
0.3854382634162903,
-1.7046518325805664,
0.05571235716342926,
-0.6189650297164917,
-0.817453920841217,
-0.6974720358848572,
-0.5359089374542236,
-0.8061225414276123,
0.9901692867279053,
2.457280397415161,
1.2692885398864746,
-1.5545332431793213,
2.609616994857788,
0.6914042830467224,
-0.14093506336212158,
-0.9320110082626343,
0.5150517821311951,
0.017616886645555496,
-1.4045484066009521,
-0.3630686402320862,
-0.866465151309967,
-0.13088150322437286,
-0.6078263521194458,
-0.5560966730117798,
-0.029203668236732483,
0.45226484537124634,
-0.18513286113739014,
-0.44028449058532715,
-0.5223199725151062,
-0.7610121369361877,
0.6109786629676819,
-0.25405457615852356,
0.9489715695381165,
-0.37741509079933167,
1.7912087440490723,
-0.4796176552772522,
0.42740657925605774,
0.7350032329559326,
1.2760339975357056,
0.07617337256669998,
-0.09618383646011353,
0.28514406085014343,
0.38476917147636414,
-0.061115361750125885,
0.5397077202796936,
1.1435054540634155,
0.7724311351776123,
0.49663490056991577,
0.7533071637153625,
-2.175302505493164,
1.3173718452453613,
-0.9093303680419922,
0.3509352505207062,
1.390537142753601,
-1.05038321018219,
0.3574911653995514,
-1.8633350133895874,
-0.03424448519945145,
0.5421610474586487,
-2.0583903789520264,
0.3387354612350464,
-1.1832733154296875,
-0.4668899476528168,
1.1118799448013306,
0.225458025932312,
-1.184001088142395,
0.16677285730838776,
-0.32019585371017456,
1.0232162475585938,
0.36402031779289246,
1.289016604423523,
-1.6920565366744995,
0.102046899497509,
-0.3547280430793762,
0.11739706993103027,
-1.2628788948059082,
-1.5043076276779175,
0.4485512673854828,
0.6007931232452393,
0.5000394582748413,
-0.07474567741155624,
0.8636895418167114,
-1.0043448209762573,
0.83223956823349,
-1.052072286605835,
-1.6354538202285767,
-1.4200546741485596,
-2.2626259326934814,
-2.28023624420166,
0.7090373039245605,
-0.4884558916091919,
-0.44442489743232727,
2.062197208404541,
-1.0573707818984985,
-1.7314358949661255,
1.1656368970870972,
0.3236173987388611,
0.0726451650261879,
2.2149457931518555,
0.21728679537773132,
-0.7203295230865479,
0.5055301189422607,
-0.7994751334190369,
0.6822546720504761,
-0.3010076582431793,
1.2920174598693848,
0.4099138379096985,
-1.0516555309295654,
1.5848133563995361,
-0.5475941896438599,
0.6580945253372192,
-0.6862983107566833,
-0.46476873755455017,
-0.5607160329818726,
0.33604010939598083,
1.8950735330581665,
-0.2769005596637726,
1.401962161064148,
-0.309381902217865,
-1.6011496782302856,
-1.424131989479065,
0.866337776184082,
0.5598730444908142,
-0.8471585512161255,
0.14767032861709595,
-0.33534204959869385,
0.04756408557295799,
-0.09776283800601959,
0.9466010332107544,
1.1999562978744507,
0.7876048684120178,
-0.36329492926597595,
-0.961982011795044,
0.17521272599697113,
0.009939712472259998,
-0.728598952293396,
-1.7522131204605103,
-0.21093393862247467,
0.10498551279306412,
0.7113608121871948,
-1.2192898988723755,
1.7641664743423462,
0.9347482323646545,
1.948810338973999,
0.8809719085693359,
-0.4145572781562805,
1.5249375104904175,
0.031057503074407578,
1.8928217887878418,
-0.420822411775589,
0.6401383876800537,
-0.29208841919898987,
-1.2252675294876099,
0.9164584875106812,
-0.30285435914993286,
-2.1677286624908447,
-0.6263156533241272,
-0.7921304106712341,
-0.19370360672473907,
-0.8286756277084351,
1.074135184288025,
-0.07428902387619019,
-1.3911056518554688,
0.31985512375831604,
-0.7338731288909912,
0.17421068251132965,
-1.1799408197402954,
0.3156622350215912,
0.6834478974342346,
-0.7207946181297302,
0.00046274811029434204,
-0.3588566482067108,
-1.259470820426941,
-0.5674636960029602,
0.33935272693634033,
1.720630407333374,
-0.8352367281913757,
0.8643654584884644,
1.032412052154541,
-0.5682560801506042,
0.02478693053126335,
0.34628310799598694,
-0.33491504192352295,
0.9010224342346191,
-1.1768932342529297,
-0.4908881187438965,
1.0559808015823364,
-0.053987566381692886,
-0.5277143716812134,
1.5217583179473877,
0.6654396653175354,
-1.0340520143508911,
-0.22574275732040405,
-0.10154454410076141,
-0.7849927544593811,
0.022976532578468323,
-1.686293601989746,
0.015610153786838055,
0.2344266176223755,
-1.5520209074020386,
-0.4649653732776642,
-0.1686757653951645,
1.3458462953567505,
-0.14886820316314697,
1.4063057899475098,
-0.3162098526954651,
-0.15838758647441864,
-0.48051929473876953,
-0.23997481167316437,
0.13031232357025146,
-0.13118639588356018,
-0.5427402853965759,
0.249327152967453,
-0.8885748982429504,
0.3038036525249481,
1.4187113046646118,
0.3615166246891022,
0.031307052820920944,
0.4700118601322174,
1.1194075345993042,
0.4195218086242676,
0.03280084207653999,
-0.9519942402839661,
-1.503925085067749,
2.0765371322631836,
-1.6381739377975464,
2.0007545948028564,
0.8369970321655273,
0.09687857329845428,
-1.7749348878860474,
-1.9209831953048706,
1.4535927772521973,
1.1368687152862549,
2.3414387702941895,
0.5824677348136902,
0.42288970947265625,
-0.971525251865387,
-0.5547568202018738,
0.5068860054016113,
-0.9261258244514465,
-0.8672180771827698,
0.18420597910881042,
2.4178435802459717,
1.7481105327606201,
-0.36053916811943054,
-0.21659734845161438,
-0.9000611901283264,
1.4249415397644043,
-0.04120142012834549,
0.0999034121632576,
2.078052282333374,
-0.14724169671535492,
-1.0965596437454224,
1.2887901067733765,
-2.435431718826294,
0.24726861715316772,
1.9575088024139404,
0.33243101835250854,
0.11710241436958313,
-1.3610986471176147,
-0.6772637367248535,
-0.0694725438952446,
-0.4994843304157257,
-1.149895429611206,
0.5732933878898621,
-0.27745169401168823,
-0.7599373459815979,
-1.4381248950958252,
0.29225820302963257,
-1.1687618494033813,
-1.7256169319152832,
0.3526516556739807,
1.7204983234405518,
2.1302990913391113,
-0.8523176312446594,
1.6029115915298462,
-0.42788100242614746,
0.20725186169147491,
1.2830750942230225,
1.2174909114837646,
3.1040937900543213,
1.8849714994430542,
-1.3883928060531616,
0.541394829750061,
-0.1565844714641571,
-0.4756027162075043,
1.036841630935669,
-1.2063348293304443,
1.208635926246643,
-0.3576742112636566,
-1.183457374572754,
-1.134504795074463,
0.9633563756942749,
0.4668715000152588,
0.17579030990600586,
-0.5356688499450684,
1.0885207653045654,
0.11961612105369568,
1.3926844596862793,
0.5793220400810242,
-0.2812938094139099,
0.6138411164283752,
-0.4341287612915039,
-0.4727940261363983,
1.5590678453445435,
0.12685716152191162,
-1.2894515991210938,
-2.368389129638672,
-0.2627757787704468,
-0.8626086711883545,
0.01023628655821085,
-0.6347367167472839,
-0.9711507558822632,
1.6480821371078491,
0.3940408229827881,
-1.4209976196289062,
-0.35481682419776917,
-0.3337888717651367,
-0.5501472353935242,
2.573382616043091,
-1.5575577020645142,
-0.220384880900383,
-1.0206050872802734,
-0.5415651202201843,
1.6632320880889893,
-1.0933794975280762,
-0.4246803820133209,
-1.1112560033798218,
-0.5994527339935303,
-1.220096230506897,
-0.5581408739089966,
-0.027076277881860733,
-0.8226064443588257,
0.8708252906799316,
0.11707665026187897,
-1.2759846448898315,
-0.3509162962436676,
-0.9020268321037292,
0.7571097016334534,
-0.1188526526093483,
0.2431006133556366,
1.7842196226119995,
0.39778172969818115,
-0.33605778217315674,
0.6797670125961304,
1.0913325548171997,
0.6857673525810242,
-0.6876856684684753,
0.23861931264400482,
-0.6598713994026184,
0.34153255820274353,
-1.3165349960327148,
0.3450867831707001,
-2.833979606628418,
0.6426914930343628,
0.08603222668170929,
0.05985449254512787,
-0.13833914697170258,
-1.398179054260254,
1.1149805784225464,
2.6198954582214355,
-1.1500506401062012,
0.4770437180995941,
0.3542540967464447,
1.1044578552246094,
-1.649720549583435,
0.23048515617847443,
-0.4328491985797882,
2.149406909942627,
-0.03839888423681259,
1.282434105873108,
-0.4818500280380249,
-2.398128032684326,
0.6138522028923035,
-1.2786567211151123,
-1.155363917350769,
0.7174135446548462,
-0.7262235283851624,
0.036903444677591324,
-1.3882240056991577,
-0.24031223356723785,
-1.0053584575653076,
-1.2964774370193481,
0.6379197835922241,
0.1233440488576889,
0.4302724003791809,
-0.6717904210090637,
0.3100282549858093,
-2.194439649581909,
-1.355603575706482,
-0.2587672173976898,
-0.8748241662979126,
0.42963021993637085,
-0.3778000473976135,
0.769260823726654,
-0.10935378819704056,
0.021136485040187836,
0.38196244835853577,
1.2043533325195312,
3.40693998336792,
0.21205458045005798,
0.4020533561706543,
-0.28132086992263794,
-0.8910968899726868,
1.474346399307251,
0.8994991779327393,
-0.13195429742336273,
-0.5796557664871216,
-1.0085135698318481,
1.2318451404571533,
1.9905059337615967,
1.0011743307113647,
-0.013693457469344139,
-0.8726646304130554,
-0.7072483897209167,
0.09044688940048218,
0.12284146249294281,
0.5520288944244385,
0.9290998578071594,
0.021657828241586685,
0.007218603976070881,
1.335524559020996,
1.0595275163650513,
-0.2745821177959442,
0.3978024125099182,
-0.7141088247299194,
-0.4718439280986786,
0.573959469795227,
0.3850124776363373,
0.08187215775251389,
0.3265887498855591,
-0.9870427846908569,
-0.26658958196640015,
-0.35146570205688477,
-0.9183524250984192,
-0.7305018305778503,
-0.49808770418167114,
-0.38757413625717163,
1.65312659740448,
0.08251692354679108,
-0.562921941280365,
-0.05913330614566803,
-0.7669233083724976,
-0.05505680292844772,
-1.1205909252166748,
0.32297301292419434,
-0.15640988945960999,
-0.017477435991168022,
-0.20382651686668396,
1.8344358205795288,
-0.9658069014549255,
-2.070547580718994,
0.3150355815887451,
0.30335211753845215,
-0.3770083785057068,
0.15773318707942963,
1.696195363998413,
0.5787259936332703,
1.2895419597625732,
1.2923601865768433,
0.9666355848312378,
-0.7157917022705078,
-1.3957525491714478,
0.6384525299072266,
1.1588771343231201,
-1.5881667137145996,
0.7460014224052429,
0.01717090606689453,
-0.5018296837806702,
0.6570156216621399,
1.4353554248809814,
0.4492979943752289,
-2.0758442878723145,
0.7252982258796692,
-0.9106086492538452,
0.8852065801620483,
0.7044978141784668,
0.6401670575141907,
0.06963229179382324,
0.7311655282974243,
-1.279714822769165,
-0.9768462777137756,
-0.6313695907592773,
-0.6751421093940735,
1.9970623254776,
-0.32637953758239746,
0.5272310972213745,
-0.16623003780841827,
-1.347965955734253,
-0.031108561903238297,
0.708613932132721,
0.28249356150627136,
-0.45990073680877686,
0.712073564529419,
-0.6126715540885925,
-1.1950911283493042,
-1.2486789226531982,
-0.49314841628074646,
-0.8942114114761353,
-0.8884789347648621,
1.1155303716659546,
0.8265141248703003,
0.27183470129966736,
1.8765195608139038,
0.7357560396194458,
0.09015914052724838,
-2.621309995651245,
0.8451453447341919,
0.3521236777305603,
-0.10169526934623718,
0.9410253763198853,
0.264864444732666,
0.9544479846954346,
-0.016555147245526314,
0.6400410532951355,
-2.486433506011963,
2.4024558067321777,
-0.20349207520484924,
0.6469781398773193,
-0.048313871026039124,
-0.280350923538208,
1.1203433275222778,
0.5231788158416748,
0.4939141869544983,
-1.0649373531341553,
0.7164337635040283,
-0.5830433368682861,
1.2271127700805664,
0.768172025680542,
-0.870667576789856,
-0.029025476425886154,
1.113614797592163,
0.3948054909706116,
-0.5231440663337708,
-0.9102237224578857,
-0.9712487459182739,
0.9781439900398254,
1.8684269189834595,
-0.06653832644224167,
0.1712837517261505,
0.7990554571151733,
0.7948192954063416,
-1.299355149269104,
0.01908830925822258,
-0.7629119157791138,
-0.8013027310371399,
1.6508636474609375,
2.039961576461792,
-0.08505403995513916,
-0.11203990876674652,
-0.8238915801048279,
-1.372916340827942,
0.9582467675209045,
-0.020498640835285187,
0.20403972268104553,
0.4943520426750183,
-0.6336373090744019,
1.197812795639038,
0.973750650882721,
0.9210250377655029,
0.07881845533847809,
0.23084090650081635,
0.276020348072052,
-0.3473738729953766,
-1.086976170539856,
-0.23024849593639374,
-1.113425374031067,
-2.4676098823547363,
0.5317872762680054,
-0.09670312702655792,
-1.3000015020370483,
-0.058614011853933334,
-0.934356689453125,
0.8919591307640076,
-0.5062386393547058,
-1.1604021787643433,
-1.447282075881958,
0.28816288709640503,
-0.02003288082778454,
0.9520612955093384,
-1.5701571702957153,
-0.11181597411632538,
1.1902375221252441,
0.9507122039794922,
-0.7504664659500122,
0.8916947245597839,
0.1152852401137352,
0.9930118918418884,
0.8561960458755493,
-0.28624123334884644,
0.43036505579948425,
0.26988744735717773,
-1.3094254732131958,
0.46456027030944824,
1.269111156463623,
0.14175914227962494,
1.5410857200622559,
-0.5474510192871094,
0.07440237700939178,
0.3718855082988739,
-0.4244111478328705,
-0.470582515001297,
-0.6495997905731201,
0.7123614549636841,
0.0857449322938919,
-0.9198950529098511,
0.11101975291967392,
-0.058804951608181,
-0.06693566590547562,
0.1887217015028,
-1.4258911609649658,
-0.19806420803070068,
-0.3850335478782654,
-0.5842097997665405,
-1.2099040746688843,
-0.1597578227519989,
1.393756628036499,
-0.6016295552253723,
-0.16518209874629974,
0.5276029109954834,
0.28565725684165955,
0.5086174607276917,
0.6807160377502441,
-0.6751236319541931,
-0.4591640532016754,
-0.12606211006641388,
-0.31323063373565674,
0.31335702538490295,
1.3220664262771606,
-0.010578347370028496,
-0.9013765454292297,
0.7699534893035889,
-0.36530014872550964,
0.09932402521371841,
2.013230562210083,
0.11710242927074432,
-0.8232412934303284,
0.49972963333129883,
-0.7668468356132507,
1.898474931716919,
1.7239155769348145,
1.320125937461853,
-0.17663124203681946,
-1.064129114151001,
0.6850342750549316,
-0.4182685911655426,
-0.3740180432796478,
1.010430097579956,
0.41108518838882446,
-0.2562151849269867,
-1.4539026021957397,
0.5703328251838684,
1.330941081047058,
-0.8942088484764099,
-0.8264517188072205,
0.20580026507377625,
-0.716124951839447,
1.0033140182495117,
0.6550901532173157,
0.48414307832717896,
0.28949591517448425,
1.5218143463134766,
0.7048898935317993,
-0.42888936400413513,
0.5520533919334412,
0.4333813190460205,
-0.13962283730506897,
-2.052525281906128,
-1.2090697288513184,
0.37620866298675537,
-0.5306365489959717,
-1.511675238609314,
1.3951668739318848,
-1.2767177820205688,
-1.0246702432632446,
0.5461716055870056,
-0.02283700928092003,
1.4113112688064575,
0.3774510622024536,
1.5992687940597534,
2.0176777839660645,
0.8938683867454529,
0.3382863700389862,
1.2354813814163208,
-0.11352340877056122,
-0.38697677850723267,
1.838300347328186,
-0.5468361377716064,
0.5044965744018555,
1.1527029275894165,
-0.3626473844051361,
-1.1291526556015015,
-0.8410753607749939,
-1.1968797445297241,
-0.8264049291610718,
1.1336876153945923,
0.04239562153816223,
-1.1453044414520264,
0.33832472562789917,
1.6336473226547241,
-0.006182963028550148,
-0.2681552767753601,
0.6141624450683594,
0.2771459221839905,
-0.958630383014679,
-0.1434660404920578,
-0.9240444898605347,
0.4480505883693695,
-0.3070521652698517,
-0.34533393383026123,
0.34746062755584717,
0.5149856805801392,
1.3101849555969238,
0.06537764519453049,
0.02996441349387169,
1.1134427785873413,
-1.454271912574768,
1.4054452180862427,
-0.6954025626182556,
0.3244902789592743,
-2.3736050128936768,
1.3924460411071777,
-0.7246600985527039,
1.9910672903060913,
-2.746691942214966,
0.3417189121246338,
-0.5139198899269104,
-0.5027877688407898,
0.26860111951828003,
-0.19690506160259247,
0.2034728229045868,
-0.12562857568264008,
-1.0140407085418701,
-0.11994419246912003,
-0.7478339672088623,
0.609927237033844,
1.183896541595459,
1.3059959411621094,
-1.063536524772644,
-0.28585579991340637,
-1.6821670532226562,
-0.3074992001056671,
-0.6633475422859192,
0.24794742465019226,
-1.9028735160827637,
-0.15774862468242645,
-1.9967870712280273,
-2.3010804653167725,
-1.339190125465393,
-0.9950383901596069,
1.1805013418197632,
0.2486838400363922,
-0.8924150466918945,
0.9905243515968323,
-0.44456779956817627,
-1.7700293064117432,
1.1496647596359253,
-2.0775146484375
] |
https://github.com/huggingface/datasets/issues/4875 | `_resolve_features` ignores the token | Hi ! Your HF_ENDPOINT seems wrong because of the extra "/"
```diff
- os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
+ os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co"
```
can you try again without the extra "/" ? | ## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2 | 566 | 30 | `_resolve_features` ignores the token
## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
Hi ! Your HF_ENDPOINT seems wrong because of the extra "/"
```diff
- os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
+ os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co"
```
can you try again without the extra "/" ? | [
-1.2811189889907837,
-0.9154444336891174,
-0.5744412541389465,
1.488728404045105,
-0.10419037193059921,
-1.2110341787338257,
0.26843857765197754,
-1.0324623584747314,
1.5456613302230835,
-0.8060516715049744,
0.25108540058135986,
-1.6083890199661255,
-0.026339909061789513,
-0.555762767791748,
-0.6320050358772278,
-0.9028801321983337,
-0.3497809171676636,
-0.7405957579612732,
1.1537467241287231,
2.406712770462036,
1.2791156768798828,
-1.3064976930618286,
2.7085587978363037,
0.6326770186424255,
-0.168434739112854,
-0.9860284328460693,
0.5123348832130432,
0.046871162950992584,
-1.2477535009384155,
-0.4707554578781128,
-0.8496996760368347,
-0.05046423524618149,
-0.6229242086410522,
-0.33668896555900574,
-0.0307941734790802,
0.5619955658912659,
-0.3399147391319275,
-0.3076609671115875,
-0.6177271604537964,
-0.7792229652404785,
0.5064303874969482,
-0.305820107460022,
0.8935908079147339,
-0.3367452919483185,
1.8770525455474854,
-0.5650131702423096,
0.5177491307258606,
0.7205970287322998,
1.1655725240707397,
0.1382633000612259,
0.02458241395652294,
0.19803710281848907,
0.28086328506469727,
0.004842427559196949,
0.5536724328994751,
1.1592768430709839,
0.6183038949966431,
0.5418691635131836,
0.5962592959403992,
-2.221187114715576,
1.3556934595108032,
-0.9090203642845154,
0.23115026950836182,
1.4469022750854492,
-0.9185292720794678,
0.339862585067749,
-1.7431433200836182,
-0.04993116855621338,
0.6232235431671143,
-2.2442939281463623,
0.3389592468738556,
-1.4486972093582153,
-0.5455631017684937,
0.9620541930198669,
0.3662624657154083,
-1.0938012599945068,
0.15145623683929443,
-0.5284515023231506,
1.223029375076294,
0.49513912200927734,
1.0197322368621826,
-1.7404959201812744,
-0.07561776041984558,
-0.18581166863441467,
0.15150131285190582,
-1.393602967262268,
-1.6853320598602295,
0.5868528485298157,
0.5569989085197449,
0.6577640771865845,
-0.07383648306131363,
1.1062809228897095,
-1.1462128162384033,
0.7733158469200134,
-1.142747402191162,
-1.499385118484497,
-1.415552020072937,
-2.424152374267578,
-2.342365026473999,
0.6780292987823486,
-0.47596871852874756,
-0.5220028162002563,
2.0116260051727295,
-1.0773943662643433,
-1.5961596965789795,
1.0546495914459229,
0.13995836675167084,
0.10141383111476898,
2.3959596157073975,
0.2255484014749527,
-0.7783055901527405,
0.4392549693584442,
-0.830997109413147,
0.7710089087486267,
-0.21307864785194397,
1.2486989498138428,
0.4910184144973755,
-1.1071133613586426,
1.486111044883728,
-0.3575490117073059,
0.6857352256774902,
-0.5706148743629456,
-0.6417393088340759,
-0.7086409330368042,
0.1060653030872345,
1.912868618965149,
-0.2030092477798462,
1.6091383695602417,
-0.2755921185016632,
-1.565077304840088,
-1.5873842239379883,
0.9737069606781006,
0.397821843624115,
-0.8814854621887207,
0.06282181292772293,
-0.5486565828323364,
0.18866845965385437,
-0.14408668875694275,
1.2026845216751099,
1.3012182712554932,
0.6545933485031128,
-0.4398134648799896,
-0.6946622133255005,
0.09902944415807724,
-0.10314767807722092,
-0.6320551037788391,
-1.7644224166870117,
-0.2536284625530243,
0.12082882225513458,
0.7193565964698792,
-1.1257041692733765,
1.8312889337539673,
0.8688491582870483,
1.8646754026412964,
0.9957760572433472,
-0.37088721990585327,
1.405269742012024,
0.03804559260606766,
1.7484192848205566,
-0.5747922658920288,
0.5389139652252197,
-0.3305024206638336,
-1.1225104331970215,
0.8834593892097473,
-0.22790643572807312,
-1.9696073532104492,
-0.8096218109130859,
-0.5613906383514404,
-0.19252289831638336,
-0.7398486137390137,
0.8975930213928223,
-0.29818102717399597,
-1.5082721710205078,
0.14373134076595306,
-0.6509538888931274,
0.3102780878543854,
-1.1272989511489868,
0.2548208236694336,
0.757098376750946,
-0.7012099027633667,
0.03819018602371216,
-0.1861301064491272,
-1.1699224710464478,
-0.44455277919769287,
0.4731672406196594,
1.8352400064468384,
-0.5078028440475464,
0.8521568179130554,
1.0694823265075684,
-0.6758366227149963,
0.05837269872426987,
0.09304480999708176,
-0.20255714654922485,
0.7486749887466431,
-1.0640723705291748,
-0.46239277720451355,
1.2464762926101685,
-0.40427321195602417,
-0.7104566097259521,
1.5520997047424316,
0.6736465096473694,
-1.1005812883377075,
-0.2568867802619934,
-0.16801513731479645,
-0.9357462525367737,
0.049117207527160645,
-1.4885250329971313,
-0.06074393540620804,
0.5112794041633606,
-1.5811445713043213,
-0.3486453592777252,
-0.1423855423927307,
1.3818562030792236,
-0.25665411353111267,
1.4093611240386963,
-0.3019463121891022,
-0.15810635685920715,
-0.24965813755989075,
-0.45888128876686096,
0.13202784955501556,
-0.1630139797925949,
-0.5213655829429626,
0.04318476468324661,
-0.8595004081726074,
0.29672783613204956,
1.4979411363601685,
0.27226370573043823,
-0.013231479562819004,
0.3369174301624298,
1.183330774307251,
0.38854536414146423,
-0.1542137861251831,
-0.8270607590675354,
-1.53622567653656,
1.8522788286209106,
-1.4262168407440186,
1.992274284362793,
0.7973231673240662,
-0.13910700380802155,
-1.815227746963501,
-1.7880533933639526,
1.1872258186340332,
1.1280622482299805,
2.338264226913452,
0.38530486822128296,
0.34806692600250244,
-0.8191310167312622,
-0.7465835213661194,
0.4197569191455841,
-0.9105650782585144,
-0.5945742726325989,
0.23894533514976501,
2.279972553253174,
1.79160737991333,
-0.4054242968559265,
-0.2330368608236313,
-0.9094581604003906,
1.3785011768341064,
-0.2118488848209381,
0.319115549325943,
2.02833890914917,
-0.2514666020870209,
-0.9874468445777893,
1.3781142234802246,
-2.372356653213501,
0.2715269923210144,
2.115609884262085,
0.27991974353790283,
0.14674343168735504,
-1.3290760517120361,
-0.5702651739120483,
-0.46813511848449707,
-0.3977055251598358,
-1.308374047279358,
0.44831526279449463,
-0.3100520670413971,
-0.6853949427604675,
-1.388617992401123,
0.18733718991279602,
-1.1507319211959839,
-1.6648482084274292,
0.34488242864608765,
1.9727696180343628,
2.0702097415924072,
-0.733058750629425,
1.409254789352417,
-0.38965460658073425,
0.07723270356655121,
1.2303597927093506,
1.4061648845672607,
3.067584276199341,
1.8348015546798706,
-1.278938889503479,
0.719096302986145,
-0.24947413802146912,
-0.5081622004508972,
1.13359797000885,
-1.1790050268173218,
1.2973190546035767,
-0.18617530167102814,
-1.2222102880477905,
-1.337043046951294,
1.0692437887191772,
0.557348906993866,
0.10401435196399689,
-0.5409644246101379,
1.2970528602600098,
0.11402087658643723,
1.4095324277877808,
0.6383390426635742,
-0.4748493731021881,
0.5367153882980347,
-0.47978731989860535,
-0.6712154746055603,
1.5392568111419678,
0.16502447426319122,
-1.5516549348831177,
-2.255490779876709,
-0.31773513555526733,
-0.8486179113388062,
0.09072785824537277,
-0.68332839012146,
-1.0820866823196411,
1.6455891132354736,
0.32926079630851746,
-1.294232726097107,
-0.2806415557861328,
-0.3114483654499054,
-0.4980398118495941,
2.765923261642456,
-1.1692159175872803,
-0.046630412340164185,
-0.9923310279846191,
-0.7473304271697998,
1.6875146627426147,
-1.3012032508850098,
-0.34212061762809753,
-1.0295326709747314,
-0.6291936039924622,
-1.2276345491409302,
-0.3823487460613251,
0.05020663142204285,
-0.9904007911682129,
0.7866542339324951,
0.12405979633331299,
-1.2279542684555054,
-0.35567179322242737,
-0.8794820308685303,
1.091326355934143,
-0.18958507478237152,
0.12940987944602966,
1.703171968460083,
0.16269008815288544,
-0.4433216154575348,
0.8051002025604248,
1.1937263011932373,
0.667251467704773,
-0.7487751245498657,
-0.046222008764743805,
-0.6617705821990967,
0.3956814110279083,
-1.2970225811004639,
0.2714855670928955,
-2.971771001815796,
0.6489323377609253,
-0.11298967897891998,
-0.12201440334320068,
-0.02410311996936798,
-1.4128079414367676,
1.0700201988220215,
2.551903247833252,
-1.2748562097549438,
0.4951552748680115,
0.4831680357456207,
1.0404932498931885,
-1.6297708749771118,
0.4060916304588318,
-0.5336971282958984,
1.9478133916854858,
0.28458142280578613,
1.3181002140045166,
-0.4523216485977173,
-2.312519073486328,
0.5594401359558105,
-1.1558125019073486,
-1.1594769954681396,
0.9507426023483276,
-1.0070679187774658,
0.2650834023952484,
-1.4319151639938354,
-0.30814337730407715,
-0.964778482913971,
-1.3214868307113647,
0.6076076030731201,
0.18155845999717712,
0.39625251293182373,
-0.5797735452651978,
0.32579877972602844,
-2.3299336433410645,
-1.329350471496582,
-0.21274493634700775,
-1.0049262046813965,
0.5931419134140015,
-0.5706595778465271,
0.5288438200950623,
-0.0504913255572319,
0.1275321990251541,
0.38580191135406494,
1.5781705379486084,
3.441234827041626,
0.22730964422225952,
0.17399494349956512,
-0.23070645332336426,
-0.9081097841262817,
1.5203267335891724,
0.9034872055053711,
-0.01654765009880066,
-0.5259848237037659,
-0.9447135329246521,
1.2032729387283325,
1.9575284719467163,
1.0233434438705444,
-0.058732204139232635,
-0.8906853795051575,
-0.705665647983551,
-0.09022130817174911,
0.1308785229921341,
0.5561995506286621,
0.9212196469306946,
0.08365355432033539,
0.13708308339118958,
1.3288108110427856,
1.0478477478027344,
-0.29290276765823364,
0.290215402841568,
-0.8781681060791016,
-0.4401888847351074,
0.49402064085006714,
0.18219268321990967,
-0.0640663132071495,
0.5362765789031982,
-1.0080558061599731,
-0.18475939333438873,
-0.4861931800842285,
-0.8256999254226685,
-0.7226371765136719,
-0.4540771543979645,
-0.4328865706920624,
1.5854285955429077,
0.06378801167011261,
-0.5376126170158386,
0.049162134528160095,
-0.660200297832489,
-0.30768677592277527,
-1.1918127536773682,
0.2707212567329407,
-0.03233823552727699,
-0.10979458689689636,
-0.21436724066734314,
1.6407124996185303,
-0.9532532691955566,
-2.115817070007324,
0.15945379436016083,
0.25585439801216125,
-0.18251147866249084,
0.125924214720726,
1.7798203229904175,
0.3668127954006195,
1.388346552848816,
1.2321362495422363,
0.9628633260726929,
-0.6412076354026794,
-1.3654695749282837,
0.7644949555397034,
0.9355019330978394,
-1.354245662689209,
0.9163027405738831,
-0.252632737159729,
-0.5359951853752136,
0.7091149687767029,
1.2054699659347534,
0.5777831077575684,
-1.9294534921646118,
0.8523157238960266,
-1.150656819343567,
0.751349151134491,
0.8253783583641052,
0.6800446510314941,
0.23345120251178741,
1.0013583898544312,
-1.0867758989334106,
-1.0983774662017822,
-0.5853436589241028,
-0.7207103371620178,
1.9024795293807983,
-0.4896284341812134,
0.6555034518241882,
-0.17083004117012024,
-1.1728931665420532,
-0.01132815983146429,
0.9054083824157715,
0.4108707904815674,
-0.46321138739585876,
0.8789717555046082,
-0.643278956413269,
-0.8552001118659973,
-1.1287095546722412,
-0.33324503898620605,
-1.1201143264770508,
-0.9660713076591492,
1.0477796792984009,
0.6526115536689758,
0.35336750745773315,
1.8254787921905518,
0.6848747730255127,
0.421623557806015,
-2.584805965423584,
0.8359211087226868,
0.23169995844364166,
-0.042299240827560425,
0.9605234861373901,
0.3337690234184265,
1.1240406036376953,
0.11575904488563538,
0.5522099137306213,
-2.506910800933838,
2.3530771732330322,
-0.23423509299755096,
0.5962400436401367,
-0.11206632852554321,
-0.2698577046394348,
1.1626510620117188,
0.6607275605201721,
0.40775880217552185,
-1.0423601865768433,
0.8535908460617065,
-0.41520220041275024,
1.0481129884719849,
0.8085217475891113,
-0.867755115032196,
0.053498610854148865,
1.4858157634735107,
0.4362275004386902,
-0.5956971049308777,
-0.9501729011535645,
-0.9351952075958252,
0.8443913459777832,
1.6203064918518066,
0.009984783828258514,
-0.07652774453163147,
0.7762209177017212,
0.6652467846870422,
-1.1438003778457642,
0.14312370121479034,
-0.502819299697876,
-0.7479490041732788,
1.6356645822525024,
2.0923502445220947,
-0.12193822115659714,
-0.04499896615743637,
-0.6737823486328125,
-1.173801064491272,
0.6822634935379028,
-0.058326661586761475,
0.018819628283381462,
0.5288559794425964,
-0.6481419801712036,
0.9663414359092712,
0.6943754553794861,
1.0091118812561035,
0.07445620000362396,
0.19603672623634338,
0.5265794992446899,
-0.31529662013053894,
-1.257506251335144,
-0.3657035529613495,
-1.1319279670715332,
-2.55755877494812,
0.3442668914794922,
-0.263712614774704,
-1.472205400466919,
0.06380505859851837,
-1.069490909576416,
0.9696755409240723,
-0.6028579473495483,
-1.117204189300537,
-1.5885347127914429,
0.23325906693935394,
-0.05789390951395035,
0.9821642637252808,
-1.6336643695831299,
-0.3448406755924225,
1.1179847717285156,
0.8050861358642578,
-0.6414539813995361,
1.0211362838745117,
0.1893475502729416,
0.924711287021637,
0.6901974081993103,
-0.39046669006347656,
0.6532230377197266,
0.14533182978630066,
-1.4381024837493896,
0.4994475245475769,
1.2452539205551147,
0.1803622990846634,
1.54360032081604,
-0.3806591033935547,
0.02516140602529049,
0.42122891545295715,
-0.7208982706069946,
-0.5153977274894714,
-0.3741128444671631,
0.6999945044517517,
0.06310389935970306,
-0.9129735231399536,
-0.1133042573928833,
-0.242158442735672,
-0.3526640832424164,
0.13142144680023193,
-1.511009931564331,
-0.2635515332221985,
-0.5231833457946777,
-0.5488781929016113,
-1.3116517066955566,
0.001627444289624691,
1.4669872522354126,
-0.7188980579376221,
-0.24155063927173615,
0.45156893134117126,
0.5169481635093689,
0.5486927032470703,
0.6161031723022461,
-0.8550217151641846,
-0.06247195601463318,
-0.31658878922462463,
-0.22770217061042786,
0.3526141941547394,
1.3191485404968262,
-0.08478742092847824,
-0.9561516046524048,
0.6575634479522705,
-0.3338296115398407,
0.13944584131240845,
2.039522647857666,
0.10844156891107559,
-0.6355759501457214,
0.3623899221420288,
-0.7672353982925415,
1.843578577041626,
1.7177529335021973,
1.4434728622436523,
-0.18874700367450714,
-0.8563926815986633,
0.606346607208252,
-0.3764989972114563,
-0.40385276079177856,
0.9101014137268066,
0.3964632451534271,
-0.3190280497074127,
-1.422922134399414,
0.8464547991752625,
1.1422268152236938,
-0.8196856379508972,
-0.722076416015625,
0.2544756233692169,
-0.777482807636261,
1.2541478872299194,
0.40408945083618164,
0.31232696771621704,
0.34869492053985596,
1.5870678424835205,
0.7085614800453186,
-0.4048413336277008,
0.521119236946106,
0.5477879047393799,
-0.26803210377693176,
-2.087742567062378,
-1.1837290525436401,
0.5057107210159302,
-0.5959543585777283,
-1.528529167175293,
1.4475497007369995,
-1.1227655410766602,
-1.146882176399231,
0.5627594590187073,
-0.026335151866078377,
1.3011503219604492,
0.4670540690422058,
1.650006651878357,
2.10497784614563,
0.8618612885475159,
0.5181383490562439,
1.2209770679473877,
-0.18733765184879303,
-0.4865553677082062,
1.7748398780822754,
-0.44734928011894226,
0.5112898349761963,
1.14064621925354,
-0.37297341227531433,
-1.0743454694747925,
-0.7471604347229004,
-1.1835441589355469,
-0.5934773087501526,
1.123147964477539,
0.03517169505357742,
-1.0439367294311523,
0.25220224261283875,
1.5328495502471924,
0.1399877369403839,
-0.16959509253501892,
0.7072939872741699,
0.3150472640991211,
-0.7966283559799194,
-0.08228100836277008,
-0.9380287528038025,
0.5301992893218994,
-0.3279317021369934,
-0.38084378838539124,
0.23424695432186127,
0.5679695010185242,
1.3520729541778564,
-0.10433214902877808,
0.18322674930095673,
1.1246975660324097,
-1.424279808998108,
1.416353464126587,
-0.6224831342697144,
0.25287219882011414,
-2.3666186332702637,
1.3582805395126343,
-0.6010262370109558,
2.055675745010376,
-2.5786499977111816,
0.4175315201282501,
-0.5859166979789734,
-0.6157234907150269,
0.3062257766723633,
-0.3284958302974701,
0.13078534603118896,
-0.12133973091840744,
-1.0297214984893799,
0.03267339617013931,
-0.7402986884117126,
0.7021341919898987,
1.1017546653747559,
1.4372756481170654,
-1.1730457544326782,
-0.22827816009521484,
-1.592077374458313,
-0.17128513753414154,
-0.8602592349052429,
0.23542557656764984,
-1.9622896909713745,
-0.2073361575603485,
-2.0041842460632324,
-2.4888384342193604,
-1.2120864391326904,
-0.7271098494529724,
1.0606849193572998,
0.24967335164546967,
-0.8999041318893433,
1.3447571992874146,
-0.3274788558483124,
-1.8164349794387817,
1.1168322563171387,
-2.0404105186462402
] |
https://github.com/huggingface/datasets/issues/4875 | `_resolve_features` ignores the token | Oh, yes, sorry, but it's not the issue.
In my code, I set `HF_ENDPOINT=https://hub-ci.huggingface.co`. I added `os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"` afterward just to indicate that we had to have this env var and made a mistake there | ## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2 | 566 | 36 | `_resolve_features` ignores the token
## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
Oh, yes, sorry, but it's not the issue.
In my code, I set `HF_ENDPOINT=https://hub-ci.huggingface.co`. I added `os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"` afterward just to indicate that we had to have this env var and made a mistake there | [
-1.2811189889907837,
-0.9154444336891174,
-0.5744412541389465,
1.488728404045105,
-0.10419037193059921,
-1.2110341787338257,
0.26843857765197754,
-1.0324623584747314,
1.5456613302230835,
-0.8060516715049744,
0.25108540058135986,
-1.6083890199661255,
-0.026339909061789513,
-0.555762767791748,
-0.6320050358772278,
-0.9028801321983337,
-0.3497809171676636,
-0.7405957579612732,
1.1537467241287231,
2.406712770462036,
1.2791156768798828,
-1.3064976930618286,
2.7085587978363037,
0.6326770186424255,
-0.168434739112854,
-0.9860284328460693,
0.5123348832130432,
0.046871162950992584,
-1.2477535009384155,
-0.4707554578781128,
-0.8496996760368347,
-0.05046423524618149,
-0.6229242086410522,
-0.33668896555900574,
-0.0307941734790802,
0.5619955658912659,
-0.3399147391319275,
-0.3076609671115875,
-0.6177271604537964,
-0.7792229652404785,
0.5064303874969482,
-0.305820107460022,
0.8935908079147339,
-0.3367452919483185,
1.8770525455474854,
-0.5650131702423096,
0.5177491307258606,
0.7205970287322998,
1.1655725240707397,
0.1382633000612259,
0.02458241395652294,
0.19803710281848907,
0.28086328506469727,
0.004842427559196949,
0.5536724328994751,
1.1592768430709839,
0.6183038949966431,
0.5418691635131836,
0.5962592959403992,
-2.221187114715576,
1.3556934595108032,
-0.9090203642845154,
0.23115026950836182,
1.4469022750854492,
-0.9185292720794678,
0.339862585067749,
-1.7431433200836182,
-0.04993116855621338,
0.6232235431671143,
-2.2442939281463623,
0.3389592468738556,
-1.4486972093582153,
-0.5455631017684937,
0.9620541930198669,
0.3662624657154083,
-1.0938012599945068,
0.15145623683929443,
-0.5284515023231506,
1.223029375076294,
0.49513912200927734,
1.0197322368621826,
-1.7404959201812744,
-0.07561776041984558,
-0.18581166863441467,
0.15150131285190582,
-1.393602967262268,
-1.6853320598602295,
0.5868528485298157,
0.5569989085197449,
0.6577640771865845,
-0.07383648306131363,
1.1062809228897095,
-1.1462128162384033,
0.7733158469200134,
-1.142747402191162,
-1.499385118484497,
-1.415552020072937,
-2.424152374267578,
-2.342365026473999,
0.6780292987823486,
-0.47596871852874756,
-0.5220028162002563,
2.0116260051727295,
-1.0773943662643433,
-1.5961596965789795,
1.0546495914459229,
0.13995836675167084,
0.10141383111476898,
2.3959596157073975,
0.2255484014749527,
-0.7783055901527405,
0.4392549693584442,
-0.830997109413147,
0.7710089087486267,
-0.21307864785194397,
1.2486989498138428,
0.4910184144973755,
-1.1071133613586426,
1.486111044883728,
-0.3575490117073059,
0.6857352256774902,
-0.5706148743629456,
-0.6417393088340759,
-0.7086409330368042,
0.1060653030872345,
1.912868618965149,
-0.2030092477798462,
1.6091383695602417,
-0.2755921185016632,
-1.565077304840088,
-1.5873842239379883,
0.9737069606781006,
0.397821843624115,
-0.8814854621887207,
0.06282181292772293,
-0.5486565828323364,
0.18866845965385437,
-0.14408668875694275,
1.2026845216751099,
1.3012182712554932,
0.6545933485031128,
-0.4398134648799896,
-0.6946622133255005,
0.09902944415807724,
-0.10314767807722092,
-0.6320551037788391,
-1.7644224166870117,
-0.2536284625530243,
0.12082882225513458,
0.7193565964698792,
-1.1257041692733765,
1.8312889337539673,
0.8688491582870483,
1.8646754026412964,
0.9957760572433472,
-0.37088721990585327,
1.405269742012024,
0.03804559260606766,
1.7484192848205566,
-0.5747922658920288,
0.5389139652252197,
-0.3305024206638336,
-1.1225104331970215,
0.8834593892097473,
-0.22790643572807312,
-1.9696073532104492,
-0.8096218109130859,
-0.5613906383514404,
-0.19252289831638336,
-0.7398486137390137,
0.8975930213928223,
-0.29818102717399597,
-1.5082721710205078,
0.14373134076595306,
-0.6509538888931274,
0.3102780878543854,
-1.1272989511489868,
0.2548208236694336,
0.757098376750946,
-0.7012099027633667,
0.03819018602371216,
-0.1861301064491272,
-1.1699224710464478,
-0.44455277919769287,
0.4731672406196594,
1.8352400064468384,
-0.5078028440475464,
0.8521568179130554,
1.0694823265075684,
-0.6758366227149963,
0.05837269872426987,
0.09304480999708176,
-0.20255714654922485,
0.7486749887466431,
-1.0640723705291748,
-0.46239277720451355,
1.2464762926101685,
-0.40427321195602417,
-0.7104566097259521,
1.5520997047424316,
0.6736465096473694,
-1.1005812883377075,
-0.2568867802619934,
-0.16801513731479645,
-0.9357462525367737,
0.049117207527160645,
-1.4885250329971313,
-0.06074393540620804,
0.5112794041633606,
-1.5811445713043213,
-0.3486453592777252,
-0.1423855423927307,
1.3818562030792236,
-0.25665411353111267,
1.4093611240386963,
-0.3019463121891022,
-0.15810635685920715,
-0.24965813755989075,
-0.45888128876686096,
0.13202784955501556,
-0.1630139797925949,
-0.5213655829429626,
0.04318476468324661,
-0.8595004081726074,
0.29672783613204956,
1.4979411363601685,
0.27226370573043823,
-0.013231479562819004,
0.3369174301624298,
1.183330774307251,
0.38854536414146423,
-0.1542137861251831,
-0.8270607590675354,
-1.53622567653656,
1.8522788286209106,
-1.4262168407440186,
1.992274284362793,
0.7973231673240662,
-0.13910700380802155,
-1.815227746963501,
-1.7880533933639526,
1.1872258186340332,
1.1280622482299805,
2.338264226913452,
0.38530486822128296,
0.34806692600250244,
-0.8191310167312622,
-0.7465835213661194,
0.4197569191455841,
-0.9105650782585144,
-0.5945742726325989,
0.23894533514976501,
2.279972553253174,
1.79160737991333,
-0.4054242968559265,
-0.2330368608236313,
-0.9094581604003906,
1.3785011768341064,
-0.2118488848209381,
0.319115549325943,
2.02833890914917,
-0.2514666020870209,
-0.9874468445777893,
1.3781142234802246,
-2.372356653213501,
0.2715269923210144,
2.115609884262085,
0.27991974353790283,
0.14674343168735504,
-1.3290760517120361,
-0.5702651739120483,
-0.46813511848449707,
-0.3977055251598358,
-1.308374047279358,
0.44831526279449463,
-0.3100520670413971,
-0.6853949427604675,
-1.388617992401123,
0.18733718991279602,
-1.1507319211959839,
-1.6648482084274292,
0.34488242864608765,
1.9727696180343628,
2.0702097415924072,
-0.733058750629425,
1.409254789352417,
-0.38965460658073425,
0.07723270356655121,
1.2303597927093506,
1.4061648845672607,
3.067584276199341,
1.8348015546798706,
-1.278938889503479,
0.719096302986145,
-0.24947413802146912,
-0.5081622004508972,
1.13359797000885,
-1.1790050268173218,
1.2973190546035767,
-0.18617530167102814,
-1.2222102880477905,
-1.337043046951294,
1.0692437887191772,
0.557348906993866,
0.10401435196399689,
-0.5409644246101379,
1.2970528602600098,
0.11402087658643723,
1.4095324277877808,
0.6383390426635742,
-0.4748493731021881,
0.5367153882980347,
-0.47978731989860535,
-0.6712154746055603,
1.5392568111419678,
0.16502447426319122,
-1.5516549348831177,
-2.255490779876709,
-0.31773513555526733,
-0.8486179113388062,
0.09072785824537277,
-0.68332839012146,
-1.0820866823196411,
1.6455891132354736,
0.32926079630851746,
-1.294232726097107,
-0.2806415557861328,
-0.3114483654499054,
-0.4980398118495941,
2.765923261642456,
-1.1692159175872803,
-0.046630412340164185,
-0.9923310279846191,
-0.7473304271697998,
1.6875146627426147,
-1.3012032508850098,
-0.34212061762809753,
-1.0295326709747314,
-0.6291936039924622,
-1.2276345491409302,
-0.3823487460613251,
0.05020663142204285,
-0.9904007911682129,
0.7866542339324951,
0.12405979633331299,
-1.2279542684555054,
-0.35567179322242737,
-0.8794820308685303,
1.091326355934143,
-0.18958507478237152,
0.12940987944602966,
1.703171968460083,
0.16269008815288544,
-0.4433216154575348,
0.8051002025604248,
1.1937263011932373,
0.667251467704773,
-0.7487751245498657,
-0.046222008764743805,
-0.6617705821990967,
0.3956814110279083,
-1.2970225811004639,
0.2714855670928955,
-2.971771001815796,
0.6489323377609253,
-0.11298967897891998,
-0.12201440334320068,
-0.02410311996936798,
-1.4128079414367676,
1.0700201988220215,
2.551903247833252,
-1.2748562097549438,
0.4951552748680115,
0.4831680357456207,
1.0404932498931885,
-1.6297708749771118,
0.4060916304588318,
-0.5336971282958984,
1.9478133916854858,
0.28458142280578613,
1.3181002140045166,
-0.4523216485977173,
-2.312519073486328,
0.5594401359558105,
-1.1558125019073486,
-1.1594769954681396,
0.9507426023483276,
-1.0070679187774658,
0.2650834023952484,
-1.4319151639938354,
-0.30814337730407715,
-0.964778482913971,
-1.3214868307113647,
0.6076076030731201,
0.18155845999717712,
0.39625251293182373,
-0.5797735452651978,
0.32579877972602844,
-2.3299336433410645,
-1.329350471496582,
-0.21274493634700775,
-1.0049262046813965,
0.5931419134140015,
-0.5706595778465271,
0.5288438200950623,
-0.0504913255572319,
0.1275321990251541,
0.38580191135406494,
1.5781705379486084,
3.441234827041626,
0.22730964422225952,
0.17399494349956512,
-0.23070645332336426,
-0.9081097841262817,
1.5203267335891724,
0.9034872055053711,
-0.01654765009880066,
-0.5259848237037659,
-0.9447135329246521,
1.2032729387283325,
1.9575284719467163,
1.0233434438705444,
-0.058732204139232635,
-0.8906853795051575,
-0.705665647983551,
-0.09022130817174911,
0.1308785229921341,
0.5561995506286621,
0.9212196469306946,
0.08365355432033539,
0.13708308339118958,
1.3288108110427856,
1.0478477478027344,
-0.29290276765823364,
0.290215402841568,
-0.8781681060791016,
-0.4401888847351074,
0.49402064085006714,
0.18219268321990967,
-0.0640663132071495,
0.5362765789031982,
-1.0080558061599731,
-0.18475939333438873,
-0.4861931800842285,
-0.8256999254226685,
-0.7226371765136719,
-0.4540771543979645,
-0.4328865706920624,
1.5854285955429077,
0.06378801167011261,
-0.5376126170158386,
0.049162134528160095,
-0.660200297832489,
-0.30768677592277527,
-1.1918127536773682,
0.2707212567329407,
-0.03233823552727699,
-0.10979458689689636,
-0.21436724066734314,
1.6407124996185303,
-0.9532532691955566,
-2.115817070007324,
0.15945379436016083,
0.25585439801216125,
-0.18251147866249084,
0.125924214720726,
1.7798203229904175,
0.3668127954006195,
1.388346552848816,
1.2321362495422363,
0.9628633260726929,
-0.6412076354026794,
-1.3654695749282837,
0.7644949555397034,
0.9355019330978394,
-1.354245662689209,
0.9163027405738831,
-0.252632737159729,
-0.5359951853752136,
0.7091149687767029,
1.2054699659347534,
0.5777831077575684,
-1.9294534921646118,
0.8523157238960266,
-1.150656819343567,
0.751349151134491,
0.8253783583641052,
0.6800446510314941,
0.23345120251178741,
1.0013583898544312,
-1.0867758989334106,
-1.0983774662017822,
-0.5853436589241028,
-0.7207103371620178,
1.9024795293807983,
-0.4896284341812134,
0.6555034518241882,
-0.17083004117012024,
-1.1728931665420532,
-0.01132815983146429,
0.9054083824157715,
0.4108707904815674,
-0.46321138739585876,
0.8789717555046082,
-0.643278956413269,
-0.8552001118659973,
-1.1287095546722412,
-0.33324503898620605,
-1.1201143264770508,
-0.9660713076591492,
1.0477796792984009,
0.6526115536689758,
0.35336750745773315,
1.8254787921905518,
0.6848747730255127,
0.421623557806015,
-2.584805965423584,
0.8359211087226868,
0.23169995844364166,
-0.042299240827560425,
0.9605234861373901,
0.3337690234184265,
1.1240406036376953,
0.11575904488563538,
0.5522099137306213,
-2.506910800933838,
2.3530771732330322,
-0.23423509299755096,
0.5962400436401367,
-0.11206632852554321,
-0.2698577046394348,
1.1626510620117188,
0.6607275605201721,
0.40775880217552185,
-1.0423601865768433,
0.8535908460617065,
-0.41520220041275024,
1.0481129884719849,
0.8085217475891113,
-0.867755115032196,
0.053498610854148865,
1.4858157634735107,
0.4362275004386902,
-0.5956971049308777,
-0.9501729011535645,
-0.9351952075958252,
0.8443913459777832,
1.6203064918518066,
0.009984783828258514,
-0.07652774453163147,
0.7762209177017212,
0.6652467846870422,
-1.1438003778457642,
0.14312370121479034,
-0.502819299697876,
-0.7479490041732788,
1.6356645822525024,
2.0923502445220947,
-0.12193822115659714,
-0.04499896615743637,
-0.6737823486328125,
-1.173801064491272,
0.6822634935379028,
-0.058326661586761475,
0.018819628283381462,
0.5288559794425964,
-0.6481419801712036,
0.9663414359092712,
0.6943754553794861,
1.0091118812561035,
0.07445620000362396,
0.19603672623634338,
0.5265794992446899,
-0.31529662013053894,
-1.257506251335144,
-0.3657035529613495,
-1.1319279670715332,
-2.55755877494812,
0.3442668914794922,
-0.263712614774704,
-1.472205400466919,
0.06380505859851837,
-1.069490909576416,
0.9696755409240723,
-0.6028579473495483,
-1.117204189300537,
-1.5885347127914429,
0.23325906693935394,
-0.05789390951395035,
0.9821642637252808,
-1.6336643695831299,
-0.3448406755924225,
1.1179847717285156,
0.8050861358642578,
-0.6414539813995361,
1.0211362838745117,
0.1893475502729416,
0.924711287021637,
0.6901974081993103,
-0.39046669006347656,
0.6532230377197266,
0.14533182978630066,
-1.4381024837493896,
0.4994475245475769,
1.2452539205551147,
0.1803622990846634,
1.54360032081604,
-0.3806591033935547,
0.02516140602529049,
0.42122891545295715,
-0.7208982706069946,
-0.5153977274894714,
-0.3741128444671631,
0.6999945044517517,
0.06310389935970306,
-0.9129735231399536,
-0.1133042573928833,
-0.242158442735672,
-0.3526640832424164,
0.13142144680023193,
-1.511009931564331,
-0.2635515332221985,
-0.5231833457946777,
-0.5488781929016113,
-1.3116517066955566,
0.001627444289624691,
1.4669872522354126,
-0.7188980579376221,
-0.24155063927173615,
0.45156893134117126,
0.5169481635093689,
0.5486927032470703,
0.6161031723022461,
-0.8550217151641846,
-0.06247195601463318,
-0.31658878922462463,
-0.22770217061042786,
0.3526141941547394,
1.3191485404968262,
-0.08478742092847824,
-0.9561516046524048,
0.6575634479522705,
-0.3338296115398407,
0.13944584131240845,
2.039522647857666,
0.10844156891107559,
-0.6355759501457214,
0.3623899221420288,
-0.7672353982925415,
1.843578577041626,
1.7177529335021973,
1.4434728622436523,
-0.18874700367450714,
-0.8563926815986633,
0.606346607208252,
-0.3764989972114563,
-0.40385276079177856,
0.9101014137268066,
0.3964632451534271,
-0.3190280497074127,
-1.422922134399414,
0.8464547991752625,
1.1422268152236938,
-0.8196856379508972,
-0.722076416015625,
0.2544756233692169,
-0.777482807636261,
1.2541478872299194,
0.40408945083618164,
0.31232696771621704,
0.34869492053985596,
1.5870678424835205,
0.7085614800453186,
-0.4048413336277008,
0.521119236946106,
0.5477879047393799,
-0.26803210377693176,
-2.087742567062378,
-1.1837290525436401,
0.5057107210159302,
-0.5959543585777283,
-1.528529167175293,
1.4475497007369995,
-1.1227655410766602,
-1.146882176399231,
0.5627594590187073,
-0.026335151866078377,
1.3011503219604492,
0.4670540690422058,
1.650006651878357,
2.10497784614563,
0.8618612885475159,
0.5181383490562439,
1.2209770679473877,
-0.18733765184879303,
-0.4865553677082062,
1.7748398780822754,
-0.44734928011894226,
0.5112898349761963,
1.14064621925354,
-0.37297341227531433,
-1.0743454694747925,
-0.7471604347229004,
-1.1835441589355469,
-0.5934773087501526,
1.123147964477539,
0.03517169505357742,
-1.0439367294311523,
0.25220224261283875,
1.5328495502471924,
0.1399877369403839,
-0.16959509253501892,
0.7072939872741699,
0.3150472640991211,
-0.7966283559799194,
-0.08228100836277008,
-0.9380287528038025,
0.5301992893218994,
-0.3279317021369934,
-0.38084378838539124,
0.23424695432186127,
0.5679695010185242,
1.3520729541778564,
-0.10433214902877808,
0.18322674930095673,
1.1246975660324097,
-1.424279808998108,
1.416353464126587,
-0.6224831342697144,
0.25287219882011414,
-2.3666186332702637,
1.3582805395126343,
-0.6010262370109558,
2.055675745010376,
-2.5786499977111816,
0.4175315201282501,
-0.5859166979789734,
-0.6157234907150269,
0.3062257766723633,
-0.3284958302974701,
0.13078534603118896,
-0.12133973091840744,
-1.0297214984893799,
0.03267339617013931,
-0.7402986884117126,
0.7021341919898987,
1.1017546653747559,
1.4372756481170654,
-1.1730457544326782,
-0.22827816009521484,
-1.592077374458313,
-0.17128513753414154,
-0.8602592349052429,
0.23542557656764984,
-1.9622896909713745,
-0.2073361575603485,
-2.0041842460632324,
-2.4888384342193604,
-1.2120864391326904,
-0.7271098494529724,
1.0606849193572998,
0.24967335164546967,
-0.8999041318893433,
1.3447571992874146,
-0.3274788558483124,
-1.8164349794387817,
1.1168322563171387,
-2.0404105186462402
] |
https://github.com/huggingface/datasets/issues/4875 | `_resolve_features` ignores the token | I can't reproduce on my side. I tried using a private dataset repo with a CSV file on hub-ci
What's your version of `huggingface_hub` ? | ## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2 | 566 | 25 | `_resolve_features` ignores the token
## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
I can't reproduce on my side. I tried using a private dataset repo with a CSV file on hub-ci
What's your version of `huggingface_hub` ? | [
-1.2811189889907837,
-0.9154444336891174,
-0.5744412541389465,
1.488728404045105,
-0.10419037193059921,
-1.2110341787338257,
0.26843857765197754,
-1.0324623584747314,
1.5456613302230835,
-0.8060516715049744,
0.25108540058135986,
-1.6083890199661255,
-0.026339909061789513,
-0.555762767791748,
-0.6320050358772278,
-0.9028801321983337,
-0.3497809171676636,
-0.7405957579612732,
1.1537467241287231,
2.406712770462036,
1.2791156768798828,
-1.3064976930618286,
2.7085587978363037,
0.6326770186424255,
-0.168434739112854,
-0.9860284328460693,
0.5123348832130432,
0.046871162950992584,
-1.2477535009384155,
-0.4707554578781128,
-0.8496996760368347,
-0.05046423524618149,
-0.6229242086410522,
-0.33668896555900574,
-0.0307941734790802,
0.5619955658912659,
-0.3399147391319275,
-0.3076609671115875,
-0.6177271604537964,
-0.7792229652404785,
0.5064303874969482,
-0.305820107460022,
0.8935908079147339,
-0.3367452919483185,
1.8770525455474854,
-0.5650131702423096,
0.5177491307258606,
0.7205970287322998,
1.1655725240707397,
0.1382633000612259,
0.02458241395652294,
0.19803710281848907,
0.28086328506469727,
0.004842427559196949,
0.5536724328994751,
1.1592768430709839,
0.6183038949966431,
0.5418691635131836,
0.5962592959403992,
-2.221187114715576,
1.3556934595108032,
-0.9090203642845154,
0.23115026950836182,
1.4469022750854492,
-0.9185292720794678,
0.339862585067749,
-1.7431433200836182,
-0.04993116855621338,
0.6232235431671143,
-2.2442939281463623,
0.3389592468738556,
-1.4486972093582153,
-0.5455631017684937,
0.9620541930198669,
0.3662624657154083,
-1.0938012599945068,
0.15145623683929443,
-0.5284515023231506,
1.223029375076294,
0.49513912200927734,
1.0197322368621826,
-1.7404959201812744,
-0.07561776041984558,
-0.18581166863441467,
0.15150131285190582,
-1.393602967262268,
-1.6853320598602295,
0.5868528485298157,
0.5569989085197449,
0.6577640771865845,
-0.07383648306131363,
1.1062809228897095,
-1.1462128162384033,
0.7733158469200134,
-1.142747402191162,
-1.499385118484497,
-1.415552020072937,
-2.424152374267578,
-2.342365026473999,
0.6780292987823486,
-0.47596871852874756,
-0.5220028162002563,
2.0116260051727295,
-1.0773943662643433,
-1.5961596965789795,
1.0546495914459229,
0.13995836675167084,
0.10141383111476898,
2.3959596157073975,
0.2255484014749527,
-0.7783055901527405,
0.4392549693584442,
-0.830997109413147,
0.7710089087486267,
-0.21307864785194397,
1.2486989498138428,
0.4910184144973755,
-1.1071133613586426,
1.486111044883728,
-0.3575490117073059,
0.6857352256774902,
-0.5706148743629456,
-0.6417393088340759,
-0.7086409330368042,
0.1060653030872345,
1.912868618965149,
-0.2030092477798462,
1.6091383695602417,
-0.2755921185016632,
-1.565077304840088,
-1.5873842239379883,
0.9737069606781006,
0.397821843624115,
-0.8814854621887207,
0.06282181292772293,
-0.5486565828323364,
0.18866845965385437,
-0.14408668875694275,
1.2026845216751099,
1.3012182712554932,
0.6545933485031128,
-0.4398134648799896,
-0.6946622133255005,
0.09902944415807724,
-0.10314767807722092,
-0.6320551037788391,
-1.7644224166870117,
-0.2536284625530243,
0.12082882225513458,
0.7193565964698792,
-1.1257041692733765,
1.8312889337539673,
0.8688491582870483,
1.8646754026412964,
0.9957760572433472,
-0.37088721990585327,
1.405269742012024,
0.03804559260606766,
1.7484192848205566,
-0.5747922658920288,
0.5389139652252197,
-0.3305024206638336,
-1.1225104331970215,
0.8834593892097473,
-0.22790643572807312,
-1.9696073532104492,
-0.8096218109130859,
-0.5613906383514404,
-0.19252289831638336,
-0.7398486137390137,
0.8975930213928223,
-0.29818102717399597,
-1.5082721710205078,
0.14373134076595306,
-0.6509538888931274,
0.3102780878543854,
-1.1272989511489868,
0.2548208236694336,
0.757098376750946,
-0.7012099027633667,
0.03819018602371216,
-0.1861301064491272,
-1.1699224710464478,
-0.44455277919769287,
0.4731672406196594,
1.8352400064468384,
-0.5078028440475464,
0.8521568179130554,
1.0694823265075684,
-0.6758366227149963,
0.05837269872426987,
0.09304480999708176,
-0.20255714654922485,
0.7486749887466431,
-1.0640723705291748,
-0.46239277720451355,
1.2464762926101685,
-0.40427321195602417,
-0.7104566097259521,
1.5520997047424316,
0.6736465096473694,
-1.1005812883377075,
-0.2568867802619934,
-0.16801513731479645,
-0.9357462525367737,
0.049117207527160645,
-1.4885250329971313,
-0.06074393540620804,
0.5112794041633606,
-1.5811445713043213,
-0.3486453592777252,
-0.1423855423927307,
1.3818562030792236,
-0.25665411353111267,
1.4093611240386963,
-0.3019463121891022,
-0.15810635685920715,
-0.24965813755989075,
-0.45888128876686096,
0.13202784955501556,
-0.1630139797925949,
-0.5213655829429626,
0.04318476468324661,
-0.8595004081726074,
0.29672783613204956,
1.4979411363601685,
0.27226370573043823,
-0.013231479562819004,
0.3369174301624298,
1.183330774307251,
0.38854536414146423,
-0.1542137861251831,
-0.8270607590675354,
-1.53622567653656,
1.8522788286209106,
-1.4262168407440186,
1.992274284362793,
0.7973231673240662,
-0.13910700380802155,
-1.815227746963501,
-1.7880533933639526,
1.1872258186340332,
1.1280622482299805,
2.338264226913452,
0.38530486822128296,
0.34806692600250244,
-0.8191310167312622,
-0.7465835213661194,
0.4197569191455841,
-0.9105650782585144,
-0.5945742726325989,
0.23894533514976501,
2.279972553253174,
1.79160737991333,
-0.4054242968559265,
-0.2330368608236313,
-0.9094581604003906,
1.3785011768341064,
-0.2118488848209381,
0.319115549325943,
2.02833890914917,
-0.2514666020870209,
-0.9874468445777893,
1.3781142234802246,
-2.372356653213501,
0.2715269923210144,
2.115609884262085,
0.27991974353790283,
0.14674343168735504,
-1.3290760517120361,
-0.5702651739120483,
-0.46813511848449707,
-0.3977055251598358,
-1.308374047279358,
0.44831526279449463,
-0.3100520670413971,
-0.6853949427604675,
-1.388617992401123,
0.18733718991279602,
-1.1507319211959839,
-1.6648482084274292,
0.34488242864608765,
1.9727696180343628,
2.0702097415924072,
-0.733058750629425,
1.409254789352417,
-0.38965460658073425,
0.07723270356655121,
1.2303597927093506,
1.4061648845672607,
3.067584276199341,
1.8348015546798706,
-1.278938889503479,
0.719096302986145,
-0.24947413802146912,
-0.5081622004508972,
1.13359797000885,
-1.1790050268173218,
1.2973190546035767,
-0.18617530167102814,
-1.2222102880477905,
-1.337043046951294,
1.0692437887191772,
0.557348906993866,
0.10401435196399689,
-0.5409644246101379,
1.2970528602600098,
0.11402087658643723,
1.4095324277877808,
0.6383390426635742,
-0.4748493731021881,
0.5367153882980347,
-0.47978731989860535,
-0.6712154746055603,
1.5392568111419678,
0.16502447426319122,
-1.5516549348831177,
-2.255490779876709,
-0.31773513555526733,
-0.8486179113388062,
0.09072785824537277,
-0.68332839012146,
-1.0820866823196411,
1.6455891132354736,
0.32926079630851746,
-1.294232726097107,
-0.2806415557861328,
-0.3114483654499054,
-0.4980398118495941,
2.765923261642456,
-1.1692159175872803,
-0.046630412340164185,
-0.9923310279846191,
-0.7473304271697998,
1.6875146627426147,
-1.3012032508850098,
-0.34212061762809753,
-1.0295326709747314,
-0.6291936039924622,
-1.2276345491409302,
-0.3823487460613251,
0.05020663142204285,
-0.9904007911682129,
0.7866542339324951,
0.12405979633331299,
-1.2279542684555054,
-0.35567179322242737,
-0.8794820308685303,
1.091326355934143,
-0.18958507478237152,
0.12940987944602966,
1.703171968460083,
0.16269008815288544,
-0.4433216154575348,
0.8051002025604248,
1.1937263011932373,
0.667251467704773,
-0.7487751245498657,
-0.046222008764743805,
-0.6617705821990967,
0.3956814110279083,
-1.2970225811004639,
0.2714855670928955,
-2.971771001815796,
0.6489323377609253,
-0.11298967897891998,
-0.12201440334320068,
-0.02410311996936798,
-1.4128079414367676,
1.0700201988220215,
2.551903247833252,
-1.2748562097549438,
0.4951552748680115,
0.4831680357456207,
1.0404932498931885,
-1.6297708749771118,
0.4060916304588318,
-0.5336971282958984,
1.9478133916854858,
0.28458142280578613,
1.3181002140045166,
-0.4523216485977173,
-2.312519073486328,
0.5594401359558105,
-1.1558125019073486,
-1.1594769954681396,
0.9507426023483276,
-1.0070679187774658,
0.2650834023952484,
-1.4319151639938354,
-0.30814337730407715,
-0.964778482913971,
-1.3214868307113647,
0.6076076030731201,
0.18155845999717712,
0.39625251293182373,
-0.5797735452651978,
0.32579877972602844,
-2.3299336433410645,
-1.329350471496582,
-0.21274493634700775,
-1.0049262046813965,
0.5931419134140015,
-0.5706595778465271,
0.5288438200950623,
-0.0504913255572319,
0.1275321990251541,
0.38580191135406494,
1.5781705379486084,
3.441234827041626,
0.22730964422225952,
0.17399494349956512,
-0.23070645332336426,
-0.9081097841262817,
1.5203267335891724,
0.9034872055053711,
-0.01654765009880066,
-0.5259848237037659,
-0.9447135329246521,
1.2032729387283325,
1.9575284719467163,
1.0233434438705444,
-0.058732204139232635,
-0.8906853795051575,
-0.705665647983551,
-0.09022130817174911,
0.1308785229921341,
0.5561995506286621,
0.9212196469306946,
0.08365355432033539,
0.13708308339118958,
1.3288108110427856,
1.0478477478027344,
-0.29290276765823364,
0.290215402841568,
-0.8781681060791016,
-0.4401888847351074,
0.49402064085006714,
0.18219268321990967,
-0.0640663132071495,
0.5362765789031982,
-1.0080558061599731,
-0.18475939333438873,
-0.4861931800842285,
-0.8256999254226685,
-0.7226371765136719,
-0.4540771543979645,
-0.4328865706920624,
1.5854285955429077,
0.06378801167011261,
-0.5376126170158386,
0.049162134528160095,
-0.660200297832489,
-0.30768677592277527,
-1.1918127536773682,
0.2707212567329407,
-0.03233823552727699,
-0.10979458689689636,
-0.21436724066734314,
1.6407124996185303,
-0.9532532691955566,
-2.115817070007324,
0.15945379436016083,
0.25585439801216125,
-0.18251147866249084,
0.125924214720726,
1.7798203229904175,
0.3668127954006195,
1.388346552848816,
1.2321362495422363,
0.9628633260726929,
-0.6412076354026794,
-1.3654695749282837,
0.7644949555397034,
0.9355019330978394,
-1.354245662689209,
0.9163027405738831,
-0.252632737159729,
-0.5359951853752136,
0.7091149687767029,
1.2054699659347534,
0.5777831077575684,
-1.9294534921646118,
0.8523157238960266,
-1.150656819343567,
0.751349151134491,
0.8253783583641052,
0.6800446510314941,
0.23345120251178741,
1.0013583898544312,
-1.0867758989334106,
-1.0983774662017822,
-0.5853436589241028,
-0.7207103371620178,
1.9024795293807983,
-0.4896284341812134,
0.6555034518241882,
-0.17083004117012024,
-1.1728931665420532,
-0.01132815983146429,
0.9054083824157715,
0.4108707904815674,
-0.46321138739585876,
0.8789717555046082,
-0.643278956413269,
-0.8552001118659973,
-1.1287095546722412,
-0.33324503898620605,
-1.1201143264770508,
-0.9660713076591492,
1.0477796792984009,
0.6526115536689758,
0.35336750745773315,
1.8254787921905518,
0.6848747730255127,
0.421623557806015,
-2.584805965423584,
0.8359211087226868,
0.23169995844364166,
-0.042299240827560425,
0.9605234861373901,
0.3337690234184265,
1.1240406036376953,
0.11575904488563538,
0.5522099137306213,
-2.506910800933838,
2.3530771732330322,
-0.23423509299755096,
0.5962400436401367,
-0.11206632852554321,
-0.2698577046394348,
1.1626510620117188,
0.6607275605201721,
0.40775880217552185,
-1.0423601865768433,
0.8535908460617065,
-0.41520220041275024,
1.0481129884719849,
0.8085217475891113,
-0.867755115032196,
0.053498610854148865,
1.4858157634735107,
0.4362275004386902,
-0.5956971049308777,
-0.9501729011535645,
-0.9351952075958252,
0.8443913459777832,
1.6203064918518066,
0.009984783828258514,
-0.07652774453163147,
0.7762209177017212,
0.6652467846870422,
-1.1438003778457642,
0.14312370121479034,
-0.502819299697876,
-0.7479490041732788,
1.6356645822525024,
2.0923502445220947,
-0.12193822115659714,
-0.04499896615743637,
-0.6737823486328125,
-1.173801064491272,
0.6822634935379028,
-0.058326661586761475,
0.018819628283381462,
0.5288559794425964,
-0.6481419801712036,
0.9663414359092712,
0.6943754553794861,
1.0091118812561035,
0.07445620000362396,
0.19603672623634338,
0.5265794992446899,
-0.31529662013053894,
-1.257506251335144,
-0.3657035529613495,
-1.1319279670715332,
-2.55755877494812,
0.3442668914794922,
-0.263712614774704,
-1.472205400466919,
0.06380505859851837,
-1.069490909576416,
0.9696755409240723,
-0.6028579473495483,
-1.117204189300537,
-1.5885347127914429,
0.23325906693935394,
-0.05789390951395035,
0.9821642637252808,
-1.6336643695831299,
-0.3448406755924225,
1.1179847717285156,
0.8050861358642578,
-0.6414539813995361,
1.0211362838745117,
0.1893475502729416,
0.924711287021637,
0.6901974081993103,
-0.39046669006347656,
0.6532230377197266,
0.14533182978630066,
-1.4381024837493896,
0.4994475245475769,
1.2452539205551147,
0.1803622990846634,
1.54360032081604,
-0.3806591033935547,
0.02516140602529049,
0.42122891545295715,
-0.7208982706069946,
-0.5153977274894714,
-0.3741128444671631,
0.6999945044517517,
0.06310389935970306,
-0.9129735231399536,
-0.1133042573928833,
-0.242158442735672,
-0.3526640832424164,
0.13142144680023193,
-1.511009931564331,
-0.2635515332221985,
-0.5231833457946777,
-0.5488781929016113,
-1.3116517066955566,
0.001627444289624691,
1.4669872522354126,
-0.7188980579376221,
-0.24155063927173615,
0.45156893134117126,
0.5169481635093689,
0.5486927032470703,
0.6161031723022461,
-0.8550217151641846,
-0.06247195601463318,
-0.31658878922462463,
-0.22770217061042786,
0.3526141941547394,
1.3191485404968262,
-0.08478742092847824,
-0.9561516046524048,
0.6575634479522705,
-0.3338296115398407,
0.13944584131240845,
2.039522647857666,
0.10844156891107559,
-0.6355759501457214,
0.3623899221420288,
-0.7672353982925415,
1.843578577041626,
1.7177529335021973,
1.4434728622436523,
-0.18874700367450714,
-0.8563926815986633,
0.606346607208252,
-0.3764989972114563,
-0.40385276079177856,
0.9101014137268066,
0.3964632451534271,
-0.3190280497074127,
-1.422922134399414,
0.8464547991752625,
1.1422268152236938,
-0.8196856379508972,
-0.722076416015625,
0.2544756233692169,
-0.777482807636261,
1.2541478872299194,
0.40408945083618164,
0.31232696771621704,
0.34869492053985596,
1.5870678424835205,
0.7085614800453186,
-0.4048413336277008,
0.521119236946106,
0.5477879047393799,
-0.26803210377693176,
-2.087742567062378,
-1.1837290525436401,
0.5057107210159302,
-0.5959543585777283,
-1.528529167175293,
1.4475497007369995,
-1.1227655410766602,
-1.146882176399231,
0.5627594590187073,
-0.026335151866078377,
1.3011503219604492,
0.4670540690422058,
1.650006651878357,
2.10497784614563,
0.8618612885475159,
0.5181383490562439,
1.2209770679473877,
-0.18733765184879303,
-0.4865553677082062,
1.7748398780822754,
-0.44734928011894226,
0.5112898349761963,
1.14064621925354,
-0.37297341227531433,
-1.0743454694747925,
-0.7471604347229004,
-1.1835441589355469,
-0.5934773087501526,
1.123147964477539,
0.03517169505357742,
-1.0439367294311523,
0.25220224261283875,
1.5328495502471924,
0.1399877369403839,
-0.16959509253501892,
0.7072939872741699,
0.3150472640991211,
-0.7966283559799194,
-0.08228100836277008,
-0.9380287528038025,
0.5301992893218994,
-0.3279317021369934,
-0.38084378838539124,
0.23424695432186127,
0.5679695010185242,
1.3520729541778564,
-0.10433214902877808,
0.18322674930095673,
1.1246975660324097,
-1.424279808998108,
1.416353464126587,
-0.6224831342697144,
0.25287219882011414,
-2.3666186332702637,
1.3582805395126343,
-0.6010262370109558,
2.055675745010376,
-2.5786499977111816,
0.4175315201282501,
-0.5859166979789734,
-0.6157234907150269,
0.3062257766723633,
-0.3284958302974701,
0.13078534603118896,
-0.12133973091840744,
-1.0297214984893799,
0.03267339617013931,
-0.7402986884117126,
0.7021341919898987,
1.1017546653747559,
1.4372756481170654,
-1.1730457544326782,
-0.22827816009521484,
-1.592077374458313,
-0.17128513753414154,
-0.8602592349052429,
0.23542557656764984,
-1.9622896909713745,
-0.2073361575603485,
-2.0041842460632324,
-2.4888384342193604,
-1.2120864391326904,
-0.7271098494529724,
1.0606849193572998,
0.24967335164546967,
-0.8999041318893433,
1.3447571992874146,
-0.3274788558483124,
-1.8164349794387817,
1.1168322563171387,
-2.0404105186462402
] |
https://github.com/huggingface/datasets/issues/4875 | `_resolve_features` ignores the token | I can't reproduce either... Not sure what has occurred, very sorry to have made you lost your time on that | ## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2 | 566 | 20 | `_resolve_features` ignores the token
## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
I can't reproduce either... Not sure what has occurred, very sorry to have made you lost your time on that | [
-1.2811189889907837,
-0.9154444336891174,
-0.5744412541389465,
1.488728404045105,
-0.10419037193059921,
-1.2110341787338257,
0.26843857765197754,
-1.0324623584747314,
1.5456613302230835,
-0.8060516715049744,
0.25108540058135986,
-1.6083890199661255,
-0.026339909061789513,
-0.555762767791748,
-0.6320050358772278,
-0.9028801321983337,
-0.3497809171676636,
-0.7405957579612732,
1.1537467241287231,
2.406712770462036,
1.2791156768798828,
-1.3064976930618286,
2.7085587978363037,
0.6326770186424255,
-0.168434739112854,
-0.9860284328460693,
0.5123348832130432,
0.046871162950992584,
-1.2477535009384155,
-0.4707554578781128,
-0.8496996760368347,
-0.05046423524618149,
-0.6229242086410522,
-0.33668896555900574,
-0.0307941734790802,
0.5619955658912659,
-0.3399147391319275,
-0.3076609671115875,
-0.6177271604537964,
-0.7792229652404785,
0.5064303874969482,
-0.305820107460022,
0.8935908079147339,
-0.3367452919483185,
1.8770525455474854,
-0.5650131702423096,
0.5177491307258606,
0.7205970287322998,
1.1655725240707397,
0.1382633000612259,
0.02458241395652294,
0.19803710281848907,
0.28086328506469727,
0.004842427559196949,
0.5536724328994751,
1.1592768430709839,
0.6183038949966431,
0.5418691635131836,
0.5962592959403992,
-2.221187114715576,
1.3556934595108032,
-0.9090203642845154,
0.23115026950836182,
1.4469022750854492,
-0.9185292720794678,
0.339862585067749,
-1.7431433200836182,
-0.04993116855621338,
0.6232235431671143,
-2.2442939281463623,
0.3389592468738556,
-1.4486972093582153,
-0.5455631017684937,
0.9620541930198669,
0.3662624657154083,
-1.0938012599945068,
0.15145623683929443,
-0.5284515023231506,
1.223029375076294,
0.49513912200927734,
1.0197322368621826,
-1.7404959201812744,
-0.07561776041984558,
-0.18581166863441467,
0.15150131285190582,
-1.393602967262268,
-1.6853320598602295,
0.5868528485298157,
0.5569989085197449,
0.6577640771865845,
-0.07383648306131363,
1.1062809228897095,
-1.1462128162384033,
0.7733158469200134,
-1.142747402191162,
-1.499385118484497,
-1.415552020072937,
-2.424152374267578,
-2.342365026473999,
0.6780292987823486,
-0.47596871852874756,
-0.5220028162002563,
2.0116260051727295,
-1.0773943662643433,
-1.5961596965789795,
1.0546495914459229,
0.13995836675167084,
0.10141383111476898,
2.3959596157073975,
0.2255484014749527,
-0.7783055901527405,
0.4392549693584442,
-0.830997109413147,
0.7710089087486267,
-0.21307864785194397,
1.2486989498138428,
0.4910184144973755,
-1.1071133613586426,
1.486111044883728,
-0.3575490117073059,
0.6857352256774902,
-0.5706148743629456,
-0.6417393088340759,
-0.7086409330368042,
0.1060653030872345,
1.912868618965149,
-0.2030092477798462,
1.6091383695602417,
-0.2755921185016632,
-1.565077304840088,
-1.5873842239379883,
0.9737069606781006,
0.397821843624115,
-0.8814854621887207,
0.06282181292772293,
-0.5486565828323364,
0.18866845965385437,
-0.14408668875694275,
1.2026845216751099,
1.3012182712554932,
0.6545933485031128,
-0.4398134648799896,
-0.6946622133255005,
0.09902944415807724,
-0.10314767807722092,
-0.6320551037788391,
-1.7644224166870117,
-0.2536284625530243,
0.12082882225513458,
0.7193565964698792,
-1.1257041692733765,
1.8312889337539673,
0.8688491582870483,
1.8646754026412964,
0.9957760572433472,
-0.37088721990585327,
1.405269742012024,
0.03804559260606766,
1.7484192848205566,
-0.5747922658920288,
0.5389139652252197,
-0.3305024206638336,
-1.1225104331970215,
0.8834593892097473,
-0.22790643572807312,
-1.9696073532104492,
-0.8096218109130859,
-0.5613906383514404,
-0.19252289831638336,
-0.7398486137390137,
0.8975930213928223,
-0.29818102717399597,
-1.5082721710205078,
0.14373134076595306,
-0.6509538888931274,
0.3102780878543854,
-1.1272989511489868,
0.2548208236694336,
0.757098376750946,
-0.7012099027633667,
0.03819018602371216,
-0.1861301064491272,
-1.1699224710464478,
-0.44455277919769287,
0.4731672406196594,
1.8352400064468384,
-0.5078028440475464,
0.8521568179130554,
1.0694823265075684,
-0.6758366227149963,
0.05837269872426987,
0.09304480999708176,
-0.20255714654922485,
0.7486749887466431,
-1.0640723705291748,
-0.46239277720451355,
1.2464762926101685,
-0.40427321195602417,
-0.7104566097259521,
1.5520997047424316,
0.6736465096473694,
-1.1005812883377075,
-0.2568867802619934,
-0.16801513731479645,
-0.9357462525367737,
0.049117207527160645,
-1.4885250329971313,
-0.06074393540620804,
0.5112794041633606,
-1.5811445713043213,
-0.3486453592777252,
-0.1423855423927307,
1.3818562030792236,
-0.25665411353111267,
1.4093611240386963,
-0.3019463121891022,
-0.15810635685920715,
-0.24965813755989075,
-0.45888128876686096,
0.13202784955501556,
-0.1630139797925949,
-0.5213655829429626,
0.04318476468324661,
-0.8595004081726074,
0.29672783613204956,
1.4979411363601685,
0.27226370573043823,
-0.013231479562819004,
0.3369174301624298,
1.183330774307251,
0.38854536414146423,
-0.1542137861251831,
-0.8270607590675354,
-1.53622567653656,
1.8522788286209106,
-1.4262168407440186,
1.992274284362793,
0.7973231673240662,
-0.13910700380802155,
-1.815227746963501,
-1.7880533933639526,
1.1872258186340332,
1.1280622482299805,
2.338264226913452,
0.38530486822128296,
0.34806692600250244,
-0.8191310167312622,
-0.7465835213661194,
0.4197569191455841,
-0.9105650782585144,
-0.5945742726325989,
0.23894533514976501,
2.279972553253174,
1.79160737991333,
-0.4054242968559265,
-0.2330368608236313,
-0.9094581604003906,
1.3785011768341064,
-0.2118488848209381,
0.319115549325943,
2.02833890914917,
-0.2514666020870209,
-0.9874468445777893,
1.3781142234802246,
-2.372356653213501,
0.2715269923210144,
2.115609884262085,
0.27991974353790283,
0.14674343168735504,
-1.3290760517120361,
-0.5702651739120483,
-0.46813511848449707,
-0.3977055251598358,
-1.308374047279358,
0.44831526279449463,
-0.3100520670413971,
-0.6853949427604675,
-1.388617992401123,
0.18733718991279602,
-1.1507319211959839,
-1.6648482084274292,
0.34488242864608765,
1.9727696180343628,
2.0702097415924072,
-0.733058750629425,
1.409254789352417,
-0.38965460658073425,
0.07723270356655121,
1.2303597927093506,
1.4061648845672607,
3.067584276199341,
1.8348015546798706,
-1.278938889503479,
0.719096302986145,
-0.24947413802146912,
-0.5081622004508972,
1.13359797000885,
-1.1790050268173218,
1.2973190546035767,
-0.18617530167102814,
-1.2222102880477905,
-1.337043046951294,
1.0692437887191772,
0.557348906993866,
0.10401435196399689,
-0.5409644246101379,
1.2970528602600098,
0.11402087658643723,
1.4095324277877808,
0.6383390426635742,
-0.4748493731021881,
0.5367153882980347,
-0.47978731989860535,
-0.6712154746055603,
1.5392568111419678,
0.16502447426319122,
-1.5516549348831177,
-2.255490779876709,
-0.31773513555526733,
-0.8486179113388062,
0.09072785824537277,
-0.68332839012146,
-1.0820866823196411,
1.6455891132354736,
0.32926079630851746,
-1.294232726097107,
-0.2806415557861328,
-0.3114483654499054,
-0.4980398118495941,
2.765923261642456,
-1.1692159175872803,
-0.046630412340164185,
-0.9923310279846191,
-0.7473304271697998,
1.6875146627426147,
-1.3012032508850098,
-0.34212061762809753,
-1.0295326709747314,
-0.6291936039924622,
-1.2276345491409302,
-0.3823487460613251,
0.05020663142204285,
-0.9904007911682129,
0.7866542339324951,
0.12405979633331299,
-1.2279542684555054,
-0.35567179322242737,
-0.8794820308685303,
1.091326355934143,
-0.18958507478237152,
0.12940987944602966,
1.703171968460083,
0.16269008815288544,
-0.4433216154575348,
0.8051002025604248,
1.1937263011932373,
0.667251467704773,
-0.7487751245498657,
-0.046222008764743805,
-0.6617705821990967,
0.3956814110279083,
-1.2970225811004639,
0.2714855670928955,
-2.971771001815796,
0.6489323377609253,
-0.11298967897891998,
-0.12201440334320068,
-0.02410311996936798,
-1.4128079414367676,
1.0700201988220215,
2.551903247833252,
-1.2748562097549438,
0.4951552748680115,
0.4831680357456207,
1.0404932498931885,
-1.6297708749771118,
0.4060916304588318,
-0.5336971282958984,
1.9478133916854858,
0.28458142280578613,
1.3181002140045166,
-0.4523216485977173,
-2.312519073486328,
0.5594401359558105,
-1.1558125019073486,
-1.1594769954681396,
0.9507426023483276,
-1.0070679187774658,
0.2650834023952484,
-1.4319151639938354,
-0.30814337730407715,
-0.964778482913971,
-1.3214868307113647,
0.6076076030731201,
0.18155845999717712,
0.39625251293182373,
-0.5797735452651978,
0.32579877972602844,
-2.3299336433410645,
-1.329350471496582,
-0.21274493634700775,
-1.0049262046813965,
0.5931419134140015,
-0.5706595778465271,
0.5288438200950623,
-0.0504913255572319,
0.1275321990251541,
0.38580191135406494,
1.5781705379486084,
3.441234827041626,
0.22730964422225952,
0.17399494349956512,
-0.23070645332336426,
-0.9081097841262817,
1.5203267335891724,
0.9034872055053711,
-0.01654765009880066,
-0.5259848237037659,
-0.9447135329246521,
1.2032729387283325,
1.9575284719467163,
1.0233434438705444,
-0.058732204139232635,
-0.8906853795051575,
-0.705665647983551,
-0.09022130817174911,
0.1308785229921341,
0.5561995506286621,
0.9212196469306946,
0.08365355432033539,
0.13708308339118958,
1.3288108110427856,
1.0478477478027344,
-0.29290276765823364,
0.290215402841568,
-0.8781681060791016,
-0.4401888847351074,
0.49402064085006714,
0.18219268321990967,
-0.0640663132071495,
0.5362765789031982,
-1.0080558061599731,
-0.18475939333438873,
-0.4861931800842285,
-0.8256999254226685,
-0.7226371765136719,
-0.4540771543979645,
-0.4328865706920624,
1.5854285955429077,
0.06378801167011261,
-0.5376126170158386,
0.049162134528160095,
-0.660200297832489,
-0.30768677592277527,
-1.1918127536773682,
0.2707212567329407,
-0.03233823552727699,
-0.10979458689689636,
-0.21436724066734314,
1.6407124996185303,
-0.9532532691955566,
-2.115817070007324,
0.15945379436016083,
0.25585439801216125,
-0.18251147866249084,
0.125924214720726,
1.7798203229904175,
0.3668127954006195,
1.388346552848816,
1.2321362495422363,
0.9628633260726929,
-0.6412076354026794,
-1.3654695749282837,
0.7644949555397034,
0.9355019330978394,
-1.354245662689209,
0.9163027405738831,
-0.252632737159729,
-0.5359951853752136,
0.7091149687767029,
1.2054699659347534,
0.5777831077575684,
-1.9294534921646118,
0.8523157238960266,
-1.150656819343567,
0.751349151134491,
0.8253783583641052,
0.6800446510314941,
0.23345120251178741,
1.0013583898544312,
-1.0867758989334106,
-1.0983774662017822,
-0.5853436589241028,
-0.7207103371620178,
1.9024795293807983,
-0.4896284341812134,
0.6555034518241882,
-0.17083004117012024,
-1.1728931665420532,
-0.01132815983146429,
0.9054083824157715,
0.4108707904815674,
-0.46321138739585876,
0.8789717555046082,
-0.643278956413269,
-0.8552001118659973,
-1.1287095546722412,
-0.33324503898620605,
-1.1201143264770508,
-0.9660713076591492,
1.0477796792984009,
0.6526115536689758,
0.35336750745773315,
1.8254787921905518,
0.6848747730255127,
0.421623557806015,
-2.584805965423584,
0.8359211087226868,
0.23169995844364166,
-0.042299240827560425,
0.9605234861373901,
0.3337690234184265,
1.1240406036376953,
0.11575904488563538,
0.5522099137306213,
-2.506910800933838,
2.3530771732330322,
-0.23423509299755096,
0.5962400436401367,
-0.11206632852554321,
-0.2698577046394348,
1.1626510620117188,
0.6607275605201721,
0.40775880217552185,
-1.0423601865768433,
0.8535908460617065,
-0.41520220041275024,
1.0481129884719849,
0.8085217475891113,
-0.867755115032196,
0.053498610854148865,
1.4858157634735107,
0.4362275004386902,
-0.5956971049308777,
-0.9501729011535645,
-0.9351952075958252,
0.8443913459777832,
1.6203064918518066,
0.009984783828258514,
-0.07652774453163147,
0.7762209177017212,
0.6652467846870422,
-1.1438003778457642,
0.14312370121479034,
-0.502819299697876,
-0.7479490041732788,
1.6356645822525024,
2.0923502445220947,
-0.12193822115659714,
-0.04499896615743637,
-0.6737823486328125,
-1.173801064491272,
0.6822634935379028,
-0.058326661586761475,
0.018819628283381462,
0.5288559794425964,
-0.6481419801712036,
0.9663414359092712,
0.6943754553794861,
1.0091118812561035,
0.07445620000362396,
0.19603672623634338,
0.5265794992446899,
-0.31529662013053894,
-1.257506251335144,
-0.3657035529613495,
-1.1319279670715332,
-2.55755877494812,
0.3442668914794922,
-0.263712614774704,
-1.472205400466919,
0.06380505859851837,
-1.069490909576416,
0.9696755409240723,
-0.6028579473495483,
-1.117204189300537,
-1.5885347127914429,
0.23325906693935394,
-0.05789390951395035,
0.9821642637252808,
-1.6336643695831299,
-0.3448406755924225,
1.1179847717285156,
0.8050861358642578,
-0.6414539813995361,
1.0211362838745117,
0.1893475502729416,
0.924711287021637,
0.6901974081993103,
-0.39046669006347656,
0.6532230377197266,
0.14533182978630066,
-1.4381024837493896,
0.4994475245475769,
1.2452539205551147,
0.1803622990846634,
1.54360032081604,
-0.3806591033935547,
0.02516140602529049,
0.42122891545295715,
-0.7208982706069946,
-0.5153977274894714,
-0.3741128444671631,
0.6999945044517517,
0.06310389935970306,
-0.9129735231399536,
-0.1133042573928833,
-0.242158442735672,
-0.3526640832424164,
0.13142144680023193,
-1.511009931564331,
-0.2635515332221985,
-0.5231833457946777,
-0.5488781929016113,
-1.3116517066955566,
0.001627444289624691,
1.4669872522354126,
-0.7188980579376221,
-0.24155063927173615,
0.45156893134117126,
0.5169481635093689,
0.5486927032470703,
0.6161031723022461,
-0.8550217151641846,
-0.06247195601463318,
-0.31658878922462463,
-0.22770217061042786,
0.3526141941547394,
1.3191485404968262,
-0.08478742092847824,
-0.9561516046524048,
0.6575634479522705,
-0.3338296115398407,
0.13944584131240845,
2.039522647857666,
0.10844156891107559,
-0.6355759501457214,
0.3623899221420288,
-0.7672353982925415,
1.843578577041626,
1.7177529335021973,
1.4434728622436523,
-0.18874700367450714,
-0.8563926815986633,
0.606346607208252,
-0.3764989972114563,
-0.40385276079177856,
0.9101014137268066,
0.3964632451534271,
-0.3190280497074127,
-1.422922134399414,
0.8464547991752625,
1.1422268152236938,
-0.8196856379508972,
-0.722076416015625,
0.2544756233692169,
-0.777482807636261,
1.2541478872299194,
0.40408945083618164,
0.31232696771621704,
0.34869492053985596,
1.5870678424835205,
0.7085614800453186,
-0.4048413336277008,
0.521119236946106,
0.5477879047393799,
-0.26803210377693176,
-2.087742567062378,
-1.1837290525436401,
0.5057107210159302,
-0.5959543585777283,
-1.528529167175293,
1.4475497007369995,
-1.1227655410766602,
-1.146882176399231,
0.5627594590187073,
-0.026335151866078377,
1.3011503219604492,
0.4670540690422058,
1.650006651878357,
2.10497784614563,
0.8618612885475159,
0.5181383490562439,
1.2209770679473877,
-0.18733765184879303,
-0.4865553677082062,
1.7748398780822754,
-0.44734928011894226,
0.5112898349761963,
1.14064621925354,
-0.37297341227531433,
-1.0743454694747925,
-0.7471604347229004,
-1.1835441589355469,
-0.5934773087501526,
1.123147964477539,
0.03517169505357742,
-1.0439367294311523,
0.25220224261283875,
1.5328495502471924,
0.1399877369403839,
-0.16959509253501892,
0.7072939872741699,
0.3150472640991211,
-0.7966283559799194,
-0.08228100836277008,
-0.9380287528038025,
0.5301992893218994,
-0.3279317021369934,
-0.38084378838539124,
0.23424695432186127,
0.5679695010185242,
1.3520729541778564,
-0.10433214902877808,
0.18322674930095673,
1.1246975660324097,
-1.424279808998108,
1.416353464126587,
-0.6224831342697144,
0.25287219882011414,
-2.3666186332702637,
1.3582805395126343,
-0.6010262370109558,
2.055675745010376,
-2.5786499977111816,
0.4175315201282501,
-0.5859166979789734,
-0.6157234907150269,
0.3062257766723633,
-0.3284958302974701,
0.13078534603118896,
-0.12133973091840744,
-1.0297214984893799,
0.03267339617013931,
-0.7402986884117126,
0.7021341919898987,
1.1017546653747559,
1.4372756481170654,
-1.1730457544326782,
-0.22827816009521484,
-1.592077374458313,
-0.17128513753414154,
-0.8602592349052429,
0.23542557656764984,
-1.9622896909713745,
-0.2073361575603485,
-2.0041842460632324,
-2.4888384342193604,
-1.2120864391326904,
-0.7271098494529724,
1.0606849193572998,
0.24967335164546967,
-0.8999041318893433,
1.3447571992874146,
-0.3274788558483124,
-1.8164349794387817,
1.1168322563171387,
-2.0404105186462402
] |
https://github.com/huggingface/datasets/issues/4875 | `_resolve_features` ignores the token | I got something similar in https://github.com/huggingface/datasets-server/pull/608. Look how changing the order of the tests (https://github.com/huggingface/datasets-server/pull/608/commits/2c50fe833323de3dfdc76c5cd68639279e0887f8) change the result, which means that something has a side-effect:
- https://github.com/huggingface/datasets-server/actions/runs/3264636253/jobs/5365612918 works
- https://github.com/huggingface/datasets-server/actions/runs/3264651839/jobs/5365654924 does not work
I still couldn't reproduce it with a simpler script... | ## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2 | 566 | 42 | `_resolve_features` ignores the token
## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
I got something similar in https://github.com/huggingface/datasets-server/pull/608. Look how changing the order of the tests (https://github.com/huggingface/datasets-server/pull/608/commits/2c50fe833323de3dfdc76c5cd68639279e0887f8) change the result, which means that something has a side-effect:
- https://github.com/huggingface/datasets-server/actions/runs/3264636253/jobs/5365612918 works
- https://github.com/huggingface/datasets-server/actions/runs/3264651839/jobs/5365654924 does not work
I still couldn't reproduce it with a simpler script... | [
-1.2811189889907837,
-0.9154444336891174,
-0.5744412541389465,
1.488728404045105,
-0.10419037193059921,
-1.2110341787338257,
0.26843857765197754,
-1.0324623584747314,
1.5456613302230835,
-0.8060516715049744,
0.25108540058135986,
-1.6083890199661255,
-0.026339909061789513,
-0.555762767791748,
-0.6320050358772278,
-0.9028801321983337,
-0.3497809171676636,
-0.7405957579612732,
1.1537467241287231,
2.406712770462036,
1.2791156768798828,
-1.3064976930618286,
2.7085587978363037,
0.6326770186424255,
-0.168434739112854,
-0.9860284328460693,
0.5123348832130432,
0.046871162950992584,
-1.2477535009384155,
-0.4707554578781128,
-0.8496996760368347,
-0.05046423524618149,
-0.6229242086410522,
-0.33668896555900574,
-0.0307941734790802,
0.5619955658912659,
-0.3399147391319275,
-0.3076609671115875,
-0.6177271604537964,
-0.7792229652404785,
0.5064303874969482,
-0.305820107460022,
0.8935908079147339,
-0.3367452919483185,
1.8770525455474854,
-0.5650131702423096,
0.5177491307258606,
0.7205970287322998,
1.1655725240707397,
0.1382633000612259,
0.02458241395652294,
0.19803710281848907,
0.28086328506469727,
0.004842427559196949,
0.5536724328994751,
1.1592768430709839,
0.6183038949966431,
0.5418691635131836,
0.5962592959403992,
-2.221187114715576,
1.3556934595108032,
-0.9090203642845154,
0.23115026950836182,
1.4469022750854492,
-0.9185292720794678,
0.339862585067749,
-1.7431433200836182,
-0.04993116855621338,
0.6232235431671143,
-2.2442939281463623,
0.3389592468738556,
-1.4486972093582153,
-0.5455631017684937,
0.9620541930198669,
0.3662624657154083,
-1.0938012599945068,
0.15145623683929443,
-0.5284515023231506,
1.223029375076294,
0.49513912200927734,
1.0197322368621826,
-1.7404959201812744,
-0.07561776041984558,
-0.18581166863441467,
0.15150131285190582,
-1.393602967262268,
-1.6853320598602295,
0.5868528485298157,
0.5569989085197449,
0.6577640771865845,
-0.07383648306131363,
1.1062809228897095,
-1.1462128162384033,
0.7733158469200134,
-1.142747402191162,
-1.499385118484497,
-1.415552020072937,
-2.424152374267578,
-2.342365026473999,
0.6780292987823486,
-0.47596871852874756,
-0.5220028162002563,
2.0116260051727295,
-1.0773943662643433,
-1.5961596965789795,
1.0546495914459229,
0.13995836675167084,
0.10141383111476898,
2.3959596157073975,
0.2255484014749527,
-0.7783055901527405,
0.4392549693584442,
-0.830997109413147,
0.7710089087486267,
-0.21307864785194397,
1.2486989498138428,
0.4910184144973755,
-1.1071133613586426,
1.486111044883728,
-0.3575490117073059,
0.6857352256774902,
-0.5706148743629456,
-0.6417393088340759,
-0.7086409330368042,
0.1060653030872345,
1.912868618965149,
-0.2030092477798462,
1.6091383695602417,
-0.2755921185016632,
-1.565077304840088,
-1.5873842239379883,
0.9737069606781006,
0.397821843624115,
-0.8814854621887207,
0.06282181292772293,
-0.5486565828323364,
0.18866845965385437,
-0.14408668875694275,
1.2026845216751099,
1.3012182712554932,
0.6545933485031128,
-0.4398134648799896,
-0.6946622133255005,
0.09902944415807724,
-0.10314767807722092,
-0.6320551037788391,
-1.7644224166870117,
-0.2536284625530243,
0.12082882225513458,
0.7193565964698792,
-1.1257041692733765,
1.8312889337539673,
0.8688491582870483,
1.8646754026412964,
0.9957760572433472,
-0.37088721990585327,
1.405269742012024,
0.03804559260606766,
1.7484192848205566,
-0.5747922658920288,
0.5389139652252197,
-0.3305024206638336,
-1.1225104331970215,
0.8834593892097473,
-0.22790643572807312,
-1.9696073532104492,
-0.8096218109130859,
-0.5613906383514404,
-0.19252289831638336,
-0.7398486137390137,
0.8975930213928223,
-0.29818102717399597,
-1.5082721710205078,
0.14373134076595306,
-0.6509538888931274,
0.3102780878543854,
-1.1272989511489868,
0.2548208236694336,
0.757098376750946,
-0.7012099027633667,
0.03819018602371216,
-0.1861301064491272,
-1.1699224710464478,
-0.44455277919769287,
0.4731672406196594,
1.8352400064468384,
-0.5078028440475464,
0.8521568179130554,
1.0694823265075684,
-0.6758366227149963,
0.05837269872426987,
0.09304480999708176,
-0.20255714654922485,
0.7486749887466431,
-1.0640723705291748,
-0.46239277720451355,
1.2464762926101685,
-0.40427321195602417,
-0.7104566097259521,
1.5520997047424316,
0.6736465096473694,
-1.1005812883377075,
-0.2568867802619934,
-0.16801513731479645,
-0.9357462525367737,
0.049117207527160645,
-1.4885250329971313,
-0.06074393540620804,
0.5112794041633606,
-1.5811445713043213,
-0.3486453592777252,
-0.1423855423927307,
1.3818562030792236,
-0.25665411353111267,
1.4093611240386963,
-0.3019463121891022,
-0.15810635685920715,
-0.24965813755989075,
-0.45888128876686096,
0.13202784955501556,
-0.1630139797925949,
-0.5213655829429626,
0.04318476468324661,
-0.8595004081726074,
0.29672783613204956,
1.4979411363601685,
0.27226370573043823,
-0.013231479562819004,
0.3369174301624298,
1.183330774307251,
0.38854536414146423,
-0.1542137861251831,
-0.8270607590675354,
-1.53622567653656,
1.8522788286209106,
-1.4262168407440186,
1.992274284362793,
0.7973231673240662,
-0.13910700380802155,
-1.815227746963501,
-1.7880533933639526,
1.1872258186340332,
1.1280622482299805,
2.338264226913452,
0.38530486822128296,
0.34806692600250244,
-0.8191310167312622,
-0.7465835213661194,
0.4197569191455841,
-0.9105650782585144,
-0.5945742726325989,
0.23894533514976501,
2.279972553253174,
1.79160737991333,
-0.4054242968559265,
-0.2330368608236313,
-0.9094581604003906,
1.3785011768341064,
-0.2118488848209381,
0.319115549325943,
2.02833890914917,
-0.2514666020870209,
-0.9874468445777893,
1.3781142234802246,
-2.372356653213501,
0.2715269923210144,
2.115609884262085,
0.27991974353790283,
0.14674343168735504,
-1.3290760517120361,
-0.5702651739120483,
-0.46813511848449707,
-0.3977055251598358,
-1.308374047279358,
0.44831526279449463,
-0.3100520670413971,
-0.6853949427604675,
-1.388617992401123,
0.18733718991279602,
-1.1507319211959839,
-1.6648482084274292,
0.34488242864608765,
1.9727696180343628,
2.0702097415924072,
-0.733058750629425,
1.409254789352417,
-0.38965460658073425,
0.07723270356655121,
1.2303597927093506,
1.4061648845672607,
3.067584276199341,
1.8348015546798706,
-1.278938889503479,
0.719096302986145,
-0.24947413802146912,
-0.5081622004508972,
1.13359797000885,
-1.1790050268173218,
1.2973190546035767,
-0.18617530167102814,
-1.2222102880477905,
-1.337043046951294,
1.0692437887191772,
0.557348906993866,
0.10401435196399689,
-0.5409644246101379,
1.2970528602600098,
0.11402087658643723,
1.4095324277877808,
0.6383390426635742,
-0.4748493731021881,
0.5367153882980347,
-0.47978731989860535,
-0.6712154746055603,
1.5392568111419678,
0.16502447426319122,
-1.5516549348831177,
-2.255490779876709,
-0.31773513555526733,
-0.8486179113388062,
0.09072785824537277,
-0.68332839012146,
-1.0820866823196411,
1.6455891132354736,
0.32926079630851746,
-1.294232726097107,
-0.2806415557861328,
-0.3114483654499054,
-0.4980398118495941,
2.765923261642456,
-1.1692159175872803,
-0.046630412340164185,
-0.9923310279846191,
-0.7473304271697998,
1.6875146627426147,
-1.3012032508850098,
-0.34212061762809753,
-1.0295326709747314,
-0.6291936039924622,
-1.2276345491409302,
-0.3823487460613251,
0.05020663142204285,
-0.9904007911682129,
0.7866542339324951,
0.12405979633331299,
-1.2279542684555054,
-0.35567179322242737,
-0.8794820308685303,
1.091326355934143,
-0.18958507478237152,
0.12940987944602966,
1.703171968460083,
0.16269008815288544,
-0.4433216154575348,
0.8051002025604248,
1.1937263011932373,
0.667251467704773,
-0.7487751245498657,
-0.046222008764743805,
-0.6617705821990967,
0.3956814110279083,
-1.2970225811004639,
0.2714855670928955,
-2.971771001815796,
0.6489323377609253,
-0.11298967897891998,
-0.12201440334320068,
-0.02410311996936798,
-1.4128079414367676,
1.0700201988220215,
2.551903247833252,
-1.2748562097549438,
0.4951552748680115,
0.4831680357456207,
1.0404932498931885,
-1.6297708749771118,
0.4060916304588318,
-0.5336971282958984,
1.9478133916854858,
0.28458142280578613,
1.3181002140045166,
-0.4523216485977173,
-2.312519073486328,
0.5594401359558105,
-1.1558125019073486,
-1.1594769954681396,
0.9507426023483276,
-1.0070679187774658,
0.2650834023952484,
-1.4319151639938354,
-0.30814337730407715,
-0.964778482913971,
-1.3214868307113647,
0.6076076030731201,
0.18155845999717712,
0.39625251293182373,
-0.5797735452651978,
0.32579877972602844,
-2.3299336433410645,
-1.329350471496582,
-0.21274493634700775,
-1.0049262046813965,
0.5931419134140015,
-0.5706595778465271,
0.5288438200950623,
-0.0504913255572319,
0.1275321990251541,
0.38580191135406494,
1.5781705379486084,
3.441234827041626,
0.22730964422225952,
0.17399494349956512,
-0.23070645332336426,
-0.9081097841262817,
1.5203267335891724,
0.9034872055053711,
-0.01654765009880066,
-0.5259848237037659,
-0.9447135329246521,
1.2032729387283325,
1.9575284719467163,
1.0233434438705444,
-0.058732204139232635,
-0.8906853795051575,
-0.705665647983551,
-0.09022130817174911,
0.1308785229921341,
0.5561995506286621,
0.9212196469306946,
0.08365355432033539,
0.13708308339118958,
1.3288108110427856,
1.0478477478027344,
-0.29290276765823364,
0.290215402841568,
-0.8781681060791016,
-0.4401888847351074,
0.49402064085006714,
0.18219268321990967,
-0.0640663132071495,
0.5362765789031982,
-1.0080558061599731,
-0.18475939333438873,
-0.4861931800842285,
-0.8256999254226685,
-0.7226371765136719,
-0.4540771543979645,
-0.4328865706920624,
1.5854285955429077,
0.06378801167011261,
-0.5376126170158386,
0.049162134528160095,
-0.660200297832489,
-0.30768677592277527,
-1.1918127536773682,
0.2707212567329407,
-0.03233823552727699,
-0.10979458689689636,
-0.21436724066734314,
1.6407124996185303,
-0.9532532691955566,
-2.115817070007324,
0.15945379436016083,
0.25585439801216125,
-0.18251147866249084,
0.125924214720726,
1.7798203229904175,
0.3668127954006195,
1.388346552848816,
1.2321362495422363,
0.9628633260726929,
-0.6412076354026794,
-1.3654695749282837,
0.7644949555397034,
0.9355019330978394,
-1.354245662689209,
0.9163027405738831,
-0.252632737159729,
-0.5359951853752136,
0.7091149687767029,
1.2054699659347534,
0.5777831077575684,
-1.9294534921646118,
0.8523157238960266,
-1.150656819343567,
0.751349151134491,
0.8253783583641052,
0.6800446510314941,
0.23345120251178741,
1.0013583898544312,
-1.0867758989334106,
-1.0983774662017822,
-0.5853436589241028,
-0.7207103371620178,
1.9024795293807983,
-0.4896284341812134,
0.6555034518241882,
-0.17083004117012024,
-1.1728931665420532,
-0.01132815983146429,
0.9054083824157715,
0.4108707904815674,
-0.46321138739585876,
0.8789717555046082,
-0.643278956413269,
-0.8552001118659973,
-1.1287095546722412,
-0.33324503898620605,
-1.1201143264770508,
-0.9660713076591492,
1.0477796792984009,
0.6526115536689758,
0.35336750745773315,
1.8254787921905518,
0.6848747730255127,
0.421623557806015,
-2.584805965423584,
0.8359211087226868,
0.23169995844364166,
-0.042299240827560425,
0.9605234861373901,
0.3337690234184265,
1.1240406036376953,
0.11575904488563538,
0.5522099137306213,
-2.506910800933838,
2.3530771732330322,
-0.23423509299755096,
0.5962400436401367,
-0.11206632852554321,
-0.2698577046394348,
1.1626510620117188,
0.6607275605201721,
0.40775880217552185,
-1.0423601865768433,
0.8535908460617065,
-0.41520220041275024,
1.0481129884719849,
0.8085217475891113,
-0.867755115032196,
0.053498610854148865,
1.4858157634735107,
0.4362275004386902,
-0.5956971049308777,
-0.9501729011535645,
-0.9351952075958252,
0.8443913459777832,
1.6203064918518066,
0.009984783828258514,
-0.07652774453163147,
0.7762209177017212,
0.6652467846870422,
-1.1438003778457642,
0.14312370121479034,
-0.502819299697876,
-0.7479490041732788,
1.6356645822525024,
2.0923502445220947,
-0.12193822115659714,
-0.04499896615743637,
-0.6737823486328125,
-1.173801064491272,
0.6822634935379028,
-0.058326661586761475,
0.018819628283381462,
0.5288559794425964,
-0.6481419801712036,
0.9663414359092712,
0.6943754553794861,
1.0091118812561035,
0.07445620000362396,
0.19603672623634338,
0.5265794992446899,
-0.31529662013053894,
-1.257506251335144,
-0.3657035529613495,
-1.1319279670715332,
-2.55755877494812,
0.3442668914794922,
-0.263712614774704,
-1.472205400466919,
0.06380505859851837,
-1.069490909576416,
0.9696755409240723,
-0.6028579473495483,
-1.117204189300537,
-1.5885347127914429,
0.23325906693935394,
-0.05789390951395035,
0.9821642637252808,
-1.6336643695831299,
-0.3448406755924225,
1.1179847717285156,
0.8050861358642578,
-0.6414539813995361,
1.0211362838745117,
0.1893475502729416,
0.924711287021637,
0.6901974081993103,
-0.39046669006347656,
0.6532230377197266,
0.14533182978630066,
-1.4381024837493896,
0.4994475245475769,
1.2452539205551147,
0.1803622990846634,
1.54360032081604,
-0.3806591033935547,
0.02516140602529049,
0.42122891545295715,
-0.7208982706069946,
-0.5153977274894714,
-0.3741128444671631,
0.6999945044517517,
0.06310389935970306,
-0.9129735231399536,
-0.1133042573928833,
-0.242158442735672,
-0.3526640832424164,
0.13142144680023193,
-1.511009931564331,
-0.2635515332221985,
-0.5231833457946777,
-0.5488781929016113,
-1.3116517066955566,
0.001627444289624691,
1.4669872522354126,
-0.7188980579376221,
-0.24155063927173615,
0.45156893134117126,
0.5169481635093689,
0.5486927032470703,
0.6161031723022461,
-0.8550217151641846,
-0.06247195601463318,
-0.31658878922462463,
-0.22770217061042786,
0.3526141941547394,
1.3191485404968262,
-0.08478742092847824,
-0.9561516046524048,
0.6575634479522705,
-0.3338296115398407,
0.13944584131240845,
2.039522647857666,
0.10844156891107559,
-0.6355759501457214,
0.3623899221420288,
-0.7672353982925415,
1.843578577041626,
1.7177529335021973,
1.4434728622436523,
-0.18874700367450714,
-0.8563926815986633,
0.606346607208252,
-0.3764989972114563,
-0.40385276079177856,
0.9101014137268066,
0.3964632451534271,
-0.3190280497074127,
-1.422922134399414,
0.8464547991752625,
1.1422268152236938,
-0.8196856379508972,
-0.722076416015625,
0.2544756233692169,
-0.777482807636261,
1.2541478872299194,
0.40408945083618164,
0.31232696771621704,
0.34869492053985596,
1.5870678424835205,
0.7085614800453186,
-0.4048413336277008,
0.521119236946106,
0.5477879047393799,
-0.26803210377693176,
-2.087742567062378,
-1.1837290525436401,
0.5057107210159302,
-0.5959543585777283,
-1.528529167175293,
1.4475497007369995,
-1.1227655410766602,
-1.146882176399231,
0.5627594590187073,
-0.026335151866078377,
1.3011503219604492,
0.4670540690422058,
1.650006651878357,
2.10497784614563,
0.8618612885475159,
0.5181383490562439,
1.2209770679473877,
-0.18733765184879303,
-0.4865553677082062,
1.7748398780822754,
-0.44734928011894226,
0.5112898349761963,
1.14064621925354,
-0.37297341227531433,
-1.0743454694747925,
-0.7471604347229004,
-1.1835441589355469,
-0.5934773087501526,
1.123147964477539,
0.03517169505357742,
-1.0439367294311523,
0.25220224261283875,
1.5328495502471924,
0.1399877369403839,
-0.16959509253501892,
0.7072939872741699,
0.3150472640991211,
-0.7966283559799194,
-0.08228100836277008,
-0.9380287528038025,
0.5301992893218994,
-0.3279317021369934,
-0.38084378838539124,
0.23424695432186127,
0.5679695010185242,
1.3520729541778564,
-0.10433214902877808,
0.18322674930095673,
1.1246975660324097,
-1.424279808998108,
1.416353464126587,
-0.6224831342697144,
0.25287219882011414,
-2.3666186332702637,
1.3582805395126343,
-0.6010262370109558,
2.055675745010376,
-2.5786499977111816,
0.4175315201282501,
-0.5859166979789734,
-0.6157234907150269,
0.3062257766723633,
-0.3284958302974701,
0.13078534603118896,
-0.12133973091840744,
-1.0297214984893799,
0.03267339617013931,
-0.7402986884117126,
0.7021341919898987,
1.1017546653747559,
1.4372756481170654,
-1.1730457544326782,
-0.22827816009521484,
-1.592077374458313,
-0.17128513753414154,
-0.8602592349052429,
0.23542557656764984,
-1.9622896909713745,
-0.2073361575603485,
-2.0041842460632324,
-2.4888384342193604,
-1.2120864391326904,
-0.7271098494529724,
1.0606849193572998,
0.24967335164546967,
-0.8999041318893433,
1.3447571992874146,
-0.3274788558483124,
-1.8164349794387817,
1.1168322563171387,
-2.0404105186462402
] |
https://github.com/huggingface/datasets/issues/4875 | `_resolve_features` ignores the token | The issue happens because `extend_module_for_streaming` can't be used several times on packaged builders like `csv` to apply a new auth token. Indeed `extend_module_for_streaming` only applies authentication once, and on subsequent calls does nothing:
https://github.com/huggingface/datasets/blob/07b7c38d9e9c72c74b02524c432ca64d0d3738f4/src/datasets/streaming.py#L62-L64
This behavior exists because the authenticatoin wrapper only supports one token. This is an issue for packaged builders which can be used to load several datasets, so it may require several tokens.
This can be fixed by storing a dict `token_per_repo_id` instead of `use_auth_token` in the authentication wrapper, and by making it possible to update the authentication wrapper with a new token | ## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2 | 566 | 96 | `_resolve_features` ignores the token
## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
The issue happens because `extend_module_for_streaming` can't be used several times on packaged builders like `csv` to apply a new auth token. Indeed `extend_module_for_streaming` only applies authentication once, and on subsequent calls does nothing:
https://github.com/huggingface/datasets/blob/07b7c38d9e9c72c74b02524c432ca64d0d3738f4/src/datasets/streaming.py#L62-L64
This behavior exists because the authenticatoin wrapper only supports one token. This is an issue for packaged builders which can be used to load several datasets, so it may require several tokens.
This can be fixed by storing a dict `token_per_repo_id` instead of `use_auth_token` in the authentication wrapper, and by making it possible to update the authentication wrapper with a new token | [
-1.2811189889907837,
-0.9154444336891174,
-0.5744412541389465,
1.488728404045105,
-0.10419037193059921,
-1.2110341787338257,
0.26843857765197754,
-1.0324623584747314,
1.5456613302230835,
-0.8060516715049744,
0.25108540058135986,
-1.6083890199661255,
-0.026339909061789513,
-0.555762767791748,
-0.6320050358772278,
-0.9028801321983337,
-0.3497809171676636,
-0.7405957579612732,
1.1537467241287231,
2.406712770462036,
1.2791156768798828,
-1.3064976930618286,
2.7085587978363037,
0.6326770186424255,
-0.168434739112854,
-0.9860284328460693,
0.5123348832130432,
0.046871162950992584,
-1.2477535009384155,
-0.4707554578781128,
-0.8496996760368347,
-0.05046423524618149,
-0.6229242086410522,
-0.33668896555900574,
-0.0307941734790802,
0.5619955658912659,
-0.3399147391319275,
-0.3076609671115875,
-0.6177271604537964,
-0.7792229652404785,
0.5064303874969482,
-0.305820107460022,
0.8935908079147339,
-0.3367452919483185,
1.8770525455474854,
-0.5650131702423096,
0.5177491307258606,
0.7205970287322998,
1.1655725240707397,
0.1382633000612259,
0.02458241395652294,
0.19803710281848907,
0.28086328506469727,
0.004842427559196949,
0.5536724328994751,
1.1592768430709839,
0.6183038949966431,
0.5418691635131836,
0.5962592959403992,
-2.221187114715576,
1.3556934595108032,
-0.9090203642845154,
0.23115026950836182,
1.4469022750854492,
-0.9185292720794678,
0.339862585067749,
-1.7431433200836182,
-0.04993116855621338,
0.6232235431671143,
-2.2442939281463623,
0.3389592468738556,
-1.4486972093582153,
-0.5455631017684937,
0.9620541930198669,
0.3662624657154083,
-1.0938012599945068,
0.15145623683929443,
-0.5284515023231506,
1.223029375076294,
0.49513912200927734,
1.0197322368621826,
-1.7404959201812744,
-0.07561776041984558,
-0.18581166863441467,
0.15150131285190582,
-1.393602967262268,
-1.6853320598602295,
0.5868528485298157,
0.5569989085197449,
0.6577640771865845,
-0.07383648306131363,
1.1062809228897095,
-1.1462128162384033,
0.7733158469200134,
-1.142747402191162,
-1.499385118484497,
-1.415552020072937,
-2.424152374267578,
-2.342365026473999,
0.6780292987823486,
-0.47596871852874756,
-0.5220028162002563,
2.0116260051727295,
-1.0773943662643433,
-1.5961596965789795,
1.0546495914459229,
0.13995836675167084,
0.10141383111476898,
2.3959596157073975,
0.2255484014749527,
-0.7783055901527405,
0.4392549693584442,
-0.830997109413147,
0.7710089087486267,
-0.21307864785194397,
1.2486989498138428,
0.4910184144973755,
-1.1071133613586426,
1.486111044883728,
-0.3575490117073059,
0.6857352256774902,
-0.5706148743629456,
-0.6417393088340759,
-0.7086409330368042,
0.1060653030872345,
1.912868618965149,
-0.2030092477798462,
1.6091383695602417,
-0.2755921185016632,
-1.565077304840088,
-1.5873842239379883,
0.9737069606781006,
0.397821843624115,
-0.8814854621887207,
0.06282181292772293,
-0.5486565828323364,
0.18866845965385437,
-0.14408668875694275,
1.2026845216751099,
1.3012182712554932,
0.6545933485031128,
-0.4398134648799896,
-0.6946622133255005,
0.09902944415807724,
-0.10314767807722092,
-0.6320551037788391,
-1.7644224166870117,
-0.2536284625530243,
0.12082882225513458,
0.7193565964698792,
-1.1257041692733765,
1.8312889337539673,
0.8688491582870483,
1.8646754026412964,
0.9957760572433472,
-0.37088721990585327,
1.405269742012024,
0.03804559260606766,
1.7484192848205566,
-0.5747922658920288,
0.5389139652252197,
-0.3305024206638336,
-1.1225104331970215,
0.8834593892097473,
-0.22790643572807312,
-1.9696073532104492,
-0.8096218109130859,
-0.5613906383514404,
-0.19252289831638336,
-0.7398486137390137,
0.8975930213928223,
-0.29818102717399597,
-1.5082721710205078,
0.14373134076595306,
-0.6509538888931274,
0.3102780878543854,
-1.1272989511489868,
0.2548208236694336,
0.757098376750946,
-0.7012099027633667,
0.03819018602371216,
-0.1861301064491272,
-1.1699224710464478,
-0.44455277919769287,
0.4731672406196594,
1.8352400064468384,
-0.5078028440475464,
0.8521568179130554,
1.0694823265075684,
-0.6758366227149963,
0.05837269872426987,
0.09304480999708176,
-0.20255714654922485,
0.7486749887466431,
-1.0640723705291748,
-0.46239277720451355,
1.2464762926101685,
-0.40427321195602417,
-0.7104566097259521,
1.5520997047424316,
0.6736465096473694,
-1.1005812883377075,
-0.2568867802619934,
-0.16801513731479645,
-0.9357462525367737,
0.049117207527160645,
-1.4885250329971313,
-0.06074393540620804,
0.5112794041633606,
-1.5811445713043213,
-0.3486453592777252,
-0.1423855423927307,
1.3818562030792236,
-0.25665411353111267,
1.4093611240386963,
-0.3019463121891022,
-0.15810635685920715,
-0.24965813755989075,
-0.45888128876686096,
0.13202784955501556,
-0.1630139797925949,
-0.5213655829429626,
0.04318476468324661,
-0.8595004081726074,
0.29672783613204956,
1.4979411363601685,
0.27226370573043823,
-0.013231479562819004,
0.3369174301624298,
1.183330774307251,
0.38854536414146423,
-0.1542137861251831,
-0.8270607590675354,
-1.53622567653656,
1.8522788286209106,
-1.4262168407440186,
1.992274284362793,
0.7973231673240662,
-0.13910700380802155,
-1.815227746963501,
-1.7880533933639526,
1.1872258186340332,
1.1280622482299805,
2.338264226913452,
0.38530486822128296,
0.34806692600250244,
-0.8191310167312622,
-0.7465835213661194,
0.4197569191455841,
-0.9105650782585144,
-0.5945742726325989,
0.23894533514976501,
2.279972553253174,
1.79160737991333,
-0.4054242968559265,
-0.2330368608236313,
-0.9094581604003906,
1.3785011768341064,
-0.2118488848209381,
0.319115549325943,
2.02833890914917,
-0.2514666020870209,
-0.9874468445777893,
1.3781142234802246,
-2.372356653213501,
0.2715269923210144,
2.115609884262085,
0.27991974353790283,
0.14674343168735504,
-1.3290760517120361,
-0.5702651739120483,
-0.46813511848449707,
-0.3977055251598358,
-1.308374047279358,
0.44831526279449463,
-0.3100520670413971,
-0.6853949427604675,
-1.388617992401123,
0.18733718991279602,
-1.1507319211959839,
-1.6648482084274292,
0.34488242864608765,
1.9727696180343628,
2.0702097415924072,
-0.733058750629425,
1.409254789352417,
-0.38965460658073425,
0.07723270356655121,
1.2303597927093506,
1.4061648845672607,
3.067584276199341,
1.8348015546798706,
-1.278938889503479,
0.719096302986145,
-0.24947413802146912,
-0.5081622004508972,
1.13359797000885,
-1.1790050268173218,
1.2973190546035767,
-0.18617530167102814,
-1.2222102880477905,
-1.337043046951294,
1.0692437887191772,
0.557348906993866,
0.10401435196399689,
-0.5409644246101379,
1.2970528602600098,
0.11402087658643723,
1.4095324277877808,
0.6383390426635742,
-0.4748493731021881,
0.5367153882980347,
-0.47978731989860535,
-0.6712154746055603,
1.5392568111419678,
0.16502447426319122,
-1.5516549348831177,
-2.255490779876709,
-0.31773513555526733,
-0.8486179113388062,
0.09072785824537277,
-0.68332839012146,
-1.0820866823196411,
1.6455891132354736,
0.32926079630851746,
-1.294232726097107,
-0.2806415557861328,
-0.3114483654499054,
-0.4980398118495941,
2.765923261642456,
-1.1692159175872803,
-0.046630412340164185,
-0.9923310279846191,
-0.7473304271697998,
1.6875146627426147,
-1.3012032508850098,
-0.34212061762809753,
-1.0295326709747314,
-0.6291936039924622,
-1.2276345491409302,
-0.3823487460613251,
0.05020663142204285,
-0.9904007911682129,
0.7866542339324951,
0.12405979633331299,
-1.2279542684555054,
-0.35567179322242737,
-0.8794820308685303,
1.091326355934143,
-0.18958507478237152,
0.12940987944602966,
1.703171968460083,
0.16269008815288544,
-0.4433216154575348,
0.8051002025604248,
1.1937263011932373,
0.667251467704773,
-0.7487751245498657,
-0.046222008764743805,
-0.6617705821990967,
0.3956814110279083,
-1.2970225811004639,
0.2714855670928955,
-2.971771001815796,
0.6489323377609253,
-0.11298967897891998,
-0.12201440334320068,
-0.02410311996936798,
-1.4128079414367676,
1.0700201988220215,
2.551903247833252,
-1.2748562097549438,
0.4951552748680115,
0.4831680357456207,
1.0404932498931885,
-1.6297708749771118,
0.4060916304588318,
-0.5336971282958984,
1.9478133916854858,
0.28458142280578613,
1.3181002140045166,
-0.4523216485977173,
-2.312519073486328,
0.5594401359558105,
-1.1558125019073486,
-1.1594769954681396,
0.9507426023483276,
-1.0070679187774658,
0.2650834023952484,
-1.4319151639938354,
-0.30814337730407715,
-0.964778482913971,
-1.3214868307113647,
0.6076076030731201,
0.18155845999717712,
0.39625251293182373,
-0.5797735452651978,
0.32579877972602844,
-2.3299336433410645,
-1.329350471496582,
-0.21274493634700775,
-1.0049262046813965,
0.5931419134140015,
-0.5706595778465271,
0.5288438200950623,
-0.0504913255572319,
0.1275321990251541,
0.38580191135406494,
1.5781705379486084,
3.441234827041626,
0.22730964422225952,
0.17399494349956512,
-0.23070645332336426,
-0.9081097841262817,
1.5203267335891724,
0.9034872055053711,
-0.01654765009880066,
-0.5259848237037659,
-0.9447135329246521,
1.2032729387283325,
1.9575284719467163,
1.0233434438705444,
-0.058732204139232635,
-0.8906853795051575,
-0.705665647983551,
-0.09022130817174911,
0.1308785229921341,
0.5561995506286621,
0.9212196469306946,
0.08365355432033539,
0.13708308339118958,
1.3288108110427856,
1.0478477478027344,
-0.29290276765823364,
0.290215402841568,
-0.8781681060791016,
-0.4401888847351074,
0.49402064085006714,
0.18219268321990967,
-0.0640663132071495,
0.5362765789031982,
-1.0080558061599731,
-0.18475939333438873,
-0.4861931800842285,
-0.8256999254226685,
-0.7226371765136719,
-0.4540771543979645,
-0.4328865706920624,
1.5854285955429077,
0.06378801167011261,
-0.5376126170158386,
0.049162134528160095,
-0.660200297832489,
-0.30768677592277527,
-1.1918127536773682,
0.2707212567329407,
-0.03233823552727699,
-0.10979458689689636,
-0.21436724066734314,
1.6407124996185303,
-0.9532532691955566,
-2.115817070007324,
0.15945379436016083,
0.25585439801216125,
-0.18251147866249084,
0.125924214720726,
1.7798203229904175,
0.3668127954006195,
1.388346552848816,
1.2321362495422363,
0.9628633260726929,
-0.6412076354026794,
-1.3654695749282837,
0.7644949555397034,
0.9355019330978394,
-1.354245662689209,
0.9163027405738831,
-0.252632737159729,
-0.5359951853752136,
0.7091149687767029,
1.2054699659347534,
0.5777831077575684,
-1.9294534921646118,
0.8523157238960266,
-1.150656819343567,
0.751349151134491,
0.8253783583641052,
0.6800446510314941,
0.23345120251178741,
1.0013583898544312,
-1.0867758989334106,
-1.0983774662017822,
-0.5853436589241028,
-0.7207103371620178,
1.9024795293807983,
-0.4896284341812134,
0.6555034518241882,
-0.17083004117012024,
-1.1728931665420532,
-0.01132815983146429,
0.9054083824157715,
0.4108707904815674,
-0.46321138739585876,
0.8789717555046082,
-0.643278956413269,
-0.8552001118659973,
-1.1287095546722412,
-0.33324503898620605,
-1.1201143264770508,
-0.9660713076591492,
1.0477796792984009,
0.6526115536689758,
0.35336750745773315,
1.8254787921905518,
0.6848747730255127,
0.421623557806015,
-2.584805965423584,
0.8359211087226868,
0.23169995844364166,
-0.042299240827560425,
0.9605234861373901,
0.3337690234184265,
1.1240406036376953,
0.11575904488563538,
0.5522099137306213,
-2.506910800933838,
2.3530771732330322,
-0.23423509299755096,
0.5962400436401367,
-0.11206632852554321,
-0.2698577046394348,
1.1626510620117188,
0.6607275605201721,
0.40775880217552185,
-1.0423601865768433,
0.8535908460617065,
-0.41520220041275024,
1.0481129884719849,
0.8085217475891113,
-0.867755115032196,
0.053498610854148865,
1.4858157634735107,
0.4362275004386902,
-0.5956971049308777,
-0.9501729011535645,
-0.9351952075958252,
0.8443913459777832,
1.6203064918518066,
0.009984783828258514,
-0.07652774453163147,
0.7762209177017212,
0.6652467846870422,
-1.1438003778457642,
0.14312370121479034,
-0.502819299697876,
-0.7479490041732788,
1.6356645822525024,
2.0923502445220947,
-0.12193822115659714,
-0.04499896615743637,
-0.6737823486328125,
-1.173801064491272,
0.6822634935379028,
-0.058326661586761475,
0.018819628283381462,
0.5288559794425964,
-0.6481419801712036,
0.9663414359092712,
0.6943754553794861,
1.0091118812561035,
0.07445620000362396,
0.19603672623634338,
0.5265794992446899,
-0.31529662013053894,
-1.257506251335144,
-0.3657035529613495,
-1.1319279670715332,
-2.55755877494812,
0.3442668914794922,
-0.263712614774704,
-1.472205400466919,
0.06380505859851837,
-1.069490909576416,
0.9696755409240723,
-0.6028579473495483,
-1.117204189300537,
-1.5885347127914429,
0.23325906693935394,
-0.05789390951395035,
0.9821642637252808,
-1.6336643695831299,
-0.3448406755924225,
1.1179847717285156,
0.8050861358642578,
-0.6414539813995361,
1.0211362838745117,
0.1893475502729416,
0.924711287021637,
0.6901974081993103,
-0.39046669006347656,
0.6532230377197266,
0.14533182978630066,
-1.4381024837493896,
0.4994475245475769,
1.2452539205551147,
0.1803622990846634,
1.54360032081604,
-0.3806591033935547,
0.02516140602529049,
0.42122891545295715,
-0.7208982706069946,
-0.5153977274894714,
-0.3741128444671631,
0.6999945044517517,
0.06310389935970306,
-0.9129735231399536,
-0.1133042573928833,
-0.242158442735672,
-0.3526640832424164,
0.13142144680023193,
-1.511009931564331,
-0.2635515332221985,
-0.5231833457946777,
-0.5488781929016113,
-1.3116517066955566,
0.001627444289624691,
1.4669872522354126,
-0.7188980579376221,
-0.24155063927173615,
0.45156893134117126,
0.5169481635093689,
0.5486927032470703,
0.6161031723022461,
-0.8550217151641846,
-0.06247195601463318,
-0.31658878922462463,
-0.22770217061042786,
0.3526141941547394,
1.3191485404968262,
-0.08478742092847824,
-0.9561516046524048,
0.6575634479522705,
-0.3338296115398407,
0.13944584131240845,
2.039522647857666,
0.10844156891107559,
-0.6355759501457214,
0.3623899221420288,
-0.7672353982925415,
1.843578577041626,
1.7177529335021973,
1.4434728622436523,
-0.18874700367450714,
-0.8563926815986633,
0.606346607208252,
-0.3764989972114563,
-0.40385276079177856,
0.9101014137268066,
0.3964632451534271,
-0.3190280497074127,
-1.422922134399414,
0.8464547991752625,
1.1422268152236938,
-0.8196856379508972,
-0.722076416015625,
0.2544756233692169,
-0.777482807636261,
1.2541478872299194,
0.40408945083618164,
0.31232696771621704,
0.34869492053985596,
1.5870678424835205,
0.7085614800453186,
-0.4048413336277008,
0.521119236946106,
0.5477879047393799,
-0.26803210377693176,
-2.087742567062378,
-1.1837290525436401,
0.5057107210159302,
-0.5959543585777283,
-1.528529167175293,
1.4475497007369995,
-1.1227655410766602,
-1.146882176399231,
0.5627594590187073,
-0.026335151866078377,
1.3011503219604492,
0.4670540690422058,
1.650006651878357,
2.10497784614563,
0.8618612885475159,
0.5181383490562439,
1.2209770679473877,
-0.18733765184879303,
-0.4865553677082062,
1.7748398780822754,
-0.44734928011894226,
0.5112898349761963,
1.14064621925354,
-0.37297341227531433,
-1.0743454694747925,
-0.7471604347229004,
-1.1835441589355469,
-0.5934773087501526,
1.123147964477539,
0.03517169505357742,
-1.0439367294311523,
0.25220224261283875,
1.5328495502471924,
0.1399877369403839,
-0.16959509253501892,
0.7072939872741699,
0.3150472640991211,
-0.7966283559799194,
-0.08228100836277008,
-0.9380287528038025,
0.5301992893218994,
-0.3279317021369934,
-0.38084378838539124,
0.23424695432186127,
0.5679695010185242,
1.3520729541778564,
-0.10433214902877808,
0.18322674930095673,
1.1246975660324097,
-1.424279808998108,
1.416353464126587,
-0.6224831342697144,
0.25287219882011414,
-2.3666186332702637,
1.3582805395126343,
-0.6010262370109558,
2.055675745010376,
-2.5786499977111816,
0.4175315201282501,
-0.5859166979789734,
-0.6157234907150269,
0.3062257766723633,
-0.3284958302974701,
0.13078534603118896,
-0.12133973091840744,
-1.0297214984893799,
0.03267339617013931,
-0.7402986884117126,
0.7021341919898987,
1.1017546653747559,
1.4372756481170654,
-1.1730457544326782,
-0.22827816009521484,
-1.592077374458313,
-0.17128513753414154,
-0.8602592349052429,
0.23542557656764984,
-1.9622896909713745,
-0.2073361575603485,
-2.0041842460632324,
-2.4888384342193604,
-1.2120864391326904,
-0.7271098494529724,
1.0606849193572998,
0.24967335164546967,
-0.8999041318893433,
1.3447571992874146,
-0.3274788558483124,
-1.8164349794387817,
1.1168322563171387,
-2.0404105186462402
] |
https://github.com/huggingface/datasets/issues/4875 | `_resolve_features` ignores the token | > This can be fixed by storing a dict token_per_repo_id instead of use_auth_token in the authentication wrapper, and by making it possible to update the authentication wrapper with a new token
If I call the module on the same repo twice: first with authentication, then without authentication, would the second call use authentication anyway? It sounds like a bug: the argument passed to the function would be silently ignored. | ## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2 | 566 | 69 | `_resolve_features` ignores the token
## Describe the bug
When calling [`_resolve_features()`](https://github.com/huggingface/datasets/blob/54b532a8a2f5353fdb0207578162153f7b2da2ec/src/datasets/iterable_dataset.py#L1255) on a gated dataset, ie. a dataset which requires a token to be loaded, the token seems to be ignored even if it has been provided to `load_dataset` before.
## Steps to reproduce the bug
```python
import os
os.environ["HF_ENDPOINT"] = "https://hub-ci.huggingface.co/"
hf_token = "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"
from datasets import load_dataset
# public
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654226756"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654226756"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
iterable_dataset = iterable_dataset._resolve_features()
print(iterable_dataset.features)
# gated
dataset_name = "__DUMMY_DATASETS_SERVER_USER__/repo_csv_data-16612654317644"
config_name = "__DUMMY_DATASETS_SERVER_USER__--repo_csv_data-16612654317644"
split_name = "train"
iterable_dataset = load_dataset(
dataset_name,
name=config_name,
split=split_name,
streaming=True,
use_auth_token=hf_token,
)
try:
iterable_dataset = iterable_dataset._resolve_features()
except FileNotFoundError as e:
print("FAILS")
```
## Expected results
I expect to have the same result on a public dataset and on a gated (or private) dataset, if the token has been provided.
## Actual results
An exception is thrown on gated datasets.
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.15.0-1017-aws-x86_64-with-glibc2.35
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
> This can be fixed by storing a dict token_per_repo_id instead of use_auth_token in the authentication wrapper, and by making it possible to update the authentication wrapper with a new token
If I call the module on the same repo twice: first with authentication, then without authentication, would the second call use authentication anyway? It sounds like a bug: the argument passed to the function would be silently ignored. | [
-1.2811189889907837,
-0.9154444336891174,
-0.5744412541389465,
1.488728404045105,
-0.10419037193059921,
-1.2110341787338257,
0.26843857765197754,
-1.0324623584747314,
1.5456613302230835,
-0.8060516715049744,
0.25108540058135986,
-1.6083890199661255,
-0.026339909061789513,
-0.555762767791748,
-0.6320050358772278,
-0.9028801321983337,
-0.3497809171676636,
-0.7405957579612732,
1.1537467241287231,
2.406712770462036,
1.2791156768798828,
-1.3064976930618286,
2.7085587978363037,
0.6326770186424255,
-0.168434739112854,
-0.9860284328460693,
0.5123348832130432,
0.046871162950992584,
-1.2477535009384155,
-0.4707554578781128,
-0.8496996760368347,
-0.05046423524618149,
-0.6229242086410522,
-0.33668896555900574,
-0.0307941734790802,
0.5619955658912659,
-0.3399147391319275,
-0.3076609671115875,
-0.6177271604537964,
-0.7792229652404785,
0.5064303874969482,
-0.305820107460022,
0.8935908079147339,
-0.3367452919483185,
1.8770525455474854,
-0.5650131702423096,
0.5177491307258606,
0.7205970287322998,
1.1655725240707397,
0.1382633000612259,
0.02458241395652294,
0.19803710281848907,
0.28086328506469727,
0.004842427559196949,
0.5536724328994751,
1.1592768430709839,
0.6183038949966431,
0.5418691635131836,
0.5962592959403992,
-2.221187114715576,
1.3556934595108032,
-0.9090203642845154,
0.23115026950836182,
1.4469022750854492,
-0.9185292720794678,
0.339862585067749,
-1.7431433200836182,
-0.04993116855621338,
0.6232235431671143,
-2.2442939281463623,
0.3389592468738556,
-1.4486972093582153,
-0.5455631017684937,
0.9620541930198669,
0.3662624657154083,
-1.0938012599945068,
0.15145623683929443,
-0.5284515023231506,
1.223029375076294,
0.49513912200927734,
1.0197322368621826,
-1.7404959201812744,
-0.07561776041984558,
-0.18581166863441467,
0.15150131285190582,
-1.393602967262268,
-1.6853320598602295,
0.5868528485298157,
0.5569989085197449,
0.6577640771865845,
-0.07383648306131363,
1.1062809228897095,
-1.1462128162384033,
0.7733158469200134,
-1.142747402191162,
-1.499385118484497,
-1.415552020072937,
-2.424152374267578,
-2.342365026473999,
0.6780292987823486,
-0.47596871852874756,
-0.5220028162002563,
2.0116260051727295,
-1.0773943662643433,
-1.5961596965789795,
1.0546495914459229,
0.13995836675167084,
0.10141383111476898,
2.3959596157073975,
0.2255484014749527,
-0.7783055901527405,
0.4392549693584442,
-0.830997109413147,
0.7710089087486267,
-0.21307864785194397,
1.2486989498138428,
0.4910184144973755,
-1.1071133613586426,
1.486111044883728,
-0.3575490117073059,
0.6857352256774902,
-0.5706148743629456,
-0.6417393088340759,
-0.7086409330368042,
0.1060653030872345,
1.912868618965149,
-0.2030092477798462,
1.6091383695602417,
-0.2755921185016632,
-1.565077304840088,
-1.5873842239379883,
0.9737069606781006,
0.397821843624115,
-0.8814854621887207,
0.06282181292772293,
-0.5486565828323364,
0.18866845965385437,
-0.14408668875694275,
1.2026845216751099,
1.3012182712554932,
0.6545933485031128,
-0.4398134648799896,
-0.6946622133255005,
0.09902944415807724,
-0.10314767807722092,
-0.6320551037788391,
-1.7644224166870117,
-0.2536284625530243,
0.12082882225513458,
0.7193565964698792,
-1.1257041692733765,
1.8312889337539673,
0.8688491582870483,
1.8646754026412964,
0.9957760572433472,
-0.37088721990585327,
1.405269742012024,
0.03804559260606766,
1.7484192848205566,
-0.5747922658920288,
0.5389139652252197,
-0.3305024206638336,
-1.1225104331970215,
0.8834593892097473,
-0.22790643572807312,
-1.9696073532104492,
-0.8096218109130859,
-0.5613906383514404,
-0.19252289831638336,
-0.7398486137390137,
0.8975930213928223,
-0.29818102717399597,
-1.5082721710205078,
0.14373134076595306,
-0.6509538888931274,
0.3102780878543854,
-1.1272989511489868,
0.2548208236694336,
0.757098376750946,
-0.7012099027633667,
0.03819018602371216,
-0.1861301064491272,
-1.1699224710464478,
-0.44455277919769287,
0.4731672406196594,
1.8352400064468384,
-0.5078028440475464,
0.8521568179130554,
1.0694823265075684,
-0.6758366227149963,
0.05837269872426987,
0.09304480999708176,
-0.20255714654922485,
0.7486749887466431,
-1.0640723705291748,
-0.46239277720451355,
1.2464762926101685,
-0.40427321195602417,
-0.7104566097259521,
1.5520997047424316,
0.6736465096473694,
-1.1005812883377075,
-0.2568867802619934,
-0.16801513731479645,
-0.9357462525367737,
0.049117207527160645,
-1.4885250329971313,
-0.06074393540620804,
0.5112794041633606,
-1.5811445713043213,
-0.3486453592777252,
-0.1423855423927307,
1.3818562030792236,
-0.25665411353111267,
1.4093611240386963,
-0.3019463121891022,
-0.15810635685920715,
-0.24965813755989075,
-0.45888128876686096,
0.13202784955501556,
-0.1630139797925949,
-0.5213655829429626,
0.04318476468324661,
-0.8595004081726074,
0.29672783613204956,
1.4979411363601685,
0.27226370573043823,
-0.013231479562819004,
0.3369174301624298,
1.183330774307251,
0.38854536414146423,
-0.1542137861251831,
-0.8270607590675354,
-1.53622567653656,
1.8522788286209106,
-1.4262168407440186,
1.992274284362793,
0.7973231673240662,
-0.13910700380802155,
-1.815227746963501,
-1.7880533933639526,
1.1872258186340332,
1.1280622482299805,
2.338264226913452,
0.38530486822128296,
0.34806692600250244,
-0.8191310167312622,
-0.7465835213661194,
0.4197569191455841,
-0.9105650782585144,
-0.5945742726325989,
0.23894533514976501,
2.279972553253174,
1.79160737991333,
-0.4054242968559265,
-0.2330368608236313,
-0.9094581604003906,
1.3785011768341064,
-0.2118488848209381,
0.319115549325943,
2.02833890914917,
-0.2514666020870209,
-0.9874468445777893,
1.3781142234802246,
-2.372356653213501,
0.2715269923210144,
2.115609884262085,
0.27991974353790283,
0.14674343168735504,
-1.3290760517120361,
-0.5702651739120483,
-0.46813511848449707,
-0.3977055251598358,
-1.308374047279358,
0.44831526279449463,
-0.3100520670413971,
-0.6853949427604675,
-1.388617992401123,
0.18733718991279602,
-1.1507319211959839,
-1.6648482084274292,
0.34488242864608765,
1.9727696180343628,
2.0702097415924072,
-0.733058750629425,
1.409254789352417,
-0.38965460658073425,
0.07723270356655121,
1.2303597927093506,
1.4061648845672607,
3.067584276199341,
1.8348015546798706,
-1.278938889503479,
0.719096302986145,
-0.24947413802146912,
-0.5081622004508972,
1.13359797000885,
-1.1790050268173218,
1.2973190546035767,
-0.18617530167102814,
-1.2222102880477905,
-1.337043046951294,
1.0692437887191772,
0.557348906993866,
0.10401435196399689,
-0.5409644246101379,
1.2970528602600098,
0.11402087658643723,
1.4095324277877808,
0.6383390426635742,
-0.4748493731021881,
0.5367153882980347,
-0.47978731989860535,
-0.6712154746055603,
1.5392568111419678,
0.16502447426319122,
-1.5516549348831177,
-2.255490779876709,
-0.31773513555526733,
-0.8486179113388062,
0.09072785824537277,
-0.68332839012146,
-1.0820866823196411,
1.6455891132354736,
0.32926079630851746,
-1.294232726097107,
-0.2806415557861328,
-0.3114483654499054,
-0.4980398118495941,
2.765923261642456,
-1.1692159175872803,
-0.046630412340164185,
-0.9923310279846191,
-0.7473304271697998,
1.6875146627426147,
-1.3012032508850098,
-0.34212061762809753,
-1.0295326709747314,
-0.6291936039924622,
-1.2276345491409302,
-0.3823487460613251,
0.05020663142204285,
-0.9904007911682129,
0.7866542339324951,
0.12405979633331299,
-1.2279542684555054,
-0.35567179322242737,
-0.8794820308685303,
1.091326355934143,
-0.18958507478237152,
0.12940987944602966,
1.703171968460083,
0.16269008815288544,
-0.4433216154575348,
0.8051002025604248,
1.1937263011932373,
0.667251467704773,
-0.7487751245498657,
-0.046222008764743805,
-0.6617705821990967,
0.3956814110279083,
-1.2970225811004639,
0.2714855670928955,
-2.971771001815796,
0.6489323377609253,
-0.11298967897891998,
-0.12201440334320068,
-0.02410311996936798,
-1.4128079414367676,
1.0700201988220215,
2.551903247833252,
-1.2748562097549438,
0.4951552748680115,
0.4831680357456207,
1.0404932498931885,
-1.6297708749771118,
0.4060916304588318,
-0.5336971282958984,
1.9478133916854858,
0.28458142280578613,
1.3181002140045166,
-0.4523216485977173,
-2.312519073486328,
0.5594401359558105,
-1.1558125019073486,
-1.1594769954681396,
0.9507426023483276,
-1.0070679187774658,
0.2650834023952484,
-1.4319151639938354,
-0.30814337730407715,
-0.964778482913971,
-1.3214868307113647,
0.6076076030731201,
0.18155845999717712,
0.39625251293182373,
-0.5797735452651978,
0.32579877972602844,
-2.3299336433410645,
-1.329350471496582,
-0.21274493634700775,
-1.0049262046813965,
0.5931419134140015,
-0.5706595778465271,
0.5288438200950623,
-0.0504913255572319,
0.1275321990251541,
0.38580191135406494,
1.5781705379486084,
3.441234827041626,
0.22730964422225952,
0.17399494349956512,
-0.23070645332336426,
-0.9081097841262817,
1.5203267335891724,
0.9034872055053711,
-0.01654765009880066,
-0.5259848237037659,
-0.9447135329246521,
1.2032729387283325,
1.9575284719467163,
1.0233434438705444,
-0.058732204139232635,
-0.8906853795051575,
-0.705665647983551,
-0.09022130817174911,
0.1308785229921341,
0.5561995506286621,
0.9212196469306946,
0.08365355432033539,
0.13708308339118958,
1.3288108110427856,
1.0478477478027344,
-0.29290276765823364,
0.290215402841568,
-0.8781681060791016,
-0.4401888847351074,
0.49402064085006714,
0.18219268321990967,
-0.0640663132071495,
0.5362765789031982,
-1.0080558061599731,
-0.18475939333438873,
-0.4861931800842285,
-0.8256999254226685,
-0.7226371765136719,
-0.4540771543979645,
-0.4328865706920624,
1.5854285955429077,
0.06378801167011261,
-0.5376126170158386,
0.049162134528160095,
-0.660200297832489,
-0.30768677592277527,
-1.1918127536773682,
0.2707212567329407,
-0.03233823552727699,
-0.10979458689689636,
-0.21436724066734314,
1.6407124996185303,
-0.9532532691955566,
-2.115817070007324,
0.15945379436016083,
0.25585439801216125,
-0.18251147866249084,
0.125924214720726,
1.7798203229904175,
0.3668127954006195,
1.388346552848816,
1.2321362495422363,
0.9628633260726929,
-0.6412076354026794,
-1.3654695749282837,
0.7644949555397034,
0.9355019330978394,
-1.354245662689209,
0.9163027405738831,
-0.252632737159729,
-0.5359951853752136,
0.7091149687767029,
1.2054699659347534,
0.5777831077575684,
-1.9294534921646118,
0.8523157238960266,
-1.150656819343567,
0.751349151134491,
0.8253783583641052,
0.6800446510314941,
0.23345120251178741,
1.0013583898544312,
-1.0867758989334106,
-1.0983774662017822,
-0.5853436589241028,
-0.7207103371620178,
1.9024795293807983,
-0.4896284341812134,
0.6555034518241882,
-0.17083004117012024,
-1.1728931665420532,
-0.01132815983146429,
0.9054083824157715,
0.4108707904815674,
-0.46321138739585876,
0.8789717555046082,
-0.643278956413269,
-0.8552001118659973,
-1.1287095546722412,
-0.33324503898620605,
-1.1201143264770508,
-0.9660713076591492,
1.0477796792984009,
0.6526115536689758,
0.35336750745773315,
1.8254787921905518,
0.6848747730255127,
0.421623557806015,
-2.584805965423584,
0.8359211087226868,
0.23169995844364166,
-0.042299240827560425,
0.9605234861373901,
0.3337690234184265,
1.1240406036376953,
0.11575904488563538,
0.5522099137306213,
-2.506910800933838,
2.3530771732330322,
-0.23423509299755096,
0.5962400436401367,
-0.11206632852554321,
-0.2698577046394348,
1.1626510620117188,
0.6607275605201721,
0.40775880217552185,
-1.0423601865768433,
0.8535908460617065,
-0.41520220041275024,
1.0481129884719849,
0.8085217475891113,
-0.867755115032196,
0.053498610854148865,
1.4858157634735107,
0.4362275004386902,
-0.5956971049308777,
-0.9501729011535645,
-0.9351952075958252,
0.8443913459777832,
1.6203064918518066,
0.009984783828258514,
-0.07652774453163147,
0.7762209177017212,
0.6652467846870422,
-1.1438003778457642,
0.14312370121479034,
-0.502819299697876,
-0.7479490041732788,
1.6356645822525024,
2.0923502445220947,
-0.12193822115659714,
-0.04499896615743637,
-0.6737823486328125,
-1.173801064491272,
0.6822634935379028,
-0.058326661586761475,
0.018819628283381462,
0.5288559794425964,
-0.6481419801712036,
0.9663414359092712,
0.6943754553794861,
1.0091118812561035,
0.07445620000362396,
0.19603672623634338,
0.5265794992446899,
-0.31529662013053894,
-1.257506251335144,
-0.3657035529613495,
-1.1319279670715332,
-2.55755877494812,
0.3442668914794922,
-0.263712614774704,
-1.472205400466919,
0.06380505859851837,
-1.069490909576416,
0.9696755409240723,
-0.6028579473495483,
-1.117204189300537,
-1.5885347127914429,
0.23325906693935394,
-0.05789390951395035,
0.9821642637252808,
-1.6336643695831299,
-0.3448406755924225,
1.1179847717285156,
0.8050861358642578,
-0.6414539813995361,
1.0211362838745117,
0.1893475502729416,
0.924711287021637,
0.6901974081993103,
-0.39046669006347656,
0.6532230377197266,
0.14533182978630066,
-1.4381024837493896,
0.4994475245475769,
1.2452539205551147,
0.1803622990846634,
1.54360032081604,
-0.3806591033935547,
0.02516140602529049,
0.42122891545295715,
-0.7208982706069946,
-0.5153977274894714,
-0.3741128444671631,
0.6999945044517517,
0.06310389935970306,
-0.9129735231399536,
-0.1133042573928833,
-0.242158442735672,
-0.3526640832424164,
0.13142144680023193,
-1.511009931564331,
-0.2635515332221985,
-0.5231833457946777,
-0.5488781929016113,
-1.3116517066955566,
0.001627444289624691,
1.4669872522354126,
-0.7188980579376221,
-0.24155063927173615,
0.45156893134117126,
0.5169481635093689,
0.5486927032470703,
0.6161031723022461,
-0.8550217151641846,
-0.06247195601463318,
-0.31658878922462463,
-0.22770217061042786,
0.3526141941547394,
1.3191485404968262,
-0.08478742092847824,
-0.9561516046524048,
0.6575634479522705,
-0.3338296115398407,
0.13944584131240845,
2.039522647857666,
0.10844156891107559,
-0.6355759501457214,
0.3623899221420288,
-0.7672353982925415,
1.843578577041626,
1.7177529335021973,
1.4434728622436523,
-0.18874700367450714,
-0.8563926815986633,
0.606346607208252,
-0.3764989972114563,
-0.40385276079177856,
0.9101014137268066,
0.3964632451534271,
-0.3190280497074127,
-1.422922134399414,
0.8464547991752625,
1.1422268152236938,
-0.8196856379508972,
-0.722076416015625,
0.2544756233692169,
-0.777482807636261,
1.2541478872299194,
0.40408945083618164,
0.31232696771621704,
0.34869492053985596,
1.5870678424835205,
0.7085614800453186,
-0.4048413336277008,
0.521119236946106,
0.5477879047393799,
-0.26803210377693176,
-2.087742567062378,
-1.1837290525436401,
0.5057107210159302,
-0.5959543585777283,
-1.528529167175293,
1.4475497007369995,
-1.1227655410766602,
-1.146882176399231,
0.5627594590187073,
-0.026335151866078377,
1.3011503219604492,
0.4670540690422058,
1.650006651878357,
2.10497784614563,
0.8618612885475159,
0.5181383490562439,
1.2209770679473877,
-0.18733765184879303,
-0.4865553677082062,
1.7748398780822754,
-0.44734928011894226,
0.5112898349761963,
1.14064621925354,
-0.37297341227531433,
-1.0743454694747925,
-0.7471604347229004,
-1.1835441589355469,
-0.5934773087501526,
1.123147964477539,
0.03517169505357742,
-1.0439367294311523,
0.25220224261283875,
1.5328495502471924,
0.1399877369403839,
-0.16959509253501892,
0.7072939872741699,
0.3150472640991211,
-0.7966283559799194,
-0.08228100836277008,
-0.9380287528038025,
0.5301992893218994,
-0.3279317021369934,
-0.38084378838539124,
0.23424695432186127,
0.5679695010185242,
1.3520729541778564,
-0.10433214902877808,
0.18322674930095673,
1.1246975660324097,
-1.424279808998108,
1.416353464126587,
-0.6224831342697144,
0.25287219882011414,
-2.3666186332702637,
1.3582805395126343,
-0.6010262370109558,
2.055675745010376,
-2.5786499977111816,
0.4175315201282501,
-0.5859166979789734,
-0.6157234907150269,
0.3062257766723633,
-0.3284958302974701,
0.13078534603118896,
-0.12133973091840744,
-1.0297214984893799,
0.03267339617013931,
-0.7402986884117126,
0.7021341919898987,
1.1017546653747559,
1.4372756481170654,
-1.1730457544326782,
-0.22827816009521484,
-1.592077374458313,
-0.17128513753414154,
-0.8602592349052429,
0.23542557656764984,
-1.9622896909713745,
-0.2073361575603485,
-2.0041842460632324,
-2.4888384342193604,
-1.2120864391326904,
-0.7271098494529724,
1.0606849193572998,
0.24967335164546967,
-0.8999041318893433,
1.3447571992874146,
-0.3274788558483124,
-1.8164349794387817,
1.1168322563171387,
-2.0404105186462402
] |
https://github.com/huggingface/datasets/issues/4873 | Multiple dataloader memory error | Hi!
200+ data loaders is a lot. Have you tried to reduce the number of datasets by concatenating/interleaving the ones with the same structure/task (the API is `{concatenate_datasets/interleave_datasets}([dset1, ..., dset_N])`)? | For the use of multiple datasets and tasks, we use around more than 200+ dataloaders, then pass it into `dataloader1, dataloader2, ..., dataloader200=accelerate.prepare(dataloader1, dataloader2, ..., dataloader200)`
It causes the memory error when generating batches. Any solutions to it?
```bash
File "/home/xxx/my_code/src/utils/data_utils.py", line 54, in generate_batch
x = next(iterator)
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 301, in __iter__
for batch in super().__iter__():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 28, in fetch
data.append(next(self.dataset_iter))
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 249, in __iter__
for element in self.dataset:
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 503, in __iter__
for key, example in self._iter():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 500, in _iter
yield from ex_iterable
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 231, in __iter__
new_key = "_".join(str(key) for key in keys)
MemoryError
``` | 567 | 30 | Multiple dataloader memory error
For the use of multiple datasets and tasks, we use around more than 200+ dataloaders, then pass it into `dataloader1, dataloader2, ..., dataloader200=accelerate.prepare(dataloader1, dataloader2, ..., dataloader200)`
It causes the memory error when generating batches. Any solutions to it?
```bash
File "/home/xxx/my_code/src/utils/data_utils.py", line 54, in generate_batch
x = next(iterator)
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 301, in __iter__
for batch in super().__iter__():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 28, in fetch
data.append(next(self.dataset_iter))
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 249, in __iter__
for element in self.dataset:
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 503, in __iter__
for key, example in self._iter():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 500, in _iter
yield from ex_iterable
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 231, in __iter__
new_key = "_".join(str(key) for key in keys)
MemoryError
```
Hi!
200+ data loaders is a lot. Have you tried to reduce the number of datasets by concatenating/interleaving the ones with the same structure/task (the API is `{concatenate_datasets/interleave_datasets}([dset1, ..., dset_N])`)? | [
-1.1470099687576294,
-0.9423059821128845,
-0.6381407976150513,
1.436461091041565,
-0.12356610596179962,
-1.1968669891357422,
0.19515833258628845,
-0.8920275568962097,
1.4833978414535522,
-0.7161823511123657,
0.16480037569999695,
-1.663545846939087,
-0.16609157621860504,
-0.4206472337245941,
-0.6520217657089233,
-0.9209361672401428,
-0.37261447310447693,
-0.964675784111023,
1.0566421747207642,
2.5569088459014893,
1.3468639850616455,
-1.2680505514144897,
2.7637624740600586,
0.5952059626579285,
-0.23603729903697968,
-1.0897434949874878,
0.49298515915870667,
0.044340137392282486,
-1.188441514968872,
-0.45573946833610535,
-1.0084213018417358,
-0.03196505829691887,
-0.5122919678688049,
-0.2735319137573242,
0.15844859182834625,
0.4559028446674347,
-0.2716652452945709,
-0.27850276231765747,
-0.6641697287559509,
-0.6778272390365601,
0.5836125016212463,
-0.34617653489112854,
1.0140941143035889,
-0.305946946144104,
1.7545908689498901,
-0.6340388655662537,
0.4671413004398346,
0.7603570818901062,
1.265825867652893,
0.2126264125108719,
0.1033075600862503,
0.19974511861801147,
0.29739218950271606,
0.06314069032669067,
0.6333106160163879,
1.2661185264587402,
0.5477806925773621,
0.5102909207344055,
0.6151978373527527,
-2.187107563018799,
1.27662992477417,
-0.8876870274543762,
0.2648608088493347,
1.312303900718689,
-0.8077917098999023,
0.37629902362823486,
-1.8563189506530762,
-0.10388767719268799,
0.6396386027336121,
-2.262946128845215,
0.2599547803401947,
-1.3505069017410278,
-0.5209758877754211,
0.8562593460083008,
0.28155073523521423,
-1.2526888847351074,
0.17231014370918274,
-0.4911471903324127,
1.1312702894210815,
0.47273367643356323,
1.1003458499908447,
-1.6616761684417725,
-0.04208643361926079,
-0.08428125828504562,
0.10782754421234131,
-1.2827690839767456,
-1.693303108215332,
0.5959947109222412,
0.6109093427658081,
0.7186448574066162,
-0.13109849393367767,
1.0683205127716064,
-1.062414526939392,
0.8766298890113831,
-1.071061134338379,
-1.5530072450637817,
-1.390427589416504,
-2.427165985107422,
-2.346151351928711,
0.8599074482917786,
-0.42644810676574707,
-0.5074502229690552,
2.0802571773529053,
-0.9875902533531189,
-1.7521545886993408,
1.1130268573760986,
0.26269957423210144,
0.1350899487733841,
2.4248592853546143,
0.25709056854248047,
-0.8278055787086487,
0.4751036465167999,
-0.742409884929657,
0.8389981389045715,
-0.20943625271320343,
1.3249317407608032,
0.522297203540802,
-0.9390363693237305,
1.7256535291671753,
-0.4319119155406952,
0.5301660895347595,
-0.5360814332962036,
-0.543748676776886,
-0.7628381848335266,
0.20404933393001556,
1.9162369966506958,
-0.2726883590221405,
1.5384210348129272,
-0.2763121426105499,
-1.5689220428466797,
-1.491274118423462,
0.8605954647064209,
0.4622023105621338,
-0.9200435280799866,
-0.015198975801467896,
-0.489663690328598,
0.245381698012352,
0.08066625148057938,
1.1307077407836914,
1.2149795293807983,
0.7061405777931213,
-0.30981144309043884,
-0.9189441800117493,
0.3027621805667877,
-0.2647315561771393,
-0.6233392953872681,
-1.760023832321167,
-0.37918713688850403,
0.21277791261672974,
0.6236504912376404,
-1.2155214548110962,
1.8735073804855347,
0.7757296562194824,
2.0898067951202393,
0.8584980368614197,
-0.3836345374584198,
1.4746214151382446,
-0.030375655740499496,
1.8929206132888794,
-0.49101266264915466,
0.5620540976524353,
-0.41995012760162354,
-1.1138194799423218,
0.7806433439254761,
-0.38952988386154175,
-1.9451277256011963,
-0.8281873464584351,
-0.7216224670410156,
-0.17152556777000427,
-0.6865367889404297,
0.8345350623130798,
-0.30692338943481445,
-1.5229830741882324,
0.13268299400806427,
-0.7044884562492371,
0.15984676778316498,
-1.338140845298767,
0.21008823812007904,
0.7196323871612549,
-0.76341712474823,
-0.050295308232307434,
-0.2634805142879486,
-1.257700800895691,
-0.5502591133117676,
0.32638511061668396,
2.032191753387451,
-0.3790269196033478,
0.918181836605072,
0.9835331439971924,
-0.7427251935005188,
0.18640385568141937,
0.07812031358480453,
-0.3488728404045105,
0.7090079188346863,
-1.1151907444000244,
-0.4561329782009125,
1.236912488937378,
-0.30887049436569214,
-0.7730565667152405,
1.3905225992202759,
0.8924489617347717,
-1.1567243337631226,
-0.3578440248966217,
-0.24973993003368378,
-0.7923268675804138,
0.04683347046375275,
-1.4826191663742065,
-0.1802625209093094,
0.46599000692367554,
-1.422429084777832,
-0.3227606415748596,
-0.20987777411937714,
1.3871736526489258,
-0.14384564757347107,
1.514750599861145,
-0.2816658318042755,
-0.2114918977022171,
-0.31618016958236694,
-0.5518518090248108,
0.14269296824932098,
-0.20238693058490753,
-0.5203243494033813,
0.20411956310272217,
-0.8810521960258484,
0.3036707937717438,
1.549365758895874,
0.32197099924087524,
0.12319474667310715,
0.45409852266311646,
1.078447937965393,
0.44450169801712036,
-0.06393947452306747,
-0.848747730255127,
-1.5290035009384155,
1.856999158859253,
-1.2859326601028442,
1.8760377168655396,
0.8227425217628479,
-0.08754386007785797,
-1.7098664045333862,
-1.8196088075637817,
1.2727352380752563,
1.1003834009170532,
2.4204442501068115,
0.4981342852115631,
0.4878140389919281,
-0.7236770391464233,
-0.7664113640785217,
0.2521074116230011,
-1.0048521757125854,
-0.6793370842933655,
0.2505335509777069,
2.375797748565674,
1.7469066381454468,
-0.5860583782196045,
-0.25672024488449097,
-0.892945408821106,
1.1878342628479004,
-0.27215126156806946,
0.27835699915885925,
2.080169200897217,
-0.32344213128089905,
-0.994927167892456,
1.299198031425476,
-2.406660556793213,
0.2751200497150421,
2.1339595317840576,
0.25296011567115784,
0.11716305464506149,
-1.4892642498016357,
-0.5780138969421387,
-0.35004258155822754,
-0.4611293375492096,
-1.18760347366333,
0.6519706845283508,
-0.2828788161277771,
-0.9376747608184814,
-1.4163438081741333,
-0.031176507472991943,
-1.1172384023666382,
-1.7823907136917114,
0.31845006346702576,
1.8760586977005005,
2.087099552154541,
-0.8218532204627991,
1.3170212507247925,
-0.15870019793510437,
0.02064429223537445,
1.3191773891448975,
1.371301293373108,
3.0796306133270264,
1.9022480249404907,
-1.259765386581421,
0.7340290546417236,
-0.3063070774078369,
-0.49219852685928345,
1.1936532258987427,
-1.1652168035507202,
1.0508185625076294,
-0.18724730610847473,
-1.281205415725708,
-1.2330893278121948,
1.0910931825637817,
0.5334736108779907,
-0.10584426671266556,
-0.5070363879203796,
1.3095895051956177,
0.2410808652639389,
1.3245210647583008,
0.5520899891853333,
-0.4472518563270569,
0.5004096031188965,
-0.3080120384693146,
-0.5347994565963745,
1.7637859582901,
0.12193789333105087,
-1.6307461261749268,
-2.3535828590393066,
-0.33936119079589844,
-1.0216232538223267,
-0.05548783764243126,
-0.6275569796562195,
-0.977512538433075,
1.6163748502731323,
0.3696182072162628,
-1.188937783241272,
-0.23233801126480103,
-0.3179428279399872,
-0.48506298661231995,
2.688741445541382,
-1.2023147344589233,
-0.09498247504234314,
-0.9104503989219666,
-0.510901689529419,
1.6432842016220093,
-1.288353681564331,
-0.18722982704639435,
-0.9318567514419556,
-0.7434260249137878,
-1.2681740522384644,
-0.43676069378852844,
0.06182915344834328,
-0.9341094493865967,
0.67435622215271,
0.1392095983028412,
-1.0997503995895386,
-0.24468906223773956,
-0.9554435014724731,
1.1063429117202759,
-0.10852712392807007,
0.18990355730056763,
1.7778674364089966,
0.3120662569999695,
-0.4662540555000305,
0.6928805112838745,
1.2333065271377563,
0.6000046730041504,
-0.6574116945266724,
0.017692267894744873,
-0.7347815036773682,
0.318189799785614,
-1.4210184812545776,
0.21808375418186188,
-2.9573919773101807,
0.8318016529083252,
-0.22739695012569427,
-0.213358536362648,
-0.06580144912004471,
-1.2119507789611816,
1.1128038167953491,
2.613435983657837,
-1.1885782480239868,
0.42120668292045593,
0.5402421951293945,
1.1328283548355103,
-1.5273854732513428,
0.2283317595720291,
-0.5103921294212341,
1.9945869445800781,
0.15939836204051971,
1.2198032140731812,
-0.5149584412574768,
-2.125502347946167,
0.6859408617019653,
-1.1664201021194458,
-0.9742194414138794,
0.8085025548934937,
-1.0059078931808472,
0.35199815034866333,
-1.4341273307800293,
-0.17210379242897034,
-0.9690189957618713,
-1.2708944082260132,
0.7087974548339844,
0.12050095945596695,
0.39397409558296204,
-0.4942256510257721,
0.3100440800189972,
-2.189152479171753,
-1.475119948387146,
-0.21449778974056244,
-1.138576626777649,
0.5183668732643127,
-0.3947814404964447,
0.5425940752029419,
-0.06666961312294006,
0.1371723860502243,
0.20928363502025604,
1.484255075454712,
3.330925703048706,
0.08146738260984421,
0.10664743185043335,
-0.06577359884977341,
-1.0821281671524048,
1.499131679534912,
0.8551440834999084,
-0.10302775353193283,
-0.5223554372787476,
-1.053997278213501,
1.3187669515609741,
2.0630059242248535,
1.2323192358016968,
0.24765218794345856,
-0.8204858303070068,
-0.7404341697692871,
-0.020242415368556976,
0.25554555654525757,
0.5003179311752319,
0.9734967350959778,
-0.07630318403244019,
0.11215444654226303,
1.3415019512176514,
1.242289662361145,
-0.28950002789497375,
0.39494651556015015,
-1.007974624633789,
-0.4388815760612488,
0.4254705011844635,
0.07711426913738251,
0.11196907609701157,
0.47725069522857666,
-0.975886344909668,
-0.32138246297836304,
-0.26683905720710754,
-0.8872900605201721,
-0.7830345630645752,
-0.36241140961647034,
-0.4128102958202362,
1.5655415058135986,
-0.001821170561015606,
-0.46217283606529236,
0.13052357733249664,
-0.5627534985542297,
-0.20024165511131287,
-1.1021982431411743,
0.024488914757966995,
-0.0673801600933075,
-0.08692567050457001,
-0.26610875129699707,
1.5617456436157227,
-0.9228070378303528,
-2.2394230365753174,
0.19986039400100708,
0.31238633394241333,
-0.3740166127681732,
0.27363353967666626,
1.6667150259017944,
0.4413919746875763,
1.4138307571411133,
1.363115668296814,
1.0218510627746582,
-0.6142770051956177,
-1.1865750551223755,
0.8215219974517822,
0.8467882871627808,
-1.3097652196884155,
0.9749462008476257,
-0.30475422739982605,
-0.5463268160820007,
0.6719323992729187,
1.18277907371521,
0.4286680221557617,
-2.0146219730377197,
0.9224008917808533,
-0.9251065850257874,
0.6432729363441467,
0.7004801034927368,
0.8272935152053833,
0.23731675744056702,
0.8998576998710632,
-1.182560682296753,
-1.1466190814971924,
-0.6884017586708069,
-0.5387939214706421,
1.9399845600128174,
-0.21107542514801025,
0.5718210339546204,
-0.07113894075155258,
-1.1679962873458862,
-0.10221657902002335,
0.7877131104469299,
0.43560922145843506,
-0.4887722134590149,
0.959494411945343,
-0.6074716448783875,
-0.8876432180404663,
-1.229838252067566,
-0.3819517195224762,
-1.156354308128357,
-0.8462783098220825,
1.040163516998291,
0.6996521353721619,
0.5016534328460693,
1.88666832447052,
0.5827382206916809,
0.5044518113136292,
-2.6639444828033447,
0.9131445288658142,
0.2526204288005829,
-0.06271742284297943,
0.8480744361877441,
0.2014760971069336,
1.2463984489440918,
-0.11144114285707474,
0.6212617754936218,
-2.272235631942749,
2.252565860748291,
-0.17782597243785858,
0.6009712219238281,
0.014929979108273983,
-0.14466430246829987,
1.0522630214691162,
0.6100565791130066,
0.5673375129699707,
-1.1571542024612427,
0.7136073112487793,
-0.5763052105903625,
1.0460833311080933,
0.8414551019668579,
-0.955866277217865,
0.11256828159093857,
1.4837623834609985,
0.538847029209137,
-0.39842095971107483,
-0.9566218852996826,
-0.7638790607452393,
0.9894325733184814,
1.5896401405334473,
-0.17885121703147888,
-0.023418456315994263,
0.9532826542854309,
0.6203598380088806,
-1.223684549331665,
-0.030479561537504196,
-0.6962040066719055,
-0.6803608536720276,
1.7069156169891357,
2.011887788772583,
-0.13483960926532745,
-0.23205292224884033,
-0.7544316053390503,
-1.2538553476333618,
0.7257192134857178,
-0.17573469877243042,
0.04776861146092415,
0.7753342986106873,
-0.6744776964187622,
1.0829664468765259,
0.4558429718017578,
1.0454117059707642,
0.04523194208741188,
0.23238232731819153,
0.30624574422836304,
-0.36226484179496765,
-1.2533680200576782,
-0.36976391077041626,
-1.1036895513534546,
-2.5678865909576416,
0.3820805847644806,
-0.30429312586784363,
-1.4865390062332153,
0.10256374627351761,
-1.0511640310287476,
0.9130357503890991,
-0.6081194877624512,
-1.1515730619430542,
-1.3837158679962158,
0.32019108533859253,
-0.18650934100151062,
1.0054765939712524,
-1.758589744567871,
-0.18888607621192932,
1.1917157173156738,
0.8314722180366516,
-0.5726752281188965,
0.9230886101722717,
0.34465330839157104,
0.9523807168006897,
0.7297554612159729,
-0.375966340303421,
0.7182730436325073,
0.03720400854945183,
-1.381977915763855,
0.36901307106018066,
1.1238535642623901,
0.18559527397155762,
1.362864375114441,
-0.47953861951828003,
0.03207346424460411,
0.4699440598487854,
-0.6435273289680481,
-0.6045913100242615,
-0.4801620841026306,
0.7211474180221558,
-0.1087922602891922,
-1.1576120853424072,
-0.19036974012851715,
-0.1824721395969391,
-0.24380384385585785,
0.18190781772136688,
-1.4907453060150146,
-0.34248054027557373,
-0.33618462085723877,
-0.4222356081008911,
-1.388296127319336,
-0.014858237467706203,
1.3131595849990845,
-0.8635656833648682,
-0.15771344304084778,
0.35816681385040283,
0.4601258635520935,
0.5788686275482178,
0.45576345920562744,
-0.762747049331665,
-0.2683442533016205,
-0.3886406421661377,
-0.29950249195098877,
0.29502832889556885,
1.1723514795303345,
0.026493951678276062,
-1.0364742279052734,
0.7059351801872253,
-0.3283703327178955,
0.2506812810897827,
2.0810086727142334,
0.030124589800834656,
-0.7440133690834045,
0.33912742137908936,
-0.7015136480331421,
1.6517822742462158,
1.7037434577941895,
1.3268756866455078,
-0.1526576727628708,
-0.6961403489112854,
0.5311413407325745,
-0.3925248682498932,
-0.30874887108802795,
0.9402500987052917,
0.3470377027988434,
-0.25500795245170593,
-1.364793300628662,
0.667206883430481,
1.3018115758895874,
-0.7490931749343872,
-0.7112043499946594,
0.14692173898220062,
-0.9347118139266968,
1.275438904762268,
0.5609017014503479,
0.2856085002422333,
0.16893211007118225,
1.5088121891021729,
0.76945960521698,
-0.42993098497390747,
0.5575419664382935,
0.5766260027885437,
-0.1944154053926468,
-2.1433753967285156,
-1.043495774269104,
0.23357465863227844,
-0.33337128162384033,
-1.4756264686584473,
1.3161463737487793,
-1.1133689880371094,
-1.0211238861083984,
0.555400550365448,
0.12075091153383255,
1.3559993505477905,
0.380980908870697,
1.712449550628662,
2.147061824798584,
0.9025620818138123,
0.4517251253128052,
1.2567917108535767,
-0.034483738243579865,
-0.40329548716545105,
1.8154597282409668,
-0.40655285120010376,
0.5589996576309204,
0.9526978135108948,
-0.3648025393486023,
-1.0603681802749634,
-0.8830398917198181,
-1.1949628591537476,
-0.6013644933700562,
1.1476324796676636,
0.028883691877126694,
-1.0354746580123901,
0.2671588659286499,
1.594388484954834,
0.13166444003582,
-0.2371692657470703,
0.6601165533065796,
0.30931153893470764,
-0.6559433937072754,
-0.0036727855913341045,
-0.8029810786247253,
0.4425112307071686,
-0.07616444677114487,
-0.2578562796115875,
0.2517496347427368,
0.6104527115821838,
1.3097681999206543,
-0.09649015218019485,
0.1495497077703476,
1.1378288269042969,
-1.3848401308059692,
1.5529741048812866,
-0.5648695826530457,
0.31469011306762695,
-2.4181275367736816,
1.331923484802246,
-0.8146183490753174,
1.8667038679122925,
-2.618518590927124,
0.48770666122436523,
-0.5034212470054626,
-0.5488336086273193,
0.20067040622234344,
-0.5554960370063782,
0.03880926966667175,
-0.1069200411438942,
-0.8530532121658325,
-0.06654129922389984,
-0.7475042343139648,
0.6094957590103149,
1.1679033041000366,
1.4795764684677124,
-1.1329615116119385,
-0.3106006681919098,
-1.764197587966919,
-0.10124962031841278,
-0.8075942397117615,
0.39712172746658325,
-2.077270746231079,
-0.20947375893592834,
-2.0010595321655273,
-2.2672767639160156,
-1.3622164726257324,
-0.8874835968017578,
1.0674525499343872,
0.12185090035200119,
-0.9831146001815796,
1.1649459600448608,
-0.3290494382381439,
-1.8423272371292114,
1.1491568088531494,
-2.2011520862579346
] |
https://github.com/huggingface/datasets/issues/4873 | Multiple dataloader memory error | Hi @mariosasko, thank you for your reply. I tried pre-concatenating different datasets into one, but one key need is to keep each batch the same data type. Considering that the concatenate-then-segment operation for prefetched samples may span across different data types after concatenating/interleaving (cuz different data sources are mixed), any solution to remain the same data source for each batch? | For the use of multiple datasets and tasks, we use around more than 200+ dataloaders, then pass it into `dataloader1, dataloader2, ..., dataloader200=accelerate.prepare(dataloader1, dataloader2, ..., dataloader200)`
It causes the memory error when generating batches. Any solutions to it?
```bash
File "/home/xxx/my_code/src/utils/data_utils.py", line 54, in generate_batch
x = next(iterator)
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 301, in __iter__
for batch in super().__iter__():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 28, in fetch
data.append(next(self.dataset_iter))
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 249, in __iter__
for element in self.dataset:
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 503, in __iter__
for key, example in self._iter():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 500, in _iter
yield from ex_iterable
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 231, in __iter__
new_key = "_".join(str(key) for key in keys)
MemoryError
``` | 567 | 60 | Multiple dataloader memory error
For the use of multiple datasets and tasks, we use around more than 200+ dataloaders, then pass it into `dataloader1, dataloader2, ..., dataloader200=accelerate.prepare(dataloader1, dataloader2, ..., dataloader200)`
It causes the memory error when generating batches. Any solutions to it?
```bash
File "/home/xxx/my_code/src/utils/data_utils.py", line 54, in generate_batch
x = next(iterator)
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 301, in __iter__
for batch in super().__iter__():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 28, in fetch
data.append(next(self.dataset_iter))
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 249, in __iter__
for element in self.dataset:
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 503, in __iter__
for key, example in self._iter():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 500, in _iter
yield from ex_iterable
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 231, in __iter__
new_key = "_".join(str(key) for key in keys)
MemoryError
```
Hi @mariosasko, thank you for your reply. I tried pre-concatenating different datasets into one, but one key need is to keep each batch the same data type. Considering that the concatenate-then-segment operation for prefetched samples may span across different data types after concatenating/interleaving (cuz different data sources are mixed), any solution to remain the same data source for each batch? | [
-1.1470099687576294,
-0.9423059821128845,
-0.6381407976150513,
1.436461091041565,
-0.12356610596179962,
-1.1968669891357422,
0.19515833258628845,
-0.8920275568962097,
1.4833978414535522,
-0.7161823511123657,
0.16480037569999695,
-1.663545846939087,
-0.16609157621860504,
-0.4206472337245941,
-0.6520217657089233,
-0.9209361672401428,
-0.37261447310447693,
-0.964675784111023,
1.0566421747207642,
2.5569088459014893,
1.3468639850616455,
-1.2680505514144897,
2.7637624740600586,
0.5952059626579285,
-0.23603729903697968,
-1.0897434949874878,
0.49298515915870667,
0.044340137392282486,
-1.188441514968872,
-0.45573946833610535,
-1.0084213018417358,
-0.03196505829691887,
-0.5122919678688049,
-0.2735319137573242,
0.15844859182834625,
0.4559028446674347,
-0.2716652452945709,
-0.27850276231765747,
-0.6641697287559509,
-0.6778272390365601,
0.5836125016212463,
-0.34617653489112854,
1.0140941143035889,
-0.305946946144104,
1.7545908689498901,
-0.6340388655662537,
0.4671413004398346,
0.7603570818901062,
1.265825867652893,
0.2126264125108719,
0.1033075600862503,
0.19974511861801147,
0.29739218950271606,
0.06314069032669067,
0.6333106160163879,
1.2661185264587402,
0.5477806925773621,
0.5102909207344055,
0.6151978373527527,
-2.187107563018799,
1.27662992477417,
-0.8876870274543762,
0.2648608088493347,
1.312303900718689,
-0.8077917098999023,
0.37629902362823486,
-1.8563189506530762,
-0.10388767719268799,
0.6396386027336121,
-2.262946128845215,
0.2599547803401947,
-1.3505069017410278,
-0.5209758877754211,
0.8562593460083008,
0.28155073523521423,
-1.2526888847351074,
0.17231014370918274,
-0.4911471903324127,
1.1312702894210815,
0.47273367643356323,
1.1003458499908447,
-1.6616761684417725,
-0.04208643361926079,
-0.08428125828504562,
0.10782754421234131,
-1.2827690839767456,
-1.693303108215332,
0.5959947109222412,
0.6109093427658081,
0.7186448574066162,
-0.13109849393367767,
1.0683205127716064,
-1.062414526939392,
0.8766298890113831,
-1.071061134338379,
-1.5530072450637817,
-1.390427589416504,
-2.427165985107422,
-2.346151351928711,
0.8599074482917786,
-0.42644810676574707,
-0.5074502229690552,
2.0802571773529053,
-0.9875902533531189,
-1.7521545886993408,
1.1130268573760986,
0.26269957423210144,
0.1350899487733841,
2.4248592853546143,
0.25709056854248047,
-0.8278055787086487,
0.4751036465167999,
-0.742409884929657,
0.8389981389045715,
-0.20943625271320343,
1.3249317407608032,
0.522297203540802,
-0.9390363693237305,
1.7256535291671753,
-0.4319119155406952,
0.5301660895347595,
-0.5360814332962036,
-0.543748676776886,
-0.7628381848335266,
0.20404933393001556,
1.9162369966506958,
-0.2726883590221405,
1.5384210348129272,
-0.2763121426105499,
-1.5689220428466797,
-1.491274118423462,
0.8605954647064209,
0.4622023105621338,
-0.9200435280799866,
-0.015198975801467896,
-0.489663690328598,
0.245381698012352,
0.08066625148057938,
1.1307077407836914,
1.2149795293807983,
0.7061405777931213,
-0.30981144309043884,
-0.9189441800117493,
0.3027621805667877,
-0.2647315561771393,
-0.6233392953872681,
-1.760023832321167,
-0.37918713688850403,
0.21277791261672974,
0.6236504912376404,
-1.2155214548110962,
1.8735073804855347,
0.7757296562194824,
2.0898067951202393,
0.8584980368614197,
-0.3836345374584198,
1.4746214151382446,
-0.030375655740499496,
1.8929206132888794,
-0.49101266264915466,
0.5620540976524353,
-0.41995012760162354,
-1.1138194799423218,
0.7806433439254761,
-0.38952988386154175,
-1.9451277256011963,
-0.8281873464584351,
-0.7216224670410156,
-0.17152556777000427,
-0.6865367889404297,
0.8345350623130798,
-0.30692338943481445,
-1.5229830741882324,
0.13268299400806427,
-0.7044884562492371,
0.15984676778316498,
-1.338140845298767,
0.21008823812007904,
0.7196323871612549,
-0.76341712474823,
-0.050295308232307434,
-0.2634805142879486,
-1.257700800895691,
-0.5502591133117676,
0.32638511061668396,
2.032191753387451,
-0.3790269196033478,
0.918181836605072,
0.9835331439971924,
-0.7427251935005188,
0.18640385568141937,
0.07812031358480453,
-0.3488728404045105,
0.7090079188346863,
-1.1151907444000244,
-0.4561329782009125,
1.236912488937378,
-0.30887049436569214,
-0.7730565667152405,
1.3905225992202759,
0.8924489617347717,
-1.1567243337631226,
-0.3578440248966217,
-0.24973993003368378,
-0.7923268675804138,
0.04683347046375275,
-1.4826191663742065,
-0.1802625209093094,
0.46599000692367554,
-1.422429084777832,
-0.3227606415748596,
-0.20987777411937714,
1.3871736526489258,
-0.14384564757347107,
1.514750599861145,
-0.2816658318042755,
-0.2114918977022171,
-0.31618016958236694,
-0.5518518090248108,
0.14269296824932098,
-0.20238693058490753,
-0.5203243494033813,
0.20411956310272217,
-0.8810521960258484,
0.3036707937717438,
1.549365758895874,
0.32197099924087524,
0.12319474667310715,
0.45409852266311646,
1.078447937965393,
0.44450169801712036,
-0.06393947452306747,
-0.848747730255127,
-1.5290035009384155,
1.856999158859253,
-1.2859326601028442,
1.8760377168655396,
0.8227425217628479,
-0.08754386007785797,
-1.7098664045333862,
-1.8196088075637817,
1.2727352380752563,
1.1003834009170532,
2.4204442501068115,
0.4981342852115631,
0.4878140389919281,
-0.7236770391464233,
-0.7664113640785217,
0.2521074116230011,
-1.0048521757125854,
-0.6793370842933655,
0.2505335509777069,
2.375797748565674,
1.7469066381454468,
-0.5860583782196045,
-0.25672024488449097,
-0.892945408821106,
1.1878342628479004,
-0.27215126156806946,
0.27835699915885925,
2.080169200897217,
-0.32344213128089905,
-0.994927167892456,
1.299198031425476,
-2.406660556793213,
0.2751200497150421,
2.1339595317840576,
0.25296011567115784,
0.11716305464506149,
-1.4892642498016357,
-0.5780138969421387,
-0.35004258155822754,
-0.4611293375492096,
-1.18760347366333,
0.6519706845283508,
-0.2828788161277771,
-0.9376747608184814,
-1.4163438081741333,
-0.031176507472991943,
-1.1172384023666382,
-1.7823907136917114,
0.31845006346702576,
1.8760586977005005,
2.087099552154541,
-0.8218532204627991,
1.3170212507247925,
-0.15870019793510437,
0.02064429223537445,
1.3191773891448975,
1.371301293373108,
3.0796306133270264,
1.9022480249404907,
-1.259765386581421,
0.7340290546417236,
-0.3063070774078369,
-0.49219852685928345,
1.1936532258987427,
-1.1652168035507202,
1.0508185625076294,
-0.18724730610847473,
-1.281205415725708,
-1.2330893278121948,
1.0910931825637817,
0.5334736108779907,
-0.10584426671266556,
-0.5070363879203796,
1.3095895051956177,
0.2410808652639389,
1.3245210647583008,
0.5520899891853333,
-0.4472518563270569,
0.5004096031188965,
-0.3080120384693146,
-0.5347994565963745,
1.7637859582901,
0.12193789333105087,
-1.6307461261749268,
-2.3535828590393066,
-0.33936119079589844,
-1.0216232538223267,
-0.05548783764243126,
-0.6275569796562195,
-0.977512538433075,
1.6163748502731323,
0.3696182072162628,
-1.188937783241272,
-0.23233801126480103,
-0.3179428279399872,
-0.48506298661231995,
2.688741445541382,
-1.2023147344589233,
-0.09498247504234314,
-0.9104503989219666,
-0.510901689529419,
1.6432842016220093,
-1.288353681564331,
-0.18722982704639435,
-0.9318567514419556,
-0.7434260249137878,
-1.2681740522384644,
-0.43676069378852844,
0.06182915344834328,
-0.9341094493865967,
0.67435622215271,
0.1392095983028412,
-1.0997503995895386,
-0.24468906223773956,
-0.9554435014724731,
1.1063429117202759,
-0.10852712392807007,
0.18990355730056763,
1.7778674364089966,
0.3120662569999695,
-0.4662540555000305,
0.6928805112838745,
1.2333065271377563,
0.6000046730041504,
-0.6574116945266724,
0.017692267894744873,
-0.7347815036773682,
0.318189799785614,
-1.4210184812545776,
0.21808375418186188,
-2.9573919773101807,
0.8318016529083252,
-0.22739695012569427,
-0.213358536362648,
-0.06580144912004471,
-1.2119507789611816,
1.1128038167953491,
2.613435983657837,
-1.1885782480239868,
0.42120668292045593,
0.5402421951293945,
1.1328283548355103,
-1.5273854732513428,
0.2283317595720291,
-0.5103921294212341,
1.9945869445800781,
0.15939836204051971,
1.2198032140731812,
-0.5149584412574768,
-2.125502347946167,
0.6859408617019653,
-1.1664201021194458,
-0.9742194414138794,
0.8085025548934937,
-1.0059078931808472,
0.35199815034866333,
-1.4341273307800293,
-0.17210379242897034,
-0.9690189957618713,
-1.2708944082260132,
0.7087974548339844,
0.12050095945596695,
0.39397409558296204,
-0.4942256510257721,
0.3100440800189972,
-2.189152479171753,
-1.475119948387146,
-0.21449778974056244,
-1.138576626777649,
0.5183668732643127,
-0.3947814404964447,
0.5425940752029419,
-0.06666961312294006,
0.1371723860502243,
0.20928363502025604,
1.484255075454712,
3.330925703048706,
0.08146738260984421,
0.10664743185043335,
-0.06577359884977341,
-1.0821281671524048,
1.499131679534912,
0.8551440834999084,
-0.10302775353193283,
-0.5223554372787476,
-1.053997278213501,
1.3187669515609741,
2.0630059242248535,
1.2323192358016968,
0.24765218794345856,
-0.8204858303070068,
-0.7404341697692871,
-0.020242415368556976,
0.25554555654525757,
0.5003179311752319,
0.9734967350959778,
-0.07630318403244019,
0.11215444654226303,
1.3415019512176514,
1.242289662361145,
-0.28950002789497375,
0.39494651556015015,
-1.007974624633789,
-0.4388815760612488,
0.4254705011844635,
0.07711426913738251,
0.11196907609701157,
0.47725069522857666,
-0.975886344909668,
-0.32138246297836304,
-0.26683905720710754,
-0.8872900605201721,
-0.7830345630645752,
-0.36241140961647034,
-0.4128102958202362,
1.5655415058135986,
-0.001821170561015606,
-0.46217283606529236,
0.13052357733249664,
-0.5627534985542297,
-0.20024165511131287,
-1.1021982431411743,
0.024488914757966995,
-0.0673801600933075,
-0.08692567050457001,
-0.26610875129699707,
1.5617456436157227,
-0.9228070378303528,
-2.2394230365753174,
0.19986039400100708,
0.31238633394241333,
-0.3740166127681732,
0.27363353967666626,
1.6667150259017944,
0.4413919746875763,
1.4138307571411133,
1.363115668296814,
1.0218510627746582,
-0.6142770051956177,
-1.1865750551223755,
0.8215219974517822,
0.8467882871627808,
-1.3097652196884155,
0.9749462008476257,
-0.30475422739982605,
-0.5463268160820007,
0.6719323992729187,
1.18277907371521,
0.4286680221557617,
-2.0146219730377197,
0.9224008917808533,
-0.9251065850257874,
0.6432729363441467,
0.7004801034927368,
0.8272935152053833,
0.23731675744056702,
0.8998576998710632,
-1.182560682296753,
-1.1466190814971924,
-0.6884017586708069,
-0.5387939214706421,
1.9399845600128174,
-0.21107542514801025,
0.5718210339546204,
-0.07113894075155258,
-1.1679962873458862,
-0.10221657902002335,
0.7877131104469299,
0.43560922145843506,
-0.4887722134590149,
0.959494411945343,
-0.6074716448783875,
-0.8876432180404663,
-1.229838252067566,
-0.3819517195224762,
-1.156354308128357,
-0.8462783098220825,
1.040163516998291,
0.6996521353721619,
0.5016534328460693,
1.88666832447052,
0.5827382206916809,
0.5044518113136292,
-2.6639444828033447,
0.9131445288658142,
0.2526204288005829,
-0.06271742284297943,
0.8480744361877441,
0.2014760971069336,
1.2463984489440918,
-0.11144114285707474,
0.6212617754936218,
-2.272235631942749,
2.252565860748291,
-0.17782597243785858,
0.6009712219238281,
0.014929979108273983,
-0.14466430246829987,
1.0522630214691162,
0.6100565791130066,
0.5673375129699707,
-1.1571542024612427,
0.7136073112487793,
-0.5763052105903625,
1.0460833311080933,
0.8414551019668579,
-0.955866277217865,
0.11256828159093857,
1.4837623834609985,
0.538847029209137,
-0.39842095971107483,
-0.9566218852996826,
-0.7638790607452393,
0.9894325733184814,
1.5896401405334473,
-0.17885121703147888,
-0.023418456315994263,
0.9532826542854309,
0.6203598380088806,
-1.223684549331665,
-0.030479561537504196,
-0.6962040066719055,
-0.6803608536720276,
1.7069156169891357,
2.011887788772583,
-0.13483960926532745,
-0.23205292224884033,
-0.7544316053390503,
-1.2538553476333618,
0.7257192134857178,
-0.17573469877243042,
0.04776861146092415,
0.7753342986106873,
-0.6744776964187622,
1.0829664468765259,
0.4558429718017578,
1.0454117059707642,
0.04523194208741188,
0.23238232731819153,
0.30624574422836304,
-0.36226484179496765,
-1.2533680200576782,
-0.36976391077041626,
-1.1036895513534546,
-2.5678865909576416,
0.3820805847644806,
-0.30429312586784363,
-1.4865390062332153,
0.10256374627351761,
-1.0511640310287476,
0.9130357503890991,
-0.6081194877624512,
-1.1515730619430542,
-1.3837158679962158,
0.32019108533859253,
-0.18650934100151062,
1.0054765939712524,
-1.758589744567871,
-0.18888607621192932,
1.1917157173156738,
0.8314722180366516,
-0.5726752281188965,
0.9230886101722717,
0.34465330839157104,
0.9523807168006897,
0.7297554612159729,
-0.375966340303421,
0.7182730436325073,
0.03720400854945183,
-1.381977915763855,
0.36901307106018066,
1.1238535642623901,
0.18559527397155762,
1.362864375114441,
-0.47953861951828003,
0.03207346424460411,
0.4699440598487854,
-0.6435273289680481,
-0.6045913100242615,
-0.4801620841026306,
0.7211474180221558,
-0.1087922602891922,
-1.1576120853424072,
-0.19036974012851715,
-0.1824721395969391,
-0.24380384385585785,
0.18190781772136688,
-1.4907453060150146,
-0.34248054027557373,
-0.33618462085723877,
-0.4222356081008911,
-1.388296127319336,
-0.014858237467706203,
1.3131595849990845,
-0.8635656833648682,
-0.15771344304084778,
0.35816681385040283,
0.4601258635520935,
0.5788686275482178,
0.45576345920562744,
-0.762747049331665,
-0.2683442533016205,
-0.3886406421661377,
-0.29950249195098877,
0.29502832889556885,
1.1723514795303345,
0.026493951678276062,
-1.0364742279052734,
0.7059351801872253,
-0.3283703327178955,
0.2506812810897827,
2.0810086727142334,
0.030124589800834656,
-0.7440133690834045,
0.33912742137908936,
-0.7015136480331421,
1.6517822742462158,
1.7037434577941895,
1.3268756866455078,
-0.1526576727628708,
-0.6961403489112854,
0.5311413407325745,
-0.3925248682498932,
-0.30874887108802795,
0.9402500987052917,
0.3470377027988434,
-0.25500795245170593,
-1.364793300628662,
0.667206883430481,
1.3018115758895874,
-0.7490931749343872,
-0.7112043499946594,
0.14692173898220062,
-0.9347118139266968,
1.275438904762268,
0.5609017014503479,
0.2856085002422333,
0.16893211007118225,
1.5088121891021729,
0.76945960521698,
-0.42993098497390747,
0.5575419664382935,
0.5766260027885437,
-0.1944154053926468,
-2.1433753967285156,
-1.043495774269104,
0.23357465863227844,
-0.33337128162384033,
-1.4756264686584473,
1.3161463737487793,
-1.1133689880371094,
-1.0211238861083984,
0.555400550365448,
0.12075091153383255,
1.3559993505477905,
0.380980908870697,
1.712449550628662,
2.147061824798584,
0.9025620818138123,
0.4517251253128052,
1.2567917108535767,
-0.034483738243579865,
-0.40329548716545105,
1.8154597282409668,
-0.40655285120010376,
0.5589996576309204,
0.9526978135108948,
-0.3648025393486023,
-1.0603681802749634,
-0.8830398917198181,
-1.1949628591537476,
-0.6013644933700562,
1.1476324796676636,
0.028883691877126694,
-1.0354746580123901,
0.2671588659286499,
1.594388484954834,
0.13166444003582,
-0.2371692657470703,
0.6601165533065796,
0.30931153893470764,
-0.6559433937072754,
-0.0036727855913341045,
-0.8029810786247253,
0.4425112307071686,
-0.07616444677114487,
-0.2578562796115875,
0.2517496347427368,
0.6104527115821838,
1.3097681999206543,
-0.09649015218019485,
0.1495497077703476,
1.1378288269042969,
-1.3848401308059692,
1.5529741048812866,
-0.5648695826530457,
0.31469011306762695,
-2.4181275367736816,
1.331923484802246,
-0.8146183490753174,
1.8667038679122925,
-2.618518590927124,
0.48770666122436523,
-0.5034212470054626,
-0.5488336086273193,
0.20067040622234344,
-0.5554960370063782,
0.03880926966667175,
-0.1069200411438942,
-0.8530532121658325,
-0.06654129922389984,
-0.7475042343139648,
0.6094957590103149,
1.1679033041000366,
1.4795764684677124,
-1.1329615116119385,
-0.3106006681919098,
-1.764197587966919,
-0.10124962031841278,
-0.8075942397117615,
0.39712172746658325,
-2.077270746231079,
-0.20947375893592834,
-2.0010595321655273,
-2.2672767639160156,
-1.3622164726257324,
-0.8874835968017578,
1.0674525499343872,
0.12185090035200119,
-0.9831146001815796,
1.1649459600448608,
-0.3290494382381439,
-1.8423272371292114,
1.1491568088531494,
-2.2011520862579346
] |
https://github.com/huggingface/datasets/issues/4873 | Multiple dataloader memory error | @cyk1337 have you found any solutions to it?
@mariosasko I tried with interleave_datasets to sample batches from two large datasets (wikipedia alike) and it results in out-of-memory error during data loading (16gpus, >1TB physical memory). Do you have any idea about it? | For the use of multiple datasets and tasks, we use around more than 200+ dataloaders, then pass it into `dataloader1, dataloader2, ..., dataloader200=accelerate.prepare(dataloader1, dataloader2, ..., dataloader200)`
It causes the memory error when generating batches. Any solutions to it?
```bash
File "/home/xxx/my_code/src/utils/data_utils.py", line 54, in generate_batch
x = next(iterator)
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 301, in __iter__
for batch in super().__iter__():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 28, in fetch
data.append(next(self.dataset_iter))
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 249, in __iter__
for element in self.dataset:
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 503, in __iter__
for key, example in self._iter():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 500, in _iter
yield from ex_iterable
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 231, in __iter__
new_key = "_".join(str(key) for key in keys)
MemoryError
``` | 567 | 42 | Multiple dataloader memory error
For the use of multiple datasets and tasks, we use around more than 200+ dataloaders, then pass it into `dataloader1, dataloader2, ..., dataloader200=accelerate.prepare(dataloader1, dataloader2, ..., dataloader200)`
It causes the memory error when generating batches. Any solutions to it?
```bash
File "/home/xxx/my_code/src/utils/data_utils.py", line 54, in generate_batch
x = next(iterator)
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 301, in __iter__
for batch in super().__iter__():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 28, in fetch
data.append(next(self.dataset_iter))
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/accelerate/data_loader.py", line 249, in __iter__
for element in self.dataset:
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 503, in __iter__
for key, example in self._iter():
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 500, in _iter
yield from ex_iterable
File "/home/xxx/anaconda3/envs/pt1.7/lib/python3.7/site-packages/datasets/iterable_dataset.py", line 231, in __iter__
new_key = "_".join(str(key) for key in keys)
MemoryError
```
@cyk1337 have you found any solutions to it?
@mariosasko I tried with interleave_datasets to sample batches from two large datasets (wikipedia alike) and it results in out-of-memory error during data loading (16gpus, >1TB physical memory). Do you have any idea about it? | [
-1.1470099687576294,
-0.9423059821128845,
-0.6381407976150513,
1.436461091041565,
-0.12356610596179962,
-1.1968669891357422,
0.19515833258628845,
-0.8920275568962097,
1.4833978414535522,
-0.7161823511123657,
0.16480037569999695,
-1.663545846939087,
-0.16609157621860504,
-0.4206472337245941,
-0.6520217657089233,
-0.9209361672401428,
-0.37261447310447693,
-0.964675784111023,
1.0566421747207642,
2.5569088459014893,
1.3468639850616455,
-1.2680505514144897,
2.7637624740600586,
0.5952059626579285,
-0.23603729903697968,
-1.0897434949874878,
0.49298515915870667,
0.044340137392282486,
-1.188441514968872,
-0.45573946833610535,
-1.0084213018417358,
-0.03196505829691887,
-0.5122919678688049,
-0.2735319137573242,
0.15844859182834625,
0.4559028446674347,
-0.2716652452945709,
-0.27850276231765747,
-0.6641697287559509,
-0.6778272390365601,
0.5836125016212463,
-0.34617653489112854,
1.0140941143035889,
-0.305946946144104,
1.7545908689498901,
-0.6340388655662537,
0.4671413004398346,
0.7603570818901062,
1.265825867652893,
0.2126264125108719,
0.1033075600862503,
0.19974511861801147,
0.29739218950271606,
0.06314069032669067,
0.6333106160163879,
1.2661185264587402,
0.5477806925773621,
0.5102909207344055,
0.6151978373527527,
-2.187107563018799,
1.27662992477417,
-0.8876870274543762,
0.2648608088493347,
1.312303900718689,
-0.8077917098999023,
0.37629902362823486,
-1.8563189506530762,
-0.10388767719268799,
0.6396386027336121,
-2.262946128845215,
0.2599547803401947,
-1.3505069017410278,
-0.5209758877754211,
0.8562593460083008,
0.28155073523521423,
-1.2526888847351074,
0.17231014370918274,
-0.4911471903324127,
1.1312702894210815,
0.47273367643356323,
1.1003458499908447,
-1.6616761684417725,
-0.04208643361926079,
-0.08428125828504562,
0.10782754421234131,
-1.2827690839767456,
-1.693303108215332,
0.5959947109222412,
0.6109093427658081,
0.7186448574066162,
-0.13109849393367767,
1.0683205127716064,
-1.062414526939392,
0.8766298890113831,
-1.071061134338379,
-1.5530072450637817,
-1.390427589416504,
-2.427165985107422,
-2.346151351928711,
0.8599074482917786,
-0.42644810676574707,
-0.5074502229690552,
2.0802571773529053,
-0.9875902533531189,
-1.7521545886993408,
1.1130268573760986,
0.26269957423210144,
0.1350899487733841,
2.4248592853546143,
0.25709056854248047,
-0.8278055787086487,
0.4751036465167999,
-0.742409884929657,
0.8389981389045715,
-0.20943625271320343,
1.3249317407608032,
0.522297203540802,
-0.9390363693237305,
1.7256535291671753,
-0.4319119155406952,
0.5301660895347595,
-0.5360814332962036,
-0.543748676776886,
-0.7628381848335266,
0.20404933393001556,
1.9162369966506958,
-0.2726883590221405,
1.5384210348129272,
-0.2763121426105499,
-1.5689220428466797,
-1.491274118423462,
0.8605954647064209,
0.4622023105621338,
-0.9200435280799866,
-0.015198975801467896,
-0.489663690328598,
0.245381698012352,
0.08066625148057938,
1.1307077407836914,
1.2149795293807983,
0.7061405777931213,
-0.30981144309043884,
-0.9189441800117493,
0.3027621805667877,
-0.2647315561771393,
-0.6233392953872681,
-1.760023832321167,
-0.37918713688850403,
0.21277791261672974,
0.6236504912376404,
-1.2155214548110962,
1.8735073804855347,
0.7757296562194824,
2.0898067951202393,
0.8584980368614197,
-0.3836345374584198,
1.4746214151382446,
-0.030375655740499496,
1.8929206132888794,
-0.49101266264915466,
0.5620540976524353,
-0.41995012760162354,
-1.1138194799423218,
0.7806433439254761,
-0.38952988386154175,
-1.9451277256011963,
-0.8281873464584351,
-0.7216224670410156,
-0.17152556777000427,
-0.6865367889404297,
0.8345350623130798,
-0.30692338943481445,
-1.5229830741882324,
0.13268299400806427,
-0.7044884562492371,
0.15984676778316498,
-1.338140845298767,
0.21008823812007904,
0.7196323871612549,
-0.76341712474823,
-0.050295308232307434,
-0.2634805142879486,
-1.257700800895691,
-0.5502591133117676,
0.32638511061668396,
2.032191753387451,
-0.3790269196033478,
0.918181836605072,
0.9835331439971924,
-0.7427251935005188,
0.18640385568141937,
0.07812031358480453,
-0.3488728404045105,
0.7090079188346863,
-1.1151907444000244,
-0.4561329782009125,
1.236912488937378,
-0.30887049436569214,
-0.7730565667152405,
1.3905225992202759,
0.8924489617347717,
-1.1567243337631226,
-0.3578440248966217,
-0.24973993003368378,
-0.7923268675804138,
0.04683347046375275,
-1.4826191663742065,
-0.1802625209093094,
0.46599000692367554,
-1.422429084777832,
-0.3227606415748596,
-0.20987777411937714,
1.3871736526489258,
-0.14384564757347107,
1.514750599861145,
-0.2816658318042755,
-0.2114918977022171,
-0.31618016958236694,
-0.5518518090248108,
0.14269296824932098,
-0.20238693058490753,
-0.5203243494033813,
0.20411956310272217,
-0.8810521960258484,
0.3036707937717438,
1.549365758895874,
0.32197099924087524,
0.12319474667310715,
0.45409852266311646,
1.078447937965393,
0.44450169801712036,
-0.06393947452306747,
-0.848747730255127,
-1.5290035009384155,
1.856999158859253,
-1.2859326601028442,
1.8760377168655396,
0.8227425217628479,
-0.08754386007785797,
-1.7098664045333862,
-1.8196088075637817,
1.2727352380752563,
1.1003834009170532,
2.4204442501068115,
0.4981342852115631,
0.4878140389919281,
-0.7236770391464233,
-0.7664113640785217,
0.2521074116230011,
-1.0048521757125854,
-0.6793370842933655,
0.2505335509777069,
2.375797748565674,
1.7469066381454468,
-0.5860583782196045,
-0.25672024488449097,
-0.892945408821106,
1.1878342628479004,
-0.27215126156806946,
0.27835699915885925,
2.080169200897217,
-0.32344213128089905,
-0.994927167892456,
1.299198031425476,
-2.406660556793213,
0.2751200497150421,
2.1339595317840576,
0.25296011567115784,
0.11716305464506149,
-1.4892642498016357,
-0.5780138969421387,
-0.35004258155822754,
-0.4611293375492096,
-1.18760347366333,
0.6519706845283508,
-0.2828788161277771,
-0.9376747608184814,
-1.4163438081741333,
-0.031176507472991943,
-1.1172384023666382,
-1.7823907136917114,
0.31845006346702576,
1.8760586977005005,
2.087099552154541,
-0.8218532204627991,
1.3170212507247925,
-0.15870019793510437,
0.02064429223537445,
1.3191773891448975,
1.371301293373108,
3.0796306133270264,
1.9022480249404907,
-1.259765386581421,
0.7340290546417236,
-0.3063070774078369,
-0.49219852685928345,
1.1936532258987427,
-1.1652168035507202,
1.0508185625076294,
-0.18724730610847473,
-1.281205415725708,
-1.2330893278121948,
1.0910931825637817,
0.5334736108779907,
-0.10584426671266556,
-0.5070363879203796,
1.3095895051956177,
0.2410808652639389,
1.3245210647583008,
0.5520899891853333,
-0.4472518563270569,
0.5004096031188965,
-0.3080120384693146,
-0.5347994565963745,
1.7637859582901,
0.12193789333105087,
-1.6307461261749268,
-2.3535828590393066,
-0.33936119079589844,
-1.0216232538223267,
-0.05548783764243126,
-0.6275569796562195,
-0.977512538433075,
1.6163748502731323,
0.3696182072162628,
-1.188937783241272,
-0.23233801126480103,
-0.3179428279399872,
-0.48506298661231995,
2.688741445541382,
-1.2023147344589233,
-0.09498247504234314,
-0.9104503989219666,
-0.510901689529419,
1.6432842016220093,
-1.288353681564331,
-0.18722982704639435,
-0.9318567514419556,
-0.7434260249137878,
-1.2681740522384644,
-0.43676069378852844,
0.06182915344834328,
-0.9341094493865967,
0.67435622215271,
0.1392095983028412,
-1.0997503995895386,
-0.24468906223773956,
-0.9554435014724731,
1.1063429117202759,
-0.10852712392807007,
0.18990355730056763,
1.7778674364089966,
0.3120662569999695,
-0.4662540555000305,
0.6928805112838745,
1.2333065271377563,
0.6000046730041504,
-0.6574116945266724,
0.017692267894744873,
-0.7347815036773682,
0.318189799785614,
-1.4210184812545776,
0.21808375418186188,
-2.9573919773101807,
0.8318016529083252,
-0.22739695012569427,
-0.213358536362648,
-0.06580144912004471,
-1.2119507789611816,
1.1128038167953491,
2.613435983657837,
-1.1885782480239868,
0.42120668292045593,
0.5402421951293945,
1.1328283548355103,
-1.5273854732513428,
0.2283317595720291,
-0.5103921294212341,
1.9945869445800781,
0.15939836204051971,
1.2198032140731812,
-0.5149584412574768,
-2.125502347946167,
0.6859408617019653,
-1.1664201021194458,
-0.9742194414138794,
0.8085025548934937,
-1.0059078931808472,
0.35199815034866333,
-1.4341273307800293,
-0.17210379242897034,
-0.9690189957618713,
-1.2708944082260132,
0.7087974548339844,
0.12050095945596695,
0.39397409558296204,
-0.4942256510257721,
0.3100440800189972,
-2.189152479171753,
-1.475119948387146,
-0.21449778974056244,
-1.138576626777649,
0.5183668732643127,
-0.3947814404964447,
0.5425940752029419,
-0.06666961312294006,
0.1371723860502243,
0.20928363502025604,
1.484255075454712,
3.330925703048706,
0.08146738260984421,
0.10664743185043335,
-0.06577359884977341,
-1.0821281671524048,
1.499131679534912,
0.8551440834999084,
-0.10302775353193283,
-0.5223554372787476,
-1.053997278213501,
1.3187669515609741,
2.0630059242248535,
1.2323192358016968,
0.24765218794345856,
-0.8204858303070068,
-0.7404341697692871,
-0.020242415368556976,
0.25554555654525757,
0.5003179311752319,
0.9734967350959778,
-0.07630318403244019,
0.11215444654226303,
1.3415019512176514,
1.242289662361145,
-0.28950002789497375,
0.39494651556015015,
-1.007974624633789,
-0.4388815760612488,
0.4254705011844635,
0.07711426913738251,
0.11196907609701157,
0.47725069522857666,
-0.975886344909668,
-0.32138246297836304,
-0.26683905720710754,
-0.8872900605201721,
-0.7830345630645752,
-0.36241140961647034,
-0.4128102958202362,
1.5655415058135986,
-0.001821170561015606,
-0.46217283606529236,
0.13052357733249664,
-0.5627534985542297,
-0.20024165511131287,
-1.1021982431411743,
0.024488914757966995,
-0.0673801600933075,
-0.08692567050457001,
-0.26610875129699707,
1.5617456436157227,
-0.9228070378303528,
-2.2394230365753174,
0.19986039400100708,
0.31238633394241333,
-0.3740166127681732,
0.27363353967666626,
1.6667150259017944,
0.4413919746875763,
1.4138307571411133,
1.363115668296814,
1.0218510627746582,
-0.6142770051956177,
-1.1865750551223755,
0.8215219974517822,
0.8467882871627808,
-1.3097652196884155,
0.9749462008476257,
-0.30475422739982605,
-0.5463268160820007,
0.6719323992729187,
1.18277907371521,
0.4286680221557617,
-2.0146219730377197,
0.9224008917808533,
-0.9251065850257874,
0.6432729363441467,
0.7004801034927368,
0.8272935152053833,
0.23731675744056702,
0.8998576998710632,
-1.182560682296753,
-1.1466190814971924,
-0.6884017586708069,
-0.5387939214706421,
1.9399845600128174,
-0.21107542514801025,
0.5718210339546204,
-0.07113894075155258,
-1.1679962873458862,
-0.10221657902002335,
0.7877131104469299,
0.43560922145843506,
-0.4887722134590149,
0.959494411945343,
-0.6074716448783875,
-0.8876432180404663,
-1.229838252067566,
-0.3819517195224762,
-1.156354308128357,
-0.8462783098220825,
1.040163516998291,
0.6996521353721619,
0.5016534328460693,
1.88666832447052,
0.5827382206916809,
0.5044518113136292,
-2.6639444828033447,
0.9131445288658142,
0.2526204288005829,
-0.06271742284297943,
0.8480744361877441,
0.2014760971069336,
1.2463984489440918,
-0.11144114285707474,
0.6212617754936218,
-2.272235631942749,
2.252565860748291,
-0.17782597243785858,
0.6009712219238281,
0.014929979108273983,
-0.14466430246829987,
1.0522630214691162,
0.6100565791130066,
0.5673375129699707,
-1.1571542024612427,
0.7136073112487793,
-0.5763052105903625,
1.0460833311080933,
0.8414551019668579,
-0.955866277217865,
0.11256828159093857,
1.4837623834609985,
0.538847029209137,
-0.39842095971107483,
-0.9566218852996826,
-0.7638790607452393,
0.9894325733184814,
1.5896401405334473,
-0.17885121703147888,
-0.023418456315994263,
0.9532826542854309,
0.6203598380088806,
-1.223684549331665,
-0.030479561537504196,
-0.6962040066719055,
-0.6803608536720276,
1.7069156169891357,
2.011887788772583,
-0.13483960926532745,
-0.23205292224884033,
-0.7544316053390503,
-1.2538553476333618,
0.7257192134857178,
-0.17573469877243042,
0.04776861146092415,
0.7753342986106873,
-0.6744776964187622,
1.0829664468765259,
0.4558429718017578,
1.0454117059707642,
0.04523194208741188,
0.23238232731819153,
0.30624574422836304,
-0.36226484179496765,
-1.2533680200576782,
-0.36976391077041626,
-1.1036895513534546,
-2.5678865909576416,
0.3820805847644806,
-0.30429312586784363,
-1.4865390062332153,
0.10256374627351761,
-1.0511640310287476,
0.9130357503890991,
-0.6081194877624512,
-1.1515730619430542,
-1.3837158679962158,
0.32019108533859253,
-0.18650934100151062,
1.0054765939712524,
-1.758589744567871,
-0.18888607621192932,
1.1917157173156738,
0.8314722180366516,
-0.5726752281188965,
0.9230886101722717,
0.34465330839157104,
0.9523807168006897,
0.7297554612159729,
-0.375966340303421,
0.7182730436325073,
0.03720400854945183,
-1.381977915763855,
0.36901307106018066,
1.1238535642623901,
0.18559527397155762,
1.362864375114441,
-0.47953861951828003,
0.03207346424460411,
0.4699440598487854,
-0.6435273289680481,
-0.6045913100242615,
-0.4801620841026306,
0.7211474180221558,
-0.1087922602891922,
-1.1576120853424072,
-0.19036974012851715,
-0.1824721395969391,
-0.24380384385585785,
0.18190781772136688,
-1.4907453060150146,
-0.34248054027557373,
-0.33618462085723877,
-0.4222356081008911,
-1.388296127319336,
-0.014858237467706203,
1.3131595849990845,
-0.8635656833648682,
-0.15771344304084778,
0.35816681385040283,
0.4601258635520935,
0.5788686275482178,
0.45576345920562744,
-0.762747049331665,
-0.2683442533016205,
-0.3886406421661377,
-0.29950249195098877,
0.29502832889556885,
1.1723514795303345,
0.026493951678276062,
-1.0364742279052734,
0.7059351801872253,
-0.3283703327178955,
0.2506812810897827,
2.0810086727142334,
0.030124589800834656,
-0.7440133690834045,
0.33912742137908936,
-0.7015136480331421,
1.6517822742462158,
1.7037434577941895,
1.3268756866455078,
-0.1526576727628708,
-0.6961403489112854,
0.5311413407325745,
-0.3925248682498932,
-0.30874887108802795,
0.9402500987052917,
0.3470377027988434,
-0.25500795245170593,
-1.364793300628662,
0.667206883430481,
1.3018115758895874,
-0.7490931749343872,
-0.7112043499946594,
0.14692173898220062,
-0.9347118139266968,
1.275438904762268,
0.5609017014503479,
0.2856085002422333,
0.16893211007118225,
1.5088121891021729,
0.76945960521698,
-0.42993098497390747,
0.5575419664382935,
0.5766260027885437,
-0.1944154053926468,
-2.1433753967285156,
-1.043495774269104,
0.23357465863227844,
-0.33337128162384033,
-1.4756264686584473,
1.3161463737487793,
-1.1133689880371094,
-1.0211238861083984,
0.555400550365448,
0.12075091153383255,
1.3559993505477905,
0.380980908870697,
1.712449550628662,
2.147061824798584,
0.9025620818138123,
0.4517251253128052,
1.2567917108535767,
-0.034483738243579865,
-0.40329548716545105,
1.8154597282409668,
-0.40655285120010376,
0.5589996576309204,
0.9526978135108948,
-0.3648025393486023,
-1.0603681802749634,
-0.8830398917198181,
-1.1949628591537476,
-0.6013644933700562,
1.1476324796676636,
0.028883691877126694,
-1.0354746580123901,
0.2671588659286499,
1.594388484954834,
0.13166444003582,
-0.2371692657470703,
0.6601165533065796,
0.30931153893470764,
-0.6559433937072754,
-0.0036727855913341045,
-0.8029810786247253,
0.4425112307071686,
-0.07616444677114487,
-0.2578562796115875,
0.2517496347427368,
0.6104527115821838,
1.3097681999206543,
-0.09649015218019485,
0.1495497077703476,
1.1378288269042969,
-1.3848401308059692,
1.5529741048812866,
-0.5648695826530457,
0.31469011306762695,
-2.4181275367736816,
1.331923484802246,
-0.8146183490753174,
1.8667038679122925,
-2.618518590927124,
0.48770666122436523,
-0.5034212470054626,
-0.5488336086273193,
0.20067040622234344,
-0.5554960370063782,
0.03880926966667175,
-0.1069200411438942,
-0.8530532121658325,
-0.06654129922389984,
-0.7475042343139648,
0.6094957590103149,
1.1679033041000366,
1.4795764684677124,
-1.1329615116119385,
-0.3106006681919098,
-1.764197587966919,
-0.10124962031841278,
-0.8075942397117615,
0.39712172746658325,
-2.077270746231079,
-0.20947375893592834,
-2.0010595321655273,
-2.2672767639160156,
-1.3622164726257324,
-0.8874835968017578,
1.0674525499343872,
0.12185090035200119,
-0.9831146001815796,
1.1649459600448608,
-0.3290494382381439,
-1.8423272371292114,
1.1491568088531494,
-2.2011520862579346
] |
https://github.com/huggingface/datasets/issues/4865 | Dataset Viewer issue for MoritzLaurer/multilingual_nli | Thanks for reporting @MoritzLaurer.
Currently, the dataset preview is working properly: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli
Please note that when a dataset is modified, it might take some time until the preview is completely updated.
@severo might it be worth adding a clearer error message, something like "The preview is updating, please retry later"? | ### Link
_No response_
### Description
I've just uploaded a new dataset to the hub and the viewer does not work for some reason, see here: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli
It displays the error:
```
Status code: 400
Exception: Status400Error
Message: The dataset does not exist.
```
Weirdly enough the dataviewer works for an earlier version of the same dataset. The only difference is that it is smaller, but I'm not aware of other changes I have made: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli_test
Do you know why the dataviewer is not working?
### Owner
_No response_ | 568 | 50 | Dataset Viewer issue for MoritzLaurer/multilingual_nli
### Link
_No response_
### Description
I've just uploaded a new dataset to the hub and the viewer does not work for some reason, see here: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli
It displays the error:
```
Status code: 400
Exception: Status400Error
Message: The dataset does not exist.
```
Weirdly enough the dataviewer works for an earlier version of the same dataset. The only difference is that it is smaller, but I'm not aware of other changes I have made: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli_test
Do you know why the dataviewer is not working?
### Owner
_No response_
Thanks for reporting @MoritzLaurer.
Currently, the dataset preview is working properly: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli
Please note that when a dataset is modified, it might take some time until the preview is completely updated.
@severo might it be worth adding a clearer error message, something like "The preview is updating, please retry later"? | [
-1.1074424982070923,
-0.9644744992256165,
-0.8536689877510071,
1.4725624322891235,
-0.17243467271327972,
-1.3341777324676514,
0.0590539425611496,
-1.1061350107192993,
1.631136417388916,
-0.8317207098007202,
0.23598507046699524,
-1.757813572883606,
-0.09159281104803085,
-0.5835486054420471,
-0.7416439056396484,
-0.9398741126060486,
-0.4585692286491394,
-0.8369784951210022,
0.9882539510726929,
2.5241360664367676,
1.2442505359649658,
-1.4504029750823975,
2.7357211112976074,
0.6622185111045837,
-0.21789158880710602,
-1.0740330219268799,
0.5737888216972351,
-0.10636413097381592,
-1.2592071294784546,
-0.44866880774497986,
-0.9951263666152954,
-0.10271323472261429,
-0.5635334849357605,
-0.5042247176170349,
0.03733215108513832,
0.35965317487716675,
-0.2640320062637329,
-0.2553672194480896,
-0.573988676071167,
-0.8526101112365723,
0.45751574635505676,
-0.29749026894569397,
1.011222243309021,
-0.39494213461875916,
1.868656039237976,
-0.5561379790306091,
0.3798169791698456,
0.7920608520507812,
1.393256425857544,
0.2247822880744934,
-0.07972359657287598,
0.13176459074020386,
0.31804782152175903,
-0.02181587927043438,
0.4782472252845764,
1.097678303718567,
0.5413137674331665,
0.5342764854431152,
0.6063266396522522,
-2.2524712085723877,
1.3046400547027588,
-0.9597892761230469,
0.23450687527656555,
1.4776859283447266,
-0.9794722199440002,
0.3800643980503082,
-1.8335111141204834,
0.06443885713815689,
0.5837582945823669,
-2.212362289428711,
0.21699975430965424,
-1.2936861515045166,
-0.5107925534248352,
0.9384260177612305,
0.30379629135131836,
-1.2396092414855957,
0.2077050507068634,
-0.3957621157169342,
1.104622483253479,
0.6407063603401184,
1.2254215478897095,
-1.7929967641830444,
-0.05554621294140816,
-0.24834223091602325,
0.1492253839969635,
-1.4064183235168457,
-1.5713388919830322,
0.5424607992172241,
0.639876663684845,
0.6112009882926941,
-0.02773909643292427,
0.9258986115455627,
-0.9833918213844299,
0.721519410610199,
-0.9101457595825195,
-1.624756932258606,
-1.5017861127853394,
-2.243648052215576,
-2.2960262298583984,
0.7347760796546936,
-0.5244366526603699,
-0.4705093801021576,
2.0153210163116455,
-1.013291835784912,
-1.738521933555603,
1.1046054363250732,
0.2585340142250061,
0.10071033984422684,
2.4004812240600586,
0.28343692421913147,
-0.7353100180625916,
0.3964032530784607,
-0.7288084030151367,
0.7370589375495911,
-0.2815006375312805,
1.3310210704803467,
0.5056918263435364,
-0.9931164383888245,
1.6532963514328003,
-0.5232698917388916,
0.4975896179676056,
-0.6375991702079773,
-0.4694114923477173,
-0.7594977021217346,
0.28518223762512207,
1.873605489730835,
-0.37364906072616577,
1.664939045906067,
-0.3942088484764099,
-1.5101029872894287,
-1.5814284086227417,
0.8836724162101746,
0.4378426671028137,
-0.8750675916671753,
0.12654191255569458,
-0.3870883285999298,
0.027662910521030426,
-0.1455482840538025,
1.0382190942764282,
1.1913210153579712,
0.6102548837661743,
-0.31216350197792053,
-0.8498353362083435,
0.2985154688358307,
-0.10844562947750092,
-0.7190761566162109,
-1.7814600467681885,
-0.38601213693618774,
0.15696319937705994,
0.6744217872619629,
-1.1915310621261597,
1.7414803504943848,
0.8737089037895203,
1.953985571861267,
1.0123097896575928,
-0.33308666944503784,
1.386898159980774,
0.0673689916729927,
1.9388898611068726,
-0.5411499738693237,
0.7056995630264282,
-0.3017634451389313,
-1.176712989807129,
0.8162755966186523,
-0.3877658247947693,
-2.0298807621002197,
-0.7884277701377869,
-0.9076125621795654,
-0.1504797786474228,
-0.7649942636489868,
0.9569686651229858,
-0.22872503101825714,
-1.3818964958190918,
0.19468800723552704,
-0.7049016356468201,
0.1830425262451172,
-1.2207119464874268,
0.25550317764282227,
0.7195816040039062,
-0.5712770819664001,
-0.07379558682441711,
-0.2405450940132141,
-1.3325039148330688,
-0.4195304214954376,
0.2169468253850937,
1.8912415504455566,
-0.6701330542564392,
0.9647955298423767,
0.9255157709121704,
-0.6433428525924683,
0.06848214566707611,
0.25918126106262207,
-0.24050791561603546,
0.8830476999282837,
-1.0411168336868286,
-0.39385971426963806,
1.247688889503479,
-0.17520400881767273,
-0.6818192601203918,
1.481119155883789,
0.8167200684547424,
-0.9909720420837402,
-0.23073387145996094,
-0.2446521520614624,
-0.8093546628952026,
-0.03613237291574478,
-1.6082156896591187,
-0.10159685462713242,
0.2434798777103424,
-1.4396690130233765,
-0.4280625879764557,
-0.1826407015323639,
1.3356863260269165,
-0.20416714251041412,
1.4487806558609009,
-0.41768351197242737,
-0.22048740088939667,
-0.4919466972351074,
-0.40631240606307983,
0.193409264087677,
-0.203976571559906,
-0.5339105129241943,
0.1723032146692276,
-0.8504868149757385,
0.341781884431839,
1.3512529134750366,
0.4301799237728119,
0.12411362677812576,
0.48444005846977234,
1.1091800928115845,
0.3041204512119293,
-0.013489320874214172,
-0.9278599619865417,
-1.5567489862442017,
2.013357162475586,
-1.3915244340896606,
2.021226644515991,
0.779994785785675,
-0.05962495133280754,
-1.7696964740753174,
-1.845569133758545,
1.294634461402893,
1.167768955230713,
2.296916961669922,
0.5166833400726318,
0.3861914873123169,
-0.870898425579071,
-0.6710128784179688,
0.3750664293766022,
-1.0223572254180908,
-0.7461943626403809,
0.1881592869758606,
2.363867998123169,
1.7303110361099243,
-0.4795837998390198,
-0.241476371884346,
-0.9404139518737793,
1.2268660068511963,
-0.1923936903476715,
0.225319966673851,
2.0516481399536133,
-0.24757736921310425,
-1.0410547256469727,
1.2494828701019287,
-2.35196852684021,
0.12880656123161316,
2.0941154956817627,
0.25538283586502075,
0.16137801110744476,
-1.4828484058380127,
-0.7495762705802917,
-0.18240754306316376,
-0.38021019101142883,
-1.2734452486038208,
0.5287129282951355,
-0.38854843378067017,
-0.8138840794563293,
-1.4617995023727417,
0.11532486975193024,
-1.062668800354004,
-1.6582156419754028,
0.23144949972629547,
1.8645838499069214,
1.9839531183242798,
-0.878218412399292,
1.460386872291565,
-0.2616383731365204,
0.13236193358898163,
1.3272483348846436,
1.269173264503479,
3.1704931259155273,
1.9019584655761719,
-1.3128383159637451,
0.7481325268745422,
-0.12042263895273209,
-0.4046275317668915,
1.1997754573822021,
-1.1824663877487183,
1.1745505332946777,
-0.28471705317497253,
-1.2588850259780884,
-1.3047356605529785,
1.0436320304870605,
0.5105147957801819,
0.026713740080595016,
-0.5263523459434509,
1.2681472301483154,
-0.03971075639128685,
1.3845714330673218,
0.619015634059906,
-0.4568867087364197,
0.54900062084198,
-0.36800575256347656,
-0.5572153925895691,
1.5795575380325317,
0.17663003504276276,
-1.4938522577285767,
-2.265413761138916,
-0.3326668441295624,
-0.8685412406921387,
-0.09697280824184418,
-0.6017729043960571,
-0.9981821179389954,
1.6380181312561035,
0.4340631365776062,
-1.3325188159942627,
-0.4459013342857361,
-0.3956212103366852,
-0.583785355091095,
2.754133939743042,
-1.4922224283218384,
-0.1946464478969574,
-1.014849066734314,
-0.5187789797782898,
1.6715872287750244,
-1.2222093343734741,
-0.10741493850946426,
-1.049228549003601,
-0.7494556903839111,
-1.3895395994186401,
-0.5144057273864746,
-0.09780244529247284,
-0.8484664559364319,
0.7345129251480103,
0.17886872589588165,
-1.039507269859314,
-0.3027035593986511,
-0.8251622915267944,
0.9154041409492493,
-0.14984484016895294,
0.2836082875728607,
1.9420067071914673,
0.4158092737197876,
-0.3959810137748718,
0.6746062636375427,
1.1001667976379395,
0.6502700448036194,
-0.7257846593856812,
0.17348985373973846,
-0.6154012084007263,
0.2892536222934723,
-1.4164303541183472,
0.23584730923175812,
-2.937129259109497,
0.6045756340026855,
-0.12150569260120392,
-0.1549176424741745,
-0.015344647690653801,
-1.296504259109497,
1.0746861696243286,
2.5749552249908447,
-1.1701240539550781,
0.3922191262245178,
0.32296693325042725,
1.2544844150543213,
-1.738477110862732,
0.298525869846344,
-0.47874343395233154,
2.0708072185516357,
0.1844213902950287,
1.21019446849823,
-0.4092426002025604,
-2.173863172531128,
0.564706027507782,
-1.274609923362732,
-1.080085277557373,
0.8799046874046326,
-0.8043137788772583,
0.15966011583805084,
-1.443315029144287,
-0.12066829949617386,
-0.9104266166687012,
-1.245201587677002,
0.8772985935211182,
0.041913989931344986,
0.4266681969165802,
-0.5364654660224915,
0.36931663751602173,
-2.11220383644104,
-1.327323079109192,
-0.14901727437973022,
-0.9594740271568298,
0.45133960247039795,
-0.2794435918331146,
0.6430249214172363,
-0.21248146891593933,
0.06235296279191971,
0.3383370339870453,
1.3717904090881348,
3.5104804039001465,
0.3401179909706116,
0.32754525542259216,
-0.09219445288181305,
-0.9623302817344666,
1.4755854606628418,
0.9949629306793213,
-0.048711296170949936,
-0.4984769821166992,
-0.8803756237030029,
1.2793519496917725,
2.031808614730835,
1.0416220426559448,
0.09797245264053345,
-0.829073965549469,
-0.5757052302360535,
0.024088211357593536,
0.19539766013622284,
0.5280082821846008,
0.8698669672012329,
-0.0023596612736582756,
0.11085641384124756,
1.4195390939712524,
1.2320371866226196,
-0.4101561903953552,
0.3996904194355011,
-0.8957480192184448,
-0.5008295178413391,
0.44900402426719666,
0.2897428274154663,
0.056727856397628784,
0.5162683725357056,
-1.0187374353408813,
-0.21224339306354523,
-0.4368725121021271,
-0.9603075981140137,
-0.657013475894928,
-0.5314102172851562,
-0.345086008310318,
1.5981366634368896,
0.1860441267490387,
-0.423110693693161,
0.034140679985284805,
-0.8019493222236633,
-0.15016083419322968,
-1.1873599290847778,
0.25935685634613037,
-0.12736617028713226,
-0.0625186637043953,
-0.091864675283432,
1.6517423391342163,
-0.9471493363380432,
-2.0784378051757812,
0.2259763479232788,
0.28634339570999146,
-0.3926425278186798,
0.1508694291114807,
1.6261022090911865,
0.4376594126224518,
1.3826617002487183,
1.3292447328567505,
0.9674440026283264,
-0.6656437516212463,
-1.2930737733840942,
0.6722568869590759,
0.9421193599700928,
-1.4566813707351685,
0.9721679091453552,
-0.13316382467746735,
-0.6417255401611328,
0.6724731922149658,
1.3384673595428467,
0.41771838068962097,
-1.860373854637146,
0.769214928150177,
-0.8397210240364075,
0.761009693145752,
0.6356192827224731,
0.8434175848960876,
0.21067917346954346,
0.8235377669334412,
-1.2352824211120605,
-1.172951579093933,
-0.7888687252998352,
-0.5837145447731018,
1.8653708696365356,
-0.2518606185913086,
0.6384247541427612,
-0.149801567196846,
-1.209774374961853,
-0.12670890986919403,
0.7035496830940247,
0.35521721839904785,
-0.35594379901885986,
0.8719338178634644,
-0.6477627754211426,
-1.056049108505249,
-1.3502827882766724,
-0.37137284874916077,
-0.9383872747421265,
-0.9313313961029053,
1.114823579788208,
0.8460288047790527,
0.28851285576820374,
1.8890043497085571,
0.5723143815994263,
0.23445537686347961,
-2.6570122241973877,
0.9127955436706543,
0.25389420986175537,
0.04807397350668907,
0.9141085743904114,
0.21597889065742493,
1.0084059238433838,
0.054641641676425934,
0.5366697311401367,
-2.4119136333465576,
2.2228260040283203,
-0.20743416249752045,
0.5640386343002319,
-0.06325538456439972,
-0.2842608392238617,
1.1307326555252075,
0.5882722735404968,
0.5082830786705017,
-1.0786434412002563,
0.76803058385849,
-0.5074053406715393,
1.0468066930770874,
0.9417479634284973,
-0.8828171491622925,
-0.014941195026040077,
1.3562730550765991,
0.5757076144218445,
-0.5656567811965942,
-0.9214262962341309,
-0.9087393879890442,
0.8744673728942871,
1.6658620834350586,
0.07371263951063156,
-0.05293753370642662,
0.9384865164756775,
0.6452347636222839,
-1.2048677206039429,
0.17507286369800568,
-0.7301450371742249,
-0.7250542640686035,
1.687840223312378,
1.950455904006958,
-0.026591379195451736,
-0.12284355610609055,
-0.6662195920944214,
-1.2248965501785278,
0.7417697906494141,
-0.05954424664378166,
0.14914461970329285,
0.6912900805473328,
-0.6285141706466675,
1.1510940790176392,
0.649920642375946,
1.0124568939208984,
0.12894223630428314,
0.3171107769012451,
0.39386439323425293,
-0.3178955912590027,
-1.1502090692520142,
-0.19751401245594025,
-1.1617783308029175,
-2.436979293823242,
0.5482398867607117,
-0.3099413514137268,
-1.4430617094039917,
0.049661267548799515,
-0.9991987347602844,
0.9544625878334045,
-0.676238477230072,
-1.1231478452682495,
-1.475688099861145,
0.25936803221702576,
-0.08254699409008026,
0.8637083172798157,
-1.610513687133789,
0.00021347682923078537,
1.2472883462905884,
0.8345889449119568,
-0.6575859189033508,
1.009019136428833,
0.15622739493846893,
1.0769908428192139,
0.7611125111579895,
-0.3514876365661621,
0.49111658334732056,
0.15295961499214172,
-1.3999625444412231,
0.5533933639526367,
1.038776159286499,
0.13923446834087372,
1.5629976987838745,
-0.4761315584182739,
0.08933985978364944,
0.46093642711639404,
-0.5282854437828064,
-0.3924567401409149,
-0.5617421269416809,
0.7517990469932556,
0.13384251296520233,
-0.8795444965362549,
0.07052544504404068,
-0.16168299317359924,
-0.20161381363868713,
0.15946455299854279,
-1.4359947443008423,
-0.2109510749578476,
-0.41805562376976013,
-0.5561445355415344,
-1.2245525121688843,
0.007787168957293034,
1.4144223928451538,
-0.7257303595542908,
-0.1572951078414917,
0.5872204303741455,
0.3854394555091858,
0.47169187664985657,
0.6605427861213684,
-0.6172062158584595,
-0.3120640218257904,
-0.332089364528656,
-0.3077148199081421,
0.3638247847557068,
1.1844761371612549,
-0.14702655375003815,
-1.0083887577056885,
0.7374932169914246,
-0.41857776045799255,
0.029720187187194824,
1.9928441047668457,
0.1356714963912964,
-0.7577203512191772,
0.31435465812683105,
-0.7401826977729797,
1.8912453651428223,
1.7034022808074951,
1.3208932876586914,
-0.1267249584197998,
-0.8868270516395569,
0.6800167560577393,
-0.26196420192718506,
-0.3127690255641937,
0.9610022902488708,
0.41818392276763916,
-0.13733217120170593,
-1.4359450340270996,
0.6014699339866638,
1.216125249862671,
-0.8582497835159302,
-0.711513340473175,
0.05171965807676315,
-0.7875718474388123,
1.0513875484466553,
0.6302164196968079,
0.35013025999069214,
0.2523978650569916,
1.5953928232192993,
0.7161203622817993,
-0.406872034072876,
0.45816031098365784,
0.5050697326660156,
-0.20293401181697845,
-2.0841891765594482,
-1.0189508199691772,
0.37345266342163086,
-0.40470728278160095,
-1.5268020629882812,
1.297468662261963,
-1.1923770904541016,
-0.9411941766738892,
0.5060057640075684,
0.056927867233753204,
1.3810030221939087,
0.296090692281723,
1.6515012979507446,
2.0924456119537354,
0.9315197467803955,
0.32484403252601624,
1.3397550582885742,
-0.05609402060508728,
-0.41269999742507935,
1.766658902168274,
-0.45091238617897034,
0.46538856625556946,
1.0545635223388672,
-0.47944754362106323,
-1.179781436920166,
-0.8008473515510559,
-1.1537920236587524,
-0.5848143696784973,
1.2402458190917969,
0.18140535056591034,
-1.1273424625396729,
0.14820465445518494,
1.5729444026947021,
0.06621625274419785,
-0.2787221074104309,
0.6013235449790955,
0.4500848948955536,
-0.7727780342102051,
0.036380790174007416,
-0.7985674738883972,
0.5335810780525208,
-0.08328447490930557,
-0.31329968571662903,
0.39155176281929016,
0.43659836053848267,
1.2904322147369385,
0.018645361065864563,
0.18432305753231049,
1.1996830701828003,
-1.3536739349365234,
1.558711290359497,
-0.48617997765541077,
0.1949026733636856,
-2.436711072921753,
1.3624496459960938,
-0.730290949344635,
1.9061429500579834,
-2.6136631965637207,
0.38061708211898804,
-0.5974266529083252,
-0.48500654101371765,
0.39120107889175415,
-0.49260497093200684,
0.06450208276510239,
-0.19570651650428772,
-1.05023193359375,
-0.061125870794057846,
-0.7355678677558899,
0.594342827796936,
1.1227822303771973,
1.3846908807754517,
-1.1799174547195435,
-0.34670791029930115,
-1.7834208011627197,
-0.15520207583904266,
-0.7287709712982178,
0.33663350343704224,
-2.016439199447632,
-0.06896363943815231,
-1.9900063276290894,
-2.417060375213623,
-1.4803317785263062,
-0.8027371764183044,
1.0385159254074097,
0.23728729784488678,
-0.9224569201469421,
1.1128978729248047,
-0.345763623714447,
-1.758741855621338,
1.0831902027130127,
-2.087355375289917
] |
https://github.com/huggingface/datasets/issues/4865 | Dataset Viewer issue for MoritzLaurer/multilingual_nli | Thanks for your response. You are right, its now working well. I had waited for 30 min or so and refreshed several times and thought there was some other error. Yeah, a different error message sounds like a good idea to avoid confusion. | ### Link
_No response_
### Description
I've just uploaded a new dataset to the hub and the viewer does not work for some reason, see here: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli
It displays the error:
```
Status code: 400
Exception: Status400Error
Message: The dataset does not exist.
```
Weirdly enough the dataviewer works for an earlier version of the same dataset. The only difference is that it is smaller, but I'm not aware of other changes I have made: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli_test
Do you know why the dataviewer is not working?
### Owner
_No response_ | 568 | 43 | Dataset Viewer issue for MoritzLaurer/multilingual_nli
### Link
_No response_
### Description
I've just uploaded a new dataset to the hub and the viewer does not work for some reason, see here: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli
It displays the error:
```
Status code: 400
Exception: Status400Error
Message: The dataset does not exist.
```
Weirdly enough the dataviewer works for an earlier version of the same dataset. The only difference is that it is smaller, but I'm not aware of other changes I have made: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli_test
Do you know why the dataviewer is not working?
### Owner
_No response_
Thanks for your response. You are right, its now working well. I had waited for 30 min or so and refreshed several times and thought there was some other error. Yeah, a different error message sounds like a good idea to avoid confusion. | [
-1.1431514024734497,
-1.0060889720916748,
-0.8125842809677124,
1.4642518758773804,
-0.1580192744731903,
-1.3434617519378662,
0.09268898516893387,
-1.1010422706604004,
1.650026559829712,
-0.8209294080734253,
0.2547682821750641,
-1.7226252555847168,
-0.03161000832915306,
-0.5724462270736694,
-0.6722018718719482,
-0.9504392147064209,
-0.4077606201171875,
-0.8608356714248657,
0.9960547089576721,
2.57120418548584,
1.2281239032745361,
-1.4442377090454102,
2.691594123840332,
0.6739873886108398,
-0.21944919228553772,
-1.061745285987854,
0.6111998558044434,
-0.06821712851524353,
-1.279312014579773,
-0.4296959936618805,
-1.0117744207382202,
-0.08932670950889587,
-0.5689356327056885,
-0.5083670020103455,
0.0050236377865076065,
0.42473673820495605,
-0.24256277084350586,
-0.26084017753601074,
-0.5458011031150818,
-0.7841752171516418,
0.46674758195877075,
-0.3278864026069641,
1.0194554328918457,
-0.36477282643318176,
1.8295714855194092,
-0.5388761162757874,
0.4570695161819458,
0.7660272717475891,
1.395172357559204,
0.19807910919189453,
-0.07924661785364151,
0.10766156762838364,
0.3796430230140686,
-0.0692395344376564,
0.3723210096359253,
1.0769749879837036,
0.527946949005127,
0.5602648258209229,
0.6380853056907654,
-2.191704273223877,
1.3340728282928467,
-0.9560959935188293,
0.27063247561454773,
1.4383642673492432,
-1.044523000717163,
0.36255645751953125,
-1.8168374300003052,
0.015186374075710773,
0.5500408411026001,
-2.1819162368774414,
0.20141758024692535,
-1.2516415119171143,
-0.5510033369064331,
0.9480906128883362,
0.3113192319869995,
-1.2333641052246094,
0.14145638048648834,
-0.3866467773914337,
1.1062172651290894,
0.6292577981948853,
1.1678447723388672,
-1.7572743892669678,
-0.049338072538375854,
-0.2876836061477661,
0.11699321120977402,
-1.3682111501693726,
-1.5616482496261597,
0.548891544342041,
0.6778848767280579,
0.65798419713974,
-0.04336422681808472,
0.9414569139480591,
-0.9672821164131165,
0.7646901607513428,
-0.8951993584632874,
-1.659225583076477,
-1.416207194328308,
-2.317023992538452,
-2.3278729915618896,
0.7296797633171082,
-0.5075053572654724,
-0.4816998243331909,
2.033191204071045,
-1.0182019472122192,
-1.7608131170272827,
1.1094878911972046,
0.21422606706619263,
0.08840198069810867,
2.3255176544189453,
0.33008527755737305,
-0.6862071752548218,
0.36927422881126404,
-0.7695280313491821,
0.8047789931297302,
-0.3075540065765381,
1.3542674779891968,
0.5184212923049927,
-1.0108658075332642,
1.6265349388122559,
-0.4622294008731842,
0.5370945930480957,
-0.6885677576065063,
-0.5082150101661682,
-0.8189507126808167,
0.3646096885204315,
1.8765202760696411,
-0.37403610348701477,
1.668012022972107,
-0.39668771624565125,
-1.5229511260986328,
-1.6136000156402588,
0.8573256134986877,
0.4208584427833557,
-0.8362178206443787,
0.1463007926940918,
-0.3808574378490448,
-0.024015512317419052,
-0.05624525621533394,
1.064089298248291,
1.262144684791565,
0.6372876167297363,
-0.31981533765792847,
-0.8619840741157532,
0.2930062711238861,
-0.14006514847278595,
-0.7395681738853455,
-1.8175785541534424,
-0.45253467559814453,
0.13622216880321503,
0.7085246443748474,
-1.1612733602523804,
1.7558236122131348,
0.8551391363143921,
1.9376622438430786,
1.014041543006897,
-0.3386676013469696,
1.3650299310684204,
0.028857193887233734,
1.907481074333191,
-0.5676168203353882,
0.7272223234176636,
-0.2720130383968353,
-1.1455552577972412,
0.8307482600212097,
-0.4049830734729767,
-2.0353052616119385,
-0.7813205718994141,
-0.9148680567741394,
-0.1345743089914322,
-0.7642888426780701,
0.9528828263282776,
-0.2836613655090332,
-1.3721895217895508,
0.23251210153102875,
-0.7201864123344421,
0.1765938103199005,
-1.2066941261291504,
0.2660880386829376,
0.7360569834709167,
-0.6014932990074158,
-0.019734805449843407,
-0.23554766178131104,
-1.294085144996643,
-0.4714929461479187,
0.3089795410633087,
1.8814595937728882,
-0.6478754878044128,
1.0001072883605957,
0.9423081874847412,
-0.6526637077331543,
0.06843490153551102,
0.28360453248023987,
-0.2767329216003418,
0.9146823883056641,
-1.0897520780563354,
-0.3651999235153198,
1.2089219093322754,
-0.19310630857944489,
-0.6506485939025879,
1.4981507062911987,
0.7833688259124756,
-0.9942893385887146,
-0.17804816365242004,
-0.23276109993457794,
-0.7667962908744812,
0.009991657920181751,
-1.6236662864685059,
-0.16993802785873413,
0.25075778365135193,
-1.4650875329971313,
-0.489205926656723,
-0.20171450078487396,
1.3408777713775635,
-0.19697269797325134,
1.3695764541625977,
-0.396185040473938,
-0.30045798420906067,
-0.45285218954086304,
-0.41421109437942505,
0.20024602115154266,
-0.26392945647239685,
-0.542611837387085,
0.1517212688922882,
-0.8612372875213623,
0.32901397347450256,
1.3499646186828613,
0.3708570599555969,
0.1203620657324791,
0.4991230368614197,
1.0841517448425293,
0.2970534861087799,
-0.10082906484603882,
-0.9121485948562622,
-1.5688825845718384,
2.0153884887695312,
-1.364815354347229,
2.0060789585113525,
0.8302790522575378,
-0.0544438362121582,
-1.8334951400756836,
-1.8400588035583496,
1.3040169477462769,
1.217564344406128,
2.3187015056610107,
0.5486248135566711,
0.3794722557067871,
-0.8674209117889404,
-0.6662589907646179,
0.37776100635528564,
-1.056649088859558,
-0.7148199081420898,
0.11506984382867813,
2.3482983112335205,
1.7779487371444702,
-0.4934113025665283,
-0.2515179514884949,
-0.9761340618133545,
1.225608229637146,
-0.1640443503856659,
0.19815558195114136,
2.0247788429260254,
-0.27339068055152893,
-1.0580247640609741,
1.227165937423706,
-2.3023629188537598,
0.1020408347249031,
2.105142116546631,
0.2491626739501953,
0.10260449349880219,
-1.512160062789917,
-0.7201898097991943,
-0.18311266601085663,
-0.42429929971694946,
-1.2367680072784424,
0.5795035362243652,
-0.3654405474662781,
-0.771610677242279,
-1.5068484544754028,
0.12933224439620972,
-1.1290689706802368,
-1.6621006727218628,
0.2650958299636841,
1.8109034299850464,
1.984462022781372,
-0.7997663021087646,
1.5011709928512573,
-0.20955348014831543,
0.16334494948387146,
1.3207579851150513,
1.1922698020935059,
3.191500186920166,
1.9116356372833252,
-1.263536810874939,
0.7001938223838806,
-0.10279136151075363,
-0.4209226965904236,
1.187290072441101,
-1.1275606155395508,
1.2297451496124268,
-0.257886677980423,
-1.245970368385315,
-1.346364974975586,
1.0412750244140625,
0.46509942412376404,
0.0071493955329060555,
-0.46245595812797546,
1.2976977825164795,
-0.02889060229063034,
1.3233519792556763,
0.5704468488693237,
-0.42302659153938293,
0.5888477563858032,
-0.4060136079788208,
-0.5455503463745117,
1.5637753009796143,
0.26633667945861816,
-1.4755147695541382,
-2.2408461570739746,
-0.34119248390197754,
-0.8582676649093628,
-0.09868445992469788,
-0.6477393507957458,
-1.0324805974960327,
1.6190062761306763,
0.4589974880218506,
-1.3267501592636108,
-0.4240301549434662,
-0.4014156460762024,
-0.6441128253936768,
2.7410027980804443,
-1.456404209136963,
-0.2251247763633728,
-0.9718654155731201,
-0.5707602500915527,
1.610644817352295,
-1.288273811340332,
-0.1254914253950119,
-1.0842993259429932,
-0.7385268211364746,
-1.3090834617614746,
-0.5101728439331055,
-0.09817497432231903,
-0.8651815056800842,
0.7644407749176025,
0.16471457481384277,
-1.025360107421875,
-0.22358320653438568,
-0.8324357867240906,
0.9136866331100464,
-0.14547371864318848,
0.3400072753429413,
1.914300799369812,
0.44743460416793823,
-0.3722810447216034,
0.6624753475189209,
1.104236125946045,
0.6270472407341003,
-0.6936334371566772,
0.15665704011917114,
-0.6414610147476196,
0.2500324249267578,
-1.3490158319473267,
0.27024519443511963,
-2.9692223072052,
0.6146312952041626,
-0.09760261327028275,
-0.16141146421432495,
-0.011636698618531227,
-1.3241976499557495,
1.0604838132858276,
2.593782424926758,
-1.2220121622085571,
0.43209344148635864,
0.3265208601951599,
1.1871232986450195,
-1.6340923309326172,
0.345236212015152,
-0.37823963165283203,
2.0641212463378906,
0.16608388721942902,
1.2332441806793213,
-0.47603750228881836,
-2.2239747047424316,
0.5860018134117126,
-1.242260217666626,
-1.1184134483337402,
0.8155953288078308,
-0.7903546094894409,
0.09526395052671432,
-1.4243922233581543,
-0.1378878802061081,
-0.8591620326042175,
-1.274452567100525,
0.8363757133483887,
0.07752494513988495,
0.43768444657325745,
-0.5329645872116089,
0.3355206847190857,
-2.1380343437194824,
-1.382794737815857,
-0.1830674707889557,
-0.968376100063324,
0.3914605975151062,
-0.3072756826877594,
0.6251792311668396,
-0.21305020153522491,
0.08185206353664398,
0.3021188974380493,
1.4261159896850586,
3.5213639736175537,
0.28859272599220276,
0.4072634279727936,
-0.04788772016763687,
-0.9386497735977173,
1.4849902391433716,
0.9997017979621887,
-0.033522047102451324,
-0.5280234217643738,
-0.9084463119506836,
1.288622498512268,
2.04426646232605,
1.0532796382904053,
0.0636865645647049,
-0.7706266045570374,
-0.6031769514083862,
-0.007925011217594147,
0.14817503094673157,
0.5228256583213806,
0.8415390849113464,
0.04652532935142517,
0.07932687550783157,
1.467159628868103,
1.2407211065292358,
-0.4324309527873993,
0.3567354083061218,
-0.8331054449081421,
-0.5074886679649353,
0.43172505497932434,
0.3376816511154175,
0.08177638798952103,
0.4325687289237976,
-0.9777646064758301,
-0.23325802385807037,
-0.4097011685371399,
-1.0260820388793945,
-0.6540600657463074,
-0.5059021711349487,
-0.33148327469825745,
1.5996062755584717,
0.19479481875896454,
-0.4599042534828186,
-0.022533567622303963,
-0.8344823122024536,
-0.18085674941539764,
-1.1618338823318481,
0.23034733533859253,
-0.1693158894777298,
-0.04643046855926514,
-0.07215150445699692,
1.6814842224121094,
-0.9947407841682434,
-2.167592763900757,
0.28029313683509827,
0.23003853857517242,
-0.4187179505825043,
0.15311743319034576,
1.6059956550598145,
0.5319823622703552,
1.3716062307357788,
1.3158096075057983,
0.981231153011322,
-0.6982652544975281,
-1.2085857391357422,
0.687225341796875,
0.882399320602417,
-1.4096052646636963,
0.9493058323860168,
-0.09816397726535797,
-0.5916105508804321,
0.7292441725730896,
1.3110743761062622,
0.4558614492416382,
-1.9114362001419067,
0.7758840918540955,
-0.821377694606781,
0.7917997241020203,
0.662164032459259,
0.8093575239181519,
0.1862514615058899,
0.7876828908920288,
-1.2853593826293945,
-1.156836748123169,
-0.7726356983184814,
-0.5878120064735413,
1.9615806341171265,
-0.2580050230026245,
0.6436492204666138,
-0.197037473320961,
-1.2503527402877808,
-0.1285249888896942,
0.685440182685852,
0.39682790637016296,
-0.38149791955947876,
0.8329938650131226,
-0.6392993927001953,
-1.0644499063491821,
-1.3848930597305298,
-0.39425742626190186,
-0.9034541845321655,
-0.975360095500946,
1.1281360387802124,
0.766018807888031,
0.30251598358154297,
1.90176522731781,
0.5837725400924683,
0.21850541234016418,
-2.634631633758545,
0.9066497087478638,
0.2388698160648346,
0.09667613357305527,
0.9340319633483887,
0.2230813354253769,
1.0305721759796143,
0.00929762702435255,
0.5506552457809448,
-2.32479190826416,
2.226475954055786,
-0.23945972323417664,
0.5535423755645752,
-0.08982136100530624,
-0.2288481444120407,
1.187320351600647,
0.5773957371711731,
0.5561161041259766,
-1.1040151119232178,
0.7257254719734192,
-0.5252164006233215,
1.0834635496139526,
0.9571217894554138,
-0.8560526371002197,
-0.013155259191989899,
1.3543145656585693,
0.5774303674697876,
-0.5631428360939026,
-0.9407299757003784,
-0.9670382142066956,
0.9038115739822388,
1.6995689868927002,
0.06939121335744858,
-0.04609173163771629,
0.912339448928833,
0.6394311785697937,
-1.2028791904449463,
0.12590163946151733,
-0.7273682355880737,
-0.6784918904304504,
1.6597672700881958,
1.971044898033142,
-0.0027380897663533688,
-0.15394210815429688,
-0.6820877194404602,
-1.1901973485946655,
0.7625476717948914,
-0.020269304513931274,
0.10987954586744308,
0.6327734589576721,
-0.6383601427078247,
1.1457148790359497,
0.7312667369842529,
1.0246150493621826,
0.1579611450433731,
0.3757597804069519,
0.4429231882095337,
-0.28761979937553406,
-1.1985286474227905,
-0.28202030062675476,
-1.1436594724655151,
-2.4280755519866943,
0.5461928248405457,
-0.3317723870277405,
-1.4633170366287231,
0.01861824095249176,
-1.0177385807037354,
0.9534661173820496,
-0.6389169692993164,
-1.0778543949127197,
-1.5219353437423706,
0.2312425822019577,
-0.11733806133270264,
0.8890113830566406,
-1.5495103597640991,
0.0036166179925203323,
1.2475106716156006,
0.851444661617279,
-0.6974097490310669,
1.0583093166351318,
0.17641200125217438,
1.055171012878418,
0.7574530243873596,
-0.39400190114974976,
0.4478321075439453,
0.1670072376728058,
-1.372706413269043,
0.47895845770835876,
1.0593470335006714,
0.11506646126508713,
1.5268309116363525,
-0.5182018280029297,
0.09916950017213821,
0.4902441203594208,
-0.47732144594192505,
-0.48613888025283813,
-0.5339957475662231,
0.7159461379051208,
0.12488871067762375,
-0.8148643970489502,
0.09584726393222809,
-0.12585392594337463,
-0.22256875038146973,
0.19914241135120392,
-1.5056679248809814,
-0.16832679510116577,
-0.3981224000453949,
-0.5993712544441223,
-1.2999018430709839,
0.043483227491378784,
1.3971936702728271,
-0.6785407066345215,
-0.14492692053318024,
0.5258544683456421,
0.44218185544013977,
0.4645659029483795,
0.6400396227836609,
-0.6220916509628296,
-0.2671971619129181,
-0.3720652163028717,
-0.3478001058101654,
0.3896743953227997,
1.1366368532180786,
-0.15387800335884094,
-0.9935909509658813,
0.7123765349388123,
-0.4112241268157959,
0.08274153620004654,
2.0205180644989014,
0.12759190797805786,
-0.7948378324508667,
0.31815865635871887,
-0.7629216909408569,
1.928807258605957,
1.7163608074188232,
1.312582015991211,
-0.06405695527791977,
-0.9077808260917664,
0.654039740562439,
-0.20084314048290253,
-0.3187859058380127,
0.9844428300857544,
0.40241262316703796,
-0.13948218524456024,
-1.3566513061523438,
0.6136623024940491,
1.2283294200897217,
-0.910198986530304,
-0.7941855788230896,
0.06389332562685013,
-0.8122901916503906,
1.086989164352417,
0.6414560675621033,
0.4322521984577179,
0.2652915120124817,
1.6574043035507202,
0.6552064418792725,
-0.43254920840263367,
0.5072910189628601,
0.48029324412345886,
-0.202300027012825,
-1.9951145648956299,
-1.0556801557540894,
0.3581630289554596,
-0.4963330030441284,
-1.55670964717865,
1.3130306005477905,
-1.216267704963684,
-0.9475223422050476,
0.510629415512085,
0.05146985128521919,
1.4436908960342407,
0.27938005328178406,
1.6425704956054688,
2.0819993019104004,
0.8641140460968018,
0.3299979865550995,
1.3351945877075195,
-0.10990673303604126,
-0.45129865407943726,
1.8163745403289795,
-0.4454208314418793,
0.5150614380836487,
1.1285548210144043,
-0.4322111904621124,
-1.1294362545013428,
-0.7838892936706543,
-1.0943093299865723,
-0.6066123843193054,
1.1736273765563965,
0.16732977330684662,
-1.1178390979766846,
0.16421867907047272,
1.5737828016281128,
0.12358438223600388,
-0.2760295271873474,
0.5853621363639832,
0.41915905475616455,
-0.7743815183639526,
0.008552894927561283,
-0.8381120562553406,
0.5133693218231201,
-0.15231728553771973,
-0.33774104714393616,
0.3829258978366852,
0.4120912253856659,
1.271720290184021,
-0.012829415500164032,
0.16834567487239838,
1.26282799243927,
-1.359262466430664,
1.5470367670059204,
-0.46548062562942505,
0.16063353419303894,
-2.3893446922302246,
1.3747771978378296,
-0.732633650302887,
1.8998266458511353,
-2.626810073852539,
0.36994287371635437,
-0.5774635076522827,
-0.5088168382644653,
0.3711223602294922,
-0.4745778739452362,
0.04955024644732475,
-0.19579026103019714,
-1.052010178565979,
-0.09668862819671631,
-0.7333229780197144,
0.5648735165596008,
1.1902925968170166,
1.3523199558258057,
-1.1206942796707153,
-0.2946069836616516,
-1.7667373418807983,
-0.16101722419261932,
-0.7094119191169739,
0.36383411288261414,
-2.047900676727295,
-0.0948827788233757,
-1.8879265785217285,
-2.402282953262329,
-1.4305065870285034,
-0.8438433408737183,
1.0212318897247314,
0.18440447747707367,
-0.9104666113853455,
1.1224725246429443,
-0.35762298107147217,
-1.7277185916900635,
1.0533829927444458,
-2.099928140640259
] |
https://github.com/huggingface/datasets/issues/4865 | Dataset Viewer issue for MoritzLaurer/multilingual_nli | > @severo might it be worth adding a clearer error message, something like "The preview is updating, please retry later"?
Yes, it's a known issue, and we're about to ship a better version | ### Link
_No response_
### Description
I've just uploaded a new dataset to the hub and the viewer does not work for some reason, see here: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli
It displays the error:
```
Status code: 400
Exception: Status400Error
Message: The dataset does not exist.
```
Weirdly enough the dataviewer works for an earlier version of the same dataset. The only difference is that it is smaller, but I'm not aware of other changes I have made: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli_test
Do you know why the dataviewer is not working?
### Owner
_No response_ | 568 | 33 | Dataset Viewer issue for MoritzLaurer/multilingual_nli
### Link
_No response_
### Description
I've just uploaded a new dataset to the hub and the viewer does not work for some reason, see here: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli
It displays the error:
```
Status code: 400
Exception: Status400Error
Message: The dataset does not exist.
```
Weirdly enough the dataviewer works for an earlier version of the same dataset. The only difference is that it is smaller, but I'm not aware of other changes I have made: https://huggingface.co/datasets/MoritzLaurer/multilingual_nli_test
Do you know why the dataviewer is not working?
### Owner
_No response_
> @severo might it be worth adding a clearer error message, something like "The preview is updating, please retry later"?
Yes, it's a known issue, and we're about to ship a better version | [
-1.1311668157577515,
-0.9920074939727783,
-0.8755252361297607,
1.5045433044433594,
-0.1823953092098236,
-1.3305689096450806,
0.07103726267814636,
-1.0901994705200195,
1.6266467571258545,
-0.8153300881385803,
0.2759893238544464,
-1.7576771974563599,
-0.050706058740615845,
-0.6027158498764038,
-0.6946668028831482,
-0.9490007758140564,
-0.42072251439094543,
-0.8561983108520508,
1.0014277696609497,
2.529228925704956,
1.207924485206604,
-1.4428517818450928,
2.7065906524658203,
0.6771652698516846,
-0.2129300832748413,
-1.0560306310653687,
0.576901912689209,
-0.1008225530385971,
-1.2337112426757812,
-0.47414785623550415,
-1.0151761770248413,
-0.06389663368463516,
-0.5745970606803894,
-0.4902690052986145,
0.016806095838546753,
0.3905564844608307,
-0.2819884419441223,
-0.2527122497558594,
-0.5745323300361633,
-0.8552913665771484,
0.43608564138412476,
-0.33590269088745117,
1.0211460590362549,
-0.4012596309185028,
1.8774887323379517,
-0.5052018165588379,
0.3855484426021576,
0.7577357292175293,
1.3848223686218262,
0.21796967089176178,
-0.09519797563552856,
0.10913603007793427,
0.35014891624450684,
-0.08470708876848221,
0.40767765045166016,
1.0765806436538696,
0.5173787474632263,
0.5621939301490784,
0.6463609933853149,
-2.2466814517974854,
1.340614914894104,
-0.9524335861206055,
0.24816949665546417,
1.4729300737380981,
-1.0043628215789795,
0.36050546169281006,
-1.8022119998931885,
0.04519812390208244,
0.5694083571434021,
-2.1993014812469482,
0.242598757147789,
-1.2776747941970825,
-0.5380352735519409,
0.9078474044799805,
0.3669935464859009,
-1.248228907585144,
0.13436223566532135,
-0.3822113275527954,
1.1082080602645874,
0.6157318949699402,
1.1666308641433716,
-1.8044583797454834,
-0.045425016433000565,
-0.29256707429885864,
0.10896215587854385,
-1.3907045125961304,
-1.5570327043533325,
0.5588790774345398,
0.6429048776626587,
0.6565393209457397,
-0.05313580110669136,
0.9516253471374512,
-0.9806817173957825,
0.708856999874115,
-0.9017845392227173,
-1.6040319204330444,
-1.4244505167007446,
-2.27414870262146,
-2.3019416332244873,
0.728611946105957,
-0.5108153820037842,
-0.51289963722229,
2.023887872695923,
-1.0015225410461426,
-1.7487351894378662,
1.1540390253067017,
0.23308679461479187,
0.09343403577804565,
2.391451835632324,
0.2910277545452118,
-0.6951279044151306,
0.4129340946674347,
-0.7434086203575134,
0.8056793808937073,
-0.33500704169273376,
1.3549996614456177,
0.49525928497314453,
-1.0518776178359985,
1.6152005195617676,
-0.4642144441604614,
0.5222223401069641,
-0.6486636996269226,
-0.5136743187904358,
-0.7870292067527771,
0.3347156047821045,
1.8552093505859375,
-0.3614771366119385,
1.5975066423416138,
-0.3594909608364105,
-1.4988559484481812,
-1.6116615533828735,
0.9053921699523926,
0.4167395830154419,
-0.8784695863723755,
0.15836761891841888,
-0.38073575496673584,
0.04756048321723938,
-0.1052839607000351,
1.0850647687911987,
1.2528058290481567,
0.6100760102272034,
-0.31974688172340393,
-0.8599489331245422,
0.2800738513469696,
-0.13137902319431305,
-0.6994832158088684,
-1.803526520729065,
-0.401556134223938,
0.13577619194984436,
0.6749972105026245,
-1.1597086191177368,
1.7263444662094116,
0.8576635718345642,
1.9922990798950195,
1.0152976512908936,
-0.30616694688796997,
1.3924109935760498,
0.0391777865588665,
1.8866864442825317,
-0.5834529399871826,
0.6790183782577515,
-0.268280029296875,
-1.1427948474884033,
0.8716307878494263,
-0.40731582045555115,
-2.008359432220459,
-0.8081480264663696,
-0.9037936329841614,
-0.1857539713382721,
-0.7671452760696411,
0.9458954334259033,
-0.30401811003685,
-1.364707112312317,
0.2528552711009979,
-0.7180255055427551,
0.17111319303512573,
-1.1909468173980713,
0.2769046425819397,
0.7179471850395203,
-0.5839624404907227,
-0.09278019517660141,
-0.22397679090499878,
-1.3019979000091553,
-0.47066596150398254,
0.2753254771232605,
1.9171111583709717,
-0.6282455921173096,
0.9799789786338806,
0.955145537853241,
-0.6624907851219177,
0.03281771019101143,
0.2881791591644287,
-0.22033929824829102,
0.8568183779716492,
-1.0856661796569824,
-0.39512667059898376,
1.2312203645706177,
-0.21627327799797058,
-0.6759408712387085,
1.5133708715438843,
0.7914894819259644,
-1.006502628326416,
-0.19037450850009918,
-0.2535320818424225,
-0.8002986311912537,
-0.007921546697616577,
-1.6267385482788086,
-0.11278741806745529,
0.2576277554035187,
-1.44766104221344,
-0.4658086895942688,
-0.18555589020252228,
1.3417117595672607,
-0.19572170078754425,
1.357155203819275,
-0.417241632938385,
-0.25376588106155396,
-0.4686710834503174,
-0.4342760443687439,
0.1768220216035843,
-0.24340608716011047,
-0.5174739956855774,
0.1472974419593811,
-0.8429911732673645,
0.3384380638599396,
1.3893134593963623,
0.419687420129776,
0.12418783456087112,
0.4810817837715149,
1.0943875312805176,
0.30553996562957764,
-0.01327158696949482,
-0.9018126130104065,
-1.526373267173767,
1.9831148386001587,
-1.4111818075180054,
1.9998688697814941,
0.8219245672225952,
-0.055604249238967896,
-1.7774757146835327,
-1.8806712627410889,
1.2989057302474976,
1.2053866386413574,
2.280445098876953,
0.5664647817611694,
0.3454027771949768,
-0.8693075776100159,
-0.6545711755752563,
0.3620735704898834,
-1.0559004545211792,
-0.7112103700637817,
0.17514926195144653,
2.359210729598999,
1.7572050094604492,
-0.46457043290138245,
-0.2501169741153717,
-0.9724294543266296,
1.2266730070114136,
-0.15397390723228455,
0.18864555656909943,
2.0292773246765137,
-0.2769393026828766,
-1.0731265544891357,
1.2094645500183105,
-2.3316421508789062,
0.08579561114311218,
2.0830161571502686,
0.24903790652751923,
0.14585885405540466,
-1.4698306322097778,
-0.7439682483673096,
-0.17598581314086914,
-0.38913494348526,
-1.2674720287322998,
0.5759608745574951,
-0.40834492444992065,
-0.7530698180198669,
-1.493222951889038,
0.14846108853816986,
-1.0662115812301636,
-1.6381646394729614,
0.24755261838436127,
1.8809044361114502,
2.028776168823242,
-0.8301098346710205,
1.540253758430481,
-0.2207913100719452,
0.14629091322422028,
1.3266736268997192,
1.2318332195281982,
3.174043893814087,
1.9214473962783813,
-1.2709829807281494,
0.7061725854873657,
-0.1205657422542572,
-0.44155800342559814,
1.2149072885513306,
-1.1854397058486938,
1.2043628692626953,
-0.2720971703529358,
-1.2446284294128418,
-1.342376947402954,
1.008790373802185,
0.47096067667007446,
0.009955777786672115,
-0.5051860809326172,
1.2890945672988892,
-0.05148044973611832,
1.318192720413208,
0.5759835243225098,
-0.4369731545448303,
0.553862988948822,
-0.4044294059276581,
-0.5656288862228394,
1.5866780281066895,
0.2285453975200653,
-1.51280677318573,
-2.2703535556793213,
-0.32437005639076233,
-0.8606576323509216,
-0.04030759260058403,
-0.6252177357673645,
-1.0250968933105469,
1.6474412679672241,
0.417593389749527,
-1.3083993196487427,
-0.42105546593666077,
-0.4048230051994324,
-0.6032697558403015,
2.757180690765381,
-1.4619516134262085,
-0.2302798181772232,
-0.9739522337913513,
-0.5385967493057251,
1.663966178894043,
-1.2676118612289429,
-0.14702922105789185,
-1.0795210599899292,
-0.7069351673126221,
-1.3165338039398193,
-0.4861874282360077,
-0.09100106358528137,
-0.8652860522270203,
0.7557106018066406,
0.1641792505979538,
-1.0335065126419067,
-0.2488614022731781,
-0.8323531746864319,
0.9110813140869141,
-0.1558396965265274,
0.346268892288208,
1.974870204925537,
0.4494268298149109,
-0.4010637104511261,
0.6901253461837769,
1.1310129165649414,
0.6144352555274963,
-0.6995196342468262,
0.14350464940071106,
-0.604371190071106,
0.2895517945289612,
-1.3495432138442993,
0.2675688564777374,
-2.9692800045013428,
0.6122387051582336,
-0.0720934122800827,
-0.1618146300315857,
0.02047448232769966,
-1.301011323928833,
1.0841561555862427,
2.575974464416504,
-1.2051364183425903,
0.3910098373889923,
0.3031158149242401,
1.247632622718811,
-1.727094054222107,
0.30635419487953186,
-0.46142393350601196,
2.068622589111328,
0.14277330040931702,
1.2005666494369507,
-0.42813238501548767,
-2.239480495452881,
0.5866239070892334,
-1.2523150444030762,
-1.0828646421432495,
0.8066918849945068,
-0.7996574640274048,
0.06364411860704422,
-1.4313509464263916,
-0.15391546487808228,
-0.856767475605011,
-1.2512587308883667,
0.8571679592132568,
0.08136390149593353,
0.43562182784080505,
-0.5425746440887451,
0.351157546043396,
-2.111563205718994,
-1.3957135677337646,
-0.17635244131088257,
-0.9192193150520325,
0.4581005275249481,
-0.34186750650405884,
0.6682544946670532,
-0.28120023012161255,
0.1023249551653862,
0.32764723896980286,
1.4216121435165405,
3.5115175247192383,
0.3209107518196106,
0.3650344908237457,
-0.06751707941293716,
-0.9367060661315918,
1.4659265279769897,
0.9930962920188904,
0.011439681984484196,
-0.546812891960144,
-0.9163150787353516,
1.3156638145446777,
2.016465663909912,
1.0067509412765503,
0.0985785648226738,
-0.7988448143005371,
-0.5702235102653503,
-0.01884976215660572,
0.2321223020553589,
0.5158424377441406,
0.8086827993392944,
0.012161477468907833,
0.07708068937063217,
1.4048629999160767,
1.20488440990448,
-0.4137744605541229,
0.3887786865234375,
-0.8610990643501282,
-0.47543707489967346,
0.4757799208164215,
0.27571216225624084,
0.06383772939443588,
0.468380868434906,
-0.9660049676895142,
-0.2386285662651062,
-0.4138845205307007,
-0.9961639046669006,
-0.6643041968345642,
-0.49305200576782227,
-0.33642226457595825,
1.5998928546905518,
0.1709420382976532,
-0.4449763000011444,
-0.015603797510266304,
-0.8108503222465515,
-0.16693922877311707,
-1.210633635520935,
0.19374647736549377,
-0.16346389055252075,
-0.08331844955682755,
-0.0855424553155899,
1.6662462949752808,
-0.9598775506019592,
-2.150571823120117,
0.24404795467853546,
0.2987428307533264,
-0.3871603012084961,
0.18502022325992584,
1.6414620876312256,
0.4615163207054138,
1.400846004486084,
1.344027042388916,
0.9832889437675476,
-0.6668223738670349,
-1.2576273679733276,
0.6516299843788147,
0.9031866192817688,
-1.4363850355148315,
0.9720528721809387,
-0.10495366901159286,
-0.6283097863197327,
0.7106084227561951,
1.314079999923706,
0.48012855648994446,
-1.8841419219970703,
0.7671277523040771,
-0.8900728225708008,
0.8329696655273438,
0.6797612905502319,
0.8213483095169067,
0.197621688246727,
0.8068665862083435,
-1.2261501550674438,
-1.191353678703308,
-0.7761019468307495,
-0.6215490698814392,
1.8827812671661377,
-0.2416573017835617,
0.6485898494720459,
-0.16074688732624054,
-1.2173784971237183,
-0.1140746995806694,
0.6957176923751831,
0.35540634393692017,
-0.34006091952323914,
0.838246762752533,
-0.7012197375297546,
-1.0459983348846436,
-1.383495807647705,
-0.36480334401130676,
-0.932219922542572,
-0.9767946004867554,
1.1497137546539307,
0.8281360268592834,
0.30493342876434326,
1.859700083732605,
0.5979326963424683,
0.23631669580936432,
-2.605477809906006,
0.8939606547355652,
0.2862582206726074,
0.03777524083852768,
0.927880048751831,
0.2451135665178299,
1.0377147197723389,
0.030940227210521698,
0.5211158394813538,
-2.345212936401367,
2.2335145473480225,
-0.26252758502960205,
0.5505008101463318,
-0.09605589509010315,
-0.2030678540468216,
1.1469939947128296,
0.5485586524009705,
0.502489447593689,
-1.0923526287078857,
0.7620312571525574,
-0.48689404129981995,
1.0675612688064575,
0.9384337663650513,
-0.8467047810554504,
0.019470110535621643,
1.3523203134536743,
0.5937321782112122,
-0.590329647064209,
-0.9064437747001648,
-0.9166640043258667,
0.8893768191337585,
1.6959542036056519,
0.059097759425640106,
-0.00805755890905857,
0.8968604207038879,
0.6019754409790039,
-1.1952300071716309,
0.15574829280376434,
-0.6705233454704285,
-0.7334907054901123,
1.6763768196105957,
1.9331448078155518,
-0.04174164682626724,
-0.1126113161444664,
-0.6708446145057678,
-1.2141106128692627,
0.7667096257209778,
-0.02283579111099243,
0.10917367041110992,
0.6438671350479126,
-0.6167669296264648,
1.0897737741470337,
0.7201769351959229,
0.9818173050880432,
0.16813883185386658,
0.3369399309158325,
0.4705057442188263,
-0.31303706765174866,
-1.1447316408157349,
-0.2197851687669754,
-1.1751114130020142,
-2.4559714794158936,
0.5149209499359131,
-0.3510209918022156,
-1.438683271408081,
-0.018139716237783432,
-1.0126872062683105,
0.9732663631439209,
-0.625876784324646,
-1.081990361213684,
-1.504209041595459,
0.26047688722610474,
-0.07799459993839264,
0.873771607875824,
-1.5994856357574463,
-0.029386207461357117,
1.241259217262268,
0.8423478603363037,
-0.7474997043609619,
1.0084483623504639,
0.1598009467124939,
1.072464942932129,
0.7562549114227295,
-0.3945772349834442,
0.4753516614437103,
0.14613276720046997,
-1.3925195932388306,
0.5191836953163147,
1.0758203268051147,
0.09478655457496643,
1.540608286857605,
-0.4950940012931824,
0.04945649951696396,
0.44775763154029846,
-0.4836716055870056,
-0.43282637000083923,
-0.54677414894104,
0.7091540694236755,
0.1199617013335228,
-0.8424462080001831,
0.09686096012592316,
-0.13003604114055634,
-0.2192123681306839,
0.20324218273162842,
-1.47958505153656,
-0.2113509178161621,
-0.44014450907707214,
-0.5209527611732483,
-1.2922271490097046,
-0.005749864503741264,
1.4308849573135376,
-0.6437405347824097,
-0.14944274723529816,
0.5500019192695618,
0.4186968207359314,
0.4549477696418762,
0.6417019963264465,
-0.6214163899421692,
-0.2908605933189392,
-0.3262406885623932,
-0.36339202523231506,
0.38148224353790283,
1.1491848230361938,
-0.1632806360721588,
-0.9858285784721375,
0.7390143871307373,
-0.3606148362159729,
0.07894422113895416,
1.968111515045166,
0.14267462491989136,
-0.7685278058052063,
0.2814132571220398,
-0.7746723890304565,
1.918416976928711,
1.713969349861145,
1.3090237379074097,
-0.12453723698854446,
-0.8922410011291504,
0.7028759121894836,
-0.21072305738925934,
-0.3364942967891693,
0.9571059942245483,
0.4131554067134857,
-0.1891673505306244,
-1.4097291231155396,
0.6375924348831177,
1.2065293788909912,
-0.8615022301673889,
-0.7916164398193359,
0.04192177951335907,
-0.7709235548973083,
1.0650033950805664,
0.5663009285926819,
0.4310675263404846,
0.2767576575279236,
1.6479036808013916,
0.666459858417511,
-0.4368399977684021,
0.4657602310180664,
0.4789406359195709,
-0.16583050787448883,
-2.056121349334717,
-1.0915553569793701,
0.339278906583786,
-0.4495198130607605,
-1.5455266237258911,
1.3025308847427368,
-1.1994669437408447,
-0.9688700437545776,
0.5564825534820557,
0.06688481569290161,
1.4175376892089844,
0.25466427206993103,
1.6084107160568237,
2.1235835552215576,
0.8535916209220886,
0.3570557236671448,
1.3578108549118042,
-0.0898347720503807,
-0.41898876428604126,
1.8039661645889282,
-0.4439089894294739,
0.48441362380981445,
1.087255835533142,
-0.43258488178253174,
-1.1665607690811157,
-0.7840473651885986,
-1.1138705015182495,
-0.5927152633666992,
1.1718398332595825,
0.17535443603992462,
-1.1351959705352783,
0.1774962991476059,
1.5616934299468994,
0.09161365777254105,
-0.25355178117752075,
0.5578967928886414,
0.45484456419944763,
-0.8105296492576599,
0.03114001825451851,
-0.8469404578208923,
0.5773134827613831,
-0.14721469581127167,
-0.301914244890213,
0.42883092164993286,
0.42745837569236755,
1.2688586711883545,
0.0009780116379261017,
0.18513479828834534,
1.1908268928527832,
-1.363524079322815,
1.5434736013412476,
-0.4753211736679077,
0.19019047915935516,
-2.421172857284546,
1.3745732307434082,
-0.7113935351371765,
1.9254564046859741,
-2.62330961227417,
0.40976250171661377,
-0.5804105997085571,
-0.5196772813796997,
0.40675121545791626,
-0.4628443121910095,
0.0738103911280632,
-0.24637319147586823,
-1.0120272636413574,
-0.015973802655935287,
-0.7024644017219543,
0.5831586718559265,
1.178470492362976,
1.3850972652435303,
-1.1023435592651367,
-0.32034730911254883,
-1.7758558988571167,
-0.164495587348938,
-0.6967485547065735,
0.3190111517906189,
-2.0508852005004883,
-0.11051185429096222,
-1.9378278255462646,
-2.4195094108581543,
-1.4160891771316528,
-0.8168336749076843,
1.042433261871338,
0.2516307830810547,
-0.9312582015991211,
1.1337873935699463,
-0.3556520938873291,
-1.7545684576034546,
1.0868552923202515,
-2.0755319595336914
] |
https://github.com/huggingface/datasets/issues/4864 | Allow pathlib PoxisPath in Dataset.read_json | @cccntu I want to make a quick fix for this, but I am struggling to find where the json dataset builder is. Do you know? | **Is your feature request related to a problem? Please describe.**
```
from pathlib import Path
from datasets import Dataset
ds = Dataset.read_json(Path('data.json'))
```
causes an error
```
AttributeError: 'PosixPath' object has no attribute 'decode'
```
**Describe the solution you'd like**
It should be able to accept PosixPath and read the json from inside. | 569 | 25 | Allow pathlib PoxisPath in Dataset.read_json
**Is your feature request related to a problem? Please describe.**
```
from pathlib import Path
from datasets import Dataset
ds = Dataset.read_json(Path('data.json'))
```
causes an error
```
AttributeError: 'PosixPath' object has no attribute 'decode'
```
**Describe the solution you'd like**
It should be able to accept PosixPath and read the json from inside.
@cccntu I want to make a quick fix for this, but I am struggling to find where the json dataset builder is. Do you know? | [
-1.1723934412002563,
-1.024229645729065,
-0.7905997037887573,
1.6428444385528564,
-0.26237884163856506,
-1.2416903972625732,
0.1444920301437378,
-1.1155604124069214,
1.826306939125061,
-0.781217098236084,
0.32688209414482117,
-1.7635246515274048,
-0.01495678722858429,
-0.6368730664253235,
-0.8284684419631958,
-0.8568875789642334,
-0.4301896393299103,
-0.7615982294082642,
0.9749675989151001,
2.3638365268707275,
1.1610780954360962,
-1.3586664199829102,
2.733555555343628,
0.7305371165275574,
-0.22142751514911652,
-1.017265796661377,
0.38371872901916504,
0.03709419071674347,
-1.0266650915145874,
-0.5260639190673828,
-0.9321076273918152,
-0.16743381321430206,
-0.49673473834991455,
-0.5832913517951965,
0.06179387494921684,
0.4369133710861206,
-0.2607819437980652,
-0.381337970495224,
-0.46345850825309753,
-0.6687794327735901,
0.3874170482158661,
-0.42770999670028687,
0.8798093795776367,
-0.5088735818862915,
1.811620831489563,
-0.5749251842498779,
0.27300506830215454,
0.730965256690979,
1.4296605587005615,
0.19746465981006622,
-0.11661633849143982,
0.4095429480075836,
0.37272849678993225,
0.020686117932200432,
0.5354992747306824,
1.146256446838379,
0.620193362236023,
0.634419322013855,
0.7175761461257935,
-2.182644844055176,
1.363335132598877,
-1.1879786252975464,
0.2729060649871826,
1.243818759918213,
-1.0101443529129028,
0.4430396258831024,
-1.7830777168273926,
0.007927369326353073,
0.5366135835647583,
-2.320178747177124,
0.21430903673171997,
-1.2060850858688354,
-0.6072730422019958,
1.1008423566818237,
0.31804582476615906,
-1.4179526567459106,
0.03703470900654793,
-0.33072108030319214,
1.0151913166046143,
0.39338645339012146,
1.0602729320526123,
-1.7128175497055054,
-0.02558797411620617,
-0.4263589680194855,
-0.015502089634537697,
-1.4142347574234009,
-1.415027379989624,
0.659847617149353,
0.5921515822410583,
0.6786511540412903,
-0.20354415476322174,
1.0530253648757935,
-0.9118596315383911,
0.7390206456184387,
-1.0977500677108765,
-1.673413634300232,
-1.3966906070709229,
-2.1925103664398193,
-2.2557225227355957,
0.8003188371658325,
-0.4958705008029938,
-0.6262387037277222,
1.970245361328125,
-0.8537954688072205,
-1.826642632484436,
1.0790903568267822,
0.27038857340812683,
-0.034742824733257294,
2.40543270111084,
0.10426938533782959,
-0.5883440375328064,
0.3802836835384369,
-0.7095776200294495,
0.8628070950508118,
-0.40229225158691406,
1.502685308456421,
0.4802131652832031,
-0.9386680722236633,
1.629023551940918,
-0.27537277340888977,
0.6327525973320007,
-0.5937017202377319,
-0.6240033507347107,
-0.9444820880889893,
0.3790986239910126,
1.9232577085494995,
-0.2677035629749298,
1.4053157567977905,
-0.4772680103778839,
-1.6526925563812256,
-1.5770553350448608,
0.9766939878463745,
0.4206630289554596,
-0.8194417953491211,
0.19145295023918152,
-0.42218196392059326,
0.08581371605396271,
-0.052553847432136536,
1.2253934144973755,
1.1909871101379395,
0.7648018002510071,
-0.35729730129241943,
-0.7805043458938599,
0.24969100952148438,
0.04743165150284767,
-0.655158519744873,
-1.8209646940231323,
-0.27515503764152527,
0.0939674973487854,
0.5958967804908752,
-1.1691255569458008,
1.555275559425354,
0.8664795756340027,
1.9093996286392212,
1.0801920890808105,
-0.22809149324893951,
1.430862545967102,
-0.052815020084381104,
1.9043400287628174,
-0.6637147665023804,
0.5938624739646912,
-0.27352631092071533,
-1.02549409866333,
0.8203608393669128,
-0.3688182830810547,
-2.174656629562378,
-0.8845645785331726,
-0.8698285222053528,
-0.19553926587104797,
-0.814424991607666,
0.9533700346946716,
-0.3105934262275696,
-1.4454320669174194,
0.2740406095981598,
-0.6767029166221619,
0.18642085790634155,
-1.2941393852233887,
0.37189120054244995,
0.7333465218544006,
-0.5549978017807007,
0.0956650823354721,
-0.2665635943412781,
-1.2520264387130737,
-0.5253996253013611,
0.3652288317680359,
2.01776123046875,
-0.8197318315505981,
0.8645836710929871,
0.956981897354126,
-0.8239875435829163,
-0.0032122572883963585,
0.3587167263031006,
-0.19378876686096191,
0.8251931071281433,
-1.0093142986297607,
-0.47300437092781067,
1.122005820274353,
-0.14513593912124634,
-0.650924026966095,
1.5962092876434326,
0.7407212257385254,
-1.0130398273468018,
-0.08912719786167145,
-0.33256393671035767,
-0.9429871439933777,
-0.011458602733910084,
-1.5660072565078735,
-0.24677692353725433,
0.25632575154304504,
-1.5550532341003418,
-0.5349310636520386,
-0.28480595350265503,
1.2461118698120117,
-0.1792256236076355,
1.2482990026474,
-0.2399815171957016,
-0.3953878879547119,
-0.20712360739707947,
-0.43746447563171387,
0.17636726796627045,
-0.29672136902809143,
-0.5732204914093018,
0.21961373090744019,
-0.6982769966125488,
0.4819765090942383,
1.417656660079956,
0.37961116433143616,
-0.12928161025047302,
0.5777347683906555,
1.0758944749832153,
0.3397621214389801,
-0.0629446804523468,
-0.8689746260643005,
-1.5533093214035034,
1.922932505607605,
-1.5071897506713867,
1.8721030950546265,
0.5830691456794739,
-0.10155913233757019,
-1.6072298288345337,
-1.8529250621795654,
1.4021592140197754,
1.2733228206634521,
2.234649419784546,
0.7706292867660522,
0.29256385564804077,
-0.8550724983215332,
-0.756612241268158,
0.2594670057296753,
-1.1549104452133179,
-0.7483059167861938,
0.012645181268453598,
2.3523342609405518,
1.7941879034042358,
-0.5789079666137695,
-0.1784721165895462,
-0.9638093709945679,
1.362173080444336,
-0.18831709027290344,
0.23996655642986298,
2.074422836303711,
-0.35783651471138,
-1.128820538520813,
1.3165733814239502,
-2.3423750400543213,
0.10730002820491791,
2.020994186401367,
0.40225106477737427,
0.12046855688095093,
-1.5023367404937744,
-0.5622559189796448,
-0.23453441262245178,
-0.39004066586494446,
-1.3378005027770996,
0.47904935479164124,
-0.26034486293792725,
-0.7091622352600098,
-1.5925202369689941,
0.2694576680660248,
-1.0331742763519287,
-1.4952698945999146,
0.3622986674308777,
2.0177183151245117,
2.008118152618408,
-0.6523493528366089,
1.5857051610946655,
-0.25227007269859314,
0.2308204472064972,
1.3314412832260132,
1.0791665315628052,
3.0222530364990234,
1.9631092548370361,
-1.1967694759368896,
0.7198412418365479,
-0.1752457469701767,
-0.5461769104003906,
1.2096507549285889,
-1.1492278575897217,
1.3084664344787598,
-0.2468826025724411,
-1.0339041948318481,
-1.3093723058700562,
0.8558957576751709,
0.4616042971611023,
-0.0056363544426858425,
-0.5074173212051392,
1.2050210237503052,
0.05424013361334801,
1.3109962940216064,
0.4339829087257385,
-0.4271088242530823,
0.6102790832519531,
-0.4179755747318268,
-0.4325591027736664,
1.5994489192962646,
0.2724741995334625,
-1.290522575378418,
-2.2503726482391357,
-0.23079273104667664,
-0.7334126830101013,
0.17764094471931458,
-0.3585678040981293,
-1.006558895111084,
1.7214246988296509,
0.4508933126926422,
-1.2410192489624023,
-0.24177375435829163,
-0.2356739342212677,
-0.5466393232345581,
2.726855516433716,
-1.3558305501937866,
-0.22663085162639618,
-1.0610846281051636,
-0.5492702126502991,
1.7453386783599854,
-1.2153817415237427,
-0.19240981340408325,
-0.9070185422897339,
-0.5718162655830383,
-1.3994626998901367,
-0.5777783989906311,
0.02332456409931183,
-0.8992148637771606,
1.0065960884094238,
0.18537075817584991,
-1.153335690498352,
-0.34957024455070496,
-0.8565270304679871,
0.878450870513916,
-0.19679602980613708,
0.35334527492523193,
1.942217469215393,
0.3797185719013214,
-0.4233444333076477,
0.8044003248214722,
1.0908610820770264,
0.6358334422111511,
-0.6586710810661316,
0.33327335119247437,
-0.6089300513267517,
0.31483668088912964,
-1.2739444971084595,
0.2987959086894989,
-2.95971417427063,
0.43563053011894226,
-0.011423761025071144,
-0.12277290225028992,
-0.006762371398508549,
-1.3810170888900757,
1.1491178274154663,
2.5070583820343018,
-1.2001526355743408,
0.46931350231170654,
0.21642041206359863,
1.2403383255004883,
-1.5195411443710327,
0.32047468423843384,
-0.3497205376625061,
2.2012970447540283,
0.16346551477909088,
1.1808974742889404,
-0.47478505969047546,
-2.3524909019470215,
0.7248253226280212,
-1.235290288925171,
-1.2010222673416138,
0.5701585412025452,
-0.886096715927124,
0.015425702556967735,
-1.5486449003219604,
-0.24677596986293793,
-0.9336512684822083,
-1.2670729160308838,
0.8586406111717224,
0.2853353023529053,
0.3515394330024719,
-0.7005003094673157,
0.349642813205719,
-2.066572427749634,
-1.4229129552841187,
-0.23807910084724426,
-0.904312789440155,
0.4562269151210785,
-0.4003939926624298,
0.6268388628959656,
-0.17781367897987366,
0.08445276319980621,
0.38253331184387207,
1.4835869073867798,
3.256588935852051,
0.15702779591083527,
0.3699744641780853,
-0.12818899750709534,
-0.8829799294471741,
1.4423565864562988,
0.9041869044303894,
0.0917762964963913,
-0.4667527675628662,
-1.1140737533569336,
1.2233197689056396,
2.030970811843872,
0.8730196356773376,
0.08780752122402191,
-0.8241517543792725,
-0.6598430871963501,
-0.11418221890926361,
0.307586669921875,
0.594379723072052,
0.9451321363449097,
0.08151748776435852,
-0.02663429267704487,
1.382588267326355,
1.1712749004364014,
-0.48513707518577576,
0.4489120841026306,
-0.878713071346283,
-0.4333517551422119,
0.4670461118221283,
0.24755200743675232,
-0.12614351511001587,
0.19450518488883972,
-0.9672785997390747,
-0.1496591567993164,
-0.33825650811195374,
-0.9167657494544983,
-0.8289138674736023,
-0.4055400490760803,
-0.448717325925827,
1.6703211069107056,
0.09551644325256348,
-0.659659206867218,
-0.2132158726453781,
-0.7562873959541321,
-0.008010311983525753,
-0.9786257743835449,
0.25813189148902893,
-0.18363407254219055,
-0.18811087310314178,
-0.10777977108955383,
1.8276275396347046,
-0.9833464026451111,
-1.9867793321609497,
0.31622564792633057,
0.4728078842163086,
-0.36229634284973145,
0.2566252052783966,
1.4649016857147217,
0.5089150071144104,
1.5267658233642578,
1.349031925201416,
1.0463833808898926,
-0.6426289677619934,
-1.4729360342025757,
0.5927630066871643,
0.885997474193573,
-1.3616058826446533,
0.7455806136131287,
0.10653264820575714,
-0.4374878406524658,
0.5969191789627075,
1.3697630167007446,
0.4226336181163788,
-1.979469656944275,
0.7640165686607361,
-0.9200356006622314,
0.763189971446991,
0.6953490972518921,
0.7176329493522644,
0.3149528503417969,
0.8307509422302246,
-1.1605758666992188,
-1.1089484691619873,
-0.9933866858482361,
-0.6523017883300781,
1.9565174579620361,
-0.26783913373947144,
0.6432696580886841,
0.05379954352974892,
-1.293201208114624,
-0.11802871525287628,
0.6993833184242249,
0.5522112846374512,
-0.3896557092666626,
0.7628602981567383,
-0.5678702592849731,
-1.1959099769592285,
-1.3972232341766357,
-0.4728442132472992,
-1.013601303100586,
-0.9562550783157349,
0.9821274280548096,
0.9103385806083679,
0.29305705428123474,
1.8391011953353882,
0.6516904830932617,
0.2763659358024597,
-2.5560481548309326,
0.9168792366981506,
0.3126709759235382,
0.003896435722708702,
0.7982738614082336,
0.43517786264419556,
0.9257248640060425,
0.0430290587246418,
0.5114023685455322,
-2.270280599594116,
2.320711851119995,
-0.20826111733913422,
0.7305436134338379,
0.04895409196615219,
-0.2691430449485779,
1.1334807872772217,
0.47606828808784485,
0.5455319285392761,
-1.1338281631469727,
0.6081607937812805,
-0.7017416954040527,
1.3403440713882446,
0.9532449841499329,
-0.6304868459701538,
-0.02655176632106304,
1.2207170724868774,
0.5133482813835144,
-0.48167654871940613,
-0.9645252823829651,
-0.9681707620620728,
0.9042066335678101,
1.6589319705963135,
-0.10631097853183746,
-0.1580732762813568,
0.8472445011138916,
0.7254810929298401,
-1.196033239364624,
0.13204391300678253,
-0.7526450157165527,
-0.7257087230682373,
1.6424157619476318,
2.1406476497650146,
-0.22174809873104095,
-0.2123747617006302,
-0.8059165477752686,
-1.091389775276184,
0.7624251842498779,
0.0895339697599411,
0.03203286975622177,
0.8098945617675781,
-0.5898391604423523,
1.1386592388153076,
0.9294878244400024,
0.8811535239219666,
0.08869294822216034,
0.569999635219574,
0.4098348617553711,
-0.27211833000183105,
-1.130981683731079,
-0.23010502755641937,
-1.1341525316238403,
-2.567352533340454,
0.4152006208896637,
-0.3360050916671753,
-1.2528640031814575,
0.008452184498310089,
-1.1399188041687012,
0.9439178109169006,
-0.5445615649223328,
-1.1321005821228027,
-1.5265775918960571,
0.13820192217826843,
-0.017750367522239685,
0.8720067739486694,
-1.573736310005188,
0.0542304702103138,
1.320526123046875,
0.9172986745834351,
-0.7361941337585449,
0.9894012808799744,
0.26129212975502014,
1.0626819133758545,
0.7840553522109985,
-0.3406325876712799,
0.445809930562973,
0.020715123042464256,
-1.2391225099563599,
0.6217266321182251,
1.1453683376312256,
0.1369330734014511,
1.4289244413375854,
-0.5495258569717407,
0.0024606361985206604,
0.40303942561149597,
-0.6298214197158813,
-0.35892000794410706,
-0.5833873152732849,
0.7387636303901672,
0.049301475286483765,
-0.8380256295204163,
0.24027588963508606,
-0.011533284559845924,
-0.1360427886247635,
0.15050433576107025,
-1.5390344858169556,
-0.2999028265476227,
-0.3515220880508423,
-0.5724265575408936,
-1.2134063243865967,
-0.08200909197330475,
1.3649225234985352,
-0.6735987067222595,
-0.2597445547580719,
0.5897698998451233,
0.3974236249923706,
0.5940208435058594,
0.5765230059623718,
-0.6953149437904358,
-0.3025229871273041,
-0.2639271020889282,
-0.3608243465423584,
0.3405958414077759,
1.2656652927398682,
-0.16790881752967834,
-1.0524065494537354,
0.6534693241119385,
-0.364184707403183,
-0.10083746910095215,
1.8235403299331665,
0.07127983868122101,
-0.8973601460456848,
0.315076619386673,
-0.7782570719718933,
1.9519585371017456,
1.642330527305603,
1.2732783555984497,
-0.08775268495082855,
-0.9955364465713501,
0.5508036613464355,
-0.26890942454338074,
-0.4992564916610718,
0.793161153793335,
0.4895518124103546,
-0.18187502026557922,
-1.3236093521118164,
0.6894722580909729,
1.2943013906478882,
-1.0126256942749023,
-0.9616790413856506,
0.15180200338363647,
-0.695004940032959,
1.0227105617523193,
0.7007881999015808,
0.4089013636112213,
0.267533540725708,
1.584978461265564,
0.7376049160957336,
-0.4406150281429291,
0.4770873486995697,
0.4774852395057678,
-0.058360204100608826,
-2.071500539779663,
-1.1751649379730225,
0.3108222484588623,
-0.5980139374732971,
-1.5031572580337524,
1.3916223049163818,
-1.1868679523468018,
-0.8095265626907349,
0.5813753008842468,
0.2516341507434845,
1.568117380142212,
0.3093229830265045,
1.5609040260314941,
2.0052735805511475,
0.8650086522102356,
0.35574015974998474,
1.4328017234802246,
-0.17153440415859222,
-0.6015825271606445,
1.851195216178894,
-0.5043532252311707,
0.5884160995483398,
1.1478015184402466,
-0.24103978276252747,
-1.0834276676177979,
-0.8030986189842224,
-1.2224267721176147,
-0.676272988319397,
1.1023720502853394,
0.11413531005382538,
-1.2225067615509033,
0.27238038182258606,
1.47954261302948,
0.2807428538799286,
-0.30299749970436096,
0.44422924518585205,
0.4063561260700226,
-0.8386638164520264,
-0.08785828948020935,
-1.0011547803878784,
0.44076234102249146,
-0.3493809103965759,
-0.4003404974937439,
0.27225905656814575,
0.3927775025367737,
1.2673962116241455,
-0.05710991099476814,
0.08966462314128876,
1.0930088758468628,
-1.461418628692627,
1.5617560148239136,
-0.6050141453742981,
0.31595274806022644,
-2.4460387229919434,
1.5119961500167847,
-0.7501912713050842,
1.9688942432403564,
-2.7227134704589844,
0.3766058385372162,
-0.617896318435669,
-0.3620668649673462,
0.3590432107448578,
-0.2649003863334656,
0.17288276553153992,
-0.11328618228435516,
-1.1879504919052124,
0.03778081014752388,
-0.7507180571556091,
0.6087546348571777,
1.0915504693984985,
1.3484967947006226,
-1.0671873092651367,
-0.30565375089645386,
-1.8168331384658813,
-0.23030754923820496,
-0.699120819568634,
0.4802110195159912,
-2.091547727584839,
-0.19881445169448853,
-1.8796894550323486,
-2.196141242980957,
-1.21137535572052,
-0.7517592310905457,
1.0573064088821411,
0.061561618000268936,
-0.8700122833251953,
1.1506202220916748,
-0.280778706073761,
-1.7280672788619995,
1.0438721179962158,
-2.0935256481170654
] |
https://github.com/huggingface/datasets/issues/4864 | Allow pathlib PoxisPath in Dataset.read_json | @vvvm23 I think you mean think:
```python
ds = datasets.load_dataset('json', data_files=[Path('test.jsonl')])
```
And the place you want to modify is here:
```
utils/file_utils.py:64, in is_remote_url(url_or_filename)
63 def is_remote_url(url_or_filename: str) -> bool:
---> 64 parsed = urlparse(url_or_filename)
65 return parsed.scheme in ("http", "https", "s3", "gs", "hdfs", "ftp")
```
Probably just need to check first if `url_or_filename` is [PathLike](https://docs.python.org/3/library/os.html#os.PathLike) and return False early.
Btw, I tried installing from main, and ran my code above and got a different error. Probably because the API have changed.
`AttributeError: module 'datasets' has no attribute 'read_json'`
| **Is your feature request related to a problem? Please describe.**
```
from pathlib import Path
from datasets import Dataset
ds = Dataset.read_json(Path('data.json'))
```
causes an error
```
AttributeError: 'PosixPath' object has no attribute 'decode'
```
**Describe the solution you'd like**
It should be able to accept PosixPath and read the json from inside. | 569 | 90 | Allow pathlib PoxisPath in Dataset.read_json
**Is your feature request related to a problem? Please describe.**
```
from pathlib import Path
from datasets import Dataset
ds = Dataset.read_json(Path('data.json'))
```
causes an error
```
AttributeError: 'PosixPath' object has no attribute 'decode'
```
**Describe the solution you'd like**
It should be able to accept PosixPath and read the json from inside.
@vvvm23 I think you mean think:
```python
ds = datasets.load_dataset('json', data_files=[Path('test.jsonl')])
```
And the place you want to modify is here:
```
utils/file_utils.py:64, in is_remote_url(url_or_filename)
63 def is_remote_url(url_or_filename: str) -> bool:
---> 64 parsed = urlparse(url_or_filename)
65 return parsed.scheme in ("http", "https", "s3", "gs", "hdfs", "ftp")
```
Probably just need to check first if `url_or_filename` is [PathLike](https://docs.python.org/3/library/os.html#os.PathLike) and return False early.
Btw, I tried installing from main, and ran my code above and got a different error. Probably because the API have changed.
`AttributeError: module 'datasets' has no attribute 'read_json'`
| [
-1.1792855262756348,
-0.9741902351379395,
-0.7331173419952393,
1.670398473739624,
-0.14022374153137207,
-1.2218290567398071,
0.1640920788049698,
-0.9919542074203491,
1.7224088907241821,
-0.8174047470092773,
0.3750316798686981,
-1.713866949081421,
-0.12344859540462494,
-0.6362842321395874,
-0.7653382420539856,
-0.8546982407569885,
-0.4158984124660492,
-0.793775737285614,
1.0239827632904053,
2.3947761058807373,
1.251578450202942,
-1.3797677755355835,
2.6792163848876953,
0.7060830593109131,
-0.1936347335577011,
-0.9942465424537659,
0.43205592036247253,
-0.08888427913188934,
-1.1290336847305298,
-0.5010213255882263,
-0.8861088752746582,
-0.11972980201244354,
-0.6030566692352295,
-0.5226256251335144,
0.0659249871969223,
0.4769861400127411,
-0.33638784289360046,
-0.4287748336791992,
-0.6455483436584473,
-0.7664037346839905,
0.43794935941696167,
-0.40342918038368225,
0.9471358060836792,
-0.3347456157207489,
1.8427367210388184,
-0.6136419773101807,
0.3525100350379944,
0.759946346282959,
1.342063069343567,
0.2519938051700592,
0.005230811424553394,
0.357034295797348,
0.38077864050865173,
0.013453473336994648,
0.5688198208808899,
1.1829732656478882,
0.6347487568855286,
0.4857551157474518,
0.7763627767562866,
-2.2808125019073486,
1.2922924757003784,
-1.1750705242156982,
0.2573205828666687,
1.2746737003326416,
-0.8925068378448486,
0.3803764879703522,
-1.8148678541183472,
0.0526597797870636,
0.6345214247703552,
-2.2178447246551514,
0.28645607829093933,
-1.351508378982544,
-0.5081819295883179,
1.066177248954773,
0.4080433249473572,
-1.3160037994384766,
0.015361594967544079,
-0.37639352679252625,
0.9732553362846375,
0.3389977812767029,
0.9928695559501648,
-1.8245978355407715,
-0.1100878193974495,
-0.34527823328971863,
0.13949011266231537,
-1.2788063287734985,
-1.5041340589523315,
0.6027293801307678,
0.6258710026741028,
0.6616933941841125,
-0.15858115255832672,
1.09159255027771,
-1.0106815099716187,
0.7033732533454895,
-1.049533486366272,
-1.6984533071517944,
-1.4617640972137451,
-2.2200233936309814,
-2.246614694595337,
0.7053423523902893,
-0.5023303031921387,
-0.5521977543830872,
2.0514097213745117,
-0.908507227897644,
-1.7182103395462036,
1.1221413612365723,
0.2787669897079468,
0.05417732894420624,
2.3625807762145996,
0.1694670468568802,
-0.7780088186264038,
0.40759268403053284,
-0.7380978465080261,
0.7732146978378296,
-0.3159058094024658,
1.3765339851379395,
0.4173400104045868,
-1.0535662174224854,
1.6067039966583252,
-0.3618166148662567,
0.6693156957626343,
-0.5891841650009155,
-0.525521457195282,
-0.7600200772285461,
0.31959420442581177,
1.8600270748138428,
-0.2340141236782074,
1.439112901687622,
-0.3133295178413391,
-1.5783865451812744,
-1.581678867340088,
0.9369637966156006,
0.36646568775177,
-0.8008493185043335,
0.12986363470554352,
-0.4211916923522949,
0.18655651807785034,
-0.0894264206290245,
1.2445859909057617,
1.289683222770691,
0.7107545733451843,
-0.3589931130409241,
-0.7896450161933899,
0.22065980732440948,
-0.03246462345123291,
-0.7478561401367188,
-1.7342015504837036,
-0.38241511583328247,
0.2143319994211197,
0.5794455409049988,
-1.195104956626892,
1.7304552793502808,
0.8437849283218384,
1.9285227060317993,
1.0437136888504028,
-0.33283936977386475,
1.4545478820800781,
0.04208856821060181,
1.9391502141952515,
-0.5782259106636047,
0.575530469417572,
-0.3304719924926758,
-1.1255561113357544,
0.8341451287269592,
-0.34105122089385986,
-2.0954480171203613,
-0.8179705739021301,
-0.7301494479179382,
-0.2258375734090805,
-0.754930317401886,
0.871476411819458,
-0.33195358514785767,
-1.4564329385757446,
0.247980996966362,
-0.7678558826446533,
0.17629539966583252,
-1.1919384002685547,
0.2775287628173828,
0.6439939737319946,
-0.639883816242218,
0.15898829698562622,
-0.2352808266878128,
-1.248376488685608,
-0.5247498154640198,
0.41472136974334717,
1.9369585514068604,
-0.6888284683227539,
0.861466109752655,
1.0329152345657349,
-0.7635131478309631,
0.05443427711725235,
0.2779097855091095,
-0.25137603282928467,
0.8612388372421265,
-1.0188742876052856,
-0.46763208508491516,
1.2394323348999023,
-0.18651525676250458,
-0.6822458505630493,
1.4689295291900635,
0.703622043132782,
-1.008727788925171,
-0.2204769402742386,
-0.24889282882213593,
-0.826649010181427,
0.10067322105169296,
-1.537689447402954,
-0.16595983505249023,
0.4411899745464325,
-1.5463358163833618,
-0.45875823497772217,
-0.2643195390701294,
1.3383222818374634,
-0.17204906046390533,
1.348006010055542,
-0.36243852972984314,
-0.2343386858701706,
-0.21408900618553162,
-0.41552847623825073,
0.16843004524707794,
-0.2255842089653015,
-0.611091673374176,
0.16936399042606354,
-0.7723811864852905,
0.35356009006500244,
1.4370497465133667,
0.2938549518585205,
-0.02448342740535736,
0.46315136551856995,
1.1649912595748901,
0.3938135504722595,
0.014373174868524075,
-0.9162251353263855,
-1.5248358249664307,
2.004800319671631,
-1.4900611639022827,
1.9810307025909424,
0.6788756847381592,
0.005830700509250164,
-1.7058773040771484,
-1.8607138395309448,
1.376960039138794,
1.1855976581573486,
2.294999837875366,
0.6525859832763672,
0.37819451093673706,
-0.9216035604476929,
-0.6864688396453857,
0.300875186920166,
-1.068458080291748,
-0.7085585594177246,
0.1398266851902008,
2.43400239944458,
1.7285219430923462,
-0.463787704706192,
-0.19556185603141785,
-0.9636842012405396,
1.4198846817016602,
-0.2753555178642273,
0.20469580590724945,
2.0375847816467285,
-0.242103710770607,
-1.0944470167160034,
1.3334331512451172,
-2.317962884902954,
0.20090678334236145,
2.012972831726074,
0.29550814628601074,
0.12295808643102646,
-1.3962329626083374,
-0.6688687801361084,
-0.2651001513004303,
-0.3935985863208771,
-1.2379742860794067,
0.5135475397109985,
-0.22370389103889465,
-0.7007933855056763,
-1.4348586797714233,
0.20743316411972046,
-0.9940757155418396,
-1.6485675573349,
0.19220533967018127,
1.9548869132995605,
2.018066644668579,
-0.7841438055038452,
1.5571435689926147,
-0.3276010751724243,
0.16024236381053925,
1.277446985244751,
1.254025936126709,
3.142427682876587,
1.8719772100448608,
-1.2352279424667358,
0.6260042190551758,
-0.2014939934015274,
-0.5144528150558472,
1.1723417043685913,
-1.2303082942962646,
1.2598272562026978,
-0.21712741255760193,
-1.1240239143371582,
-1.2338957786560059,
0.9260068535804749,
0.5037758350372314,
-0.05465635657310486,
-0.5526936650276184,
1.148134469985962,
0.07347362488508224,
1.2773151397705078,
0.53882896900177,
-0.360586553812027,
0.6190030574798584,
-0.39366620779037476,
-0.4957028329372406,
1.5626857280731201,
0.2126552313566208,
-1.319495439529419,
-2.237847328186035,
-0.18868175148963928,
-0.8668978214263916,
0.11395664513111115,
-0.49467557668685913,
-1.0329906940460205,
1.7215561866760254,
0.29481714963912964,
-1.2335957288742065,
-0.24867285788059235,
-0.3480268120765686,
-0.5319809317588806,
2.813866138458252,
-1.2886196374893188,
-0.18143442273139954,
-1.0217106342315674,
-0.6348814368247986,
1.7206878662109375,
-1.2067426443099976,
-0.24642935395240784,
-1.0442955493927002,
-0.5494323372840881,
-1.3179346323013306,
-0.5956545472145081,
0.02538304030895233,
-0.8901864290237427,
0.8949511051177979,
0.2214844524860382,
-1.270759105682373,
-0.3659960627555847,
-0.8867533206939697,
0.9293044209480286,
-0.17314358055591583,
0.2513550817966461,
1.938535213470459,
0.3645193874835968,
-0.29935958981513977,
0.7707839012145996,
1.1232112646102905,
0.6580222249031067,
-0.6206453442573547,
0.272838294506073,
-0.5704478621482849,
0.30250516533851624,
-1.33212149143219,
0.2909148335456848,
-2.865582227706909,
0.6431719660758972,
-0.012815446592867374,
-0.13749699294567108,
0.003918523900210857,
-1.3152629137039185,
1.0632598400115967,
2.5743050575256348,
-1.2123932838439941,
0.4287276268005371,
0.24886779487133026,
1.1777873039245605,
-1.619191288948059,
0.24591182172298431,
-0.38229286670684814,
2.2055342197418213,
0.15404658019542694,
1.2409921884536743,
-0.4491914212703705,
-2.3906710147857666,
0.6271156668663025,
-1.2058573961257935,
-1.128847599029541,
0.7227103114128113,
-0.8983410000801086,
0.0751466155052185,
-1.458794116973877,
-0.274075984954834,
-0.8570876121520996,
-1.1880638599395752,
0.7249924540519714,
0.1802573800086975,
0.3790665566921234,
-0.5577267408370972,
0.330441951751709,
-2.1487224102020264,
-1.470374584197998,
-0.24925340712070465,
-0.9815778136253357,
0.5068694353103638,
-0.34503766894340515,
0.6985851526260376,
-0.20118708908557892,
-0.0010145371779799461,
0.41337719559669495,
1.5626858472824097,
3.3416309356689453,
0.14729158580303192,
0.3168394863605499,
-0.15740124881267548,
-0.9711813926696777,
1.4213836193084717,
0.8234543204307556,
-0.07773108780384064,
-0.48838457465171814,
-1.1329399347305298,
1.2440831661224365,
2.0472395420074463,
0.8896355032920837,
0.03818666189908981,
-0.7741513848304749,
-0.7130247354507446,
-0.05397257208824158,
0.2018033117055893,
0.5972669124603271,
0.8258155584335327,
0.17300261557102203,
0.00525662861764431,
1.3673897981643677,
1.1171298027038574,
-0.3817695081233978,
0.3416298031806946,
-0.8627997636795044,
-0.4430885910987854,
0.5088604092597961,
0.19604411721229553,
-0.08597543835639954,
0.23738545179367065,
-1.0143377780914307,
-0.2537611424922943,
-0.39836010336875916,
-0.8480539321899414,
-0.7876254916191101,
-0.4770502746105194,
-0.3646799325942993,
1.6587260961532593,
0.13992635905742645,
-0.6098158955574036,
-0.030615750700235367,
-0.7099722027778625,
-0.08006584644317627,
-1.0594176054000854,
0.21965813636779785,
-0.15936273336410522,
-0.1554751843214035,
-0.18471139669418335,
1.6963647603988647,
-0.9248477220535278,
-2.0246570110321045,
0.18483342230319977,
0.36352553963661194,
-0.3173748552799225,
0.24938325583934784,
1.5914450883865356,
0.5214821100234985,
1.4773293733596802,
1.3158077001571655,
1.0009685754776,
-0.664854109287262,
-1.3049689531326294,
0.6132605075836182,
0.9783266186714172,
-1.389455795288086,
0.8926366567611694,
-0.03795284777879715,
-0.47984421253204346,
0.5457158088684082,
1.3479156494140625,
0.48244109749794006,
-1.9655497074127197,
0.762368381023407,
-0.9383794665336609,
0.7775532007217407,
0.718609094619751,
0.7100744843482971,
0.22338052093982697,
0.802941620349884,
-1.1335958242416382,
-1.108272910118103,
-0.765849232673645,
-0.7123312950134277,
1.9735909700393677,
-0.33590906858444214,
0.6167898178100586,
-0.07963535189628601,
-1.3523621559143066,
-0.04924784600734711,
0.734111487865448,
0.49158644676208496,
-0.523350179195404,
0.8516216278076172,
-0.6503278613090515,
-1.081905722618103,
-1.3412903547286987,
-0.4543015956878662,
-1.1082998514175415,
-1.020645260810852,
0.9436579942703247,
0.8495477437973022,
0.34466299414634705,
1.8060321807861328,
0.7480098009109497,
0.26584911346435547,
-2.5198349952697754,
0.9335083961486816,
0.29405292868614197,
-0.04244726523756981,
0.8924170732498169,
0.36885184049606323,
1.0303361415863037,
-0.024949291720986366,
0.5972550511360168,
-2.327242374420166,
2.3015878200531006,
-0.1700923591852188,
0.6990153193473816,
0.01314739789813757,
-0.3106346130371094,
1.010331630706787,
0.48708653450012207,
0.5360286235809326,
-1.029459834098816,
0.6415432691574097,
-0.6037044525146484,
1.2150671482086182,
0.8549656271934509,
-0.8042343854904175,
-0.055224500596523285,
1.3652870655059814,
0.4262145161628723,
-0.5645400285720825,
-0.9872124195098877,
-0.9796897768974304,
0.9142394661903381,
1.624976396560669,
-0.05740218982100487,
-0.07468453049659729,
0.850135326385498,
0.6754090189933777,
-1.2206863164901733,
0.11362668126821518,
-0.7403997182846069,
-0.7483002543449402,
1.6453537940979004,
2.116945266723633,
-0.18441684544086456,
-0.2585308253765106,
-0.7601581811904907,
-1.2231723070144653,
0.8013404607772827,
-0.016554130241274834,
0.049188971519470215,
0.6243045926094055,
-0.6636252403259277,
1.0357348918914795,
0.8681809902191162,
1.0123151540756226,
0.18486550450325012,
0.4151977598667145,
0.4475276470184326,
-0.4071420133113861,
-1.212567925453186,
-0.2874010503292084,
-1.1411923170089722,
-2.55856990814209,
0.47350800037384033,
-0.19463999569416046,
-1.3676342964172363,
0.03363160789012909,
-1.072192907333374,
0.915363609790802,
-0.6459494233131409,
-1.1428800821304321,
-1.4950752258300781,
0.21290470659732819,
-0.023790650069713593,
0.9284944534301758,
-1.6276438236236572,
-0.13552001118659973,
1.2788972854614258,
0.9394620656967163,
-0.7395741939544678,
0.9398671388626099,
0.20255416631698608,
1.0770210027694702,
0.8435103893280029,
-0.3131293058395386,
0.5786446928977966,
0.03211052343249321,
-1.282287836074829,
0.5493922829627991,
1.1800414323806763,
0.2120620459318161,
1.5181078910827637,
-0.4966167211532593,
-0.0021229260601103306,
0.37280115485191345,
-0.6181808114051819,
-0.38345858454704285,
-0.5539970993995667,
0.6617304086685181,
0.07101980596780777,
-0.9041200876235962,
0.07836081832647324,
0.04899381473660469,
-0.14487934112548828,
0.12130137532949448,
-1.5532374382019043,
-0.1962897926568985,
-0.322124183177948,
-0.5519654154777527,
-1.2028385400772095,
-0.15043090283870697,
1.3228687047958374,
-0.7124847769737244,
-0.23298196494579315,
0.521743893623352,
0.3579905927181244,
0.57379549741745,
0.5818511843681335,
-0.7428791522979736,
-0.29684144258499146,
-0.2513543367385864,
-0.3710830807685852,
0.3536624610424042,
1.2991065979003906,
-0.05317211523652077,
-0.9161388278007507,
0.7047057151794434,
-0.3985227942466736,
0.06189101189374924,
1.8870398998260498,
0.05651509016752243,
-0.8134399652481079,
0.2970205843448639,
-0.7635465860366821,
1.8977503776550293,
1.6695400476455688,
1.2247165441513062,
-0.10300387442111969,
-0.9932077527046204,
0.7119072675704956,
-0.42975521087646484,
-0.4846540689468384,
0.7896952033042908,
0.38563424348831177,
-0.22043827176094055,
-1.3725472688674927,
0.840742290019989,
1.3350108861923218,
-0.9160319566726685,
-0.9660847187042236,
0.2036028951406479,
-0.7617701292037964,
1.0487077236175537,
0.6224089860916138,
0.3461446166038513,
0.23807284235954285,
1.6196413040161133,
0.8526415824890137,
-0.37172263860702515,
0.5232561826705933,
0.5457774996757507,
-0.16309458017349243,
-2.0527849197387695,
-1.2453361749649048,
0.28051236271858215,
-0.5102161765098572,
-1.5541410446166992,
1.3912988901138306,
-1.203845739364624,
-0.9533047080039978,
0.5948836803436279,
0.13422979414463043,
1.494349718093872,
0.36744070053100586,
1.5172910690307617,
2.011523485183716,
0.8488115072250366,
0.4312284588813782,
1.3011661767959595,
-0.1777672916650772,
-0.556074321269989,
1.8239750862121582,
-0.5276870131492615,
0.5289791822433472,
1.1551766395568848,
-0.2832562327384949,
-1.1427702903747559,
-0.7939713001251221,
-1.2752121686935425,
-0.7337765693664551,
1.1885277032852173,
0.08943234384059906,
-1.0769652128219604,
0.3031441867351532,
1.638193130493164,
0.197996586561203,
-0.3673115074634552,
0.6304718255996704,
0.36915749311447144,
-0.8680368065834045,
-0.06011922284960747,
-0.9488285183906555,
0.4991954565048218,
-0.19453664124011993,
-0.3426658511161804,
0.3174663484096527,
0.4374861717224121,
1.3546082973480225,
-0.003152064047753811,
0.09922780096530914,
0.9826080799102783,
-1.405036211013794,
1.5495948791503906,
-0.693216860294342,
0.3207154870033264,
-2.35627818107605,
1.374951958656311,
-0.8085042238235474,
1.9995784759521484,
-2.628973960876465,
0.45289337635040283,
-0.5313547253608704,
-0.4549197852611542,
0.25139883160591125,
-0.3202005624771118,
0.15675777196884155,
-0.11379758268594742,
-1.1335079669952393,
-0.021803198382258415,
-0.7188911437988281,
0.6049955487251282,
1.1612335443496704,
1.4240021705627441,
-1.1068841218948364,
-0.28330788016319275,
-1.7621368169784546,
-0.20081667602062225,
-0.7434747219085693,
0.36351752281188965,
-1.965963363647461,
-0.1408577561378479,
-1.8460720777511597,
-2.315383195877075,
-1.2142999172210693,
-0.7705446481704712,
1.0608896017074585,
0.0835021510720253,
-0.8982759118080139,
1.2740925550460815,
-0.3283767104148865,
-1.7746461629867554,
1.1061651706695557,
-2.1126747131347656
] |
https://github.com/huggingface/datasets/issues/4864 | Allow pathlib PoxisPath in Dataset.read_json | > @vvvm23 I think you mean think:
You are correct, thanks!
> Probably just need to check first if url_or_filename is [PathLike](https://docs.python.org/3/library/os.html#os.PathLike) and return False early.
Is PathLike sufficient, or should I check the file exists here? Or is that handled later? | **Is your feature request related to a problem? Please describe.**
```
from pathlib import Path
from datasets import Dataset
ds = Dataset.read_json(Path('data.json'))
```
causes an error
```
AttributeError: 'PosixPath' object has no attribute 'decode'
```
**Describe the solution you'd like**
It should be able to accept PosixPath and read the json from inside. | 569 | 42 | Allow pathlib PoxisPath in Dataset.read_json
**Is your feature request related to a problem? Please describe.**
```
from pathlib import Path
from datasets import Dataset
ds = Dataset.read_json(Path('data.json'))
```
causes an error
```
AttributeError: 'PosixPath' object has no attribute 'decode'
```
**Describe the solution you'd like**
It should be able to accept PosixPath and read the json from inside.
> @vvvm23 I think you mean think:
You are correct, thanks!
> Probably just need to check first if url_or_filename is [PathLike](https://docs.python.org/3/library/os.html#os.PathLike) and return False early.
Is PathLike sufficient, or should I check the file exists here? Or is that handled later? | [
-1.1854381561279297,
-1.0129759311676025,
-0.7926321029663086,
1.6118700504302979,
-0.2073470950126648,
-1.2830890417099,
0.1164541244506836,
-1.0486611127853394,
1.7360442876815796,
-0.7924561500549316,
0.34806028008461,
-1.7819228172302246,
-0.12337588518857956,
-0.6232739686965942,
-0.8347130417823792,
-0.8466178178787231,
-0.3366067409515381,
-0.8614905476570129,
0.9765019416809082,
2.4161570072174072,
1.170881748199463,
-1.335638165473938,
2.670581340789795,
0.6920869946479797,
-0.2164963185787201,
-1.0104957818984985,
0.47710204124450684,
-0.02894420549273491,
-1.1129965782165527,
-0.542616605758667,
-0.9417374730110168,
-0.14621184766292572,
-0.4787944555282593,
-0.5390094518661499,
0.13099637627601624,
0.40277358889579773,
-0.23245492577552795,
-0.29031309485435486,
-0.570993185043335,
-0.7634763717651367,
0.4069119691848755,
-0.403656929731369,
0.9310726523399353,
-0.4146557152271271,
1.8689368963241577,
-0.6479236483573914,
0.3053802251815796,
0.7125203013420105,
1.3881522417068481,
0.17808641493320465,
-0.062007464468479156,
0.3778012692928314,
0.41359013319015503,
0.0488324873149395,
0.4604347050189972,
1.127485752105713,
0.5879480242729187,
0.5261921286582947,
0.724012017250061,
-2.254460096359253,
1.3144174814224243,
-1.1412612199783325,
0.2598073184490204,
1.2895134687423706,
-0.951734185218811,
0.3769652545452118,
-1.7775193452835083,
0.04829893633723259,
0.6023780107498169,
-2.293456792831421,
0.25631967186927795,
-1.2718223333358765,
-0.6120383143424988,
1.064447283744812,
0.39515405893325806,
-1.3814949989318848,
-0.0028137946501374245,
-0.38945120573043823,
0.9617432355880737,
0.39579957723617554,
1.0436205863952637,
-1.7785450220108032,
-0.12407753616571426,
-0.3706801235675812,
0.037631481885910034,
-1.3995078802108765,
-1.497220516204834,
0.6700199842453003,
0.620317816734314,
0.6395247578620911,
-0.18338538706302643,
1.0329790115356445,
-0.9142679572105408,
0.7614551782608032,
-1.0106585025787354,
-1.6616182327270508,
-1.4721277952194214,
-2.204432487487793,
-2.213060140609741,
0.8017510771751404,
-0.4599102735519409,
-0.5871379375457764,
1.9312779903411865,
-0.924452543258667,
-1.78263258934021,
1.0878231525421143,
0.17874453961849213,
0.0641927644610405,
2.3489482402801514,
0.20734335482120514,
-0.6345897316932678,
0.32964229583740234,
-0.7516287565231323,
0.8003864288330078,
-0.3797838091850281,
1.437068223953247,
0.503009557723999,
-0.9999909400939941,
1.6361922025680542,
-0.3657114505767822,
0.5734468102455139,
-0.6043928861618042,
-0.5853388905525208,
-0.8975284099578857,
0.3165260851383209,
1.9308011531829834,
-0.290496289730072,
1.4458332061767578,
-0.4099425673484802,
-1.6564024686813354,
-1.600337028503418,
0.8961253762245178,
0.4016680121421814,
-0.8230614066123962,
0.1580173671245575,
-0.4695160388946533,
0.1505337655544281,
-0.06769911199808121,
1.229790210723877,
1.2534433603286743,
0.7352269291877747,
-0.30016401410102844,
-0.7602344155311584,
0.3301635682582855,
-0.006406547036021948,
-0.7069839239120483,
-1.8327726125717163,
-0.36848872900009155,
0.1964016556739807,
0.6657394170761108,
-1.1391810178756714,
1.676758885383606,
0.8473504185676575,
1.88374924659729,
1.0558476448059082,
-0.27669811248779297,
1.427854299545288,
-0.013075409457087517,
1.9336105585098267,
-0.6433531641960144,
0.6386412978172302,
-0.36536461114883423,
-1.0597941875457764,
0.8573101758956909,
-0.3535512387752533,
-2.0875556468963623,
-0.8499886393547058,
-0.8274343013763428,
-0.21251308917999268,
-0.8018063306808472,
0.9502274990081787,
-0.3316960334777832,
-1.3911821842193604,
0.29099997878074646,
-0.775483250617981,
0.21831057965755463,
-1.2135225534439087,
0.320254921913147,
0.7014176845550537,
-0.5978172421455383,
0.12799304723739624,
-0.23838485777378082,
-1.2583853006362915,
-0.5240005254745483,
0.325832724571228,
2.0518906116485596,
-0.7677463889122009,
0.9011998772621155,
0.9499273300170898,
-0.803031325340271,
0.06581461429595947,
0.3925970792770386,
-0.2455768883228302,
0.8318743109703064,
-1.054695963859558,
-0.34520766139030457,
1.170790433883667,
-0.19643168151378632,
-0.6498647332191467,
1.5726914405822754,
0.7909485101699829,
-0.9763403534889221,
-0.16954399645328522,
-0.3513574004173279,
-0.825229823589325,
0.008707867003977299,
-1.6374468803405762,
-0.2578333616256714,
0.2799946963787079,
-1.5149484872817993,
-0.5513198375701904,
-0.26893487572669983,
1.3881444931030273,
-0.10603319853544235,
1.2500559091567993,
-0.29837751388549805,
-0.3553038537502289,
-0.2301453948020935,
-0.4253079891204834,
0.21295969188213348,
-0.2895461916923523,
-0.5779803991317749,
0.2719525396823883,
-0.7577784061431885,
0.3640466034412384,
1.418953776359558,
0.36820316314697266,
-0.059701185673475266,
0.5374197363853455,
1.0822069644927979,
0.34254875779151917,
-0.024454820901155472,
-0.9085770845413208,
-1.569764494895935,
2.0196661949157715,
-1.5451608896255493,
1.9103635549545288,
0.6405829787254333,
-0.07452598959207535,
-1.6768221855163574,
-1.8860807418823242,
1.3466237783432007,
1.2365443706512451,
2.2262051105499268,
0.7437324523925781,
0.38872963190078735,
-0.8558697700500488,
-0.6984252333641052,
0.30004259943962097,
-1.1035335063934326,
-0.7638452053070068,
0.01121415663510561,
2.4236562252044678,
1.7438044548034668,
-0.6120504140853882,
-0.1984739899635315,
-0.9966574311256409,
1.2987252473831177,
-0.19778481125831604,
0.17356917262077332,
2.0786852836608887,
-0.306036114692688,
-1.1182842254638672,
1.2832285165786743,
-2.275021553039551,
0.13686347007751465,
1.9918476343154907,
0.31431183218955994,
0.1353439837694168,
-1.4700465202331543,
-0.6108250021934509,
-0.2576146125793457,
-0.40767648816108704,
-1.2578155994415283,
0.5459043979644775,
-0.27891263365745544,
-0.7323451042175293,
-1.4485005140304565,
0.23850660026073456,
-1.013063907623291,
-1.6431293487548828,
0.32590603828430176,
1.972273826599121,
2.058305501937866,
-0.7198411822319031,
1.5381710529327393,
-0.2842540442943573,
0.15087170898914337,
1.3365259170532227,
1.212981104850769,
3.147433280944824,
1.9660322666168213,
-1.234002709388733,
0.6962743401527405,
-0.18808451294898987,
-0.5083928108215332,
1.1694105863571167,
-1.131734013557434,
1.2176125049591064,
-0.2212996780872345,
-1.1340162754058838,
-1.2127623558044434,
0.9126546382904053,
0.4515429139137268,
-0.070439912378788,
-0.519559383392334,
1.2377675771713257,
0.0149999326094985,
1.3157356977462769,
0.49975886940956116,
-0.37500813603401184,
0.6142861247062683,
-0.45100295543670654,
-0.405177503824234,
1.6162948608398438,
0.2712927758693695,
-1.3379956483840942,
-2.306131362915039,
-0.17988137900829315,
-0.808008074760437,
0.10923908650875092,
-0.42814210057258606,
-1.0204405784606934,
1.6904603242874146,
0.43942612409591675,
-1.233911156654358,
-0.2733561098575592,
-0.3390527367591858,
-0.5479174256324768,
2.7130126953125,
-1.3913174867630005,
-0.23128248751163483,
-0.9928725361824036,
-0.5392657518386841,
1.7652666568756104,
-1.3132044076919556,
-0.25532129406929016,
-0.9682409167289734,
-0.6139072179794312,
-1.3338398933410645,
-0.5970316529273987,
-0.0010622814297676086,
-0.9619888067245483,
0.8619732856750488,
0.1362268626689911,
-1.1424423456192017,
-0.2959895730018616,
-0.9037445783615112,
0.8753075003623962,
-0.12489508092403412,
0.3786213994026184,
1.9735429286956787,
0.4262331426143646,
-0.3844176232814789,
0.7269828915596008,
1.1569533348083496,
0.6522284150123596,
-0.6800037622451782,
0.2736702859401703,
-0.6102842092514038,
0.3062596321105957,
-1.333866000175476,
0.29333966970443726,
-2.897571086883545,
0.6118608117103577,
-0.011993644759058952,
-0.14836430549621582,
0.002954482100903988,
-1.2825274467468262,
1.1559779644012451,
2.5486857891082764,
-1.2324351072311401,
0.39227205514907837,
0.14149177074432373,
1.1974538564682007,
-1.5315669775009155,
0.3139471411705017,
-0.3167918920516968,
2.2431392669677734,
0.19925661385059357,
1.1949951648712158,
-0.38737863302230835,
-2.268672466278076,
0.7104776501655579,
-1.1478705406188965,
-1.0914455652236938,
0.6246248483657837,
-0.7986356616020203,
-0.006237891037017107,
-1.5580403804779053,
-0.18904580175876617,
-0.8891363143920898,
-1.2054452896118164,
0.8551207780838013,
0.21352051198482513,
0.41966983675956726,
-0.6064901351928711,
0.3154645562171936,
-2.056936740875244,
-1.3966182470321655,
-0.22192732989788055,
-0.9284607172012329,
0.5176186561584473,
-0.31610211730003357,
0.6611003279685974,
-0.1592380702495575,
0.09617817401885986,
0.45876172184944153,
1.5165585279464722,
3.327324628829956,
0.12226659059524536,
0.40859121084213257,
-0.12953217327594757,
-0.930648684501648,
1.3595962524414062,
0.9378569722175598,
0.056097742170095444,
-0.5024808645248413,
-1.1126186847686768,
1.2429543733596802,
1.9973355531692505,
0.8825637102127075,
0.15328392386436462,
-0.8016380071640015,
-0.6953083872795105,
-0.03339943662285805,
0.2592357397079468,
0.6517587900161743,
0.9480988383293152,
0.07505697011947632,
-0.002777691464871168,
1.3661682605743408,
1.2211369276046753,
-0.43922242522239685,
0.4137634336948395,
-0.895198404788971,
-0.40875595808029175,
0.4829419255256653,
0.23669426143169403,
-0.08019386976957321,
0.2042636275291443,
-0.9703975319862366,
-0.15520136058330536,
-0.2517133355140686,
-0.9141665697097778,
-0.8235365748405457,
-0.48281964659690857,
-0.37383103370666504,
1.5908068418502808,
0.09877067059278488,
-0.5730268359184265,
-0.12082888185977936,
-0.7408896684646606,
-0.058235086500644684,
-1.067097783088684,
0.15449343621730804,
-0.17792899906635284,
-0.1757352352142334,
-0.17029477655887604,
1.7596293687820435,
-0.9634899497032166,
-2.0369176864624023,
0.28913387656211853,
0.418625146150589,
-0.4034678637981415,
0.2547808289527893,
1.5237613916397095,
0.5741575956344604,
1.4469234943389893,
1.2990803718566895,
1.0611646175384521,
-0.6183032989501953,
-1.335556149482727,
0.6075204610824585,
0.8722283840179443,
-1.4148833751678467,
0.8924798965454102,
-0.018462982028722763,
-0.41881075501441956,
0.6242315769195557,
1.3389824628829956,
0.4629480540752411,
-1.9033000469207764,
0.7650532126426697,
-0.8919621706008911,
0.7725391983985901,
0.7170971632003784,
0.7574446201324463,
0.29531630873680115,
0.8306949734687805,
-1.2070661783218384,
-1.098975658416748,
-0.8630039691925049,
-0.6765797138214111,
1.9509786367416382,
-0.25245094299316406,
0.585780143737793,
-0.04291161522269249,
-1.321284532546997,
-0.1186399981379509,
0.769497275352478,
0.42216992378234863,
-0.40167877078056335,
0.8143825531005859,
-0.6244567036628723,
-1.1001594066619873,
-1.347413182258606,
-0.517227292060852,
-1.0139992237091064,
-0.9075661897659302,
0.9905149936676025,
0.8947803974151611,
0.3708219528198242,
1.8441596031188965,
0.6137840747833252,
0.25960060954093933,
-2.5527286529541016,
0.9424870014190674,
0.2590831518173218,
0.02141650766134262,
0.9339456558227539,
0.32993608713150024,
1.021721601486206,
-0.023297633975744247,
0.5442909002304077,
-2.297502279281616,
2.282886266708374,
-0.26945072412490845,
0.655861496925354,
0.07169174402952194,
-0.24443666636943817,
1.0601348876953125,
0.5029281973838806,
0.5714489221572876,
-1.0728309154510498,
0.6441794037818909,
-0.7257862091064453,
1.2408437728881836,
0.9456067085266113,
-0.7372648119926453,
-0.06824766099452972,
1.2976096868515015,
0.44226717948913574,
-0.5406919121742249,
-0.9146948456764221,
-0.9925098419189453,
0.891938328742981,
1.6945825815200806,
-0.0789479985833168,
-0.1280413120985031,
0.8535921573638916,
0.7042074799537659,
-1.2450485229492188,
0.14732156693935394,
-0.7557607889175415,
-0.6776138544082642,
1.6348108053207397,
2.1173577308654785,
-0.16375692188739777,
-0.25267258286476135,
-0.7824020385742188,
-1.1536812782287598,
0.820053219795227,
0.0188039168715477,
-0.0170242078602314,
0.7013818621635437,
-0.6449134945869446,
1.1108784675598145,
0.8882572650909424,
0.9734094142913818,
0.14079433679580688,
0.5002089142799377,
0.40496569871902466,
-0.3452582061290741,
-1.127756953239441,
-0.38411301374435425,
-1.1781589984893799,
-2.5895025730133057,
0.5033842325210571,
-0.3463520407676697,
-1.3399553298950195,
-0.0028120316565036774,
-1.160976767539978,
0.9035683274269104,
-0.6326779127120972,
-1.0343968868255615,
-1.553320288658142,
0.16118383407592773,
-0.04138902202248573,
0.9261177778244019,
-1.6603925228118896,
-0.02993107959628105,
1.3355509042739868,
0.8934398889541626,
-0.660715639591217,
1.0213876962661743,
0.26339367032051086,
1.0998951196670532,
0.804964542388916,
-0.370664119720459,
0.454359233379364,
0.07495228946208954,
-1.239787220954895,
0.6219735741615295,
1.1587424278259277,
0.1870235949754715,
1.4684447050094604,
-0.49176594614982605,
0.08864159882068634,
0.3944757580757141,
-0.6311942338943481,
-0.40680211782455444,
-0.5608647465705872,
0.7034109234809875,
0.1513989418745041,
-0.8941848278045654,
0.13131369650363922,
-0.003862112294882536,
-0.1617690473794937,
0.07666534185409546,
-1.5601924657821655,
-0.24982793629169464,
-0.2815306484699249,
-0.5203970074653625,
-1.2351802587509155,
-0.1473512202501297,
1.318879246711731,
-0.7347781658172607,
-0.17117947340011597,
0.5525451302528381,
0.41348996758461,
0.5788944959640503,
0.5901660323143005,
-0.705828070640564,
-0.3280080556869507,
-0.3121994137763977,
-0.3462216258049011,
0.30332350730895996,
1.2413291931152344,
-0.14795923233032227,
-0.976144552230835,
0.6852474808692932,
-0.34755951166152954,
0.008073224686086178,
1.8646643161773682,
-0.013958563096821308,
-0.8560214042663574,
0.28350841999053955,
-0.7720386385917664,
1.9407790899276733,
1.598487377166748,
1.214801549911499,
-0.07826785743236542,
-0.99805748462677,
0.6101244688034058,
-0.24986155331134796,
-0.4989157021045685,
0.7794877290725708,
0.4746963679790497,
-0.22093483805656433,
-1.3204030990600586,
0.6772823333740234,
1.3203010559082031,
-0.9922912120819092,
-0.9652479290962219,
0.1677177995443344,
-0.760806679725647,
1.027215838432312,
0.6648246645927429,
0.40732458233833313,
0.2513578236103058,
1.5356169939041138,
0.7345511317253113,
-0.4467969536781311,
0.5069451332092285,
0.48349589109420776,
-0.05814068019390106,
-2.0525851249694824,
-1.1684433221817017,
0.29492324590682983,
-0.49469801783561707,
-1.5333913564682007,
1.3662556409835815,
-1.2579362392425537,
-0.8405893445014954,
0.6114733815193176,
0.2833096385002136,
1.5279345512390137,
0.2952880561351776,
1.5949383974075317,
1.974947452545166,
0.8484950065612793,
0.35361960530281067,
1.4141391515731812,
-0.14867424964904785,
-0.5904459357261658,
1.785696029663086,
-0.5527399182319641,
0.59438556432724,
1.1124192476272583,
-0.23306258022785187,
-1.080767273902893,
-0.8149124383926392,
-1.2166167497634888,
-0.7058789134025574,
1.1858210563659668,
0.1058291643857956,
-1.1471995115280151,
0.1900946944952011,
1.5522984266281128,
0.22019200026988983,
-0.32906195521354675,
0.4810836613178253,
0.3913421332836151,
-0.8427302241325378,
-0.12371509522199631,
-1.0051507949829102,
0.48981529474258423,
-0.19473539292812347,
-0.35520634055137634,
0.2931376099586487,
0.4106197953224182,
1.2964986562728882,
-0.06262930482625961,
0.07454919815063477,
1.1061556339263916,
-1.4232370853424072,
1.6269195079803467,
-0.5761417746543884,
0.2742552161216736,
-2.430748701095581,
1.4842643737792969,
-0.7967298626899719,
1.991165280342102,
-2.69480037689209,
0.36661773920059204,
-0.5673384666442871,
-0.3928724527359009,
0.32304298877716064,
-0.25770142674446106,
0.14945970475673676,
-0.15994735062122345,
-1.0731804370880127,
-0.014780527912080288,
-0.7641673684120178,
0.5414112210273743,
1.161759853363037,
1.3697686195373535,
-1.102236032485962,
-0.2714930474758148,
-1.8117899894714355,
-0.1894267052412033,
-0.7496816515922546,
0.39997485280036926,
-2.0356969833374023,
-0.1095244362950325,
-1.844403862953186,
-2.254211664199829,
-1.3448585271835327,
-0.7404959201812744,
1.0457642078399658,
0.08324873447418213,
-0.8555653095245361,
1.1224355697631836,
-0.28522223234176636,
-1.720170021057129,
1.009691596031189,
-2.097285032272339
] |
https://github.com/huggingface/datasets/issues/4864 | Allow pathlib PoxisPath in Dataset.read_json | I think here we just want to avoid passing Path to urlparse. A simpler solution is to add a str() call and convert the input to string before passing to the next step. No need to check anything. | **Is your feature request related to a problem? Please describe.**
```
from pathlib import Path
from datasets import Dataset
ds = Dataset.read_json(Path('data.json'))
```
causes an error
```
AttributeError: 'PosixPath' object has no attribute 'decode'
```
**Describe the solution you'd like**
It should be able to accept PosixPath and read the json from inside. | 569 | 38 | Allow pathlib PoxisPath in Dataset.read_json
**Is your feature request related to a problem? Please describe.**
```
from pathlib import Path
from datasets import Dataset
ds = Dataset.read_json(Path('data.json'))
```
causes an error
```
AttributeError: 'PosixPath' object has no attribute 'decode'
```
**Describe the solution you'd like**
It should be able to accept PosixPath and read the json from inside.
I think here we just want to avoid passing Path to urlparse. A simpler solution is to add a str() call and convert the input to string before passing to the next step. No need to check anything. | [
-1.2047195434570312,
-1.0244216918945312,
-0.8146315217018127,
1.6757713556289673,
-0.19438116252422333,
-1.2816612720489502,
0.106853187084198,
-1.0378217697143555,
1.8297054767608643,
-0.8045697212219238,
0.3669883906841278,
-1.713549256324768,
0.0010705608874559402,
-0.591906726360321,
-0.8418363332748413,
-0.8666925430297852,
-0.37970009446144104,
-0.764764130115509,
0.9684659838676453,
2.379666566848755,
1.1933623552322388,
-1.4406635761260986,
2.7103333473205566,
0.7335808873176575,
-0.19134438037872314,
-1.0544171333312988,
0.4060128927230835,
0.05589285120368004,
-1.0560775995254517,
-0.5663442015647888,
-0.8913511037826538,
-0.11333148181438446,
-0.5555115342140198,
-0.567689836025238,
0.14229600131511688,
0.4291933476924896,
-0.26654043793678284,
-0.4431971311569214,
-0.5269768238067627,
-0.7158438563346863,
0.3763570189476013,
-0.45907989144325256,
0.8827895522117615,
-0.46791699528694153,
1.785753846168518,
-0.5956589579582214,
0.3285192549228668,
0.701252818107605,
1.4680036306381226,
0.20339982211589813,
-0.11606571078300476,
0.40821442008018494,
0.3589196801185608,
0.013915504328906536,
0.4794852137565613,
1.1710264682769775,
0.614529550075531,
0.6452664732933044,
0.7124680280685425,
-2.2120492458343506,
1.389440655708313,
-1.18172287940979,
0.2882562279701233,
1.2336922883987427,
-1.0186904668807983,
0.4455702602863312,
-1.784103274345398,
-0.07659545540809631,
0.5254464149475098,
-2.342597007751465,
0.23313695192337036,
-1.2473043203353882,
-0.5490170121192932,
1.0449992418289185,
0.33034446835517883,
-1.376976490020752,
0.013514137826859951,
-0.38248467445373535,
0.9805650115013123,
0.433601051568985,
1.042537808418274,
-1.7189580202102661,
-0.025897279381752014,
-0.40142711997032166,
0.011640406213700771,
-1.4288384914398193,
-1.4281460046768188,
0.6759238243103027,
0.6200413703918457,
0.68873530626297,
-0.09856164455413818,
1.0235265493392944,
-0.9202512502670288,
0.7654638886451721,
-1.0618782043457031,
-1.655511498451233,
-1.3513834476470947,
-2.1796555519104004,
-2.263758659362793,
0.7688729763031006,
-0.45368435978889465,
-0.6129264831542969,
1.987934947013855,
-0.9016444683074951,
-1.8029316663742065,
1.1246552467346191,
0.2710441052913666,
-0.026364076882600784,
2.4158453941345215,
0.07073959708213806,
-0.6227948665618896,
0.37513455748558044,
-0.6907608509063721,
0.9029800891876221,
-0.44187378883361816,
1.4353419542312622,
0.4864259958267212,
-0.9472633004188538,
1.6420048475265503,
-0.28505080938339233,
0.6403734683990479,
-0.608866810798645,
-0.5808932781219482,
-0.9476991891860962,
0.39539843797683716,
1.921016812324524,
-0.26394155621528625,
1.471990942955017,
-0.4725603759288788,
-1.6549845933914185,
-1.5754534006118774,
0.9639902710914612,
0.4385800063610077,
-0.8404305577278137,
0.1376716047525406,
-0.41212740540504456,
0.13067485392093658,
-0.021944398060441017,
1.2311536073684692,
1.1955734491348267,
0.7319297790527344,
-0.34122636914253235,
-0.810760498046875,
0.27403315901756287,
0.018206942826509476,
-0.6805862188339233,
-1.8443031311035156,
-0.3151628077030182,
0.13449427485466003,
0.6076622605323792,
-1.1817667484283447,
1.5562227964401245,
0.868498682975769,
1.9252816438674927,
1.0977658033370972,
-0.21169911324977875,
1.4705218076705933,
-0.09137293696403503,
1.9299997091293335,
-0.5767385959625244,
0.6385469436645508,
-0.2988325357437134,
-1.0065301656723022,
0.8535361886024475,
-0.3604313135147095,
-2.153669595718384,
-0.8560563921928406,
-0.8233177661895752,
-0.24341106414794922,
-0.8149971961975098,
0.9405332207679749,
-0.3328860402107239,
-1.405971884727478,
0.27256760001182556,
-0.700510561466217,
0.24008361995220184,
-1.2405085563659668,
0.3783416748046875,
0.739404022693634,
-0.6209637522697449,
0.14663854241371155,
-0.2627744674682617,
-1.247813105583191,
-0.5179424285888672,
0.37501680850982666,
2.0027244091033936,
-0.800866425037384,
0.8054494261741638,
0.9439152479171753,
-0.807824969291687,
-0.0324111208319664,
0.3211457133293152,
-0.21196907758712769,
0.864737331867218,
-1.0236659049987793,
-0.40032660961151123,
1.1377654075622559,
-0.13350987434387207,
-0.6545335054397583,
1.5837757587432861,
0.7219201922416687,
-1.0101642608642578,
-0.09983634203672409,
-0.2975640892982483,
-0.9213014245033264,
0.039401646703481674,
-1.5922034978866577,
-0.25051385164260864,
0.2733321189880371,
-1.551069974899292,
-0.5713333487510681,
-0.2896682024002075,
1.2517541646957397,
-0.15234212577342987,
1.2725319862365723,
-0.2595796585083008,
-0.4427138566970825,
-0.18306964635849,
-0.3840179741382599,
0.13623611629009247,
-0.2633686363697052,
-0.625328004360199,
0.20988361537456512,
-0.7051944732666016,
0.45397883653640747,
1.4264370203018188,
0.3607001006603241,
-0.1068502888083458,
0.6076727509498596,
1.1219534873962402,
0.35098370909690857,
-0.10616070032119751,
-0.8400231599807739,
-1.59770929813385,
1.9591633081436157,
-1.4593793153762817,
1.9017386436462402,
0.5851619839668274,
-0.0575203113257885,
-1.673106074333191,
-1.8499807119369507,
1.391589879989624,
1.2173773050308228,
2.266533851623535,
0.7576239109039307,
0.30238503217697144,
-0.838686466217041,
-0.7305299639701843,
0.27424734830856323,
-1.1525132656097412,
-0.7789818048477173,
0.01351644191890955,
2.318641424179077,
1.7855556011199951,
-0.5713170766830444,
-0.14275793731212616,
-0.9786696434020996,
1.3269028663635254,
-0.1748143881559372,
0.25613993406295776,
2.009129762649536,
-0.3256165683269501,
-1.1042742729187012,
1.2962281703948975,
-2.3062305450439453,
0.07895028591156006,
1.993061900138855,
0.34655681252479553,
0.05804542079567909,
-1.5071532726287842,
-0.5797761678695679,
-0.2528422176837921,
-0.32071852684020996,
-1.360072374343872,
0.4144223630428314,
-0.24605420231819153,
-0.6623743772506714,
-1.564655065536499,
0.29109781980514526,
-1.0706285238265991,
-1.4924343824386597,
0.2977340817451477,
2.026702880859375,
1.9555680751800537,
-0.6268647313117981,
1.5608066320419312,
-0.2719408869743347,
0.18082267045974731,
1.2829614877700806,
1.0428730249404907,
3.0578510761260986,
1.971941351890564,
-1.1732749938964844,
0.7108740210533142,
-0.16772128641605377,
-0.5682352781295776,
1.1604684591293335,
-1.1639106273651123,
1.296833872795105,
-0.22002369165420532,
-1.0924170017242432,
-1.2930101156234741,
0.8821778893470764,
0.4734038710594177,
-0.0257035493850708,
-0.5041391849517822,
1.2465800046920776,
0.0006119934841990471,
1.2907073497772217,
0.4459540545940399,
-0.4029320776462555,
0.6176933646202087,
-0.4163016974925995,
-0.5056037902832031,
1.5836256742477417,
0.20274768769741058,
-1.3156628608703613,
-2.297755718231201,
-0.1855819821357727,
-0.7300554513931274,
0.16926346719264984,
-0.4344039857387543,
-0.965276837348938,
1.7333070039749146,
0.3545549511909485,
-1.242021918296814,
-0.290630578994751,
-0.2760290801525116,
-0.5787861347198486,
2.709721803665161,
-1.3314261436462402,
-0.22363753616809845,
-1.0467169284820557,
-0.6007817983627319,
1.7169935703277588,
-1.2774730920791626,
-0.2817927300930023,
-0.9236732125282288,
-0.5427032113075256,
-1.3350002765655518,
-0.608727216720581,
-0.010459380224347115,
-0.9347145557403564,
0.8999686241149902,
0.12246774882078171,
-1.1165130138397217,
-0.30299726128578186,
-0.8664236068725586,
0.8131555318832397,
-0.1272822469472885,
0.3019402325153351,
2.0016305446624756,
0.4137413799762726,
-0.35797181725502014,
0.7959970235824585,
1.0719084739685059,
0.6353636384010315,
-0.6632694602012634,
0.3224666118621826,
-0.544389545917511,
0.27646151185035706,
-1.2653889656066895,
0.3646324574947357,
-2.926180124282837,
0.48323333263397217,
-0.024252139031887054,
-0.10793980211019516,
0.06815686076879501,
-1.3174618482589722,
1.1022697687149048,
2.5571517944335938,
-1.197096824645996,
0.5447103381156921,
0.14870625734329224,
1.2166831493377686,
-1.5168397426605225,
0.3743612468242645,
-0.2865426540374756,
2.233346700668335,
0.20523859560489655,
1.1531524658203125,
-0.4998120069503784,
-2.3229944705963135,
0.7144302129745483,
-1.166128158569336,
-1.2509292364120483,
0.5749437808990479,
-0.9239599108695984,
-0.017409320920705795,
-1.5364898443222046,
-0.25738996267318726,
-0.9010977745056152,
-1.2635748386383057,
0.8301382064819336,
0.28904324769973755,
0.408189982175827,
-0.6607795357704163,
0.33251482248306274,
-2.14670991897583,
-1.426376461982727,
-0.23375435173511505,
-0.9523513317108154,
0.4589419364929199,
-0.3929292857646942,
0.5967755317687988,
-0.2111160159111023,
0.09532905369997025,
0.31413429975509644,
1.5150535106658936,
3.288706064224243,
0.2010398954153061,
0.4424231946468353,
-0.15169638395309448,
-0.9044858813285828,
1.467081069946289,
0.9006228446960449,
0.10504511743783951,
-0.5138731598854065,
-1.0619295835494995,
1.2634596824645996,
2.034802198410034,
0.8497259616851807,
0.0696655735373497,
-0.8542309403419495,
-0.6576417088508606,
-0.10763908922672272,
0.27308133244514465,
0.6012071967124939,
0.9546119570732117,
0.08106209337711334,
-0.023471634835004807,
1.3731666803359985,
1.2378284931182861,
-0.46044784784317017,
0.4130483567714691,
-0.872239887714386,
-0.4097732603549957,
0.4968807101249695,
0.2771112322807312,
-0.12790432572364807,
0.1172751858830452,
-0.9383563995361328,
-0.16117912530899048,
-0.37099355459213257,
-0.9339315891265869,
-0.8081890344619751,
-0.4598081111907959,
-0.40053725242614746,
1.6835682392120361,
0.11773141473531723,
-0.5974794626235962,
-0.19521884620189667,
-0.7765424847602844,
0.0028877826407551765,
-0.9820058941841125,
0.2767488658428192,
-0.14429938793182373,
-0.22747023403644562,
-0.11700406670570374,
1.8189733028411865,
-0.9927012920379639,
-2.035177230834961,
0.2969534397125244,
0.33955836296081543,
-0.38144710659980774,
0.2722727060317993,
1.5339409112930298,
0.48458728194236755,
1.507719874382019,
1.372591257095337,
0.981317400932312,
-0.7037138938903809,
-1.4415489435195923,
0.5395967960357666,
0.8806936740875244,
-1.3526434898376465,
0.8171193599700928,
0.11007266491651535,
-0.4507296681404114,
0.6651041507720947,
1.3561917543411255,
0.480061411857605,
-2.0039191246032715,
0.7496045231819153,
-0.8799850940704346,
0.7222325801849365,
0.7370191216468811,
0.691801130771637,
0.33268555998802185,
0.7573835253715515,
-1.152680516242981,
-1.1130439043045044,
-0.9584774971008301,
-0.6599661707878113,
1.9867011308670044,
-0.2939458191394806,
0.6662483215332031,
0.06298530101776123,
-1.3531875610351562,
-0.10124458372592926,
0.7384343147277832,
0.5727856755256653,
-0.3651359975337982,
0.7417110800743103,
-0.6170586347579956,
-1.1880275011062622,
-1.4286596775054932,
-0.5445401668548584,
-1.005711555480957,
-0.919386088848114,
0.9335877895355225,
0.9034280180931091,
0.21704533696174622,
1.8766744136810303,
0.6310274600982666,
0.23851412534713745,
-2.6012966632843018,
0.8692309856414795,
0.33061960339546204,
0.0491689071059227,
0.8549006581306458,
0.44789040088653564,
0.9534708857536316,
0.028818927705287933,
0.4613490104675293,
-2.281017303466797,
2.2672922611236572,
-0.2684473991394043,
0.7360637187957764,
0.0014763250946998596,
-0.26031172275543213,
1.0634649991989136,
0.47721999883651733,
0.5830821990966797,
-1.1185518503189087,
0.6045860648155212,
-0.7158271074295044,
1.2854701280593872,
0.9249426126480103,
-0.6314413547515869,
-0.1271986961364746,
1.2368462085723877,
0.42913201451301575,
-0.5340967774391174,
-0.9607522487640381,
-0.973131537437439,
0.8785176873207092,
1.6672886610031128,
-0.09948503971099854,
-0.09786964952945709,
0.8225107789039612,
0.7293016910552979,
-1.2364341020584106,
0.1540609896183014,
-0.7531624436378479,
-0.7092670798301697,
1.5735453367233276,
2.0652036666870117,
-0.1621588170528412,
-0.22607052326202393,
-0.800331711769104,
-1.1053259372711182,
0.7404521107673645,
0.028299715369939804,
0.04974108561873436,
0.7019489407539368,
-0.5857191681861877,
1.1241848468780518,
0.9666761159896851,
0.9812725782394409,
0.06941642612218857,
0.5514876246452332,
0.4777192175388336,
-0.2648336589336395,
-1.1732779741287231,
-0.2743781507015228,
-1.133653163909912,
-2.531015634536743,
0.44236794114112854,
-0.38917386531829834,
-1.3383699655532837,
-0.00005587097257375717,
-1.1571120023727417,
0.9699828624725342,
-0.5736079216003418,
-1.0621663331985474,
-1.5419281721115112,
0.11598939448595047,
-0.049248069524765015,
0.8531185388565063,
-1.5761480331420898,
0.03217955306172371,
1.3164575099945068,
0.9255499243736267,
-0.6785972118377686,
1.0277369022369385,
0.24219435453414917,
1.1302589178085327,
0.7820602655410767,
-0.3935600817203522,
0.42098960280418396,
0.06700845062732697,
-1.2276301383972168,
0.6001972556114197,
1.0905393362045288,
0.2048521190881729,
1.404767394065857,
-0.5734394192695618,
-0.03389422595500946,
0.3760472536087036,
-0.627126157283783,
-0.3311959505081177,
-0.6188640594482422,
0.8125799894332886,
0.029470186680555344,
-0.8591167330741882,
0.21668627858161926,
-0.05330296605825424,
-0.14900855720043182,
0.12400802224874496,
-1.5590652227401733,
-0.2819022834300995,
-0.37430378794670105,
-0.5786858201026917,
-1.2133969068527222,
-0.06795680522918701,
1.3251795768737793,
-0.7131319046020508,
-0.2676998972892761,
0.6002348065376282,
0.4667171537876129,
0.5708573460578918,
0.5933321118354797,
-0.7277098894119263,
-0.2547193169593811,
-0.2769034206867218,
-0.3351653814315796,
0.3241368532180786,
1.274713158607483,
-0.1423555463552475,
-0.9991276860237122,
0.6849212646484375,
-0.3863670527935028,
-0.0623466819524765,
1.8520584106445312,
0.06838539987802505,
-0.8343779444694519,
0.27880701422691345,
-0.7491063475608826,
1.9443343877792358,
1.635655403137207,
1.2824875116348267,
-0.09116848558187485,
-0.9866229295730591,
0.6324930787086487,
-0.2589288651943207,
-0.4646044373512268,
0.8046218752861023,
0.5635825395584106,
-0.11345341801643372,
-1.3015356063842773,
0.6225981116294861,
1.2417787313461304,
-0.9659208059310913,
-0.9905821681022644,
0.13485006988048553,
-0.7311882376670837,
1.0597453117370605,
0.7888696789741516,
0.40829065442085266,
0.2341633290052414,
1.5812602043151855,
0.741887629032135,
-0.4709307849407196,
0.4827307164669037,
0.49199819564819336,
-0.0979558676481247,
-2.0863754749298096,
-1.1150882244110107,
0.27784815430641174,
-0.4763750731945038,
-1.5229061841964722,
1.44511878490448,
-1.2158182859420776,
-0.7907519340515137,
0.5554154515266418,
0.2554907202720642,
1.61434805393219,
0.3316631615161896,
1.536561369895935,
1.985914707183838,
0.9149625301361084,
0.36911943554878235,
1.4536386728286743,
-0.16940557956695557,
-0.5935145616531372,
1.8533505201339722,
-0.49835383892059326,
0.5493764877319336,
1.1554694175720215,
-0.2899361550807953,
-1.0715113878250122,
-0.7614430785179138,
-1.183430790901184,
-0.6672735214233398,
1.1331719160079956,
0.14241549372673035,
-1.1957262754440308,
0.23558811843395233,
1.5173941850662231,
0.28272008895874023,
-0.3435385525226593,
0.4098540246486664,
0.3923163414001465,
-0.8071128726005554,
-0.1285679191350937,
-0.9498008489608765,
0.4608519375324249,
-0.3476064205169678,
-0.34770503640174866,
0.28741002082824707,
0.3684477210044861,
1.2706620693206787,
-0.005250509362667799,
0.07134530693292618,
1.1180250644683838,
-1.4341015815734863,
1.547964096069336,
-0.5949211716651917,
0.2944111227989197,
-2.39098858833313,
1.4849576950073242,
-0.7874432802200317,
1.9843473434448242,
-2.6832690238952637,
0.3803223967552185,
-0.6020856499671936,
-0.3308153450489044,
0.3777877986431122,
-0.28556495904922485,
0.1650683730840683,
-0.14234764873981476,
-1.1367098093032837,
0.027699686586856842,
-0.6963664889335632,
0.5954398512840271,
1.155221939086914,
1.32789146900177,
-1.0721521377563477,
-0.30781835317611694,
-1.835160493850708,
-0.21711553633213043,
-0.6595041751861572,
0.428747296333313,
-2.1022024154663086,
-0.1932385265827179,
-1.862438440322876,
-2.234722137451172,
-1.2505422830581665,
-0.6973204612731934,
1.0902798175811768,
0.10751929879188538,
-0.8146016001701355,
1.1865614652633667,
-0.2557247579097748,
-1.7531574964523315,
1.086240291595459,
-2.0885894298553467
] |
https://github.com/huggingface/datasets/issues/4864 | Allow pathlib PoxisPath in Dataset.read_json | Above PR should do your first suggestion. Hope that works for you, as I am going on holiday and won't be able to change much :wink: | **Is your feature request related to a problem? Please describe.**
```
from pathlib import Path
from datasets import Dataset
ds = Dataset.read_json(Path('data.json'))
```
causes an error
```
AttributeError: 'PosixPath' object has no attribute 'decode'
```
**Describe the solution you'd like**
It should be able to accept PosixPath and read the json from inside. | 569 | 26 | Allow pathlib PoxisPath in Dataset.read_json
**Is your feature request related to a problem? Please describe.**
```
from pathlib import Path
from datasets import Dataset
ds = Dataset.read_json(Path('data.json'))
```
causes an error
```
AttributeError: 'PosixPath' object has no attribute 'decode'
```
**Describe the solution you'd like**
It should be able to accept PosixPath and read the json from inside.
Above PR should do your first suggestion. Hope that works for you, as I am going on holiday and won't be able to change much :wink: | [
-1.2035105228424072,
-1.0630707740783691,
-0.8034468293190002,
1.6772111654281616,
-0.3132719397544861,
-1.2064707279205322,
0.08854801952838898,
-1.0691930055618286,
1.7841395139694214,
-0.7490972280502319,
0.3685777485370636,
-1.7233484983444214,
-0.030677424743771553,
-0.6268954873085022,
-0.8145662546157837,
-0.840215802192688,
-0.4006039500236511,
-0.8088316321372986,
1.0370739698410034,
2.34704327583313,
1.2246567010879517,
-1.4207382202148438,
2.727832317352295,
0.7415156960487366,
-0.17915727198123932,
-1.0340105295181274,
0.37599870562553406,
0.045628830790519714,
-1.055606722831726,
-0.5400756001472473,
-0.932080090045929,
-0.12058654427528381,
-0.49105507135391235,
-0.5441633462905884,
0.06082554906606674,
0.39631950855255127,
-0.2735479772090912,
-0.3960188627243042,
-0.45463114976882935,
-0.6942415833473206,
0.39386045932769775,
-0.4076952636241913,
0.8713247179985046,
-0.5173360109329224,
1.829793095588684,
-0.6053060293197632,
0.27298542857170105,
0.7083174586296082,
1.4192684888839722,
0.22354871034622192,
-0.13603033125400543,
0.45620623230934143,
0.409059077501297,
0.006915142759680748,
0.5143457055091858,
1.1532814502716064,
0.5805548429489136,
0.6058045029640198,
0.7481318116188049,
-2.2005038261413574,
1.3182029724121094,
-1.170038104057312,
0.27621185779571533,
1.266311526298523,
-1.0475239753723145,
0.39220792055130005,
-1.7593647241592407,
0.013980090618133545,
0.5762525200843811,
-2.3202145099639893,
0.2597125172615051,
-1.1663175821304321,
-0.6120783686637878,
1.1124672889709473,
0.3581762909889221,
-1.4029165506362915,
0.07216931879520416,
-0.30329710245132446,
1.0102015733718872,
0.39132967591285706,
1.003600001335144,
-1.685617208480835,
0.052969880402088165,
-0.4089825749397278,
-0.038969121873378754,
-1.427381157875061,
-1.4003785848617554,
0.648871898651123,
0.6191538572311401,
0.6866143941879272,
-0.1969321072101593,
1.039785623550415,
-0.9123250842094421,
0.7764312624931335,
-1.114680290222168,
-1.640926480293274,
-1.3851484060287476,
-2.21693754196167,
-2.2173357009887695,
0.8849011659622192,
-0.44903144240379333,
-0.6219123005867004,
1.9106284379959106,
-0.8297998309135437,
-1.8411972522735596,
1.1110179424285889,
0.33640599250793457,
-0.05850307643413544,
2.4145286083221436,
0.14423640072345734,
-0.632010817527771,
0.39504051208496094,
-0.7573282718658447,
0.8760749697685242,
-0.42825454473495483,
1.4933639764785767,
0.4871852695941925,
-0.9033107161521912,
1.6048163175582886,
-0.3091573119163513,
0.6476033926010132,
-0.5794505476951599,
-0.6355292797088623,
-0.9782445430755615,
0.37262797355651855,
1.9941673278808594,
-0.23973707854747772,
1.389480710029602,
-0.43837371468544006,
-1.6952494382858276,
-1.599708080291748,
0.9108760356903076,
0.4214770793914795,
-0.8218550682067871,
0.18072888255119324,
-0.3985122740268707,
0.10366979241371155,
-0.06912408024072647,
1.2251310348510742,
1.2086331844329834,
0.7636497020721436,
-0.347112774848938,
-0.801036536693573,
0.20730717480182648,
0.014887504279613495,
-0.6560768485069275,
-1.837719202041626,
-0.28913456201553345,
0.0922321230173111,
0.5655051469802856,
-1.1869773864746094,
1.5321342945098877,
0.8719412088394165,
1.9444959163665771,
1.0305105447769165,
-0.2033076286315918,
1.4574912786483765,
-0.0352337583899498,
1.958786129951477,
-0.6554819345474243,
0.6308306455612183,
-0.3120650351047516,
-1.0820223093032837,
0.8747509121894836,
-0.40690964460372925,
-2.1563477516174316,
-0.820135772228241,
-0.84909588098526,
-0.18699675798416138,
-0.8180390000343323,
0.9816433191299438,
-0.27822229266166687,
-1.4568336009979248,
0.25781604647636414,
-0.7313202619552612,
0.23164160549640656,
-1.2894576787948608,
0.35774973034858704,
0.7561793923377991,
-0.5625525116920471,
0.1077851876616478,
-0.2482515424489975,
-1.2252740859985352,
-0.5424303412437439,
0.3891621530056,
1.9829165935516357,
-0.8274072408676147,
0.8600756525993347,
0.9667019248008728,
-0.8053030371665955,
0.017427509650588036,
0.3404926657676697,
-0.2056037038564682,
0.8154855370521545,
-1.0365047454833984,
-0.47447964549064636,
1.1161980628967285,
-0.12070571631193161,
-0.6474465131759644,
1.5596035718917847,
0.766543984413147,
-1.0411430597305298,
-0.10508319735527039,
-0.3328212797641754,
-0.9268905520439148,
-0.011810571886599064,
-1.5585980415344238,
-0.22368837893009186,
0.2683742940425873,
-1.5760498046875,
-0.5652994513511658,
-0.2705633044242859,
1.275374174118042,
-0.19407254457473755,
1.2206666469573975,
-0.2554797828197479,
-0.3888843059539795,
-0.1578710973262787,
-0.41579025983810425,
0.16873745620250702,
-0.32831111550331116,
-0.5712348818778992,
0.2454749196767807,
-0.7289751172065735,
0.474608838558197,
1.4430079460144043,
0.3641710579395294,
-0.12166405469179153,
0.5882377028465271,
1.0518840551376343,
0.32680127024650574,
-0.06768480688333511,
-0.8755992650985718,
-1.5619398355484009,
1.9041528701782227,
-1.4880412817001343,
1.892181158065796,
0.586182713508606,
-0.08787445724010468,
-1.6284679174423218,
-1.8954821825027466,
1.3749831914901733,
1.2729241847991943,
2.2365779876708984,
0.7965250611305237,
0.31354185938835144,
-0.9143409132957458,
-0.7864262461662292,
0.2556878626346588,
-1.1348237991333008,
-0.7435814142227173,
0.04401981085538864,
2.3877878189086914,
1.768908143043518,
-0.5744752883911133,
-0.13101866841316223,
-0.9660826325416565,
1.3671573400497437,
-0.1740732192993164,
0.2723347842693329,
2.0650546550750732,
-0.2740553915500641,
-1.1099164485931396,
1.3461580276489258,
-2.3379886150360107,
0.1590481698513031,
2.0334298610687256,
0.4081979990005493,
0.1702190637588501,
-1.492620825767517,
-0.6081174612045288,
-0.2298537641763687,
-0.34005388617515564,
-1.2988479137420654,
0.47074568271636963,
-0.2814878821372986,
-0.7544940114021301,
-1.515638828277588,
0.28280842304229736,
-0.9930277466773987,
-1.5150654315948486,
0.3300883173942566,
2.0139565467834473,
2.0338802337646484,
-0.6736576557159424,
1.586602807044983,
-0.19771163165569305,
0.20729388296604156,
1.3265210390090942,
1.091517448425293,
3.0082571506500244,
1.959046721458435,
-1.1832468509674072,
0.7189193367958069,
-0.1561262458562851,
-0.5305445790290833,
1.2246938943862915,
-1.2005622386932373,
1.2998491525650024,
-0.2554224729537964,
-1.0564504861831665,
-1.3041276931762695,
0.875786542892456,
0.46966129541397095,
-0.02478109672665596,
-0.49799519777297974,
1.1716358661651611,
0.02658568136394024,
1.302851676940918,
0.43524107336997986,
-0.38776886463165283,
0.5871707201004028,
-0.4160937964916229,
-0.444519966840744,
1.609383463859558,
0.2685188949108124,
-1.2733232975006104,
-2.2274131774902344,
-0.18501415848731995,
-0.7522281408309937,
0.143258735537529,
-0.3834408223628998,
-1.0064524412155151,
1.6817498207092285,
0.41124939918518066,
-1.2360156774520874,
-0.26730090379714966,
-0.2105056792497635,
-0.5361332297325134,
2.7288684844970703,
-1.3529458045959473,
-0.27887171506881714,
-1.0149574279785156,
-0.5466382503509521,
1.7527704238891602,
-1.1972323656082153,
-0.20790915191173553,
-0.9532501101493835,
-0.5753079652786255,
-1.3480217456817627,
-0.597017228603363,
0.020074447616934776,
-0.8770158290863037,
1.0003390312194824,
0.18401864171028137,
-1.1946098804473877,
-0.35356977581977844,
-0.8713629245758057,
0.8588850498199463,
-0.15965242683887482,
0.33225101232528687,
1.9350441694259644,
0.32181382179260254,
-0.36961105465888977,
0.7916635274887085,
1.1174767017364502,
0.6399663090705872,
-0.6344929933547974,
0.36727556586265564,
-0.5577311515808105,
0.30710238218307495,
-1.2757865190505981,
0.3222266137599945,
-2.968719720840454,
0.44346949458122253,
0.015021193772554398,
-0.12481407076120377,
-0.011745334602892399,
-1.3521080017089844,
1.1750805377960205,
2.500898599624634,
-1.1781511306762695,
0.5593107342720032,
0.18428218364715576,
1.2131881713867188,
-1.539577603340149,
0.29104211926460266,
-0.3362445831298828,
2.2315940856933594,
0.15240535140037537,
1.1798293590545654,
-0.48033571243286133,
-2.333885431289673,
0.7268788814544678,
-1.2465111017227173,
-1.188132405281067,
0.552429735660553,
-0.9204006195068359,
0.08536311984062195,
-1.612511157989502,
-0.28693926334381104,
-0.9104672074317932,
-1.292432188987732,
0.8272056579589844,
0.26308345794677734,
0.34776243567466736,
-0.64505934715271,
0.36230283975601196,
-2.084163188934326,
-1.447485327720642,
-0.21562379598617554,
-0.9323681592941284,
0.4883275032043457,
-0.43091368675231934,
0.6570072770118713,
-0.1828611195087433,
0.016926076263189316,
0.354856938123703,
1.4892257452011108,
3.298092842102051,
0.1098320260643959,
0.4061432480812073,
-0.05192643404006958,
-0.8557398319244385,
1.412882924079895,
0.9562478065490723,
0.0580730065703392,
-0.4744316339492798,
-1.1133822202682495,
1.2656410932540894,
2.0030767917633057,
0.8778945803642273,
0.03495030850172043,
-0.828564465045929,
-0.6840856075286865,
-0.12317705154418945,
0.25300848484039307,
0.5746747255325317,
0.90045166015625,
0.08300337195396423,
-0.05989670753479004,
1.3920985460281372,
1.145371675491333,
-0.47646692395210266,
0.4167592525482178,
-0.9411574006080627,
-0.4511794149875641,
0.46694043278694153,
0.2887532711029053,
-0.06304240971803665,
0.20528702437877655,
-0.9777843356132507,
-0.11943533271551132,
-0.27178454399108887,
-0.8817501068115234,
-0.8114615082740784,
-0.4063272178173065,
-0.45145338773727417,
1.6738935708999634,
0.07145244628190994,
-0.6321555972099304,
-0.2726186513900757,
-0.7504928112030029,
0.0016829995438456535,
-0.9757446646690369,
0.28662705421447754,
-0.17845377326011658,
-0.18040230870246887,
-0.17217421531677246,
1.7745037078857422,
-0.9784383177757263,
-1.9891915321350098,
0.2554338872432709,
0.5128225088119507,
-0.3635229170322418,
0.2669856548309326,
1.4732942581176758,
0.4902889132499695,
1.5017517805099487,
1.373815894126892,
1.0603262186050415,
-0.6238667368888855,
-1.4349933862686157,
0.5660709142684937,
0.8963302373886108,
-1.3772348165512085,
0.7157180905342102,
0.11782505363225937,
-0.3908657133579254,
0.6029475331306458,
1.3780708312988281,
0.4597361981868744,
-1.9841532707214355,
0.781974732875824,
-0.9411181807518005,
0.7908188700675964,
0.7280679941177368,
0.7246661186218262,
0.2867148816585541,
0.8428491353988647,
-1.2043423652648926,
-1.0970516204833984,
-1.0226649045944214,
-0.6806887984275818,
1.930422306060791,
-0.2984430491924286,
0.5793957710266113,
0.033171601593494415,
-1.302692174911499,
-0.13053323328495026,
0.690694272518158,
0.5267037153244019,
-0.3867242634296417,
0.7885772585868835,
-0.5872292518615723,
-1.1574335098266602,
-1.3437223434448242,
-0.49085766077041626,
-1.0011076927185059,
-0.9234606027603149,
0.950861394405365,
0.9223743081092834,
0.3158411979675293,
1.8646258115768433,
0.6445307731628418,
0.2770822048187256,
-2.5567212104797363,
0.9176855683326721,
0.2565764784812927,
0.03175738453865051,
0.8109626770019531,
0.4059334099292755,
0.9423677921295166,
0.0025659380480647087,
0.49598485231399536,
-2.277231216430664,
2.241997718811035,
-0.23349040746688843,
0.6775355339050293,
0.08643170446157455,
-0.22872118651866913,
1.1152135133743286,
0.5019580721855164,
0.501014769077301,
-1.1480416059494019,
0.610782265663147,
-0.6942681074142456,
1.3431613445281982,
0.9115191102027893,
-0.643112301826477,
-0.06120888888835907,
1.1683082580566406,
0.4203800559043884,
-0.4964298605918884,
-0.9376763701438904,
-0.924697756767273,
0.9087138175964355,
1.6164294481277466,
-0.12811623513698578,
-0.13704434037208557,
0.8460267186164856,
0.7206942439079285,
-1.237260103225708,
0.12228059023618698,
-0.7611627578735352,
-0.6980006694793701,
1.6633235216140747,
2.0699119567871094,
-0.22406166791915894,
-0.20218990743160248,
-0.7800190448760986,
-1.1281030178070068,
0.7243232727050781,
0.075499027967453,
0.015965595841407776,
0.7850821018218994,
-0.5662805438041687,
1.1262882947921753,
0.9084794521331787,
0.8959094882011414,
0.0616627112030983,
0.5019565224647522,
0.4143480062484741,
-0.29803118109703064,
-1.1698776483535767,
-0.3012927174568176,
-1.1352108716964722,
-2.5712997913360596,
0.43815064430236816,
-0.28413715958595276,
-1.2745705842971802,
-0.0037143141962587833,
-1.159325122833252,
0.9891459345817566,
-0.5420229434967041,
-1.1220121383666992,
-1.5162427425384521,
0.1695246696472168,
-0.01524307206273079,
0.8749101758003235,
-1.5833513736724854,
0.04078897833824158,
1.3732662200927734,
0.9181389212608337,
-0.7544858455657959,
1.0247007608413696,
0.2809409201145172,
1.1244544982910156,
0.7988110184669495,
-0.3399435877799988,
0.4664697051048279,
0.07097269594669342,
-1.257905125617981,
0.6422845721244812,
1.1404486894607544,
0.09503144770860672,
1.4583989381790161,
-0.5526690483093262,
-0.03213472664356232,
0.4200040400028229,
-0.645148515701294,
-0.41080671548843384,
-0.579755425453186,
0.735519289970398,
0.05373164266347885,
-0.8641732931137085,
0.1859024167060852,
0.009364552795886993,
-0.11433320492506027,
0.12836116552352905,
-1.5454281568527222,
-0.24003642797470093,
-0.3254289925098419,
-0.5866974592208862,
-1.203568458557129,
-0.06266739964485168,
1.331034779548645,
-0.6503411531448364,
-0.2555423974990845,
0.5994117259979248,
0.3647921681404114,
0.5834389925003052,
0.5588826537132263,
-0.7125917077064514,
-0.30005207657814026,
-0.26042285561561584,
-0.34761250019073486,
0.31664934754371643,
1.2855815887451172,
-0.11426283419132233,
-1.0494812726974487,
0.6734020709991455,
-0.3599894642829895,
-0.10529198497533798,
1.8220577239990234,
0.03633822500705719,
-0.9012534618377686,
0.31752851605415344,
-0.7969305515289307,
1.960118055343628,
1.623876929283142,
1.2211694717407227,
-0.10234639048576355,
-0.9810059070587158,
0.5608927011489868,
-0.2696492373943329,
-0.5179567337036133,
0.8047420382499695,
0.532507598400116,
-0.22600552439689636,
-1.346319556236267,
0.694525420665741,
1.2982510328292847,
-1.017491340637207,
-0.9545298218727112,
0.20185264945030212,
-0.6791450381278992,
1.0222762823104858,
0.7408077716827393,
0.43808844685554504,
0.3341481685638428,
1.6006568670272827,
0.7340934872627258,
-0.42587417364120483,
0.4912757873535156,
0.49451082944869995,
-0.04734598845243454,
-2.026691198348999,
-1.1896682977676392,
0.34087109565734863,
-0.575884997844696,
-1.5210881233215332,
1.4064093828201294,
-1.1683337688446045,
-0.7989064455032349,
0.5918252468109131,
0.27420860528945923,
1.5467880964279175,
0.3569619357585907,
1.5372394323349,
2.013056755065918,
0.8692024350166321,
0.3436536490917206,
1.4296557903289795,
-0.19833283126354218,
-0.6169123649597168,
1.8903709650039673,
-0.5178683996200562,
0.5991517901420593,
1.1614856719970703,
-0.2592321038246155,
-1.0947604179382324,
-0.7754570841789246,
-1.2876085042953491,
-0.6477367877960205,
1.0867990255355835,
0.13891273736953735,
-1.2147002220153809,
0.2506276071071625,
1.5245534181594849,
0.24972091615200043,
-0.31121212244033813,
0.46588581800460815,
0.3832620084285736,
-0.9597108364105225,
-0.08000172674655914,
-0.9908849000930786,
0.4157022535800934,
-0.31624236702919006,
-0.37991493940353394,
0.28801071643829346,
0.3862614333629608,
1.2833588123321533,
-0.07348570972681046,
0.05365857481956482,
1.0438153743743896,
-1.467456579208374,
1.561407446861267,
-0.6953946352005005,
0.3325521945953369,
-2.369671583175659,
1.4415767192840576,
-0.7803230285644531,
1.9664247035980225,
-2.7152516841888428,
0.40841543674468994,
-0.6180883646011353,
-0.4345536231994629,
0.3634396195411682,
-0.323870986700058,
0.14092762768268585,
-0.10359908640384674,
-1.1981253623962402,
0.06820103526115417,
-0.735617458820343,
0.5979682803153992,
1.132546067237854,
1.3498674631118774,
-1.1306910514831543,
-0.29334786534309387,
-1.8510634899139404,
-0.21733525395393372,
-0.7385720014572144,
0.4749903380870819,
-2.08980131149292,
-0.22278304398059845,
-1.8354883193969727,
-2.120368242263794,
-1.1895315647125244,
-0.7983863353729248,
1.053933024406433,
0.0381428524851799,
-0.88008052110672,
1.1411046981811523,
-0.25401800870895386,
-1.7055599689483643,
1.0396685600280762,
-2.076374053955078
] |
https://github.com/huggingface/datasets/issues/4863 | TFDS wiki_dialog dataset to Huggingface dataset | @albertvillanova any help ? The linked dataset is in beam format which is similar to wikipedia dataset in huggingface that you scripted.. | ## Adding a Dataset
- **Name:** *Wiki_dialog*
- **Description: https://github.com/google-research/dialog-inpainting#:~:text=JSON%20object%2C%20for-,example,-%3A
- **Paper: https://arxiv.org/abs/2205.09073
- **Data: https://github.com/google-research/dialog-inpainting
- **Motivation:** *Research and Development on biggest corpus of dialog data*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
| 570 | 22 | TFDS wiki_dialog dataset to Huggingface dataset
## Adding a Dataset
- **Name:** *Wiki_dialog*
- **Description: https://github.com/google-research/dialog-inpainting#:~:text=JSON%20object%2C%20for-,example,-%3A
- **Paper: https://arxiv.org/abs/2205.09073
- **Data: https://github.com/google-research/dialog-inpainting
- **Motivation:** *Research and Development on biggest corpus of dialog data*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
@albertvillanova any help ? The linked dataset is in beam format which is similar to wikipedia dataset in huggingface that you scripted.. | [
-1.1876674890518188,
-1.0125081539154053,
-0.6475015878677368,
1.395538568496704,
-0.2015550285577774,
-1.3431992530822754,
0.06146145984530449,
-0.8745636940002441,
1.6497999429702759,
-0.6929280161857605,
0.27451643347740173,
-1.7955483198165894,
-0.09333281219005585,
-0.5815775394439697,
-0.7248803973197937,
-0.7626740336418152,
-0.3787257671356201,
-0.7540489435195923,
0.9334722757339478,
2.502183675765991,
1.172105073928833,
-1.3581560850143433,
2.7384369373321533,
0.5675126910209656,
-0.26750534772872925,
-1.0098859071731567,
0.5659500956535339,
0.27720510959625244,
-1.2346044778823853,
-0.41128358244895935,
-0.8746265172958374,
-0.08574269711971283,
-0.42000606656074524,
-0.4153507947921753,
0.0889047384262085,
0.4872512221336365,
-0.06472461670637131,
-0.2824748158454895,
-0.4776965081691742,
-0.6597689390182495,
0.5034113526344299,
-0.35037651658058167,
0.8596036434173584,
-0.4279008209705353,
1.7625703811645508,
-0.6736260652542114,
0.2979769706726074,
0.6603238582611084,
1.299506664276123,
0.09175233542919159,
-0.06300614774227142,
0.19900153577327728,
0.3846953809261322,
0.07356071472167969,
0.39605313539505005,
1.1115630865097046,
0.6503082513809204,
0.41280093789100647,
0.6878190636634827,
-2.1726295948028564,
1.4158909320831299,
-0.874994158744812,
0.3815385699272156,
1.4449304342269897,
-1.046493649482727,
0.39105191826820374,
-1.7555716037750244,
-0.16546988487243652,
0.5142780542373657,
-2.27375864982605,
0.2059960514307022,
-1.285027265548706,
-0.7228254675865173,
0.845171332359314,
0.19622492790222168,
-1.215075969696045,
0.250154972076416,
-0.5905008912086487,
1.028394341468811,
0.41192954778671265,
1.1696455478668213,
-1.699614405632019,
-0.09324011206626892,
-0.11559370160102844,
-0.0502488799393177,
-1.3596980571746826,
-1.5780067443847656,
0.6918971538543701,
0.5710204839706421,
0.6964532732963562,
-0.1627645194530487,
0.7591567039489746,
-0.9676746129989624,
0.9419555068016052,
-0.9904690384864807,
-1.6157352924346924,
-1.3190770149230957,
-2.3316538333892822,
-2.3073413372039795,
0.8909814953804016,
-0.4068378210067749,
-0.4749840795993805,
1.9233465194702148,
-0.9709084630012512,
-1.7810217142105103,
1.1133384704589844,
0.25068509578704834,
0.07940556108951569,
2.3149898052215576,
0.26020172238349915,
-0.6734558343887329,
0.42337724566459656,
-0.7861294150352478,
0.8324500322341919,
-0.33485618233680725,
1.401963233947754,
0.5189571380615234,
-1.0375794172286987,
1.4749258756637573,
-0.5437536239624023,
0.4880387783050537,
-0.5591662526130676,
-0.624180018901825,
-0.7999498844146729,
0.3607273995876312,
1.9155349731445312,
-0.30848678946495056,
1.543387532234192,
-0.24542997777462006,
-1.6139112710952759,
-1.3432754278182983,
0.736035943031311,
0.617560625076294,
-0.8541500568389893,
0.06522932648658752,
-0.4246167838573456,
0.08639557659626007,
-0.03477637097239494,
0.9907866716384888,
1.1241869926452637,
0.6725738644599915,
-0.3918740749359131,
-0.8631037473678589,
0.25462281703948975,
-0.10806721448898315,
-0.601557195186615,
-1.9485241174697876,
-0.28902673721313477,
0.2877929210662842,
0.6752780079841614,
-1.349146842956543,
1.6178251504898071,
0.9149401187896729,
2.077648639678955,
0.8794087171554565,
-0.3833082914352417,
1.3786675930023193,
-0.08004140853881836,
1.9124484062194824,
-0.6488856673240662,
0.731490969657898,
-0.3236619830131531,
-1.0496824979782104,
0.8816810250282288,
-0.4672677516937256,
-2.0559000968933105,
-0.7660436034202576,
-0.939683735370636,
-0.2563842535018921,
-0.861900269985199,
0.9654382467269897,
-0.18560926616191864,
-1.3654650449752808,
0.20885023474693298,
-0.7503231167793274,
0.2845344841480255,
-1.2596060037612915,
0.19221048057079315,
0.7841402292251587,
-0.5982885956764221,
-0.20543792843818665,
-0.1817423552274704,
-1.3627417087554932,
-0.5184857249259949,
0.31240585446357727,
1.872196912765503,
-0.713208019733429,
1.0816494226455688,
0.8986117839813232,
-0.700419008731842,
0.24922020733356476,
0.31350767612457275,
-0.3198692798614502,
0.8167394399642944,
-1.1576857566833496,
-0.39255958795547485,
0.9898877143859863,
-0.23846317827701569,
-0.5239050984382629,
1.5536186695098877,
0.8634259104728699,
-0.9718593955039978,
-0.3190077245235443,
-0.25566357374191284,
-0.7574650049209595,
-0.0709814801812172,
-1.5333186388015747,
-0.16432908177375793,
0.150917187333107,
-1.3151148557662964,
-0.5026407241821289,
-0.31247955560684204,
1.3669158220291138,
-0.09671671688556671,
1.3543041944503784,
-0.22213570773601532,
-0.3466673791408539,
-0.570207953453064,
-0.4654974937438965,
0.17287084460258484,
-0.28482142090797424,
-0.626323401927948,
0.2995193898677826,
-0.8918105363845825,
0.2881651818752289,
1.4839507341384888,
0.4508085250854492,
0.0444294698536396,
0.5231170654296875,
1.1411617994308472,
0.2647138833999634,
-0.14418406784534454,
-0.9182024002075195,
-1.6416345834732056,
1.9768329858779907,
-1.5770765542984009,
1.8812031745910645,
0.8056105375289917,
0.02058715745806694,
-1.7603932619094849,
-1.9220795631408691,
1.282598614692688,
1.2636051177978516,
2.396580219268799,
0.6208479404449463,
0.366805762052536,
-0.841676652431488,
-0.6766669750213623,
0.24939654767513275,
-1.1043556928634644,
-0.6772873997688293,
0.08907586336135864,
2.3969242572784424,
1.7871516942977905,
-0.6403498649597168,
-0.09846378862857819,
-1.0610125064849854,
1.3264530897140503,
-0.07974222302436829,
0.12941615283489227,
2.1617448329925537,
-0.2887873649597168,
-1.0280214548110962,
1.3047280311584473,
-2.3075456619262695,
0.18706578016281128,
1.9598158597946167,
0.47207340598106384,
0.09845131635665894,
-1.4074454307556152,
-0.6266139149665833,
-0.3672146797180176,
-0.3873548209667206,
-1.2178757190704346,
0.5801206827163696,
-0.23405778408050537,
-0.9866058230400085,
-1.5132585763931274,
0.06417620182037354,
-1.1711828708648682,
-1.7511183023452759,
0.5432072877883911,
1.7941453456878662,
2.10652494430542,
-0.7804577946662903,
1.3982871770858765,
-0.35465213656425476,
0.09751878678798676,
1.3256124258041382,
1.180855631828308,
3.079359292984009,
1.9899413585662842,
-1.1678367853164673,
0.782791793346405,
-0.1771775633096695,
-0.3888107240200043,
1.161101222038269,
-1.0091016292572021,
1.2007129192352295,
-0.31864452362060547,
-1.273088812828064,
-1.1797981262207031,
1.0780398845672607,
0.5226027965545654,
0.024694141000509262,
-0.6122504472732544,
1.207319736480713,
0.0519801490008831,
1.4679820537567139,
0.6298871636390686,
-0.41347578167915344,
0.5241363644599915,
-0.49184665083885193,
-0.47459471225738525,
1.688751459121704,
0.19321955740451813,
-1.6463062763214111,
-2.49967885017395,
-0.31358492374420166,
-0.8946066498756409,
-0.11899031698703766,
-0.5893862247467041,
-1.107219934463501,
1.6394518613815308,
0.5096551775932312,
-1.297350525856018,
-0.29244309663772583,
-0.2992517948150635,
-0.6104255318641663,
2.5832550525665283,
-1.4986579418182373,
-0.11326561868190765,
-0.9061101078987122,
-0.4372202455997467,
1.6454845666885376,
-1.244144082069397,
-0.18152084946632385,
-1.0476174354553223,
-0.6473354697227478,
-1.3207287788391113,
-0.45469874143600464,
-0.05800534412264824,
-0.9281439781188965,
0.7628977298736572,
-0.14776015281677246,
-1.0823746919631958,
-0.2395750880241394,
-0.9086198210716248,
0.9478464722633362,
-0.14080335199832916,
0.16832740604877472,
1.7993618249893188,
0.4295341372489929,
-0.4294348657131195,
0.6629090309143066,
1.3119628429412842,
0.614998996257782,
-0.8175903558731079,
0.07758991420269012,
-0.7736966013908386,
0.26723021268844604,
-1.3681844472885132,
0.2641295790672302,
-2.8381471633911133,
0.7424449324607849,
-0.053470611572265625,
-0.08614031970500946,
-0.006812466774135828,
-1.3675758838653564,
1.1982671022415161,
2.4702205657958984,
-1.236960530281067,
0.4189157783985138,
0.3330768942832947,
1.184497356414795,
-1.5781406164169312,
0.3658891022205353,
-0.4618315100669861,
2.049245595932007,
0.14090918004512787,
1.1837115287780762,
-0.6199502944946289,
-2.0426619052886963,
0.5986872911453247,
-1.1764692068099976,
-1.011926531791687,
0.6748627424240112,
-0.8310072422027588,
0.22726909816265106,
-1.5372893810272217,
-0.06679652631282806,
-0.9447815418243408,
-1.2745165824890137,
0.7362403869628906,
0.09739883244037628,
0.4055163562297821,
-0.6093496084213257,
0.361063688993454,
-2.171219825744629,
-1.326666235923767,
-0.2615855932235718,
-0.9111848473548889,
0.6164371967315674,
-0.3821052610874176,
0.6552225947380066,
0.04005685821175575,
0.10023149847984314,
0.1937352418899536,
1.2890269756317139,
3.322355031967163,
0.10030481219291687,
0.3428983688354492,
-0.00953339971601963,
-0.9909228086471558,
1.4409141540527344,
1.091196894645691,
0.09863188862800598,
-0.5428791046142578,
-1.000157356262207,
1.3029502630233765,
1.9982144832611084,
1.0787057876586914,
0.15863856673240662,
-0.9513513445854187,
-0.6848968267440796,
0.08696210384368896,
0.2851038873195648,
0.5052407383918762,
1.0071017742156982,
-0.04150744527578354,
0.12978915870189667,
1.4618579149246216,
1.3000338077545166,
-0.37891894578933716,
0.4219597280025482,
-0.962563157081604,
-0.38960301876068115,
0.4564290940761566,
0.28675976395606995,
0.09333349764347076,
0.5413827896118164,
-1.1188712120056152,
-0.32261624932289124,
-0.1820855438709259,
-0.9857857823371887,
-0.763060450553894,
-0.5200042128562927,
-0.5693398714065552,
1.63936448097229,
0.011275939643383026,
-0.4194779098033905,
0.05429070070385933,
-0.6821720004081726,
-0.07329174131155014,
-1.1506186723709106,
0.42604899406433105,
-0.0939595103263855,
0.013211136683821678,
-0.23403191566467285,
1.7954405546188354,
-0.9186281561851501,
-2.1446690559387207,
0.3624189496040344,
0.36934125423431396,
-0.5871803164482117,
-0.030377469956874847,
1.5624327659606934,
0.5856024026870728,
1.4191975593566895,
1.2020246982574463,
1.0759683847427368,
-0.5547260642051697,
-1.359358549118042,
0.6079357862472534,
0.9692012071609497,
-1.410058856010437,
0.815223753452301,
-0.111574187874794,
-0.46589478850364685,
0.7974138855934143,
1.4805341958999634,
0.31375110149383545,
-1.9595041275024414,
0.805782675743103,
-0.8593739867210388,
0.8433648943901062,
0.7582048177719116,
0.848737895488739,
0.21881969273090363,
0.8152163624763489,
-1.4635777473449707,
-1.0187724828720093,
-0.8702126741409302,
-0.5203399062156677,
1.9389405250549316,
-0.1659001111984253,
0.4197196662425995,
-0.2708643078804016,
-1.1328580379486084,
-0.0876663327217102,
0.781597375869751,
0.36654385924339294,
-0.2837381064891815,
0.8319880366325378,
-0.5458347797393799,
-0.9339982867240906,
-1.212934136390686,
-0.4221356213092804,
-0.7705214023590088,
-0.9443998336791992,
1.0070890188217163,
0.9129282236099243,
0.5531356334686279,
1.8867582082748413,
0.5164770483970642,
0.2717950940132141,
-2.563084840774536,
0.9282801151275635,
0.26375848054885864,
0.022197909653186798,
0.9733375310897827,
0.22212255001068115,
1.3051623106002808,
0.060220684856176376,
0.5248457789421082,
-2.317969799041748,
2.0998194217681885,
-0.16166959702968597,
0.6574987173080444,
0.04056558758020401,
-0.09991846978664398,
1.1530606746673584,
0.4792167842388153,
0.4920854866504669,
-1.1302746534347534,
0.7620443105697632,
-0.595919668674469,
1.1148349046707153,
0.8815784454345703,
-0.713035523891449,
0.06497852504253387,
1.256301999092102,
0.5730483531951904,
-0.4123876392841339,
-0.9829662442207336,
-0.7877641916275024,
1.0371630191802979,
1.748680591583252,
-0.1384207308292389,
0.08824488520622253,
0.8359221816062927,
0.6603520512580872,
-1.3212777376174927,
-0.012094509787857533,
-0.7350364923477173,
-0.504067599773407,
1.6811888217926025,
1.9984960556030273,
0.013586923480033875,
-0.13676570355892181,
-0.7270569205284119,
-1.2324165105819702,
0.7267026901245117,
0.021106239408254623,
0.14678089320659637,
0.8607804775238037,
-0.6555408239364624,
1.105882167816162,
0.6257081031799316,
0.963077962398529,
-0.042763419449329376,
0.41918259859085083,
0.32033994793891907,
-0.2753598988056183,
-1.1768935918807983,
-0.40569621324539185,
-1.2201507091522217,
-2.5592048168182373,
0.4447552263736725,
-0.3840996026992798,
-1.3894217014312744,
-0.023880761116743088,
-1.1359246969223022,
0.9542527198791504,
-0.6952556371688843,
-1.1931687593460083,
-1.649780511856079,
0.2665560841560364,
-0.16464102268218994,
1.0056110620498657,
-1.5966941118240356,
-0.11496734619140625,
1.242793321609497,
0.7701224088668823,
-0.5208970904350281,
1.0201077461242676,
0.23346304893493652,
1.0191236734390259,
0.7375967502593994,
-0.35128453373908997,
0.43138885498046875,
0.17470870912075043,
-1.3639661073684692,
0.5679206848144531,
1.2170487642288208,
0.2785869538784027,
1.307110071182251,
-0.5459368824958801,
0.12945717573165894,
0.5561730861663818,
-0.47893431782722473,
-0.5691978931427002,
-0.5028773546218872,
0.7429946064949036,
0.15382733941078186,
-1.076353669166565,
0.06281928718090057,
-0.1750551015138626,
-0.17982740700244904,
0.3283451497554779,
-1.3730021715164185,
-0.3705315589904785,
-0.3829595446586609,
-0.508350670337677,
-1.281714677810669,
0.0072081200778484344,
1.223649501800537,
-0.7708706259727478,
-0.07758338749408722,
0.5998920798301697,
0.413041353225708,
0.6322838068008423,
0.6992825269699097,
-0.6595847010612488,
-0.2878565490245819,
-0.31086963415145874,
-0.22020117938518524,
0.21464617550373077,
1.2225948572158813,
-0.15069349110126495,
-1.0704350471496582,
0.7448399066925049,
-0.4463443160057068,
0.21979092061519623,
2.11271071434021,
0.015032961964607239,
-0.8931124210357666,
0.39590153098106384,
-0.7592958807945251,
1.8395158052444458,
1.5034631490707397,
1.3668605089187622,
-0.07419422268867493,
-0.8275452852249146,
0.43786898255348206,
-0.10267181694507599,
-0.33637818694114685,
0.8817645311355591,
0.589199960231781,
-0.18162822723388672,
-1.434840440750122,
0.5695029497146606,
1.3816957473754883,
-0.9975454807281494,
-0.7518348097801208,
0.20342162251472473,
-0.8902279734611511,
1.1467726230621338,
0.584568977355957,
0.4688985347747803,
0.32678383588790894,
1.4817471504211426,
0.5798927545547485,
-0.46140673756599426,
0.3888390362262726,
0.5030012130737305,
-0.1598539799451828,
-2.0228312015533447,
-1.0887281894683838,
0.2368064671754837,
-0.4463343620300293,
-1.5078868865966797,
1.3291521072387695,
-1.221983551979065,
-0.8933917284011841,
0.542751669883728,
0.25400176644325256,
1.4249340295791626,
0.33274444937705994,
1.7369022369384766,
2.039316415786743,
0.9018552303314209,
0.22561997175216675,
1.4520647525787354,
-0.043934501707553864,
-0.4706277549266815,
1.7802631855010986,
-0.3876863420009613,
0.5772002339363098,
0.9719078540802002,
-0.43727242946624756,
-1.1977927684783936,
-0.838805615901947,
-1.0995051860809326,
-0.5415055155754089,
1.0997470617294312,
0.2221461534500122,
-1.2220505475997925,
0.12447676062583923,
1.4768348932266235,
0.1707482635974884,
-0.2751195728778839,
0.524052619934082,
0.3296731114387512,
-0.7379394769668579,
-0.051990412175655365,
-1.073794960975647,
0.4147511422634125,
-0.08610090613365173,
-0.28709644079208374,
0.20723144710063934,
0.6536431908607483,
1.17758047580719,
0.052615899592638016,
0.14946037530899048,
1.244882345199585,
-1.3131208419799805,
1.4875260591506958,
-0.5437890887260437,
0.270712286233902,
-2.4217498302459717,
1.4385255575180054,
-0.7747591733932495,
1.8370999097824097,
-2.7665696144104004,
0.3303166627883911,
-0.5495795607566833,
-0.37663087248802185,
0.19759733974933624,
-0.3175842761993408,
0.15518201887607574,
-0.07781974971294403,
-1.0355035066604614,
-0.020535536110401154,
-0.8706377148628235,
0.5361273884773254,
1.3331575393676758,
1.3907009363174438,
-1.1536647081375122,
-0.22246606647968292,
-1.8046950101852417,
-0.22154366970062256,
-0.8331330418586731,
0.3400946259498596,
-2.0563719272613525,
-0.014355998486280441,
-1.8208802938461304,
-2.267916440963745,
-1.4329818487167358,
-1.0040117502212524,
0.992647647857666,
0.26601994037628174,
-0.9838005304336548,
0.9386175870895386,
-0.3827660083770752,
-1.5879374742507935,
1.0651448965072632,
-2.243720054626465
] |
https://github.com/huggingface/datasets/issues/4863 | TFDS wiki_dialog dataset to Huggingface dataset | Nvm, I was able to port it to huggingface datasets, will upload to the hub soon | ## Adding a Dataset
- **Name:** *Wiki_dialog*
- **Description: https://github.com/google-research/dialog-inpainting#:~:text=JSON%20object%2C%20for-,example,-%3A
- **Paper: https://arxiv.org/abs/2205.09073
- **Data: https://github.com/google-research/dialog-inpainting
- **Motivation:** *Research and Development on biggest corpus of dialog data*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
| 570 | 16 | TFDS wiki_dialog dataset to Huggingface dataset
## Adding a Dataset
- **Name:** *Wiki_dialog*
- **Description: https://github.com/google-research/dialog-inpainting#:~:text=JSON%20object%2C%20for-,example,-%3A
- **Paper: https://arxiv.org/abs/2205.09073
- **Data: https://github.com/google-research/dialog-inpainting
- **Motivation:** *Research and Development on biggest corpus of dialog data*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
Nvm, I was able to port it to huggingface datasets, will upload to the hub soon | [
-1.1743614673614502,
-1.0045347213745117,
-0.6909498572349548,
1.3879343271255493,
-0.2106856405735016,
-1.339707374572754,
0.03822043165564537,
-0.868290364742279,
1.605981707572937,
-0.6651937961578369,
0.3292754590511322,
-1.78602135181427,
-0.08250035345554352,
-0.597173273563385,
-0.7343311309814453,
-0.7807936072349548,
-0.3773161470890045,
-0.7565876245498657,
0.9262461066246033,
2.510753631591797,
1.1078490018844604,
-1.3649131059646606,
2.7350025177001953,
0.565104603767395,
-0.22518131136894226,
-1.0271891355514526,
0.5992940068244934,
0.25964727997779846,
-1.214046835899353,
-0.4299662113189697,
-0.8462737798690796,
-0.10472981631755829,
-0.44800519943237305,
-0.38640689849853516,
0.10201287269592285,
0.49552974104881287,
-0.042629122734069824,
-0.2646911144256592,
-0.4961996078491211,
-0.6876152753829956,
0.5222281217575073,
-0.3749181926250458,
0.8444764614105225,
-0.45863306522369385,
1.7389802932739258,
-0.6485947370529175,
0.29341748356819153,
0.6364662647247314,
1.3327840566635132,
0.10567140579223633,
-0.03233523666858673,
0.21020162105560303,
0.3989681601524353,
0.04546206071972847,
0.3871270716190338,
1.0690407752990723,
0.6620917320251465,
0.4542061984539032,
0.6660519242286682,
-2.1569230556488037,
1.4141991138458252,
-0.8410991430282593,
0.38743650913238525,
1.4799275398254395,
-1.027267336845398,
0.3796350955963135,
-1.770713448524475,
-0.17610107362270355,
0.5059320330619812,
-2.278301954269409,
0.23990894854068756,
-1.240490436553955,
-0.6965638399124146,
0.8592718839645386,
0.2062227576971054,
-1.2555605173110962,
0.24926279485225677,
-0.5801528096199036,
1.011262059211731,
0.37017586827278137,
1.15525221824646,
-1.680010199546814,
-0.05949229374527931,
-0.10710957646369934,
-0.07215190678834915,
-1.3600329160690308,
-1.561614751815796,
0.6773426532745361,
0.5412081480026245,
0.6822667121887207,
-0.16491596400737762,
0.7541526556015015,
-0.9753944277763367,
0.9282070398330688,
-0.9691452980041504,
-1.6373666524887085,
-1.3223021030426025,
-2.3373866081237793,
-2.3364365100860596,
0.9128914475440979,
-0.3799431622028351,
-0.4635237157344818,
1.9052835702896118,
-0.9762096405029297,
-1.756335735321045,
1.112654209136963,
0.2665746212005615,
0.07973922789096832,
2.337897300720215,
0.25933969020843506,
-0.6442285180091858,
0.45389220118522644,
-0.7819305658340454,
0.8747931718826294,
-0.35983848571777344,
1.4211030006408691,
0.5153949856758118,
-1.0365592241287231,
1.5059670209884644,
-0.5336844325065613,
0.4896739423274994,
-0.5762354135513306,
-0.6103792190551758,
-0.8235721588134766,
0.38066643476486206,
1.9276899099349976,
-0.29249268770217896,
1.560559868812561,
-0.27492082118988037,
-1.6109949350357056,
-1.325416088104248,
0.7667105197906494,
0.6186598539352417,
-0.8598776459693909,
0.05832253769040108,
-0.4141526222229004,
0.09609326720237732,
-0.031058546155691147,
1.0030227899551392,
1.111660361289978,
0.6601914167404175,
-0.39800551533699036,
-0.8716620206832886,
0.2644836902618408,
-0.10970170795917511,
-0.6247550845146179,
-1.9507359266281128,
-0.2939607799053192,
0.2587585151195526,
0.672400176525116,
-1.3360767364501953,
1.6522599458694458,
0.9092241525650024,
2.091240644454956,
0.8874144554138184,
-0.3970317542552948,
1.3271538019180298,
-0.09187677502632141,
1.9490036964416504,
-0.6529099941253662,
0.7170020341873169,
-0.33517515659332275,
-1.0719695091247559,
0.8745216131210327,
-0.4611086845397949,
-2.0714032649993896,
-0.7627087235450745,
-0.9215291142463684,
-0.2592708468437195,
-0.8650094270706177,
0.9869167804718018,
-0.21512740850448608,
-1.3469740152359009,
0.19210392236709595,
-0.7418035268783569,
0.29077082872390747,
-1.2747383117675781,
0.17836695909500122,
0.7816715240478516,
-0.6074694991111755,
-0.2048213928937912,
-0.21057885885238647,
-1.3371102809906006,
-0.5426937937736511,
0.33033350110054016,
1.8735783100128174,
-0.721182644367218,
1.1208124160766602,
0.8734537959098816,
-0.7082496881484985,
0.2070898413658142,
0.3471982181072235,
-0.3454689681529999,
0.8170714378356934,
-1.174747347831726,
-0.45354920625686646,
0.9829413294792175,
-0.2448466718196869,
-0.5164795517921448,
1.5415480136871338,
0.8826977610588074,
-0.9816487431526184,
-0.30709531903266907,
-0.24447238445281982,
-0.7387534976005554,
-0.0417359434068203,
-1.5445125102996826,
-0.15068493783473969,
0.17614133656024933,
-1.3383071422576904,
-0.531266450881958,
-0.2919429540634155,
1.2907391786575317,
-0.11538492143154144,
1.3472038507461548,
-0.22291237115859985,
-0.35686182975769043,
-0.5625892281532288,
-0.4922555685043335,
0.16397005319595337,
-0.24795876443386078,
-0.6443180441856384,
0.33715102076530457,
-0.8800926208496094,
0.3395673334598541,
1.4738695621490479,
0.4348830580711365,
0.023088548332452774,
0.5529224276542664,
1.1271733045578003,
0.27909162640571594,
-0.14643527567386627,
-0.9555283784866333,
-1.6431620121002197,
1.9913934469223022,
-1.5837347507476807,
1.8965437412261963,
0.8409002423286438,
0.01522885076701641,
-1.7311534881591797,
-1.8420982360839844,
1.2942278385162354,
1.258851170539856,
2.4059970378875732,
0.6388441920280457,
0.36025136709213257,
-0.8508466482162476,
-0.7014064192771912,
0.2304297685623169,
-1.1048569679260254,
-0.6987501382827759,
0.0850396603345871,
2.3881943225860596,
1.8085730075836182,
-0.6360612511634827,
-0.09567272663116455,
-1.0731178522109985,
1.3143359422683716,
-0.10041217505931854,
0.15262115001678467,
2.1345009803771973,
-0.28909140825271606,
-1.0621401071548462,
1.3036285638809204,
-2.315652370452881,
0.2343645691871643,
1.972477912902832,
0.4717617928981781,
0.10190449655056,
-1.4044406414031982,
-0.6174067854881287,
-0.3668660819530487,
-0.3474544286727905,
-1.2217563390731812,
0.5908927321434021,
-0.2165362685918808,
-0.9700285196304321,
-1.4845967292785645,
0.05830429121851921,
-1.1768821477890015,
-1.7286367416381836,
0.5776525139808655,
1.7863050699234009,
2.1444895267486572,
-0.7353606224060059,
1.389712929725647,
-0.35946881771087646,
0.06183398887515068,
1.3187187910079956,
1.1708112955093384,
3.0885109901428223,
1.9417775869369507,
-1.169711709022522,
0.781933069229126,
-0.19214235246181488,
-0.39186331629753113,
1.1712266206741333,
-0.9528477191925049,
1.19101083278656,
-0.3109210431575775,
-1.2527446746826172,
-1.195084810256958,
1.0524951219558716,
0.4954095780849457,
0.017822111025452614,
-0.604178249835968,
1.1863073110580444,
0.05645240470767021,
1.4339083433151245,
0.6293721199035645,
-0.3974584639072418,
0.49679139256477356,
-0.45944005250930786,
-0.4673020541667938,
1.714701533317566,
0.17535538971424103,
-1.6561349630355835,
-2.4969992637634277,
-0.29161757230758667,
-0.8789247274398804,
-0.10744047164916992,
-0.6383311152458191,
-1.1043517589569092,
1.611738920211792,
0.5106155872344971,
-1.2993355989456177,
-0.2995205223560333,
-0.319221168756485,
-0.6601601243019104,
2.577981472015381,
-1.5164821147918701,
-0.11242185533046722,
-0.9068267941474915,
-0.4633621275424957,
1.6210176944732666,
-1.258741021156311,
-0.19114533066749573,
-1.0499829053878784,
-0.6378106474876404,
-1.2914271354675293,
-0.41800934076309204,
-0.022886184975504875,
-0.9789071679115295,
0.7905810475349426,
-0.1890762448310852,
-1.0876541137695312,
-0.21760205924510956,
-0.9094722270965576,
0.9242238402366638,
-0.127221941947937,
0.17872688174247742,
1.7573391199111938,
0.44108065962791443,
-0.4068230390548706,
0.6763678789138794,
1.3354047536849976,
0.6369813680648804,
-0.8236434459686279,
0.07423000037670135,
-0.7490017414093018,
0.27278125286102295,
-1.3493008613586426,
0.27949345111846924,
-2.8240675926208496,
0.7702577710151672,
-0.05346111208200455,
-0.09544773399829865,
-0.0023305509239435196,
-1.3489810228347778,
1.196478009223938,
2.439727306365967,
-1.2759407758712769,
0.4428115487098694,
0.3232148587703705,
1.1442590951919556,
-1.589436411857605,
0.3338575065135956,
-0.4287480115890503,
2.0218255519866943,
0.13067804276943207,
1.1426218748092651,
-0.6521175503730774,
-2.0197465419769287,
0.6284286975860596,
-1.194372534751892,
-0.9961063265800476,
0.654552161693573,
-0.787729024887085,
0.21110974252223969,
-1.5335960388183594,
-0.06734295189380646,
-0.9716826677322388,
-1.296884298324585,
0.7323170304298401,
0.07879546284675598,
0.39650958776474,
-0.5863970518112183,
0.35155370831489563,
-2.1992392539978027,
-1.3602627515792847,
-0.26503485441207886,
-0.9208678007125854,
0.6135169863700867,
-0.4071139395236969,
0.6587854623794556,
0.055228475481271744,
0.0711754709482193,
0.18106040358543396,
1.317573070526123,
3.3584694862365723,
0.07928739488124847,
0.36066314578056335,
-0.01950451359152794,
-0.9961748123168945,
1.4684882164001465,
1.094257116317749,
0.160774365067482,
-0.5822061896324158,
-0.9643502831459045,
1.3279457092285156,
2.0111896991729736,
1.0826412439346313,
0.1567591279745102,
-0.9601412415504456,
-0.6515995860099792,
0.04361816495656967,
0.2825656831264496,
0.5125959515571594,
1.0236824750900269,
-0.04854744300246239,
0.14399828016757965,
1.421157956123352,
1.2921042442321777,
-0.39217400550842285,
0.38973674178123474,
-0.9242013692855835,
-0.36266815662384033,
0.47250184416770935,
0.2614322304725647,
0.08905380964279175,
0.5208698511123657,
-1.121865153312683,
-0.2934914827346802,
-0.18425998091697693,
-1.0178706645965576,
-0.7572765350341797,
-0.5152141451835632,
-0.5892198085784912,
1.6320445537567139,
-0.013669950887560844,
-0.4154275953769684,
0.051683973520994186,
-0.685782790184021,
-0.08222855627536774,
-1.1538708209991455,
0.38086995482444763,
-0.08393378555774689,
0.004828518256545067,
-0.2626316249370575,
1.8007134199142456,
-0.9339657425880432,
-2.195173740386963,
0.3276265859603882,
0.38567298650741577,
-0.6014037132263184,
-0.035360898822546005,
1.5964434146881104,
0.5614851713180542,
1.4031810760498047,
1.2194080352783203,
1.0417181253433228,
-0.5875729322433472,
-1.3550026416778564,
0.6118882894515991,
1.0055079460144043,
-1.4080865383148193,
0.8223422765731812,
-0.1142331063747406,
-0.4618266224861145,
0.8274765610694885,
1.4548572301864624,
0.34528571367263794,
-1.9739845991134644,
0.7813633680343628,
-0.8981357216835022,
0.8786168098449707,
0.7634146809577942,
0.8293682932853699,
0.234548419713974,
0.8498935103416443,
-1.4715346097946167,
-0.9925509691238403,
-0.8648871183395386,
-0.5177395939826965,
1.934055209159851,
-0.1410032957792282,
0.4223381578922272,
-0.25655484199523926,
-1.1091097593307495,
-0.11010478436946869,
0.7893229722976685,
0.38585367798805237,
-0.284212589263916,
0.8024375438690186,
-0.562061607837677,
-0.9497213959693909,
-1.226030945777893,
-0.4149509072303772,
-0.7736924290657043,
-0.9313052296638489,
1.029165267944336,
0.8909932971000671,
0.542298436164856,
1.912437081336975,
0.5489205718040466,
0.25000080466270447,
-2.56602144241333,
0.927407443523407,
0.2499498575925827,
0.006947312504053116,
1.0074535608291626,
0.24768416583538055,
1.3166011571884155,
0.07085426151752472,
0.5503851771354675,
-2.347368001937866,
2.1197938919067383,
-0.17495854198932648,
0.6382530927658081,
0.04548177495598793,
-0.07283999025821686,
1.193955659866333,
0.508739709854126,
0.4675671458244324,
-1.1390920877456665,
0.7666292190551758,
-0.5946999788284302,
1.1204020977020264,
0.8706756830215454,
-0.7149769067764282,
0.059052955359220505,
1.2637877464294434,
0.5432392358779907,
-0.40454554557800293,
-1.028558373451233,
-0.752849280834198,
1.0357359647750854,
1.778835415840149,
-0.13282324373722076,
0.07190297544002533,
0.8171663880348206,
0.6335788369178772,
-1.3291267156600952,
-0.003472818061709404,
-0.6782405972480774,
-0.5277471542358398,
1.6701315641403198,
1.9715670347213745,
0.00004315841943025589,
-0.1266188621520996,
-0.707427978515625,
-1.2474411725997925,
0.7080137729644775,
0.04369257390499115,
0.14630894362926483,
0.8671345710754395,
-0.6508575677871704,
1.1080960035324097,
0.6575363874435425,
0.9451329112052917,
-0.03951745480298996,
0.3823106586933136,
0.3500235974788666,
-0.29928696155548096,
-1.1650168895721436,
-0.447214275598526,
-1.2566814422607422,
-2.571682929992676,
0.4581868648529053,
-0.4012758135795593,
-1.4066781997680664,
-0.0515015609562397,
-1.1516196727752686,
0.9664093852043152,
-0.6947593688964844,
-1.162227749824524,
-1.6538344621658325,
0.2876528203487396,
-0.15259915590286255,
1.0167714357376099,
-1.619784951210022,
-0.146246537566185,
1.2302839756011963,
0.7466678023338318,
-0.5063455104827881,
1.0203906297683716,
0.2055346518754959,
0.9905339479446411,
0.7048783302307129,
-0.3479015529155731,
0.4244212806224823,
0.1931380182504654,
-1.364835262298584,
0.5886638164520264,
1.2091331481933594,
0.24615968763828278,
1.2778126001358032,
-0.5025648474693298,
0.14768993854522705,
0.5282214879989624,
-0.4768558442592621,
-0.6004650592803955,
-0.4892423748970032,
0.7442973852157593,
0.1439172476530075,
-1.073660135269165,
0.06736187636852264,
-0.17997190356254578,
-0.17007631063461304,
0.32141751050949097,
-1.371057152748108,
-0.41352134943008423,
-0.4197428226470947,
-0.4990845024585724,
-1.285482406616211,
-0.008346223272383213,
1.2119061946868896,
-0.7633521556854248,
-0.08454039692878723,
0.6279778480529785,
0.4390432834625244,
0.6448526382446289,
0.6716855764389038,
-0.6745906472206116,
-0.3057287037372589,
-0.31506627798080444,
-0.20648597180843353,
0.18380708992481232,
1.226982593536377,
-0.16150249540805817,
-1.0753875970840454,
0.7448908090591431,
-0.4300573766231537,
0.22892631590366364,
2.1156466007232666,
0.00649246945977211,
-0.8963112235069275,
0.4088793992996216,
-0.7405146360397339,
1.8640323877334595,
1.4776676893234253,
1.3533004522323608,
-0.09608584642410278,
-0.7907392978668213,
0.4426168203353882,
-0.07139676809310913,
-0.33615705370903015,
0.8618971109390259,
0.561913788318634,
-0.197745680809021,
-1.4653207063674927,
0.581111490726471,
1.3996105194091797,
-0.9591014981269836,
-0.7904542684555054,
0.21775083243846893,
-0.925979733467102,
1.1393684148788452,
0.5650805234909058,
0.4883323013782501,
0.3334091305732727,
1.4652608633041382,
0.5583575963973999,
-0.46464455127716064,
0.3999132215976715,
0.47136035561561584,
-0.18381139636039734,
-2.002601146697998,
-1.0901830196380615,
0.2290298491716385,
-0.4333551824092865,
-1.4893412590026855,
1.3310116529464722,
-1.2019387483596802,
-0.8778911232948303,
0.6012991070747375,
0.26928284764289856,
1.43143892288208,
0.3524227738380432,
1.736452341079712,
2.0035369396209717,
0.8902419805526733,
0.23491215705871582,
1.4382933378219604,
-0.04513422027230263,
-0.4738338887691498,
1.8140087127685547,
-0.37942227721214294,
0.5814082026481628,
1.0084649324417114,
-0.42556291818618774,
-1.193190574645996,
-0.8068913817405701,
-1.072510838508606,
-0.5465705394744873,
1.1116671562194824,
0.24163345992565155,
-1.2098833322525024,
0.10290206968784332,
1.4870498180389404,
0.1876257210969925,
-0.23448026180267334,
0.5317257046699524,
0.35662296414375305,
-0.7446472644805908,
-0.025630401447415352,
-1.0727745294570923,
0.408922016620636,
-0.09890273213386536,
-0.2687391936779022,
0.22198036313056946,
0.680815577507019,
1.1931159496307373,
0.03723042085766792,
0.126815527677536,
1.2127357721328735,
-1.3213058710098267,
1.500449538230896,
-0.539135754108429,
0.278301864862442,
-2.4165141582489014,
1.4339573383331299,
-0.7226463556289673,
1.8339210748672485,
-2.740527868270874,
0.30100885033607483,
-0.5857075452804565,
-0.395637184381485,
0.18914617598056793,
-0.3092275559902191,
0.17386171221733093,
-0.08261969685554504,
-1.0406101942062378,
-0.017088815569877625,
-0.8706164956092834,
0.5360494256019592,
1.3767235279083252,
1.3691142797470093,
-1.1235096454620361,
-0.23989100754261017,
-1.811687707901001,
-0.19929379224777222,
-0.8054079413414001,
0.32798898220062256,
-2.0564193725585938,
-0.029142990708351135,
-1.8111085891723633,
-2.225382089614868,
-1.4372920989990234,
-0.9844897985458374,
1.0135585069656372,
0.2898753881454468,
-0.9554218649864197,
0.9704967737197876,
-0.397307425737381,
-1.5718306303024292,
1.0387537479400635,
-2.286724328994751
] |
https://github.com/huggingface/datasets/issues/4862 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code | Hi hi, instead of using `download_and_extract` function, I only use `download` function: `base_dir = Path(dl_manager.download(urls))`. It turns out that the code works for `datasets==2.2.2`, however, it doesn't work with `datasets==2.4.0`. | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
| 571 | 30 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
Hi hi, instead of using `download_and_extract` function, I only use `download` function: `base_dir = Path(dl_manager.download(urls))`. It turns out that the code works for `datasets==2.2.2`, however, it doesn't work with `datasets==2.4.0`. | [
-1.253296136856079,
-0.9126898646354675,
-0.6568876504898071,
1.4803348779678345,
-0.16987846791744232,
-1.1167373657226562,
0.17479801177978516,
-1.1394572257995605,
1.506750464439392,
-0.8051154017448425,
0.27674582600593567,
-1.59161376953125,
-0.05443645641207695,
-0.5382506847381592,
-0.6629936099052429,
-0.9528822302818298,
-0.42090731859207153,
-0.6956269145011902,
1.1023894548416138,
2.4810240268707275,
1.3796719312667847,
-1.2690436840057373,
2.770026683807373,
0.7667846083641052,
-0.06857726722955704,
-0.9251874089241028,
0.6549254655838013,
0.033550020307302475,
-1.2609604597091675,
-0.4082512855529785,
-0.9493147730827332,
-0.14193539321422577,
-0.4796518087387085,
-0.3666529059410095,
-0.08509648591279984,
0.4938839375972748,
-0.4457423985004425,
-0.45210161805152893,
-0.6961650848388672,
-0.7984670400619507,
0.43396803736686707,
-0.39129799604415894,
0.9141614437103271,
-0.40411514043807983,
1.8477603197097778,
-0.5966731309890747,
0.47750937938690186,
0.727944552898407,
1.1147925853729248,
0.32822051644325256,
0.0988977923989296,
0.27478134632110596,
0.36294975876808167,
-0.07562453299760818,
0.5621953010559082,
1.2582653760910034,
0.6737195253372192,
0.53765469789505,
0.790194034576416,
-2.1121792793273926,
1.2400939464569092,
-1.0578923225402832,
0.25436413288116455,
1.4672828912734985,
-0.8035778403282166,
0.46694695949554443,
-1.8080666065216064,
-0.06555741280317307,
0.5451071858406067,
-2.276102066040039,
0.39141061902046204,
-1.3236095905303955,
-0.602013111114502,
0.9859125018119812,
0.38723263144493103,
-1.1321959495544434,
0.12849262356758118,
-0.47276389598846436,
0.9750926494598389,
0.4077703058719635,
1.0880497694015503,
-1.6393005847930908,
-0.06891418248414993,
-0.2568214237689972,
0.08345973491668701,
-1.293639063835144,
-1.5752919912338257,
0.6113032102584839,
0.5259910821914673,
0.5741018056869507,
-0.11069171875715256,
1.1295135021209717,
-1.0818355083465576,
0.7594508528709412,
-1.0086060762405396,
-1.619336485862732,
-1.4876104593276978,
-2.3604609966278076,
-2.2161881923675537,
0.6901252865791321,
-0.4807244837284088,
-0.6039971709251404,
2.082937002182007,
-1.0304137468338013,
-1.5615118741989136,
1.0970758199691772,
0.27974116802215576,
0.06683202087879181,
2.5031256675720215,
0.24779164791107178,
-0.7515104413032532,
0.4756849408149719,
-0.7729387283325195,
0.7196414470672607,
-0.28512248396873474,
1.2831335067749023,
0.4461726248264313,
-1.0133767127990723,
1.5859586000442505,
-0.38877829909324646,
0.6899599432945251,
-0.5978924036026001,
-0.5221360325813293,
-0.7510809898376465,
0.24450278282165527,
1.8471027612686157,
-0.21129480004310608,
1.5535892248153687,
-0.24412885308265686,
-1.582451581954956,
-1.674163579940796,
0.8900859951972961,
0.4157591164112091,
-0.7256417274475098,
0.058594606816768646,
-0.41939860582351685,
0.1067427396774292,
-0.09484896808862686,
1.2119224071502686,
1.340372085571289,
0.7445563673973083,
-0.40228933095932007,
-0.8364371061325073,
0.039181120693683624,
-0.08426451683044434,
-0.7960355877876282,
-1.6389458179473877,
-0.30305466055870056,
0.15987887978553772,
0.5522024631500244,
-1.2403409481048584,
1.7273023128509521,
0.9847233891487122,
1.8428417444229126,
0.97890704870224,
-0.4084063768386841,
1.4387048482894897,
0.0784708708524704,
1.6866511106491089,
-0.5783265829086304,
0.6046293377876282,
-0.2885037064552307,
-1.2040883302688599,
0.8628702163696289,
-0.25645536184310913,
-2.006528854370117,
-0.9111247658729553,
-0.7331985235214233,
-0.12013818323612213,
-0.7328178882598877,
0.9418691396713257,
-0.2990097999572754,
-1.4336949586868286,
0.21258091926574707,
-0.7743727564811707,
0.027753684669733047,
-1.2890511751174927,
0.3310898244380951,
0.6502978205680847,
-0.677954375743866,
0.035413917154073715,
-0.09327933937311172,
-1.2069146633148193,
-0.4177582859992981,
0.2504974901676178,
1.9634253978729248,
-0.6303500533103943,
0.8159162402153015,
1.0992000102996826,
-0.8163162469863892,
0.06893882900476456,
0.22889040410518646,
-0.37784555554389954,
0.8421657085418701,
-1.0831575393676758,
-0.5461742877960205,
1.2366461753845215,
-0.21183277666568756,
-0.6369394659996033,
1.4876797199249268,
0.6975578665733337,
-1.0335588455200195,
-0.2727079689502716,
-0.07585801929235458,
-0.8564610481262207,
0.03117937594652176,
-1.4688926935195923,
-0.16840429604053497,
0.4861074388027191,
-1.5290106534957886,
-0.5117393136024475,
-0.19878330826759338,
1.3040066957473755,
-0.23633906245231628,
1.4525171518325806,
-0.3864612877368927,
-0.1699233502149582,
-0.29699674248695374,
-0.3657999038696289,
0.09470066428184509,
-0.22965680062770844,
-0.6533419489860535,
0.11151605099439621,
-0.9067264199256897,
0.23274822533130646,
1.4322377443313599,
0.3558287024497986,
0.025628279894590378,
0.5259848833084106,
1.1229538917541504,
0.4642435610294342,
-0.14431679248809814,
-0.8620559573173523,
-1.4722627401351929,
1.835591435432434,
-1.4137662649154663,
2.0082154273986816,
0.7499880790710449,
-0.06355929374694824,
-1.784207820892334,
-1.8885407447814941,
1.249007225036621,
1.163398265838623,
2.3511555194854736,
0.44990918040275574,
0.4163707196712494,
-0.8425601720809937,
-0.7956058382987976,
0.3331499397754669,
-1.0392954349517822,
-0.5645328760147095,
0.2608339190483093,
2.3279426097869873,
1.7849167585372925,
-0.5105103254318237,
-0.21057181060314178,
-0.9294688105583191,
1.3607327938079834,
-0.20606668293476105,
0.1824127435684204,
2.0183775424957275,
-0.21978604793548584,
-1.0489552021026611,
1.3268651962280273,
-2.3663628101348877,
0.17669841647148132,
1.981858253479004,
0.3674497902393341,
0.1281290203332901,
-1.2871754169464111,
-0.7408568859100342,
-0.4526154398918152,
-0.49349528551101685,
-1.2315970659255981,
0.4929649531841278,
-0.1908589005470276,
-0.7843916416168213,
-1.3551864624023438,
0.10325022786855698,
-1.164036750793457,
-1.6492981910705566,
0.24891585111618042,
1.8904883861541748,
2.033353090286255,
-0.8410494923591614,
1.527858853340149,
-0.30530133843421936,
0.006486755795776844,
1.1074907779693604,
1.3571429252624512,
3.111586332321167,
1.8244575262069702,
-1.252483606338501,
0.6229731440544128,
-0.11161933839321136,
-0.40626364946365356,
1.1624698638916016,
-1.2866287231445312,
1.3000199794769287,
-0.10104860365390778,
-1.1422737836837769,
-1.1738651990890503,
0.9020647406578064,
0.43006494641304016,
0.025871247053146362,
-0.4819253385066986,
1.1446576118469238,
0.12053926289081573,
1.4637733697891235,
0.64875328540802,
-0.34480372071266174,
0.5845308303833008,
-0.3820348381996155,
-0.4542333781719208,
1.526969313621521,
0.05479031056165695,
-1.49327552318573,
-2.1826953887939453,
-0.2492327094078064,
-0.8050460815429688,
0.04918154329061508,
-0.5990644693374634,
-1.0761444568634033,
1.7644058465957642,
0.31223469972610474,
-1.176938533782959,
-0.30921876430511475,
-0.3717193007469177,
-0.5440675020217896,
2.7844390869140625,
-1.3145304918289185,
-0.1593686193227768,
-1.0162937641143799,
-0.7093091011047363,
1.6977273225784302,
-1.1879247426986694,
-0.2071063071489334,
-1.0308332443237305,
-0.5120409727096558,
-1.344565510749817,
-0.5243723392486572,
0.13611136376857758,
-1.0356148481369019,
0.8572000861167908,
0.19578102231025696,
-1.1312878131866455,
-0.3326675593852997,
-0.831267774105072,
1.0213218927383423,
-0.15072475373744965,
0.05555454641580582,
1.8973897695541382,
0.29660218954086304,
-0.3296479880809784,
0.7664986252784729,
1.2058104276657104,
0.6593224406242371,
-0.6658397316932678,
0.14018744230270386,
-0.7219914197921753,
0.3182410001754761,
-1.3269270658493042,
0.21528951823711395,
-2.8530404567718506,
0.6039109826087952,
-0.09485752135515213,
-0.08860591799020767,
0.07165762782096863,
-1.270022988319397,
1.144576907157898,
2.5495896339416504,
-1.1639375686645508,
0.4989810287952423,
0.3342503607273102,
1.0685385465621948,
-1.7015266418457031,
0.3974034786224365,
-0.4435388743877411,
1.8879660367965698,
0.26439183950424194,
1.2137553691864014,
-0.5336291790008545,
-2.2668662071228027,
0.6337452530860901,
-1.2421245574951172,
-1.236695408821106,
0.8012263774871826,
-1.0060982704162598,
0.3311386704444885,
-1.4221688508987427,
-0.24106012284755707,
-0.9116091132164001,
-1.1733864545822144,
0.6087899804115295,
0.1103396862745285,
0.31267014145851135,
-0.47084927558898926,
0.40109899640083313,
-2.3087921142578125,
-1.332279086112976,
-0.3129426836967468,
-0.953406810760498,
0.5589680671691895,
-0.4739599823951721,
0.7356805205345154,
-0.17202681303024292,
0.02271942049264908,
0.3810502588748932,
1.5005028247833252,
3.3402514457702637,
0.18332797288894653,
0.19291751086711884,
-0.1301220804452896,
-1.0855661630630493,
1.5627989768981934,
0.8567186594009399,
-0.05333981662988663,
-0.5565051436424255,
-1.042803406715393,
1.2694776058197021,
1.9113855361938477,
1.0791159868240356,
-0.04099678248167038,
-0.8725165128707886,
-0.674746572971344,
-0.05788436532020569,
0.17302511632442474,
0.3628075420856476,
1.0327565670013428,
0.0040795765817165375,
-0.004174330271780491,
1.5627095699310303,
1.1853920221328735,
-0.30737555027008057,
0.09642138332128525,
-0.8546974062919617,
-0.5115512013435364,
0.6001291275024414,
0.21691176295280457,
-0.04440690949559212,
0.47296738624572754,
-1.0316108465194702,
-0.2798590660095215,
-0.438733845949173,
-0.8538624048233032,
-0.6137117147445679,
-0.4106587767601013,
-0.35834217071533203,
1.5959423780441284,
0.10466033965349197,
-0.549644947052002,
-0.029340237379074097,
-0.8194118142127991,
-0.15878070890903473,
-1.2355444431304932,
0.2677352726459503,
-0.07025621831417084,
-0.20774182677268982,
-0.15440037846565247,
1.6754989624023438,
-0.8852893710136414,
-2.081632137298584,
0.13368287682533264,
0.27641183137893677,
-0.145509272813797,
0.1651080846786499,
1.694605827331543,
0.5086035132408142,
1.4034719467163086,
1.1914602518081665,
0.8917753100395203,
-0.6507077217102051,
-1.2655285596847534,
0.6644800305366516,
0.9867412447929382,
-1.3871043920516968,
0.8826608657836914,
-0.13974982500076294,
-0.5711100697517395,
0.5227157473564148,
1.2495899200439453,
0.5474530458450317,
-1.8841992616653442,
0.8648314476013184,
-1.0101913213729858,
0.8137166500091553,
0.6314262747764587,
0.6644769906997681,
0.13199423253536224,
0.8609001636505127,
-1.1671912670135498,
-1.070265293121338,
-0.6114233732223511,
-0.6355605125427246,
1.9697649478912354,
-0.3688024580478668,
0.6600698232650757,
-0.3728742003440857,
-1.1648896932601929,
0.06981408596038818,
0.6554055213928223,
0.30754995346069336,
-0.5242191553115845,
0.9023071527481079,
-0.6482473015785217,
-1.0587270259857178,
-1.338158130645752,
-0.2895112633705139,
-1.1142510175704956,
-0.9194202423095703,
1.0996930599212646,
0.7030560374259949,
0.25383684039115906,
1.893743872642517,
0.741356611251831,
0.3977879285812378,
-2.5536861419677734,
0.8996453881263733,
0.2956579029560089,
-0.05488325282931328,
0.860611617565155,
0.34753352403640747,
1.0451606512069702,
-0.01500663161277771,
0.5266353487968445,
-2.5330991744995117,
2.3585638999938965,
-0.18602272868156433,
0.7176809310913086,
-0.011723237112164497,
-0.20764870941638947,
1.1554638147354126,
0.7310277819633484,
0.5138439536094666,
-1.0125623941421509,
0.5448271632194519,
-0.3962637186050415,
1.1491938829421997,
0.9136321544647217,
-0.7809944748878479,
0.03761541098356247,
1.421581506729126,
0.586489200592041,
-0.5275237560272217,
-0.9993638396263123,
-0.8259223103523254,
0.9587014317512512,
1.6569994688034058,
0.037628173828125,
-0.025691289454698563,
0.8265417218208313,
0.6054421067237854,
-1.2618106603622437,
0.008200407959520817,
-0.7125726342201233,
-0.694201648235321,
1.734092354774475,
2.150848865509033,
-0.14338447153568268,
-0.2911941707134247,
-0.5936823487281799,
-1.3603991270065308,
0.8263470530509949,
-0.09215763956308365,
0.2541886270046234,
0.6191326975822449,
-0.6451762318611145,
0.9848113059997559,
0.7577159404754639,
0.965461790561676,
0.2436213195323944,
0.2600826919078827,
0.52177894115448,
-0.3654218912124634,
-1.2214950323104858,
-0.16573257744312286,
-0.9965009093284607,
-2.586381196975708,
0.43563491106033325,
-0.21562452614307404,
-1.385652780532837,
0.0001473529264330864,
-1.0556623935699463,
1.0587968826293945,
-0.5474799275398254,
-1.0493792295455933,
-1.5381152629852295,
0.18510101735591888,
0.00891056377440691,
0.9748376607894897,
-1.5757265090942383,
-0.3815951347351074,
1.2672340869903564,
0.9091302752494812,
-0.6850217580795288,
0.9064911007881165,
0.13464395701885223,
1.0785083770751953,
0.6931905746459961,
-0.39325159788131714,
0.5636615753173828,
-0.08871804177761078,
-1.405534267425537,
0.4150907099246979,
1.2940771579742432,
0.1896951049566269,
1.5401095151901245,
-0.40904733538627625,
0.07434193789958954,
0.3808676302433014,
-0.6257890462875366,
-0.5405478477478027,
-0.43822547793388367,
0.5620914101600647,
0.011923537589609623,
-0.9670467376708984,
-0.20810791850090027,
-0.06359750032424927,
-0.3320789337158203,
0.0983579158782959,
-1.4272021055221558,
-0.1543838530778885,
-0.44766801595687866,
-0.6700143218040466,
-1.2405169010162354,
-0.05082961544394493,
1.3349268436431885,
-0.8272706866264343,
-0.18056705594062805,
0.36062806844711304,
0.3087054193019867,
0.5145432353019714,
0.5688313245773315,
-0.8470059633255005,
-0.1428942233324051,
-0.2799951136112213,
-0.3409467339515686,
0.3020351529121399,
1.4111095666885376,
-0.11761295795440674,
-0.9909440279006958,
0.5706281065940857,
-0.28948307037353516,
0.1262446939945221,
1.9602465629577637,
-0.011728161945939064,
-0.7138206362724304,
0.2880672216415405,
-0.7193821668624878,
1.8780019283294678,
1.7176978588104248,
1.388152003288269,
-0.2108982652425766,
-0.7170239686965942,
0.5826162695884705,
-0.4293741285800934,
-0.4333801567554474,
0.8234938383102417,
0.4173627197742462,
-0.23947124183177948,
-1.5305176973342896,
0.8618257641792297,
1.2041007280349731,
-0.861402153968811,
-0.7641542553901672,
0.1885404735803604,
-0.7944381237030029,
1.1408085823059082,
0.5675075650215149,
0.34229400753974915,
0.41525155305862427,
1.693238377571106,
0.8399849534034729,
-0.48262616991996765,
0.48633673787117004,
0.6560927629470825,
-0.1382572203874588,
-2.052910327911377,
-1.1503816843032837,
0.3851858079433441,
-0.6375354528427124,
-1.5356308221817017,
1.4890028238296509,
-1.0463182926177979,
-1.1744948625564575,
0.5528039932250977,
0.05724215507507324,
1.2575962543487549,
0.46253278851509094,
1.5641926527023315,
2.021538734436035,
0.7903066277503967,
0.465015172958374,
1.1668615341186523,
-0.07981672137975693,
-0.4156991243362427,
1.808485746383667,
-0.4232836961746216,
0.5228972434997559,
1.0768085718154907,
-0.2689119577407837,
-1.113908290863037,
-0.769935667514801,
-1.2955172061920166,
-0.804937481880188,
1.2410717010498047,
0.07633259147405624,
-0.9853799939155579,
0.270153284072876,
1.5850701332092285,
0.09648889303207397,
-0.3497626483440399,
0.718895673751831,
0.35133591294288635,
-0.7825583219528198,
-0.08768313378095627,
-0.896490752696991,
0.5485638380050659,
-0.12365252524614334,
-0.41686660051345825,
0.2301519364118576,
0.5382604598999023,
1.5227910280227661,
-0.08941416442394257,
0.1772885024547577,
1.0585780143737793,
-1.4093265533447266,
1.5773613452911377,
-0.7367566823959351,
0.19313691556453705,
-2.405738592147827,
1.399793028831482,
-0.7187435626983643,
1.9965183734893799,
-2.641876459121704,
0.5409594774246216,
-0.4674511253833771,
-0.4769953787326813,
0.25539159774780273,
-0.4973548948764801,
0.1314738243818283,
-0.08216753602027893,
-1.0640859603881836,
0.029349587857723236,
-0.5935378670692444,
0.7264068126678467,
1.161729097366333,
1.3986780643463135,
-1.1924103498458862,
-0.2667527198791504,
-1.6868666410446167,
-0.19807757437229156,
-0.8229691982269287,
0.22398357093334198,
-1.948373556137085,
-0.24705950915813446,
-1.8363280296325684,
-2.4220645427703857,
-1.1914303302764893,
-0.804402768611908,
1.1830803155899048,
0.0934363380074501,
-0.9415684938430786,
1.337262511253357,
-0.4119330644607544,
-1.8953303098678589,
1.2587909698486328,
-2.1538245677948
] |
https://github.com/huggingface/datasets/issues/4862 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code | Hi @yana-xuyan, thanks for reporting.
Indeed you already found the answer: an Excel file should be just downloaded and not downloaded-and-extracted.
The reason why is that if you call also extract, our library will try to infer the compression format (and extract it). And Excel files are viewed as ZIP files and extracted as so (into a directory). This is because the Office Open XML is indeed a zipped file under the hood): https://en.wikipedia.org/wiki/Office_Open_XML
> Office Open XML (also informally known as OOXML) is a **zipped**, XML-based file format
```python
import zipfile
zipfile.is_zipfile("filename.xlsx")
```
returns `True`. | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
| 571 | 96 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
Hi @yana-xuyan, thanks for reporting.
Indeed you already found the answer: an Excel file should be just downloaded and not downloaded-and-extracted.
The reason why is that if you call also extract, our library will try to infer the compression format (and extract it). And Excel files are viewed as ZIP files and extracted as so (into a directory). This is because the Office Open XML is indeed a zipped file under the hood): https://en.wikipedia.org/wiki/Office_Open_XML
> Office Open XML (also informally known as OOXML) is a **zipped**, XML-based file format
```python
import zipfile
zipfile.is_zipfile("filename.xlsx")
```
returns `True`. | [
-1.253296136856079,
-0.9126898646354675,
-0.6568876504898071,
1.4803348779678345,
-0.16987846791744232,
-1.1167373657226562,
0.17479801177978516,
-1.1394572257995605,
1.506750464439392,
-0.8051154017448425,
0.27674582600593567,
-1.59161376953125,
-0.05443645641207695,
-0.5382506847381592,
-0.6629936099052429,
-0.9528822302818298,
-0.42090731859207153,
-0.6956269145011902,
1.1023894548416138,
2.4810240268707275,
1.3796719312667847,
-1.2690436840057373,
2.770026683807373,
0.7667846083641052,
-0.06857726722955704,
-0.9251874089241028,
0.6549254655838013,
0.033550020307302475,
-1.2609604597091675,
-0.4082512855529785,
-0.9493147730827332,
-0.14193539321422577,
-0.4796518087387085,
-0.3666529059410095,
-0.08509648591279984,
0.4938839375972748,
-0.4457423985004425,
-0.45210161805152893,
-0.6961650848388672,
-0.7984670400619507,
0.43396803736686707,
-0.39129799604415894,
0.9141614437103271,
-0.40411514043807983,
1.8477603197097778,
-0.5966731309890747,
0.47750937938690186,
0.727944552898407,
1.1147925853729248,
0.32822051644325256,
0.0988977923989296,
0.27478134632110596,
0.36294975876808167,
-0.07562453299760818,
0.5621953010559082,
1.2582653760910034,
0.6737195253372192,
0.53765469789505,
0.790194034576416,
-2.1121792793273926,
1.2400939464569092,
-1.0578923225402832,
0.25436413288116455,
1.4672828912734985,
-0.8035778403282166,
0.46694695949554443,
-1.8080666065216064,
-0.06555741280317307,
0.5451071858406067,
-2.276102066040039,
0.39141061902046204,
-1.3236095905303955,
-0.602013111114502,
0.9859125018119812,
0.38723263144493103,
-1.1321959495544434,
0.12849262356758118,
-0.47276389598846436,
0.9750926494598389,
0.4077703058719635,
1.0880497694015503,
-1.6393005847930908,
-0.06891418248414993,
-0.2568214237689972,
0.08345973491668701,
-1.293639063835144,
-1.5752919912338257,
0.6113032102584839,
0.5259910821914673,
0.5741018056869507,
-0.11069171875715256,
1.1295135021209717,
-1.0818355083465576,
0.7594508528709412,
-1.0086060762405396,
-1.619336485862732,
-1.4876104593276978,
-2.3604609966278076,
-2.2161881923675537,
0.6901252865791321,
-0.4807244837284088,
-0.6039971709251404,
2.082937002182007,
-1.0304137468338013,
-1.5615118741989136,
1.0970758199691772,
0.27974116802215576,
0.06683202087879181,
2.5031256675720215,
0.24779164791107178,
-0.7515104413032532,
0.4756849408149719,
-0.7729387283325195,
0.7196414470672607,
-0.28512248396873474,
1.2831335067749023,
0.4461726248264313,
-1.0133767127990723,
1.5859586000442505,
-0.38877829909324646,
0.6899599432945251,
-0.5978924036026001,
-0.5221360325813293,
-0.7510809898376465,
0.24450278282165527,
1.8471027612686157,
-0.21129480004310608,
1.5535892248153687,
-0.24412885308265686,
-1.582451581954956,
-1.674163579940796,
0.8900859951972961,
0.4157591164112091,
-0.7256417274475098,
0.058594606816768646,
-0.41939860582351685,
0.1067427396774292,
-0.09484896808862686,
1.2119224071502686,
1.340372085571289,
0.7445563673973083,
-0.40228933095932007,
-0.8364371061325073,
0.039181120693683624,
-0.08426451683044434,
-0.7960355877876282,
-1.6389458179473877,
-0.30305466055870056,
0.15987887978553772,
0.5522024631500244,
-1.2403409481048584,
1.7273023128509521,
0.9847233891487122,
1.8428417444229126,
0.97890704870224,
-0.4084063768386841,
1.4387048482894897,
0.0784708708524704,
1.6866511106491089,
-0.5783265829086304,
0.6046293377876282,
-0.2885037064552307,
-1.2040883302688599,
0.8628702163696289,
-0.25645536184310913,
-2.006528854370117,
-0.9111247658729553,
-0.7331985235214233,
-0.12013818323612213,
-0.7328178882598877,
0.9418691396713257,
-0.2990097999572754,
-1.4336949586868286,
0.21258091926574707,
-0.7743727564811707,
0.027753684669733047,
-1.2890511751174927,
0.3310898244380951,
0.6502978205680847,
-0.677954375743866,
0.035413917154073715,
-0.09327933937311172,
-1.2069146633148193,
-0.4177582859992981,
0.2504974901676178,
1.9634253978729248,
-0.6303500533103943,
0.8159162402153015,
1.0992000102996826,
-0.8163162469863892,
0.06893882900476456,
0.22889040410518646,
-0.37784555554389954,
0.8421657085418701,
-1.0831575393676758,
-0.5461742877960205,
1.2366461753845215,
-0.21183277666568756,
-0.6369394659996033,
1.4876797199249268,
0.6975578665733337,
-1.0335588455200195,
-0.2727079689502716,
-0.07585801929235458,
-0.8564610481262207,
0.03117937594652176,
-1.4688926935195923,
-0.16840429604053497,
0.4861074388027191,
-1.5290106534957886,
-0.5117393136024475,
-0.19878330826759338,
1.3040066957473755,
-0.23633906245231628,
1.4525171518325806,
-0.3864612877368927,
-0.1699233502149582,
-0.29699674248695374,
-0.3657999038696289,
0.09470066428184509,
-0.22965680062770844,
-0.6533419489860535,
0.11151605099439621,
-0.9067264199256897,
0.23274822533130646,
1.4322377443313599,
0.3558287024497986,
0.025628279894590378,
0.5259848833084106,
1.1229538917541504,
0.4642435610294342,
-0.14431679248809814,
-0.8620559573173523,
-1.4722627401351929,
1.835591435432434,
-1.4137662649154663,
2.0082154273986816,
0.7499880790710449,
-0.06355929374694824,
-1.784207820892334,
-1.8885407447814941,
1.249007225036621,
1.163398265838623,
2.3511555194854736,
0.44990918040275574,
0.4163707196712494,
-0.8425601720809937,
-0.7956058382987976,
0.3331499397754669,
-1.0392954349517822,
-0.5645328760147095,
0.2608339190483093,
2.3279426097869873,
1.7849167585372925,
-0.5105103254318237,
-0.21057181060314178,
-0.9294688105583191,
1.3607327938079834,
-0.20606668293476105,
0.1824127435684204,
2.0183775424957275,
-0.21978604793548584,
-1.0489552021026611,
1.3268651962280273,
-2.3663628101348877,
0.17669841647148132,
1.981858253479004,
0.3674497902393341,
0.1281290203332901,
-1.2871754169464111,
-0.7408568859100342,
-0.4526154398918152,
-0.49349528551101685,
-1.2315970659255981,
0.4929649531841278,
-0.1908589005470276,
-0.7843916416168213,
-1.3551864624023438,
0.10325022786855698,
-1.164036750793457,
-1.6492981910705566,
0.24891585111618042,
1.8904883861541748,
2.033353090286255,
-0.8410494923591614,
1.527858853340149,
-0.30530133843421936,
0.006486755795776844,
1.1074907779693604,
1.3571429252624512,
3.111586332321167,
1.8244575262069702,
-1.252483606338501,
0.6229731440544128,
-0.11161933839321136,
-0.40626364946365356,
1.1624698638916016,
-1.2866287231445312,
1.3000199794769287,
-0.10104860365390778,
-1.1422737836837769,
-1.1738651990890503,
0.9020647406578064,
0.43006494641304016,
0.025871247053146362,
-0.4819253385066986,
1.1446576118469238,
0.12053926289081573,
1.4637733697891235,
0.64875328540802,
-0.34480372071266174,
0.5845308303833008,
-0.3820348381996155,
-0.4542333781719208,
1.526969313621521,
0.05479031056165695,
-1.49327552318573,
-2.1826953887939453,
-0.2492327094078064,
-0.8050460815429688,
0.04918154329061508,
-0.5990644693374634,
-1.0761444568634033,
1.7644058465957642,
0.31223469972610474,
-1.176938533782959,
-0.30921876430511475,
-0.3717193007469177,
-0.5440675020217896,
2.7844390869140625,
-1.3145304918289185,
-0.1593686193227768,
-1.0162937641143799,
-0.7093091011047363,
1.6977273225784302,
-1.1879247426986694,
-0.2071063071489334,
-1.0308332443237305,
-0.5120409727096558,
-1.344565510749817,
-0.5243723392486572,
0.13611136376857758,
-1.0356148481369019,
0.8572000861167908,
0.19578102231025696,
-1.1312878131866455,
-0.3326675593852997,
-0.831267774105072,
1.0213218927383423,
-0.15072475373744965,
0.05555454641580582,
1.8973897695541382,
0.29660218954086304,
-0.3296479880809784,
0.7664986252784729,
1.2058104276657104,
0.6593224406242371,
-0.6658397316932678,
0.14018744230270386,
-0.7219914197921753,
0.3182410001754761,
-1.3269270658493042,
0.21528951823711395,
-2.8530404567718506,
0.6039109826087952,
-0.09485752135515213,
-0.08860591799020767,
0.07165762782096863,
-1.270022988319397,
1.144576907157898,
2.5495896339416504,
-1.1639375686645508,
0.4989810287952423,
0.3342503607273102,
1.0685385465621948,
-1.7015266418457031,
0.3974034786224365,
-0.4435388743877411,
1.8879660367965698,
0.26439183950424194,
1.2137553691864014,
-0.5336291790008545,
-2.2668662071228027,
0.6337452530860901,
-1.2421245574951172,
-1.236695408821106,
0.8012263774871826,
-1.0060982704162598,
0.3311386704444885,
-1.4221688508987427,
-0.24106012284755707,
-0.9116091132164001,
-1.1733864545822144,
0.6087899804115295,
0.1103396862745285,
0.31267014145851135,
-0.47084927558898926,
0.40109899640083313,
-2.3087921142578125,
-1.332279086112976,
-0.3129426836967468,
-0.953406810760498,
0.5589680671691895,
-0.4739599823951721,
0.7356805205345154,
-0.17202681303024292,
0.02271942049264908,
0.3810502588748932,
1.5005028247833252,
3.3402514457702637,
0.18332797288894653,
0.19291751086711884,
-0.1301220804452896,
-1.0855661630630493,
1.5627989768981934,
0.8567186594009399,
-0.05333981662988663,
-0.5565051436424255,
-1.042803406715393,
1.2694776058197021,
1.9113855361938477,
1.0791159868240356,
-0.04099678248167038,
-0.8725165128707886,
-0.674746572971344,
-0.05788436532020569,
0.17302511632442474,
0.3628075420856476,
1.0327565670013428,
0.0040795765817165375,
-0.004174330271780491,
1.5627095699310303,
1.1853920221328735,
-0.30737555027008057,
0.09642138332128525,
-0.8546974062919617,
-0.5115512013435364,
0.6001291275024414,
0.21691176295280457,
-0.04440690949559212,
0.47296738624572754,
-1.0316108465194702,
-0.2798590660095215,
-0.438733845949173,
-0.8538624048233032,
-0.6137117147445679,
-0.4106587767601013,
-0.35834217071533203,
1.5959423780441284,
0.10466033965349197,
-0.549644947052002,
-0.029340237379074097,
-0.8194118142127991,
-0.15878070890903473,
-1.2355444431304932,
0.2677352726459503,
-0.07025621831417084,
-0.20774182677268982,
-0.15440037846565247,
1.6754989624023438,
-0.8852893710136414,
-2.081632137298584,
0.13368287682533264,
0.27641183137893677,
-0.145509272813797,
0.1651080846786499,
1.694605827331543,
0.5086035132408142,
1.4034719467163086,
1.1914602518081665,
0.8917753100395203,
-0.6507077217102051,
-1.2655285596847534,
0.6644800305366516,
0.9867412447929382,
-1.3871043920516968,
0.8826608657836914,
-0.13974982500076294,
-0.5711100697517395,
0.5227157473564148,
1.2495899200439453,
0.5474530458450317,
-1.8841992616653442,
0.8648314476013184,
-1.0101913213729858,
0.8137166500091553,
0.6314262747764587,
0.6644769906997681,
0.13199423253536224,
0.8609001636505127,
-1.1671912670135498,
-1.070265293121338,
-0.6114233732223511,
-0.6355605125427246,
1.9697649478912354,
-0.3688024580478668,
0.6600698232650757,
-0.3728742003440857,
-1.1648896932601929,
0.06981408596038818,
0.6554055213928223,
0.30754995346069336,
-0.5242191553115845,
0.9023071527481079,
-0.6482473015785217,
-1.0587270259857178,
-1.338158130645752,
-0.2895112633705139,
-1.1142510175704956,
-0.9194202423095703,
1.0996930599212646,
0.7030560374259949,
0.25383684039115906,
1.893743872642517,
0.741356611251831,
0.3977879285812378,
-2.5536861419677734,
0.8996453881263733,
0.2956579029560089,
-0.05488325282931328,
0.860611617565155,
0.34753352403640747,
1.0451606512069702,
-0.01500663161277771,
0.5266353487968445,
-2.5330991744995117,
2.3585638999938965,
-0.18602272868156433,
0.7176809310913086,
-0.011723237112164497,
-0.20764870941638947,
1.1554638147354126,
0.7310277819633484,
0.5138439536094666,
-1.0125623941421509,
0.5448271632194519,
-0.3962637186050415,
1.1491938829421997,
0.9136321544647217,
-0.7809944748878479,
0.03761541098356247,
1.421581506729126,
0.586489200592041,
-0.5275237560272217,
-0.9993638396263123,
-0.8259223103523254,
0.9587014317512512,
1.6569994688034058,
0.037628173828125,
-0.025691289454698563,
0.8265417218208313,
0.6054421067237854,
-1.2618106603622437,
0.008200407959520817,
-0.7125726342201233,
-0.694201648235321,
1.734092354774475,
2.150848865509033,
-0.14338447153568268,
-0.2911941707134247,
-0.5936823487281799,
-1.3603991270065308,
0.8263470530509949,
-0.09215763956308365,
0.2541886270046234,
0.6191326975822449,
-0.6451762318611145,
0.9848113059997559,
0.7577159404754639,
0.965461790561676,
0.2436213195323944,
0.2600826919078827,
0.52177894115448,
-0.3654218912124634,
-1.2214950323104858,
-0.16573257744312286,
-0.9965009093284607,
-2.586381196975708,
0.43563491106033325,
-0.21562452614307404,
-1.385652780532837,
0.0001473529264330864,
-1.0556623935699463,
1.0587968826293945,
-0.5474799275398254,
-1.0493792295455933,
-1.5381152629852295,
0.18510101735591888,
0.00891056377440691,
0.9748376607894897,
-1.5757265090942383,
-0.3815951347351074,
1.2672340869903564,
0.9091302752494812,
-0.6850217580795288,
0.9064911007881165,
0.13464395701885223,
1.0785083770751953,
0.6931905746459961,
-0.39325159788131714,
0.5636615753173828,
-0.08871804177761078,
-1.405534267425537,
0.4150907099246979,
1.2940771579742432,
0.1896951049566269,
1.5401095151901245,
-0.40904733538627625,
0.07434193789958954,
0.3808676302433014,
-0.6257890462875366,
-0.5405478477478027,
-0.43822547793388367,
0.5620914101600647,
0.011923537589609623,
-0.9670467376708984,
-0.20810791850090027,
-0.06359750032424927,
-0.3320789337158203,
0.0983579158782959,
-1.4272021055221558,
-0.1543838530778885,
-0.44766801595687866,
-0.6700143218040466,
-1.2405169010162354,
-0.05082961544394493,
1.3349268436431885,
-0.8272706866264343,
-0.18056705594062805,
0.36062806844711304,
0.3087054193019867,
0.5145432353019714,
0.5688313245773315,
-0.8470059633255005,
-0.1428942233324051,
-0.2799951136112213,
-0.3409467339515686,
0.3020351529121399,
1.4111095666885376,
-0.11761295795440674,
-0.9909440279006958,
0.5706281065940857,
-0.28948307037353516,
0.1262446939945221,
1.9602465629577637,
-0.011728161945939064,
-0.7138206362724304,
0.2880672216415405,
-0.7193821668624878,
1.8780019283294678,
1.7176978588104248,
1.388152003288269,
-0.2108982652425766,
-0.7170239686965942,
0.5826162695884705,
-0.4293741285800934,
-0.4333801567554474,
0.8234938383102417,
0.4173627197742462,
-0.23947124183177948,
-1.5305176973342896,
0.8618257641792297,
1.2041007280349731,
-0.861402153968811,
-0.7641542553901672,
0.1885404735803604,
-0.7944381237030029,
1.1408085823059082,
0.5675075650215149,
0.34229400753974915,
0.41525155305862427,
1.693238377571106,
0.8399849534034729,
-0.48262616991996765,
0.48633673787117004,
0.6560927629470825,
-0.1382572203874588,
-2.052910327911377,
-1.1503816843032837,
0.3851858079433441,
-0.6375354528427124,
-1.5356308221817017,
1.4890028238296509,
-1.0463182926177979,
-1.1744948625564575,
0.5528039932250977,
0.05724215507507324,
1.2575962543487549,
0.46253278851509094,
1.5641926527023315,
2.021538734436035,
0.7903066277503967,
0.465015172958374,
1.1668615341186523,
-0.07981672137975693,
-0.4156991243362427,
1.808485746383667,
-0.4232836961746216,
0.5228972434997559,
1.0768085718154907,
-0.2689119577407837,
-1.113908290863037,
-0.769935667514801,
-1.2955172061920166,
-0.804937481880188,
1.2410717010498047,
0.07633259147405624,
-0.9853799939155579,
0.270153284072876,
1.5850701332092285,
0.09648889303207397,
-0.3497626483440399,
0.718895673751831,
0.35133591294288635,
-0.7825583219528198,
-0.08768313378095627,
-0.896490752696991,
0.5485638380050659,
-0.12365252524614334,
-0.41686660051345825,
0.2301519364118576,
0.5382604598999023,
1.5227910280227661,
-0.08941416442394257,
0.1772885024547577,
1.0585780143737793,
-1.4093265533447266,
1.5773613452911377,
-0.7367566823959351,
0.19313691556453705,
-2.405738592147827,
1.399793028831482,
-0.7187435626983643,
1.9965183734893799,
-2.641876459121704,
0.5409594774246216,
-0.4674511253833771,
-0.4769953787326813,
0.25539159774780273,
-0.4973548948764801,
0.1314738243818283,
-0.08216753602027893,
-1.0640859603881836,
0.029349587857723236,
-0.5935378670692444,
0.7264068126678467,
1.161729097366333,
1.3986780643463135,
-1.1924103498458862,
-0.2667527198791504,
-1.6868666410446167,
-0.19807757437229156,
-0.8229691982269287,
0.22398357093334198,
-1.948373556137085,
-0.24705950915813446,
-1.8363280296325684,
-2.4220645427703857,
-1.1914303302764893,
-0.804402768611908,
1.1830803155899048,
0.0934363380074501,
-0.9415684938430786,
1.337262511253357,
-0.4119330644607544,
-1.8953303098678589,
1.2587909698486328,
-2.1538245677948
] |
https://github.com/huggingface/datasets/issues/4862 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code | Hi @albertvillanova, thank you for your reply! Do you have any clue on why the same error still exists with `datasets==2.4.0` even after I don't extract the downloaded file? FYI, if I downgrade to `datasets==2.2.2`, the code works fine. | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
| 571 | 39 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
Hi @albertvillanova, thank you for your reply! Do you have any clue on why the same error still exists with `datasets==2.4.0` even after I don't extract the downloaded file? FYI, if I downgrade to `datasets==2.2.2`, the code works fine. | [
-1.253296136856079,
-0.9126898646354675,
-0.6568876504898071,
1.4803348779678345,
-0.16987846791744232,
-1.1167373657226562,
0.17479801177978516,
-1.1394572257995605,
1.506750464439392,
-0.8051154017448425,
0.27674582600593567,
-1.59161376953125,
-0.05443645641207695,
-0.5382506847381592,
-0.6629936099052429,
-0.9528822302818298,
-0.42090731859207153,
-0.6956269145011902,
1.1023894548416138,
2.4810240268707275,
1.3796719312667847,
-1.2690436840057373,
2.770026683807373,
0.7667846083641052,
-0.06857726722955704,
-0.9251874089241028,
0.6549254655838013,
0.033550020307302475,
-1.2609604597091675,
-0.4082512855529785,
-0.9493147730827332,
-0.14193539321422577,
-0.4796518087387085,
-0.3666529059410095,
-0.08509648591279984,
0.4938839375972748,
-0.4457423985004425,
-0.45210161805152893,
-0.6961650848388672,
-0.7984670400619507,
0.43396803736686707,
-0.39129799604415894,
0.9141614437103271,
-0.40411514043807983,
1.8477603197097778,
-0.5966731309890747,
0.47750937938690186,
0.727944552898407,
1.1147925853729248,
0.32822051644325256,
0.0988977923989296,
0.27478134632110596,
0.36294975876808167,
-0.07562453299760818,
0.5621953010559082,
1.2582653760910034,
0.6737195253372192,
0.53765469789505,
0.790194034576416,
-2.1121792793273926,
1.2400939464569092,
-1.0578923225402832,
0.25436413288116455,
1.4672828912734985,
-0.8035778403282166,
0.46694695949554443,
-1.8080666065216064,
-0.06555741280317307,
0.5451071858406067,
-2.276102066040039,
0.39141061902046204,
-1.3236095905303955,
-0.602013111114502,
0.9859125018119812,
0.38723263144493103,
-1.1321959495544434,
0.12849262356758118,
-0.47276389598846436,
0.9750926494598389,
0.4077703058719635,
1.0880497694015503,
-1.6393005847930908,
-0.06891418248414993,
-0.2568214237689972,
0.08345973491668701,
-1.293639063835144,
-1.5752919912338257,
0.6113032102584839,
0.5259910821914673,
0.5741018056869507,
-0.11069171875715256,
1.1295135021209717,
-1.0818355083465576,
0.7594508528709412,
-1.0086060762405396,
-1.619336485862732,
-1.4876104593276978,
-2.3604609966278076,
-2.2161881923675537,
0.6901252865791321,
-0.4807244837284088,
-0.6039971709251404,
2.082937002182007,
-1.0304137468338013,
-1.5615118741989136,
1.0970758199691772,
0.27974116802215576,
0.06683202087879181,
2.5031256675720215,
0.24779164791107178,
-0.7515104413032532,
0.4756849408149719,
-0.7729387283325195,
0.7196414470672607,
-0.28512248396873474,
1.2831335067749023,
0.4461726248264313,
-1.0133767127990723,
1.5859586000442505,
-0.38877829909324646,
0.6899599432945251,
-0.5978924036026001,
-0.5221360325813293,
-0.7510809898376465,
0.24450278282165527,
1.8471027612686157,
-0.21129480004310608,
1.5535892248153687,
-0.24412885308265686,
-1.582451581954956,
-1.674163579940796,
0.8900859951972961,
0.4157591164112091,
-0.7256417274475098,
0.058594606816768646,
-0.41939860582351685,
0.1067427396774292,
-0.09484896808862686,
1.2119224071502686,
1.340372085571289,
0.7445563673973083,
-0.40228933095932007,
-0.8364371061325073,
0.039181120693683624,
-0.08426451683044434,
-0.7960355877876282,
-1.6389458179473877,
-0.30305466055870056,
0.15987887978553772,
0.5522024631500244,
-1.2403409481048584,
1.7273023128509521,
0.9847233891487122,
1.8428417444229126,
0.97890704870224,
-0.4084063768386841,
1.4387048482894897,
0.0784708708524704,
1.6866511106491089,
-0.5783265829086304,
0.6046293377876282,
-0.2885037064552307,
-1.2040883302688599,
0.8628702163696289,
-0.25645536184310913,
-2.006528854370117,
-0.9111247658729553,
-0.7331985235214233,
-0.12013818323612213,
-0.7328178882598877,
0.9418691396713257,
-0.2990097999572754,
-1.4336949586868286,
0.21258091926574707,
-0.7743727564811707,
0.027753684669733047,
-1.2890511751174927,
0.3310898244380951,
0.6502978205680847,
-0.677954375743866,
0.035413917154073715,
-0.09327933937311172,
-1.2069146633148193,
-0.4177582859992981,
0.2504974901676178,
1.9634253978729248,
-0.6303500533103943,
0.8159162402153015,
1.0992000102996826,
-0.8163162469863892,
0.06893882900476456,
0.22889040410518646,
-0.37784555554389954,
0.8421657085418701,
-1.0831575393676758,
-0.5461742877960205,
1.2366461753845215,
-0.21183277666568756,
-0.6369394659996033,
1.4876797199249268,
0.6975578665733337,
-1.0335588455200195,
-0.2727079689502716,
-0.07585801929235458,
-0.8564610481262207,
0.03117937594652176,
-1.4688926935195923,
-0.16840429604053497,
0.4861074388027191,
-1.5290106534957886,
-0.5117393136024475,
-0.19878330826759338,
1.3040066957473755,
-0.23633906245231628,
1.4525171518325806,
-0.3864612877368927,
-0.1699233502149582,
-0.29699674248695374,
-0.3657999038696289,
0.09470066428184509,
-0.22965680062770844,
-0.6533419489860535,
0.11151605099439621,
-0.9067264199256897,
0.23274822533130646,
1.4322377443313599,
0.3558287024497986,
0.025628279894590378,
0.5259848833084106,
1.1229538917541504,
0.4642435610294342,
-0.14431679248809814,
-0.8620559573173523,
-1.4722627401351929,
1.835591435432434,
-1.4137662649154663,
2.0082154273986816,
0.7499880790710449,
-0.06355929374694824,
-1.784207820892334,
-1.8885407447814941,
1.249007225036621,
1.163398265838623,
2.3511555194854736,
0.44990918040275574,
0.4163707196712494,
-0.8425601720809937,
-0.7956058382987976,
0.3331499397754669,
-1.0392954349517822,
-0.5645328760147095,
0.2608339190483093,
2.3279426097869873,
1.7849167585372925,
-0.5105103254318237,
-0.21057181060314178,
-0.9294688105583191,
1.3607327938079834,
-0.20606668293476105,
0.1824127435684204,
2.0183775424957275,
-0.21978604793548584,
-1.0489552021026611,
1.3268651962280273,
-2.3663628101348877,
0.17669841647148132,
1.981858253479004,
0.3674497902393341,
0.1281290203332901,
-1.2871754169464111,
-0.7408568859100342,
-0.4526154398918152,
-0.49349528551101685,
-1.2315970659255981,
0.4929649531841278,
-0.1908589005470276,
-0.7843916416168213,
-1.3551864624023438,
0.10325022786855698,
-1.164036750793457,
-1.6492981910705566,
0.24891585111618042,
1.8904883861541748,
2.033353090286255,
-0.8410494923591614,
1.527858853340149,
-0.30530133843421936,
0.006486755795776844,
1.1074907779693604,
1.3571429252624512,
3.111586332321167,
1.8244575262069702,
-1.252483606338501,
0.6229731440544128,
-0.11161933839321136,
-0.40626364946365356,
1.1624698638916016,
-1.2866287231445312,
1.3000199794769287,
-0.10104860365390778,
-1.1422737836837769,
-1.1738651990890503,
0.9020647406578064,
0.43006494641304016,
0.025871247053146362,
-0.4819253385066986,
1.1446576118469238,
0.12053926289081573,
1.4637733697891235,
0.64875328540802,
-0.34480372071266174,
0.5845308303833008,
-0.3820348381996155,
-0.4542333781719208,
1.526969313621521,
0.05479031056165695,
-1.49327552318573,
-2.1826953887939453,
-0.2492327094078064,
-0.8050460815429688,
0.04918154329061508,
-0.5990644693374634,
-1.0761444568634033,
1.7644058465957642,
0.31223469972610474,
-1.176938533782959,
-0.30921876430511475,
-0.3717193007469177,
-0.5440675020217896,
2.7844390869140625,
-1.3145304918289185,
-0.1593686193227768,
-1.0162937641143799,
-0.7093091011047363,
1.6977273225784302,
-1.1879247426986694,
-0.2071063071489334,
-1.0308332443237305,
-0.5120409727096558,
-1.344565510749817,
-0.5243723392486572,
0.13611136376857758,
-1.0356148481369019,
0.8572000861167908,
0.19578102231025696,
-1.1312878131866455,
-0.3326675593852997,
-0.831267774105072,
1.0213218927383423,
-0.15072475373744965,
0.05555454641580582,
1.8973897695541382,
0.29660218954086304,
-0.3296479880809784,
0.7664986252784729,
1.2058104276657104,
0.6593224406242371,
-0.6658397316932678,
0.14018744230270386,
-0.7219914197921753,
0.3182410001754761,
-1.3269270658493042,
0.21528951823711395,
-2.8530404567718506,
0.6039109826087952,
-0.09485752135515213,
-0.08860591799020767,
0.07165762782096863,
-1.270022988319397,
1.144576907157898,
2.5495896339416504,
-1.1639375686645508,
0.4989810287952423,
0.3342503607273102,
1.0685385465621948,
-1.7015266418457031,
0.3974034786224365,
-0.4435388743877411,
1.8879660367965698,
0.26439183950424194,
1.2137553691864014,
-0.5336291790008545,
-2.2668662071228027,
0.6337452530860901,
-1.2421245574951172,
-1.236695408821106,
0.8012263774871826,
-1.0060982704162598,
0.3311386704444885,
-1.4221688508987427,
-0.24106012284755707,
-0.9116091132164001,
-1.1733864545822144,
0.6087899804115295,
0.1103396862745285,
0.31267014145851135,
-0.47084927558898926,
0.40109899640083313,
-2.3087921142578125,
-1.332279086112976,
-0.3129426836967468,
-0.953406810760498,
0.5589680671691895,
-0.4739599823951721,
0.7356805205345154,
-0.17202681303024292,
0.02271942049264908,
0.3810502588748932,
1.5005028247833252,
3.3402514457702637,
0.18332797288894653,
0.19291751086711884,
-0.1301220804452896,
-1.0855661630630493,
1.5627989768981934,
0.8567186594009399,
-0.05333981662988663,
-0.5565051436424255,
-1.042803406715393,
1.2694776058197021,
1.9113855361938477,
1.0791159868240356,
-0.04099678248167038,
-0.8725165128707886,
-0.674746572971344,
-0.05788436532020569,
0.17302511632442474,
0.3628075420856476,
1.0327565670013428,
0.0040795765817165375,
-0.004174330271780491,
1.5627095699310303,
1.1853920221328735,
-0.30737555027008057,
0.09642138332128525,
-0.8546974062919617,
-0.5115512013435364,
0.6001291275024414,
0.21691176295280457,
-0.04440690949559212,
0.47296738624572754,
-1.0316108465194702,
-0.2798590660095215,
-0.438733845949173,
-0.8538624048233032,
-0.6137117147445679,
-0.4106587767601013,
-0.35834217071533203,
1.5959423780441284,
0.10466033965349197,
-0.549644947052002,
-0.029340237379074097,
-0.8194118142127991,
-0.15878070890903473,
-1.2355444431304932,
0.2677352726459503,
-0.07025621831417084,
-0.20774182677268982,
-0.15440037846565247,
1.6754989624023438,
-0.8852893710136414,
-2.081632137298584,
0.13368287682533264,
0.27641183137893677,
-0.145509272813797,
0.1651080846786499,
1.694605827331543,
0.5086035132408142,
1.4034719467163086,
1.1914602518081665,
0.8917753100395203,
-0.6507077217102051,
-1.2655285596847534,
0.6644800305366516,
0.9867412447929382,
-1.3871043920516968,
0.8826608657836914,
-0.13974982500076294,
-0.5711100697517395,
0.5227157473564148,
1.2495899200439453,
0.5474530458450317,
-1.8841992616653442,
0.8648314476013184,
-1.0101913213729858,
0.8137166500091553,
0.6314262747764587,
0.6644769906997681,
0.13199423253536224,
0.8609001636505127,
-1.1671912670135498,
-1.070265293121338,
-0.6114233732223511,
-0.6355605125427246,
1.9697649478912354,
-0.3688024580478668,
0.6600698232650757,
-0.3728742003440857,
-1.1648896932601929,
0.06981408596038818,
0.6554055213928223,
0.30754995346069336,
-0.5242191553115845,
0.9023071527481079,
-0.6482473015785217,
-1.0587270259857178,
-1.338158130645752,
-0.2895112633705139,
-1.1142510175704956,
-0.9194202423095703,
1.0996930599212646,
0.7030560374259949,
0.25383684039115906,
1.893743872642517,
0.741356611251831,
0.3977879285812378,
-2.5536861419677734,
0.8996453881263733,
0.2956579029560089,
-0.05488325282931328,
0.860611617565155,
0.34753352403640747,
1.0451606512069702,
-0.01500663161277771,
0.5266353487968445,
-2.5330991744995117,
2.3585638999938965,
-0.18602272868156433,
0.7176809310913086,
-0.011723237112164497,
-0.20764870941638947,
1.1554638147354126,
0.7310277819633484,
0.5138439536094666,
-1.0125623941421509,
0.5448271632194519,
-0.3962637186050415,
1.1491938829421997,
0.9136321544647217,
-0.7809944748878479,
0.03761541098356247,
1.421581506729126,
0.586489200592041,
-0.5275237560272217,
-0.9993638396263123,
-0.8259223103523254,
0.9587014317512512,
1.6569994688034058,
0.037628173828125,
-0.025691289454698563,
0.8265417218208313,
0.6054421067237854,
-1.2618106603622437,
0.008200407959520817,
-0.7125726342201233,
-0.694201648235321,
1.734092354774475,
2.150848865509033,
-0.14338447153568268,
-0.2911941707134247,
-0.5936823487281799,
-1.3603991270065308,
0.8263470530509949,
-0.09215763956308365,
0.2541886270046234,
0.6191326975822449,
-0.6451762318611145,
0.9848113059997559,
0.7577159404754639,
0.965461790561676,
0.2436213195323944,
0.2600826919078827,
0.52177894115448,
-0.3654218912124634,
-1.2214950323104858,
-0.16573257744312286,
-0.9965009093284607,
-2.586381196975708,
0.43563491106033325,
-0.21562452614307404,
-1.385652780532837,
0.0001473529264330864,
-1.0556623935699463,
1.0587968826293945,
-0.5474799275398254,
-1.0493792295455933,
-1.5381152629852295,
0.18510101735591888,
0.00891056377440691,
0.9748376607894897,
-1.5757265090942383,
-0.3815951347351074,
1.2672340869903564,
0.9091302752494812,
-0.6850217580795288,
0.9064911007881165,
0.13464395701885223,
1.0785083770751953,
0.6931905746459961,
-0.39325159788131714,
0.5636615753173828,
-0.08871804177761078,
-1.405534267425537,
0.4150907099246979,
1.2940771579742432,
0.1896951049566269,
1.5401095151901245,
-0.40904733538627625,
0.07434193789958954,
0.3808676302433014,
-0.6257890462875366,
-0.5405478477478027,
-0.43822547793388367,
0.5620914101600647,
0.011923537589609623,
-0.9670467376708984,
-0.20810791850090027,
-0.06359750032424927,
-0.3320789337158203,
0.0983579158782959,
-1.4272021055221558,
-0.1543838530778885,
-0.44766801595687866,
-0.6700143218040466,
-1.2405169010162354,
-0.05082961544394493,
1.3349268436431885,
-0.8272706866264343,
-0.18056705594062805,
0.36062806844711304,
0.3087054193019867,
0.5145432353019714,
0.5688313245773315,
-0.8470059633255005,
-0.1428942233324051,
-0.2799951136112213,
-0.3409467339515686,
0.3020351529121399,
1.4111095666885376,
-0.11761295795440674,
-0.9909440279006958,
0.5706281065940857,
-0.28948307037353516,
0.1262446939945221,
1.9602465629577637,
-0.011728161945939064,
-0.7138206362724304,
0.2880672216415405,
-0.7193821668624878,
1.8780019283294678,
1.7176978588104248,
1.388152003288269,
-0.2108982652425766,
-0.7170239686965942,
0.5826162695884705,
-0.4293741285800934,
-0.4333801567554474,
0.8234938383102417,
0.4173627197742462,
-0.23947124183177948,
-1.5305176973342896,
0.8618257641792297,
1.2041007280349731,
-0.861402153968811,
-0.7641542553901672,
0.1885404735803604,
-0.7944381237030029,
1.1408085823059082,
0.5675075650215149,
0.34229400753974915,
0.41525155305862427,
1.693238377571106,
0.8399849534034729,
-0.48262616991996765,
0.48633673787117004,
0.6560927629470825,
-0.1382572203874588,
-2.052910327911377,
-1.1503816843032837,
0.3851858079433441,
-0.6375354528427124,
-1.5356308221817017,
1.4890028238296509,
-1.0463182926177979,
-1.1744948625564575,
0.5528039932250977,
0.05724215507507324,
1.2575962543487549,
0.46253278851509094,
1.5641926527023315,
2.021538734436035,
0.7903066277503967,
0.465015172958374,
1.1668615341186523,
-0.07981672137975693,
-0.4156991243362427,
1.808485746383667,
-0.4232836961746216,
0.5228972434997559,
1.0768085718154907,
-0.2689119577407837,
-1.113908290863037,
-0.769935667514801,
-1.2955172061920166,
-0.804937481880188,
1.2410717010498047,
0.07633259147405624,
-0.9853799939155579,
0.270153284072876,
1.5850701332092285,
0.09648889303207397,
-0.3497626483440399,
0.718895673751831,
0.35133591294288635,
-0.7825583219528198,
-0.08768313378095627,
-0.896490752696991,
0.5485638380050659,
-0.12365252524614334,
-0.41686660051345825,
0.2301519364118576,
0.5382604598999023,
1.5227910280227661,
-0.08941416442394257,
0.1772885024547577,
1.0585780143737793,
-1.4093265533447266,
1.5773613452911377,
-0.7367566823959351,
0.19313691556453705,
-2.405738592147827,
1.399793028831482,
-0.7187435626983643,
1.9965183734893799,
-2.641876459121704,
0.5409594774246216,
-0.4674511253833771,
-0.4769953787326813,
0.25539159774780273,
-0.4973548948764801,
0.1314738243818283,
-0.08216753602027893,
-1.0640859603881836,
0.029349587857723236,
-0.5935378670692444,
0.7264068126678467,
1.161729097366333,
1.3986780643463135,
-1.1924103498458862,
-0.2667527198791504,
-1.6868666410446167,
-0.19807757437229156,
-0.8229691982269287,
0.22398357093334198,
-1.948373556137085,
-0.24705950915813446,
-1.8363280296325684,
-2.4220645427703857,
-1.1914303302764893,
-0.804402768611908,
1.1830803155899048,
0.0934363380074501,
-0.9415684938430786,
1.337262511253357,
-0.4119330644607544,
-1.8953303098678589,
1.2587909698486328,
-2.1538245677948
] |
https://github.com/huggingface/datasets/issues/4862 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code | I guess this has to do with the cache: you should remove the previously-wrongly generated directory from the cache; otherwise `datasets` tries to re-use it. | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
| 571 | 25 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
I guess this has to do with the cache: you should remove the previously-wrongly generated directory from the cache; otherwise `datasets` tries to re-use it. | [
-1.253296136856079,
-0.9126898646354675,
-0.6568876504898071,
1.4803348779678345,
-0.16987846791744232,
-1.1167373657226562,
0.17479801177978516,
-1.1394572257995605,
1.506750464439392,
-0.8051154017448425,
0.27674582600593567,
-1.59161376953125,
-0.05443645641207695,
-0.5382506847381592,
-0.6629936099052429,
-0.9528822302818298,
-0.42090731859207153,
-0.6956269145011902,
1.1023894548416138,
2.4810240268707275,
1.3796719312667847,
-1.2690436840057373,
2.770026683807373,
0.7667846083641052,
-0.06857726722955704,
-0.9251874089241028,
0.6549254655838013,
0.033550020307302475,
-1.2609604597091675,
-0.4082512855529785,
-0.9493147730827332,
-0.14193539321422577,
-0.4796518087387085,
-0.3666529059410095,
-0.08509648591279984,
0.4938839375972748,
-0.4457423985004425,
-0.45210161805152893,
-0.6961650848388672,
-0.7984670400619507,
0.43396803736686707,
-0.39129799604415894,
0.9141614437103271,
-0.40411514043807983,
1.8477603197097778,
-0.5966731309890747,
0.47750937938690186,
0.727944552898407,
1.1147925853729248,
0.32822051644325256,
0.0988977923989296,
0.27478134632110596,
0.36294975876808167,
-0.07562453299760818,
0.5621953010559082,
1.2582653760910034,
0.6737195253372192,
0.53765469789505,
0.790194034576416,
-2.1121792793273926,
1.2400939464569092,
-1.0578923225402832,
0.25436413288116455,
1.4672828912734985,
-0.8035778403282166,
0.46694695949554443,
-1.8080666065216064,
-0.06555741280317307,
0.5451071858406067,
-2.276102066040039,
0.39141061902046204,
-1.3236095905303955,
-0.602013111114502,
0.9859125018119812,
0.38723263144493103,
-1.1321959495544434,
0.12849262356758118,
-0.47276389598846436,
0.9750926494598389,
0.4077703058719635,
1.0880497694015503,
-1.6393005847930908,
-0.06891418248414993,
-0.2568214237689972,
0.08345973491668701,
-1.293639063835144,
-1.5752919912338257,
0.6113032102584839,
0.5259910821914673,
0.5741018056869507,
-0.11069171875715256,
1.1295135021209717,
-1.0818355083465576,
0.7594508528709412,
-1.0086060762405396,
-1.619336485862732,
-1.4876104593276978,
-2.3604609966278076,
-2.2161881923675537,
0.6901252865791321,
-0.4807244837284088,
-0.6039971709251404,
2.082937002182007,
-1.0304137468338013,
-1.5615118741989136,
1.0970758199691772,
0.27974116802215576,
0.06683202087879181,
2.5031256675720215,
0.24779164791107178,
-0.7515104413032532,
0.4756849408149719,
-0.7729387283325195,
0.7196414470672607,
-0.28512248396873474,
1.2831335067749023,
0.4461726248264313,
-1.0133767127990723,
1.5859586000442505,
-0.38877829909324646,
0.6899599432945251,
-0.5978924036026001,
-0.5221360325813293,
-0.7510809898376465,
0.24450278282165527,
1.8471027612686157,
-0.21129480004310608,
1.5535892248153687,
-0.24412885308265686,
-1.582451581954956,
-1.674163579940796,
0.8900859951972961,
0.4157591164112091,
-0.7256417274475098,
0.058594606816768646,
-0.41939860582351685,
0.1067427396774292,
-0.09484896808862686,
1.2119224071502686,
1.340372085571289,
0.7445563673973083,
-0.40228933095932007,
-0.8364371061325073,
0.039181120693683624,
-0.08426451683044434,
-0.7960355877876282,
-1.6389458179473877,
-0.30305466055870056,
0.15987887978553772,
0.5522024631500244,
-1.2403409481048584,
1.7273023128509521,
0.9847233891487122,
1.8428417444229126,
0.97890704870224,
-0.4084063768386841,
1.4387048482894897,
0.0784708708524704,
1.6866511106491089,
-0.5783265829086304,
0.6046293377876282,
-0.2885037064552307,
-1.2040883302688599,
0.8628702163696289,
-0.25645536184310913,
-2.006528854370117,
-0.9111247658729553,
-0.7331985235214233,
-0.12013818323612213,
-0.7328178882598877,
0.9418691396713257,
-0.2990097999572754,
-1.4336949586868286,
0.21258091926574707,
-0.7743727564811707,
0.027753684669733047,
-1.2890511751174927,
0.3310898244380951,
0.6502978205680847,
-0.677954375743866,
0.035413917154073715,
-0.09327933937311172,
-1.2069146633148193,
-0.4177582859992981,
0.2504974901676178,
1.9634253978729248,
-0.6303500533103943,
0.8159162402153015,
1.0992000102996826,
-0.8163162469863892,
0.06893882900476456,
0.22889040410518646,
-0.37784555554389954,
0.8421657085418701,
-1.0831575393676758,
-0.5461742877960205,
1.2366461753845215,
-0.21183277666568756,
-0.6369394659996033,
1.4876797199249268,
0.6975578665733337,
-1.0335588455200195,
-0.2727079689502716,
-0.07585801929235458,
-0.8564610481262207,
0.03117937594652176,
-1.4688926935195923,
-0.16840429604053497,
0.4861074388027191,
-1.5290106534957886,
-0.5117393136024475,
-0.19878330826759338,
1.3040066957473755,
-0.23633906245231628,
1.4525171518325806,
-0.3864612877368927,
-0.1699233502149582,
-0.29699674248695374,
-0.3657999038696289,
0.09470066428184509,
-0.22965680062770844,
-0.6533419489860535,
0.11151605099439621,
-0.9067264199256897,
0.23274822533130646,
1.4322377443313599,
0.3558287024497986,
0.025628279894590378,
0.5259848833084106,
1.1229538917541504,
0.4642435610294342,
-0.14431679248809814,
-0.8620559573173523,
-1.4722627401351929,
1.835591435432434,
-1.4137662649154663,
2.0082154273986816,
0.7499880790710449,
-0.06355929374694824,
-1.784207820892334,
-1.8885407447814941,
1.249007225036621,
1.163398265838623,
2.3511555194854736,
0.44990918040275574,
0.4163707196712494,
-0.8425601720809937,
-0.7956058382987976,
0.3331499397754669,
-1.0392954349517822,
-0.5645328760147095,
0.2608339190483093,
2.3279426097869873,
1.7849167585372925,
-0.5105103254318237,
-0.21057181060314178,
-0.9294688105583191,
1.3607327938079834,
-0.20606668293476105,
0.1824127435684204,
2.0183775424957275,
-0.21978604793548584,
-1.0489552021026611,
1.3268651962280273,
-2.3663628101348877,
0.17669841647148132,
1.981858253479004,
0.3674497902393341,
0.1281290203332901,
-1.2871754169464111,
-0.7408568859100342,
-0.4526154398918152,
-0.49349528551101685,
-1.2315970659255981,
0.4929649531841278,
-0.1908589005470276,
-0.7843916416168213,
-1.3551864624023438,
0.10325022786855698,
-1.164036750793457,
-1.6492981910705566,
0.24891585111618042,
1.8904883861541748,
2.033353090286255,
-0.8410494923591614,
1.527858853340149,
-0.30530133843421936,
0.006486755795776844,
1.1074907779693604,
1.3571429252624512,
3.111586332321167,
1.8244575262069702,
-1.252483606338501,
0.6229731440544128,
-0.11161933839321136,
-0.40626364946365356,
1.1624698638916016,
-1.2866287231445312,
1.3000199794769287,
-0.10104860365390778,
-1.1422737836837769,
-1.1738651990890503,
0.9020647406578064,
0.43006494641304016,
0.025871247053146362,
-0.4819253385066986,
1.1446576118469238,
0.12053926289081573,
1.4637733697891235,
0.64875328540802,
-0.34480372071266174,
0.5845308303833008,
-0.3820348381996155,
-0.4542333781719208,
1.526969313621521,
0.05479031056165695,
-1.49327552318573,
-2.1826953887939453,
-0.2492327094078064,
-0.8050460815429688,
0.04918154329061508,
-0.5990644693374634,
-1.0761444568634033,
1.7644058465957642,
0.31223469972610474,
-1.176938533782959,
-0.30921876430511475,
-0.3717193007469177,
-0.5440675020217896,
2.7844390869140625,
-1.3145304918289185,
-0.1593686193227768,
-1.0162937641143799,
-0.7093091011047363,
1.6977273225784302,
-1.1879247426986694,
-0.2071063071489334,
-1.0308332443237305,
-0.5120409727096558,
-1.344565510749817,
-0.5243723392486572,
0.13611136376857758,
-1.0356148481369019,
0.8572000861167908,
0.19578102231025696,
-1.1312878131866455,
-0.3326675593852997,
-0.831267774105072,
1.0213218927383423,
-0.15072475373744965,
0.05555454641580582,
1.8973897695541382,
0.29660218954086304,
-0.3296479880809784,
0.7664986252784729,
1.2058104276657104,
0.6593224406242371,
-0.6658397316932678,
0.14018744230270386,
-0.7219914197921753,
0.3182410001754761,
-1.3269270658493042,
0.21528951823711395,
-2.8530404567718506,
0.6039109826087952,
-0.09485752135515213,
-0.08860591799020767,
0.07165762782096863,
-1.270022988319397,
1.144576907157898,
2.5495896339416504,
-1.1639375686645508,
0.4989810287952423,
0.3342503607273102,
1.0685385465621948,
-1.7015266418457031,
0.3974034786224365,
-0.4435388743877411,
1.8879660367965698,
0.26439183950424194,
1.2137553691864014,
-0.5336291790008545,
-2.2668662071228027,
0.6337452530860901,
-1.2421245574951172,
-1.236695408821106,
0.8012263774871826,
-1.0060982704162598,
0.3311386704444885,
-1.4221688508987427,
-0.24106012284755707,
-0.9116091132164001,
-1.1733864545822144,
0.6087899804115295,
0.1103396862745285,
0.31267014145851135,
-0.47084927558898926,
0.40109899640083313,
-2.3087921142578125,
-1.332279086112976,
-0.3129426836967468,
-0.953406810760498,
0.5589680671691895,
-0.4739599823951721,
0.7356805205345154,
-0.17202681303024292,
0.02271942049264908,
0.3810502588748932,
1.5005028247833252,
3.3402514457702637,
0.18332797288894653,
0.19291751086711884,
-0.1301220804452896,
-1.0855661630630493,
1.5627989768981934,
0.8567186594009399,
-0.05333981662988663,
-0.5565051436424255,
-1.042803406715393,
1.2694776058197021,
1.9113855361938477,
1.0791159868240356,
-0.04099678248167038,
-0.8725165128707886,
-0.674746572971344,
-0.05788436532020569,
0.17302511632442474,
0.3628075420856476,
1.0327565670013428,
0.0040795765817165375,
-0.004174330271780491,
1.5627095699310303,
1.1853920221328735,
-0.30737555027008057,
0.09642138332128525,
-0.8546974062919617,
-0.5115512013435364,
0.6001291275024414,
0.21691176295280457,
-0.04440690949559212,
0.47296738624572754,
-1.0316108465194702,
-0.2798590660095215,
-0.438733845949173,
-0.8538624048233032,
-0.6137117147445679,
-0.4106587767601013,
-0.35834217071533203,
1.5959423780441284,
0.10466033965349197,
-0.549644947052002,
-0.029340237379074097,
-0.8194118142127991,
-0.15878070890903473,
-1.2355444431304932,
0.2677352726459503,
-0.07025621831417084,
-0.20774182677268982,
-0.15440037846565247,
1.6754989624023438,
-0.8852893710136414,
-2.081632137298584,
0.13368287682533264,
0.27641183137893677,
-0.145509272813797,
0.1651080846786499,
1.694605827331543,
0.5086035132408142,
1.4034719467163086,
1.1914602518081665,
0.8917753100395203,
-0.6507077217102051,
-1.2655285596847534,
0.6644800305366516,
0.9867412447929382,
-1.3871043920516968,
0.8826608657836914,
-0.13974982500076294,
-0.5711100697517395,
0.5227157473564148,
1.2495899200439453,
0.5474530458450317,
-1.8841992616653442,
0.8648314476013184,
-1.0101913213729858,
0.8137166500091553,
0.6314262747764587,
0.6644769906997681,
0.13199423253536224,
0.8609001636505127,
-1.1671912670135498,
-1.070265293121338,
-0.6114233732223511,
-0.6355605125427246,
1.9697649478912354,
-0.3688024580478668,
0.6600698232650757,
-0.3728742003440857,
-1.1648896932601929,
0.06981408596038818,
0.6554055213928223,
0.30754995346069336,
-0.5242191553115845,
0.9023071527481079,
-0.6482473015785217,
-1.0587270259857178,
-1.338158130645752,
-0.2895112633705139,
-1.1142510175704956,
-0.9194202423095703,
1.0996930599212646,
0.7030560374259949,
0.25383684039115906,
1.893743872642517,
0.741356611251831,
0.3977879285812378,
-2.5536861419677734,
0.8996453881263733,
0.2956579029560089,
-0.05488325282931328,
0.860611617565155,
0.34753352403640747,
1.0451606512069702,
-0.01500663161277771,
0.5266353487968445,
-2.5330991744995117,
2.3585638999938965,
-0.18602272868156433,
0.7176809310913086,
-0.011723237112164497,
-0.20764870941638947,
1.1554638147354126,
0.7310277819633484,
0.5138439536094666,
-1.0125623941421509,
0.5448271632194519,
-0.3962637186050415,
1.1491938829421997,
0.9136321544647217,
-0.7809944748878479,
0.03761541098356247,
1.421581506729126,
0.586489200592041,
-0.5275237560272217,
-0.9993638396263123,
-0.8259223103523254,
0.9587014317512512,
1.6569994688034058,
0.037628173828125,
-0.025691289454698563,
0.8265417218208313,
0.6054421067237854,
-1.2618106603622437,
0.008200407959520817,
-0.7125726342201233,
-0.694201648235321,
1.734092354774475,
2.150848865509033,
-0.14338447153568268,
-0.2911941707134247,
-0.5936823487281799,
-1.3603991270065308,
0.8263470530509949,
-0.09215763956308365,
0.2541886270046234,
0.6191326975822449,
-0.6451762318611145,
0.9848113059997559,
0.7577159404754639,
0.965461790561676,
0.2436213195323944,
0.2600826919078827,
0.52177894115448,
-0.3654218912124634,
-1.2214950323104858,
-0.16573257744312286,
-0.9965009093284607,
-2.586381196975708,
0.43563491106033325,
-0.21562452614307404,
-1.385652780532837,
0.0001473529264330864,
-1.0556623935699463,
1.0587968826293945,
-0.5474799275398254,
-1.0493792295455933,
-1.5381152629852295,
0.18510101735591888,
0.00891056377440691,
0.9748376607894897,
-1.5757265090942383,
-0.3815951347351074,
1.2672340869903564,
0.9091302752494812,
-0.6850217580795288,
0.9064911007881165,
0.13464395701885223,
1.0785083770751953,
0.6931905746459961,
-0.39325159788131714,
0.5636615753173828,
-0.08871804177761078,
-1.405534267425537,
0.4150907099246979,
1.2940771579742432,
0.1896951049566269,
1.5401095151901245,
-0.40904733538627625,
0.07434193789958954,
0.3808676302433014,
-0.6257890462875366,
-0.5405478477478027,
-0.43822547793388367,
0.5620914101600647,
0.011923537589609623,
-0.9670467376708984,
-0.20810791850090027,
-0.06359750032424927,
-0.3320789337158203,
0.0983579158782959,
-1.4272021055221558,
-0.1543838530778885,
-0.44766801595687866,
-0.6700143218040466,
-1.2405169010162354,
-0.05082961544394493,
1.3349268436431885,
-0.8272706866264343,
-0.18056705594062805,
0.36062806844711304,
0.3087054193019867,
0.5145432353019714,
0.5688313245773315,
-0.8470059633255005,
-0.1428942233324051,
-0.2799951136112213,
-0.3409467339515686,
0.3020351529121399,
1.4111095666885376,
-0.11761295795440674,
-0.9909440279006958,
0.5706281065940857,
-0.28948307037353516,
0.1262446939945221,
1.9602465629577637,
-0.011728161945939064,
-0.7138206362724304,
0.2880672216415405,
-0.7193821668624878,
1.8780019283294678,
1.7176978588104248,
1.388152003288269,
-0.2108982652425766,
-0.7170239686965942,
0.5826162695884705,
-0.4293741285800934,
-0.4333801567554474,
0.8234938383102417,
0.4173627197742462,
-0.23947124183177948,
-1.5305176973342896,
0.8618257641792297,
1.2041007280349731,
-0.861402153968811,
-0.7641542553901672,
0.1885404735803604,
-0.7944381237030029,
1.1408085823059082,
0.5675075650215149,
0.34229400753974915,
0.41525155305862427,
1.693238377571106,
0.8399849534034729,
-0.48262616991996765,
0.48633673787117004,
0.6560927629470825,
-0.1382572203874588,
-2.052910327911377,
-1.1503816843032837,
0.3851858079433441,
-0.6375354528427124,
-1.5356308221817017,
1.4890028238296509,
-1.0463182926177979,
-1.1744948625564575,
0.5528039932250977,
0.05724215507507324,
1.2575962543487549,
0.46253278851509094,
1.5641926527023315,
2.021538734436035,
0.7903066277503967,
0.465015172958374,
1.1668615341186523,
-0.07981672137975693,
-0.4156991243362427,
1.808485746383667,
-0.4232836961746216,
0.5228972434997559,
1.0768085718154907,
-0.2689119577407837,
-1.113908290863037,
-0.769935667514801,
-1.2955172061920166,
-0.804937481880188,
1.2410717010498047,
0.07633259147405624,
-0.9853799939155579,
0.270153284072876,
1.5850701332092285,
0.09648889303207397,
-0.3497626483440399,
0.718895673751831,
0.35133591294288635,
-0.7825583219528198,
-0.08768313378095627,
-0.896490752696991,
0.5485638380050659,
-0.12365252524614334,
-0.41686660051345825,
0.2301519364118576,
0.5382604598999023,
1.5227910280227661,
-0.08941416442394257,
0.1772885024547577,
1.0585780143737793,
-1.4093265533447266,
1.5773613452911377,
-0.7367566823959351,
0.19313691556453705,
-2.405738592147827,
1.399793028831482,
-0.7187435626983643,
1.9965183734893799,
-2.641876459121704,
0.5409594774246216,
-0.4674511253833771,
-0.4769953787326813,
0.25539159774780273,
-0.4973548948764801,
0.1314738243818283,
-0.08216753602027893,
-1.0640859603881836,
0.029349587857723236,
-0.5935378670692444,
0.7264068126678467,
1.161729097366333,
1.3986780643463135,
-1.1924103498458862,
-0.2667527198791504,
-1.6868666410446167,
-0.19807757437229156,
-0.8229691982269287,
0.22398357093334198,
-1.948373556137085,
-0.24705950915813446,
-1.8363280296325684,
-2.4220645427703857,
-1.1914303302764893,
-0.804402768611908,
1.1830803155899048,
0.0934363380074501,
-0.9415684938430786,
1.337262511253357,
-0.4119330644607544,
-1.8953303098678589,
1.2587909698486328,
-2.1538245677948
] |
https://github.com/huggingface/datasets/issues/4861 | Using disk for memory with the method `from_dict` | This issue was also causing an OOM in @nateraw 's workflow and shows again that behavior is confusing - we should definitely switch to using the disk IMO | **Is your feature request related to a problem? Please describe.**
I start with an empty dataset. In a loop, at each iteration, I create a new dataset with the method `from_dict` (based on some data I load) and I concatenate this new dataset with the one at the previous iteration. After some iterations, I have an OOM error.
**Describe the solution you'd like**
The method `from_dict` loads the data in RAM. It could be good to add an option to use the disk instead.
**Describe alternatives you've considered**
To solve the problem, I have to do an intermediate step where I save the new datasets at each iteration with `save_to_disk`. Once it's done, I open them all and concatenate them.
| 572 | 28 | Using disk for memory with the method `from_dict`
**Is your feature request related to a problem? Please describe.**
I start with an empty dataset. In a loop, at each iteration, I create a new dataset with the method `from_dict` (based on some data I load) and I concatenate this new dataset with the one at the previous iteration. After some iterations, I have an OOM error.
**Describe the solution you'd like**
The method `from_dict` loads the data in RAM. It could be good to add an option to use the disk instead.
**Describe alternatives you've considered**
To solve the problem, I have to do an intermediate step where I save the new datasets at each iteration with `save_to_disk`. Once it's done, I open them all and concatenate them.
This issue was also causing an OOM in @nateraw 's workflow and shows again that behavior is confusing - we should definitely switch to using the disk IMO | [
-1.2833442687988281,
-0.9995887279510498,
-0.8581191301345825,
1.425827145576477,
-0.2835880517959595,
-1.289388656616211,
0.08140981942415237,
-1.1275689601898193,
1.782219409942627,
-0.8947254419326782,
0.3131628930568695,
-1.6750845909118652,
0.125685453414917,
-0.6059786677360535,
-0.8598031401634216,
-0.8377663493156433,
-0.38730165362358093,
-0.8326417803764343,
0.9493024945259094,
2.4311351776123047,
1.1276313066482544,
-1.3804633617401123,
2.654448986053467,
0.7010064125061035,
-0.09546356648206711,
-1.0072219371795654,
0.5163057446479797,
-0.0004226136952638626,
-1.1686296463012695,
-0.5577735304832458,
-0.96418696641922,
-0.0772022232413292,
-0.5947802066802979,
-0.5310457348823547,
0.004268507473170757,
0.25325649976730347,
-0.25722023844718933,
-0.3281979262828827,
-0.5188615322113037,
-0.8089590072631836,
0.4213826358318329,
-0.39347368478775024,
1.0014901161193848,
-0.5066598057746887,
1.8281660079956055,
-0.5439097285270691,
0.40828952193260193,
0.7518425583839417,
1.4322420358657837,
0.1659335196018219,
-0.041883159428834915,
0.32714030146598816,
0.5234920382499695,
0.025074202567338943,
0.35218545794487,
1.0052706003189087,
0.5697552561759949,
0.5927372574806213,
0.804570734500885,
-2.209693193435669,
1.3842344284057617,
-1.1153253316879272,
0.24348746240139008,
1.4074572324752808,
-0.9064674973487854,
0.3218424618244171,
-1.7757365703582764,
-0.03941833972930908,
0.529129147529602,
-2.3421576023101807,
0.1851193904876709,
-1.3008636236190796,
-0.5768135190010071,
0.9663683176040649,
0.30872082710266113,
-1.3105679750442505,
0.08593953400850296,
-0.38213425874710083,
0.9321258664131165,
0.5052552819252014,
1.1327720880508423,
-1.6926989555358887,
-0.08613373339176178,
-0.39522430300712585,
0.1001395732164383,
-1.389129400253296,
-1.5033503770828247,
0.5905416011810303,
0.5391982793807983,
0.5037516355514526,
-0.1347106248140335,
0.9870203137397766,
-1.0001673698425293,
0.8730612993240356,
-1.0329716205596924,
-1.5967755317687988,
-1.4192242622375488,
-2.2367115020751953,
-2.2231907844543457,
0.8826742768287659,
-0.49784737825393677,
-0.5609031319618225,
1.9509692192077637,
-1.1390693187713623,
-1.7359833717346191,
1.1713823080062866,
0.14443354308605194,
0.08920712023973465,
2.362882375717163,
0.1773482710123062,
-0.587651789188385,
0.4053223133087158,
-0.7313445210456848,
0.8616487383842468,
-0.4667914807796478,
1.4736799001693726,
0.4996317923069,
-1.0060436725616455,
1.6214574575424194,
-0.391628623008728,
0.5123392939567566,
-0.5440723896026611,
-0.5526330471038818,
-0.9446231722831726,
0.4564012587070465,
1.7799917459487915,
-0.2514486610889435,
1.5916961431503296,
-0.4656814634799957,
-1.5781337022781372,
-1.619728446006775,
1.0520349740982056,
0.45736950635910034,
-0.8144265413284302,
0.11297105997800827,
-0.3390530049800873,
0.1216319128870964,
-0.11924625188112259,
1.198749303817749,
1.1931790113449097,
0.7603849768638611,
-0.42502516508102417,
-0.8881190419197083,
0.13437655568122864,
-0.11268933117389679,
-0.7923440933227539,
-1.8032046556472778,
-0.39635249972343445,
0.12413368374109268,
0.7335233092308044,
-1.1017812490463257,
1.6781028509140015,
0.9753521084785461,
1.97366464138031,
1.0759053230285645,
-0.29379361867904663,
1.330004096031189,
0.1231953427195549,
1.827303171157837,
-0.6535266041755676,
0.6948503255844116,
-0.28377673029899597,
-0.9736374020576477,
0.8430832028388977,
-0.3467133343219757,
-2.078603744506836,
-0.8090237379074097,
-0.8831706047058105,
-0.2133074402809143,
-0.6657232046127319,
1.0088300704956055,
-0.38145720958709717,
-1.2956111431121826,
0.298735111951828,
-0.643240749835968,
0.13745898008346558,
-1.171903133392334,
0.35768261551856995,
0.7754192352294922,
-0.6761353015899658,
-0.050173114985227585,
-0.1952357292175293,
-1.3061162233352661,
-0.5165619254112244,
0.2906416952610016,
1.877496361732483,
-0.7246190309524536,
0.9518139958381653,
0.9285898208618164,
-0.7037868499755859,
-0.13513796031475067,
0.4198421537876129,
-0.20540949702262878,
0.7729994058609009,
-0.9720496535301208,
-0.44554945826530457,
1.109666109085083,
-0.3035278916358948,
-0.5364331603050232,
1.4840359687805176,
0.7421969175338745,
-0.9905264973640442,
-0.11922778189182281,
-0.3184509873390198,
-0.9150972962379456,
0.06391937285661697,
-1.6018812656402588,
-0.22615188360214233,
0.25563865900039673,
-1.5674641132354736,
-0.5315064191818237,
-0.18892158567905426,
1.3174668550491333,
-0.09700052440166473,
1.2126916646957397,
-0.3738994002342224,
-0.4486539959907532,
-0.3764722943305969,
-0.35957175493240356,
0.27184027433395386,
-0.09824827313423157,
-0.6347129344940186,
0.23667772114276886,
-0.7785168886184692,
0.3894485533237457,
1.3473083972930908,
0.4004001021385193,
-0.027286238968372345,
0.6132704615592957,
1.070509672164917,
0.3229329586029053,
0.01970503479242325,
-0.8551414012908936,
-1.537678837776184,
2.029585123062134,
-1.527785301208496,
1.8996164798736572,
0.672137439250946,
-0.09262965619564056,
-1.7335352897644043,
-1.7353571653366089,
1.3605459928512573,
1.2292320728302002,
2.2226877212524414,
0.6031132340431213,
0.3390876352787018,
-0.7589155435562134,
-0.6768735647201538,
0.33449414372444153,
-1.0621984004974365,
-0.7622126936912537,
-0.046662796288728714,
2.2840516567230225,
1.7649211883544922,
-0.5100192427635193,
-0.1459556519985199,
-1.0370619297027588,
1.3503354787826538,
-0.09883423894643784,
0.23640590906143188,
2.0098555088043213,
-0.3856087028980255,
-1.0896492004394531,
1.2262834310531616,
-2.2126376628875732,
0.15936946868896484,
1.9778770208358765,
0.31461474299430847,
0.03939957916736603,
-1.4070632457733154,
-0.5867822170257568,
-0.28662797808647156,
-0.44586023688316345,
-1.2728136777877808,
0.5162470936775208,
-0.39070120453834534,
-0.7493745684623718,
-1.4820029735565186,
0.2188071608543396,
-1.1347951889038086,
-1.6167737245559692,
0.40029671788215637,
1.916179895401001,
2.0175719261169434,
-0.5703924298286438,
1.4727144241333008,
-0.22004938125610352,
0.22062371671199799,
1.341506004333496,
1.1314483880996704,
3.1228487491607666,
2.0180063247680664,
-1.2079193592071533,
0.5926158428192139,
-0.09602615237236023,
-0.5744935870170593,
1.1232361793518066,
-1.0951707363128662,
1.2668657302856445,
-0.11054649204015732,
-1.048775315284729,
-1.1640642881393433,
0.9431363344192505,
0.42528122663497925,
0.028152093291282654,
-0.4427851140499115,
1.271958827972412,
0.04346213489770889,
1.279808759689331,
0.49036934971809387,
-0.3643020987510681,
0.581054151058197,
-0.4423520863056183,
-0.6310715675354004,
1.629155158996582,
0.2546744644641876,
-1.451689600944519,
-2.324746608734131,
-0.2845449149608612,
-0.7143939137458801,
0.12993767857551575,
-0.5413903594017029,
-0.8774641156196594,
1.6933783292770386,
0.45142850279808044,
-1.2745306491851807,
-0.306244432926178,
-0.3797191083431244,
-0.6606733202934265,
2.744093656539917,
-1.373169183731079,
-0.27668458223342896,
-0.9220547080039978,
-0.6371991634368896,
1.599725604057312,
-1.3189527988433838,
-0.16387788951396942,
-1.135866403579712,
-0.5883417725563049,
-1.3268405199050903,
-0.525343120098114,
-0.11175242066383362,
-0.9211490750312805,
0.8148782849311829,
0.13035224378108978,
-1.035330057144165,
-0.39111214876174927,
-0.9149355292320251,
0.7398375272750854,
-0.110330730676651,
0.3514699935913086,
1.8532782793045044,
0.46809279918670654,
-0.39846071600914,
0.7000494003295898,
1.1472983360290527,
0.7095963358879089,
-0.6326512694358826,
0.23075713217258453,
-0.6009973287582397,
0.26765507459640503,
-1.2189970016479492,
0.3935908377170563,
-2.9202592372894287,
0.6583746671676636,
-0.07069960981607437,
-0.1775951087474823,
-0.13866418600082397,
-1.3381872177124023,
1.1148816347122192,
2.5276334285736084,
-1.2039505243301392,
0.40842148661613464,
0.2612130641937256,
1.1740566492080688,
-1.6184488534927368,
0.5351854562759399,
-0.37421470880508423,
2.1813437938690186,
0.2837616205215454,
1.1448416709899902,
-0.5471413135528564,
-2.258216619491577,
0.6902520656585693,
-1.1165010929107666,
-1.2271816730499268,
0.6124975681304932,
-0.7807543277740479,
0.10691410303115845,
-1.505778431892395,
-0.24521660804748535,
-0.8826707005500793,
-1.2945467233657837,
0.814907431602478,
0.24876682460308075,
0.4366571307182312,
-0.6917599439620972,
0.24359004199504852,
-2.1707189083099365,
-1.463260293006897,
-0.25342804193496704,
-0.8607454895973206,
0.5498464107513428,
-0.33919790387153625,
0.6445757746696472,
-0.13570041954517365,
0.10888996720314026,
0.31505057215690613,
1.5235998630523682,
3.473790407180786,
0.24748338758945465,
0.5157747268676758,
-0.1325911581516266,
-0.8209619522094727,
1.4359955787658691,
1.0199798345565796,
0.09080279618501663,
-0.5508196353912354,
-1.0110139846801758,
1.228126049041748,
1.9529154300689697,
0.895518958568573,
0.07248229533433914,
-0.6361391544342041,
-0.5619856119155884,
-0.057390354573726654,
0.21187885105609894,
0.45930925011634827,
0.845333993434906,
0.07438111305236816,
0.033366456627845764,
1.4075102806091309,
1.2433182001113892,
-0.48573237657546997,
0.3914557993412018,
-0.7674237489700317,
-0.39319607615470886,
0.39187607169151306,
0.4069831073284149,
-0.0789160430431366,
0.3140302002429962,
-0.9067628979682922,
-0.2430867701768875,
-0.33380216360092163,
-1.0281200408935547,
-0.6849496960639954,
-0.491964727640152,
-0.44443124532699585,
1.6469335556030273,
0.16167184710502625,
-0.5394765138626099,
-0.14515718817710876,
-0.7696291208267212,
-0.049308937042951584,
-1.0680289268493652,
0.2175237387418747,
-0.13991859555244446,
-0.11787531524896622,
-0.06472992897033691,
1.7824361324310303,
-0.9179514050483704,
-2.0477757453918457,
0.2519497871398926,
0.3232484459877014,
-0.4462532103061676,
0.2375151664018631,
1.5571423768997192,
0.4630200266838074,
1.4653359651565552,
1.408444881439209,
0.9289530515670776,
-0.6424277424812317,
-1.3887341022491455,
0.6618782877922058,
0.8983442187309265,
-1.4644050598144531,
0.7449989318847656,
0.1583644449710846,
-0.5966651439666748,
0.8073634505271912,
1.2036539316177368,
0.4167870879173279,
-2.0316009521484375,
0.8005472421646118,
-0.8334177732467651,
0.8180597424507141,
0.7191227674484253,
0.6656913757324219,
0.25848066806793213,
0.898212730884552,
-1.2230215072631836,
-1.189865231513977,
-0.8773885369300842,
-0.6560867428779602,
2.013087511062622,
-0.2656501233577728,
0.5716211199760437,
-0.10550127178430557,
-1.1994194984436035,
-0.11397705972194672,
0.6333273649215698,
0.4440963864326477,
-0.2883846163749695,
0.7003886103630066,
-0.7014746069908142,
-1.1980597972869873,
-1.5021766424179077,
-0.36904555559158325,
-0.9420281052589417,
-0.9133604168891907,
1.0372751951217651,
0.866205632686615,
0.205348938703537,
2.002199649810791,
0.6619210839271545,
0.2685534954071045,
-2.6005916595458984,
0.852019727230072,
0.2789481282234192,
0.006956026889383793,
0.9119877219200134,
0.38602688908576965,
1.012436032295227,
0.024147648364305496,
0.5348374843597412,
-2.461242198944092,
2.2088229656219482,
-0.42401382327079773,
0.653823733329773,
0.01280596386641264,
-0.20521043241024017,
1.2900961637496948,
0.6197090148925781,
0.578417181968689,
-1.0419741868972778,
0.6750251650810242,
-0.6383153200149536,
1.2698301076889038,
0.9960368871688843,
-0.6712493300437927,
-0.04982566833496094,
1.3522791862487793,
0.5612364411354065,
-0.5481749773025513,
-0.9411417841911316,
-1.0055543184280396,
0.8566699028015137,
1.7333297729492188,
-0.0876912772655487,
-0.0778547152876854,
0.7577946186065674,
0.774135947227478,
-1.215848684310913,
0.21428419649600983,
-0.768041729927063,
-0.9159116744995117,
1.596958041191101,
2.090421676635742,
-0.10950911045074463,
-0.15045732259750366,
-0.7157436013221741,
-1.1777187585830688,
0.7639375925064087,
0.018791187554597855,
0.08356688171625137,
0.6489084362983704,
-0.5795148611068726,
1.0527676343917847,
0.93622887134552,
0.8997540473937988,
0.22454527020454407,
0.3899455666542053,
0.4672468900680542,
-0.20537373423576355,
-1.0351557731628418,
-0.28418096899986267,
-1.170534610748291,
-2.4768331050872803,
0.519865870475769,
-0.40417757630348206,
-1.5103023052215576,
-0.044025007635354996,
-1.0618945360183716,
0.8588292002677917,
-0.49442651867866516,
-1.0996826887130737,
-1.6176053285598755,
0.11343229562044144,
0.05184759944677353,
0.9311690926551819,
-1.6328837871551514,
-0.07125834375619888,
1.2400473356246948,
0.8168908357620239,
-0.5439745783805847,
1.0271825790405273,
0.26509547233581543,
1.1048362255096436,
0.7935416102409363,
-0.5842647552490234,
0.4088785946369171,
0.06714583188295364,
-1.4151777029037476,
0.547486424446106,
1.1092896461486816,
0.1208583191037178,
1.476453185081482,
-0.49565109610557556,
0.24446655809879303,
0.444031298160553,
-0.5539960861206055,
-0.4670955240726471,
-0.5385287404060364,
0.7696973085403442,
0.016747206449508667,
-0.7664953470230103,
0.1498057246208191,
-0.10236350446939468,
-0.29583171010017395,
0.2055676132440567,
-1.5044658184051514,
-0.28671255707740784,
-0.45282524824142456,
-0.6145152449607849,
-1.2313472032546997,
-0.09150982648134232,
1.4486083984375,
-0.6814196109771729,
-0.18925268948078156,
0.6284164190292358,
0.5474370121955872,
0.5127274394035339,
0.6816475987434387,
-0.6482675671577454,
-0.3229253590106964,
-0.2939222753047943,
-0.3142373859882355,
0.2905349135398865,
1.2895941734313965,
-0.21517877280712128,
-0.9480128884315491,
0.6467511057853699,
-0.2918951213359833,
-0.05516071245074272,
1.9119846820831299,
0.12296261638402939,
-0.7287960052490234,
0.357476145029068,
-0.805939257144928,
1.8770664930343628,
1.6467901468276978,
1.273427963256836,
-0.05443590134382248,
-0.9446677565574646,
0.6234076619148254,
-0.25067809224128723,
-0.4694530963897705,
0.96649569272995,
0.4882376492023468,
-0.09582031518220901,
-1.3206740617752075,
0.6258128881454468,
1.1967624425888062,
-0.8877906203269958,
-0.9267538189888,
0.06999535858631134,
-0.7729626297950745,
1.0789775848388672,
0.6419379115104675,
0.507183849811554,
0.3057762086391449,
1.7244343757629395,
0.6961573362350464,
-0.5556145906448364,
0.4880325496196747,
0.5352858901023865,
-0.1936839371919632,
-2.1490073204040527,
-1.1972205638885498,
0.29140540957450867,
-0.5286260843276978,
-1.5796208381652832,
1.4225066900253296,
-1.0953062772750854,
-0.8396887183189392,
0.6023239493370056,
0.13797760009765625,
1.5019264221191406,
0.4069168269634247,
1.6533502340316772,
2.0856685638427734,
0.7767496109008789,
0.48801425099372864,
1.4071649312973022,
-0.12052284181118011,
-0.5113438963890076,
1.894262433052063,
-0.3836009204387665,
0.5408350229263306,
1.230926752090454,
-0.285041481256485,
-1.106156349182129,
-0.7647202014923096,
-1.0217342376708984,
-0.6211838722229004,
1.0979030132293701,
0.12830476462841034,
-1.221271276473999,
0.1535767763853073,
1.4670497179031372,
0.16715608537197113,
-0.3435555398464203,
0.39847230911254883,
0.4139474928379059,
-0.7573843002319336,
-0.11563602834939957,
-1.0918594598770142,
0.5888644456863403,
-0.3318834900856018,
-0.3882543742656708,
0.34657442569732666,
0.5013664364814758,
1.238945722579956,
-0.20267602801322937,
0.18677227199077606,
1.2095478773117065,
-1.4947857856750488,
1.44920814037323,
-0.5824543833732605,
0.18507859110832214,
-2.3009912967681885,
1.4153870344161987,
-0.6314265727996826,
1.9935989379882812,
-2.7345550060272217,
0.25202226638793945,
-0.6656631827354431,
-0.491651326417923,
0.4558767080307007,
-0.2673858106136322,
0.09024079144001007,
-0.19411690533161163,
-1.1676077842712402,
0.09040936082601547,
-0.7541767358779907,
0.47920501232147217,
1.1863746643066406,
1.4469482898712158,
-1.0902793407440186,
-0.3209760785102844,
-1.6968486309051514,
-0.20625039935112,
-0.691198468208313,
0.37617793679237366,
-2.032194137573242,
-0.17137466371059418,
-1.9317600727081299,
-2.2826104164123535,
-1.3286352157592773,
-0.8751346468925476,
1.0646281242370605,
0.12487571686506271,
-0.7905678153038025,
1.098178744316101,
-0.35103681683540344,
-1.8005707263946533,
1.0293948650360107,
-2.136781692504883
] |
https://github.com/huggingface/datasets/issues/4858 | map() function removes columns when input_columns is not None | Hi! Thanks for reporting! This looks like a bug. I've just opened a PR with the fix. | ## Describe the bug
The map function, removes features from the dataset that are not present in the _input_columns_ list of columns, despite the columns being removed not mentioned in the _remove_columns_ argument.
## Steps to reproduce the bug
```python
from datasets import Dataset
ds = Dataset.from_dict({"a" : [1,2,3],"b" : [0,1,0], "c" : [2,4,5]})
def double(x,y):
x = x*2
y = y*2
return {"d" : x, "e" : y}
ds.map(double, input_columns=["a","c"])
```
## Expected results
```
Dataset({
features: ['a', 'b', 'c', 'd', 'e'],
num_rows: 3
})
```
## Actual results
```
Dataset({
features: ['a', 'c', 'd', 'e'],
num_rows: 3
})
```
In this specific example feature **b** should not be removed.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: linux (colab)
- Python version: 3.7.13
- PyArrow version: 6.0.1
| 573 | 17 | map() function removes columns when input_columns is not None
## Describe the bug
The map function, removes features from the dataset that are not present in the _input_columns_ list of columns, despite the columns being removed not mentioned in the _remove_columns_ argument.
## Steps to reproduce the bug
```python
from datasets import Dataset
ds = Dataset.from_dict({"a" : [1,2,3],"b" : [0,1,0], "c" : [2,4,5]})
def double(x,y):
x = x*2
y = y*2
return {"d" : x, "e" : y}
ds.map(double, input_columns=["a","c"])
```
## Expected results
```
Dataset({
features: ['a', 'b', 'c', 'd', 'e'],
num_rows: 3
})
```
## Actual results
```
Dataset({
features: ['a', 'c', 'd', 'e'],
num_rows: 3
})
```
In this specific example feature **b** should not be removed.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: linux (colab)
- Python version: 3.7.13
- PyArrow version: 6.0.1
Hi! Thanks for reporting! This looks like a bug. I've just opened a PR with the fix. | [
-1.1723507642745972,
-0.8640769720077515,
-0.7507316470146179,
1.552128553390503,
-0.19795067608356476,
-1.1992037296295166,
0.1483670026063919,
-1.042615294456482,
1.6948589086532593,
-0.7471771836280823,
0.25080132484436035,
-1.7325899600982666,
-0.0008681816980242729,
-0.6869249939918518,
-0.7423127293586731,
-0.8622021675109863,
-0.38034588098526,
-0.7156246304512024,
1.0397820472717285,
2.4492318630218506,
1.1294512748718262,
-1.4493179321289062,
2.6355576515197754,
0.7117162346839905,
-0.1443301886320114,
-0.9582371711730957,
0.5632023811340332,
-0.07255782186985016,
-1.2732468843460083,
-0.3898453414440155,
-0.928310751914978,
-0.14833350479602814,
-0.5523455739021301,
-0.4900883138179779,
-0.0822196751832962,
0.4874759912490845,
-0.32490915060043335,
-0.4802172780036926,
-0.4823355972766876,
-0.8491965532302856,
0.3806403577327728,
-0.3765200972557068,
0.9257714152336121,
-0.41531679034233093,
1.7792688608169556,
-0.5432416796684265,
0.43392813205718994,
0.6842505931854248,
1.310387134552002,
0.23666919767856598,
0.0014946963638067245,
0.3629533052444458,
0.37789541482925415,
-0.05830966681241989,
0.49248528480529785,
1.083566665649414,
0.6477978229522705,
0.41370561718940735,
0.8034849762916565,
-2.2567951679229736,
1.2546179294586182,
-1.0784883499145508,
0.32587042450904846,
1.457741379737854,
-0.9068439602851868,
0.4194033145904541,
-1.71413254737854,
-0.04177214205265045,
0.5983254313468933,
-2.2024199962615967,
0.30144160985946655,
-1.2892909049987793,
-0.5240745544433594,
1.0086493492126465,
0.46204280853271484,
-1.2525728940963745,
0.01823715679347515,
-0.3575168550014496,
0.9484397172927856,
0.3378630578517914,
1.0141907930374146,
-1.7339942455291748,
0.015099218115210533,
-0.3317740559577942,
0.1621979922056198,
-1.2895628213882446,
-1.516492486000061,
0.5753887891769409,
0.6047267317771912,
0.5864022970199585,
-0.14510487020015717,
1.0072741508483887,
-1.0550633668899536,
0.6947546601295471,
-1.0247052907943726,
-1.7889410257339478,
-1.4052187204360962,
-2.292109251022339,
-2.2263388633728027,
0.7347856163978577,
-0.44447487592697144,
-0.4724441170692444,
1.9996165037155151,
-0.923351526260376,
-1.6619428396224976,
1.1682991981506348,
0.36930131912231445,
0.006658816710114479,
2.41960072517395,
0.18719837069511414,
-0.7573837041854858,
0.5531808137893677,
-0.8585866093635559,
0.7318844795227051,
-0.4289543926715851,
1.3350200653076172,
0.38532787561416626,
-1.1100224256515503,
1.6271123886108398,
-0.45703956484794617,
0.606048583984375,
-0.6717908978462219,
-0.4471481144428253,
-0.7507407665252686,
0.3325526714324951,
1.8776952028274536,
-0.21220679581165314,
1.4347054958343506,
-0.23895789682865143,
-1.5069153308868408,
-1.528367519378662,
0.9171307682991028,
0.3903317153453827,
-0.8080517053604126,
0.15945398807525635,
-0.36692923307418823,
0.14146040380001068,
-0.17555701732635498,
1.1879148483276367,
1.3086003065109253,
0.7223641276359558,
-0.29654228687286377,
-0.8758037686347961,
0.17901365458965302,
-0.12813110649585724,
-0.8190937042236328,
-1.7306162118911743,
-0.3203098475933075,
0.11289956420660019,
0.6224491000175476,
-1.1786820888519287,
1.8215129375457764,
0.8529880046844482,
1.932745099067688,
0.9606779217720032,
-0.445036381483078,
1.4966704845428467,
0.13252612948417664,
1.8974356651306152,
-0.5239894986152649,
0.68165522813797,
-0.4255884289741516,
-1.1715657711029053,
0.9158535003662109,
-0.33338770270347595,
-2.01033616065979,
-0.7295664548873901,
-0.8578211665153503,
-0.20782139897346497,
-0.8042888641357422,
0.960342288017273,
-0.24957983195781708,
-1.4186270236968994,
0.32271793484687805,
-0.7967345714569092,
0.14651121199131012,
-1.251225471496582,
0.3167206346988678,
0.7679174542427063,
-0.549588680267334,
0.04894053190946579,
-0.2448023408651352,
-1.300805926322937,
-0.48592546582221985,
0.3398231267929077,
1.8692905902862549,
-0.682610809803009,
0.9159259796142578,
1.0734384059906006,
-0.6501725912094116,
-0.05781584978103638,
0.28147298097610474,
-0.3685086965560913,
0.8476915955543518,
-1.0489503145217896,
-0.5755021572113037,
1.203956961631775,
-0.2241775244474411,
-0.5941911935806274,
1.5018789768218994,
0.6773794293403625,
-1.0069061517715454,
-0.1726757436990738,
-0.1600378453731537,
-0.8130624890327454,
0.029809894040226936,
-1.5831655263900757,
-0.02272062376141548,
0.5116432309150696,
-1.5577507019042969,
-0.45520082116127014,
-0.15501749515533447,
1.2902116775512695,
-0.1586095094680786,
1.3414626121520996,
-0.3640940487384796,
-0.18037080764770508,
-0.4444347321987152,
-0.3574138879776001,
0.11355151981115341,
-0.24977204203605652,
-0.622640073299408,
0.1651671677827835,
-0.7497581243515015,
0.3579927086830139,
1.4145063161849976,
0.2810518443584442,
0.05126757174730301,
0.5689479112625122,
1.1217771768569946,
0.40725624561309814,
-0.016237711533904076,
-0.8836643695831299,
-1.514149785041809,
1.9865062236785889,
-1.4772719144821167,
1.972377896308899,
0.6852390766143799,
-0.02600894682109356,
-1.788908839225769,
-1.9194339513778687,
1.4329615831375122,
1.1525520086288452,
2.184690475463867,
0.5700391530990601,
0.48229002952575684,
-0.8670980930328369,
-0.672804057598114,
0.21233537793159485,
-0.8941264748573303,
-0.7002694606781006,
0.18730108439922333,
2.426100492477417,
1.7562352418899536,
-0.4384109377861023,
-0.15007555484771729,
-1.0311005115509033,
1.5313351154327393,
-0.24872030317783356,
0.1880800724029541,
2.016968011856079,
-0.22110769152641296,
-1.1193917989730835,
1.3376131057739258,
-2.3880083560943604,
0.17155593633651733,
2.0462167263031006,
0.28854289650917053,
0.14017561078071594,
-1.3146414756774902,
-0.7049217820167542,
-0.3028022348880768,
-0.4195069670677185,
-1.2679378986358643,
0.5088043808937073,
-0.18599961698055267,
-0.7427741885185242,
-1.4420647621154785,
0.2836061120033264,
-1.0941433906555176,
-1.653702735900879,
0.13831721246242523,
1.8107529878616333,
2.0655314922332764,
-0.7382741570472717,
1.5920156240463257,
-0.20426832139492035,
0.24630512297153473,
1.2208563089370728,
1.1989245414733887,
3.055717706680298,
1.8950132131576538,
-1.223769187927246,
0.6102220416069031,
-0.11453232169151306,
-0.4816119968891144,
1.2283296585083008,
-1.200005054473877,
1.284623384475708,
-0.1707705855369568,
-1.199205994606018,
-1.2603106498718262,
0.840358316898346,
0.4675218164920807,
0.08917412161827087,
-0.492166131734848,
1.1666234731674194,
0.07584549486637115,
1.283078670501709,
0.6208354830741882,
-0.21805110573768616,
0.49133533239364624,
-0.42428380250930786,
-0.48695817589759827,
1.5595835447311401,
0.21767909824848175,
-1.4358822107315063,
-2.304826259613037,
-0.2620905339717865,
-0.8611844182014465,
0.011178035289049149,
-0.6623120307922363,
-1.035752773284912,
1.6757944822311401,
0.3860009014606476,
-1.1219313144683838,
-0.28368744254112244,
-0.3469066321849823,
-0.5758644342422485,
2.7606019973754883,
-1.402317762374878,
-0.327632337808609,
-0.9770838022232056,
-0.7161370515823364,
1.6891005039215088,
-1.216538906097412,
-0.16339467465877533,
-1.0654792785644531,
-0.48908230662345886,
-1.2758859395980835,
-0.5439250469207764,
-0.008118053898215294,
-0.9990445375442505,
0.948099672794342,
0.24609167873859406,
-1.292015790939331,
-0.3847145438194275,
-0.9603068232536316,
0.8607807159423828,
-0.1512441635131836,
0.193203404545784,
1.8244603872299194,
0.38303038477897644,
-0.3333350718021393,
0.7615602016448975,
1.1791126728057861,
0.7067962288856506,
-0.6337273120880127,
0.2268780767917633,
-0.5738018155097961,
0.43349847197532654,
-1.256126046180725,
0.20714853703975677,
-2.871000051498413,
0.5599265098571777,
-0.07058550417423248,
-0.08442693948745728,
-0.0525670126080513,
-1.3056089878082275,
1.1336857080459595,
2.5241682529449463,
-1.2381166219711304,
0.5089757442474365,
0.2673369348049164,
1.2897586822509766,
-1.6683169603347778,
0.25557032227516174,
-0.4521971046924591,
2.2046210765838623,
0.04430770128965378,
1.1171454191207886,
-0.4459024667739868,
-2.4116616249084473,
0.6107909083366394,
-1.2887187004089355,
-1.1372076272964478,
0.6622152328491211,
-0.8435547351837158,
0.17897456884384155,
-1.4956462383270264,
-0.23153524100780487,
-0.8504568934440613,
-1.169685959815979,
0.6759880185127258,
0.02545722760260105,
0.4624795615673065,
-0.6068506836891174,
0.3756468892097473,
-2.271362066268921,
-1.4758164882659912,
-0.23998339474201202,
-0.9216622114181519,
0.5301629900932312,
-0.34898826479911804,
0.8079507946968079,
-0.13079023361206055,
-0.020467868074774742,
0.2752171456813812,
1.481413722038269,
3.475675344467163,
0.1477561742067337,
0.4171942174434662,
-0.19439665973186493,
-0.9520406723022461,
1.4008338451385498,
0.9555739164352417,
-0.1009797602891922,
-0.5560870170593262,
-0.9930558204650879,
1.3839890956878662,
1.9669787883758545,
0.9361674785614014,
-0.015309286303818226,
-0.7730132937431335,
-0.6881992220878601,
-0.0648556798696518,
0.20528344810009003,
0.44284969568252563,
0.8634771108627319,
0.07367097586393356,
0.048547349870204926,
1.4644230604171753,
1.1463589668273926,
-0.35039475560188293,
0.3061355948448181,
-0.8170222043991089,
-0.45014598965644836,
0.6282743215560913,
0.2999114394187927,
-0.028876155614852905,
0.42423486709594727,
-1.0367885828018188,
-0.34180203080177307,
-0.3011530339717865,
-0.8653298020362854,
-0.7180753946304321,
-0.4390102028846741,
-0.37489381432533264,
1.6281704902648926,
0.11614620685577393,
-0.6183135509490967,
-0.006282994523644447,
-0.7478480339050293,
-0.033148810267448425,
-1.0647937059402466,
0.1939668357372284,
-0.19514186680316925,
-0.09224525839090347,
-0.2219097763299942,
1.7945077419281006,
-0.9181507229804993,
-2.0490145683288574,
0.05084574222564697,
0.3884905278682709,
-0.2615969181060791,
0.18355411291122437,
1.6599229574203491,
0.5925706028938293,
1.4845272302627563,
1.3282837867736816,
0.9668839573860168,
-0.7032988667488098,
-1.4024906158447266,
0.6540735960006714,
1.0332789421081543,
-1.3697584867477417,
0.8001282811164856,
0.026825087144970894,
-0.5442973375320435,
0.5868850946426392,
1.3243135213851929,
0.5044994950294495,
-1.985358476638794,
0.7084611654281616,
-1.0821049213409424,
0.916103720664978,
0.7938336730003357,
0.6594446301460266,
0.1989143043756485,
0.7358208298683167,
-1.2557159662246704,
-1.0549767017364502,
-0.7345337867736816,
-0.7198240160942078,
1.9705599546432495,
-0.3388109505176544,
0.6004242897033691,
-0.1448984295129776,
-1.325908899307251,
-0.03327100723981857,
0.6816208958625793,
0.42102280259132385,
-0.4448715150356293,
0.7834784388542175,
-0.6616418361663818,
-1.1004586219787598,
-1.3455606698989868,
-0.47814711928367615,
-1.037215232849121,
-0.9648438096046448,
1.0110673904418945,
0.8239511847496033,
0.3210824728012085,
1.8249861001968384,
0.7409506440162659,
0.1598559319972992,
-2.4843451976776123,
0.8646346926689148,
0.3297741115093231,
-0.1051933690905571,
0.787356436252594,
0.35138964653015137,
1.0846295356750488,
-0.05394323170185089,
0.6063644289970398,
-2.4239964485168457,
2.2655088901519775,
-0.17399157583713531,
0.6698946952819824,
-0.043307386338710785,
-0.15085287392139435,
1.0131173133850098,
0.562431812286377,
0.47068312764167786,
-1.018873929977417,
0.6075547933578491,
-0.6167979836463928,
1.2920483350753784,
0.880000114440918,
-0.7916500568389893,
-0.06404481083154678,
1.3485792875289917,
0.4810495972633362,
-0.5907665491104126,
-0.9844930768013,
-0.8866890072822571,
0.9468562602996826,
1.6486486196517944,
-0.05611327290534973,
0.00906607136130333,
0.8214424848556519,
0.6464511752128601,
-1.2939293384552002,
0.052202120423316956,
-0.7316626310348511,
-0.6389836072921753,
1.758851408958435,
2.0879597663879395,
-0.23257263004779816,
-0.07016656547784805,
-0.745637834072113,
-1.3645422458648682,
0.7507914304733276,
-0.007658550515770912,
0.00570673868060112,
0.6204591393470764,
-0.6375346779823303,
0.9682198166847229,
0.8631224036216736,
0.922200083732605,
0.28893619775772095,
0.29180794954299927,
0.3658764362335205,
-0.3650575578212738,
-1.1412699222564697,
-0.20676779747009277,
-1.0852282047271729,
-2.552046060562134,
0.4144767224788666,
-0.2188849002122879,
-1.3623614311218262,
-0.011856351047754288,
-0.985037088394165,
1.0335131883621216,
-0.5297091603279114,
-1.1417593955993652,
-1.420441746711731,
0.2603340148925781,
0.03439721465110779,
0.9666106104850769,
-1.5894134044647217,
-0.13104982674121857,
1.3105270862579346,
0.8886520862579346,
-0.7788507342338562,
0.9481004476547241,
0.25201451778411865,
1.110234022140503,
0.828425407409668,
-0.40468087792396545,
0.539030909538269,
-0.0033076126128435135,
-1.3061655759811401,
0.5256006121635437,
1.2276294231414795,
0.14582723379135132,
1.4801095724105835,
-0.5100730061531067,
-0.0696379765868187,
0.3764663636684418,
-0.4476051330566406,
-0.46205443143844604,
-0.5712407231330872,
0.5909209251403809,
0.13163433969020844,
-0.8841325640678406,
0.0009434148669242859,
0.06713292002677917,
-0.26341837644577026,
0.18189632892608643,
-1.4745432138442993,
-0.14150354266166687,
-0.364653617143631,
-0.6028715968132019,
-1.1890990734100342,
-0.16218622028827667,
1.3678600788116455,
-0.650715172290802,
-0.16203464567661285,
0.5243504047393799,
0.32323336601257324,
0.494625985622406,
0.6650722622871399,
-0.6697865724563599,
-0.36991891264915466,
-0.22569721937179565,
-0.30160680413246155,
0.27389875054359436,
1.3799999952316284,
-0.07622471451759338,
-0.9653704166412354,
0.6938261985778809,
-0.3849298655986786,
0.032149992883205414,
1.8560551404953003,
0.08348092436790466,
-0.898934543132782,
0.33134278655052185,
-0.7088621258735657,
1.9530279636383057,
1.699655532836914,
1.2760862112045288,
-0.12014146894216537,
-0.9158517718315125,
0.6753550171852112,
-0.3757408559322357,
-0.42427316308021545,
0.8567448854446411,
0.35510438680648804,
-0.2752580940723419,
-1.414239525794983,
0.7962408065795898,
1.270196795463562,
-0.8201954960823059,
-0.8841280341148376,
0.2220451682806015,
-0.8222239017486572,
1.1483162641525269,
0.7221437096595764,
0.4665523171424866,
0.3883441686630249,
1.7032623291015625,
0.8235082626342773,
-0.4749358296394348,
0.5373660922050476,
0.5722041726112366,
-0.15502971410751343,
-2.015414237976074,
-1.2399437427520752,
0.27243560552597046,
-0.5759937167167664,
-1.5689014196395874,
1.3783971071243286,
-1.1180038452148438,
-0.900851845741272,
0.5653051733970642,
0.08668268471956253,
1.3747929334640503,
0.42432740330696106,
1.4784581661224365,
1.954527497291565,
0.8116455078125,
0.41778993606567383,
1.2429651021957397,
-0.21435712277889252,
-0.4777834713459015,
1.7419805526733398,
-0.46259990334510803,
0.510003924369812,
1.093392252922058,
-0.3460959196090698,
-1.1380020380020142,
-0.7475100755691528,
-1.2225384712219238,
-0.7300028800964355,
1.1342129707336426,
0.10799214988946915,
-1.1475062370300293,
0.27377617359161377,
1.5552242994308472,
0.050797149538993835,
-0.34065622091293335,
0.6413195133209229,
0.3913208544254303,
-0.9103595614433289,
-0.08163630962371826,
-0.9442055821418762,
0.5714460611343384,
-0.22871096432209015,
-0.2527233362197876,
0.3905697762966156,
0.5665465593338013,
1.410394549369812,
-0.02791912481188774,
0.16440647840499878,
1.0832172632217407,
-1.4562288522720337,
1.4828808307647705,
-0.7998012900352478,
0.2079978734254837,
-2.3344390392303467,
1.3206629753112793,
-0.6851678490638733,
2.046217918395996,
-2.708527088165283,
0.4198808968067169,
-0.5209676623344421,
-0.4827045202255249,
0.2767569422721863,
-0.3698139190673828,
0.13528843224048615,
-0.08490119129419327,
-1.1958222389221191,
-0.03857029229402542,
-0.7077552676200867,
0.48241692781448364,
1.1688182353973389,
1.4069546461105347,
-1.060115098953247,
-0.3034915328025818,
-1.6492425203323364,
-0.12920187413692474,
-0.6073576807975769,
0.2519553005695343,
-1.9459943771362305,
-0.2085043340921402,
-1.8904943466186523,
-2.3274471759796143,
-1.3090628385543823,
-0.8226079940795898,
1.1654521226882935,
0.02692687325179577,
-0.9448902606964111,
1.2921557426452637,
-0.31773391366004944,
-1.8196296691894531,
1.128461241722107,
-2.136739492416382
] |
https://github.com/huggingface/datasets/issues/4857 | No preprocessed wikipedia is working on huggingface/datasets | Thanks for reporting @aninrusimha.
Please, note that the preprocessed datasets are still available, as described in the dataset card, e.g.: https://huggingface.co/datasets/wikipedia
```python
ds = load_dataset("wikipedia", "20220301.en")
``` | ## Describe the bug
20220301 wikipedia dump has been deprecated, so now there is no working wikipedia dump on huggingface
https://huggingface.co/datasets/wikipedia
https://dumps.wikimedia.org/enwiki/
| 574 | 27 | No preprocessed wikipedia is working on huggingface/datasets
## Describe the bug
20220301 wikipedia dump has been deprecated, so now there is no working wikipedia dump on huggingface
https://huggingface.co/datasets/wikipedia
https://dumps.wikimedia.org/enwiki/
Thanks for reporting @aninrusimha.
Please, note that the preprocessed datasets are still available, as described in the dataset card, e.g.: https://huggingface.co/datasets/wikipedia
```python
ds = load_dataset("wikipedia", "20220301.en")
``` | [
-1.1456701755523682,
-0.9590519070625305,
-0.8285929560661316,
1.4796454906463623,
-0.21230773627758026,
-1.298377513885498,
0.12592338025569916,
-0.9270332455635071,
1.6895262002944946,
-0.7727161645889282,
0.31812769174575806,
-1.7803170680999756,
-0.21536371111869812,
-0.45180684328079224,
-0.7618019580841064,
-0.9497725963592529,
-0.36801815032958984,
-0.7174484133720398,
0.9705014228820801,
2.5062239170074463,
1.230987310409546,
-1.3198004961013794,
2.643193006515503,
0.5728579163551331,
-0.19066862761974335,
-1.0947120189666748,
0.6594793796539307,
0.08966033160686493,
-1.1881054639816284,
-0.4181072413921356,
-1.0041723251342773,
0.020652562379837036,
-0.542253851890564,
-0.4733227789402008,
0.09732265770435333,
0.4381394684314728,
-0.22756972908973694,
-0.3275090754032135,
-0.5214086771011353,
-0.7490587830543518,
0.5426284074783325,
-0.3585912585258484,
0.9498798847198486,
-0.48558831214904785,
1.7670029401779175,
-0.6766146421432495,
0.2725997269153595,
0.7269977331161499,
1.3365048170089722,
0.1970587521791458,
-0.0032868292182683945,
0.19839568436145782,
0.41127809882164,
-0.017375411465764046,
0.42540010809898376,
1.149169683456421,
0.5162346363067627,
0.5935649275779724,
0.6964961886405945,
-2.2176849842071533,
1.3492401838302612,
-1.129707932472229,
0.32838842272758484,
1.3732357025146484,
-1.0521399974822998,
0.2747023105621338,
-1.7160720825195312,
-0.06655199825763702,
0.48639729619026184,
-2.2708444595336914,
0.2057945877313614,
-1.2012262344360352,
-0.5610644221305847,
0.9377413392066956,
0.31568002700805664,
-1.3332030773162842,
0.13352923095226288,
-0.3033013343811035,
1.0209014415740967,
0.5552573204040527,
1.1295740604400635,
-1.6944283246994019,
0.09643665701150894,
-0.3256073296070099,
-0.01676003634929657,
-1.4132330417633057,
-1.5414314270019531,
0.48646488785743713,
0.5363026261329651,
0.7494794130325317,
-0.13188280165195465,
0.9552141427993774,
-0.8664516806602478,
0.7673869729042053,
-0.8953734636306763,
-1.6136798858642578,
-1.3943666219711304,
-2.309170961380005,
-2.318201780319214,
0.7932648658752441,
-0.4848032295703888,
-0.4876627027988434,
1.8741364479064941,
-0.9006515741348267,
-1.9522284269332886,
1.1252611875534058,
0.48289716243743896,
0.008040702901780605,
2.4311044216156006,
0.2593902051448822,
-0.6592438817024231,
0.4356548488140106,
-0.7558635473251343,
0.9456537365913391,
-0.310727059841156,
1.4079604148864746,
0.5595749616622925,
-0.9713262319564819,
1.6643917560577393,
-0.4993864595890045,
0.5423499941825867,
-0.6721594333648682,
-0.5890924334526062,
-0.9059184193611145,
0.3738023042678833,
1.749003291130066,
-0.37682169675827026,
1.5692355632781982,
-0.3609432578086853,
-1.5373694896697998,
-1.636614441871643,
0.920765221118927,
0.5137307047843933,
-0.864466667175293,
0.038417574018239975,
-0.28130102157592773,
0.08438169211149216,
-0.06511320173740387,
1.1082578897476196,
1.1971927881240845,
0.6706486344337463,
-0.32269519567489624,
-0.8427168130874634,
0.16310495138168335,
-0.04728075861930847,
-0.6409720182418823,
-1.8676409721374512,
-0.472057968378067,
0.13271953165531158,
0.5560638308525085,
-1.1934353113174438,
1.718558669090271,
0.8813346028327942,
2.0005624294281006,
0.9324484467506409,
-0.32135263085365295,
1.4388463497161865,
-0.024756062775850296,
1.931024432182312,
-0.46557584404945374,
0.7084891200065613,
-0.3046096861362457,
-1.2098469734191895,
0.8329203724861145,
-0.4249412715435028,
-1.9240655899047852,
-0.9816110134124756,
-1.0316503047943115,
-0.12102903425693512,
-0.8372658491134644,
0.9921519756317139,
-0.23648697137832642,
-1.483725905418396,
0.1793871521949768,
-0.6250860691070557,
0.02338646724820137,
-1.2690516710281372,
0.21585246920585632,
0.7496505975723267,
-0.6649371981620789,
-0.042309295386075974,
-0.09918645769357681,
-1.3422809839248657,
-0.3739081621170044,
0.24599038064479828,
1.960227131843567,
-0.7117104530334473,
0.9651357531547546,
0.8875133991241455,
-0.8457381129264832,
0.1492338329553604,
0.24550186097621918,
-0.3334067463874817,
0.727084755897522,
-0.9683034420013428,
-0.40639859437942505,
1.1399413347244263,
-0.11768925935029984,
-0.8006225228309631,
1.4821399450302124,
0.79489666223526,
-0.9967084527015686,
-0.10146508365869522,
-0.2591046094894409,
-0.6436261534690857,
-0.0760837197303772,
-1.590142011642456,
-0.0694013386964798,
0.15029014647006989,
-1.3055065870285034,
-0.5596162676811218,
-0.17917600274085999,
1.3525060415267944,
-0.258155882358551,
1.2509480714797974,
-0.27616193890571594,
-0.23590917885303497,
-0.478950560092926,
-0.50213623046875,
0.18230563402175903,
-0.2632685601711273,
-0.6509204506874084,
0.2966710329055786,
-0.878685712814331,
0.36621057987213135,
1.5019928216934204,
0.3529042601585388,
0.06465619057416916,
0.544019877910614,
1.0672053098678589,
0.39906299114227295,
0.015932656824588776,
-1.0097005367279053,
-1.4597786664962769,
1.9786213636398315,
-1.4609140157699585,
1.9059756994247437,
0.6336621046066284,
-0.19724567234516144,
-1.7964591979980469,
-1.9086837768554688,
1.4332882165908813,
1.2265440225601196,
2.442960739135742,
0.6892416477203369,
0.307452917098999,
-0.8506752252578735,
-0.6749631762504578,
0.23116686940193176,
-1.0812147855758667,
-0.6388982534408569,
0.1973409354686737,
2.348461151123047,
1.784600853919983,
-0.5714391469955444,
-0.16378873586654663,
-1.02817964553833,
1.1539322137832642,
-0.15552227199077606,
0.22670236229896545,
2.02201247215271,
-0.3612082302570343,
-1.0713756084442139,
1.3321222066879272,
-2.337390184402466,
0.13977594673633575,
2.0148088932037354,
0.3177289664745331,
0.2098587602376938,
-1.5117744207382202,
-0.6981096863746643,
-0.18773798644542694,
-0.5636613368988037,
-1.284050703048706,
0.5915684700012207,
-0.1686929315328598,
-0.9835567474365234,
-1.417569875717163,
0.23749113082885742,
-1.0690686702728271,
-1.6765713691711426,
0.38077881932258606,
1.846636176109314,
1.9835113286972046,
-0.9178555607795715,
1.4138988256454468,
-0.26446762681007385,
0.0940357968211174,
1.3839083909988403,
1.1902601718902588,
3.0445311069488525,
1.9766465425491333,
-1.2651594877243042,
0.8406282067298889,
-0.14790333807468414,
-0.6008269190788269,
1.3203675746917725,
-1.1358973979949951,
1.2091717720031738,
-0.30429908633232117,
-1.2040811777114868,
-1.3964207172393799,
0.8978486061096191,
0.42338159680366516,
0.04680991545319557,
-0.566769540309906,
1.3191189765930176,
0.16100294888019562,
1.410446286201477,
0.5189131498336792,
-0.41106972098350525,
0.5911016464233398,
-0.4549853205680847,
-0.4800875782966614,
1.5931622982025146,
0.3137998878955841,
-1.4782352447509766,
-2.2418768405914307,
-0.21106810867786407,
-0.9025841355323792,
-0.15270215272903442,
-0.4468127489089966,
-0.9430390000343323,
1.6680997610092163,
0.5160678625106812,
-1.2365105152130127,
-0.27407070994377136,
-0.3002757728099823,
-0.5341059565544128,
2.6832103729248047,
-1.3049973249435425,
-0.17182114720344543,
-0.9708914160728455,
-0.45980963110923767,
1.6601227521896362,
-1.1949530839920044,
-0.0969870388507843,
-1.0868693590164185,
-0.6912842988967896,
-1.4490634202957153,
-0.5592501163482666,
-0.0019435985013842583,
-0.9443310499191284,
0.7003353238105774,
0.05386071652173996,
-1.1364833116531372,
-0.31440168619155884,
-0.8556078672409058,
0.9947584867477417,
-0.04566996917128563,
0.21721741557121277,
1.9739195108413696,
0.35604432225227356,
-0.3648677468299866,
0.6702930927276611,
1.1938425302505493,
0.553053617477417,
-0.6602683067321777,
0.3510211110115051,
-0.6401605606079102,
0.27518534660339355,
-1.4627496004104614,
0.05669298768043518,
-2.9436542987823486,
0.6440995335578918,
-0.024157557636499405,
-0.19067247211933136,
-0.07871341705322266,
-1.300032615661621,
1.3037829399108887,
2.4554312229156494,
-1.1236988306045532,
0.5340980887413025,
0.444051593542099,
1.1746151447296143,
-1.4583855867385864,
0.2325313836336136,
-0.49768996238708496,
2.139791965484619,
0.1135689914226532,
1.1859066486358643,
-0.5150593519210815,
-2.0589089393615723,
0.6972008347511292,
-1.3263338804244995,
-1.0695310831069946,
0.8262845277786255,
-0.907114565372467,
0.2712748944759369,
-1.4711140394210815,
-0.13059425354003906,
-0.8091288208961487,
-1.3607103824615479,
0.8920358419418335,
0.09358895570039749,
0.4492550790309906,
-0.4975659251213074,
0.42462611198425293,
-2.115963935852051,
-1.3552768230438232,
-0.31821876764297485,
-1.0623782873153687,
0.49230074882507324,
-0.34128621220588684,
0.6574565172195435,
-0.1281318962574005,
0.12051192671060562,
0.31659650802612305,
1.3139768838882446,
3.402761220932007,
0.24213944375514984,
0.3730175197124481,
0.003921817988157272,
-1.042858362197876,
1.5749030113220215,
1.1381915807724,
-0.1351974904537201,
-0.48248714208602905,
-0.9469607472419739,
1.3234895467758179,
2.0365331172943115,
1.22113835811615,
0.08304845541715622,
-0.8853240609169006,
-0.8131833076477051,
-0.02967868745326996,
0.13254940509796143,
0.49351179599761963,
0.8269851803779602,
0.0822109654545784,
0.1549748331308365,
1.4144680500030518,
1.0881929397583008,
-0.30523666739463806,
0.5062424540519714,
-0.9934327006340027,
-0.4695027768611908,
0.5268892049789429,
0.3875226080417633,
0.0966525748372078,
0.5888172388076782,
-1.0769356489181519,
-0.40298402309417725,
-0.18433599174022675,
-0.862586498260498,
-0.6911411881446838,
-0.4455685317516327,
-0.4202236831188202,
1.5960651636123657,
-0.008824111893773079,
-0.4617357850074768,
-0.05121619999408722,
-0.8683735728263855,
-0.0901443362236023,
-1.0115758180618286,
0.2717035710811615,
-0.09618156403303146,
-0.10437749326229095,
-0.14698491990566254,
1.7261900901794434,
-1.000745177268982,
-2.1343092918395996,
0.26294276118278503,
0.4729941785335541,
-0.3893597424030304,
0.11767756193876266,
1.5371687412261963,
0.48806288838386536,
1.3377292156219482,
1.317447543144226,
1.114694356918335,
-0.5996624231338501,
-1.3229986429214478,
0.6934184432029724,
0.8935089707374573,
-1.3626891374588013,
0.9492006897926331,
-0.08961789309978485,
-0.4269207715988159,
0.6669281721115112,
1.1913363933563232,
0.4146791100502014,
-1.85930597782135,
0.7737364768981934,
-0.7960044145584106,
0.8867490887641907,
0.623810350894928,
0.8434727787971497,
0.2335432916879654,
0.75387042760849,
-1.2414079904556274,
-1.1142715215682983,
-0.7618822455406189,
-0.5967698097229004,
1.9933173656463623,
-0.20984166860580444,
0.6228190064430237,
-0.22008994221687317,
-1.2372781038284302,
-0.17027080059051514,
0.7305528521537781,
0.3627161383628845,
-0.42636337876319885,
0.8704015612602234,
-0.44988736510276794,
-0.9967238306999207,
-1.3746328353881836,
-0.40843045711517334,
-1.0254627466201782,
-0.8939709663391113,
1.0582892894744873,
0.8099740743637085,
0.37732619047164917,
1.8945022821426392,
0.4641897678375244,
0.3863625228404999,
-2.715221405029297,
0.9491870999336243,
0.33565375208854675,
0.08753730356693268,
0.779829204082489,
0.40659719705581665,
1.144370675086975,
-0.16342246532440186,
0.5537664890289307,
-2.2369251251220703,
2.174849271774292,
-0.163759246468544,
0.5455142259597778,
0.15780024230480194,
-0.16986183822155,
1.0675303936004639,
0.572271466255188,
0.5308945178985596,
-1.189697027206421,
0.6506080627441406,
-0.6070188283920288,
1.1717514991760254,
0.9791592955589294,
-0.7700639963150024,
0.005314375273883343,
1.3428194522857666,
0.4968442916870117,
-0.26058152318000793,
-0.9768749475479126,
-0.7290794849395752,
1.0689588785171509,
1.636824369430542,
-0.10423291474580765,
-0.06981603801250458,
0.9129820466041565,
0.514247715473175,
-1.366964340209961,
0.017209194600582123,
-0.785897970199585,
-0.618273138999939,
1.7810124158859253,
2.0230696201324463,
-0.10351769626140594,
-0.16773396730422974,
-0.7689462900161743,
-1.1592520475387573,
0.7107440829277039,
-0.03407098725438118,
0.11345245689153671,
0.7408154010772705,
-0.6993017196655273,
1.1488654613494873,
0.6114451885223389,
0.9290757179260254,
0.03918512910604477,
0.42606160044670105,
0.24667157232761383,
-0.3079569637775421,
-1.2432842254638672,
-0.3172471821308136,
-1.1126378774642944,
-2.676001787185669,
0.4224182963371277,
-0.3184534013271332,
-1.3230518102645874,
-0.012323155999183655,
-1.1577253341674805,
0.9155235886573792,
-0.6924814581871033,
-1.0044952630996704,
-1.4550098180770874,
0.2812989056110382,
-0.10685515403747559,
0.7784789204597473,
-1.6986337900161743,
-0.07085643708705902,
1.3036866188049316,
0.8403655886650085,
-0.7563343048095703,
1.136128544807434,
0.2728947699069977,
1.084938645362854,
0.810626745223999,
-0.3859063982963562,
0.5301280617713928,
0.11770101636648178,
-1.388000249862671,
0.49875378608703613,
1.1860401630401611,
0.2289346307516098,
1.4598257541656494,
-0.5661317706108093,
0.16543827950954437,
0.48696035146713257,
-0.5506275296211243,
-0.6282065510749817,
-0.5461085438728333,
0.8600972890853882,
0.10491182655096054,
-1.1672037839889526,
0.030136466026306152,
-0.04008227586746216,
-0.2023741602897644,
0.29332616925239563,
-1.515028476715088,
-0.3289465308189392,
-0.2819831967353821,
-0.5517380833625793,
-1.2623530626296997,
-0.03341829031705856,
1.197398066520691,
-0.7138271927833557,
-0.13020309805870056,
0.5994833111763,
0.1510600745677948,
0.49633097648620605,
0.6221570372581482,
-0.6465813517570496,
-0.2768944203853607,
-0.39379778504371643,
-0.34389445185661316,
0.3920942544937134,
1.3661491870880127,
-0.14989179372787476,
-1.0341663360595703,
0.7439073920249939,
-0.33773109316825867,
0.04674219340085983,
2.0950498580932617,
-0.0046465531922876835,
-0.8598267436027527,
0.3136804699897766,
-0.6211864948272705,
1.8299524784088135,
1.6135379076004028,
1.3423796892166138,
0.0022924738004803658,
-0.8542450070381165,
0.564642071723938,
-0.123430036008358,
-0.41858989000320435,
0.8392838835716248,
0.38513416051864624,
-0.1876516193151474,
-1.4127755165100098,
0.45661062002182007,
1.383252501487732,
-0.9641646146774292,
-0.8046362400054932,
0.11965114623308182,
-0.8673993349075317,
1.1078686714172363,
0.8213914632797241,
0.507180392742157,
0.3091493248939514,
1.4917336702346802,
0.6344566941261292,
-0.37251022458076477,
0.42908188700675964,
0.44845983386039734,
-0.08418221771717072,
-1.9604649543762207,
-0.9941349029541016,
0.33379024267196655,
-0.5227987766265869,
-1.5696245431900024,
1.4040133953094482,
-1.06940495967865,
-0.8219563961029053,
0.6079262495040894,
0.09152544289827347,
1.471437692642212,
0.2941625416278839,
1.6781266927719116,
2.0530846118927,
0.79544997215271,
0.12719708681106567,
1.2667763233184814,
-0.08977577090263367,
-0.4188564121723175,
1.847977638244629,
-0.41291698813438416,
0.4583995044231415,
0.9808565378189087,
-0.33744943141937256,
-1.040549397468567,
-0.8728353977203369,
-1.3328838348388672,
-0.6683932542800903,
1.1062575578689575,
0.1492585837841034,
-1.2089160680770874,
0.12024449557065964,
1.5054634809494019,
0.08464605361223221,
-0.2481013387441635,
0.7115707993507385,
0.5372000932693481,
-0.8559475541114807,
0.02212062105536461,
-0.7649646997451782,
0.4605748653411865,
-0.1087493821978569,
-0.2539401352405548,
0.23636659979820251,
0.4334617555141449,
1.199497938156128,
-0.11807731539011002,
0.20560941100120544,
1.1675961017608643,
-1.3350329399108887,
1.5592846870422363,
-0.5566800832748413,
0.2896115481853485,
-2.4326283931732178,
1.4626152515411377,
-0.7965748906135559,
1.735211968421936,
-2.5677361488342285,
0.4232754409313202,
-0.48223060369491577,
-0.4317384958267212,
0.23199468851089478,
-0.4998359978199005,
0.08426877111196518,
-0.11420777440071106,
-1.037072777748108,
0.1087588295340538,
-0.6870895028114319,
0.536353349685669,
1.0600361824035645,
1.2661993503570557,
-1.1302237510681152,
-0.45878586173057556,
-1.7879960536956787,
-0.11335862427949905,
-0.740334689617157,
0.41746026277542114,
-2.0564165115356445,
-0.2367624193429947,
-1.904959797859192,
-2.2483034133911133,
-1.4058754444122314,
-0.8617798686027527,
1.1221896409988403,
0.12815691530704498,
-0.9538841843605042,
1.090023159980774,
-0.30923742055892944,
-1.7414618730545044,
0.9835689067840576,
-2.1429097652435303
] |
https://github.com/huggingface/datasets/issues/4857 | No preprocessed wikipedia is working on huggingface/datasets | This is working now, but I was getting an error a few days ago when running an existing script. Unfortunately I did not do a proper bug report, but for some reason I was unable to load the dataset due to a request being made to the wikimedia website. However, its working now. Thanks for the reply! | ## Describe the bug
20220301 wikipedia dump has been deprecated, so now there is no working wikipedia dump on huggingface
https://huggingface.co/datasets/wikipedia
https://dumps.wikimedia.org/enwiki/
| 574 | 57 | No preprocessed wikipedia is working on huggingface/datasets
## Describe the bug
20220301 wikipedia dump has been deprecated, so now there is no working wikipedia dump on huggingface
https://huggingface.co/datasets/wikipedia
https://dumps.wikimedia.org/enwiki/
This is working now, but I was getting an error a few days ago when running an existing script. Unfortunately I did not do a proper bug report, but for some reason I was unable to load the dataset due to a request being made to the wikimedia website. However, its working now. Thanks for the reply! | [
-1.2370598316192627,
-0.9619484543800354,
-0.7745335102081299,
1.3093576431274414,
-0.16182464361190796,
-1.2017097473144531,
0.07832206040620804,
-0.9615858197212219,
1.6169863939285278,
-0.8130370378494263,
0.3246513605117798,
-1.7062058448791504,
-0.07874514162540436,
-0.45029762387275696,
-0.7468400001525879,
-0.9428223371505737,
-0.31355971097946167,
-0.8338336944580078,
0.9719609618186951,
2.6663005352020264,
1.1951799392700195,
-1.4848676919937134,
2.721719741821289,
0.6042233109474182,
-0.1440168172121048,
-1.130728006362915,
0.6208934187889099,
0.05045109987258911,
-1.141919732093811,
-0.46343541145324707,
-1.004306435585022,
0.0024458682164549828,
-0.593116819858551,
-0.4321463406085968,
0.04241026192903519,
0.3718439042568207,
-0.1020733192563057,
-0.25582337379455566,
-0.46706289052963257,
-0.7727876901626587,
0.5060437917709351,
-0.38511815667152405,
0.9585403800010681,
-0.36437931656837463,
1.7712091207504272,
-0.5103636384010315,
0.3393830955028534,
0.7364345192909241,
1.3974500894546509,
0.23838607966899872,
-0.049284085631370544,
0.22167737782001495,
0.463288813829422,
-0.13481511175632477,
0.3228946924209595,
1.1494455337524414,
0.5830603837966919,
0.5983849167823792,
0.7126237154006958,
-2.148540496826172,
1.4146469831466675,
-1.0797905921936035,
0.404008150100708,
1.3840875625610352,
-1.0426371097564697,
0.3698264956474304,
-1.6979851722717285,
-0.08268424868583679,
0.49625828862190247,
-2.305328130722046,
0.14768248796463013,
-1.1735423803329468,
-0.5724504590034485,
0.9500932693481445,
0.16782282292842865,
-1.4354015588760376,
0.12218506634235382,
-0.38515815138816833,
1.0077948570251465,
0.47277262806892395,
1.163841724395752,
-1.6333918571472168,
0.12766492366790771,
-0.33616551756858826,
0.029043233022093773,
-1.402094841003418,
-1.5599616765975952,
0.5418067574501038,
0.4864172637462616,
0.6992972493171692,
-0.08148831874132156,
0.9370706677436829,
-0.9123132824897766,
0.8309031128883362,
-0.9278532266616821,
-1.6487993001937866,
-1.3897790908813477,
-2.4000158309936523,
-2.3243277072906494,
0.7989972829818726,
-0.48033595085144043,
-0.508833646774292,
2.0048396587371826,
-0.9168736338615417,
-1.9021447896957397,
1.1165615320205688,
0.42824074625968933,
0.018324943259358406,
2.5221500396728516,
0.24289478361606598,
-0.7347747683525085,
0.4394015371799469,
-0.7616760730743408,
0.977515697479248,
-0.4663871228694916,
1.4601635932922363,
0.5848873853683472,
-0.875572681427002,
1.6744866371154785,
-0.40814512968063354,
0.45394599437713623,
-0.7161573767662048,
-0.6388880014419556,
-0.9493417143821716,
0.39928701519966125,
1.7298790216445923,
-0.3460206687450409,
1.574170708656311,
-0.5285307168960571,
-1.5246046781539917,
-1.5970666408538818,
0.8717316389083862,
0.5354754328727722,
-0.974149763584137,
0.09579505771398544,
-0.3258979916572571,
-0.014753026887774467,
-0.05127599090337753,
1.0434261560440063,
1.2719093561172485,
0.5713562369346619,
-0.288723886013031,
-0.9553191065788269,
0.22902730107307434,
-0.14922545850276947,
-0.6391286253929138,
-1.8766992092132568,
-0.42521220445632935,
0.05883534252643585,
0.6407192945480347,
-1.2150681018829346,
1.7385656833648682,
0.9838705658912659,
1.9624145030975342,
1.0198521614074707,
-0.388690710067749,
1.3948750495910645,
-0.04808782786130905,
1.9494237899780273,
-0.5045993328094482,
0.6559329628944397,
-0.2592678368091583,
-1.1349761486053467,
0.8260299563407898,
-0.37934574484825134,
-1.9464197158813477,
-0.8647306561470032,
-0.9327818155288696,
-0.1986701339483261,
-0.8406865000724792,
0.9288110733032227,
-0.2524113953113556,
-1.3748910427093506,
0.287837415933609,
-0.6533458232879639,
0.1345304250717163,
-1.279551386833191,
0.2913891673088074,
0.7331076860427856,
-0.6201130747795105,
0.0219146516174078,
-0.21632519364356995,
-1.3436192274093628,
-0.5358035564422607,
0.22255839407444,
1.8447502851486206,
-0.6760095357894897,
0.9642817378044128,
0.8137797117233276,
-0.6284537315368652,
0.12079265713691711,
0.29635336995124817,
-0.2214728444814682,
0.8632694482803345,
-1.0335052013397217,
-0.4512672424316406,
1.1024515628814697,
-0.21190960705280304,
-0.6934751868247986,
1.4393649101257324,
0.7559390664100647,
-0.9981647729873657,
-0.08335494250059128,
-0.21504828333854675,
-0.7440637350082397,
-0.05170566588640213,
-1.6746463775634766,
-0.208068385720253,
0.14241233468055725,
-1.4539744853973389,
-0.5235770344734192,
-0.14800336956977844,
1.3027559518814087,
-0.17041712999343872,
1.2850722074508667,
-0.3713282346725464,
-0.2693331837654114,
-0.39667627215385437,
-0.4351339042186737,
0.19121047854423523,
-0.28610458970069885,
-0.5797374844551086,
0.32002267241477966,
-0.941601037979126,
0.4284282922744751,
1.5111528635025024,
0.30513742566108704,
0.07343414425849915,
0.5656468868255615,
1.0004247426986694,
0.34863707423210144,
0.05275508761405945,
-0.8822949528694153,
-1.4515544176101685,
2.0642549991607666,
-1.486557960510254,
1.87369966506958,
0.7818371653556824,
-0.13929840922355652,
-1.8141971826553345,
-1.7524337768554688,
1.408200979232788,
1.1916595697402954,
2.376035213470459,
0.6654636263847351,
0.32113519310951233,
-0.7885655760765076,
-0.6691165566444397,
0.24721838533878326,
-1.1506863832473755,
-0.7549484968185425,
0.1516803503036499,
2.3240127563476562,
1.8009134531021118,
-0.5524555444717407,
-0.09171309322118759,
-1.0070985555648804,
1.2198765277862549,
-0.10617493838071823,
0.21504373848438263,
2.0141360759735107,
-0.4557119607925415,
-1.1537704467773438,
1.3211971521377563,
-2.3675034046173096,
0.16189351677894592,
2.0180280208587646,
0.35145825147628784,
0.12054947018623352,
-1.4765918254852295,
-0.6504660248756409,
-0.13911029696464539,
-0.46073368191719055,
-1.2366042137145996,
0.5701392889022827,
-0.20355147123336792,
-0.89896559715271,
-1.51573646068573,
0.11477800458669662,
-1.2133080959320068,
-1.7399495840072632,
0.4460284113883972,
1.8218371868133545,
2.0467824935913086,
-0.7776625752449036,
1.4502551555633545,
-0.21989022195339203,
0.06062920391559601,
1.2670261859893799,
1.0832701921463013,
3.042078971862793,
1.9684096574783325,
-1.1659146547317505,
0.7298927903175354,
-0.19571293890476227,
-0.5982226133346558,
1.1275205612182617,
-1.071161150932312,
1.1861987113952637,
-0.1923733949661255,
-1.1797068119049072,
-1.3652737140655518,
0.915870726108551,
0.2894245386123657,
0.01752493716776371,
-0.5976237654685974,
1.2819103002548218,
0.172180637717247,
1.3388381004333496,
0.44814422726631165,
-0.31186529994010925,
0.5453740954399109,
-0.40379565954208374,
-0.49572181701660156,
1.6282540559768677,
0.3119756281375885,
-1.5538160800933838,
-2.279468297958374,
-0.2765209376811981,
-0.7836511135101318,
-0.09008198231458664,
-0.555668294429779,
-0.9981332421302795,
1.687042236328125,
0.5341253280639648,
-1.2115894556045532,
-0.3120514154434204,
-0.3736096918582916,
-0.6809444427490234,
2.6072843074798584,
-1.329154133796692,
-0.2527729272842407,
-0.8638656139373779,
-0.4535398781299591,
1.575981855392456,
-1.3082432746887207,
-0.11626142263412476,
-1.059714674949646,
-0.7068642377853394,
-1.3209519386291504,
-0.505862832069397,
-0.0826474279165268,
-0.8954470157623291,
0.6722137331962585,
0.08035506308078766,
-1.0034242868423462,
-0.20502740144729614,
-0.8082759380340576,
0.8562948107719421,
-0.020292362198233604,
0.23996122181415558,
1.8908276557922363,
0.3891168534755707,
-0.31698402762413025,
0.5833256244659424,
1.1312464475631714,
0.5987517237663269,
-0.6020071506500244,
0.17555412650108337,
-0.6819010376930237,
0.29158490896224976,
-1.305461049079895,
0.22818252444267273,
-2.980701208114624,
0.6717368364334106,
-0.007456366438418627,
-0.16876350343227386,
-0.15066111087799072,
-1.3076887130737305,
1.2420847415924072,
2.4591522216796875,
-1.040794849395752,
0.5785629749298096,
0.4515326917171478,
1.1851832866668701,
-1.4737054109573364,
0.33029794692993164,
-0.4711492955684662,
2.138617515563965,
0.1439172476530075,
1.0767011642456055,
-0.5646650791168213,
-2.175516128540039,
0.6131467819213867,
-1.2805687189102173,
-1.0758455991744995,
0.7185193300247192,
-0.7910667657852173,
0.09620531648397446,
-1.44579017162323,
-0.12800034880638123,
-0.8877038955688477,
-1.2999794483184814,
0.9561853408813477,
0.13101348280906677,
0.45698344707489014,
-0.5541924834251404,
0.35298821330070496,
-2.1511497497558594,
-1.4294862747192383,
-0.31874555349349976,
-1.0567114353179932,
0.46086540818214417,
-0.3980116546154022,
0.6828979253768921,
-0.13597437739372253,
0.1544686108827591,
0.26935237646102905,
1.3258447647094727,
3.4403018951416016,
0.24503646790981293,
0.4912521541118622,
-0.10969433188438416,
-0.9314092993736267,
1.6361819505691528,
1.0593156814575195,
-0.012193448841571808,
-0.6128342151641846,
-0.9989377856254578,
1.3689719438552856,
2.0476090908050537,
1.0215206146240234,
0.17927603423595428,
-0.8476840853691101,
-0.6059941649436951,
-0.06372054666280746,
0.16495774686336517,
0.48994114995002747,
0.9126160740852356,
-0.05561453849077225,
0.14259611070156097,
1.3767579793930054,
1.2208561897277832,
-0.3822505474090576,
0.4876940846443176,
-0.933034360408783,
-0.4546199440956116,
0.4500342011451721,
0.4129902124404907,
0.06873190402984619,
0.5245151519775391,
-0.9184433817863464,
-0.3054219186306,
-0.24642790853977203,
-1.0056263208389282,
-0.7277848720550537,
-0.3950325846672058,
-0.39041727781295776,
1.6790310144424438,
0.11423169076442719,
-0.4914175868034363,
0.027595261111855507,
-0.8390222787857056,
-0.12850627303123474,
-1.0761322975158691,
0.14808140695095062,
-0.055222198367118835,
-0.04770369082689285,
-0.0736667737364769,
1.7755619287490845,
-1.0598167181015015,
-2.1859912872314453,
0.2293419986963272,
0.40681517124176025,
-0.3961797058582306,
0.12263050675392151,
1.5772302150726318,
0.5161284804344177,
1.390275478363037,
1.3404308557510376,
1.0199731588363647,
-0.6710115075111389,
-1.2465808391571045,
0.7061665654182434,
0.8998855352401733,
-1.3863605260849,
0.9450237154960632,
0.0015873005613684654,
-0.45047152042388916,
0.7905222177505493,
1.1877450942993164,
0.38017016649246216,
-1.9494032859802246,
0.8435222506523132,
-0.8437035083770752,
0.9899494647979736,
0.5549208521842957,
0.734173595905304,
0.2481284886598587,
0.7354814410209656,
-1.1780219078063965,
-1.0794297456741333,
-0.8115734457969666,
-0.5465096235275269,
2.119117498397827,
-0.26497119665145874,
0.6272915601730347,
-0.10770434141159058,
-1.2093627452850342,
-0.18495431542396545,
0.6939342021942139,
0.3682820796966553,
-0.38223984837532043,
0.7123678922653198,
-0.5417541861534119,
-1.1599271297454834,
-1.5165624618530273,
-0.400141179561615,
-0.9092333316802979,
-0.9153224229812622,
1.0507608652114868,
0.7673397660255432,
0.30297595262527466,
1.953711986541748,
0.5125528573989868,
0.22624772787094116,
-2.7103357315063477,
0.9148619174957275,
0.32758358120918274,
0.1266258805990219,
0.8753191232681274,
0.3725803792476654,
1.011795163154602,
-0.04865457862615585,
0.5273463129997253,
-2.2467949390411377,
2.199730634689331,
-0.21168836951255798,
0.7146756649017334,
0.146994948387146,
-0.08332531154155731,
1.1697468757629395,
0.6370339393615723,
0.5870229601860046,
-1.1784663200378418,
0.7331554889678955,
-0.5753250122070312,
1.2119929790496826,
0.9568013548851013,
-0.7243722081184387,
-0.04044065624475479,
1.2853745222091675,
0.44693228602409363,
-0.36266112327575684,
-0.9792718291282654,
-0.7482476234436035,
1.052801489830017,
1.714857578277588,
-0.047756634652614594,
0.008500898256897926,
0.8428817987442017,
0.5719413161277771,
-1.2929757833480835,
0.007267754524946213,
-0.6931502223014832,
-0.7531270384788513,
1.701224446296692,
2.013587236404419,
-0.09836355596780777,
-0.127425879240036,
-0.6947606801986694,
-1.2822149991989136,
0.6691418290138245,
-0.040587350726127625,
0.1091056689620018,
0.6257084012031555,
-0.7354502081871033,
1.257964015007019,
0.6017739176750183,
0.8607726693153381,
0.08051320165395737,
0.4279369115829468,
0.28996044397354126,
-0.3013724982738495,
-1.1438214778900146,
-0.2835315465927124,
-1.0974314212799072,
-2.629690408706665,
0.3707875907421112,
-0.3120831549167633,
-1.4036942720413208,
-0.06299100071191788,
-1.0844638347625732,
0.8650467395782471,
-0.6455463171005249,
-1.0063477754592896,
-1.475297212600708,
0.20350061357021332,
-0.15578819811344147,
0.8177175521850586,
-1.6617106199264526,
-0.030965181067585945,
1.268592119216919,
0.864208996295929,
-0.6009510159492493,
1.1828583478927612,
0.24042215943336487,
1.0472095012664795,
0.7418593764305115,
-0.41410356760025024,
0.4331125020980835,
0.1490517407655716,
-1.3424272537231445,
0.5522761940956116,
1.1995118856430054,
0.1815292090177536,
1.4445407390594482,
-0.5664435625076294,
0.14155715703964233,
0.5043064951896667,
-0.4927355945110321,
-0.5951667428016663,
-0.5138388872146606,
0.9154419302940369,
0.08061961084604263,
-1.0454113483428955,
0.01185537874698639,
-0.1676136702299118,
-0.15634898841381073,
0.27046483755111694,
-1.5253945589065552,
-0.2780342400074005,
-0.39319854974746704,
-0.5587689876556396,
-1.3368812799453735,
-0.04999367892742157,
1.3285523653030396,
-0.7493992447853088,
-0.1781424880027771,
0.589587926864624,
0.37374329566955566,
0.523566484451294,
0.6645602583885193,
-0.5925998091697693,
-0.4184071719646454,
-0.34101632237434387,
-0.37331220507621765,
0.4142557680606842,
1.2379041910171509,
-0.21647235751152039,
-0.9775806069374084,
0.7426806092262268,
-0.32917794585227966,
0.012515576556324959,
2.00765323638916,
0.0677734836935997,
-0.8116176724433899,
0.3697386682033539,
-0.609222412109375,
1.9150173664093018,
1.540336012840271,
1.3182131052017212,
0.026591824367642403,
-0.9160082340240479,
0.6584335565567017,
-0.07235831767320633,
-0.37987443804740906,
0.8736937046051025,
0.4819074869155884,
-0.18793274462223053,
-1.3717422485351562,
0.4672965705394745,
1.2765421867370605,
-0.8734503388404846,
-0.8675923943519592,
0.07431364059448242,
-0.838579535484314,
1.0720417499542236,
0.8350907564163208,
0.5249068140983582,
0.3057900071144104,
1.660657286643982,
0.6426716446876526,
-0.5977627635002136,
0.5019412040710449,
0.4271398186683655,
-0.060352474451065063,
-2.003838062286377,
-1.051259160041809,
0.2763122320175171,
-0.4625827670097351,
-1.4986095428466797,
1.3223578929901123,
-1.038852572441101,
-0.8773887157440186,
0.6118676066398621,
0.07597126066684723,
1.4819220304489136,
0.2715102434158325,
1.6782933473587036,
2.0144124031066895,
0.85102379322052,
0.17574478685855865,
1.311111330986023,
-0.10396783798933029,
-0.40531203150749207,
1.906313419342041,
-0.317331463098526,
0.4250018298625946,
1.1225701570510864,
-0.38993221521377563,
-1.018763780593872,
-0.7978049516677856,
-1.219642162322998,
-0.6491992473602295,
1.1072931289672852,
0.18150806427001953,
-1.2094626426696777,
0.1614135354757309,
1.5964152812957764,
0.11942952871322632,
-0.23910193145275116,
0.5528034567832947,
0.5219035148620605,
-0.7149834632873535,
0.0022544218227267265,
-0.9261837005615234,
0.4865058958530426,
-0.2162523716688156,
-0.38372018933296204,
0.23947834968566895,
0.4268662631511688,
1.1310049295425415,
-0.16532298922538757,
0.1872057318687439,
1.1950467824935913,
-1.4674100875854492,
1.4699432849884033,
-0.5677244663238525,
0.20386718213558197,
-2.3465769290924072,
1.467560052871704,
-0.700136661529541,
1.906404733657837,
-2.6636791229248047,
0.37338945269584656,
-0.7005429863929749,
-0.4034380614757538,
0.3208780586719513,
-0.4207914173603058,
0.1441388726234436,
-0.1644059121608734,
-1.0160585641860962,
0.03363782912492752,
-0.6478386521339417,
0.605850338935852,
1.1734189987182617,
1.1423156261444092,
-1.0488569736480713,
-0.3597164750099182,
-1.7272322177886963,
-0.14221560955047607,
-0.7408743500709534,
0.3305411636829376,
-2.12211012840271,
-0.27190330624580383,
-2.0420737266540527,
-2.167391300201416,
-1.4566861391067505,
-0.8730785250663757,
1.0686604976654053,
0.21539196372032166,
-0.972509503364563,
1.0999523401260376,
-0.33883821964263916,
-1.6683214902877808,
1.007447361946106,
-2.172429323196411
] |
https://github.com/huggingface/datasets/issues/4856 | file missing when load_dataset with openwebtext on windows | I have tried to extract ```0015896-b1054262f7da52a0518521e29c8e352c.txt``` from ```17ecf461bfccd469a1fbc264ccb03731f8606eea7b3e2e8b86e13d18040bf5b3/urlsf_subset00-16_data.xz``` with 7-zip
and put the file into cache_path ```F://huggingface/datasets/downloads/extracted/0901d27f43b7e9ac0577da0d0061c8c632ba0b70ecd1b4bfb21562d9b7486faa```
there is still raise the same error and I find the file was removed from cache_path after I run the run_mlm.py with ```python run_mlm.py --model_type roberta --tokenizer_name roberta-base --dataset_name openwebtext --per_device_train_batch_size 8 --per_device_eval_batch_size 8 --do_train --do_eval --output_dir F:/model/roberta-base```. | ## Describe the bug
0015896-b1054262f7da52a0518521e29c8e352c.txt is missing when I run run_mlm.py with openwebtext. I check the cache_path and can not find 0015896-b1054262f7da52a0518521e29c8e352c.txt. but I can find this file in the 17ecf461bfccd469a1fbc264ccb03731f8606eea7b3e2e8b86e13d18040bf5b3/urlsf_subset00-16_data.xz with 7-zip.
## Steps to reproduce the bug
```sh
python run_mlm.py --model_type roberta --tokenizer_name roberta-base --dataset_name openwebtext --per_device_train_batch_size 8 --per_device_eval_batch_size 8 --do_train --do_eval --output_dir F:/model/roberta-base
```
or
```python
from datasets import load_dataset
load_dataset("openwebtext", None, cache_dir=None, use_auth_token=None)
```
## Expected results
Loading is successful
## Actual results
Traceback (most recent call last):
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 795, in _download_and_prepare
raise OSError(
OSError: Cannot find data file.
Original error:
[Errno 22] Invalid argument: 'F://huggingface/datasets/downloads/extracted/0901d27f43b7e9ac0577da0d0061c8c632ba0b70ecd1b4bfb21562d9b7486faa/0015896-b1054262f7da52a0518521e29c8e352c.txt'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: windows
- Python version: 3.8.5
- PyArrow version: 9.0.0
| 575 | 55 | file missing when load_dataset with openwebtext on windows
## Describe the bug
0015896-b1054262f7da52a0518521e29c8e352c.txt is missing when I run run_mlm.py with openwebtext. I check the cache_path and can not find 0015896-b1054262f7da52a0518521e29c8e352c.txt. but I can find this file in the 17ecf461bfccd469a1fbc264ccb03731f8606eea7b3e2e8b86e13d18040bf5b3/urlsf_subset00-16_data.xz with 7-zip.
## Steps to reproduce the bug
```sh
python run_mlm.py --model_type roberta --tokenizer_name roberta-base --dataset_name openwebtext --per_device_train_batch_size 8 --per_device_eval_batch_size 8 --do_train --do_eval --output_dir F:/model/roberta-base
```
or
```python
from datasets import load_dataset
load_dataset("openwebtext", None, cache_dir=None, use_auth_token=None)
```
## Expected results
Loading is successful
## Actual results
Traceback (most recent call last):
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 795, in _download_and_prepare
raise OSError(
OSError: Cannot find data file.
Original error:
[Errno 22] Invalid argument: 'F://huggingface/datasets/downloads/extracted/0901d27f43b7e9ac0577da0d0061c8c632ba0b70ecd1b4bfb21562d9b7486faa/0015896-b1054262f7da52a0518521e29c8e352c.txt'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: windows
- Python version: 3.8.5
- PyArrow version: 9.0.0
I have tried to extract ```0015896-b1054262f7da52a0518521e29c8e352c.txt``` from ```17ecf461bfccd469a1fbc264ccb03731f8606eea7b3e2e8b86e13d18040bf5b3/urlsf_subset00-16_data.xz``` with 7-zip
and put the file into cache_path ```F://huggingface/datasets/downloads/extracted/0901d27f43b7e9ac0577da0d0061c8c632ba0b70ecd1b4bfb21562d9b7486faa```
there is still raise the same error and I find the file was removed from cache_path after I run the run_mlm.py with ```python run_mlm.py --model_type roberta --tokenizer_name roberta-base --dataset_name openwebtext --per_device_train_batch_size 8 --per_device_eval_batch_size 8 --do_train --do_eval --output_dir F:/model/roberta-base```. | [
-1.2484588623046875,
-0.8445248603820801,
-0.5667317509651184,
1.4384093284606934,
-0.16073885560035706,
-1.2922168970108032,
0.1502302587032318,
-1.10106360912323,
1.6392194032669067,
-0.8107526302337646,
0.2413935661315918,
-1.579978585243225,
0.08360248804092407,
-0.6156005859375,
-0.6757951974868774,
-0.7894384264945984,
-0.3716736137866974,
-0.762851893901825,
1.1524094343185425,
2.4540038108825684,
1.261374592781067,
-1.344537615776062,
2.776610851287842,
0.6717370748519897,
-0.31240662932395935,
-0.9843640327453613,
0.5052506923675537,
0.02513597533106804,
-1.311124324798584,
-0.4027063250541687,
-0.8583751320838928,
-0.027248285710811615,
-0.6004050970077515,
-0.43706372380256653,
-0.05352555215358734,
0.4660516381263733,
-0.29217246174812317,
-0.4067397713661194,
-0.5782954692840576,
-0.7263679504394531,
0.5251664519309998,
-0.35424289107322693,
0.8791922926902771,
-0.3022252321243286,
1.7978432178497314,
-0.6050187349319458,
0.46446698904037476,
0.7258493304252625,
1.23643159866333,
0.13775740563869476,
0.055149275809526443,
0.2569449543952942,
0.3493313789367676,
-0.000632469542324543,
0.5295119285583496,
1.1466611623764038,
0.6672328114509583,
0.5017021894454956,
0.6647999882698059,
-2.173906087875366,
1.3790619373321533,
-0.9353543519973755,
0.16374672949314117,
1.3627402782440186,
-0.9743351936340332,
0.3914308249950409,
-1.7167271375656128,
-0.0763259008526802,
0.581474244594574,
-2.132810115814209,
0.2487260103225708,
-1.2982087135314941,
-0.5338937044143677,
0.9654596447944641,
0.3402421176433563,
-1.206993579864502,
0.1339939385652542,
-0.5275571346282959,
1.0521655082702637,
0.3650330603122711,
1.0340118408203125,
-1.7091361284255981,
-0.030507240444421768,
-0.2375226765871048,
0.1499902904033661,
-1.3574466705322266,
-1.5818225145339966,
0.5829357504844666,
0.6140572428703308,
0.6069872975349426,
-0.008029002696275711,
1.0427336692810059,
-1.150589108467102,
0.7656235098838806,
-1.0755398273468018,
-1.661083698272705,
-1.413752555847168,
-2.417119026184082,
-2.273127317428589,
0.6908506751060486,
-0.4996134638786316,
-0.5156477689743042,
2.125622034072876,
-1.1001039743423462,
-1.626318097114563,
1.118505835533142,
0.1696242392063141,
0.014645465649664402,
2.4068167209625244,
0.2534809410572052,
-0.7817758321762085,
0.5429180860519409,
-0.7994019389152527,
0.729229211807251,
-0.2972049117088318,
1.2233757972717285,
0.4456234872341156,
-1.0461890697479248,
1.5239542722702026,
-0.38006797432899475,
0.642943799495697,
-0.5878821015357971,
-0.495727002620697,
-0.7025105953216553,
0.2661445736885071,
1.8736814260482788,
-0.22316300868988037,
1.5869532823562622,
-0.2743190824985504,
-1.4939403533935547,
-1.4712953567504883,
0.8727425336837769,
0.41688039898872375,
-0.8049246072769165,
0.16921143233776093,
-0.4693821966648102,
0.15197104215621948,
-0.03589112311601639,
1.2143830060958862,
1.3316266536712646,
0.7852660417556763,
-0.36990800499916077,
-0.8393761515617371,
0.17862184345722198,
-0.07662519812583923,
-0.6939471364021301,
-1.8020399808883667,
-0.243648961186409,
0.012188578955829144,
0.6861119866371155,
-1.1628985404968262,
1.8399616479873657,
0.9357908368110657,
1.9235955476760864,
1.0687588453292847,
-0.32133448123931885,
1.3764413595199585,
0.02938258647918701,
1.8210240602493286,
-0.45885220170021057,
0.6993117928504944,
-0.3729178309440613,
-1.1650402545928955,
0.8695228695869446,
-0.32583338022232056,
-2.0189919471740723,
-0.7260702252388,
-0.6619510054588318,
-0.18967491388320923,
-0.8412719964981079,
0.8988001942634583,
-0.28544333577156067,
-1.5339792966842651,
0.18156106770038605,
-0.7059627175331116,
0.23018692433834076,
-1.2113057374954224,
0.3099963068962097,
0.7218655347824097,
-0.6160920858383179,
0.04536937177181244,
-0.25983673334121704,
-1.2717339992523193,
-0.48965105414390564,
0.3736279606819153,
1.8179333209991455,
-0.6931974291801453,
0.8925672769546509,
1.0767666101455688,
-0.5621241331100464,
0.0364694707095623,
0.2907083332538605,
-0.34913888573646545,
0.7538355588912964,
-1.0856376886367798,
-0.45894259214401245,
1.177757740020752,
-0.3116777241230011,
-0.6033768057823181,
1.4530075788497925,
0.703683614730835,
-1.072844386100769,
-0.2786118984222412,
-0.17110982537269592,
-0.9062489867210388,
0.04155591502785683,
-1.5622919797897339,
-0.10177876800298691,
0.46728771924972534,
-1.5883660316467285,
-0.3772720992565155,
-0.10859661549329758,
1.424021601676941,
-0.18294833600521088,
1.4707683324813843,
-0.37985992431640625,
-0.08464013040065765,
-0.32063162326812744,
-0.5024680495262146,
0.2203235924243927,
-0.10220148414373398,
-0.5502063035964966,
0.11760403215885162,
-0.831224262714386,
0.28078362345695496,
1.486524224281311,
0.2503880262374878,
0.038660816848278046,
0.3851394057273865,
1.1408889293670654,
0.3481377363204956,
-0.09449207782745361,
-0.7974050045013428,
-1.5605809688568115,
1.9891879558563232,
-1.5436270236968994,
2.053990602493286,
0.8186879754066467,
-0.10617994517087936,
-1.7925986051559448,
-1.857852578163147,
1.315369963645935,
1.1341274976730347,
2.2896363735198975,
0.47673487663269043,
0.3757057785987854,
-0.7793243527412415,
-0.7074031829833984,
0.4462753236293793,
-1.0317307710647583,
-0.6073974967002869,
0.1639602780342102,
2.3412582874298096,
1.7518792152404785,
-0.3955948054790497,
-0.2179098129272461,
-0.8989156484603882,
1.3291250467300415,
-0.13866816461086273,
0.23728303611278534,
2.0347816944122314,
-0.29457858204841614,
-1.078733205795288,
1.3273332118988037,
-2.3847599029541016,
0.29684585332870483,
2.0774049758911133,
0.29435741901397705,
0.08873526751995087,
-1.3145108222961426,
-0.6380811929702759,
-0.34271466732025146,
-0.3320182263851166,
-1.2300034761428833,
0.5781877040863037,
-0.2666094899177551,
-0.7991860508918762,
-1.4227567911148071,
0.10794217884540558,
-1.164929986000061,
-1.7813302278518677,
0.3563588559627533,
1.8666181564331055,
2.0812265872955322,
-0.8320156335830688,
1.5095596313476562,
-0.3201960623264313,
0.15383796393871307,
1.1506974697113037,
1.2942869663238525,
3.087836503982544,
1.8407893180847168,
-1.2919809818267822,
0.5908390283584595,
-0.17727990448474884,
-0.4884105324745178,
1.0889999866485596,
-1.2224842309951782,
1.2930145263671875,
-0.1429213583469391,
-1.1258063316345215,
-1.258690595626831,
0.9765501618385315,
0.5103340148925781,
-0.0034210835583508015,
-0.42667362093925476,
1.240975022315979,
0.14255627989768982,
1.4018234014511108,
0.5439974665641785,
-0.3168860673904419,
0.6649700999259949,
-0.48131638765335083,
-0.555936872959137,
1.5182667970657349,
0.186280757188797,
-1.4516446590423584,
-2.26114559173584,
-0.26196199655532837,
-0.809332013130188,
0.10970157384872437,
-0.7003541588783264,
-1.0259438753128052,
1.609990119934082,
0.3654883801937103,
-1.195164680480957,
-0.2586612403392792,
-0.31480303406715393,
-0.5432970523834229,
2.740867853164673,
-1.3378974199295044,
-0.07792507112026215,
-0.9671334028244019,
-0.7081739902496338,
1.6108341217041016,
-1.2720723152160645,
-0.2553006112575531,
-1.0934581756591797,
-0.5543851852416992,
-1.1720590591430664,
-0.45064982771873474,
-0.05666481703519821,
-0.9490275382995605,
0.7821968793869019,
0.19200146198272705,
-1.2170133590698242,
-0.38713330030441284,
-0.8624403476715088,
0.9403495192527771,
-0.15493135154247284,
0.1803836077451706,
1.7386573553085327,
0.2563028633594513,
-0.4018048048019409,
0.8271958231925964,
1.2014315128326416,
0.6636483073234558,
-0.7483891248703003,
0.030827566981315613,
-0.662165641784668,
0.45521828532218933,
-1.2217992544174194,
0.3176509439945221,
-2.8922462463378906,
0.6811144948005676,
-0.07138019800186157,
-0.049702439457178116,
-0.12440011650323868,
-1.4514776468276978,
1.0372357368469238,
2.594543695449829,
-1.215579867362976,
0.5434573888778687,
0.36182230710983276,
1.1472632884979248,
-1.5803900957107544,
0.37821343541145325,
-0.5112549662590027,
2.0968844890594482,
0.26084715127944946,
1.2430977821350098,
-0.4811573326587677,
-2.3423044681549072,
0.6464247703552246,
-1.174617886543274,
-1.1900031566619873,
0.819944441318512,
-0.915147066116333,
0.18660660088062286,
-1.2839112281799316,
-0.23601633310317993,
-0.9719527959823608,
-1.208901286125183,
0.5094685554504395,
0.16972900927066803,
0.45744043588638306,
-0.6057223081588745,
0.25651708245277405,
-2.219481945037842,
-1.354366660118103,
-0.20827116072177887,
-0.9645559191703796,
0.51446533203125,
-0.495752215385437,
0.5864648222923279,
-0.10257817059755325,
0.04845570772886276,
0.33087658882141113,
1.4695210456848145,
3.367506742477417,
0.11831335723400116,
0.21715229749679565,
-0.2657011151313782,
-0.978121817111969,
1.4798774719238281,
0.9044498801231384,
-0.16553913056850433,
-0.6636135578155518,
-1.020277500152588,
1.234684944152832,
1.976897954940796,
0.9297517538070679,
-0.08520971238613129,
-0.7624091506004333,
-0.7146705389022827,
-0.029803190380334854,
0.17095836997032166,
0.5330412983894348,
0.9395872950553894,
0.09787673503160477,
0.047561317682266235,
1.396945595741272,
1.1198805570602417,
-0.4422503411769867,
0.2788045406341553,
-0.8662976026535034,
-0.3911759555339813,
0.4606929421424866,
0.30883944034576416,
-0.01750151626765728,
0.3354130983352661,
-0.954810380935669,
-0.2792345881462097,
-0.34861212968826294,
-0.8598766922950745,
-0.805553674697876,
-0.40257540345191956,
-0.4305233061313629,
1.6474206447601318,
0.13652624189853668,
-0.5206579566001892,
-0.04556139558553696,
-0.7095710635185242,
-0.18684826791286469,
-1.0953805446624756,
0.30860665440559387,
-0.13656054437160492,
-0.11229584366083145,
-0.10775468498468399,
1.765499472618103,
-0.8943217992782593,
-2.079639434814453,
0.22793273627758026,
0.1914920061826706,
-0.22612746059894562,
0.1283949911594391,
1.7258151769638062,
0.5330884456634521,
1.3926360607147217,
1.334253191947937,
0.9823508262634277,
-0.7389815449714661,
-1.3009192943572998,
0.7355347275733948,
1.0167464017868042,
-1.4693025350570679,
0.8555925488471985,
-0.07189710438251495,
-0.5465630292892456,
0.6435933113098145,
1.3728986978530884,
0.5100707411766052,
-2.024681568145752,
0.8602848052978516,
-1.1216576099395752,
0.8536980152130127,
0.7850520014762878,
0.6710385084152222,
0.1389254331588745,
0.8602538704872131,
-1.1639339923858643,
-1.1247918605804443,
-0.6324482560157776,
-0.7545640468597412,
1.9504553079605103,
-0.4075566828250885,
0.6302828192710876,
-0.12393065541982651,
-1.2184321880340576,
-0.04938174784183502,
0.7656363248825073,
0.3193094730377197,
-0.3707166016101837,
0.8173311948776245,
-0.7129978537559509,
-1.0831137895584106,
-1.2688298225402832,
-0.4467640519142151,
-1.0357729196548462,
-0.9660271406173706,
0.9767569303512573,
0.7122867703437805,
0.42982667684555054,
1.9343878030776978,
0.6477944850921631,
0.2696606516838074,
-2.55267596244812,
0.8758987784385681,
0.328369140625,
-0.08436256647109985,
0.8604432344436646,
0.3413039743900299,
1.0226939916610718,
0.04330093786120415,
0.5874477624893188,
-2.440460205078125,
2.3217926025390625,
-0.26675328612327576,
0.7051796317100525,
0.012250778265297413,
-0.19818544387817383,
1.1127012968063354,
0.6589473485946655,
0.497659295797348,
-0.9935375452041626,
0.8081495761871338,
-0.5398783087730408,
1.237033486366272,
0.9681013226509094,
-0.8493157625198364,
0.0484226830303669,
1.3118164539337158,
0.4215608239173889,
-0.5947917699813843,
-0.9349759221076965,
-1.0296045541763306,
0.8865489363670349,
1.7746104001998901,
-0.13557136058807373,
-0.046252839267253876,
0.6857415437698364,
0.7226569652557373,
-1.1912318468093872,
0.0003318497911095619,
-0.6768572330474854,
-0.7657152414321899,
1.6653544902801514,
2.090827465057373,
-0.08807753771543503,
-0.10303425788879395,
-0.7146127820014954,
-1.3112515211105347,
0.8469957709312439,
-0.08071573823690414,
0.07981904596090317,
0.540989100933075,
-0.5937026739120483,
1.0250272750854492,
0.7387165427207947,
0.979387640953064,
0.10570327937602997,
0.2152964174747467,
0.42982789874076843,
-0.23603494465351105,
-1.1689926385879517,
-0.3331949710845947,
-1.0974206924438477,
-2.559634208679199,
0.3446071147918701,
-0.27105972170829773,
-1.5364413261413574,
-0.015584276989102364,
-0.9945657849311829,
0.8374834656715393,
-0.5423663258552551,
-1.1432256698608398,
-1.5318124294281006,
0.19307318329811096,
-0.05769629403948784,
0.9059650897979736,
-1.6041007041931152,
-0.20909899473190308,
1.2205417156219482,
0.8948439955711365,
-0.6365440487861633,
1.0819684267044067,
0.22687746584415436,
0.9912687540054321,
0.7860949039459229,
-0.35675787925720215,
0.6338884830474854,
0.10794171690940857,
-1.349237322807312,
0.5237047672271729,
1.3878405094146729,
0.1449548751115799,
1.5238226652145386,
-0.3653009533882141,
0.07801494002342224,
0.3961775600910187,
-0.580600380897522,
-0.47215157747268677,
-0.4602191150188446,
0.7611413598060608,
0.019638143479824066,
-0.8562718629837036,
-0.07322997599840164,
-0.1713765263557434,
-0.2976842224597931,
0.23533906042575836,
-1.531602144241333,
-0.20034070312976837,
-0.4717499017715454,
-0.5534760355949402,
-1.321518063545227,
-0.06630083173513412,
1.4553825855255127,
-0.7382953763008118,
-0.20204457640647888,
0.44013217091560364,
0.3760294020175934,
0.5522979497909546,
0.6800292134284973,
-0.7577266693115234,
-0.30288267135620117,
-0.313955157995224,
-0.34511929750442505,
0.35647717118263245,
1.3366135358810425,
0.020066145807504654,
-0.9270210266113281,
0.5885561108589172,
-0.36780619621276855,
0.14001120626926422,
1.997121810913086,
0.11176784336566925,
-0.7255086302757263,
0.355007141828537,
-0.7943900227546692,
1.8923083543777466,
1.5963141918182373,
1.277644157409668,
-0.08522002398967743,
-0.9383187890052795,
0.6217703223228455,
-0.358688622713089,
-0.3686772584915161,
0.8612311482429504,
0.3905298113822937,
-0.27905499935150146,
-1.3499089479446411,
0.7856167554855347,
1.164289116859436,
-0.7514616250991821,
-0.752831220626831,
0.047470249235630035,
-0.815140426158905,
1.200024962425232,
0.5389530658721924,
0.3308705687522888,
0.3016453981399536,
1.7056355476379395,
0.7430019974708557,
-0.5266441106796265,
0.5650742053985596,
0.4813157021999359,
-0.2465953379869461,
-2.096801996231079,
-1.1080414056777954,
0.3777594268321991,
-0.4639571011066437,
-1.6053069829940796,
1.4586659669876099,
-1.2071161270141602,
-1.0788180828094482,
0.5282666683197021,
0.0477532334625721,
1.2820683717727661,
0.3695058524608612,
1.6800267696380615,
2.0824267864227295,
0.8863952159881592,
0.48516082763671875,
1.2471883296966553,
-0.27410048246383667,
-0.5397372841835022,
1.7809045314788818,
-0.5077664852142334,
0.4583212733268738,
1.168236494064331,
-0.36037200689315796,
-1.1321759223937988,
-0.8148978352546692,
-1.1361287832260132,
-0.7077578902244568,
1.1431231498718262,
0.06180157884955406,
-1.147261381149292,
0.2927742004394531,
1.624171257019043,
0.14680132269859314,
-0.24368232488632202,
0.6742085814476013,
0.37779921293258667,
-0.7749039530754089,
-0.1690075695514679,
-0.9377759695053101,
0.5150539875030518,
-0.26551660895347595,
-0.3716141879558563,
0.2588610351085663,
0.5440859198570251,
1.2633705139160156,
-0.12494506686925888,
0.13978421688079834,
1.1212435960769653,
-1.4357737302780151,
1.3944506645202637,
-0.6079227924346924,
0.27282023429870605,
-2.326171398162842,
1.3998057842254639,
-0.7453092336654663,
2.0323386192321777,
-2.650909662246704,
0.4197938144207001,
-0.5452999472618103,
-0.45574328303337097,
0.28546273708343506,
-0.2593259811401367,
0.12501561641693115,
-0.14008696377277374,
-1.02657949924469,
-0.08761689066886902,
-0.7125363349914551,
0.6646944284439087,
1.1260032653808594,
1.3219037055969238,
-1.1010265350341797,
-0.17459584772586823,
-1.5779017210006714,
-0.18781080842018127,
-0.7624942064285278,
0.19251132011413574,
-1.9632319211959839,
-0.22021490335464478,
-2.0298681259155273,
-2.393156051635742,
-1.279409408569336,
-0.895098090171814,
1.0954275131225586,
0.20296652615070343,
-0.8694469928741455,
1.2270206212997437,
-0.3316582441329956,
-1.8596878051757812,
1.2168949842453003,
-2.0761003494262695
] |
https://github.com/huggingface/datasets/issues/4855 | Dataset Viewer issue for super_glue | Thanks for reporting @wzsxxa.
However the "super_glue" dataset is rendered properly by the Dataset preview: https://huggingface.co/datasets/super_glue | ### Link
https://huggingface.co/datasets/super_glue
### Description
can't view super_glue dataset on the web page
### Owner
_No response_ | 576 | 16 | Dataset Viewer issue for super_glue
### Link
https://huggingface.co/datasets/super_glue
### Description
can't view super_glue dataset on the web page
### Owner
_No response_
Thanks for reporting @wzsxxa.
However the "super_glue" dataset is rendered properly by the Dataset preview: https://huggingface.co/datasets/super_glue | [
-1.1841480731964111,
-0.8808952569961548,
-0.8182873129844666,
1.421588659286499,
-0.21064147353172302,
-1.4609220027923584,
0.12862063944339752,
-0.9386324882507324,
1.6036221981048584,
-0.8649789094924927,
0.19960281252861023,
-1.6653884649276733,
-0.2043749988079071,
-0.5042577385902405,
-0.5472941994667053,
-0.9183364510536194,
-0.38261568546295166,
-0.590866208076477,
1.13469398021698,
2.617457151412964,
1.3034676313400269,
-1.1478134393692017,
2.783482789993286,
0.6270193457603455,
-0.42997777462005615,
-0.986253023147583,
0.6190556883811951,
0.08180435001850128,
-1.2239470481872559,
-0.5196954011917114,
-0.8896740078926086,
0.0756552517414093,
-0.4102540612220764,
-0.3464912176132202,
0.022341102361679077,
0.5582345724105835,
-0.15021935105323792,
-0.392256498336792,
-0.51972895860672,
-0.7706547975540161,
0.26672837138175964,
-0.26351749897003174,
0.9153061509132385,
-0.5298886299133301,
1.8111848831176758,
-0.5759699940681458,
0.3004968762397766,
0.6965672969818115,
1.2907731533050537,
0.09313039481639862,
0.04316103458404541,
0.07893295586109161,
0.449978768825531,
-0.1773509532213211,
0.49966299533843994,
1.1045976877212524,
0.40394583344459534,
0.5697266459465027,
0.4994751214981079,
-2.199401378631592,
1.3425341844558716,
-0.8631870150566101,
0.15306968986988068,
1.6153956651687622,
-0.9677222967147827,
0.4783792793750763,
-1.7077285051345825,
-0.028664350509643555,
0.5834426879882812,
-2.2104973793029785,
0.27420225739479065,
-1.2252048254013062,
-0.6515074968338013,
0.9120769500732422,
0.3424369692802429,
-1.3456600904464722,
0.06329460442066193,
-0.45810121297836304,
1.0673191547393799,
0.5935380458831787,
1.1094282865524292,
-1.6380558013916016,
0.08972287178039551,
-0.28831323981285095,
-0.1162397563457489,
-1.369531512260437,
-1.5630923509597778,
0.4516448974609375,
0.6261707544326782,
0.7833911180496216,
-0.011995519511401653,
0.7893938422203064,
-0.9716841578483582,
0.6201425790786743,
-0.789969801902771,
-1.6980986595153809,
-1.405635118484497,
-2.6560511589050293,
-2.4001927375793457,
0.766370415687561,
-0.3802042305469513,
-0.5422280430793762,
1.8778645992279053,
-1.087309718132019,
-1.8538496494293213,
1.2353054285049438,
0.1308041512966156,
0.07843799889087677,
2.4978582859039307,
0.3675910234451294,
-0.6569011211395264,
0.2904921770095825,
-0.7339648604393005,
0.727205753326416,
-0.5047988891601562,
1.299249529838562,
0.5578665137290955,
-0.9642866849899292,
1.6666884422302246,
-0.5318352580070496,
0.6918032169342041,
-0.6978418231010437,
-0.5527002811431885,
-0.850227952003479,
0.31053614616394043,
1.77837073802948,
-0.3855692446231842,
1.629488468170166,
-0.47636058926582336,
-1.4202972650527954,
-1.5718694925308228,
0.8841627836227417,
0.3929443657398224,
-0.7994580268859863,
0.26218217611312866,
-0.38005268573760986,
0.02277146652340889,
-0.14431600272655487,
1.1052734851837158,
1.092223882675171,
0.6254957318305969,
-0.4053749740123749,
-0.7598154544830322,
0.3136928081512451,
0.12973228096961975,
-0.7501962780952454,
-1.6890166997909546,
-0.16521605849266052,
0.2641712725162506,
0.5953125953674316,
-1.1824166774749756,
1.664419412612915,
0.7496201395988464,
2.0691027641296387,
0.8253569602966309,
-0.3600757420063019,
1.2114156484603882,
0.013899213634431362,
1.748773217201233,
-0.42529934644699097,
0.6271576881408691,
-0.16549144685268402,
-1.3013300895690918,
0.8687897324562073,
-0.4504415988922119,
-1.9916399717330933,
-0.966671347618103,
-0.8600073456764221,
-0.14384658634662628,
-0.735312819480896,
0.9317149519920349,
-0.29232460260391235,
-1.4974381923675537,
0.16107948124408722,
-0.5307531952857971,
0.2332705855369568,
-1.3104249238967896,
0.12123388051986694,
0.7028815746307373,
-0.44265085458755493,
-0.1430278867483139,
-0.27689409255981445,
-1.450901746749878,
-0.35633087158203125,
0.43254315853118896,
1.9688704013824463,
-0.6199052929878235,
0.8882397413253784,
0.8790779113769531,
-0.688130795955658,
0.15258952975273132,
0.06411388516426086,
-0.39630326628685,
0.8472556471824646,
-1.0745826959609985,
-0.4831746518611908,
1.1611852645874023,
-0.19355587661266327,
-0.7097035050392151,
1.5861321687698364,
0.7708014249801636,
-0.9784536361694336,
-0.16931702196598053,
-0.29662424325942993,
-0.8338989615440369,
-0.1247231513261795,
-1.5958712100982666,
-0.11204271763563156,
0.18831421434879303,
-1.330214500427246,
-0.5190058350563049,
-0.2065514773130417,
1.4816162586212158,
-0.011632023379206657,
1.3757380247116089,
-0.3937125504016876,
-0.23541083931922913,
-0.5370910167694092,
-0.4563542604446411,
0.25684255361557007,
-0.3579113483428955,
-0.6503234505653381,
0.2710733413696289,
-0.8461229801177979,
0.2080439329147339,
1.5037022829055786,
0.34933236241340637,
0.11830444633960724,
0.6494359374046326,
1.0619151592254639,
0.295284241437912,
-0.27976614236831665,
-0.9500374794006348,
-1.6613497734069824,
1.8479869365692139,
-1.224155068397522,
1.9112876653671265,
0.7034499645233154,
-0.003341126721352339,
-1.8819026947021484,
-1.9588725566864014,
1.2445493936538696,
1.2517855167388916,
2.2296621799468994,
0.45548853278160095,
0.4239368736743927,
-0.8155198693275452,
-0.8244695067405701,
0.05506233498454094,
-1.0048834085464478,
-0.669468104839325,
0.2124379277229309,
2.157395362854004,
1.7793985605239868,
-0.5839860439300537,
-0.1442907303571701,
-1.073279619216919,
1.0769492387771606,
-0.1672428697347641,
0.17949359118938446,
1.9589475393295288,
-0.32816624641418457,
-0.8250921368598938,
1.220870852470398,
-2.233112096786499,
0.31114503741264343,
2.042538642883301,
0.10765580087900162,
0.19732224941253662,
-1.3877801895141602,
-0.8090624213218689,
-0.3190118074417114,
-0.3643709123134613,
-1.2684048414230347,
0.6759296655654907,
-0.34393686056137085,
-0.8020757436752319,
-1.3732895851135254,
0.12910164892673492,
-0.9352956414222717,
-1.591800332069397,
0.3582548201084137,
1.7545100450515747,
1.890781044960022,
-0.933289110660553,
1.4006233215332031,
-0.13145072758197784,
0.003027571365237236,
1.3869071006774902,
1.183933138847351,
3.0168840885162354,
1.8928025960922241,
-1.3684167861938477,
1.0024431943893433,
0.09906253963708878,
-0.37364107370376587,
1.2365604639053345,
-1.0886801481246948,
1.308602213859558,
-0.40035876631736755,
-1.1557748317718506,
-1.2863267660140991,
0.9283478856086731,
0.5533371567726135,
0.12376070022583008,
-0.5367494225502014,
1.3474361896514893,
-0.07753892242908478,
1.433175802230835,
0.6297721862792969,
-0.6245603561401367,
0.6216410994529724,
-0.48241865634918213,
-0.3699154555797577,
1.4812135696411133,
0.21925613284111023,
-1.6395357847213745,
-2.1868293285369873,
-0.19978728890419006,
-0.8080173134803772,
-0.2312673032283783,
-0.6687842607498169,
-1.0791382789611816,
1.596291422843933,
0.6841731071472168,
-1.140224575996399,
-0.44172585010528564,
-0.31122517585754395,
-0.46772241592407227,
2.777806043624878,
-1.3986035585403442,
-0.0471653938293457,
-1.0276907682418823,
-0.3559597432613373,
1.8683799505233765,
-1.209594964981079,
-0.17752768099308014,
-1.0176674127578735,
-0.80197674036026,
-1.3980942964553833,
-0.4769778549671173,
0.20324526727199554,
-0.9102703928947449,
0.8777463436126709,
-0.03600633144378662,
-1.185436487197876,
-0.2165830135345459,
-0.8461481928825378,
1.0939886569976807,
-0.18045461177825928,
0.19220846891403198,
2.062387704849243,
0.3426874577999115,
-0.48706722259521484,
0.7835012078285217,
1.1042659282684326,
0.5932534337043762,
-0.8092705011367798,
0.0809461921453476,
-0.6601941585540771,
0.3422529995441437,
-1.4523003101348877,
0.05729660764336586,
-3.0347039699554443,
0.573549211025238,
-0.11205639690160751,
-0.034928273409605026,
-0.005768339149653912,
-1.2926636934280396,
1.071205735206604,
2.418281316757202,
-1.2943487167358398,
0.4957454204559326,
0.3017783463001251,
1.127131462097168,
-1.518388032913208,
0.29544273018836975,
-0.5774604082107544,
1.9368375539779663,
0.052542831748723984,
1.2602587938308716,
-0.4488283097743988,
-2.000060796737671,
0.7597559094429016,
-1.206334114074707,
-0.9603413343429565,
0.8960093259811401,
-0.9088908433914185,
0.19734209775924683,
-1.4891777038574219,
-0.1566423922777176,
-0.8862371444702148,
-1.3974993228912354,
0.771719217300415,
0.058050137013196945,
0.37865909934043884,
-0.5345706939697266,
0.37367528676986694,
-2.0976312160491943,
-1.2090986967086792,
-0.2964443564414978,
-1.0252553224563599,
0.321221262216568,
-0.4208904504776001,
0.6688738465309143,
-0.06345424801111221,
0.14625947177410126,
0.21567176282405853,
1.2651628255844116,
3.3728795051574707,
0.06237104907631874,
0.14326097071170807,
-0.11865776032209396,
-1.0377936363220215,
1.4287266731262207,
1.122363805770874,
-0.0230272077023983,
-0.605717122554779,
-0.8680272698402405,
1.3499857187271118,
1.8549336194992065,
1.0294660329818726,
0.17515075206756592,
-0.8465989828109741,
-0.48594769835472107,
0.027636870741844177,
0.2558928430080414,
0.5471051931381226,
0.9883642196655273,
-0.022493408992886543,
0.1790340393781662,
1.5805052518844604,
1.191312551498413,
-0.4428800344467163,
0.4458157420158386,
-1.0189679861068726,
-0.39379745721817017,
0.4751266837120056,
0.3153630793094635,
0.06175384297966957,
0.46884992718696594,
-1.0837076902389526,
-0.35550662875175476,
-0.22899726033210754,
-0.9281167984008789,
-0.6811010837554932,
-0.4171537458896637,
-0.4051375687122345,
1.4474495649337769,
0.1631513386964798,
-0.5065655708312988,
-0.0366634801030159,
-0.698875904083252,
-0.20078697800636292,
-1.0909440517425537,
0.3560788333415985,
-0.09774265438318253,
-0.019310953095555305,
-0.1808059811592102,
1.7303062677383423,
-1.1390761137008667,
-2.3516592979431152,
0.15164586901664734,
0.314435750246048,
-0.23721402883529663,
0.06466701626777649,
1.703720211982727,
0.35604462027549744,
1.5112608671188354,
1.1752618551254272,
1.0647107362747192,
-0.7058069705963135,
-1.3425068855285645,
0.6245670318603516,
1.1992437839508057,
-1.486545443534851,
0.866215169429779,
-0.1408606469631195,
-0.5301125645637512,
0.7676690816879272,
1.1962087154388428,
0.4076008200645447,
-1.746832013130188,
0.8885875344276428,
-0.9285680651664734,
0.7802268862724304,
0.7744805216789246,
1.0493234395980835,
0.2701900005340576,
0.9051106572151184,
-1.2418081760406494,
-1.192522406578064,
-0.6360731720924377,
-0.5587608218193054,
1.957151174545288,
-0.3514846861362457,
0.6065632700920105,
-0.1732301265001297,
-1.1223149299621582,
-0.015958579257130623,
0.8022230863571167,
0.23035918176174164,
-0.33404114842414856,
0.892988383769989,
-0.5315406918525696,
-0.890581488609314,
-1.3090101480484009,
-0.5051627159118652,
-0.9762266874313354,
-0.990204393863678,
1.1275123357772827,
0.7799831628799438,
0.45067137479782104,
1.9881157875061035,
0.45600625872612,
0.461489200592041,
-2.5649585723876953,
0.8212043642997742,
0.22249625623226166,
0.26659712195396423,
0.8893820643424988,
0.18468666076660156,
1.168020248413086,
-0.07246602326631546,
0.47948652505874634,
-2.3473196029663086,
2.1065804958343506,
-0.11390892416238785,
0.5934125781059265,
-0.0667550191283226,
-0.20575091242790222,
1.1087251901626587,
0.5204535126686096,
0.6318039894104004,
-1.1132711172103882,
0.798856258392334,
-0.4857843816280365,
1.120395541191101,
0.9186745285987854,
-0.8444674015045166,
-0.08233034610748291,
1.5359796285629272,
0.6280125975608826,
-0.4085092544555664,
-0.8364028930664062,
-0.7422325015068054,
1.0006484985351562,
1.5872247219085693,
0.11681094765663147,
0.019155234098434448,
0.7723396420478821,
0.41910308599472046,
-1.2717663049697876,
0.05596410855650902,
-0.7291284799575806,
-0.4635586738586426,
1.7315970659255981,
2.0007553100585938,
-0.011722118593752384,
-0.08887434750795364,
-0.8102153539657593,
-1.034966230392456,
0.7084856033325195,
-0.15445853769779205,
0.12201772630214691,
0.8032032251358032,
-0.667744517326355,
1.0538878440856934,
0.3969440162181854,
0.9041712284088135,
-0.020676229149103165,
0.3111168444156647,
0.47261419892311096,
-0.15208348631858826,
-1.3179391622543335,
-0.33038589358329773,
-1.1805613040924072,
-2.41235089302063,
0.523300290107727,
-0.38345491886138916,
-1.4496018886566162,
0.02559172362089157,
-1.1397545337677002,
0.9382798075675964,
-0.6172136068344116,
-1.2486368417739868,
-1.5284312963485718,
0.20146575570106506,
-0.17708076536655426,
0.838707685470581,
-1.6133509874343872,
-0.20089665055274963,
1.4815095663070679,
0.9214507341384888,
-0.657752513885498,
1.0318183898925781,
0.26763013005256653,
1.0546751022338867,
0.654373288154602,
-0.26945367455482483,
0.3587220311164856,
-0.07653937488794327,
-1.3786873817443848,
0.6339497566223145,
1.096467137336731,
0.24111312627792358,
1.4522210359573364,
-0.5918716192245483,
0.03684017062187195,
0.5530509352684021,
-0.5435159802436829,
-0.5398697853088379,
-0.362881064414978,
0.7973921895027161,
0.1028701439499855,
-0.8920116424560547,
-0.03427310287952423,
-0.29569438099861145,
-0.3532211184501648,
0.2585591971874237,
-1.4385393857955933,
-0.3760804831981659,
-0.4290294945240021,
-0.5697056651115417,
-1.385573387145996,
0.07503354549407959,
1.3472347259521484,
-0.7332644462585449,
-0.29404279589653015,
0.6033276915550232,
0.334154337644577,
0.5548579692840576,
0.6588366031646729,
-0.5442832112312317,
-0.06589917838573456,
-0.46522364020347595,
-0.13355669379234314,
0.3402194380760193,
1.4273260831832886,
-0.22218802571296692,
-1.203231692314148,
0.7711035013198853,
-0.5701195001602173,
0.12075342237949371,
2.2542121410369873,
0.18829984962940216,
-0.848455548286438,
0.4075734317302704,
-0.7071987390518188,
1.9336917400360107,
1.5851956605911255,
1.4088608026504517,
-0.10298024117946625,
-0.8614386320114136,
0.530656099319458,
-0.1069120541214943,
-0.3333420753479004,
0.798155665397644,
0.4670768678188324,
-0.2677934169769287,
-1.4969570636749268,
0.5721474885940552,
1.1719778776168823,
-0.9666219353675842,
-0.7708072662353516,
0.14646032452583313,
-0.8673968315124512,
1.1214882135391235,
0.8446921110153198,
0.3803667724132538,
0.25984591245651245,
1.5008132457733154,
0.7477899789810181,
-0.4360562562942505,
0.4245977997779846,
0.6298968195915222,
0.02248283475637436,
-1.9052780866622925,
-0.7418093681335449,
0.43100830912590027,
-0.44683048129081726,
-1.510225534439087,
1.3830934762954712,
-1.0446891784667969,
-1.0577147006988525,
0.4157622754573822,
0.16395272314548492,
1.37034273147583,
0.34325024485588074,
1.660843849182129,
2.0608155727386475,
0.9797044992446899,
0.22195680439472198,
1.381208062171936,
-0.1694088727235794,
-0.3707256317138672,
1.8016903400421143,
-0.4493749439716339,
0.4467374086380005,
0.9843723177909851,
-0.4446735680103302,
-1.0891155004501343,
-0.7102874517440796,
-1.1506203413009644,
-0.5366975665092468,
1.2983001470565796,
0.3005908727645874,
-0.9846360683441162,
0.12481464445590973,
1.3641371726989746,
0.0792168378829956,
-0.28488394618034363,
0.6898666024208069,
0.5766025185585022,
-0.8651189804077148,
-0.031888045370578766,
-0.8321323394775391,
0.5392864346504211,
-0.08955425769090652,
-0.2315070480108261,
0.34085893630981445,
0.6327240467071533,
1.3818929195404053,
-0.09753547608852386,
0.3472362458705902,
1.2447116374969482,
-1.3440337181091309,
1.459574818611145,
-0.6536291241645813,
0.009419615380465984,
-2.645829439163208,
1.4005464315414429,
-0.7369338274002075,
1.7493841648101807,
-2.776545286178589,
0.4676302969455719,
-0.5689865350723267,
-0.3002338409423828,
0.3255731165409088,
-0.3827037811279297,
-0.0159744992852211,
-0.14617829024791718,
-1.1699708700180054,
0.0170697383582592,
-0.7162624597549438,
0.7114455699920654,
1.1915514469146729,
1.2269442081451416,
-1.2958532571792603,
-0.2901277244091034,
-1.771017074584961,
-0.12860648334026337,
-1.0137120485305786,
0.420409232378006,
-2.0173323154449463,
-0.08684269338846207,
-1.7853249311447144,
-2.4791040420532227,
-1.3083332777023315,
-0.6904036402702332,
1.0262655019760132,
0.3030204772949219,
-1.0338095426559448,
1.1965967416763306,
-0.43338853120803833,
-1.8596044778823853,
1.1232141256332397,
-2.196106195449829
] |
https://github.com/huggingface/datasets/issues/4852 | Bug in multilingual_with_para config of exams dataset and checksums error | Hi @albertvillanova. Unfortunately I still get this error. Is this because the merge has yet to be released? Is there a way to track the release? | ## Describe the bug
There is a bug for "multilingual_with_para" config in exams dataset:
```python
ds = load_dataset("./datasets/exams", split="train")
```
raises:
```
KeyError: 'choices'
```
Moreover, there is a NonMatchingChecksumError:
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/train_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/dev_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_vi_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_vi_with_para.jsonl.tar.gz']
```
CC: @thesofakillers | 577 | 26 | Bug in multilingual_with_para config of exams dataset and checksums error
## Describe the bug
There is a bug for "multilingual_with_para" config in exams dataset:
```python
ds = load_dataset("./datasets/exams", split="train")
```
raises:
```
KeyError: 'choices'
```
Moreover, there is a NonMatchingChecksumError:
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/train_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/dev_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_vi_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_vi_with_para.jsonl.tar.gz']
```
CC: @thesofakillers
Hi @albertvillanova. Unfortunately I still get this error. Is this because the merge has yet to be released? Is there a way to track the release? | [
-1.0743063688278198,
-0.9510710835456848,
-0.7357849478721619,
1.4875166416168213,
-0.01801903359591961,
-1.1906912326812744,
0.18714678287506104,
-0.8532134890556335,
1.4793486595153809,
-0.6938851475715637,
0.19578614830970764,
-1.7068966627120972,
-0.2667774260044098,
-0.5740647912025452,
-0.7871548533439636,
-0.6899439692497253,
-0.2551976442337036,
-0.7889228463172913,
0.9655539989471436,
2.478959798812866,
1.2842954397201538,
-1.2585279941558838,
2.777369976043701,
0.6211103796958923,
-0.20145848393440247,
-1.0245989561080933,
0.5817530751228333,
-0.09717342257499695,
-1.0945490598678589,
-0.49649837613105774,
-0.8587219715118408,
0.15610089898109436,
-0.568844735622406,
-0.28435400128364563,
0.07058542221784592,
0.5361286401748657,
-0.2624121606349945,
-0.20922870934009552,
-0.6885361075401306,
-0.7574186325073242,
0.4943121373653412,
-0.27764013409614563,
0.9548264145851135,
-0.20941102504730225,
1.7734659910202026,
-0.6083206534385681,
0.4497361481189728,
0.7078769207000732,
1.25071382522583,
0.1726425737142563,
0.09931071102619171,
0.18735212087631226,
0.32077330350875854,
0.13381095230579376,
0.6540042757987976,
1.2816784381866455,
0.6028327345848083,
0.5536890625953674,
0.5712992548942566,
-2.2627835273742676,
1.309862494468689,
-0.8300188779830933,
0.3318322002887726,
1.324705719947815,
-0.6852355599403381,
0.33611831068992615,
-1.8436301946640015,
-0.006030809134244919,
0.5112589597702026,
-2.284135580062866,
0.19704411923885345,
-1.4038711786270142,
-0.49218663573265076,
0.8765026330947876,
0.21809761226177216,
-1.2130671739578247,
0.21756239235401154,
-0.42824313044548035,
1.1437852382659912,
0.5027672648429871,
1.039498209953308,
-1.5779660940170288,
-0.11454539746046066,
0.029524900019168854,
0.09868291020393372,
-1.2580348253250122,
-1.7333189249038696,
0.48392680287361145,
0.6272403001785278,
0.7292165756225586,
-0.20865601301193237,
1.0409221649169922,
-1.1006338596343994,
0.8130423426628113,
-0.884610116481781,
-1.6820634603500366,
-1.416078805923462,
-2.3363659381866455,
-2.246290445327759,
0.8194307088851929,
-0.5026935935020447,
-0.3851064145565033,
1.9893361330032349,
-0.8762274384498596,
-1.8461848497390747,
0.9531030654907227,
0.39785414934158325,
0.16329997777938843,
2.339085340499878,
0.28488025069236755,
-0.7552263140678406,
0.388432115316391,
-0.7414640784263611,
0.7682516574859619,
-0.2967718839645386,
1.3875699043273926,
0.5464758276939392,
-0.9143345355987549,
1.6667571067810059,
-0.47514408826828003,
0.5858966112136841,
-0.6925573348999023,
-0.4492451250553131,
-0.7806096076965332,
0.21217729151248932,
1.8841794729232788,
-0.37237343192100525,
1.4989264011383057,
-0.339290052652359,
-1.5470670461654663,
-1.5719109773635864,
0.8769762516021729,
0.3885093331336975,
-0.886211097240448,
0.0672798678278923,
-0.6295813322067261,
0.207793727517128,
-0.058675650507211685,
1.1637319326400757,
1.1343839168548584,
0.7915013432502747,
-0.3018113374710083,
-0.7663190960884094,
0.33467575907707214,
-0.19324150681495667,
-0.5943306088447571,
-1.8134857416152954,
-0.2959546148777008,
0.4299098253250122,
0.6057599782943726,
-1.1829978227615356,
1.9139894247055054,
0.7962970733642578,
2.103851556777954,
0.9037027955055237,
-0.4769665598869324,
1.4223157167434692,
-0.07704564183950424,
1.9044140577316284,
-0.5271598100662231,
0.4482506513595581,
-0.2894385755062103,
-1.1059380769729614,
0.899416983127594,
-0.36480408906936646,
-2.0210301876068115,
-0.7685073614120483,
-0.9129806756973267,
-0.1361192762851715,
-0.7248374819755554,
0.8520092368125916,
-0.31716957688331604,
-1.3887889385223389,
0.015572450123727322,
-0.7372429966926575,
0.14203038811683655,
-1.259960412979126,
0.05626888945698738,
0.8319587111473083,
-0.7069106101989746,
-0.05842288210988045,
-0.18388880789279938,
-1.3346844911575317,
-0.555668294429779,
0.555138885974884,
1.9667831659317017,
-0.4401371479034424,
0.9126777648925781,
1.0497597455978394,
-0.8037425875663757,
0.214741513133049,
0.28267261385917664,
-0.39815181493759155,
0.7520918250083923,
-0.9101425409317017,
-0.5125325322151184,
1.1826077699661255,
-0.3488025367259979,
-0.8377469182014465,
1.4347736835479736,
0.9329118728637695,
-1.0279340744018555,
-0.3335908353328705,
-0.26778626441955566,
-0.7679839134216309,
-0.00343486201018095,
-1.5743926763534546,
-0.19948020577430725,
0.35731807351112366,
-1.483491063117981,
-0.37900835275650024,
-0.35585519671440125,
1.4185460805892944,
-0.22155524790287018,
1.4517546892166138,
-0.16855749487876892,
-0.09952804446220398,
-0.39019349217414856,
-0.5396600365638733,
0.16739672422409058,
-0.23873727023601532,
-0.6770877242088318,
0.23907576501369476,
-0.8820379376411438,
0.35577574372291565,
1.5795453786849976,
0.321171373128891,
-0.021690215915441513,
0.5459374189376831,
1.1597431898117065,
0.38730159401893616,
-0.07226027548313141,
-1.005312442779541,
-1.581291913986206,
1.9286047220230103,
-1.3607842922210693,
1.814823031425476,
0.74237459897995,
-0.0722401887178421,
-1.7728615999221802,
-1.8433797359466553,
1.2631756067276,
1.153647780418396,
2.3821465969085693,
0.560901403427124,
0.4798209071159363,
-0.7771003246307373,
-0.7772830724716187,
0.32687637209892273,
-0.9952392578125,
-0.7549048066139221,
0.12166498601436615,
2.348637580871582,
1.9517126083374023,
-0.640329897403717,
-0.22051255404949188,
-0.8820434808731079,
1.2132960557937622,
-0.3113457262516022,
0.229157492518425,
2.187034845352173,
-0.29988187551498413,
-0.8851293921470642,
1.3687812089920044,
-2.4972424507141113,
0.37305569648742676,
2.096665859222412,
0.28315824270248413,
0.12552005052566528,
-1.5055415630340576,
-0.5809208750724792,
-0.3147040903568268,
-0.4274287521839142,
-1.2050102949142456,
0.6257590055465698,
-0.16640767455101013,
-1.0154118537902832,
-1.3608577251434326,
0.09628627449274063,
-1.065675139427185,
-1.804390549659729,
0.3609497547149658,
1.9065098762512207,
2.0800042152404785,
-0.8064727187156677,
1.3408801555633545,
-0.19965294003486633,
0.05635683611035347,
1.352743148803711,
1.424424171447754,
3.2383079528808594,
1.8561911582946777,
-1.2100858688354492,
0.7740638256072998,
-0.3060637414455414,
-0.5822098255157471,
1.1764699220657349,
-1.1311709880828857,
0.893732488155365,
-0.3600867688655853,
-1.229276418685913,
-1.3090389966964722,
1.0576752424240112,
0.46545350551605225,
-0.029007501900196075,
-0.41119980812072754,
1.2148867845535278,
0.23818154633045197,
1.4564965963363647,
0.7545443177223206,
-0.46882912516593933,
0.42165765166282654,
-0.2404841035604477,
-0.4817579984664917,
1.6827694177627563,
0.06137492135167122,
-1.4849443435668945,
-2.2684431076049805,
-0.35696151852607727,
-1.008518099784851,
-0.02183944173157215,
-0.591475784778595,
-1.042576551437378,
1.4848769903182983,
0.5801321864128113,
-1.1901766061782837,
-0.3203009068965912,
-0.33240368962287903,
-0.5296722054481506,
2.6407244205474854,
-1.2988255023956299,
-0.17318403720855713,
-1.055620551109314,
-0.42601966857910156,
1.6545355319976807,
-1.2450177669525146,
-0.2887292802333832,
-1.0084134340286255,
-0.7233573198318481,
-1.3957583904266357,
-0.41726914048194885,
0.015090239234268665,
-0.8282762765884399,
0.7796229720115662,
0.04129454866051674,
-1.052606225013733,
-0.2803093492984772,
-0.9539752006530762,
1.1543762683868408,
-0.2368183732032776,
0.15186914801597595,
1.8095966577529907,
0.3391416668891907,
-0.4298458695411682,
0.882949948310852,
1.1106160879135132,
0.5849215984344482,
-0.6078131794929504,
0.09474452584981918,
-0.7366690635681152,
0.3584820032119751,
-1.5664080381393433,
0.12856028974056244,
-2.9667484760284424,
0.8180525898933411,
-0.16099654138088226,
-0.22506369650363922,
-0.2774289846420288,
-1.4162468910217285,
1.1830178499221802,
2.5011179447174072,
-1.2850160598754883,
0.48848333954811096,
0.4685145318508148,
1.1198794841766357,
-1.544705867767334,
0.1391824185848236,
-0.4997459948062897,
1.9468318223953247,
0.04373757913708687,
1.246361494064331,
-0.4594079256057739,
-2.116236925125122,
0.6455069184303284,
-1.2152045965194702,
-0.8432276248931885,
0.921468198299408,
-0.8140974640846252,
0.20881013572216034,
-1.388121247291565,
-0.12454653531312943,
-1.0718259811401367,
-1.308619499206543,
0.7075190544128418,
0.0227276012301445,
0.33825406432151794,
-0.6371132135391235,
0.4331440329551697,
-2.1371288299560547,
-1.3468570709228516,
-0.1960122138261795,
-1.0058133602142334,
0.5388197302818298,
-0.36199870705604553,
0.5193095803260803,
0.07040149718523026,
-0.02008325606584549,
0.27168071269989014,
1.4751901626586914,
3.3552310466766357,
0.15273591876029968,
0.25680994987487793,
-0.08637212216854095,
-0.9720078110694885,
1.4598958492279053,
0.8730027079582214,
-0.12949366867542267,
-0.46423301100730896,
-1.016141414642334,
1.3197382688522339,
2.06131911277771,
1.1269993782043457,
0.18032865226268768,
-0.8954463601112366,
-0.787257194519043,
-0.01539888046681881,
0.17927640676498413,
0.5701610445976257,
1.026463508605957,
0.051522716879844666,
0.06937763094902039,
1.2226144075393677,
1.220536708831787,
-0.24897219240665436,
0.47579774260520935,
-0.9225580096244812,
-0.34720057249069214,
0.3797437846660614,
0.061630729585886,
-0.033573683351278305,
0.5325077772140503,
-1.0576775074005127,
-0.2394585758447647,
-0.2210841327905655,
-0.8510567545890808,
-0.8282981514930725,
-0.3811984062194824,
-0.32107511162757874,
1.511937141418457,
0.10029365867376328,
-0.5431775450706482,
0.14529915153980255,
-0.7501161098480225,
-0.22523412108421326,
-1.0291247367858887,
0.055065836757421494,
-0.21442818641662598,
-0.03595061972737312,
-0.2655215263366699,
1.560625672340393,
-0.9862471222877502,
-2.0668997764587402,
0.16873392462730408,
0.4044797122478485,
-0.4097200930118561,
0.21027378737926483,
1.8051612377166748,
0.43452611565589905,
1.3365917205810547,
1.2739468812942505,
1.0315865278244019,
-0.5237274169921875,
-1.1999648809432983,
0.7669354677200317,
0.8790961503982544,
-1.2878119945526123,
0.8260477185249329,
-0.27148956060409546,
-0.4740045666694641,
0.6729169487953186,
1.2442798614501953,
0.3336672782897949,
-1.9736992120742798,
0.8208997845649719,
-1.0151933431625366,
0.8043988347053528,
0.6783913373947144,
0.8040381669998169,
0.3500053286552429,
0.885417640209198,
-1.269242763519287,
-1.1063079833984375,
-0.6989567279815674,
-0.6132997870445251,
1.934850811958313,
-0.13323839008808136,
0.5276808738708496,
0.09505574405193329,
-1.3176751136779785,
-0.24710576236248016,
0.8805555701255798,
0.38192811608314514,
-0.556240439414978,
0.9278098940849304,
-0.6196478009223938,
-0.9139524102210999,
-1.174394130706787,
-0.4051932394504547,
-0.9765632748603821,
-0.96871417760849,
1.0085986852645874,
0.7615835070610046,
0.42455363273620605,
1.8747888803482056,
0.5514944195747375,
0.38399237394332886,
-2.636425733566284,
0.8865553140640259,
0.3344634175300598,
0.015278457663953304,
0.9102345108985901,
0.23868811130523682,
1.1993738412857056,
-0.11387674510478973,
0.6805127263069153,
-2.2585887908935547,
2.2282798290252686,
-0.07997214794158936,
0.5971198081970215,
0.00728182215243578,
-0.2961375415325165,
1.1110695600509644,
0.5858762264251709,
0.5879318714141846,
-1.1850612163543701,
0.8051106929779053,
-0.6371650099754333,
1.118526577949524,
0.8936716914176941,
-0.9318657517433167,
0.16290655732154846,
1.4903953075408936,
0.4893290102481842,
-0.4748322069644928,
-0.9940764904022217,
-0.9385531544685364,
1.0179392099380493,
1.6238288879394531,
0.004217228852212429,
-0.07629252225160599,
0.9181333184242249,
0.7039182186126709,
-1.324715256690979,
0.09787459671497345,
-0.5638863444328308,
-0.47760292887687683,
1.7469531297683716,
2.029507637023926,
-0.09517895430326462,
-0.1287165880203247,
-0.8574840426445007,
-1.2605040073394775,
0.510958194732666,
0.031967826187610626,
-0.0030396757647395134,
0.8685854077339172,
-0.6966522932052612,
1.1730515956878662,
0.47598162293434143,
0.9778181314468384,
-0.022675324231386185,
0.37519317865371704,
0.35206305980682373,
-0.5196154713630676,
-1.2825899124145508,
-0.521467387676239,
-1.2295496463775635,
-2.6235239505767822,
0.46136829257011414,
-0.3299134373664856,
-1.4767030477523804,
0.054577600210905075,
-1.0912400484085083,
0.8968200087547302,
-0.727192759513855,
-1.1431348323822021,
-1.3027420043945312,
0.4041332006454468,
-0.2035655528306961,
0.8182207942008972,
-1.6429567337036133,
-0.17148150503635406,
1.2617548704147339,
0.8812819719314575,
-0.586735725402832,
0.9290193915367126,
0.2389511913061142,
1.0112708806991577,
0.7368517518043518,
-0.30963268876075745,
0.6065992116928101,
0.13696463406085968,
-1.3569568395614624,
0.42238715291023254,
1.140424132347107,
0.20284119248390198,
1.4100006818771362,
-0.5229641199111938,
0.2360691875219345,
0.47698259353637695,
-0.7307978868484497,
-0.6392313838005066,
-0.471857488155365,
0.7124731540679932,
-0.0029594432562589645,
-1.1426568031311035,
-0.031098902225494385,
-0.24132515490055084,
-0.1424199938774109,
0.19436684250831604,
-1.5977849960327148,
-0.3480549156665802,
-0.22483645379543304,
-0.4936162531375885,
-1.3244075775146484,
0.15827618539333344,
1.3615505695343018,
-0.8526762127876282,
-0.19211535155773163,
0.45568224787712097,
0.23949891328811646,
0.646344780921936,
0.5174246430397034,
-0.8903087377548218,
-0.24304907023906708,
-0.34977832436561584,
-0.2551511228084564,
0.2623957693576813,
1.189897060394287,
0.05295867845416069,
-0.9238423109054565,
0.6262997388839722,
-0.5625689625740051,
0.1582903116941452,
1.9803391695022583,
-0.04727659001946449,
-0.8086227774620056,
0.3184300661087036,
-0.757081151008606,
1.7501121759414673,
1.5656245946884155,
1.3031620979309082,
-0.05634240433573723,
-0.6422451734542847,
0.5840024948120117,
-0.3237239718437195,
-0.27250683307647705,
0.9321920871734619,
0.32351261377334595,
-0.34053492546081543,
-1.367871880531311,
0.5085539817810059,
1.3531990051269531,
-0.9218367338180542,
-0.8152194023132324,
0.10938537865877151,
-0.9801151156425476,
1.2370259761810303,
0.5551039576530457,
0.21242187917232513,
0.18614210188388824,
1.4995052814483643,
0.7242311835289001,
-0.4271657466888428,
0.5558173656463623,
0.5505146980285645,
-0.2482175976037979,
-2.070574998855591,
-0.9746683835983276,
0.21910187602043152,
-0.3563353419303894,
-1.5426359176635742,
1.4044758081436157,
-1.0686357021331787,
-0.983793318271637,
0.5346922874450684,
0.24664492905139923,
1.2473958730697632,
0.34883394837379456,
1.6837701797485352,
2.021470785140991,
0.758310854434967,
0.3790276050567627,
1.2573421001434326,
-0.10739786922931671,
-0.5512015223503113,
1.782444715499878,
-0.47065770626068115,
0.6741628646850586,
1.0503437519073486,
-0.5319177508354187,
-1.0968862771987915,
-0.895577609539032,
-1.2006678581237793,
-0.575626790523529,
1.3636891841888428,
0.15120601654052734,
-1.0267952680587769,
0.22348065674304962,
1.6003421545028687,
0.24103467166423798,
-0.20429186522960663,
0.7401224374771118,
0.412651002407074,
-0.6572918891906738,
0.07676060497760773,
-0.8279783129692078,
0.582973301410675,
-0.05974702537059784,
-0.21982522308826447,
0.2405560165643692,
0.4937102496623993,
1.283634066581726,
-0.053139686584472656,
0.1083267331123352,
1.1442914009094238,
-1.2248854637145996,
1.6804420948028564,
-0.6165034174919128,
0.3449006676673889,
-2.4991018772125244,
1.359568476676941,
-0.7846370339393616,
2.033567190170288,
-2.460073232650757,
0.34863749146461487,
-0.6215232610702515,
-0.46483778953552246,
0.1719880998134613,
-0.4600549042224884,
-0.019506674259901047,
-0.18680019676685333,
-1.0271888971328735,
-0.11254624277353287,
-0.9011186361312866,
0.5474498271942139,
1.2353109121322632,
1.4645559787750244,
-1.1173291206359863,
-0.34299492835998535,
-1.8671232461929321,
-0.21850891411304474,
-0.7806149125099182,
0.488718718290329,
-1.9113174676895142,
-0.260751336812973,
-2.0333313941955566,
-2.2259984016418457,
-1.3232395648956299,
-0.8263445496559143,
0.8806433081626892,
0.09694714099168777,
-0.9146618843078613,
1.1236572265625,
-0.326058566570282,
-1.6873732805252075,
0.9613987803459167,
-2.1631782054901123
] |
https://github.com/huggingface/datasets/issues/4852 | Bug in multilingual_with_para config of exams dataset and checksums error | Hi @thesofakillers, yes you are right: the fix will be available after next release (it was planned for today; Monday at the latest).
In the meantime, you can use the version of the `exams` on our main branch by passing `revision` to `load_dataset`:
```python
ds = load_dataset("exams", revision="main")
``` | ## Describe the bug
There is a bug for "multilingual_with_para" config in exams dataset:
```python
ds = load_dataset("./datasets/exams", split="train")
```
raises:
```
KeyError: 'choices'
```
Moreover, there is a NonMatchingChecksumError:
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/train_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/dev_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_vi_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_vi_with_para.jsonl.tar.gz']
```
CC: @thesofakillers | 577 | 49 | Bug in multilingual_with_para config of exams dataset and checksums error
## Describe the bug
There is a bug for "multilingual_with_para" config in exams dataset:
```python
ds = load_dataset("./datasets/exams", split="train")
```
raises:
```
KeyError: 'choices'
```
Moreover, there is a NonMatchingChecksumError:
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/train_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/dev_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_vi_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_vi_with_para.jsonl.tar.gz']
```
CC: @thesofakillers
Hi @thesofakillers, yes you are right: the fix will be available after next release (it was planned for today; Monday at the latest).
In the meantime, you can use the version of the `exams` on our main branch by passing `revision` to `load_dataset`:
```python
ds = load_dataset("exams", revision="main")
``` | [
-1.0743063688278198,
-0.9510710835456848,
-0.7357849478721619,
1.4875166416168213,
-0.01801903359591961,
-1.1906912326812744,
0.18714678287506104,
-0.8532134890556335,
1.4793486595153809,
-0.6938851475715637,
0.19578614830970764,
-1.7068966627120972,
-0.2667774260044098,
-0.5740647912025452,
-0.7871548533439636,
-0.6899439692497253,
-0.2551976442337036,
-0.7889228463172913,
0.9655539989471436,
2.478959798812866,
1.2842954397201538,
-1.2585279941558838,
2.777369976043701,
0.6211103796958923,
-0.20145848393440247,
-1.0245989561080933,
0.5817530751228333,
-0.09717342257499695,
-1.0945490598678589,
-0.49649837613105774,
-0.8587219715118408,
0.15610089898109436,
-0.568844735622406,
-0.28435400128364563,
0.07058542221784592,
0.5361286401748657,
-0.2624121606349945,
-0.20922870934009552,
-0.6885361075401306,
-0.7574186325073242,
0.4943121373653412,
-0.27764013409614563,
0.9548264145851135,
-0.20941102504730225,
1.7734659910202026,
-0.6083206534385681,
0.4497361481189728,
0.7078769207000732,
1.25071382522583,
0.1726425737142563,
0.09931071102619171,
0.18735212087631226,
0.32077330350875854,
0.13381095230579376,
0.6540042757987976,
1.2816784381866455,
0.6028327345848083,
0.5536890625953674,
0.5712992548942566,
-2.2627835273742676,
1.309862494468689,
-0.8300188779830933,
0.3318322002887726,
1.324705719947815,
-0.6852355599403381,
0.33611831068992615,
-1.8436301946640015,
-0.006030809134244919,
0.5112589597702026,
-2.284135580062866,
0.19704411923885345,
-1.4038711786270142,
-0.49218663573265076,
0.8765026330947876,
0.21809761226177216,
-1.2130671739578247,
0.21756239235401154,
-0.42824313044548035,
1.1437852382659912,
0.5027672648429871,
1.039498209953308,
-1.5779660940170288,
-0.11454539746046066,
0.029524900019168854,
0.09868291020393372,
-1.2580348253250122,
-1.7333189249038696,
0.48392680287361145,
0.6272403001785278,
0.7292165756225586,
-0.20865601301193237,
1.0409221649169922,
-1.1006338596343994,
0.8130423426628113,
-0.884610116481781,
-1.6820634603500366,
-1.416078805923462,
-2.3363659381866455,
-2.246290445327759,
0.8194307088851929,
-0.5026935935020447,
-0.3851064145565033,
1.9893361330032349,
-0.8762274384498596,
-1.8461848497390747,
0.9531030654907227,
0.39785414934158325,
0.16329997777938843,
2.339085340499878,
0.28488025069236755,
-0.7552263140678406,
0.388432115316391,
-0.7414640784263611,
0.7682516574859619,
-0.2967718839645386,
1.3875699043273926,
0.5464758276939392,
-0.9143345355987549,
1.6667571067810059,
-0.47514408826828003,
0.5858966112136841,
-0.6925573348999023,
-0.4492451250553131,
-0.7806096076965332,
0.21217729151248932,
1.8841794729232788,
-0.37237343192100525,
1.4989264011383057,
-0.339290052652359,
-1.5470670461654663,
-1.5719109773635864,
0.8769762516021729,
0.3885093331336975,
-0.886211097240448,
0.0672798678278923,
-0.6295813322067261,
0.207793727517128,
-0.058675650507211685,
1.1637319326400757,
1.1343839168548584,
0.7915013432502747,
-0.3018113374710083,
-0.7663190960884094,
0.33467575907707214,
-0.19324150681495667,
-0.5943306088447571,
-1.8134857416152954,
-0.2959546148777008,
0.4299098253250122,
0.6057599782943726,
-1.1829978227615356,
1.9139894247055054,
0.7962970733642578,
2.103851556777954,
0.9037027955055237,
-0.4769665598869324,
1.4223157167434692,
-0.07704564183950424,
1.9044140577316284,
-0.5271598100662231,
0.4482506513595581,
-0.2894385755062103,
-1.1059380769729614,
0.899416983127594,
-0.36480408906936646,
-2.0210301876068115,
-0.7685073614120483,
-0.9129806756973267,
-0.1361192762851715,
-0.7248374819755554,
0.8520092368125916,
-0.31716957688331604,
-1.3887889385223389,
0.015572450123727322,
-0.7372429966926575,
0.14203038811683655,
-1.259960412979126,
0.05626888945698738,
0.8319587111473083,
-0.7069106101989746,
-0.05842288210988045,
-0.18388880789279938,
-1.3346844911575317,
-0.555668294429779,
0.555138885974884,
1.9667831659317017,
-0.4401371479034424,
0.9126777648925781,
1.0497597455978394,
-0.8037425875663757,
0.214741513133049,
0.28267261385917664,
-0.39815181493759155,
0.7520918250083923,
-0.9101425409317017,
-0.5125325322151184,
1.1826077699661255,
-0.3488025367259979,
-0.8377469182014465,
1.4347736835479736,
0.9329118728637695,
-1.0279340744018555,
-0.3335908353328705,
-0.26778626441955566,
-0.7679839134216309,
-0.00343486201018095,
-1.5743926763534546,
-0.19948020577430725,
0.35731807351112366,
-1.483491063117981,
-0.37900835275650024,
-0.35585519671440125,
1.4185460805892944,
-0.22155524790287018,
1.4517546892166138,
-0.16855749487876892,
-0.09952804446220398,
-0.39019349217414856,
-0.5396600365638733,
0.16739672422409058,
-0.23873727023601532,
-0.6770877242088318,
0.23907576501369476,
-0.8820379376411438,
0.35577574372291565,
1.5795453786849976,
0.321171373128891,
-0.021690215915441513,
0.5459374189376831,
1.1597431898117065,
0.38730159401893616,
-0.07226027548313141,
-1.005312442779541,
-1.581291913986206,
1.9286047220230103,
-1.3607842922210693,
1.814823031425476,
0.74237459897995,
-0.0722401887178421,
-1.7728615999221802,
-1.8433797359466553,
1.2631756067276,
1.153647780418396,
2.3821465969085693,
0.560901403427124,
0.4798209071159363,
-0.7771003246307373,
-0.7772830724716187,
0.32687637209892273,
-0.9952392578125,
-0.7549048066139221,
0.12166498601436615,
2.348637580871582,
1.9517126083374023,
-0.640329897403717,
-0.22051255404949188,
-0.8820434808731079,
1.2132960557937622,
-0.3113457262516022,
0.229157492518425,
2.187034845352173,
-0.29988187551498413,
-0.8851293921470642,
1.3687812089920044,
-2.4972424507141113,
0.37305569648742676,
2.096665859222412,
0.28315824270248413,
0.12552005052566528,
-1.5055415630340576,
-0.5809208750724792,
-0.3147040903568268,
-0.4274287521839142,
-1.2050102949142456,
0.6257590055465698,
-0.16640767455101013,
-1.0154118537902832,
-1.3608577251434326,
0.09628627449274063,
-1.065675139427185,
-1.804390549659729,
0.3609497547149658,
1.9065098762512207,
2.0800042152404785,
-0.8064727187156677,
1.3408801555633545,
-0.19965294003486633,
0.05635683611035347,
1.352743148803711,
1.424424171447754,
3.2383079528808594,
1.8561911582946777,
-1.2100858688354492,
0.7740638256072998,
-0.3060637414455414,
-0.5822098255157471,
1.1764699220657349,
-1.1311709880828857,
0.893732488155365,
-0.3600867688655853,
-1.229276418685913,
-1.3090389966964722,
1.0576752424240112,
0.46545350551605225,
-0.029007501900196075,
-0.41119980812072754,
1.2148867845535278,
0.23818154633045197,
1.4564965963363647,
0.7545443177223206,
-0.46882912516593933,
0.42165765166282654,
-0.2404841035604477,
-0.4817579984664917,
1.6827694177627563,
0.06137492135167122,
-1.4849443435668945,
-2.2684431076049805,
-0.35696151852607727,
-1.008518099784851,
-0.02183944173157215,
-0.591475784778595,
-1.042576551437378,
1.4848769903182983,
0.5801321864128113,
-1.1901766061782837,
-0.3203009068965912,
-0.33240368962287903,
-0.5296722054481506,
2.6407244205474854,
-1.2988255023956299,
-0.17318403720855713,
-1.055620551109314,
-0.42601966857910156,
1.6545355319976807,
-1.2450177669525146,
-0.2887292802333832,
-1.0084134340286255,
-0.7233573198318481,
-1.3957583904266357,
-0.41726914048194885,
0.015090239234268665,
-0.8282762765884399,
0.7796229720115662,
0.04129454866051674,
-1.052606225013733,
-0.2803093492984772,
-0.9539752006530762,
1.1543762683868408,
-0.2368183732032776,
0.15186914801597595,
1.8095966577529907,
0.3391416668891907,
-0.4298458695411682,
0.882949948310852,
1.1106160879135132,
0.5849215984344482,
-0.6078131794929504,
0.09474452584981918,
-0.7366690635681152,
0.3584820032119751,
-1.5664080381393433,
0.12856028974056244,
-2.9667484760284424,
0.8180525898933411,
-0.16099654138088226,
-0.22506369650363922,
-0.2774289846420288,
-1.4162468910217285,
1.1830178499221802,
2.5011179447174072,
-1.2850160598754883,
0.48848333954811096,
0.4685145318508148,
1.1198794841766357,
-1.544705867767334,
0.1391824185848236,
-0.4997459948062897,
1.9468318223953247,
0.04373757913708687,
1.246361494064331,
-0.4594079256057739,
-2.116236925125122,
0.6455069184303284,
-1.2152045965194702,
-0.8432276248931885,
0.921468198299408,
-0.8140974640846252,
0.20881013572216034,
-1.388121247291565,
-0.12454653531312943,
-1.0718259811401367,
-1.308619499206543,
0.7075190544128418,
0.0227276012301445,
0.33825406432151794,
-0.6371132135391235,
0.4331440329551697,
-2.1371288299560547,
-1.3468570709228516,
-0.1960122138261795,
-1.0058133602142334,
0.5388197302818298,
-0.36199870705604553,
0.5193095803260803,
0.07040149718523026,
-0.02008325606584549,
0.27168071269989014,
1.4751901626586914,
3.3552310466766357,
0.15273591876029968,
0.25680994987487793,
-0.08637212216854095,
-0.9720078110694885,
1.4598958492279053,
0.8730027079582214,
-0.12949366867542267,
-0.46423301100730896,
-1.016141414642334,
1.3197382688522339,
2.06131911277771,
1.1269993782043457,
0.18032865226268768,
-0.8954463601112366,
-0.787257194519043,
-0.01539888046681881,
0.17927640676498413,
0.5701610445976257,
1.026463508605957,
0.051522716879844666,
0.06937763094902039,
1.2226144075393677,
1.220536708831787,
-0.24897219240665436,
0.47579774260520935,
-0.9225580096244812,
-0.34720057249069214,
0.3797437846660614,
0.061630729585886,
-0.033573683351278305,
0.5325077772140503,
-1.0576775074005127,
-0.2394585758447647,
-0.2210841327905655,
-0.8510567545890808,
-0.8282981514930725,
-0.3811984062194824,
-0.32107511162757874,
1.511937141418457,
0.10029365867376328,
-0.5431775450706482,
0.14529915153980255,
-0.7501161098480225,
-0.22523412108421326,
-1.0291247367858887,
0.055065836757421494,
-0.21442818641662598,
-0.03595061972737312,
-0.2655215263366699,
1.560625672340393,
-0.9862471222877502,
-2.0668997764587402,
0.16873392462730408,
0.4044797122478485,
-0.4097200930118561,
0.21027378737926483,
1.8051612377166748,
0.43452611565589905,
1.3365917205810547,
1.2739468812942505,
1.0315865278244019,
-0.5237274169921875,
-1.1999648809432983,
0.7669354677200317,
0.8790961503982544,
-1.2878119945526123,
0.8260477185249329,
-0.27148956060409546,
-0.4740045666694641,
0.6729169487953186,
1.2442798614501953,
0.3336672782897949,
-1.9736992120742798,
0.8208997845649719,
-1.0151933431625366,
0.8043988347053528,
0.6783913373947144,
0.8040381669998169,
0.3500053286552429,
0.885417640209198,
-1.269242763519287,
-1.1063079833984375,
-0.6989567279815674,
-0.6132997870445251,
1.934850811958313,
-0.13323839008808136,
0.5276808738708496,
0.09505574405193329,
-1.3176751136779785,
-0.24710576236248016,
0.8805555701255798,
0.38192811608314514,
-0.556240439414978,
0.9278098940849304,
-0.6196478009223938,
-0.9139524102210999,
-1.174394130706787,
-0.4051932394504547,
-0.9765632748603821,
-0.96871417760849,
1.0085986852645874,
0.7615835070610046,
0.42455363273620605,
1.8747888803482056,
0.5514944195747375,
0.38399237394332886,
-2.636425733566284,
0.8865553140640259,
0.3344634175300598,
0.015278457663953304,
0.9102345108985901,
0.23868811130523682,
1.1993738412857056,
-0.11387674510478973,
0.6805127263069153,
-2.2585887908935547,
2.2282798290252686,
-0.07997214794158936,
0.5971198081970215,
0.00728182215243578,
-0.2961375415325165,
1.1110695600509644,
0.5858762264251709,
0.5879318714141846,
-1.1850612163543701,
0.8051106929779053,
-0.6371650099754333,
1.118526577949524,
0.8936716914176941,
-0.9318657517433167,
0.16290655732154846,
1.4903953075408936,
0.4893290102481842,
-0.4748322069644928,
-0.9940764904022217,
-0.9385531544685364,
1.0179392099380493,
1.6238288879394531,
0.004217228852212429,
-0.07629252225160599,
0.9181333184242249,
0.7039182186126709,
-1.324715256690979,
0.09787459671497345,
-0.5638863444328308,
-0.47760292887687683,
1.7469531297683716,
2.029507637023926,
-0.09517895430326462,
-0.1287165880203247,
-0.8574840426445007,
-1.2605040073394775,
0.510958194732666,
0.031967826187610626,
-0.0030396757647395134,
0.8685854077339172,
-0.6966522932052612,
1.1730515956878662,
0.47598162293434143,
0.9778181314468384,
-0.022675324231386185,
0.37519317865371704,
0.35206305980682373,
-0.5196154713630676,
-1.2825899124145508,
-0.521467387676239,
-1.2295496463775635,
-2.6235239505767822,
0.46136829257011414,
-0.3299134373664856,
-1.4767030477523804,
0.054577600210905075,
-1.0912400484085083,
0.8968200087547302,
-0.727192759513855,
-1.1431348323822021,
-1.3027420043945312,
0.4041332006454468,
-0.2035655528306961,
0.8182207942008972,
-1.6429567337036133,
-0.17148150503635406,
1.2617548704147339,
0.8812819719314575,
-0.586735725402832,
0.9290193915367126,
0.2389511913061142,
1.0112708806991577,
0.7368517518043518,
-0.30963268876075745,
0.6065992116928101,
0.13696463406085968,
-1.3569568395614624,
0.42238715291023254,
1.140424132347107,
0.20284119248390198,
1.4100006818771362,
-0.5229641199111938,
0.2360691875219345,
0.47698259353637695,
-0.7307978868484497,
-0.6392313838005066,
-0.471857488155365,
0.7124731540679932,
-0.0029594432562589645,
-1.1426568031311035,
-0.031098902225494385,
-0.24132515490055084,
-0.1424199938774109,
0.19436684250831604,
-1.5977849960327148,
-0.3480549156665802,
-0.22483645379543304,
-0.4936162531375885,
-1.3244075775146484,
0.15827618539333344,
1.3615505695343018,
-0.8526762127876282,
-0.19211535155773163,
0.45568224787712097,
0.23949891328811646,
0.646344780921936,
0.5174246430397034,
-0.8903087377548218,
-0.24304907023906708,
-0.34977832436561584,
-0.2551511228084564,
0.2623957693576813,
1.189897060394287,
0.05295867845416069,
-0.9238423109054565,
0.6262997388839722,
-0.5625689625740051,
0.1582903116941452,
1.9803391695022583,
-0.04727659001946449,
-0.8086227774620056,
0.3184300661087036,
-0.757081151008606,
1.7501121759414673,
1.5656245946884155,
1.3031620979309082,
-0.05634240433573723,
-0.6422451734542847,
0.5840024948120117,
-0.3237239718437195,
-0.27250683307647705,
0.9321920871734619,
0.32351261377334595,
-0.34053492546081543,
-1.367871880531311,
0.5085539817810059,
1.3531990051269531,
-0.9218367338180542,
-0.8152194023132324,
0.10938537865877151,
-0.9801151156425476,
1.2370259761810303,
0.5551039576530457,
0.21242187917232513,
0.18614210188388824,
1.4995052814483643,
0.7242311835289001,
-0.4271657466888428,
0.5558173656463623,
0.5505146980285645,
-0.2482175976037979,
-2.070574998855591,
-0.9746683835983276,
0.21910187602043152,
-0.3563353419303894,
-1.5426359176635742,
1.4044758081436157,
-1.0686357021331787,
-0.983793318271637,
0.5346922874450684,
0.24664492905139923,
1.2473958730697632,
0.34883394837379456,
1.6837701797485352,
2.021470785140991,
0.758310854434967,
0.3790276050567627,
1.2573421001434326,
-0.10739786922931671,
-0.5512015223503113,
1.782444715499878,
-0.47065770626068115,
0.6741628646850586,
1.0503437519073486,
-0.5319177508354187,
-1.0968862771987915,
-0.895577609539032,
-1.2006678581237793,
-0.575626790523529,
1.3636891841888428,
0.15120601654052734,
-1.0267952680587769,
0.22348065674304962,
1.6003421545028687,
0.24103467166423798,
-0.20429186522960663,
0.7401224374771118,
0.412651002407074,
-0.6572918891906738,
0.07676060497760773,
-0.8279783129692078,
0.582973301410675,
-0.05974702537059784,
-0.21982522308826447,
0.2405560165643692,
0.4937102496623993,
1.283634066581726,
-0.053139686584472656,
0.1083267331123352,
1.1442914009094238,
-1.2248854637145996,
1.6804420948028564,
-0.6165034174919128,
0.3449006676673889,
-2.4991018772125244,
1.359568476676941,
-0.7846370339393616,
2.033567190170288,
-2.460073232650757,
0.34863749146461487,
-0.6215232610702515,
-0.46483778953552246,
0.1719880998134613,
-0.4600549042224884,
-0.019506674259901047,
-0.18680019676685333,
-1.0271888971328735,
-0.11254624277353287,
-0.9011186361312866,
0.5474498271942139,
1.2353109121322632,
1.4645559787750244,
-1.1173291206359863,
-0.34299492835998535,
-1.8671232461929321,
-0.21850891411304474,
-0.7806149125099182,
0.488718718290329,
-1.9113174676895142,
-0.260751336812973,
-2.0333313941955566,
-2.2259984016418457,
-1.3232395648956299,
-0.8263445496559143,
0.8806433081626892,
0.09694714099168777,
-0.9146618843078613,
1.1236572265625,
-0.326058566570282,
-1.6873732805252075,
0.9613987803459167,
-2.1631782054901123
] |
https://github.com/huggingface/datasets/issues/4840 | Dataset Viewer issue for darragh/demo_data_raw3 | do you have an idea of why it can occur @huggingface/datasets? The dataset consists of a single parquet file. | ### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No | 578 | 19 | Dataset Viewer issue for darragh/demo_data_raw3
### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No
do you have an idea of why it can occur @huggingface/datasets? The dataset consists of a single parquet file. | [
-1.2012805938720703,
-0.84283047914505,
-0.7416695356369019,
1.587403655052185,
-0.20985786616802216,
-1.3231991529464722,
0.1615014374256134,
-1.0201702117919922,
1.7200276851654053,
-0.6725649833679199,
0.24402396380901337,
-1.6692348718643188,
-0.044733449816703796,
-0.5601356029510498,
-0.6345704197883606,
-0.9889295101165771,
-0.3558554947376251,
-0.7567707896232605,
1.005062460899353,
2.543242931365967,
1.290189266204834,
-1.2162023782730103,
2.5968971252441406,
0.7003473043441772,
-0.3400167226791382,
-0.9271922707557678,
0.5356938242912292,
-0.016795821487903595,
-1.2406589984893799,
-0.4028184413909912,
-1.0063188076019287,
-0.1964367926120758,
-0.4918941855430603,
-0.5795544385910034,
-0.03307744488120079,
0.5437110066413879,
-0.2713424563407898,
-0.47889280319213867,
-0.5273372530937195,
-0.8233250379562378,
0.4113657772541046,
-0.3130345046520233,
0.7930718660354614,
-0.4458167552947998,
1.7824409008026123,
-0.6017062067985535,
0.41987019777297974,
0.6776381731033325,
1.3780020475387573,
0.0787515640258789,
-0.07312319427728653,
0.2194042205810547,
0.4237666726112366,
-0.10977992415428162,
0.4190119504928589,
1.084030270576477,
0.48193231225013733,
0.6248934864997864,
0.6460587382316589,
-2.2139780521392822,
1.3067946434020996,
-0.9102665185928345,
0.2351246327161789,
1.3627604246139526,
-1.083899736404419,
0.2814355194568634,
-1.6383949518203735,
-0.021144254133105278,
0.6429578065872192,
-2.2503559589385986,
0.32473716139793396,
-1.365177869796753,
-0.5745578408241272,
0.8711732029914856,
0.4234369099140167,
-1.29204261302948,
-0.07733188569545746,
-0.46543025970458984,
1.0891127586364746,
0.6087046265602112,
1.133613109588623,
-1.730883002281189,
0.1389545500278473,
-0.31953147053718567,
-0.005692692939192057,
-1.3632514476776123,
-1.4511148929595947,
0.6090534329414368,
0.7191259860992432,
0.7714070081710815,
-0.025647103786468506,
0.8656185269355774,
-0.8631976842880249,
0.6589152812957764,
-1.0174610614776611,
-1.7063795328140259,
-1.361540675163269,
-2.374011993408203,
-2.357365369796753,
0.685896098613739,
-0.4873867928981781,
-0.414642333984375,
1.9916085004806519,
-0.9711430072784424,
-1.890480399131775,
1.0633463859558105,
0.1952841430902481,
-0.0610777847468853,
2.348456621170044,
0.42825502157211304,
-0.6765192747116089,
0.3037087023258209,
-0.6851269006729126,
0.7384465932846069,
-0.46604132652282715,
1.3474230766296387,
0.4821987748146057,
-1.0169851779937744,
1.5258961915969849,
-0.4589258134365082,
0.7628276348114014,
-0.7582940459251404,
-0.45806047320365906,
-0.8062551021575928,
0.3410065472126007,
1.914983868598938,
-0.4522017538547516,
1.566208839416504,
-0.3830329179763794,
-1.631152868270874,
-1.545959234237671,
0.8732736706733704,
0.3962514400482178,
-0.7735575437545776,
0.2678954601287842,
-0.444991797208786,
0.012698131613433361,
-0.009334567934274673,
1.116559386253357,
1.2027114629745483,
0.6731712222099304,
-0.3547299802303314,
-0.764700710773468,
0.3414492905139923,
0.060988131910562515,
-0.7634949684143066,
-1.8434953689575195,
-0.3013398349285126,
0.16180559992790222,
0.6269012093544006,
-1.110994815826416,
1.6658470630645752,
0.8234496116638184,
2.0521652698516846,
0.9008344411849976,
-0.2281457781791687,
1.3726497888565063,
-0.012572474777698517,
1.9144278764724731,
-0.38936614990234375,
0.7468818426132202,
-0.3886185586452484,
-1.2156308889389038,
0.7731303572654724,
-0.42384031414985657,
-1.9225236177444458,
-0.8717352747917175,
-0.8643978238105774,
-0.055100806057453156,
-0.8209386467933655,
1.00844144821167,
-0.27258628606796265,
-1.3767019510269165,
0.18770986795425415,
-0.748418927192688,
0.13463793694972992,
-1.3196604251861572,
0.1883048564195633,
0.7575674057006836,
-0.5539365410804749,
0.07857862114906311,
-0.2719516158103943,
-1.2857283353805542,
-0.5195801258087158,
0.2933269441127777,
1.918933391571045,
-0.6994773149490356,
1.021877646446228,
0.9634124040603638,
-0.7403907179832458,
0.16959735751152039,
0.16688849031925201,
-0.1880197525024414,
0.75054532289505,
-1.16049325466156,
-0.229461669921875,
1.2847647666931152,
-0.22105231881141663,
-0.7909725904464722,
1.5306880474090576,
0.7115143537521362,
-1.0908269882202148,
-0.020063254982233047,
-0.3215356469154358,
-0.8196367621421814,
0.004046985879540443,
-1.6762135028839111,
-0.07247428596019745,
0.29811832308769226,
-1.4264130592346191,
-0.5592049956321716,
-0.19310271739959717,
1.4008119106292725,
-0.06089009717106819,
1.3116265535354614,
-0.3449092507362366,
-0.2539260685443878,
-0.36643186211586,
-0.3730759024620056,
0.18620455265045166,
-0.29439347982406616,
-0.5129585266113281,
0.15988032519817352,
-0.8450093865394592,
0.24594636261463165,
1.480098843574524,
0.23428374528884888,
0.24342767894268036,
0.5593274831771851,
1.0234007835388184,
0.31357231736183167,
-0.1346903294324875,
-0.834143340587616,
-1.5741000175476074,
1.9464823007583618,
-1.386045217514038,
2.0037972927093506,
0.7109037637710571,
-0.16160564124584198,
-1.8367693424224854,
-2.084326982498169,
1.2255340814590454,
1.2624645233154297,
2.322521924972534,
0.6368784308433533,
0.32662433385849,
-0.8215965628623962,
-0.6291906833648682,
0.2495293766260147,
-1.1091681718826294,
-0.6707902550697327,
0.26059940457344055,
2.30053448677063,
1.7501286268234253,
-0.6048383712768555,
-0.21369771659374237,
-1.087605357170105,
1.1615525484085083,
-0.115077905356884,
0.22590431571006775,
2.059030771255493,
-0.3833548128604889,
-0.8896845579147339,
1.2615604400634766,
-2.264348268508911,
0.16230258345603943,
2.062911033630371,
0.19646218419075012,
0.195395827293396,
-1.4691369533538818,
-0.7942030429840088,
-0.27306631207466125,
-0.33684590458869934,
-1.2761014699935913,
0.6609315872192383,
-0.32258525490760803,
-0.838126540184021,
-1.3995310068130493,
0.2386898398399353,
-0.8450630903244019,
-1.6538845300674438,
0.32241255044937134,
1.9874125719070435,
1.884490728378296,
-0.871284544467926,
1.5373283624649048,
-0.23224712908267975,
0.04839036613702774,
1.3814877271652222,
1.1440155506134033,
3.081256628036499,
1.9941614866256714,
-1.246782898902893,
0.8679193258285522,
0.034590404480695724,
-0.38132500648498535,
1.2116055488586426,
-1.2017680406570435,
1.2274607419967651,
-0.38747596740722656,
-1.2497748136520386,
-1.3977036476135254,
0.8992958664894104,
0.5477408766746521,
0.04350588843226433,
-0.568066418170929,
1.3766039609909058,
-0.04098876938223839,
1.3521844148635864,
0.5830445885658264,
-0.5058777332305908,
0.7168218493461609,
-0.3768916130065918,
-0.41958537697792053,
1.574116826057434,
0.3924572765827179,
-1.4250723123550415,
-2.2873475551605225,
-0.25386926531791687,
-0.8540089130401611,
-0.15942862629890442,
-0.6167235970497131,
-0.9798793196678162,
1.5988551378250122,
0.5610781908035278,
-1.1669853925704956,
-0.37303829193115234,
-0.29699787497520447,
-0.49870604276657104,
2.883554220199585,
-1.394086480140686,
-0.22822724282741547,
-1.0105592012405396,
-0.4430956244468689,
1.7752989530563354,
-1.1905523538589478,
-0.2614313066005707,
-1.1905102729797363,
-0.5897514820098877,
-1.2969224452972412,
-0.5082892179489136,
0.048657797276973724,
-0.8407660722732544,
0.860061526298523,
0.042532507330179214,
-1.1889625787734985,
-0.250002920627594,
-0.8562390208244324,
0.9761427044868469,
-0.06519114226102829,
0.31320229172706604,
2.059720993041992,
0.37756669521331787,
-0.4166002869606018,
0.6867244243621826,
1.099825143814087,
0.5488824844360352,
-0.7449784278869629,
0.19163841009140015,
-0.6318261027336121,
0.25415101647377014,
-1.3819509744644165,
0.19209952652454376,
-2.9978935718536377,
0.6082055568695068,
-0.16711825132369995,
-0.12525130808353424,
-0.04001954197883606,
-1.4129385948181152,
1.0528662204742432,
2.5490758419036865,
-1.2228375673294067,
0.4611513316631317,
0.28807660937309265,
1.1930755376815796,
-1.5874748229980469,
0.3126325011253357,
-0.46238231658935547,
2.0934600830078125,
0.16734226047992706,
1.282528042793274,
-0.40748077630996704,
-2.071995258331299,
0.7029529213905334,
-1.2026808261871338,
-1.1744705438613892,
0.9146608710289001,
-0.8803908824920654,
0.06774479895830154,
-1.4034515619277954,
-0.0864100232720375,
-0.7212235927581787,
-1.4088449478149414,
0.7252451777458191,
0.16894997656345367,
0.49800512194633484,
-0.5409201979637146,
0.3336591422557831,
-2.130350112915039,
-1.3197358846664429,
-0.22735023498535156,
-0.9786474108695984,
0.3228718340396881,
-0.35528236627578735,
0.6354327201843262,
-0.23844178020954132,
0.16077786684036255,
0.34191250801086426,
1.341930866241455,
3.4130349159240723,
0.1914694756269455,
0.2006092667579651,
-0.13429217040538788,
-0.9621753692626953,
1.424884557723999,
1.067177414894104,
-0.1724729984998703,
-0.5076693296432495,
-0.8305866122245789,
1.2011563777923584,
2.0007240772247314,
1.0721039772033691,
0.035056207329034805,
-0.897235631942749,
-0.6780848503112793,
-0.06425456702709198,
0.21490266919136047,
0.5390014052391052,
0.7549898028373718,
0.05069372430443764,
0.07721742987632751,
1.4098868370056152,
1.0842623710632324,
-0.42276251316070557,
0.5314322710037231,
-0.9579084515571594,
-0.4503415524959564,
0.44439399242401123,
0.4701995551586151,
0.061956968158483505,
0.27646464109420776,
-1.0311001539230347,
-0.25214800238609314,
-0.2973635196685791,
-0.9106587767601013,
-0.7316831946372986,
-0.41479796171188354,
-0.32199472188949585,
1.5976381301879883,
0.04292662814259529,
-0.470443457365036,
-0.16286896169185638,
-0.6507169604301453,
-0.11502715945243835,
-1.0406583547592163,
0.33586931228637695,
-0.1489948183298111,
-0.015519332140684128,
-0.04780685529112816,
1.7199406623840332,
-1.147440791130066,
-2.259617567062378,
0.33134371042251587,
0.39392513036727905,
-0.36069875955581665,
0.1882384717464447,
1.5998021364212036,
0.589120626449585,
1.4447420835494995,
1.3581640720367432,
1.0689177513122559,
-0.7750611305236816,
-1.3208035230636597,
0.687647819519043,
0.9488473534584045,
-1.4754385948181152,
0.7734118700027466,
-0.08107094466686249,
-0.4431856870651245,
0.6693271994590759,
1.236431360244751,
0.48857006430625916,
-1.9103941917419434,
0.8078182935714722,
-0.9126712679862976,
0.7827131748199463,
0.743662416934967,
0.8878424167633057,
0.24509580433368683,
0.8052984476089478,
-1.1766605377197266,
-1.2231056690216064,
-0.6772732734680176,
-0.7035654783248901,
1.8656941652297974,
-0.29227912425994873,
0.5698187947273254,
-0.15592768788337708,
-1.227518916130066,
-0.044862985610961914,
0.7647752165794373,
0.3114917576313019,
-0.37873345613479614,
0.8776397109031677,
-0.5203197002410889,
-0.9493751525878906,
-1.3014353513717651,
-0.5344797372817993,
-0.9624373912811279,
-1.0351684093475342,
0.9377745985984802,
0.8101469874382019,
0.4116341769695282,
1.8372244834899902,
0.5139150023460388,
0.3946572244167328,
-2.577460765838623,
0.9267667531967163,
0.27202048897743225,
0.1046600267291069,
0.7697194218635559,
0.3567165434360504,
0.9566001892089844,
-0.014189537614583969,
0.39327484369277954,
-2.2568390369415283,
2.235398054122925,
-0.24245551228523254,
0.501692533493042,
0.016785815358161926,
-0.14501942694187164,
0.9701479077339172,
0.5039077997207642,
0.5180548429489136,
-1.099961280822754,
0.7622029185295105,
-0.5911502838134766,
1.1604143381118774,
0.838345468044281,
-0.8216873407363892,
-0.041789356619119644,
1.3199467658996582,
0.6275882124900818,
-0.4000326693058014,
-0.9867144227027893,
-0.8437587022781372,
0.9843717813491821,
1.6265939474105835,
0.017671655863523483,
0.008910889737308025,
0.8639591932296753,
0.5019820332527161,
-1.2525302171707153,
0.02331838384270668,
-0.7245060801506042,
-0.6518211960792542,
1.7012009620666504,
1.8819708824157715,
-0.06188355013728142,
-0.10745792835950851,
-0.7725338935852051,
-1.1349470615386963,
0.8115841746330261,
-0.0633743554353714,
-0.006525040604174137,
0.7026473879814148,
-0.6554028391838074,
1.0312044620513916,
0.6136797070503235,
0.928786039352417,
0.042639490216970444,
0.3794679343700409,
0.42122209072113037,
-0.232142373919487,
-1.2698650360107422,
-0.3476080596446991,
-1.126938819885254,
-2.465486764907837,
0.4918576776981354,
-0.3482123911380768,
-1.4213746786117554,
0.07687358558177948,
-1.160699725151062,
0.9523595571517944,
-0.5159309506416321,
-0.9808980822563171,
-1.5108542442321777,
0.21593473851680756,
-0.19496247172355652,
0.8949984312057495,
-1.496874213218689,
-0.03441065922379494,
1.3269689083099365,
0.8356854915618896,
-0.8364455103874207,
1.0325682163238525,
0.15180058777332306,
1.128040075302124,
0.8382525444030762,
-0.34302806854248047,
0.4443179666996002,
0.047319769859313965,
-1.3754470348358154,
0.5576639771461487,
1.2711623907089233,
0.1645938605070114,
1.536690354347229,
-0.6285123229026794,
-0.033255573362112045,
0.447145015001297,
-0.6400054693222046,
-0.5682715177536011,
-0.5298739075660706,
0.7355824112892151,
0.2375909984111786,
-0.870341956615448,
0.00010550767183303833,
-0.11753097921609879,
-0.1894158571958542,
0.25129687786102295,
-1.5561045408248901,
-0.19783927500247955,
-0.3219698667526245,
-0.5369606018066406,
-1.3105170726776123,
0.039501309394836426,
1.368051290512085,
-0.6944706439971924,
-0.29443004727363586,
0.5264883041381836,
0.36753833293914795,
0.5067059993743896,
0.6140113472938538,
-0.7094823122024536,
-0.18771129846572876,
-0.3350115716457367,
-0.2875902056694031,
0.42887839674949646,
1.3905481100082397,
-0.09144697338342667,
-1.0266226530075073,
0.7970229387283325,
-0.39144662022590637,
0.11438263207674026,
2.0741240978240967,
0.21440307796001434,
-0.8292457461357117,
0.11126966774463654,
-0.8245290517807007,
1.9428536891937256,
1.57338547706604,
1.2494709491729736,
-0.08777490258216858,
-0.9555706977844238,
0.6456505656242371,
-0.2183872014284134,
-0.33186113834381104,
0.8477054238319397,
0.48294246196746826,
-0.33327603340148926,
-1.3720351457595825,
0.6485697627067566,
1.176804780960083,
-0.9000191688537598,
-0.8817274570465088,
0.02425980567932129,
-0.7373459339141846,
1.0886845588684082,
0.7702691555023193,
0.42695173621177673,
0.38585373759269714,
1.5925111770629883,
0.7157865166664124,
-0.35242706537246704,
0.37692227959632874,
0.34457725286483765,
0.01746337115764618,
-1.9696487188339233,
-1.0476869344711304,
0.5034142136573792,
-0.49330541491508484,
-1.5629431009292603,
1.3851715326309204,
-1.1867016553878784,
-0.9767923355102539,
0.46925827860832214,
0.16724799573421478,
1.5197579860687256,
0.3471260070800781,
1.5828782320022583,
2.079500913619995,
1.0364329814910889,
0.25198131799697876,
1.3823624849319458,
-0.08599824458360672,
-0.5134169459342957,
1.78386390209198,
-0.44638925790786743,
0.47930455207824707,
1.0589661598205566,
-0.4710840880870819,
-1.1450550556182861,
-0.780767023563385,
-1.211317777633667,
-0.5982038378715515,
1.126379132270813,
0.19953927397727966,
-1.2174627780914307,
0.2178262323141098,
1.5694297552108765,
0.11234307289123535,
-0.2891457676887512,
0.6821749210357666,
0.2841948866844177,
-0.9458886981010437,
0.0468226857483387,
-0.8336145281791687,
0.4863017201423645,
-0.23492038249969482,
-0.40561768412590027,
0.3140796720981598,
0.5054032802581787,
1.3319792747497559,
-0.05175653472542763,
0.16476982831954956,
1.1734230518341064,
-1.3800559043884277,
1.5125832557678223,
-0.5964924693107605,
0.22079074382781982,
-2.4187822341918945,
1.4908496141433716,
-0.6269084811210632,
1.8211305141448975,
-2.710771083831787,
0.5147338509559631,
-0.4330119788646698,
-0.5064890384674072,
0.32717639207839966,
-0.3522437810897827,
0.12697279453277588,
-0.14962753653526306,
-1.1472790241241455,
-0.00033026840537786484,
-0.7912600636482239,
0.6519851684570312,
1.145766258239746,
1.3298572301864624,
-1.1225993633270264,
-0.2187584787607193,
-1.787230372428894,
-0.2572362422943115,
-0.7831196188926697,
0.42303261160850525,
-1.9735215902328491,
-0.15759779512882233,
-1.8392574787139893,
-2.4398577213287354,
-1.2543513774871826,
-0.7058252096176147,
1.007218837738037,
0.2669990360736847,
-0.9328053593635559,
1.0886688232421875,
-0.36120590567588806,
-1.8690166473388672,
1.0049773454666138,
-2.20355486869812
] |
https://github.com/huggingface/datasets/issues/4840 | Dataset Viewer issue for darragh/demo_data_raw3 | Thanks for reporting @severo.
I'm not able to reproduce that error. I get instead:
```
FileNotFoundError: [Errno 2] No such file or directory: 'orix/data/ChiSig/唐合乐-9-3.jpg'
```
Which pyarrow version are you using? Mine is 6.0.1. | ### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No | 578 | 34 | Dataset Viewer issue for darragh/demo_data_raw3
### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No
Thanks for reporting @severo.
I'm not able to reproduce that error. I get instead:
```
FileNotFoundError: [Errno 2] No such file or directory: 'orix/data/ChiSig/唐合乐-9-3.jpg'
```
Which pyarrow version are you using? Mine is 6.0.1. | [
-1.1592084169387817,
-0.8718342185020447,
-0.7593993544578552,
1.6028813123703003,
-0.18003444373607635,
-1.2765394449234009,
0.11356078833341599,
-1.0947295427322388,
1.6628715991973877,
-0.7200427055358887,
0.29497596621513367,
-1.6143503189086914,
-0.0402279868721962,
-0.5690885782241821,
-0.7122957706451416,
-0.952621579170227,
-0.3201044201850891,
-0.705626904964447,
0.99773108959198,
2.5336756706237793,
1.2214961051940918,
-1.2238235473632812,
2.700242757797241,
0.7054703235626221,
-0.26671674847602844,
-1.0631219148635864,
0.567988395690918,
-0.01571161113679409,
-1.220224142074585,
-0.3418256640434265,
-0.9851624965667725,
-0.15433363616466522,
-0.5755237340927124,
-0.5091063976287842,
0.025241278111934662,
0.4794716536998749,
-0.31448987126350403,
-0.44214650988578796,
-0.5535473227500916,
-0.8142711520195007,
0.4854656159877777,
-0.38567715883255005,
0.8673262000083923,
-0.4302099049091339,
1.72551429271698,
-0.6269730925559998,
0.4593815803527832,
0.6948142647743225,
1.3645479679107666,
0.10869107395410538,
-0.04200948029756546,
0.28658661246299744,
0.4269832372665405,
-0.01807469129562378,
0.4252663552761078,
1.044761061668396,
0.5768223404884338,
0.553035318851471,
0.6650493741035461,
-2.252790927886963,
1.2099952697753906,
-0.8868794441223145,
0.20425507426261902,
1.3419755697250366,
-1.041350245475769,
0.292953759431839,
-1.736759901046753,
-0.054553575813770294,
0.6269381046295166,
-2.2053704261779785,
0.3287658989429474,
-1.3566734790802002,
-0.5191134214401245,
0.9517291784286499,
0.42737045884132385,
-1.2858344316482544,
-0.019969386979937553,
-0.4190942943096161,
1.0226101875305176,
0.5402035713195801,
1.0583844184875488,
-1.6712783575057983,
0.06436192989349365,
-0.2962915599346161,
0.022306695580482483,
-1.3002245426177979,
-1.493224859237671,
0.5981546640396118,
0.6909659504890442,
0.7549930214881897,
-0.02476050704717636,
0.9123156070709229,
-0.949668288230896,
0.747107744216919,
-1.0598185062408447,
-1.7718181610107422,
-1.376875638961792,
-2.3630242347717285,
-2.2684130668640137,
0.7325171828269958,
-0.42945852875709534,
-0.3999090790748596,
2.0018246173858643,
-1.0030943155288696,
-1.8634583950042725,
1.0772510766983032,
0.1686878353357315,
-0.01750369556248188,
2.319441795349121,
0.3813702464103699,
-0.7238215804100037,
0.36938008666038513,
-0.7655689120292664,
0.6853725910186768,
-0.421697199344635,
1.381313443183899,
0.4699195921421051,
-1.015282392501831,
1.6388590335845947,
-0.44089558720588684,
0.7303578853607178,
-0.7193717956542969,
-0.43305861949920654,
-0.8039169907569885,
0.30700892210006714,
1.998704195022583,
-0.4057482182979584,
1.555103063583374,
-0.335100382566452,
-1.5617172718048096,
-1.494896650314331,
0.7872327566146851,
0.4705725610256195,
-0.7375272512435913,
0.22836853563785553,
-0.3570660352706909,
0.07554883509874344,
-0.04625069350004196,
1.1622928380966187,
1.249267816543579,
0.6988818645477295,
-0.26678532361984253,
-0.8567641377449036,
0.27920597791671753,
0.04054829478263855,
-0.7826455235481262,
-1.8234658241271973,
-0.3918098509311676,
0.16325078904628754,
0.6506604552268982,
-1.1946123838424683,
1.7113673686981201,
0.8300440907478333,
1.99471116065979,
0.9563614130020142,
-0.2830495536327362,
1.4384452104568481,
0.037962161004543304,
1.9459267854690552,
-0.41209298372268677,
0.6966491341590881,
-0.39352092146873474,
-1.1817409992218018,
0.7454494833946228,
-0.35538485646247864,
-1.9738883972167969,
-0.7527582049369812,
-0.8832398056983948,
-0.05359075218439102,
-0.8081318736076355,
0.9826264977455139,
-0.30174005031585693,
-1.3691983222961426,
0.25573235750198364,
-0.8282213807106018,
0.10858834534883499,
-1.307083249092102,
0.2461448609828949,
0.7691798806190491,
-0.6022005081176758,
0.06089498847723007,
-0.32383671402931213,
-1.2966657876968384,
-0.5406110286712646,
0.3512226343154907,
1.8953182697296143,
-0.7345066070556641,
0.9958326816558838,
0.9233792424201965,
-0.7409736514091492,
0.10740576684474945,
0.27802953124046326,
-0.3214281499385834,
0.7699958682060242,
-1.148193359375,
-0.36839374899864197,
1.2151926755905151,
-0.24285857379436493,
-0.7293444871902466,
1.457881212234497,
0.808757483959198,
-1.059432029724121,
-0.15792283415794373,
-0.2915096580982208,
-0.7997901439666748,
0.03954780846834183,
-1.6674686670303345,
-0.15685904026031494,
0.34628745913505554,
-1.4328747987747192,
-0.5448656678199768,
-0.17182566225528717,
1.3820583820343018,
-0.09983623772859573,
1.2728294134140015,
-0.31307074427604675,
-0.26935437321662903,
-0.34570878744125366,
-0.42181196808815,
0.18217027187347412,
-0.2444530874490738,
-0.6178513765335083,
0.24274063110351562,
-0.7876993417739868,
0.31285616755485535,
1.4133965969085693,
0.22940564155578613,
0.1374572366476059,
0.584294855594635,
1.035928726196289,
0.3005088269710541,
-0.09314998984336853,
-0.9081478714942932,
-1.6194220781326294,
2.017024278640747,
-1.3963593244552612,
1.9995791912078857,
0.7420945167541504,
-0.12477908283472061,
-1.8275055885314941,
-2.034236192703247,
1.3639912605285645,
1.1565861701965332,
2.2913544178009033,
0.6750890612602234,
0.4020055830478668,
-0.8357159495353699,
-0.6728898286819458,
0.24973028898239136,
-1.060813069343567,
-0.7393428683280945,
0.18742215633392334,
2.3574435710906982,
1.7204035520553589,
-0.5029443502426147,
-0.20350320637226105,
-1.0857529640197754,
1.2912952899932861,
-0.10800781100988388,
0.20785373449325562,
2.051276445388794,
-0.2248116433620453,
-0.973179817199707,
1.1744604110717773,
-2.283323287963867,
0.2532374858856201,
2.0969645977020264,
0.20155037939548492,
0.2129727303981781,
-1.4569905996322632,
-0.7562727332115173,
-0.2754630148410797,
-0.3412517011165619,
-1.2796828746795654,
0.5838125348091125,
-0.29697781801223755,
-0.8036757111549377,
-1.4364895820617676,
0.16209056973457336,
-0.9881106019020081,
-1.6977983713150024,
0.32363757491111755,
1.9273393154144287,
2.007509469985962,
-0.8426598310470581,
1.526386022567749,
-0.24977223575115204,
0.13089805841445923,
1.3415534496307373,
1.1939817667007446,
3.0982577800750732,
1.9838675260543823,
-1.2705150842666626,
0.8271969556808472,
-0.01232821960002184,
-0.41732046008110046,
1.17049241065979,
-1.1001038551330566,
1.2336726188659668,
-0.3951287269592285,
-1.1468517780303955,
-1.3366247415542603,
0.903348445892334,
0.4647272527217865,
-0.02941441535949707,
-0.5070586204528809,
1.3251023292541504,
0.054360099136829376,
1.381617784500122,
0.5865456461906433,
-0.3318368196487427,
0.6911948919296265,
-0.3559340834617615,
-0.4035907983779907,
1.6022796630859375,
0.2996387183666229,
-1.4322142601013184,
-2.4014835357666016,
-0.2375929057598114,
-0.8713157176971436,
-0.09331198036670685,
-0.5633339285850525,
-1.001953363418579,
1.6207796335220337,
0.49086499214172363,
-1.190529704093933,
-0.276326984167099,
-0.3363403379917145,
-0.5826454162597656,
2.804439067840576,
-1.4317373037338257,
-0.22388970851898193,
-1.0572704076766968,
-0.5110563039779663,
1.6500928401947021,
-1.1969698667526245,
-0.22634872794151306,
-1.117922067642212,
-0.5525331497192383,
-1.272019863128662,
-0.5426743030548096,
0.0434812530875206,
-0.8752899169921875,
0.8242558836936951,
0.18475593626499176,
-1.1927233934402466,
-0.3348003327846527,
-0.9037702083587646,
0.9308102130889893,
-0.11018907278776169,
0.2858363389968872,
1.9668934345245361,
0.4108617305755615,
-0.3554641008377075,
0.7226460576057434,
1.1185064315795898,
0.5618659853935242,
-0.6984096765518188,
0.23314730823040009,
-0.6028317809104919,
0.20377713441848755,
-1.3715465068817139,
0.18095733225345612,
-2.9874095916748047,
0.6368863582611084,
-0.11602381616830826,
-0.07541638612747192,
-0.011226087808609009,
-1.369024395942688,
1.1090130805969238,
2.5942718982696533,
-1.235426425933838,
0.48610541224479675,
0.266147643327713,
1.127556324005127,
-1.5901778936386108,
0.23895928263664246,
-0.3568354845046997,
2.1423721313476562,
0.12565092742443085,
1.262138843536377,
-0.42970529198646545,
-2.1640799045562744,
0.748069167137146,
-1.2013356685638428,
-1.15567147731781,
0.8267549276351929,
-0.8476438522338867,
0.10514581203460693,
-1.3786015510559082,
-0.13328874111175537,
-0.7906534671783447,
-1.3268159627914429,
0.738897979259491,
0.14250928163528442,
0.49355608224868774,
-0.5679555535316467,
0.3244606852531433,
-2.1326193809509277,
-1.375447154045105,
-0.14456959068775177,
-1.0272018909454346,
0.325309157371521,
-0.3399324417114258,
0.6942786574363708,
-0.19151273369789124,
0.09041143208742142,
0.3102886974811554,
1.4261231422424316,
3.4252240657806396,
0.15923753380775452,
0.2992464601993561,
-0.1813136786222458,
-0.9467635750770569,
1.40264093875885,
0.9533913135528564,
-0.09185740351676941,
-0.5000313520431519,
-0.9188181161880493,
1.2144060134887695,
1.9610432386398315,
0.9817981719970703,
0.1290265917778015,
-0.8642112016677856,
-0.7383734583854675,
-0.06031249091029167,
0.17899049818515778,
0.6071765422821045,
0.8023938536643982,
0.03732893988490105,
-0.006080504972487688,
1.4092228412628174,
1.1036138534545898,
-0.47268247604370117,
0.4801318645477295,
-0.9341587424278259,
-0.42964762449264526,
0.5162392854690552,
0.37155669927597046,
0.04047450050711632,
0.2697553336620331,
-1.0442746877670288,
-0.21689771115779877,
-0.2673751413822174,
-0.860213041305542,
-0.7467172741889954,
-0.4558621048927307,
-0.320115327835083,
1.6163852214813232,
0.046725787222385406,
-0.4912679195404053,
-0.11177071928977966,
-0.6681435108184814,
-0.05038992315530777,
-1.0094335079193115,
0.18537326157093048,
-0.16381175816059113,
-0.020304633304476738,
-0.08700764179229736,
1.7380558252334595,
-1.073196291923523,
-2.163285970687866,
0.3244975507259369,
0.3240967094898224,
-0.40165308117866516,
0.17658664286136627,
1.6673496961593628,
0.5949497818946838,
1.3792202472686768,
1.3650429248809814,
1.0533589124679565,
-0.7097773551940918,
-1.311633586883545,
0.5854917168617249,
0.9758812785148621,
-1.3853963613510132,
0.7141757011413574,
-0.06572277843952179,
-0.438040167093277,
0.6415528655052185,
1.3379594087600708,
0.554323673248291,
-1.9098176956176758,
0.778255820274353,
-0.8583194613456726,
0.7889554500579834,
0.826764702796936,
0.8187569975852966,
0.22564521431922913,
0.7940476536750793,
-1.17155921459198,
-1.14678156375885,
-0.7522032260894775,
-0.6710782051086426,
1.9086862802505493,
-0.26023778319358826,
0.43614625930786133,
-0.09724924713373184,
-1.28825843334198,
-0.0667228177189827,
0.6781151294708252,
0.3716249167919159,
-0.3528153598308563,
0.8447772860527039,
-0.5840541124343872,
-1.0165040493011475,
-1.2914830446243286,
-0.4849465787410736,
-0.9213995933532715,
-1.0277738571166992,
0.9796581268310547,
0.8090106844902039,
0.4379425048828125,
1.861770510673523,
0.5987829566001892,
0.2537934482097626,
-2.6047115325927734,
0.9908530712127686,
0.2605811357498169,
0.05072122439742088,
0.8056882619857788,
0.3303101062774658,
1.0790132284164429,
-0.06390050053596497,
0.50424724817276,
-2.295518159866333,
2.3160617351531982,
-0.2536681890487671,
0.538785457611084,
-0.00939080212265253,
-0.152211531996727,
1.0462857484817505,
0.45623528957366943,
0.5673067569732666,
-1.1083927154541016,
0.7302567362785339,
-0.6225029826164246,
1.231421709060669,
0.9058324694633484,
-0.9047597646713257,
-0.01789027638733387,
1.323024034500122,
0.5202000737190247,
-0.4985169768333435,
-0.9290487766265869,
-0.8905219435691833,
0.9400389790534973,
1.669130563735962,
-0.0031622513197362423,
-0.036881618201732635,
0.8965299129486084,
0.5958817601203918,
-1.359101414680481,
0.01909327693283558,
-0.7523531317710876,
-0.6696028709411621,
1.7479914426803589,
1.9873162508010864,
-0.11212939769029617,
-0.1606159657239914,
-0.8237919211387634,
-1.203269600868225,
0.8027106523513794,
-0.02143559604883194,
-0.03201906010508537,
0.6850815415382385,
-0.6185513734817505,
1.065138816833496,
0.7568541169166565,
0.9071289896965027,
0.09983780235052109,
0.38542136549949646,
0.3202575743198395,
-0.31837770342826843,
-1.221983790397644,
-0.3427334427833557,
-1.1641364097595215,
-2.453690528869629,
0.5223392248153687,
-0.2518199682235718,
-1.3452517986297607,
-0.010974577628076077,
-1.1622151136398315,
0.9013410210609436,
-0.5511214137077332,
-0.9883489012718201,
-1.4903684854507446,
0.21492652595043182,
-0.2036873996257782,
0.884002685546875,
-1.5734013319015503,
-0.037239305675029755,
1.304177165031433,
0.9056611657142639,
-0.7695222496986389,
0.9904513359069824,
0.22802431881427765,
1.1258118152618408,
0.797736644744873,
-0.3294214904308319,
0.5028586983680725,
-0.014183052815496922,
-1.3188103437423706,
0.5082193613052368,
1.2111597061157227,
0.18271727859973907,
1.568049430847168,
-0.5803460478782654,
-0.018258962780237198,
0.4198496639728546,
-0.5627320408821106,
-0.5235511660575867,
-0.5836062431335449,
0.7280966639518738,
0.20566613972187042,
-0.9456430673599243,
0.01376718282699585,
-0.10462494194507599,
-0.1464938223361969,
0.24278995394706726,
-1.5865983963012695,
-0.1108955666422844,
-0.2647385001182556,
-0.5975145101547241,
-1.2323112487792969,
-0.020596569404006004,
1.3540167808532715,
-0.7232668995857239,
-0.22230164706707,
0.5071515440940857,
0.302433043718338,
0.5218135118484497,
0.6106312870979309,
-0.7514829039573669,
-0.3142857551574707,
-0.3604281544685364,
-0.30060747265815735,
0.38124966621398926,
1.2791885137557983,
-0.09859240055084229,
-1.074615716934204,
0.7095768451690674,
-0.4247910976409912,
0.12871620059013367,
1.9950387477874756,
0.07243068516254425,
-0.9117221236228943,
0.2106148898601532,
-0.7909191250801086,
1.971638560295105,
1.6024268865585327,
1.259302020072937,
-0.03485025838017464,
-0.9649693369865417,
0.665604293346405,
-0.25076982378959656,
-0.35118284821510315,
0.8460541367530823,
0.48350489139556885,
-0.28982070088386536,
-1.31942617893219,
0.6174556612968445,
1.315453052520752,
-0.8808872103691101,
-0.8919256925582886,
0.10556340962648392,
-0.7813675999641418,
1.0970402956008911,
0.7703631520271301,
0.4576341211795807,
0.3545982539653778,
1.5840190649032593,
0.805629312992096,
-0.4511621296405792,
0.5107550621032715,
0.3712258040904999,
-0.10408201068639755,
-1.9499741792678833,
-1.0850225687026978,
0.47709283232688904,
-0.43986162543296814,
-1.6621686220169067,
1.4303022623062134,
-1.2269318103790283,
-0.8530668616294861,
0.5160146951675415,
0.1584034115076065,
1.4387372732162476,
0.32380157709121704,
1.565919280052185,
1.9240851402282715,
0.9486564993858337,
0.3572006821632385,
1.3694697618484497,
-0.1567929983139038,
-0.5654640197753906,
1.7841713428497314,
-0.4882846474647522,
0.49512970447540283,
1.118849277496338,
-0.3868474066257477,
-1.146093726158142,
-0.8434955477714539,
-1.173797369003296,
-0.6484660506248474,
1.1437469720840454,
0.15008360147476196,
-1.246739149093628,
0.2194296270608902,
1.624858021736145,
0.06866038590669632,
-0.2807701528072357,
0.6934400796890259,
0.303670197725296,
-0.8600376844406128,
-0.0028259861283004284,
-0.9013144969940186,
0.5491229891777039,
-0.20390893518924713,
-0.36309829354286194,
0.37888213992118835,
0.43332916498184204,
1.303181767463684,
-0.039482712745666504,
0.11915354430675507,
1.1787109375,
-1.352624773979187,
1.4635791778564453,
-0.5925229787826538,
0.28727757930755615,
-2.3603291511535645,
1.408120036125183,
-0.7393761277198792,
1.8303197622299194,
-2.657931327819824,
0.37269484996795654,
-0.547632098197937,
-0.45565110445022583,
0.244207501411438,
-0.3784955143928528,
0.11123841255903244,
-0.1646909862756729,
-1.192541241645813,
-0.04290713369846344,
-0.9232233166694641,
0.5659905672073364,
1.2014446258544922,
1.3410323858261108,
-1.0538791418075562,
-0.15979160368442535,
-1.741876244544983,
-0.16406892240047455,
-0.7154043316841125,
0.449947327375412,
-1.9912856817245483,
-0.18345612287521362,
-1.902331829071045,
-2.3913352489471436,
-1.217650294303894,
-0.7062399387359619,
1.0062143802642822,
0.12749511003494263,
-0.9009984731674194,
1.1167421340942383,
-0.32413607835769653,
-1.765507698059082,
1.0605474710464478,
-2.1743674278259277
] |
https://github.com/huggingface/datasets/issues/4840 | Dataset Viewer issue for darragh/demo_data_raw3 | Apparently, there is something weird with that Parquet file: its schema is:
```
images: extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>>
```
I have forced a right schema:
```python
from datasets import Features, Image, load_dataset
features = Features({"images": Image()})
ds = datasets.load_dataset("parquet", split="train", data_files="train-00000-of-00001.parquet", features=features)
```
and then recreated a new Parquet file:
```python
ds.to_parquet("train.parquet")
```
Now this Parquet file has the right schema:
```
images: struct<bytes: binary, path: string>
child 0, bytes: binary
child 1, path: string
```
and can be loaded normally:
```python
In [26]: ds = load_dataset("parquet", split="train", data_files="dataset.parquet")
n [27]: ds
Out[27]:
Dataset({
features: ['images'],
num_rows: 20
})
``` | ### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No | 578 | 97 | Dataset Viewer issue for darragh/demo_data_raw3
### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No
Apparently, there is something weird with that Parquet file: its schema is:
```
images: extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>>
```
I have forced a right schema:
```python
from datasets import Features, Image, load_dataset
features = Features({"images": Image()})
ds = datasets.load_dataset("parquet", split="train", data_files="train-00000-of-00001.parquet", features=features)
```
and then recreated a new Parquet file:
```python
ds.to_parquet("train.parquet")
```
Now this Parquet file has the right schema:
```
images: struct<bytes: binary, path: string>
child 0, bytes: binary
child 1, path: string
```
and can be loaded normally:
```python
In [26]: ds = load_dataset("parquet", split="train", data_files="dataset.parquet")
n [27]: ds
Out[27]:
Dataset({
features: ['images'],
num_rows: 20
})
``` | [
-1.0653433799743652,
-0.8025107383728027,
-0.7394419312477112,
1.6178643703460693,
-0.16057568788528442,
-1.2741118669509888,
0.2080221176147461,
-1.069470763206482,
1.7025748491287231,
-0.7519828081130981,
0.4422124922275543,
-1.6906802654266357,
0.055490635335445404,
-0.6219510436058044,
-0.7814645171165466,
-0.9479626417160034,
-0.397541344165802,
-0.7022649645805359,
1.0212078094482422,
2.4193642139434814,
1.322618842124939,
-1.438354730606079,
2.5337274074554443,
0.6945160031318665,
-0.22262533009052277,
-0.9309723377227783,
0.5694054961204529,
0.027696620672941208,
-1.2310118675231934,
-0.31989380717277527,
-0.980480968952179,
-0.24124275147914886,
-0.56458580493927,
-0.6335771679878235,
-0.04159203916788101,
0.5465711951255798,
-0.4041982889175415,
-0.5428794026374817,
-0.5187868475914001,
-0.8745312690734863,
0.45427337288856506,
-0.29142552614212036,
0.9366475939750671,
-0.37209442257881165,
1.7823867797851562,
-0.6133018732070923,
0.40642794966697693,
0.681812584400177,
1.2638474702835083,
0.16437095403671265,
-0.08774519711732864,
0.2950557470321655,
0.35991719365119934,
-0.04058593511581421,
0.5225815176963806,
1.1699801683425903,
0.5987628698348999,
0.5633304715156555,
0.8250907063484192,
-2.207280397415161,
1.2535033226013184,
-1.107344627380371,
0.30384811758995056,
1.3259884119033813,
-0.9061855673789978,
0.246103435754776,
-1.6997424364089966,
0.0061966413632035255,
0.6263009905815125,
-2.1617186069488525,
0.3970862627029419,
-1.4092520475387573,
-0.5292767882347107,
1.04575514793396,
0.4268570840358734,
-1.1642714738845825,
0.06664193421602249,
-0.32098710536956787,
1.0271905660629272,
0.44238990545272827,
1.1326435804367065,
-1.7945952415466309,
0.02283930405974388,
-0.371141642332077,
0.14625760912895203,
-1.2346253395080566,
-1.477502465248108,
0.5370311141014099,
0.682045578956604,
0.5912408232688904,
-0.13085190951824188,
1.0862222909927368,
-0.9927061200141907,
0.6556835174560547,
-1.1260919570922852,
-1.6809229850769043,
-1.4022732973098755,
-2.1355092525482178,
-2.313302516937256,
0.6536484360694885,
-0.5633803009986877,
-0.4116913974285126,
2.013186454772949,
-0.8887994885444641,
-1.7099778652191162,
1.061382532119751,
0.33703315258026123,
-0.09023156762123108,
2.2763071060180664,
0.3183969259262085,
-0.7114521861076355,
0.41125908493995667,
-0.8048105835914612,
0.7069010138511658,
-0.3125745356082916,
1.3119361400604248,
0.477497935295105,
-1.0774937868118286,
1.611246109008789,
-0.41389012336730957,
0.6465724110603333,
-0.6976812481880188,
-0.43662288784980774,
-0.6283964514732361,
0.30647706985473633,
1.9009438753128052,
-0.36716964840888977,
1.467041015625,
-0.2640695571899414,
-1.5783785581588745,
-1.5384979248046875,
0.9275972843170166,
0.4529244601726532,
-0.7348423004150391,
0.17375940084457397,
-0.3356834053993225,
0.15208402276039124,
-0.1378328949213028,
1.2257426977157593,
1.1812608242034912,
0.822726845741272,
-0.4387262463569641,
-0.8651629686355591,
0.21273326873779297,
0.07401857525110245,
-0.8003686666488647,
-1.7861343622207642,
-0.36841171979904175,
0.10731921344995499,
0.5800173878669739,
-1.128196358680725,
1.772694706916809,
0.83431077003479,
1.933717966079712,
0.8717052936553955,
-0.40358003973960876,
1.4988744258880615,
0.08725690096616745,
1.886584997177124,
-0.464277982711792,
0.6473047137260437,
-0.4109610915184021,
-1.2175525426864624,
0.9689262509346008,
-0.2651972472667694,
-1.9938485622406006,
-0.7610264420509338,
-0.7872225642204285,
-0.11118827760219574,
-0.8161992430686951,
0.9441012740135193,
-0.2859223186969757,
-1.5058810710906982,
0.2750714123249054,
-0.7616256475448608,
0.03579409047961235,
-1.2638483047485352,
0.27719056606292725,
0.6699174046516418,
-0.5995066165924072,
0.09595277160406113,
-0.27827906608581543,
-1.1740585565567017,
-0.4626008868217468,
0.2456715703010559,
1.9188050031661987,
-0.7045395970344543,
0.9410572648048401,
1.0982186794281006,
-0.688693642616272,
0.007169368676841259,
0.18357481062412262,
-0.24939177930355072,
0.8280192613601685,
-1.149039387702942,
-0.47995537519454956,
1.187498688697815,
-0.06641276180744171,
-0.7268842458724976,
1.4957494735717773,
0.7158983945846558,
-1.016517162322998,
-0.11385735124349594,
-0.2768235504627228,
-0.768754780292511,
0.08103351294994354,
-1.5860682725906372,
0.012319029308855534,
0.45014339685440063,
-1.5327130556106567,
-0.4802182614803314,
-0.16060811281204224,
1.3135461807250977,
-0.26701244711875916,
1.3436779975891113,
-0.42887935042381287,
-0.26496079564094543,
-0.3599196672439575,
-0.3415719270706177,
0.10074539482593536,
-0.1848619133234024,
-0.6387193202972412,
0.14498654007911682,
-0.7711235880851746,
0.2534917891025543,
1.3918249607086182,
0.23577137291431427,
0.03563903272151947,
0.4733385443687439,
1.1235822439193726,
0.3814586400985718,
0.07945487648248672,
-0.9741330146789551,
-1.4521448612213135,
1.99153733253479,
-1.4846292734146118,
2.034494638442993,
0.6805655360221863,
0.0641675665974617,
-1.8162312507629395,
-1.9296836853027344,
1.3728502988815308,
1.1972488164901733,
2.3254635334014893,
0.5753244161605835,
0.4074311852455139,
-0.8272297382354736,
-0.5845152139663696,
0.38388338685035706,
-1.0475975275039673,
-0.6302168965339661,
0.30593961477279663,
2.38326096534729,
1.7511016130447388,
-0.48441776633262634,
-0.22672240436077118,
-0.9587830901145935,
1.4499971866607666,
-0.13482484221458435,
0.16627120971679688,
2.036158800125122,
-0.25567033886909485,
-1.0357675552368164,
1.3022733926773071,
-2.335787057876587,
0.09324365109205246,
2.060985565185547,
0.20116019248962402,
0.17471350729465485,
-1.3438403606414795,
-0.678484320640564,
-0.22387652099132538,
-0.5038360357284546,
-1.2665120363235474,
0.4668460488319397,
-0.23246562480926514,
-0.6805934906005859,
-1.4172284603118896,
0.3077043890953064,
-1.0403945446014404,
-1.7376989126205444,
0.214736670255661,
1.890647292137146,
1.9551600217819214,
-0.8555012941360474,
1.6447052955627441,
-0.43689894676208496,
0.13769827783107758,
1.2943837642669678,
1.206091284751892,
3.0907504558563232,
1.8758403062820435,
-1.285634160041809,
0.6950924396514893,
-0.08608147501945496,
-0.48000508546829224,
1.2424862384796143,
-1.2676618099212646,
1.1776292324066162,
-0.23396417498588562,
-1.1270935535430908,
-1.2293115854263306,
0.8781045079231262,
0.46629124879837036,
0.10603824257850647,
-0.5851373672485352,
1.178619623184204,
0.0923861414194107,
1.330634593963623,
0.6154984831809998,
-0.38244226574897766,
0.7008382081985474,
-0.35944533348083496,
-0.4008571207523346,
1.5449250936508179,
0.23800800740718842,
-1.270561933517456,
-2.2968637943267822,
-0.22233907878398895,
-0.8767791390419006,
0.05980292707681656,
-0.5470108985900879,
-1.0109995603561401,
1.7574259042739868,
0.3625238835811615,
-1.3211934566497803,
-0.23443971574306488,
-0.33598703145980835,
-0.4754224717617035,
2.7936270236968994,
-1.3852280378341675,
-0.23503465950489044,
-1.0551749467849731,
-0.6870660781860352,
1.719653606414795,
-1.1154855489730835,
-0.24086831510066986,
-1.0744210481643677,
-0.44948557019233704,
-1.356693148612976,
-0.5833541750907898,
0.04389643669128418,
-0.8587413430213928,
0.902838945388794,
0.10104507952928543,
-1.2945315837860107,
-0.39124226570129395,
-0.8644909858703613,
0.8767325282096863,
-0.17528097331523895,
0.24549192190170288,
2.0291762351989746,
0.4190148115158081,
-0.35094746947288513,
0.6645225882530212,
1.1000316143035889,
0.6334879994392395,
-0.617590069770813,
0.30841636657714844,
-0.6323496699333191,
0.21178284287452698,
-1.358201503753662,
0.20919816195964813,
-2.836948871612549,
0.6658673882484436,
-0.054338715970516205,
0.00029620900750160217,
-0.07811116427183151,
-1.3013290166854858,
1.0769597291946411,
2.6422901153564453,
-1.2279428243637085,
0.41515281796455383,
0.3086363971233368,
1.1519756317138672,
-1.646263599395752,
0.26904091238975525,
-0.33001306653022766,
2.12516450881958,
0.13650405406951904,
1.2447214126586914,
-0.34772440791130066,
-2.2946736812591553,
0.5489099621772766,
-1.3159338235855103,
-1.2475558519363403,
0.9000756740570068,
-0.7830725312232971,
0.10509386658668518,
-1.4530954360961914,
-0.189374640583992,
-0.8578424453735352,
-1.2420538663864136,
0.737476110458374,
0.12481989711523056,
0.39435917139053345,
-0.6088337302207947,
0.3815552592277527,
-2.1281330585479736,
-1.415266513824463,
-0.2351554036140442,
-0.9130446910858154,
0.42719176411628723,
-0.29700690507888794,
0.7558609843254089,
-0.20736819505691528,
0.05274130403995514,
0.42383652925491333,
1.4168143272399902,
3.484722137451172,
0.25354233384132385,
0.28029972314834595,
-0.19679780304431915,
-0.9520133137702942,
1.4404767751693726,
0.9049334526062012,
-0.07864552736282349,
-0.47787347435951233,
-1.0295523405075073,
1.1561346054077148,
2.042178153991699,
1.0667262077331543,
-0.0543932281434536,
-0.8106198906898499,
-0.7564237117767334,
-0.09884107857942581,
0.1488255113363266,
0.5139826536178589,
0.7828076481819153,
0.13556483387947083,
0.05339214205741882,
1.365135908126831,
1.0270838737487793,
-0.3781263828277588,
0.3796630799770355,
-0.8862159848213196,
-0.46820908784866333,
0.5383667945861816,
0.3416987955570221,
0.032005585730075836,
0.3275398015975952,
-0.9997397065162659,
-0.32851651310920715,
-0.4315164387226105,
-0.8890466690063477,
-0.65810626745224,
-0.5033476948738098,
-0.305941104888916,
1.5872679948806763,
0.015069578774273396,
-0.519595205783844,
-0.06088615953922272,
-0.7577190399169922,
-0.07229259610176086,
-1.161566138267517,
0.2734470069408417,
-0.18871094286441803,
-0.09337596595287323,
-0.08460544794797897,
1.7181730270385742,
-0.9498952627182007,
-1.9641491174697876,
0.2204207181930542,
0.34198588132858276,
-0.339314728975296,
0.2796732783317566,
1.7106724977493286,
0.5900351405143738,
1.3251264095306396,
1.2795958518981934,
1.0189859867095947,
-0.7315552234649658,
-1.2943702936172485,
0.5879001617431641,
1.0569937229156494,
-1.4533812999725342,
0.8006716966629028,
0.011045207269489765,
-0.37636569142341614,
0.5642799735069275,
1.2695531845092773,
0.5893223285675049,
-2.0173120498657227,
0.6615844368934631,
-0.8688725233078003,
0.7234856486320496,
0.7593561410903931,
0.6519482731819153,
0.1652769148349762,
0.7480023503303528,
-1.164979338645935,
-1.0776511430740356,
-0.7011773586273193,
-0.6893143057823181,
1.8198450803756714,
-0.2649611532688141,
0.5985578894615173,
-0.23955072462558746,
-1.3374336957931519,
-0.015972092747688293,
0.7969986796379089,
0.39127078652381897,
-0.5767991542816162,
0.7693913578987122,
-0.5129856467247009,
-0.9752625226974487,
-1.3219704627990723,
-0.4756945073604584,
-1.0333764553070068,
-1.0172550678253174,
0.9788237810134888,
0.8149306178092957,
0.3205074667930603,
1.8327934741973877,
0.7533674240112305,
0.1786857545375824,
-2.528602361679077,
0.9088795185089111,
0.3211236298084259,
-0.03762980177998543,
0.8568697571754456,
0.39964789152145386,
0.9582279920578003,
-0.06551340222358704,
0.6186522245407104,
-2.4070136547088623,
2.3566181659698486,
-0.20261141657829285,
0.5974242687225342,
0.02012278139591217,
-0.32865333557128906,
1.0318310260772705,
0.5147292613983154,
0.438702255487442,
-1.0817902088165283,
0.5216673612594604,
-0.6211668252944946,
1.195891261100769,
0.8584427237510681,
-0.826056957244873,
-0.08882773667573929,
1.372193694114685,
0.4958955645561218,
-0.5601973533630371,
-0.9638634920120239,
-0.9926441311836243,
1.0043989419937134,
1.620219349861145,
-0.05828630551695824,
-0.0669376403093338,
0.9500930905342102,
0.6295663714408875,
-1.2804617881774902,
0.07540500909090042,
-0.7641128897666931,
-0.7634963393211365,
1.7162622213363647,
1.983336091041565,
-0.2124839425086975,
-0.18038007616996765,
-0.8597980737686157,
-1.2187718152999878,
0.9206029772758484,
-0.03979962691664696,
0.03677808865904808,
0.619170069694519,
-0.6415709853172302,
1.077222466468811,
0.7944984436035156,
0.8811702132225037,
0.23512737452983856,
0.3602333068847656,
0.39580434560775757,
-0.3915357291698456,
-1.1820679903030396,
-0.23242110013961792,
-1.1142796277999878,
-2.5087196826934814,
0.5378828048706055,
-0.20051594078540802,
-1.2930721044540405,
-0.09065412729978561,
-1.1215862035751343,
0.9693387746810913,
-0.5783007144927979,
-0.9074235558509827,
-1.4284611940383911,
0.23260512948036194,
-0.04666062071919441,
0.9933225512504578,
-1.5464328527450562,
-0.07686667889356613,
1.2622039318084717,
0.9029043316841125,
-0.78983074426651,
0.9424112439155579,
0.08269771188497543,
1.1049143075942993,
0.9466060400009155,
-0.3319944143295288,
0.6140552163124084,
-0.008509098552167416,
-1.3673704862594604,
0.46885982155799866,
1.1910885572433472,
0.17560160160064697,
1.5480196475982666,
-0.47706910967826843,
0.02765120565891266,
0.30776476860046387,
-0.5878055095672607,
-0.5129649639129639,
-0.6301787495613098,
0.6082388162612915,
0.08812214434146881,
-0.948807418346405,
0.14076358079910278,
0.07207303494215012,
-0.16576406359672546,
0.20658747851848602,
-1.5058915615081787,
-0.12109030038118362,
-0.24146988987922668,
-0.601779043674469,
-1.2126376628875732,
-0.16403725743293762,
1.392372488975525,
-0.6573389768600464,
-0.1891183704137802,
0.45459896326065063,
0.3166930079460144,
0.4716642200946808,
0.5389978289604187,
-0.707334578037262,
-0.37258437275886536,
-0.2623569369316101,
-0.3583621084690094,
0.412201851606369,
1.3803807497024536,
-0.09143418818712234,
-0.943408191204071,
0.7259035706520081,
-0.33415117859840393,
0.034508414566516876,
2.0086007118225098,
0.16782334446907043,
-0.7796118259429932,
0.2285601943731308,
-0.6888667941093445,
1.8625328540802002,
1.803386926651001,
1.3039188385009766,
-0.17005601525306702,
-0.9386174082756042,
0.7137017846107483,
-0.4568541646003723,
-0.4506920576095581,
0.8882112503051758,
0.24868980050086975,
-0.21534381806850433,
-1.4412248134613037,
0.7164456844329834,
1.3461987972259521,
-0.8343532681465149,
-0.9505628347396851,
0.144215390086174,
-0.7711375951766968,
0.9852368235588074,
0.6308494210243225,
0.42666229605674744,
0.41378670930862427,
1.5802136659622192,
0.7941534519195557,
-0.3754981756210327,
0.518744170665741,
0.44845056533813477,
-0.08948707580566406,
-2.0667901039123535,
-1.2533981800079346,
0.39331844449043274,
-0.6183596253395081,
-1.6993387937545776,
1.4602992534637451,
-1.2370717525482178,
-1.050833821296692,
0.5855919718742371,
0.01012593787163496,
1.453059434890747,
0.3502744734287262,
1.6039975881576538,
2.007066011428833,
0.8704259395599365,
0.3607470393180847,
1.2424652576446533,
-0.14043018221855164,
-0.5607229471206665,
1.7755132913589478,
-0.541145920753479,
0.4835760295391083,
1.1371976137161255,
-0.2979181706905365,
-1.1127809286117554,
-0.8288295269012451,
-1.310616374015808,
-0.7763956785202026,
1.2372103929519653,
0.08474750816822052,
-1.2007049322128296,
0.3023795187473297,
1.66106116771698,
0.05197153612971306,
-0.40371349453926086,
0.7953445315361023,
0.25957563519477844,
-0.9524075984954834,
0.007729760371148586,
-0.8641428351402283,
0.5296388268470764,
-0.16391481459140778,
-0.30392512679100037,
0.38759684562683105,
0.4534808099269867,
1.4455575942993164,
0.007915426976978779,
0.15573585033416748,
1.0599024295806885,
-1.4150787591934204,
1.552899718284607,
-0.682589054107666,
0.2965698540210724,
-2.382308006286621,
1.3720602989196777,
-0.7339694499969482,
1.9062042236328125,
-2.6714961528778076,
0.47357866168022156,
-0.4304690957069397,
-0.47964760661125183,
0.2765827178955078,
-0.438877135515213,
0.1325749307870865,
-0.12011851370334625,
-1.1842882633209229,
-0.06809207797050476,
-0.7320317029953003,
0.6264093518257141,
1.0950675010681152,
1.5055606365203857,
-1.1735280752182007,
-0.33839479088783264,
-1.7887340784072876,
-0.11336200684309006,
-0.6380192041397095,
0.2911972999572754,
-1.9642361402511597,
-0.13322991132736206,
-1.911887764930725,
-2.386200189590454,
-1.2720799446105957,
-0.7900052666664124,
1.0191261768341064,
0.13493357598781586,
-0.8653385043144226,
1.061050295829773,
-0.38262584805488586,
-1.8839513063430786,
1.0945727825164795,
-2.0978310108184814
] |
https://github.com/huggingface/datasets/issues/4829 | Misalignment between card tag validation and docs | (Note that the doc is aligned with the hub validation rules, and the "ground truth" is the hub validation rules given that they apply to all datasets, not just the canonical ones) | ## Describe the bug
As pointed out in other issue: https://github.com/huggingface/datasets/pull/4827#discussion_r943536284
the validation of the dataset card tags is not aligned with its documentation: e.g.
- implementation: `license: List[str]`
- docs: `license: Union[str, List[str]]`
They should be aligned.
CC: @julien-c
| 580 | 32 | Misalignment between card tag validation and docs
## Describe the bug
As pointed out in other issue: https://github.com/huggingface/datasets/pull/4827#discussion_r943536284
the validation of the dataset card tags is not aligned with its documentation: e.g.
- implementation: `license: List[str]`
- docs: `license: Union[str, List[str]]`
They should be aligned.
CC: @julien-c
(Note that the doc is aligned with the hub validation rules, and the "ground truth" is the hub validation rules given that they apply to all datasets, not just the canonical ones) | [
-1.0910919904708862,
-0.8065130710601807,
-0.954688549041748,
1.4685487747192383,
-0.056704264134168625,
-1.3418633937835693,
0.06423035264015198,
-1.0867432355880737,
1.6236382722854614,
-0.77431321144104,
0.24284638464450836,
-1.685007929801941,
-0.10340805351734161,
-0.5786259770393372,
-0.8239737749099731,
-0.9659591913223267,
-0.3896838128566742,
-0.8405547142028809,
1.0399994850158691,
2.4805748462677,
1.2269866466522217,
-1.3286980390548706,
2.7112770080566406,
0.7106710076332092,
-0.10675407946109772,
-1.0049934387207031,
0.6171606183052063,
-0.07670977711677551,
-1.2694766521453857,
-0.4757308065891266,
-0.9890449643135071,
-0.09615562856197357,
-0.3833428621292114,
-0.5186571478843689,
0.03916134312748909,
0.45341387391090393,
-0.27719417214393616,
-0.3437333405017853,
-0.5297231674194336,
-0.8503039479255676,
0.38732388615608215,
-0.2798479497432709,
0.8698605895042419,
-0.3900499641895294,
1.877915859222412,
-0.5572497248649597,
0.2742304801940918,
0.7354936003684998,
1.445175290107727,
0.13915768265724182,
-0.0990113765001297,
0.22803625464439392,
0.3348122239112854,
-0.004118204116821289,
0.398104190826416,
1.1493366956710815,
0.6712942123413086,
0.6390283703804016,
0.7590117454528809,
-2.125610828399658,
1.2628052234649658,
-1.0673747062683105,
0.23278577625751495,
1.5698511600494385,
-1.1208754777908325,
0.3573996126651764,
-1.8679890632629395,
-0.05299002304673195,
0.51295405626297,
-2.317077398300171,
0.27739474177360535,
-1.2109135389328003,
-0.5021023750305176,
1.0339337587356567,
0.2877820134162903,
-1.2989768981933594,
0.08938586711883545,
-0.32075080275535583,
1.1061171293258667,
0.5401632785797119,
1.2498878240585327,
-1.6578322649002075,
0.054016079753637314,
-0.3042803704738617,
-0.09987249970436096,
-1.4878324270248413,
-1.4637483358383179,
0.5148817896842957,
0.551533579826355,
0.5964491963386536,
-0.033959101885557175,
0.9762599468231201,
-0.9504152536392212,
0.7604808807373047,
-0.8450131416320801,
-1.674792766571045,
-1.357149362564087,
-2.237666130065918,
-2.2186851501464844,
0.8530200123786926,
-0.5901488661766052,
-0.6296198964118958,
2.0748884677886963,
-0.9535204768180847,
-1.7995480298995972,
1.0931904315948486,
0.4271473288536072,
0.11955267190933228,
2.466892719268799,
0.34168022871017456,
-0.6548759341239929,
0.3632183372974396,
-0.7453917264938354,
0.8577330708503723,
-0.3708040118217468,
1.392242193222046,
0.5267491340637207,
-1.07545804977417,
1.7402875423431396,
-0.3835088014602661,
0.5987496376037598,
-0.7177503705024719,
-0.594650149345398,
-0.8311629891395569,
0.323303759098053,
1.9015650749206543,
-0.32197847962379456,
1.595457911491394,
-0.3535268008708954,
-1.598121166229248,
-1.613027811050415,
0.8722378015518188,
0.5306434035301208,
-0.8696737289428711,
0.0816492885351181,
-0.2950039505958557,
0.011382417753338814,
-0.056194327771663666,
1.1825698614120483,
1.289239764213562,
0.6383399367332458,
-0.3187929391860962,
-0.874739944934845,
0.16018567979335785,
0.08322341740131378,
-0.744025707244873,
-1.7122551202774048,
-0.2826813757419586,
0.14478890597820282,
0.628875195980072,
-1.1811443567276,
1.7944706678390503,
0.8519344329833984,
1.973717451095581,
0.9136396050453186,
-0.42461442947387695,
1.3546191453933716,
0.007130153477191925,
1.8443583250045776,
-0.5515354871749878,
0.6942881941795349,
-0.2474675476551056,
-1.1664191484451294,
0.973185658454895,
-0.3164949417114258,
-1.9931095838546753,
-0.6942406892776489,
-0.9530995488166809,
-0.1086360514163971,
-0.6038976907730103,
1.0796362161636353,
-0.24938170611858368,
-1.27675199508667,
0.22886499762535095,
-0.7139190435409546,
0.10564981400966644,
-1.2759798765182495,
0.2998736798763275,
0.8087787628173828,
-0.6464385986328125,
-0.018700167536735535,
-0.20525619387626648,
-1.272693157196045,
-0.543652355670929,
0.27891501784324646,
1.9553442001342773,
-0.7944353222846985,
0.8994461297988892,
0.9811108112335205,
-0.7020178437232971,
-0.11704444885253906,
0.3080012798309326,
-0.39379680156707764,
0.8665259480476379,
-1.0366321802139282,
-0.4462086260318756,
1.1789239645004272,
-0.058288365602493286,
-0.7079941034317017,
1.535037875175476,
0.8186594247817993,
-0.9343865513801575,
-0.193339541554451,
-0.24291615188121796,
-0.8299068808555603,
-0.03555577993392944,
-1.641640543937683,
-0.07345312833786011,
0.254311203956604,
-1.5018820762634277,
-0.5329816341400146,
-0.15466225147247314,
1.4097658395767212,
-0.20863664150238037,
1.3291220664978027,
-0.3244747221469879,
-0.26914602518081665,
-0.5178133845329285,
-0.45289456844329834,
0.13125799596309662,
-0.2599155008792877,
-0.6015191078186035,
0.364300012588501,
-0.7681017518043518,
0.3289321959018707,
1.3183892965316772,
0.4227367341518402,
0.13628162443637848,
0.6162663102149963,
1.1151628494262695,
0.3536420166492462,
-0.0718662291765213,
-1.0057177543640137,
-1.5155647993087769,
2.0380778312683105,
-1.4664949178695679,
1.9519085884094238,
0.690187394618988,
-0.03143235296010971,
-1.748403787612915,
-1.9015878438949585,
1.387795090675354,
1.224191427230835,
2.2023203372955322,
0.6898730993270874,
0.4297301471233368,
-0.8532130122184753,
-0.5999165177345276,
0.3400467038154602,
-1.025040864944458,
-0.7329472899436951,
0.08358855545520782,
2.341078519821167,
1.733378529548645,
-0.571490466594696,
-0.16284815967082977,
-0.9013751149177551,
1.1967157125473022,
-0.12345460057258606,
0.16579246520996094,
1.9344532489776611,
-0.20052507519721985,
-1.1295417547225952,
1.1953129768371582,
-2.372263193130493,
0.1474611461162567,
1.991475224494934,
0.34759756922721863,
0.10067740082740784,
-1.455458402633667,
-0.7277067303657532,
-0.15578798949718475,
-0.46909916400909424,
-1.1478841304779053,
0.6659324765205383,
-0.34515270590782166,
-0.8998430967330933,
-1.442445993423462,
0.14600884914398193,
-1.0889945030212402,
-1.7495931386947632,
0.4135522246360779,
1.8987070322036743,
2.038896322250366,
-0.7217999696731567,
1.576564073562622,
-0.25311484932899475,
0.125100776553154,
1.2312289476394653,
1.2935187816619873,
3.014251947402954,
1.8903876543045044,
-1.2431901693344116,
0.6871302127838135,
-0.07347586750984192,
-0.5356841087341309,
1.2087970972061157,
-1.0406036376953125,
1.2031170129776,
-0.20275987684726715,
-1.3120572566986084,
-1.3025113344192505,
0.8531748056411743,
0.35974371433258057,
0.16698284447193146,
-0.47599664330482483,
1.3158700466156006,
-0.020645547658205032,
1.3939642906188965,
0.6548123359680176,
-0.3532920181751251,
0.5357187986373901,
-0.34772899746894836,
-0.3754228949546814,
1.6518269777297974,
0.13324497640132904,
-1.4003788232803345,
-2.335922956466675,
-0.24626585841178894,
-0.7005215287208557,
0.04335673153400421,
-0.6352421641349792,
-0.9736664891242981,
1.768017292022705,
0.47850432991981506,
-1.3183810710906982,
-0.4107932150363922,
-0.42659685015678406,
-0.6491559743881226,
2.6597070693969727,
-1.576486349105835,
-0.2627970278263092,
-1.0534638166427612,
-0.42833009362220764,
1.66508150100708,
-1.278287410736084,
-0.13510914146900177,
-1.0139104127883911,
-0.6414458751678467,
-1.2945753335952759,
-0.59125816822052,
-0.07805341482162476,
-0.8634093999862671,
0.7694569230079651,
0.1036919355392456,
-1.1368663311004639,
-0.20743012428283691,
-0.8874951601028442,
0.737729549407959,
-0.24622651934623718,
0.2728155851364136,
1.9592293500900269,
0.5090336203575134,
-0.3641281723976135,
0.7895249128341675,
1.1647652387619019,
0.644588828086853,
-0.5756891965866089,
0.26734742522239685,
-0.577105700969696,
0.3886081278324127,
-1.3346779346466064,
0.2620287537574768,
-2.9473211765289307,
0.5810418128967285,
-0.008102859370410442,
0.006696202792227268,
-0.0025976458564400673,
-1.3077538013458252,
1.1931174993515015,
2.5912606716156006,
-1.2711442708969116,
0.3878118395805359,
0.3015739321708679,
1.2500035762786865,
-1.6457514762878418,
0.31393396854400635,
-0.4100385904312134,
2.1198019981384277,
0.0587821789085865,
1.162830114364624,
-0.4584850072860718,
-2.1509079933166504,
0.6295469403266907,
-1.2603232860565186,
-1.0617135763168335,
0.837153971195221,
-0.697372317314148,
0.1681896299123764,
-1.4031274318695068,
-0.15610505640506744,
-0.9169691801071167,
-1.296476125717163,
0.8422298431396484,
0.0699729174375534,
0.372539758682251,
-0.5695652365684509,
0.2999679744243622,
-2.158148765563965,
-1.3464395999908447,
-0.1226537674665451,
-0.9049683213233948,
0.4695567190647125,
-0.2825254797935486,
0.6722350716590881,
-0.1637648493051529,
-0.018807733431458473,
0.3293546736240387,
1.350928783416748,
3.418503999710083,
0.2795707583427429,
0.46509119868278503,
-0.22965289652347565,
-0.8636444211006165,
1.5856026411056519,
0.9634480476379395,
-0.10536667704582214,
-0.6060746312141418,
-0.8263688683509827,
1.2845035791397095,
1.9656742811203003,
1.0125257968902588,
0.00356496125459671,
-0.9128137826919556,
-0.67569899559021,
0.007237531244754791,
0.1585681140422821,
0.49435046315193176,
0.9735385775566101,
0.011902403086423874,
-0.0005285255610942841,
1.3436992168426514,
1.1718298196792603,
-0.4162937104701996,
0.4354426860809326,
-0.7797451019287109,
-0.4255695343017578,
0.48338019847869873,
0.3561252951622009,
-0.030197206884622574,
0.48117414116859436,
-0.9914430975914001,
-0.26898038387298584,
-0.21299630403518677,
-0.8619092702865601,
-0.7459003329277039,
-0.3126400113105774,
-0.4237591028213501,
1.6368705034255981,
0.05529961362481117,
-0.6043194532394409,
0.05047384276986122,
-0.8275435566902161,
-0.0869588702917099,
-1.1368473768234253,
0.2658947706222534,
-0.15581664443016052,
-0.02236461639404297,
-0.04399923235177994,
1.6332212686538696,
-1.0094759464263916,
-2.1018850803375244,
0.22642938792705536,
0.32722437381744385,
-0.4900699853897095,
0.19533862173557281,
1.6395329236984253,
0.4859063923358917,
1.3927624225616455,
1.390366554260254,
0.9216563105583191,
-0.8478835225105286,
-1.3241820335388184,
0.588824987411499,
0.9496558904647827,
-1.6374932527542114,
0.8320364356040955,
-0.06706500053405762,
-0.4968603551387787,
0.6355936527252197,
1.3711587190628052,
0.4487840235233307,
-1.9421366453170776,
0.8351484537124634,
-0.8277836441993713,
0.838720977306366,
0.635549008846283,
0.6683074235916138,
0.24545003473758698,
0.7898681163787842,
-1.2842376232147217,
-1.1450563669204712,
-0.7487574219703674,
-0.6528699994087219,
1.725886344909668,
-0.21493226289749146,
0.4978082478046417,
-0.0914304107427597,
-1.3148102760314941,
-0.16383105516433716,
0.5754795670509338,
0.2847512662410736,
-0.31709039211273193,
0.7699961066246033,
-0.6437221169471741,
-1.185463786125183,
-1.4216164350509644,
-0.49335819482803345,
-0.9190211892127991,
-0.8698580265045166,
1.099472999572754,
0.8199965357780457,
0.22791698575019836,
1.8871369361877441,
0.5614067316055298,
0.1575859785079956,
-2.646115303039551,
0.8709465861320496,
0.44458699226379395,
-0.03921213746070862,
0.9332767724990845,
0.4158381521701813,
1.0299413204193115,
-0.08500918745994568,
0.6157533526420593,
-2.363492727279663,
2.2936315536499023,
-0.3067660629749298,
0.5703446865081787,
0.10413308441638947,
-0.23461851477622986,
1.0737191438674927,
0.5605131983757019,
0.5924584865570068,
-1.170246958732605,
0.6833842992782593,
-0.6441939473152161,
1.1617766618728638,
0.9066657423973083,
-0.743619978427887,
0.05429805442690849,
1.3639421463012695,
0.564057469367981,
-0.5515474081039429,
-0.8969614505767822,
-0.826347291469574,
0.8732595443725586,
1.725298285484314,
-0.020711954683065414,
0.06264334917068481,
0.8216837048530579,
0.6412809491157532,
-1.4084535837173462,
0.006944627501070499,
-0.702139139175415,
-0.800279438495636,
1.6211252212524414,
1.9989863634109497,
-0.08751976490020752,
-0.14818942546844482,
-0.8308364748954773,
-1.2962061166763306,
0.8454427123069763,
-0.055741116404533386,
0.20424281060695648,
0.6655951142311096,
-0.6675274968147278,
1.1267445087432861,
0.7576890587806702,
0.854234516620636,
0.08415719866752625,
0.37971553206443787,
0.3325660228729248,
-0.22504593431949615,
-1.1004749536514282,
-0.12999598681926727,
-1.0890960693359375,
-2.4857778549194336,
0.4482859671115875,
-0.41731804609298706,
-1.32427179813385,
-0.06541173160076141,
-1.0453578233718872,
0.8249607086181641,
-0.6065923571586609,
-1.00226891040802,
-1.5239198207855225,
0.2627873122692108,
-0.040481049567461014,
0.830773651599884,
-1.5599660873413086,
-0.061719685792922974,
1.351815104484558,
0.8985223174095154,
-0.8529340624809265,
1.0618281364440918,
0.12947332859039307,
1.156211256980896,
0.7671682238578796,
-0.35060006380081177,
0.4643142521381378,
0.0692482441663742,
-1.4192081689834595,
0.5471221804618835,
1.1305482387542725,
0.06986889243125916,
1.5242152214050293,
-0.4448278248310089,
0.05765378102660179,
0.4913441836833954,
-0.4463956952095032,
-0.48982685804367065,
-0.5805854201316833,
0.7050656080245972,
0.10996174812316895,
-0.9025803804397583,
0.11544951796531677,
-0.21059750020503998,
-0.14263860881328583,
0.25264793634414673,
-1.5361906290054321,
-0.397630900144577,
-0.4109594523906708,
-0.5403620004653931,
-1.2536303997039795,
-0.04067223146557808,
1.3445899486541748,
-0.6127307415008545,
-0.17718493938446045,
0.4699372351169586,
0.38487911224365234,
0.414967805147171,
0.6963909864425659,
-0.6561005115509033,
-0.3431222438812256,
-0.34402206540107727,
-0.34008023142814636,
0.3782394826412201,
1.2870444059371948,
-0.22011315822601318,
-0.9177039265632629,
0.675899863243103,
-0.2770865857601166,
-0.05490456521511078,
2.039177894592285,
-0.006490244530141354,
-0.9225291013717651,
0.3505607545375824,
-0.6295173764228821,
1.923125982284546,
1.6692429780960083,
1.3881874084472656,
-0.19703418016433716,
-0.8702272772789001,
0.6325059533119202,
-0.21482257544994354,
-0.28571832180023193,
0.9263585209846497,
0.4333905875682831,
-0.25269728899002075,
-1.5318481922149658,
0.5023263692855835,
1.2397981882095337,
-0.8617333173751831,
-0.7773709297180176,
0.07195056974887848,
-0.8391789793968201,
0.9263775944709778,
0.7668763995170593,
0.4221374988555908,
0.3162650167942047,
1.5056976079940796,
0.6669446229934692,
-0.49982497096061707,
0.3576244115829468,
0.47190895676612854,
-0.10788042843341827,
-1.9369993209838867,
-1.0428645610809326,
0.305062472820282,
-0.3567112684249878,
-1.5610973834991455,
1.4275884628295898,
-1.2153602838516235,
-0.8233762979507446,
0.4756603240966797,
0.09748093783855438,
1.4138224124908447,
0.3174589276313782,
1.7025824785232544,
1.9809081554412842,
0.8439181447029114,
0.21122422814369202,
1.4272668361663818,
-0.16564059257507324,
-0.44723010063171387,
1.7327073812484741,
-0.4987016022205353,
0.46069756150245667,
1.0908368825912476,
-0.48757851123809814,
-1.065662145614624,
-0.8315174579620361,
-1.1948633193969727,
-0.636814534664154,
1.2157264947891235,
0.1447851061820984,
-1.1906620264053345,
0.27180567383766174,
1.4285366535186768,
0.030250586569309235,
-0.3384703993797302,
0.5844727158546448,
0.47946691513061523,
-0.8431634306907654,
-0.04981721565127373,
-0.7780192494392395,
0.537969708442688,
-0.01854357123374939,
-0.4112541377544403,
0.5149797797203064,
0.38329094648361206,
1.2498208284378052,
0.040801770985126495,
0.21424713730812073,
1.1506296396255493,
-1.4011908769607544,
1.532129168510437,
-0.5768788456916809,
0.17480814456939697,
-2.3431642055511475,
1.4815198183059692,
-0.7454777359962463,
1.9741986989974976,
-2.6789374351501465,
0.36479267477989197,
-0.5821150541305542,
-0.4380798935890198,
0.3336615264415741,
-0.37062564492225647,
0.1526779979467392,
-0.20488816499710083,
-1.0648295879364014,
-0.11725762486457825,
-0.7771887183189392,
0.5902444124221802,
1.1306192874908447,
1.3230981826782227,
-1.033448576927185,
-0.3169139325618744,
-1.7584168910980225,
-0.22678479552268982,
-0.6572004556655884,
0.2751535475254059,
-2.102245569229126,
-0.2598526179790497,
-1.9964356422424316,
-2.3031160831451416,
-1.3758156299591064,
-0.8837330937385559,
1.1563047170639038,
0.15748460590839386,
-0.9075043797492981,
1.090762734413147,
-0.3848460018634796,
-1.7278560400009155,
1.0265753269195557,
-2.01397967338562
] |
https://github.com/huggingface/datasets/issues/4829 | Misalignment between card tag validation and docs | Instead of our own implementation, we now use `huggingface_hub`'s `DatasetCardData`, which has the correct type hint, so I think we can close this issue. | ## Describe the bug
As pointed out in other issue: https://github.com/huggingface/datasets/pull/4827#discussion_r943536284
the validation of the dataset card tags is not aligned with its documentation: e.g.
- implementation: `license: List[str]`
- docs: `license: Union[str, List[str]]`
They should be aligned.
CC: @julien-c
| 580 | 24 | Misalignment between card tag validation and docs
## Describe the bug
As pointed out in other issue: https://github.com/huggingface/datasets/pull/4827#discussion_r943536284
the validation of the dataset card tags is not aligned with its documentation: e.g.
- implementation: `license: List[str]`
- docs: `license: Union[str, List[str]]`
They should be aligned.
CC: @julien-c
Instead of our own implementation, we now use `huggingface_hub`'s `DatasetCardData`, which has the correct type hint, so I think we can close this issue. | [
-0.9990123510360718,
-0.8248574733734131,
-0.9186471700668335,
1.4687049388885498,
-0.04255963861942291,
-1.290756344795227,
0.18426160514354706,
-1.0398948192596436,
1.6957169771194458,
-0.7401965856552124,
0.27486473321914673,
-1.721854329109192,
-0.06408897042274475,
-0.5952603816986084,
-0.8173205852508545,
-0.9807602167129517,
-0.3602219820022583,
-0.7452102899551392,
1.0264191627502441,
2.5174875259399414,
1.2288436889648438,
-1.3256824016571045,
2.6469521522521973,
0.6403288841247559,
-0.1283210963010788,
-1.0462087392807007,
0.5879955291748047,
-0.05992573872208595,
-1.2462000846862793,
-0.43916115164756775,
-0.950984001159668,
-0.10416755080223083,
-0.47413817048072815,
-0.5222358703613281,
0.017829786986112595,
0.472750186920166,
-0.2976837754249573,
-0.3249672055244446,
-0.4162696301937103,
-0.8478032350540161,
0.40518829226493835,
-0.2890399098396301,
0.8911706209182739,
-0.33691734075546265,
1.856058955192566,
-0.5846033096313477,
0.3480193018913269,
0.7295447587966919,
1.368888020515442,
0.14333824813365936,
-0.0865081176161766,
0.25404593348503113,
0.3560551702976227,
0.019805271178483963,
0.3977445960044861,
1.1742526292800903,
0.6368089914321899,
0.6322180032730103,
0.7298476696014404,
-2.1713242530822754,
1.2063283920288086,
-1.0384501218795776,
0.29683157801628113,
1.4598395824432373,
-1.0524957180023193,
0.30070602893829346,
-1.8629019260406494,
-0.0955352857708931,
0.5607272386550903,
-2.2697865962982178,
0.33024707436561584,
-1.2162466049194336,
-0.4903450012207031,
1.0030734539031982,
0.35155579447746277,
-1.2821820974349976,
0.1094798594713211,
-0.28228241205215454,
1.1485027074813843,
0.5033423900604248,
1.2170690298080444,
-1.6889946460723877,
0.08025611191987991,
-0.3828241527080536,
-0.0006205439567565918,
-1.3683961629867554,
-1.4171669483184814,
0.5048452615737915,
0.5931705236434937,
0.6136317253112793,
-0.06785859167575836,
0.9202697277069092,
-0.9540305137634277,
0.7284140586853027,
-0.9413325786590576,
-1.7239389419555664,
-1.3749804496765137,
-2.230621814727783,
-2.3055427074432373,
0.8028616905212402,
-0.5204051733016968,
-0.5781732797622681,
2.0475587844848633,
-0.8830922842025757,
-1.8223884105682373,
1.0588865280151367,
0.36371204257011414,
0.041964974254369736,
2.395036220550537,
0.36859551072120667,
-0.7144132852554321,
0.4166433811187744,
-0.798352837562561,
0.7920898199081421,
-0.3699714243412018,
1.4865103960037231,
0.5234270095825195,
-1.096590280532837,
1.7309571504592896,
-0.415680855512619,
0.5687103271484375,
-0.7802780866622925,
-0.5617347955703735,
-0.758075475692749,
0.306378036737442,
1.9510014057159424,
-0.28715264797210693,
1.506809115409851,
-0.3702537417411804,
-1.5600643157958984,
-1.554185152053833,
0.9002699851989746,
0.4858192503452301,
-0.800235390663147,
0.11044757813215256,
-0.3128391206264496,
0.013063108548521996,
-0.051011040806770325,
1.1538649797439575,
1.2448042631149292,
0.6657664775848389,
-0.32323896884918213,
-0.8803548812866211,
0.17957283556461334,
0.04485843703150749,
-0.7340651750564575,
-1.8092782497406006,
-0.23649920523166656,
0.16171619296073914,
0.6555948257446289,
-1.156700849533081,
1.75555419921875,
0.8107410669326782,
2.0511529445648193,
0.9180644750595093,
-0.42277079820632935,
1.3772387504577637,
0.016431571915745735,
1.900730013847351,
-0.4698319435119629,
0.6609500646591187,
-0.24485912919044495,
-1.1670539379119873,
1.0107650756835938,
-0.3210582137107849,
-1.9785387516021729,
-0.6583812236785889,
-0.9420468807220459,
-0.12825991213321686,
-0.7077455520629883,
1.0582889318466187,
-0.2134857475757599,
-1.4129197597503662,
0.26945948600769043,
-0.7583597898483276,
0.1516016721725464,
-1.2922890186309814,
0.2758050858974457,
0.7713027000427246,
-0.6340445280075073,
0.0347733274102211,
-0.28275996446609497,
-1.2786635160446167,
-0.5743710994720459,
0.33065131306648254,
1.9076868295669556,
-0.7757484912872314,
0.8726271390914917,
1.0187128782272339,
-0.6551203727722168,
-0.1189037561416626,
0.3532518148422241,
-0.35008591413497925,
0.830562949180603,
-1.091315746307373,
-0.46285560727119446,
1.150579571723938,
-0.08461400121450424,
-0.7082104682922363,
1.5458674430847168,
0.8295704126358032,
-0.9513744115829468,
-0.1277638077735901,
-0.23572121560573578,
-0.8140555620193481,
0.01887165755033493,
-1.6558870077133179,
-0.020924963057041168,
0.34411782026290894,
-1.5232259035110474,
-0.5140453577041626,
-0.1339448243379593,
1.4456061124801636,
-0.24979403614997864,
1.2903056144714355,
-0.29181137681007385,
-0.20235072076320648,
-0.5174276828765869,
-0.4389335811138153,
0.1877603679895401,
-0.2550376057624817,
-0.6116381883621216,
0.35362476110458374,
-0.7484318017959595,
0.3567389249801636,
1.342475175857544,
0.30622008442878723,
0.08924607932567596,
0.5397024154663086,
1.1755698919296265,
0.3213525414466858,
-0.03301321715116501,
-1.0089056491851807,
-1.5046311616897583,
2.071005344390869,
-1.481904149055481,
1.957021713256836,
0.6930035352706909,
-0.00945651438087225,
-1.7795486450195312,
-1.8713020086288452,
1.4326859712600708,
1.1736565828323364,
2.2539000511169434,
0.6789405345916748,
0.40299192070961,
-0.8220221996307373,
-0.5358307361602783,
0.30288246273994446,
-1.0523512363433838,
-0.7472155094146729,
0.1745709925889969,
2.380880117416382,
1.7459732294082642,
-0.5368517637252808,
-0.15846990048885345,
-0.9865632057189941,
1.2543880939483643,
-0.13665828108787537,
0.16380438208580017,
1.9971699714660645,
-0.19161377847194672,
-1.1237469911575317,
1.1884580850601196,
-2.3416011333465576,
0.1605166494846344,
2.041814088821411,
0.29754725098609924,
0.1445874273777008,
-1.511281967163086,
-0.7100117206573486,
-0.14635859429836273,
-0.4550025463104248,
-1.1879799365997314,
0.6445772647857666,
-0.30010348558425903,
-0.8848334550857544,
-1.469001054763794,
0.1922006607055664,
-1.0584793090820312,
-1.7451227903366089,
0.36736831068992615,
1.8856371641159058,
2.0255801677703857,
-0.7256498336791992,
1.610565423965454,
-0.29625922441482544,
0.17232979834079742,
1.2949188947677612,
1.2056951522827148,
2.9923319816589355,
1.9205766916275024,
-1.2171636819839478,
0.7382713556289673,
-0.08530573546886444,
-0.5653775930404663,
1.1924608945846558,
-1.057786226272583,
1.1910940408706665,
-0.25070127844810486,
-1.2485411167144775,
-1.311015248298645,
0.8755371570587158,
0.3557516634464264,
0.1870107352733612,
-0.5376898050308228,
1.2571667432785034,
0.037948958575725555,
1.3263185024261475,
0.6479412317276001,
-0.32224324345588684,
0.5391490459442139,
-0.33510372042655945,
-0.36942052841186523,
1.6469740867614746,
0.21815037727355957,
-1.4190889596939087,
-2.397681713104248,
-0.22488245368003845,
-0.781982421875,
-0.028393417596817017,
-0.6396548748016357,
-1.0254383087158203,
1.7238240242004395,
0.5052752494812012,
-1.2425854206085205,
-0.33829939365386963,
-0.3313182592391968,
-0.6250540018081665,
2.735612154006958,
-1.5025713443756104,
-0.2869676947593689,
-1.0590227842330933,
-0.4703514277935028,
1.7211875915527344,
-1.2524824142456055,
-0.12725195288658142,
-1.0464379787445068,
-0.6327513456344604,
-1.2814315557479858,
-0.5446711778640747,
-0.05500636622309685,
-0.8556544780731201,
0.7649976015090942,
0.10713104158639908,
-1.2418973445892334,
-0.2691824734210968,
-0.9192057847976685,
0.7611849308013916,
-0.22664986550807953,
0.330364853143692,
1.9712556600570679,
0.48670485615730286,
-0.3999580144882202,
0.6927758455276489,
1.1139580011367798,
0.6365751028060913,
-0.5386744737625122,
0.2652636766433716,
-0.6121875047683716,
0.2874722480773926,
-1.315946340560913,
0.3059426546096802,
-2.9259390830993652,
0.5729993581771851,
0.02598634362220764,
0.022008780390024185,
-0.06521119177341461,
-1.3153241872787476,
1.2169606685638428,
2.58422589302063,
-1.272968053817749,
0.42295217514038086,
0.3439551293849945,
1.2480227947235107,
-1.580647349357605,
0.2937391400337219,
-0.3746319115161896,
2.172248125076294,
0.07650535553693771,
1.181849718093872,
-0.4265601634979248,
-2.202407121658325,
0.6152293682098389,
-1.2954128980636597,
-1.1071631908416748,
0.8586130142211914,
-0.7249542474746704,
0.08028464019298553,
-1.3748605251312256,
-0.1498403549194336,
-1.016570806503296,
-1.3402835130691528,
0.8281199932098389,
0.06870001554489136,
0.38987278938293457,
-0.6082397699356079,
0.34891173243522644,
-2.1525793075561523,
-1.3962808847427368,
-0.15666992962360382,
-0.9300118684768677,
0.38134244084358215,
-0.251473605632782,
0.6238921880722046,
-0.17555756866931915,
-0.046156689524650574,
0.3224653899669647,
1.372973918914795,
3.4209187030792236,
0.2938259541988373,
0.4431118965148926,
-0.17331822216510773,
-0.8918042182922363,
1.516128659248352,
0.9985036849975586,
-0.07254534214735031,
-0.5848406553268433,
-0.7929270267486572,
1.2502022981643677,
2.0410869121551514,
1.0444084405899048,
0.01338752917945385,
-0.8642804622650146,
-0.7138892412185669,
0.0768156573176384,
0.17262513935565948,
0.5144765377044678,
0.9068188667297363,
0.037926334887742996,
-0.01969938911497593,
1.2745075225830078,
1.093839406967163,
-0.43032315373420715,
0.4568217694759369,
-0.8464016914367676,
-0.34985581040382385,
0.4411460757255554,
0.32763805985450745,
0.016181297600269318,
0.43703600764274597,
-1.0299896001815796,
-0.2694973051548004,
-0.17891773581504822,
-0.8760195970535278,
-0.7775992155075073,
-0.345401406288147,
-0.44401946663856506,
1.58273184299469,
0.023711245507001877,
-0.535240888595581,
0.018593665212392807,
-0.7791860103607178,
-0.09095723181962967,
-1.0872046947479248,
0.2464372217655182,
-0.1857386976480484,
0.002486276440322399,
-0.05486496537923813,
1.7024991512298584,
-0.9760007858276367,
-2.1139726638793945,
0.19654670357704163,
0.3502359092235565,
-0.5148793458938599,
0.24159017205238342,
1.6460846662521362,
0.49919870495796204,
1.3781719207763672,
1.3439691066741943,
0.9731417894363403,
-0.7751866579055786,
-1.3540135622024536,
0.6149102449417114,
0.9816761016845703,
-1.5749863386154175,
0.8350781202316284,
-0.02689475752413273,
-0.38106438517570496,
0.6212798357009888,
1.3305078744888306,
0.43227067589759827,
-2.0158865451812744,
0.7207286357879639,
-0.8506700992584229,
0.8264282941818237,
0.6973003149032593,
0.7138079404830933,
0.23883764445781708,
0.7964696884155273,
-1.28218674659729,
-1.1053231954574585,
-0.7529792785644531,
-0.6647622585296631,
1.7241336107254028,
-0.17754516005516052,
0.5045301914215088,
-0.060803916305303574,
-1.3276585340499878,
-0.1590607762336731,
0.6366524696350098,
0.3356972336769104,
-0.43825650215148926,
0.7494946718215942,
-0.6139541864395142,
-1.159159779548645,
-1.3321086168289185,
-0.5624092817306519,
-0.9027131795883179,
-0.9513336420059204,
1.0335534811019897,
0.7868865728378296,
0.31339582800865173,
1.8679583072662354,
0.6002718210220337,
0.14705559611320496,
-2.648927927017212,
0.8806792497634888,
0.4401050806045532,
-0.03803103789687157,
0.8659563064575195,
0.4331311583518982,
1.0519970655441284,
-0.07079076766967773,
0.6285098791122437,
-2.390057325363159,
2.2964932918548584,
-0.301751971244812,
0.5623999834060669,
0.09872914105653763,
-0.17267967760562897,
1.055247187614441,
0.4521046578884125,
0.5284470319747925,
-1.1465418338775635,
0.7293699979782104,
-0.6934598684310913,
1.2054611444473267,
0.8887348175048828,
-0.7483011484146118,
0.06991130113601685,
1.320718765258789,
0.5105870962142944,
-0.4799406826496124,
-0.9079596996307373,
-0.8814496994018555,
0.8963108062744141,
1.6762608289718628,
-0.04067803919315338,
0.04235753417015076,
0.8659294843673706,
0.5858699083328247,
-1.3858954906463623,
-0.015379462391138077,
-0.6855216026306152,
-0.8154300451278687,
1.694167971611023,
1.98635995388031,
-0.16750161349773407,
-0.14620043337345123,
-0.8905549049377441,
-1.2197016477584839,
0.8148245811462402,
-0.07907339185476303,
0.14222945272922516,
0.6345542669296265,
-0.6305015087127686,
1.1133562326431274,
0.7629232406616211,
0.9012916088104248,
0.1366436630487442,
0.40277066826820374,
0.2855980098247528,
-0.28268712759017944,
-1.120903491973877,
-0.20837800204753876,
-1.1507391929626465,
-2.514650583267212,
0.44902363419532776,
-0.38674166798591614,
-1.3012111186981201,
0.03486659750342369,
-1.076541781425476,
0.7998504638671875,
-0.6236590147018433,
-0.9903911352157593,
-1.4687258005142212,
0.27010810375213623,
-0.05793645977973938,
0.8345496654510498,
-1.56434166431427,
-0.039908457547426224,
1.3417586088180542,
0.8742921352386475,
-0.8384455442428589,
1.0394874811172485,
0.15370780229568481,
1.187432885169983,
0.8461756706237793,
-0.3253284990787506,
0.5509018898010254,
0.14964979887008667,
-1.3825348615646362,
0.5549017190933228,
1.2109169960021973,
0.044721949845552444,
1.4662071466445923,
-0.4632367491722107,
-0.015892915427684784,
0.4707905650138855,
-0.46871417760849,
-0.5217788219451904,
-0.6082990169525146,
0.6801084280014038,
0.16052690148353577,
-0.9431586265563965,
0.15193651616573334,
-0.17762987315654755,
-0.046136584132909775,
0.3179895281791687,
-1.5790364742279053,
-0.34169113636016846,
-0.3533845841884613,
-0.5968996286392212,
-1.265575647354126,
-0.05734312906861305,
1.345548391342163,
-0.5508830547332764,
-0.15453249216079712,
0.5220191478729248,
0.3992079198360443,
0.45516693592071533,
0.6687262058258057,
-0.6310529708862305,
-0.407175749540329,
-0.3408443033695221,
-0.3721557855606079,
0.4309895634651184,
1.3445675373077393,
-0.1688985824584961,
-0.9943242073059082,
0.6941219568252563,
-0.3555854558944702,
-0.07599899917840958,
2.0211281776428223,
0.028236284852027893,
-0.9872065782546997,
0.30306345224380493,
-0.6031827926635742,
1.9892126321792603,
1.7222321033477783,
1.352576494216919,
-0.2147444635629654,
-0.9138702154159546,
0.6569225788116455,
-0.2261730134487152,
-0.36727434396743774,
0.8761501312255859,
0.4044063985347748,
-0.2805681824684143,
-1.4656952619552612,
0.5271934270858765,
1.3328638076782227,
-0.8158141374588013,
-0.879755973815918,
0.08836831152439117,
-0.823428750038147,
0.948784351348877,
0.7415297031402588,
0.43250489234924316,
0.2843388617038727,
1.4394787549972534,
0.689057469367981,
-0.49177148938179016,
0.3778494894504547,
0.4554445445537567,
-0.10161247104406357,
-1.9722929000854492,
-1.128963828086853,
0.3300425708293915,
-0.40141764283180237,
-1.5905070304870605,
1.4167048931121826,
-1.1898503303527832,
-0.8488078117370605,
0.4956457316875458,
0.11958654224872589,
1.4084392786026,
0.31038933992385864,
1.6389129161834717,
1.9952123165130615,
0.8218892812728882,
0.22534704208374023,
1.3946220874786377,
-0.22999252378940582,
-0.550761342048645,
1.7615255117416382,
-0.502432644367218,
0.5195374488830566,
1.1022337675094604,
-0.46836820244789124,
-1.0963305234909058,
-0.8780930042266846,
-1.2158198356628418,
-0.5832029581069946,
1.1665199995040894,
0.10460860282182693,
-1.2525033950805664,
0.29983779788017273,
1.4497267007827759,
0.03380560502409935,
-0.31524592638015747,
0.617374062538147,
0.4194287061691284,
-0.8871278762817383,
-0.004480874631553888,
-0.8829072713851929,
0.5515053272247314,
-0.07291276007890701,
-0.3431597948074341,
0.49348124861717224,
0.4127368628978729,
1.1920944452285767,
0.05756981670856476,
0.2122454196214676,
1.1247379779815674,
-1.3891301155090332,
1.4624000787734985,
-0.6118044853210449,
0.23744863271713257,
-2.3603241443634033,
1.400040864944458,
-0.7091009616851807,
1.885371446609497,
-2.6885945796966553,
0.3166942596435547,
-0.5667153596878052,
-0.44000619649887085,
0.2890909016132355,
-0.41207027435302734,
0.18380221724510193,
-0.1444115787744522,
-1.0797053575515747,
-0.11889024078845978,
-0.8320674896240234,
0.5324876308441162,
1.089618444442749,
1.3210551738739014,
-0.9650634527206421,
-0.30968788266181946,
-1.7471294403076172,
-0.2515994906425476,
-0.6080695390701294,
0.2848280966281891,
-2.0690035820007324,
-0.18126052618026733,
-1.9574527740478516,
-2.3032257556915283,
-1.326038122177124,
-0.9257057905197144,
1.087334156036377,
0.14963462948799133,
-0.9109317064285278,
1.115875005722046,
-0.32693687081336975,
-1.732231855392456,
0.9813888072967529,
-2.036240816116333
] |
https://github.com/huggingface/datasets/issues/4804 | streaming dataset with concatenating splits raises an error | Hi! Only the name of a particular split ("train", "test", ...) is supported as a split pattern if `streaming=True`. We plan to address this limitation soon. | ## Describe the bug
streaming dataset with concatenating splits raises an error
## Steps to reproduce the bug
```python
from datasets import load_dataset
# no error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation")
```
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```sh
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-4-a6ae02d63899>](https://localhost:8080/#) in <module>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1030 splits_generator = splits_generators[split]
1031 else:
-> 1032 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1033
1034 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['validation', 'train']
```
[Colab](https://colab.research.google.com/drive/1wMj08_0bym9jnGgByib4lsBPu8NCZBG9?usp=sharing)
## Expected results
load successfully or throws an error saying it is not supported.
## Actual results
above
## Environment info
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0 (windows11 x64)
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| 585 | 26 | streaming dataset with concatenating splits raises an error
## Describe the bug
streaming dataset with concatenating splits raises an error
## Steps to reproduce the bug
```python
from datasets import load_dataset
# no error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation")
```
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```sh
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-4-a6ae02d63899>](https://localhost:8080/#) in <module>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1030 splits_generator = splits_generators[split]
1031 else:
-> 1032 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1033
1034 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['validation', 'train']
```
[Colab](https://colab.research.google.com/drive/1wMj08_0bym9jnGgByib4lsBPu8NCZBG9?usp=sharing)
## Expected results
load successfully or throws an error saying it is not supported.
## Actual results
above
## Environment info
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0 (windows11 x64)
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Hi! Only the name of a particular split ("train", "test", ...) is supported as a split pattern if `streaming=True`. We plan to address this limitation soon. | [
-1.1802831888198853,
-0.8107233047485352,
-0.6265303492546082,
1.4492454528808594,
0.04208391159772873,
-1.3239070177078247,
0.08380772918462753,
-0.9080013036727905,
1.625213623046875,
-0.7846611738204956,
0.3806034326553345,
-1.7234536409378052,
0.039938442409038544,
-0.6829553842544556,
-0.6707836389541626,
-0.6939805150032043,
-0.35902857780456543,
-0.6579480171203613,
1.1158454418182373,
2.4453141689300537,
1.3055346012115479,
-1.2955244779586792,
2.8622169494628906,
0.6636852025985718,
-0.24610385298728943,
-0.8211761116981506,
0.40136346220970154,
-0.026909004896879196,
-1.4388636350631714,
-0.23130333423614502,
-1.0439766645431519,
-0.09661723673343658,
-0.6715530753135681,
-0.5607818365097046,
0.032768987119197845,
0.46889686584472656,
-0.2382047176361084,
-0.36939379572868347,
-0.43659818172454834,
-0.7433249354362488,
0.5663841962814331,
-0.2636798024177551,
0.8179566860198975,
-0.2873218357563019,
1.7812767028808594,
-0.668715238571167,
0.4707610011100769,
0.48672622442245483,
1.1897156238555908,
0.213210791349411,
-0.06290700286626816,
0.45980945229530334,
0.24733702838420868,
0.029539678245782852,
0.6092721223831177,
1.360381007194519,
0.6316565275192261,
0.5332136154174805,
0.7846461534500122,
-2.1806578636169434,
1.2733047008514404,
-0.7852463126182556,
0.17693933844566345,
1.3320492506027222,
-1.1063580513000488,
0.4981748163700104,
-1.8109116554260254,
-0.17402903735637665,
0.40133437514305115,
-2.2692346572875977,
0.17034345865249634,
-1.3017910718917847,
-0.6064536571502686,
1.0314518213272095,
0.3687158226966858,
-1.1757830381393433,
0.05843577906489372,
-0.45688313245773315,
1.0079724788665771,
0.3556014895439148,
1.14922297000885,
-1.6855336427688599,
0.06514747440814972,
-0.2740631401538849,
0.3373420536518097,
-1.185605764389038,
-1.6103317737579346,
0.5951328873634338,
0.711866557598114,
0.6474563479423523,
-0.16957247257232666,
0.9389936327934265,
-1.1450226306915283,
0.7716091871261597,
-0.9855588674545288,
-1.7919565439224243,
-1.3315982818603516,
-2.4208624362945557,
-2.3336832523345947,
0.7368159294128418,
-0.4194289743900299,
-0.4553903341293335,
2.1145334243774414,
-1.1328115463256836,
-1.761659026145935,
1.066910982131958,
0.31457391381263733,
-0.12818944454193115,
2.422743082046509,
0.21930500864982605,
-0.9308951497077942,
0.7612069845199585,
-0.864970326423645,
0.6141136288642883,
-0.3474728465080261,
1.295030117034912,
0.4614045023918152,
-1.106094241142273,
1.6097177267074585,
-0.450607568025589,
0.5254458785057068,
-0.696272075176239,
-0.4209841191768646,
-0.5074997544288635,
0.21787971258163452,
2.022428512573242,
-0.2158270627260208,
1.5696052312850952,
-0.12216929346323013,
-1.4370826482772827,
-1.4087848663330078,
0.7648125886917114,
0.4710713326931,
-0.7787391543388367,
0.22857698798179626,
-0.3834530711174011,
0.13716883957386017,
0.11129066348075867,
1.141628384590149,
1.2586098909378052,
0.786177933216095,
-0.16023531556129456,
-0.8942376375198364,
0.09522853791713715,
0.018793784081935883,
-0.6018689870834351,
-1.660225510597229,
-0.25909528136253357,
0.11861789971590042,
0.5927585959434509,
-1.2374212741851807,
1.8788087368011475,
0.8763676285743713,
2.0154170989990234,
0.9788382649421692,
-0.3003219962120056,
1.5569870471954346,
0.08988376706838608,
1.8732563257217407,
-0.29317769408226013,
0.6751747131347656,
-0.5010688900947571,
-1.2407784461975098,
0.6920449733734131,
-0.33282139897346497,
-2.012242078781128,
-0.37206050753593445,
-0.8919490575790405,
-0.06784512847661972,
-0.9222312569618225,
1.034250020980835,
-0.16053873300552368,
-1.4568740129470825,
0.23752349615097046,
-0.7435185313224792,
0.11773505061864853,
-1.4671114683151245,
0.26095306873321533,
0.7370429635047913,
-0.6956201195716858,
0.0594346858561039,
-0.42323485016822815,
-1.3383817672729492,
-0.5994943976402283,
0.43733400106430054,
1.753037929534912,
-0.6955570578575134,
0.9405380487442017,
1.0511506795883179,
-0.6146172881126404,
-0.10239101946353912,
0.5230262875556946,
-0.3919735252857208,
0.9072299599647522,
-1.0441186428070068,
-0.41600319743156433,
1.0916402339935303,
-0.17651337385177612,
-0.5450029969215393,
1.3140685558319092,
0.7741148471832275,
-1.005553126335144,
-0.3385635018348694,
-0.1252182424068451,
-0.9019023776054382,
0.04135173559188843,
-1.595900297164917,
-0.07708631455898285,
0.27634477615356445,
-1.4467010498046875,
-0.49916550517082214,
-0.08518363535404205,
1.2907891273498535,
-0.024163447320461273,
1.3433024883270264,
-0.1944732964038849,
-0.08774296194314957,
-0.45560771226882935,
-0.5335177779197693,
0.10425110906362534,
-0.1584823578596115,
-0.6088829636573792,
0.2523200809955597,
-0.7507910132408142,
0.2026161402463913,
1.4864202737808228,
0.2353367656469345,
0.14596687257289886,
0.5533372759819031,
1.2159314155578613,
0.34454986453056335,
-0.22284002602100372,
-0.90040522813797,
-1.6589692831039429,
1.9652888774871826,
-1.5504261255264282,
1.9519990682601929,
0.8954628705978394,
-0.028474096208810806,
-1.8256407976150513,
-1.8445320129394531,
1.4938589334487915,
1.1317119598388672,
2.5418291091918945,
0.5169129371643066,
0.44596415758132935,
-0.805998682975769,
-0.7272786498069763,
0.4002717435359955,
-0.8025363087654114,
-0.8534292578697205,
0.2347586452960968,
2.3522448539733887,
1.7695982456207275,
-0.3607507050037384,
-0.21655306220054626,
-0.9237879514694214,
1.3477376699447632,
-0.2817641496658325,
0.20515507459640503,
1.827918529510498,
-0.39948001503944397,
-1.0345077514648438,
1.3052563667297363,
-2.3555445671081543,
0.2444237619638443,
1.9765654802322388,
0.3541247844696045,
0.021816957741975784,
-1.1796081066131592,
-0.7109183073043823,
-0.14694833755493164,
-0.452716201543808,
-1.264496922492981,
0.36951974034309387,
-0.25688958168029785,
-0.7730284333229065,
-1.4085941314697266,
0.046275027096271515,
-1.1610658168792725,
-1.7123136520385742,
0.28977158665657043,
1.7783757448196411,
2.1542599201202393,
-0.855936586856842,
1.3678220510482788,
-0.2767060697078705,
0.26303279399871826,
1.1936663389205933,
1.2607923746109009,
3.1944260597229004,
1.8677175045013428,
-1.289007544517517,
0.7196983695030212,
-0.13215629756450653,
-0.5502716898918152,
1.201843500137329,
-1.1052173376083374,
1.1965407133102417,
-0.2612278163433075,
-1.3828243017196655,
-1.182726263999939,
0.9252825975418091,
0.454679399728775,
-0.04450060427188873,
-0.5028197765350342,
1.067032814025879,
0.1902419626712799,
1.3560116291046143,
0.6236348152160645,
-0.29739317297935486,
0.5835387110710144,
-0.29946547746658325,
-0.5224341750144958,
1.5186506509780884,
0.032831817865371704,
-1.5659000873565674,
-2.349458932876587,
-0.08524669706821442,
-1.0058315992355347,
0.03102770820260048,
-0.9208143353462219,
-1.0248098373413086,
1.537118673324585,
0.47082018852233887,
-1.0214459896087646,
-0.09706858545541763,
-0.37762942910194397,
-0.5397725105285645,
2.6248104572296143,
-1.3975765705108643,
-0.2854164242744446,
-0.9993173480033875,
-0.6531895995140076,
1.5438443422317505,
-1.1251418590545654,
-0.2478988915681839,
-1.0604665279388428,
-0.5080816745758057,
-1.2530920505523682,
-0.45023393630981445,
-0.04495994374155998,
-0.755374550819397,
0.7519658207893372,
-0.044380366802215576,
-1.3237022161483765,
-0.26699185371398926,
-1.0645747184753418,
0.8475037217140198,
-0.34417030215263367,
0.05283759906888008,
1.7357417345046997,
0.2374170571565628,
-0.43066149950027466,
0.7779409289360046,
1.3197910785675049,
0.6083569526672363,
-0.5308693051338196,
0.25708627700805664,
-0.653839647769928,
0.43286824226379395,
-1.2155476808547974,
0.36396920680999756,
-2.880661725997925,
0.6347686052322388,
0.034863125532865524,
-0.00862754974514246,
-0.09752361476421356,
-1.483958125114441,
0.9403695464134216,
2.479078531265259,
-1.1187821626663208,
0.6086379289627075,
0.3117232918739319,
1.198212742805481,
-1.6685048341751099,
0.07331988215446472,
-0.640855073928833,
2.0334949493408203,
0.05578979477286339,
1.05258047580719,
-0.5714878439903259,
-2.3218576908111572,
0.5407164692878723,
-1.2389024496078491,
-0.9527954459190369,
0.8208542466163635,
-0.8575912714004517,
0.2173028290271759,
-1.1564407348632812,
-0.12851715087890625,
-0.9209828972816467,
-1.1125402450561523,
0.5739970207214355,
0.07233532518148422,
0.6256187558174133,
-0.6472961902618408,
0.2759706676006317,
-2.259169578552246,
-1.3958337306976318,
-0.13003623485565186,
-0.8771979808807373,
0.47765833139419556,
-0.39164456725120544,
0.7155258655548096,
-0.1789574921131134,
-0.0343618206679821,
0.29808157682418823,
1.4740110635757446,
3.1645314693450928,
0.10832875967025757,
0.34726661443710327,
-0.2348630577325821,
-1.0785738229751587,
1.5443816184997559,
0.8646959066390991,
-0.24687449634075165,
-0.5808104276657104,
-0.9506775140762329,
1.3588205575942993,
1.8266966342926025,
1.1052840948104858,
0.05393527075648308,
-0.939256489276886,
-0.8100267052650452,
0.08417753875255585,
0.18335293233394623,
0.4096655249595642,
0.9765951037406921,
0.1392105221748352,
0.14492441713809967,
1.28348708152771,
1.038056492805481,
-0.3873080611228943,
0.5064314007759094,
-0.8403525948524475,
-0.41509613394737244,
0.5339751839637756,
0.33536410331726074,
0.034502025693655014,
0.25097334384918213,
-1.0684144496917725,
-0.24560213088989258,
-0.26482242345809937,
-0.8221182227134705,
-0.7393448352813721,
-0.3796824812889099,
-0.3939352035522461,
1.7399412393569946,
-0.12964926660060883,
-0.5132396221160889,
0.007165850140154362,
-0.832165002822876,
-0.1464775800704956,
-1.0453953742980957,
0.27846866846084595,
-0.15768806636333466,
0.0261634960770607,
-0.1414489597082138,
1.6863096952438354,
-0.955030620098114,
-2.223409414291382,
0.156539648771286,
0.2676011919975281,
-0.37446215748786926,
-0.10506609827280045,
1.8293973207473755,
0.5734524130821228,
1.362269401550293,
1.5077260732650757,
1.1278446912765503,
-0.647803783416748,
-1.2968207597732544,
0.767304003238678,
0.9747359156608582,
-1.3108652830123901,
0.9031633734703064,
-0.15107087790966034,
-0.6019158959388733,
0.5029779076576233,
1.2892011404037476,
0.5238473415374756,
-1.891045331954956,
0.7990061044692993,
-1.0960853099822998,
0.8447514176368713,
0.8083954453468323,
0.7736431956291199,
0.13651743531227112,
0.8491259813308716,
-1.252383828163147,
-1.0739375352859497,
-0.610079288482666,
-0.5950781106948853,
1.755316972732544,
-0.19006183743476868,
0.390499085187912,
-0.3655215799808502,
-1.2941635847091675,
0.21854254603385925,
0.6653516292572021,
0.29037556052207947,
-0.4029155373573303,
0.6932777762413025,
-0.7306720018386841,
-1.022348165512085,
-1.304142951965332,
-0.4570674002170563,
-0.9950347542762756,
-0.8409537076950073,
0.9785448312759399,
0.7252119183540344,
0.45859235525131226,
2.0005667209625244,
0.732422947883606,
0.15746094286441803,
-2.541538715362549,
0.8279646635055542,
0.3161071836948395,
-0.06561493128538132,
0.7877222299575806,
0.3150801658630371,
1.161806344985962,
-0.12315401434898376,
0.5422722697257996,
-2.393155813217163,
2.2009265422821045,
-0.25686174631118774,
0.7146182656288147,
0.052051860839128494,
-0.0414973683655262,
1.0104143619537354,
0.5455982685089111,
0.45840898156166077,
-1.0812867879867554,
0.8622632622718811,
-0.5917943120002747,
1.1648945808410645,
0.8653173446655273,
-0.9363870620727539,
0.21334010362625122,
1.1870267391204834,
0.4073124825954437,
-0.5671560168266296,
-0.9654003381729126,
-0.8097730875015259,
0.991550862789154,
1.7380294799804688,
0.08779877424240112,
0.09371034801006317,
0.9135345816612244,
0.7617682218551636,
-1.290874719619751,
0.022147901356220245,
-0.5297062397003174,
-0.7224779725074768,
1.872857689857483,
2.070401668548584,
-0.08809594064950943,
-0.06658060848712921,
-0.6722841858863831,
-1.4003623723983765,
0.8859776854515076,
0.14088432490825653,
-0.045166369527578354,
0.8349909782409668,
-0.6553210020065308,
1.23012375831604,
0.881312906742096,
0.7965425252914429,
0.29109716415405273,
0.005633755587041378,
0.31030213832855225,
-0.256339967250824,
-1.2236241102218628,
-0.273389995098114,
-0.9932267665863037,
-2.5712108612060547,
0.42201289534568787,
-0.2178124040365219,
-1.4328954219818115,
0.1438295990228653,
-0.9526587128639221,
0.7525673508644104,
-0.560224711894989,
-1.1309351921081543,
-1.3807002305984497,
0.2769528925418854,
-0.12420118600130081,
0.7539650797843933,
-1.6104975938796997,
-0.1588074266910553,
1.1263248920440674,
0.9947027564048767,
-0.6808045506477356,
0.8688013553619385,
0.23701485991477966,
0.9521499276161194,
0.9992895722389221,
-0.36097466945648193,
0.5222582817077637,
0.25537264347076416,
-1.3799388408660889,
0.3512880504131317,
1.3837851285934448,
0.2170616090297699,
1.4107855558395386,
-0.35045021772384644,
-0.03279931843280792,
0.4393981695175171,
-0.30972233414649963,
-0.606734037399292,
-0.7683806419372559,
0.6275394558906555,
-0.11602647602558136,
-0.9937300682067871,
-0.12436603754758835,
0.05167797952890396,
-0.19338694214820862,
0.36054345965385437,
-1.5006307363510132,
-0.037423472851514816,
-0.3809450566768646,
-0.635565996170044,
-1.380702257156372,
-0.07942301779985428,
1.3541393280029297,
-0.8805384039878845,
-0.1352808177471161,
0.5720069408416748,
0.14904673397541046,
0.5079773664474487,
0.670055627822876,
-0.7708849906921387,
-0.2107505351305008,
-0.1382269263267517,
-0.4652222692966461,
0.3146630823612213,
1.2873049974441528,
-0.1495441049337387,
-0.988770604133606,
0.4674295485019684,
-0.2600301206111908,
0.15046212077140808,
1.860491394996643,
0.031905919313430786,
-0.8832762837409973,
0.329958438873291,
-0.7321256399154663,
1.872398018836975,
1.6700170040130615,
1.3396536111831665,
-0.12776030600070953,
-0.8637909293174744,
0.6506192088127136,
-0.3131103515625,
-0.4094884991645813,
0.894900918006897,
0.32579994201660156,
-0.2694889008998871,
-1.4977757930755615,
0.7440667748451233,
1.2684617042541504,
-0.7377434968948364,
-0.7419817447662354,
0.03482741117477417,
-0.831932008266449,
1.2043564319610596,
0.679233193397522,
0.2733774483203888,
0.36005568504333496,
1.664556622505188,
0.7516028881072998,
-0.5603867173194885,
0.5403205156326294,
0.5058541297912598,
-0.12188886851072311,
-2.0603678226470947,
-1.117857813835144,
0.2667110860347748,
-0.4501475393772125,
-1.4884096384048462,
1.455899953842163,
-1.2598397731781006,
-1.0306854248046875,
0.5527524352073669,
0.11980784684419632,
1.3592908382415771,
0.2637845575809479,
1.7648099660873413,
1.966509222984314,
0.9222230315208435,
0.4417222738265991,
1.1428619623184204,
-0.2692650556564331,
-0.23536741733551025,
1.634692907333374,
-0.5067983865737915,
0.6593980193138123,
1.0195550918579102,
-0.38719335198402405,
-1.2663147449493408,
-0.8001632690429688,
-1.267140507698059,
-0.8120359778404236,
1.074939250946045,
0.10557243227958679,
-1.1514784097671509,
0.33778488636016846,
1.6497136354446411,
-0.013389138504862785,
-0.14873042702674866,
0.7190596461296082,
0.3779398202896118,
-0.668638288974762,
-0.04465271905064583,
-1.0760775804519653,
0.6443049311637878,
-0.3148285150527954,
-0.3573117256164551,
0.16813011467456818,
0.6080650687217712,
1.2576793432235718,
0.20817312598228455,
0.12511156499385834,
1.3270899057388306,
-1.3927080631256104,
1.2473094463348389,
-1.0208200216293335,
0.36549970507621765,
-2.3208088874816895,
1.4795113801956177,
-0.9309982061386108,
1.9362245798110962,
-2.6907951831817627,
0.5180572867393494,
-0.45589780807495117,
-0.5910202264785767,
0.2094830572605133,
-0.2679521143436432,
0.07141466438770294,
-0.05716368183493614,
-1.024677038192749,
-0.1349136084318161,
-0.8066197037696838,
0.5315565466880798,
1.2474373579025269,
1.4115179777145386,
-0.9468483924865723,
-0.31856557726860046,
-1.6485615968704224,
-0.13359400629997253,
-0.5047360062599182,
0.1326446235179901,
-1.8312227725982666,
-0.18368442356586456,
-2.0367374420166016,
-2.4968841075897217,
-1.288066029548645,
-0.9424157738685608,
1.3019894361495972,
0.12263648957014084,
-0.9186099171638489,
1.0877883434295654,
-0.49902501702308655,
-1.7640974521636963,
1.231919765472412,
-2.209256649017334
] |
https://github.com/huggingface/datasets/issues/4804 | streaming dataset with concatenating splits raises an error | yes, same error occurs.
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```python
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-3-a6ae02d63899>](https://localhost:8080/#) in <cell line: 5>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1265 splits_generator = splits_generators[split]
1266 else:
-> 1267 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1268
1269 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['train', 'validation']
```
google colab, `datasets==2.12.0`
```
- huggingface_hub version: 0.14.1
- Platform: Linux-5.10.147+-x86_64-with-glibc2.31
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: 2.7.12
- Tensorflow: 2.12.0
- Torch: 2.0.0+cu118
- Jinja2: 3.1.2
- Graphviz: 0.20.1
- Pydot: 1.4.2
- Pillow: 8.4.0
- hf_transfer: N/A
- gradio: N/A
- ENDPOINT: https://huggingface.co/
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| ## Describe the bug
streaming dataset with concatenating splits raises an error
## Steps to reproduce the bug
```python
from datasets import load_dataset
# no error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation")
```
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```sh
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-4-a6ae02d63899>](https://localhost:8080/#) in <module>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1030 splits_generator = splits_generators[split]
1031 else:
-> 1032 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1033
1034 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['validation', 'train']
```
[Colab](https://colab.research.google.com/drive/1wMj08_0bym9jnGgByib4lsBPu8NCZBG9?usp=sharing)
## Expected results
load successfully or throws an error saying it is not supported.
## Actual results
above
## Environment info
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0 (windows11 x64)
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| 585 | 201 | streaming dataset with concatenating splits raises an error
## Describe the bug
streaming dataset with concatenating splits raises an error
## Steps to reproduce the bug
```python
from datasets import load_dataset
# no error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation")
```
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```sh
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-4-a6ae02d63899>](https://localhost:8080/#) in <module>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1030 splits_generator = splits_generators[split]
1031 else:
-> 1032 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1033
1034 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['validation', 'train']
```
[Colab](https://colab.research.google.com/drive/1wMj08_0bym9jnGgByib4lsBPu8NCZBG9?usp=sharing)
## Expected results
load successfully or throws an error saying it is not supported.
## Actual results
above
## Environment info
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0 (windows11 x64)
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
yes, same error occurs.
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```python
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-3-a6ae02d63899>](https://localhost:8080/#) in <cell line: 5>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1265 splits_generator = splits_generators[split]
1266 else:
-> 1267 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1268
1269 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['train', 'validation']
```
google colab, `datasets==2.12.0`
```
- huggingface_hub version: 0.14.1
- Platform: Linux-5.10.147+-x86_64-with-glibc2.31
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: 2.7.12
- Tensorflow: 2.12.0
- Torch: 2.0.0+cu118
- Jinja2: 3.1.2
- Graphviz: 0.20.1
- Pydot: 1.4.2
- Pillow: 8.4.0
- hf_transfer: N/A
- gradio: N/A
- ENDPOINT: https://huggingface.co/
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| [
-1.1802831888198853,
-0.8107233047485352,
-0.6265303492546082,
1.4492454528808594,
0.04208391159772873,
-1.3239070177078247,
0.08380772918462753,
-0.9080013036727905,
1.625213623046875,
-0.7846611738204956,
0.3806034326553345,
-1.7234536409378052,
0.039938442409038544,
-0.6829553842544556,
-0.6707836389541626,
-0.6939805150032043,
-0.35902857780456543,
-0.6579480171203613,
1.1158454418182373,
2.4453141689300537,
1.3055346012115479,
-1.2955244779586792,
2.8622169494628906,
0.6636852025985718,
-0.24610385298728943,
-0.8211761116981506,
0.40136346220970154,
-0.026909004896879196,
-1.4388636350631714,
-0.23130333423614502,
-1.0439766645431519,
-0.09661723673343658,
-0.6715530753135681,
-0.5607818365097046,
0.032768987119197845,
0.46889686584472656,
-0.2382047176361084,
-0.36939379572868347,
-0.43659818172454834,
-0.7433249354362488,
0.5663841962814331,
-0.2636798024177551,
0.8179566860198975,
-0.2873218357563019,
1.7812767028808594,
-0.668715238571167,
0.4707610011100769,
0.48672622442245483,
1.1897156238555908,
0.213210791349411,
-0.06290700286626816,
0.45980945229530334,
0.24733702838420868,
0.029539678245782852,
0.6092721223831177,
1.360381007194519,
0.6316565275192261,
0.5332136154174805,
0.7846461534500122,
-2.1806578636169434,
1.2733047008514404,
-0.7852463126182556,
0.17693933844566345,
1.3320492506027222,
-1.1063580513000488,
0.4981748163700104,
-1.8109116554260254,
-0.17402903735637665,
0.40133437514305115,
-2.2692346572875977,
0.17034345865249634,
-1.3017910718917847,
-0.6064536571502686,
1.0314518213272095,
0.3687158226966858,
-1.1757830381393433,
0.05843577906489372,
-0.45688313245773315,
1.0079724788665771,
0.3556014895439148,
1.14922297000885,
-1.6855336427688599,
0.06514747440814972,
-0.2740631401538849,
0.3373420536518097,
-1.185605764389038,
-1.6103317737579346,
0.5951328873634338,
0.711866557598114,
0.6474563479423523,
-0.16957247257232666,
0.9389936327934265,
-1.1450226306915283,
0.7716091871261597,
-0.9855588674545288,
-1.7919565439224243,
-1.3315982818603516,
-2.4208624362945557,
-2.3336832523345947,
0.7368159294128418,
-0.4194289743900299,
-0.4553903341293335,
2.1145334243774414,
-1.1328115463256836,
-1.761659026145935,
1.066910982131958,
0.31457391381263733,
-0.12818944454193115,
2.422743082046509,
0.21930500864982605,
-0.9308951497077942,
0.7612069845199585,
-0.864970326423645,
0.6141136288642883,
-0.3474728465080261,
1.295030117034912,
0.4614045023918152,
-1.106094241142273,
1.6097177267074585,
-0.450607568025589,
0.5254458785057068,
-0.696272075176239,
-0.4209841191768646,
-0.5074997544288635,
0.21787971258163452,
2.022428512573242,
-0.2158270627260208,
1.5696052312850952,
-0.12216929346323013,
-1.4370826482772827,
-1.4087848663330078,
0.7648125886917114,
0.4710713326931,
-0.7787391543388367,
0.22857698798179626,
-0.3834530711174011,
0.13716883957386017,
0.11129066348075867,
1.141628384590149,
1.2586098909378052,
0.786177933216095,
-0.16023531556129456,
-0.8942376375198364,
0.09522853791713715,
0.018793784081935883,
-0.6018689870834351,
-1.660225510597229,
-0.25909528136253357,
0.11861789971590042,
0.5927585959434509,
-1.2374212741851807,
1.8788087368011475,
0.8763676285743713,
2.0154170989990234,
0.9788382649421692,
-0.3003219962120056,
1.5569870471954346,
0.08988376706838608,
1.8732563257217407,
-0.29317769408226013,
0.6751747131347656,
-0.5010688900947571,
-1.2407784461975098,
0.6920449733734131,
-0.33282139897346497,
-2.012242078781128,
-0.37206050753593445,
-0.8919490575790405,
-0.06784512847661972,
-0.9222312569618225,
1.034250020980835,
-0.16053873300552368,
-1.4568740129470825,
0.23752349615097046,
-0.7435185313224792,
0.11773505061864853,
-1.4671114683151245,
0.26095306873321533,
0.7370429635047913,
-0.6956201195716858,
0.0594346858561039,
-0.42323485016822815,
-1.3383817672729492,
-0.5994943976402283,
0.43733400106430054,
1.753037929534912,
-0.6955570578575134,
0.9405380487442017,
1.0511506795883179,
-0.6146172881126404,
-0.10239101946353912,
0.5230262875556946,
-0.3919735252857208,
0.9072299599647522,
-1.0441186428070068,
-0.41600319743156433,
1.0916402339935303,
-0.17651337385177612,
-0.5450029969215393,
1.3140685558319092,
0.7741148471832275,
-1.005553126335144,
-0.3385635018348694,
-0.1252182424068451,
-0.9019023776054382,
0.04135173559188843,
-1.595900297164917,
-0.07708631455898285,
0.27634477615356445,
-1.4467010498046875,
-0.49916550517082214,
-0.08518363535404205,
1.2907891273498535,
-0.024163447320461273,
1.3433024883270264,
-0.1944732964038849,
-0.08774296194314957,
-0.45560771226882935,
-0.5335177779197693,
0.10425110906362534,
-0.1584823578596115,
-0.6088829636573792,
0.2523200809955597,
-0.7507910132408142,
0.2026161402463913,
1.4864202737808228,
0.2353367656469345,
0.14596687257289886,
0.5533372759819031,
1.2159314155578613,
0.34454986453056335,
-0.22284002602100372,
-0.90040522813797,
-1.6589692831039429,
1.9652888774871826,
-1.5504261255264282,
1.9519990682601929,
0.8954628705978394,
-0.028474096208810806,
-1.8256407976150513,
-1.8445320129394531,
1.4938589334487915,
1.1317119598388672,
2.5418291091918945,
0.5169129371643066,
0.44596415758132935,
-0.805998682975769,
-0.7272786498069763,
0.4002717435359955,
-0.8025363087654114,
-0.8534292578697205,
0.2347586452960968,
2.3522448539733887,
1.7695982456207275,
-0.3607507050037384,
-0.21655306220054626,
-0.9237879514694214,
1.3477376699447632,
-0.2817641496658325,
0.20515507459640503,
1.827918529510498,
-0.39948001503944397,
-1.0345077514648438,
1.3052563667297363,
-2.3555445671081543,
0.2444237619638443,
1.9765654802322388,
0.3541247844696045,
0.021816957741975784,
-1.1796081066131592,
-0.7109183073043823,
-0.14694833755493164,
-0.452716201543808,
-1.264496922492981,
0.36951974034309387,
-0.25688958168029785,
-0.7730284333229065,
-1.4085941314697266,
0.046275027096271515,
-1.1610658168792725,
-1.7123136520385742,
0.28977158665657043,
1.7783757448196411,
2.1542599201202393,
-0.855936586856842,
1.3678220510482788,
-0.2767060697078705,
0.26303279399871826,
1.1936663389205933,
1.2607923746109009,
3.1944260597229004,
1.8677175045013428,
-1.289007544517517,
0.7196983695030212,
-0.13215629756450653,
-0.5502716898918152,
1.201843500137329,
-1.1052173376083374,
1.1965407133102417,
-0.2612278163433075,
-1.3828243017196655,
-1.182726263999939,
0.9252825975418091,
0.454679399728775,
-0.04450060427188873,
-0.5028197765350342,
1.067032814025879,
0.1902419626712799,
1.3560116291046143,
0.6236348152160645,
-0.29739317297935486,
0.5835387110710144,
-0.29946547746658325,
-0.5224341750144958,
1.5186506509780884,
0.032831817865371704,
-1.5659000873565674,
-2.349458932876587,
-0.08524669706821442,
-1.0058315992355347,
0.03102770820260048,
-0.9208143353462219,
-1.0248098373413086,
1.537118673324585,
0.47082018852233887,
-1.0214459896087646,
-0.09706858545541763,
-0.37762942910194397,
-0.5397725105285645,
2.6248104572296143,
-1.3975765705108643,
-0.2854164242744446,
-0.9993173480033875,
-0.6531895995140076,
1.5438443422317505,
-1.1251418590545654,
-0.2478988915681839,
-1.0604665279388428,
-0.5080816745758057,
-1.2530920505523682,
-0.45023393630981445,
-0.04495994374155998,
-0.755374550819397,
0.7519658207893372,
-0.044380366802215576,
-1.3237022161483765,
-0.26699185371398926,
-1.0645747184753418,
0.8475037217140198,
-0.34417030215263367,
0.05283759906888008,
1.7357417345046997,
0.2374170571565628,
-0.43066149950027466,
0.7779409289360046,
1.3197910785675049,
0.6083569526672363,
-0.5308693051338196,
0.25708627700805664,
-0.653839647769928,
0.43286824226379395,
-1.2155476808547974,
0.36396920680999756,
-2.880661725997925,
0.6347686052322388,
0.034863125532865524,
-0.00862754974514246,
-0.09752361476421356,
-1.483958125114441,
0.9403695464134216,
2.479078531265259,
-1.1187821626663208,
0.6086379289627075,
0.3117232918739319,
1.198212742805481,
-1.6685048341751099,
0.07331988215446472,
-0.640855073928833,
2.0334949493408203,
0.05578979477286339,
1.05258047580719,
-0.5714878439903259,
-2.3218576908111572,
0.5407164692878723,
-1.2389024496078491,
-0.9527954459190369,
0.8208542466163635,
-0.8575912714004517,
0.2173028290271759,
-1.1564407348632812,
-0.12851715087890625,
-0.9209828972816467,
-1.1125402450561523,
0.5739970207214355,
0.07233532518148422,
0.6256187558174133,
-0.6472961902618408,
0.2759706676006317,
-2.259169578552246,
-1.3958337306976318,
-0.13003623485565186,
-0.8771979808807373,
0.47765833139419556,
-0.39164456725120544,
0.7155258655548096,
-0.1789574921131134,
-0.0343618206679821,
0.29808157682418823,
1.4740110635757446,
3.1645314693450928,
0.10832875967025757,
0.34726661443710327,
-0.2348630577325821,
-1.0785738229751587,
1.5443816184997559,
0.8646959066390991,
-0.24687449634075165,
-0.5808104276657104,
-0.9506775140762329,
1.3588205575942993,
1.8266966342926025,
1.1052840948104858,
0.05393527075648308,
-0.939256489276886,
-0.8100267052650452,
0.08417753875255585,
0.18335293233394623,
0.4096655249595642,
0.9765951037406921,
0.1392105221748352,
0.14492441713809967,
1.28348708152771,
1.038056492805481,
-0.3873080611228943,
0.5064314007759094,
-0.8403525948524475,
-0.41509613394737244,
0.5339751839637756,
0.33536410331726074,
0.034502025693655014,
0.25097334384918213,
-1.0684144496917725,
-0.24560213088989258,
-0.26482242345809937,
-0.8221182227134705,
-0.7393448352813721,
-0.3796824812889099,
-0.3939352035522461,
1.7399412393569946,
-0.12964926660060883,
-0.5132396221160889,
0.007165850140154362,
-0.832165002822876,
-0.1464775800704956,
-1.0453953742980957,
0.27846866846084595,
-0.15768806636333466,
0.0261634960770607,
-0.1414489597082138,
1.6863096952438354,
-0.955030620098114,
-2.223409414291382,
0.156539648771286,
0.2676011919975281,
-0.37446215748786926,
-0.10506609827280045,
1.8293973207473755,
0.5734524130821228,
1.362269401550293,
1.5077260732650757,
1.1278446912765503,
-0.647803783416748,
-1.2968207597732544,
0.767304003238678,
0.9747359156608582,
-1.3108652830123901,
0.9031633734703064,
-0.15107087790966034,
-0.6019158959388733,
0.5029779076576233,
1.2892011404037476,
0.5238473415374756,
-1.891045331954956,
0.7990061044692993,
-1.0960853099822998,
0.8447514176368713,
0.8083954453468323,
0.7736431956291199,
0.13651743531227112,
0.8491259813308716,
-1.252383828163147,
-1.0739375352859497,
-0.610079288482666,
-0.5950781106948853,
1.755316972732544,
-0.19006183743476868,
0.390499085187912,
-0.3655215799808502,
-1.2941635847091675,
0.21854254603385925,
0.6653516292572021,
0.29037556052207947,
-0.4029155373573303,
0.6932777762413025,
-0.7306720018386841,
-1.022348165512085,
-1.304142951965332,
-0.4570674002170563,
-0.9950347542762756,
-0.8409537076950073,
0.9785448312759399,
0.7252119183540344,
0.45859235525131226,
2.0005667209625244,
0.732422947883606,
0.15746094286441803,
-2.541538715362549,
0.8279646635055542,
0.3161071836948395,
-0.06561493128538132,
0.7877222299575806,
0.3150801658630371,
1.161806344985962,
-0.12315401434898376,
0.5422722697257996,
-2.393155813217163,
2.2009265422821045,
-0.25686174631118774,
0.7146182656288147,
0.052051860839128494,
-0.0414973683655262,
1.0104143619537354,
0.5455982685089111,
0.45840898156166077,
-1.0812867879867554,
0.8622632622718811,
-0.5917943120002747,
1.1648945808410645,
0.8653173446655273,
-0.9363870620727539,
0.21334010362625122,
1.1870267391204834,
0.4073124825954437,
-0.5671560168266296,
-0.9654003381729126,
-0.8097730875015259,
0.991550862789154,
1.7380294799804688,
0.08779877424240112,
0.09371034801006317,
0.9135345816612244,
0.7617682218551636,
-1.290874719619751,
0.022147901356220245,
-0.5297062397003174,
-0.7224779725074768,
1.872857689857483,
2.070401668548584,
-0.08809594064950943,
-0.06658060848712921,
-0.6722841858863831,
-1.4003623723983765,
0.8859776854515076,
0.14088432490825653,
-0.045166369527578354,
0.8349909782409668,
-0.6553210020065308,
1.23012375831604,
0.881312906742096,
0.7965425252914429,
0.29109716415405273,
0.005633755587041378,
0.31030213832855225,
-0.256339967250824,
-1.2236241102218628,
-0.273389995098114,
-0.9932267665863037,
-2.5712108612060547,
0.42201289534568787,
-0.2178124040365219,
-1.4328954219818115,
0.1438295990228653,
-0.9526587128639221,
0.7525673508644104,
-0.560224711894989,
-1.1309351921081543,
-1.3807002305984497,
0.2769528925418854,
-0.12420118600130081,
0.7539650797843933,
-1.6104975938796997,
-0.1588074266910553,
1.1263248920440674,
0.9947027564048767,
-0.6808045506477356,
0.8688013553619385,
0.23701485991477966,
0.9521499276161194,
0.9992895722389221,
-0.36097466945648193,
0.5222582817077637,
0.25537264347076416,
-1.3799388408660889,
0.3512880504131317,
1.3837851285934448,
0.2170616090297699,
1.4107855558395386,
-0.35045021772384644,
-0.03279931843280792,
0.4393981695175171,
-0.30972233414649963,
-0.606734037399292,
-0.7683806419372559,
0.6275394558906555,
-0.11602647602558136,
-0.9937300682067871,
-0.12436603754758835,
0.05167797952890396,
-0.19338694214820862,
0.36054345965385437,
-1.5006307363510132,
-0.037423472851514816,
-0.3809450566768646,
-0.635565996170044,
-1.380702257156372,
-0.07942301779985428,
1.3541393280029297,
-0.8805384039878845,
-0.1352808177471161,
0.5720069408416748,
0.14904673397541046,
0.5079773664474487,
0.670055627822876,
-0.7708849906921387,
-0.2107505351305008,
-0.1382269263267517,
-0.4652222692966461,
0.3146630823612213,
1.2873049974441528,
-0.1495441049337387,
-0.988770604133606,
0.4674295485019684,
-0.2600301206111908,
0.15046212077140808,
1.860491394996643,
0.031905919313430786,
-0.8832762837409973,
0.329958438873291,
-0.7321256399154663,
1.872398018836975,
1.6700170040130615,
1.3396536111831665,
-0.12776030600070953,
-0.8637909293174744,
0.6506192088127136,
-0.3131103515625,
-0.4094884991645813,
0.894900918006897,
0.32579994201660156,
-0.2694889008998871,
-1.4977757930755615,
0.7440667748451233,
1.2684617042541504,
-0.7377434968948364,
-0.7419817447662354,
0.03482741117477417,
-0.831932008266449,
1.2043564319610596,
0.679233193397522,
0.2733774483203888,
0.36005568504333496,
1.664556622505188,
0.7516028881072998,
-0.5603867173194885,
0.5403205156326294,
0.5058541297912598,
-0.12188886851072311,
-2.0603678226470947,
-1.117857813835144,
0.2667110860347748,
-0.4501475393772125,
-1.4884096384048462,
1.455899953842163,
-1.2598397731781006,
-1.0306854248046875,
0.5527524352073669,
0.11980784684419632,
1.3592908382415771,
0.2637845575809479,
1.7648099660873413,
1.966509222984314,
0.9222230315208435,
0.4417222738265991,
1.1428619623184204,
-0.2692650556564331,
-0.23536741733551025,
1.634692907333374,
-0.5067983865737915,
0.6593980193138123,
1.0195550918579102,
-0.38719335198402405,
-1.2663147449493408,
-0.8001632690429688,
-1.267140507698059,
-0.8120359778404236,
1.074939250946045,
0.10557243227958679,
-1.1514784097671509,
0.33778488636016846,
1.6497136354446411,
-0.013389138504862785,
-0.14873042702674866,
0.7190596461296082,
0.3779398202896118,
-0.668638288974762,
-0.04465271905064583,
-1.0760775804519653,
0.6443049311637878,
-0.3148285150527954,
-0.3573117256164551,
0.16813011467456818,
0.6080650687217712,
1.2576793432235718,
0.20817312598228455,
0.12511156499385834,
1.3270899057388306,
-1.3927080631256104,
1.2473094463348389,
-1.0208200216293335,
0.36549970507621765,
-2.3208088874816895,
1.4795113801956177,
-0.9309982061386108,
1.9362245798110962,
-2.6907951831817627,
0.5180572867393494,
-0.45589780807495117,
-0.5910202264785767,
0.2094830572605133,
-0.2679521143436432,
0.07141466438770294,
-0.05716368183493614,
-1.024677038192749,
-0.1349136084318161,
-0.8066197037696838,
0.5315565466880798,
1.2474373579025269,
1.4115179777145386,
-0.9468483924865723,
-0.31856557726860046,
-1.6485615968704224,
-0.13359400629997253,
-0.5047360062599182,
0.1326446235179901,
-1.8312227725982666,
-0.18368442356586456,
-2.0367374420166016,
-2.4968841075897217,
-1.288066029548645,
-0.9424157738685608,
1.3019894361495972,
0.12263648957014084,
-0.9186099171638489,
1.0877883434295654,
-0.49902501702308655,
-1.7640974521636963,
1.231919765472412,
-2.209256649017334
] |
Subsets and Splits